/* =============================================================
   Relax Home Lebanon — لوحة التحكم (RTL)
   Modern admin shell: dark espresso sidebar, warm content area,
   card-styled tables and forms. Arabic-first (Cairo / Tajawal).
   ============================================================= */

:root{
  --ad-bg:        #F6F2EC;
  --ad-surface:   #FFFFFF;
  --ad-border:    #E7DCCC;
  --ad-ink:       #33241B;
  --ad-ink-soft:  #8A7A6A;
  --ad-espresso:  #5A4032;
  --ad-side:      #2C1F17;
  --ad-side-hover:#3E2C21;
  --ad-accent: #31c1bd;
  --ad-accent-dk: #9f264d;
  --ad-green:     #4E7D4B;
  --ad-red: #a13628;
  --ad-radius:    14px;
  --ad-shadow:    0 4px 16px rgba(51,36,27,.07);
  --ad-side-w:    260px;
}

body{
  background:var(--ad-bg);
  color:var(--ad-ink);
  font-family:'Tajawal', sans-serif;
  font-size:.92rem;
}
h1,h2,h3,h4,h5,h6{ font-family:'Cairo', sans-serif; font-weight:700; color:var(--ad-ink); }

/* ---------------- Shell layout ---------------- */
.rh-admin-shell{ display:flex; min-height:100vh; }
.rh-admin-content{ flex:1; min-width:0; display:flex; flex-direction:column; }
.rh-admin-main{ padding:1.5rem; flex:1; }

/* ---------------- Sidebar ---------------- */
.rh-admin-sidebar{
  width:var(--ad-side-w);
  flex:0 0 var(--ad-side-w);
  background: #030647;
  color:#D8CCC0;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
}
.rh-admin-brand{
  display:flex; align-items:center; gap:.75rem;
  padding:1.1rem 1.25rem; color:#fff; text-decoration:none;
  font-family:'Cairo',sans-serif; font-weight:800; font-size:1.05rem;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.rh-admin-brand img{ height:40px; border-radius:10px; }
.rh-admin-brand:hover{ color:#fff; }

.rh-admin-nav{ flex:1; padding:.75rem .75rem 1rem; }
.rh-admin-nav ul{ list-style:none; margin:0; padding:0; }
.rh-admin-nav-title{
  font-size:.72rem; color:#9A8878; margin:1.1rem .6rem .4rem;
  font-family:'Cairo',sans-serif; font-weight:700;
}
.rh-admin-nav-link{
  display:flex; align-items:center; gap:.7rem;
  color:#D8CCC0; text-decoration:none; font-weight:500;
  padding:.55rem .8rem; border-radius:10px; margin-bottom:2px;
  transition:background .12s ease, color .12s ease;
}
.rh-admin-nav-link i{width:20px;text-align:center;font-size:.9rem;color: #46ff63;transition:color .12s ease;}
.rh-admin-nav-link:hover{ background:var(--ad-side-hover); color:#fff; }
.rh-admin-nav-link:hover i{ color:var(--ad-accent); }
.rh-admin-nav-link.active{background:var(--ad-accent);color: #ffffff;font-weight:700;}
.rh-admin-nav-link.active i{ color:#fff; }

.rh-admin-sidebar-footer{
  border-top:1px solid rgba(255,255,255,.08); padding:.9rem 1.25rem;
  display:flex; flex-direction:column; gap:.5rem;
}
.rh-admin-sidebar-footer a{ color:#D8CCC0; text-decoration:none; font-size:.87rem; }
.rh-admin-sidebar-footer a:hover{ color:#fff; }
.rh-admin-sidebar-footer i{ margin-inline-end:.5rem; color:#9A8878; }

/* ---------------- Topbar ---------------- */
.rh-admin-topbar{
  background:var(--ad-surface); border-bottom:1px solid var(--ad-border);
  display:flex; align-items:center; gap:1rem; padding:.65rem 1.5rem;
  position:sticky; top:0; z-index:1020;
}
.rh-admin-topbar-title{ font-family:'Cairo',sans-serif; font-weight:800; font-size:1rem; flex:1; }
.rh-admin-burger{
  display:none; background:none; border:1px solid var(--ad-border);
  border-radius:8px; width:38px; height:38px; color:var(--ad-ink);
}
.rh-admin-user{ display:flex; align-items:center; gap:.6rem; }
.rh-admin-user-avatar{
  width:38px; height:38px; border-radius:50%; background:var(--ad-espresso); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.rh-admin-user-meta{ line-height:1.25; }
.rh-admin-user-meta strong{ display:block; font-size:.85rem; font-family:'Cairo',sans-serif; }
.rh-admin-user-meta small{ color:var(--ad-ink-soft); font-size:.72rem; }

/* ---------------- Overview cards ---------------- */
.rh-stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.rh-stat-card{
  background:var(--ad-surface); border:1px solid var(--ad-border); border-radius:var(--ad-radius);
  padding:1.1rem 1.25rem; display:flex; align-items:center; gap:1rem; box-shadow:var(--ad-shadow);
}
.rh-stat-card i{
  width:48px; height:48px; flex:0 0 48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center; font-size:1.25rem;
  background:var(--ad-bg); color:var(--ad-accent);
}
.rh-stat-card .num{ font-size:1.45rem; font-weight:800; font-family:'Cairo',sans-serif; line-height:1.2; }
.rh-stat-card .lbl{ color:var(--ad-ink-soft); font-size:.82rem; }

.rh-admin-card{
  background:var(--ad-surface); border:1px solid var(--ad-border); border-radius:var(--ad-radius);
  padding:1.25rem 1.4rem; box-shadow:var(--ad-shadow); margin-bottom:1.25rem;
}
.rh-admin-card h3{ font-size:1.05rem; margin-bottom:1rem; }

/* ---------------- Content / generated tables ---------------- */
.DashContents h2{
  font-size:1.25rem; margin-bottom:1rem; padding-bottom:.6rem;
  border-bottom:2px solid var(--ad-border);
}
.DashContents h3{ font-size:1.05rem; }

.DashContents .table{
  background:var(--ad-surface); border:1px solid var(--ad-border);
  border-radius:var(--ad-radius); overflow:hidden; box-shadow:var(--ad-shadow);
}
.DashContents .table thead th, .DashContents .table .tableHeader{
  background:#F1E9DC;
  color: #163b28;
  font-family:'Cairo',sans-serif;
  font-weight:700;
  font-size:.8rem;
  border-bottom:1px solid var(--ad-border);
  padding:.7rem .75rem;
  text-align:start;
}
.DashContents .table td{ vertical-align:middle; border-color:#F1EBE1; padding:.6rem .75rem; }
.DashContents .table img{ border-radius:8px; }

/* Buttons (Bootstrap overrides, warm palette) */
.btn{ border-radius:10px; font-family:'Cairo',sans-serif; font-weight:700; }
.btn-success{ background:var(--ad-green); border-color:var(--ad-green); }
.btn-success:hover{ background:#3E6540; border-color:#3E6540; }
.btn-info{ background:var(--ad-espresso); border-color:var(--ad-espresso); color:#fff; }
.btn-info:hover{ background:#48332a; border-color:#48332a; color:#fff; }
.btn-danger{ background:var(--ad-red); border-color:var(--ad-red); }
.btn-warning{ background:#C9A227; border-color:#C9A227; color:#fff; }
.btn-warning:hover{ color:#fff; }

/* Forms (DAL-generated) */
.DALForm{
  background:var(--ad-surface); border:1px solid var(--ad-border);
  border-radius:var(--ad-radius); padding:1.4rem; box-shadow:var(--ad-shadow);
}
.DALForm .form-group.row{ margin-bottom:.9rem; }
.DALForm .col-form-label{ font-weight:700; font-size:.85rem; color:var(--ad-espresso); }
.form-control, .form-select{ border-color:var(--ad-border); border-radius:10px; }
.form-control:focus, .form-select:focus{ border-color:var(--ad-espresso); box-shadow:0 0 0 .2rem rgba(90,64,50,.1); }
.image-view-thumbnail{ margin-top:.5rem; }
.image-view-thumbnail img{ border-radius:8px; }

/* Status badges (orders) */
.rh-status{ padding:.2rem .7rem; border-radius:999px; font-size:.75rem; font-weight:700; display:inline-block; }
.rh-status-new{ background:#E7F0FE; color:#2455A4; }
.rh-status-confirmed{ background:#EAF6EA; color:#3E6B3B; }
.rh-status-preparing{ background:#FFF4E0; color:#A2711C; }
.rh-status-shipped{ background:#EFE9FB; color:#5F44A5; }
.rh-status-delivered{ background:#E5F5EF; color:#1F7A55; }
.rh-status-cancelled{ background:#FBEAE8; color:#A43A2E; }

/* DataTables tweaks */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select{
  border:1px solid var(--ad-border); border-radius:8px; padding:.25rem .5rem; margin-inline-start:.4rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current{
  background:var(--ad-espresso) !important; color:#fff !important; border-radius:8px; border-color:var(--ad-espresso) !important;
}

/* ---------------- Mobile ---------------- */
.rh-admin-overlay{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:1029; }
@media (max-width: 991px){
  .rh-admin-sidebar{
    position:fixed; inset-inline-start:0; top:0; z-index:1030; height:100vh;
    height:100dvh; /* visible height: 100vh runs under the phone's browser/system bars */
    transform:translateX(100%); transition:transform .2s ease;
    overscroll-behavior:contain;
  }
  /* Keep the last links clear of the phone's bottom bar / home indicator. */
  .rh-admin-sidebar-footer{ padding-bottom:calc(2.5rem + env(safe-area-inset-bottom)); }
  [dir="ltr"] .rh-admin-sidebar{ transform:translateX(-100%); }
  body.rh-sidebar-open .rh-admin-sidebar{ transform:translateX(0); }
  body.rh-sidebar-open .rh-admin-overlay{ display:block; }
  .rh-admin-burger{ display:block; }
  .rh-admin-main{ padding:1rem; }
}

/* =============================================================
   Panel engine (PANEL.php + admin.js) — professional lists,
   comprehensive forms, tabs, toasts, order workflow.
   ============================================================= */

/* ---------------- Panel shell ---------------- */
.rh-panel-head{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.rh-panel-title{ display:flex; align-items:center; gap:.75rem; }
.rh-panel-title h2{ margin:0; font-size:1.25rem; }
.rh-panel-title h2 i{ color:var(--ad-accent); margin-inline-end:.35rem; }
.rh-panel-count{ background:var(--ad-surface); border:1px solid var(--ad-border); color:var(--ad-ink-soft); border-radius:999px; padding:.15rem .7rem; font-size:.75rem; font-weight:700; }
.rh-panel-sub{ color:var(--ad-ink-soft); font-size:.8rem; }
.rh-back-btn{
  background:var(--ad-surface); border:1px solid var(--ad-border); color:var(--ad-ink);
  width:36px; height:36px; border-radius:10px; flex:0 0 36px;
}
.rh-back-btn:hover{ background:var(--ad-espresso); color:#fff; }

/* ---------------- List tables ---------------- */
.rh-panel-tablecard{ padding:.75rem 1rem; }
.rh-panel-table{ margin-bottom:0; }
.rh-panel-table thead th{ white-space:nowrap; }
.rh-actions-col{ width:1%; }
.rh-actions-cell{ white-space:nowrap; text-align:end; }
.rh-icon-btn{
  background:none; border:1px solid var(--ad-border); color:var(--ad-espresso);
  width:32px; height:32px; border-radius:8px; margin-inline-start:.25rem;
  display:inline-flex; align-items:center; justify-content:center; font-size:.8rem;
  transition:background .12s ease,color .12s ease;
}
.rh-icon-btn:hover{ background:var(--ad-espresso); color:#fff; border-color:var(--ad-espresso); }
.rh-icon-btn.rh-icon-danger{ color:var(--ad-red); }
.rh-icon-btn.rh-icon-danger:hover{ background:var(--ad-red); border-color:var(--ad-red); color:#fff; }
.rh-row-inactive td{ opacity:.55; }
.rh-cell-img{ width:44px; height:44px; object-fit:cover; border-radius:8px; border:1px solid var(--ad-border); }
.rh-cell-noimg{
  width:44px; height:44px; border-radius:8px; background:var(--ad-bg); border:1px dashed var(--ad-border);
  display:inline-flex; align-items:center; justify-content:center; color:var(--ad-ink-soft);
}
.rh-cell-video{ color:var(--ad-espresso); font-weight:700; font-size:.78rem; }
.rh-swatch{ width:18px; height:18px; border-radius:6px; display:inline-block; vertical-align:middle; border:1px solid rgba(0,0,0,.15); }
.rh-flag{ color:var(--ad-accent); font-size:.72rem; margin-inline-start:.15rem; }
.rh-price-old{ text-decoration:line-through; color:var(--ad-ink-soft); font-size:.8rem; }

.rh-pill{ padding:.18rem .6rem; border-radius:999px; font-size:.72rem; font-weight:700; display:inline-block; white-space:nowrap; }
.rh-pill-on{ background:#EAF6EA; color:#3E6B3B; }
.rh-pill-off{ background:#FBEAE8; color:#A43A2E; }
.rh-pill-warn{ background:#FFF4E0; color:#A2711C; }
.rh-pill-info{ background:#EFE9FB; color:#5F44A5; }

/* ---------------- Forms ---------------- */
.rh-form-grid{ display:grid; grid-template-columns:repeat(12,1fr); gap:1rem 1.25rem; }
.rh-col-4{ grid-column:span 4; } .rh-col-6{ grid-column:span 6; } .rh-col-12{ grid-column:span 12; }
.rh-field-label{ font-weight:700; font-size:.83rem; color:var(--ad-espresso); margin-bottom:.3rem; display:block; }
.rh-req{ color:var(--ad-red); }
.rh-hint{ color:var(--ad-ink-soft); font-size:.74rem; margin-top:.3rem; }
.rh-counter-over{ color:var(--ad-red); font-weight:700; }
.rh-field-error{ color:var(--ad-red); font-size:.76rem; font-weight:700; margin-top:.3rem; }
.rh-field-invalid .form-control, .rh-field-invalid .form-select{ border-color:var(--ad-red); box-shadow:0 0 0 .15rem rgba(180,74,60,.12); }

.rh-color-field{ display:flex; gap:.5rem; align-items:center; }
.rh-color-field input[type="color"]{ width:46px; height:38px; border:1px solid var(--ad-border); border-radius:10px; padding:2px; background:var(--ad-surface); }

/* Bilingual (AR/EN) field pairs */
.rh-bilingual-group{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
.rh-bilingual-sub{ margin:0; }
.rh-field-label-sm{ font-weight:600; font-size:.74rem; color:var(--ad-ink-soft); margin-bottom:.25rem; display:block; }
@media (max-width:767px){ .rh-bilingual-group{ grid-template-columns:1fr; } }

.rh-switch{ display:inline-flex; align-items:center; gap:.6rem; cursor:pointer; margin:0; padding-top:.3rem; }
.rh-switch input{ display:none; }
.rh-switch-track{
  width:42px; height:24px; border-radius:999px; background:#D8CCC0; position:relative; flex:0 0 42px;
  transition:background .15s ease;
}
.rh-switch-track::after{
  content:""; position:absolute; top:3px; inset-inline-start:3px; width:18px; height:18px;
  border-radius:50%; background:#fff; transition:transform .15s ease; box-shadow:0 1px 3px rgba(0,0,0,.25);
}
.rh-switch input:checked + .rh-switch-track{ background:var(--ad-green); }
.rh-switch input:checked + .rh-switch-track::after{ transform:translateX(-18px); }
[dir="ltr"] .rh-switch input:checked + .rh-switch-track::after{ transform:translateX(18px); }
.rh-switch-label{ font-weight:700; font-size:.85rem; color:var(--ad-ink); }

.rh-upload{ display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.rh-upload-preview img, .rh-upload-preview video{
  width:120px; height:80px; object-fit:cover; border-radius:10px; border:1px solid var(--ad-border); display:block;
}
.rh-upload-preview .rh-cell-noimg{ width:120px; height:80px; }
.rh-upload-status{ font-size:.78rem; color:var(--ad-ink-soft); margin-top:.35rem; }
.rh-upload-cover .rh-upload-preview img, .rh-upload-cover .rh-upload-preview .rh-cell-noimg{ width:240px; height:75px; }
.rh-upload-cover .rh-upload-controls{ flex:1; min-width:220px; }

.rh-form-actions{
  position:sticky; bottom:0; z-index:10; display:flex; align-items:center; gap:.75rem;
  background:var(--ad-surface); border:1px solid var(--ad-border); border-radius:var(--ad-radius);
  padding:.8rem 1.2rem; box-shadow:0 -4px 16px rgba(51,36,27,.08); margin-top:1rem;
}
.rh-tabs-root[data-active="variants"] .rh-form-actions,
.rh-tabs-root[data-active="gallery"] .rh-form-actions{ display:none; }

/* ---------------- Tabs (product editor) ---------------- */
.rh-tab-bar{ display:flex; gap:.35rem; flex-wrap:wrap; margin-bottom:1.1rem; border-bottom:2px solid var(--ad-border); }
.rh-tab-btn{
  background:none; border:none; border-bottom:3px solid transparent; color:var(--ad-ink-soft);
  padding:.55rem .9rem; font-family:'Cairo',sans-serif; font-weight:700; font-size:.85rem;
  margin-bottom:-2px; transition:color .12s ease,border-color .12s ease;
}
.rh-tab-btn i{ margin-inline-end:.3rem; }
.rh-tab-btn:hover{ color:var(--ad-ink); }
.rh-tab-btn.active{ color:var(--ad-accent-dk); border-bottom-color:var(--ad-accent); }
.rh-tab-btn.rh-tab-disabled{ opacity:.4; cursor:not-allowed; }
.rh-tab-pane{ display:none; }
.rh-tab-pane.active{ display:block; }

/* ---------------- Variants / gallery ---------------- */
.rh-variant-form{
  display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)) auto; gap:.75rem; align-items:end;
  background:var(--ad-bg); border:1px solid var(--ad-border); border-radius:10px; padding:1rem; margin-top:1rem;
}
.rh-gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:.9rem; }
.rh-gallery-item{
  position:relative; border:2px solid var(--ad-border); border-radius:12px; overflow:hidden; background:var(--ad-bg);
}
.rh-gallery-item img{ width:100%; height:110px; object-fit:cover; display:block; }
.rh-gallery-main{ border-color:var(--ad-accent); }
.rh-gallery-badge{
  position:absolute; top:.4rem; inset-inline-start:.4rem; background:var(--ad-accent); color:#fff;
  border-radius:999px; padding:.1rem .55rem; font-size:.68rem; font-weight:700;
}
.rh-gallery-actions{
  display:flex; justify-content:center; gap:.3rem; padding:.4rem; background:var(--ad-surface);
}

/* ---------------- Orders ---------------- */
.rh-chip-bar{ display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1.1rem; }
.rh-chip{
  background:var(--ad-surface); border:1px solid var(--ad-border); color:var(--ad-ink);
  border-radius:999px; padding:.35rem .9rem; font-weight:700; font-size:.8rem; font-family:'Cairo',sans-serif;
  transition:background .12s ease,color .12s ease;
}
.rh-chip span{ background:var(--ad-bg); border-radius:999px; padding:.05rem .45rem; font-size:.72rem; margin-inline-start:.25rem; }
.rh-chip:hover{ border-color:var(--ad-espresso); }
.rh-chip.active{ background:var(--ad-espresso); border-color:var(--ad-espresso); color:#fff; }
.rh-chip.active span{ background:rgba(255,255,255,.2); color:#fff; }

.rh-status-flow{ display:flex; gap:.5rem; flex-wrap:wrap; }
.rh-flow-btn{
  border:1px solid var(--ad-border); background:var(--ad-surface); color:var(--ad-ink-soft);
  border-radius:10px; padding:.45rem 1rem; font-weight:700; font-size:.82rem; font-family:'Cairo',sans-serif;
}
.rh-flow-btn:hover:not(:disabled){ border-color:var(--ad-espresso); color:var(--ad-ink); }
.rh-flow-btn.active{ cursor:default; }
.rh-flow-btn.active.rh-flow-new{ background:#E7F0FE; color:#2455A4; border-color:#2455A4; }
.rh-flow-btn.active.rh-flow-confirmed{ background:#EAF6EA; color:#3E6B3B; border-color:#3E6B3B; }
.rh-flow-btn.active.rh-flow-preparing{ background:#FFF4E0; color:#A2711C; border-color:#A2711C; }
.rh-flow-btn.active.rh-flow-shipped{ background:#EFE9FB; color:#5F44A5; border-color:#5F44A5; }
.rh-flow-btn.active.rh-flow-delivered{ background:#E5F5EF; color:#1F7A55; border-color:#1F7A55; }
.rh-flow-btn.active.rh-flow-cancelled{ background:#FBEAE8; color:#A43A2E; border-color:#A43A2E; }

.rh-order-cols{ display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; }
.rh-dl{ display:grid; grid-template-columns:auto 1fr; gap:.45rem 1.2rem; margin:0; }
.rh-dl dt{ color:var(--ad-ink-soft); font-weight:700; font-size:.8rem; }
.rh-dl dd{ margin:0; font-size:.88rem; }

/* ---------------- Toasts ---------------- */
#RhToastHost{ position:fixed; bottom:1.25rem; inset-inline-start:1.25rem; z-index:2000; display:flex; flex-direction:column; gap:.5rem; }
.rh-toast{
  background:var(--ad-side); color:#fff; border-radius:12px; padding:.7rem 1.1rem;
  font-weight:700; font-size:.85rem; box-shadow:0 8px 24px rgba(0,0,0,.25);
  opacity:0; transform:translateY(10px); transition:opacity .25s ease, transform .25s ease;
  display:flex; align-items:center; gap:.5rem; max-width:380px;
}
.rh-toast.show{ opacity:1; transform:translateY(0); }
.rh-toast-success i{ color:#7FC97F; }
.rh-toast-error{ background:var(--ad-red); }
.rh-toast-error i{ color:#fff; }

/* ---------------- Seller product shortcuts and grid ---------------- */
.rh-quickadd{
  background:linear-gradient(135deg,var(--ad-espresso),var(--ad-accent-dk));border-radius:var(--ad-radius);
  padding:1.1rem 1.25rem;margin-bottom:1.25rem;box-shadow:var(--ad-shadow);
  display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
}
.rh-quickadd-title{color:#fff;font-weight:700;display:flex;align-items:center;gap:.5rem}.rh-quickadd-title i{color:#FFD9A0}
.rh-quickadd-cta-btn{background:#fff;color:var(--ad-espresso);border:0;border-radius:10px;padding:.6rem 1.4rem;font-weight:700;display:inline-flex;align-items:center;gap:.5rem;transition:transform .12s ease}
.rh-quickadd-cta-btn:hover{transform:translateY(-2px)}
.rh-quick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem}
.rh-quick-card{background:var(--ad-bg);border:1px solid var(--ad-border);border-radius:12px;padding:.75rem;text-align:center;min-width:0}
.rh-quick-card img,.rh-quick-noimg{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px;margin-bottom:.5rem}
.rh-quick-noimg{display:flex;align-items:center;justify-content:center;background:var(--ad-surface);border:1px dashed var(--ad-border);color:var(--ad-ink-soft);font-size:1.3rem}
.rh-quick-name{font-weight:700;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:2.6em}
.rh-quick-price{color:var(--ad-accent-dk);font-weight:800;font-size:.95rem;margin:.3rem 0 .55rem}
.rh-quick-actions{display:flex;justify-content:center;align-items:center;gap:.4rem;min-height:36px}
.rh-product-card-status{min-height:28px;margin-bottom:.35rem}.rh-product-card-status .rh-pill{white-space:normal}
.rh-product-card-meta{display:flex;justify-content:space-between;gap:.4rem;color:var(--ad-ink-soft);font-size:.72rem;margin-top:.3rem}.rh-product-card-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rh-icon-state{width:34px;height:34px;display:grid;place-items:center;color:var(--ad-ink-soft)}.rh-icon-featured{color:#d69b00}
.rh-empty-products{text-align:center;padding:2rem;color:var(--ad-ink-soft)}.rh-empty-products>i{font-size:2rem}.rh-empty-products p{margin:.6rem 0 1rem}

.rh-category-picker{border:1px solid var(--ad-border);border-radius:12px;padding:.8rem;background:var(--ad-bg)}
.rh-category-picker-tools{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.75rem}
.rh-category-picker-search{position:relative;flex:1 1 230px}.rh-category-picker-search i{position:absolute;inset-inline-start:.75rem;top:50%;transform:translateY(-50%);color:var(--ad-ink-soft)}
.rh-category-picker-search input{padding-inline-start:2.2rem}.rh-category-picker-count{font-size:.82rem;font-weight:700;color:var(--ad-ink-soft);margin-inline-start:auto}
.rh-category-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.55rem;max-height:330px;overflow:auto;padding:.15rem}
.rh-category-choice{display:block;cursor:pointer;margin:0}.rh-category-choice input{position:absolute;opacity:0;pointer-events:none}
.rh-category-choice span{display:flex;align-items:center;gap:.55rem;min-height:46px;padding:.65rem .8rem;border:1px solid var(--ad-border);border-radius:10px;background:#fff;font-weight:600;transition:.15s}
.rh-category-choice span i{width:20px;height:20px;border:2px solid #bbb;border-radius:6px;display:grid;place-items:center;color:transparent;font-size:.7rem;flex:0 0 auto}
.rh-category-choice input:checked+span{border-color:#198754;background:#eaf7f0;color:#12663f}.rh-category-choice input:checked+span i{background:#198754;border-color:#198754;color:#fff}
.rh-category-choice input:focus-visible+span{outline:3px solid rgba(25,135,84,.25)}
.rh-import-divider{display:flex;align-items:center;gap:.75rem;color:var(--ad-ink-soft);font-weight:800;font-size:.8rem}.rh-import-divider::before,.rh-import-divider::after{content:"";height:1px;background:var(--ad-border);flex:1}.rh-import-divider span{padding:.1rem .55rem;border:1px solid var(--ad-border);border-radius:999px;background:var(--ad-surface)}

/* ---------------- Live visit analytics ---------------- */
.rh-live-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.rh-live-head h3{margin:0}.rh-live-head .fa-signal{color:#198754}
.rh-analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.rh-analytics-grid section{min-width:0;border:1px solid var(--ad-border);border-radius:12px;padding:.8rem;background:var(--ad-bg)}.rh-analytics-grid h4,.rh-live-destinations h4{font-size:.9rem;margin:0 0 .65rem}.rh-analytics-grid canvas{display:block;max-width:100%}
.rh-live-destinations{margin-top:1rem}.rh-destination-row{display:grid;grid-template-columns:auto minmax(90px,1fr) minmax(80px,2fr) auto;align-items:center;gap:.6rem;padding:.42rem 0;border-bottom:1px solid var(--ad-border);font-size:.82rem}.rh-destination-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rh-destination-bar{height:7px;border-radius:999px;background:var(--ad-border);overflow:hidden}.rh-destination-bar i{display:block;height:100%;border-radius:inherit;background:var(--ad-accent)}

/* ---------------- Responsive ---------------- */
@media (max-width: 991px){
  .rh-col-4, .rh-col-6{ grid-column:span 12; }
  .rh-order-cols{ grid-template-columns:1fr; }
  .rh-variant-form{ grid-template-columns:1fr 1fr; }
  .rh-analytics-grid{grid-template-columns:1fr}
}
@media (max-width:575px){
  .rh-quickadd{flex-direction:column;align-items:stretch;text-align:center}.rh-quickadd-title{justify-content:center}
  .rh-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.rh-icon-btn{width:40px;height:40px}
  .rh-category-picker{padding:.65rem}.rh-category-picker-grid{grid-template-columns:1fr 1fr;gap:.45rem;max-height:390px}.rh-category-choice span{min-height:52px;padding:.6rem;font-size:.86rem}.rh-category-picker-tools .btn{min-height:40px}.rh-category-picker-count{width:100%;margin:0}
}

/* ---------------- Seller: import from Instagram/Facebook post ---------------- */
.rh-post-import-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.6rem}
.rh-post-import-img{position:relative;display:block;cursor:pointer;border-radius:10px;overflow:hidden;border:2px solid var(--ad-border);aspect-ratio:1/1;background:var(--ad-bg);margin:0}
.rh-post-import-img img{width:100%;height:100%;object-fit:cover;display:block;transition:opacity .15s ease}
.rh-post-import-img input{position:absolute;opacity:0;pointer-events:none}
.rh-post-import-img span{position:absolute;top:.4rem;inset-inline-start:.4rem;width:1.6rem;height:1.6rem;border-radius:50%;background:#fff;border:2px solid var(--ad-border);display:flex;align-items:center;justify-content:center;font-size:.75rem;color:transparent}
.rh-post-import-img:has(input:checked){border-color:var(--ad-green)}
.rh-post-import-img:has(input:checked) span{background:var(--ad-green);border-color:var(--ad-green);color:#fff}
.rh-post-import-img:not(:has(input:checked)) img{opacity:.4}
.rh-post-import-img:has(input:focus-visible){outline:3px solid var(--ad-accent);outline-offset:2px}
.rh-post-import-img.is-broken::after{content:"لا يمكن عرض المعاينة";position:absolute;inset:auto 0 0;padding:.25rem;font-size:.7rem;text-align:center;background:rgba(0,0,0,.55);color:#fff}

/* ---------------- Admin "login as shop" support banner ---------------- */
.rh-support-banner{position:sticky;top:0;z-index:1025;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;background:#5F44A5;color:#fff;padding:.55rem 1.25rem;font-size:.88rem}
.rh-support-banner i{margin-inline-end:.3rem}
.rh-support-exit{background:#fff;color:#5F44A5;border-radius:999px;padding:.3rem .9rem;font-weight:700;text-decoration:none;white-space:nowrap}
.rh-support-exit:hover{background:#EFE9FB;color:#5F44A5}

/* ---------------- Seller: bulk add from images ---------------- */
.rh-bulk-drop{display:flex;flex-direction:column;align-items:center;gap:.35rem;padding:1.6rem 1rem;border:2px dashed var(--ad-border);border-radius:var(--ad-radius);background:var(--ad-bg);cursor:pointer;text-align:center;margin:0;transition:border-color .15s ease,background .15s ease}
.rh-bulk-drop:hover,.rh-bulk-drop.is-over{border-color:var(--ad-accent);background:#eefaf9}
.rh-bulk-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.rh-bulk-drop:focus-within{outline:3px solid var(--ad-accent);outline-offset:2px}
.rh-bulk-drop i{font-size:1.8rem;color:var(--ad-accent)}
.rh-bulk-drop span{color:var(--ad-ink-soft);font-size:.82rem}
.rh-bulk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.8rem;margin-bottom:5rem}
.rh-bulk-card{background:var(--ad-surface);border:1.5px solid var(--ad-border);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.rh-bulk-card.is-done{border-color:var(--ad-green)}
.rh-bulk-card.is-error{border-color:var(--ad-red)}
.rh-bulk-card.is-working{border-color:var(--ad-accent)}
.rh-bulk-thumb{position:relative;aspect-ratio:4/3;background:var(--ad-bg)}
.rh-bulk-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.rh-bulk-num{position:absolute;top:.4rem;inset-inline-start:.4rem;background:rgba(0,0,0,.6);color:#fff;border-radius:999px;font-size:.72rem;padding:.05rem .5rem}
.rh-bulk-remove{position:absolute;top:.35rem;inset-inline-end:.35rem;width:30px;height:30px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--ad-red);box-shadow:0 1px 4px rgba(0,0,0,.2)}
.rh-bulk-fields{display:grid;gap:.4rem;padding:.55rem}
.rh-bulk-row2{display:grid;grid-template-columns:1fr 1fr;gap:.4rem}
.rh-bulk-msg{padding:0 .55rem .5rem;font-size:.78rem;min-height:1.1rem}
.rh-bulk-card.is-error .rh-bulk-msg{color:var(--ad-red);font-weight:700}
.rh-bulk-card.is-done .rh-bulk-msg{color:var(--ad-green);font-weight:700}
.rh-bulk-bar{position:sticky;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;background:var(--ad-surface);border:1px solid var(--ad-border);border-radius:12px;padding:.7rem .9rem;box-shadow:0 -6px 20px rgba(51,36,27,.08)}
.rh-bulk-bar[hidden]{display:none}
.rh-bulk-progress{flex:1;min-width:120px;height:8px;background:var(--ad-bg);border-radius:999px;overflow:hidden}
.rh-bulk-progress div{height:100%;width:0;background:var(--ad-green);transition:width .2s ease}
#BulkStatus{font-size:.85rem;color:var(--ad-ink-soft)}
@media (max-width:575px){.rh-bulk-grid{grid-template-columns:1fr 1fr;gap:.55rem}.rh-bulk-bar .btn{width:100%}}
.rh-bulk-lbl{display:flex;flex-direction:column;gap:.15rem;margin:0}
.rh-bulk-lbl span{font-size:.72rem;color:var(--ad-ink-soft);font-weight:700}

/* ---------------- Seller: delivery policy ---------------- */
.rh-delivery-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.6rem}
.rh-delivery-option{display:flex;gap:.6rem;align-items:flex-start;border:1.5px solid var(--ad-border);border-radius:12px;padding:.75rem .85rem;cursor:pointer;margin:0;background:var(--ad-surface)}
.rh-delivery-option:has(input:checked){border-color:var(--ad-accent);background:#eefaf9}
.rh-delivery-option input{margin-top:.25rem;accent-color:var(--ad-accent)}
.rh-delivery-option span{display:flex;flex-direction:column;gap:.15rem}
.rh-delivery-option small{color:var(--ad-ink-soft)}

/* ---------------- Seller: share product to social media ---------------- */
.rh-icon-share{color:var(--ad-accent-dk)}
.rh-share-warning{background:#FFF4E0;color:#A2711C;border-radius:10px;padding:.55rem .8rem;margin-bottom:.8rem;font-weight:700;font-size:.85rem}
.rh-share-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:1.1rem}
.rh-share-preview{position:relative;aspect-ratio:1/1;border-radius:12px;overflow:hidden;background:var(--ad-bg);border:1px solid var(--ad-border)}
.rh-share-preview img{width:100%;height:100%;object-fit:cover;display:block}
.rh-share-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(246,242,236,.75);font-size:1.6rem;color:var(--ad-ink-soft)}
.rh-share-loading[hidden]{display:none}
.rh-share-toggle{display:inline-flex;margin-top:.6rem;border:1px solid var(--ad-border);border-radius:999px;overflow:hidden;background:var(--ad-surface)}
.rh-share-toggle button{border:0;background:transparent;padding:.35rem .9rem;font-size:.82rem;font-weight:700;color:var(--ad-ink-soft)}
.rh-share-toggle button.active{background:var(--ad-accent);color:#fff}
.rh-share-text .rh-share-toggle{margin-top:0}
#SelShareCaption{font-size:.88rem;line-height:1.6;unicode-bidi:plaintext}
.rh-share-actions{flex-wrap:wrap;gap:.4rem;justify-content:flex-start}
@media (max-width:767px){.rh-share-grid{grid-template-columns:1fr}.rh-share-actions .btn{flex:1 1 45%}}

/* ---------------- Admin visit charts: hover tooltip ---------------- */
.rh-chart-tip{position:absolute;z-index:3;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:.05rem;background:#fff;border:1px solid var(--ad-border);border-radius:8px;box-shadow:0 4px 14px rgba(51,36,27,.14);padding:.3rem .6rem;font-size:.78rem;white-space:nowrap}
.rh-chart-tip[hidden]{display:none}
.rh-chart-tip span{color:var(--ad-ink-soft)}
.rh-chart-tip strong{color:var(--ad-ink);font-size:.86rem}

/* ---------------- Admin store list: details sub-table ---------------- */
.rh-details-col{width:44px;text-align:center}
.rh-details-toggle i{transition:transform .15s ease}
.rh-details-toggle[aria-expanded="true"] i{transform:rotate(180deg)}
tr.rh-row-open > td{background:#eefaf9 !important}
tr.rh-shop-details-row > td{background:var(--ad-bg) !important;padding:.85rem !important}
.rh-shop-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:.8rem}
.rh-shop-details section{background:var(--ad-surface);border:1px solid var(--ad-border);border-radius:12px;padding:.75rem .85rem}
.rh-shop-details h4{font-size:.92rem;margin:0 0 .6rem;display:flex;align-items:center;gap:.4rem}
.rh-shop-details h4 i{color:var(--ad-accent)}
.rh-shop-details h4 small{font-weight:400;color:var(--ad-ink-soft);font-size:.72rem}
.rh-sd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem .7rem}
.rh-sd-stat{display:flex;flex-direction:column;min-width:0}
.rh-sd-stat > span{font-size:.74rem;color:var(--ad-ink-soft)}
.rh-sd-stat > strong{font-size:.95rem;color:var(--ad-ink);overflow:hidden;text-overflow:ellipsis}
.rh-sd-stat > strong small{color:var(--ad-ink-soft);font-weight:600}
.rh-sd-meter{height:5px;background:var(--ad-bg);border-radius:999px;overflow:hidden;margin-top:.2rem}
.rh-sd-meter i{display:block;height:100%;background:#198754;border-radius:999px}
.rh-sd-meter.is-full i{background:#A2711C}
.rh-sd-alert{display:inline-block;background:#FFF4E0;color:#A2711C;border-radius:999px;padding:0 .55rem}
.rh-sd-checklist{list-style:none;padding:0;margin:.7rem 0 0;display:flex;flex-wrap:wrap;gap:.3rem}
.rh-sd-checklist li{font-size:.76rem;border-radius:999px;padding:.12rem .55rem;font-weight:700}
.rh-sd-checklist li.is-ok{background:#EAF6EA;color:#3E6B3B}
.rh-sd-checklist li.is-missing{background:#FBEAE8;color:#A43A2E}
.rh-sd-actions{margin-top:.6rem;display:flex;gap:.4rem;flex-wrap:wrap}

/* ---------------- Admin: product auto-approve switch ---------------- */
.rh-auto-approve{padding:.75rem 1rem}
.rh-auto-approve > div > i{color:var(--ad-ink-soft)}
.rh-auto-approve.is-on{border-color:#E8C36A;background:#FFF9EC}
.rh-auto-approve.is-on > div > i{color:#A2711C}

/* ---------------- Seller: store template gallery ---------------- */
.rh-template-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.75rem}
.rh-template-card{position:relative;display:flex;flex-direction:column;border:2px solid var(--ad-border);border-radius:14px;overflow:hidden;cursor:pointer;margin:0;background:var(--ad-surface);transition:border-color .15s ease,box-shadow .15s ease}
.rh-template-card input{position:absolute;opacity:0;pointer-events:none}
.rh-template-card:hover{box-shadow:var(--ad-shadow)}
.rh-template-card:has(input:checked){border-color:var(--ad-accent);box-shadow:0 0 0 3px rgba(49,193,189,.18)}
.rh-template-card:has(input:focus-visible){outline:3px solid var(--ad-accent);outline-offset:2px}
.rh-template-preview{aspect-ratio:4/3;background:var(--ad-bg);display:flex;align-items:center;justify-content:center;font-size:2rem;color:var(--ad-ink-soft);border-bottom:1px solid var(--ad-border)}
.rh-template-preview img{width:100%;height:100%;object-fit:cover;object-position:top}
.rh-template-body{display:flex;flex-direction:column;gap:.25rem;padding:.6rem .75rem .75rem}
.rh-template-body small{color:var(--ad-ink-soft);line-height:1.5}
.rh-template-body strong small{font-weight:600}
.rh-template-body a{font-size:.8rem;font-weight:700;text-decoration:none;margin-top:.15rem}
.rh-template-check{position:absolute;top:.5rem;inset-inline-end:.5rem;width:1.8rem;height:1.8rem;border-radius:50%;background:var(--ad-accent);color:#fff;display:none;align-items:center;justify-content:center;font-size:.8rem;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.rh-template-card:has(input:checked) .rh-template-check{display:flex}

/* ---------------- Admin: store templates page ---------------- */
.rh-tpl-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:.9rem}
.rh-tpl-admin-card{display:flex;flex-direction:column;padding:0;overflow:hidden}
.rh-tpl-admin-preview{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;background:var(--ad-bg);border-bottom:1px solid var(--ad-border);font-size:2rem;color:var(--ad-ink-soft)}
.rh-tpl-admin-preview img{width:100%;height:100%;object-fit:cover;object-position:top}
.rh-tpl-admin-body{padding:.8rem .95rem 1rem}
.rh-tpl-admin-body h3{font-size:1rem;margin:0 0 .35rem}
.rh-tpl-admin-body h3 small{color:var(--ad-ink-soft);font-weight:600;font-size:.75rem}
.rh-tpl-plans{display:flex;flex-direction:column;gap:.35rem;border-top:1px dashed var(--ad-border);padding-top:.6rem}
.rh-tpl-plan.is-feature-off .rh-switch-label{color:var(--ad-ink-soft);font-weight:500}
.rh-tpl-plan.is-feature-off .rh-switch-label::after{content:" — الباقة لا تتضمن الميزة";font-size:.72rem}

/* ── Shop applications (pending queue + review page) ─────────────────── */
.rh-app-list{display:grid;gap:1rem}
.rh-app-card{padding:1.1rem 1.25rem}
.rh-app-head{display:flex;align-items:center;gap:.85rem;padding-bottom:.9rem;margin-bottom:.9rem;border-bottom:1px solid var(--ad-border)}
.rh-app-logo{width:52px;height:52px;flex:0 0 52px;border-radius:14px;object-fit:cover;display:flex;align-items:center;justify-content:center;background:var(--ad-accent);color:#fff;font-weight:800;font-size:1.35rem}
.rh-app-title{flex:1;min-width:0}
.rh-app-title h3{margin:0;font-size:1.15rem;line-height:1.4;overflow-wrap:anywhere}
.rh-app-sub{color:var(--ad-ink-soft);font-size:.85rem;text-align:start}
.rh-app-meta{display:flex;flex-direction:column;align-items:flex-end;gap:.3rem;flex-shrink:0}
.rh-app-meta small{color:var(--ad-ink-soft);font-size:.75rem;white-space:nowrap}
.rh-app-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.75rem 1.25rem;margin:0}
.rh-app-item{min-width:0}
.rh-app-item.is-wide{grid-column:1/-1}
.rh-app-item dt{color:var(--ad-ink-soft);font-size:.75rem;font-weight:700;margin-bottom:.15rem;display:flex;align-items:center;gap:.35rem}
.rh-app-item dt i{color:var(--ad-accent);width:1rem;text-align:center}
.rh-app-item dd{margin:0;font-size:.92rem;overflow-wrap:anywhere}
.rh-app-msg{white-space:pre-line;background:var(--ad-bg);border:1px solid var(--ad-border);border-inline-start:3px solid var(--ad-accent);border-radius:10px;padding:.65rem .85rem;line-height:1.8}
.rh-app-links{display:flex;gap:.6rem;font-size:1.1rem}
.rh-app-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem;padding-top:.9rem;border-top:1px solid var(--ad-border)}
.rh-app-actions:empty{display:none}
@media (max-width:575px){
  .rh-app-head{flex-wrap:wrap}
  .rh-app-meta{flex-direction:row;align-items:center;width:100%;justify-content:space-between}
  .rh-app-grid{grid-template-columns:1fr 1fr}
  .rh-app-actions .btn{flex:1 1 auto}
  .rh-app-actions .btn-success{flex-basis:100%}
}
.rh-status-pending{ background:#FFF4E0; color:#A2711C; }
.rh-status-active{ background:#E5F5EF; color:#1F7A55; }
.rh-status-suspended{ background:#EFEFF1; color:#55575E; }
.rh-status-rejected{ background:#FBEAE8; color:#A43A2E; }

/* ── Shop review: application (aside) + edit form + decision ──────────── */
.rh-review-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;align-items:start}
.rh-review-aside > .rh-admin-card,.rh-review-main > form > .rh-admin-card{margin-bottom:1rem}
.rh-review-label{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;font-weight:800;color:var(--ad-accent);text-transform:none;margin-bottom:.6rem}
.rh-review-decision{border:2px solid var(--ad-accent)}
.rh-review-buttons{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}
@media (min-width:1200px){
  .rh-review-layout{grid-template-columns:minmax(320px,400px) minmax(0,1fr)}
  .rh-review-aside{position:sticky;top:1rem;max-height:calc(100vh - 2rem);overflow-y:auto}
  .rh-review-aside .rh-app-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:575px){ .rh-review-buttons .btn{flex:1 1 100%} }

/* ── Seller: store location picker (LBMap.picker) ─────────────────────── */
.lb-loc-map{height:320px;border-radius:12px;border:1px solid var(--ad-border);background:var(--ad-bg);z-index:0}
@media (max-width:575px){.lb-loc-map{height:260px}}

/* ── Admin "كل المنتجات" filter bar ────────────────────────────────────── */
.rh-pf{padding:.85rem 1rem}
.rh-pf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:.6rem .75rem}
.rh-pf-field{display:flex;flex-direction:column;gap:.2rem;margin:0}
.rh-pf-field > span{font-size:.72rem;font-weight:700;color:var(--ad-ink-soft)}
.rh-pf-field select.is-active{border-color:var(--ad-accent);box-shadow:0 0 0 2px rgba(49,193,189,.18);font-weight:700}
.rh-pf-foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:.7rem;flex-wrap:wrap}
@media (max-width:575px){.rh-pf-grid{grid-template-columns:1fr 1fr}}

/* ── Announcements: recipient picker (sellerNoticePanel) ───────────────── */
.rh-np-modes{display:flex;flex-wrap:wrap;gap:.5rem}
.rh-np-mode{margin:0;cursor:pointer}
.rh-np-mode input{position:absolute;opacity:0}
.rh-np-mode span{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .9rem;border:1.5px solid var(--ad-border);border-radius:999px;font-weight:700;font-size:.88rem;background:var(--ad-surface)}
.rh-np-mode input:checked + span{border-color:var(--ad-accent);background:rgba(49,193,189,.12);color:#137a77}
.rh-np-mode input:focus-visible + span{outline:2px solid var(--ad-accent);outline-offset:2px}
.rh-np-panel{margin-top:.7rem}
.rh-np-tools{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;margin-bottom:.5rem}
.rh-np-tools input[type=search]{flex:1 1 220px;max-width:340px}
.rh-np-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.4rem;max-height:300px;overflow-y:auto;padding:.5rem;border:1px solid var(--ad-border);border-radius:12px;background:var(--ad-bg)}
.rh-np-shop{display:flex;align-items:center;gap:.5rem;margin:0;padding:.4rem .6rem;border-radius:10px;background:var(--ad-surface);border:1px solid transparent;cursor:pointer}
.rh-np-shop:has(input:checked){border-color:var(--ad-accent);background:rgba(49,193,189,.08)}
.rh-np-shop[hidden]{display:none}
.rh-np-shop span{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.rh-np-shop strong{font-size:.88rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rh-np-shop small{color:var(--ad-ink-soft);font-size:.72rem}

/* ── Product poster dialog (System/poster.js) ──────────────────────────── */
.lb-pt-wrap{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1.25rem;align-items:start}
.lb-pt-preview{background:repeating-conic-gradient(#eee 0 25%,#fafafa 0 50%) 0 0/24px 24px;border-radius:14px;padding:.75rem;display:flex;justify-content:center}
.lb-pt-preview canvas{max-width:100%;max-height:68vh;width:auto;height:auto;border-radius:10px;box-shadow:0 8px 28px rgba(0,0,0,.18)}
.lb-pt-opts{display:flex;flex-wrap:wrap;gap:.35rem}
.lb-pt-opt{margin:0;cursor:pointer}
.lb-pt-opt input{position:absolute;opacity:0}
.lb-pt-opt span{display:inline-block;padding:.35rem .75rem;border:1.5px solid var(--ad-border);border-radius:999px;font-size:.82rem;font-weight:700;background:var(--ad-surface)}
.lb-pt-opt input:checked + span{border-color:var(--ad-accent);background:rgba(49,193,189,.12);color:#137a77}
.lb-pt-opt input:focus-visible + span{outline:2px solid var(--ad-accent);outline-offset:2px}
.lb-pt-chips{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.4rem}
.lb-pt-chip{border:1px solid var(--ad-border);background:var(--ad-bg);border-radius:999px;padding:.15rem .6rem;font-size:.75rem;cursor:pointer}
.lb-pt-chip:hover{border-color:var(--ad-accent)}
@media (max-width:991px){.lb-pt-wrap{grid-template-columns:1fr}.lb-pt-preview canvas{max-height:52vh}}
/* ── Store features page ──────────────────────────────────────────────── */
.rh-feat-global{display:grid;gap:.5rem}
.rh-feat-global-item{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;padding:.6rem .8rem;border:1px solid var(--ad-border);border-radius:12px}
.rh-feat-global-item > span:first-child{flex:1;min-width:220px}

/* ── Poster designs: list, editor, dialog picker ─────────────────────── */
.rh-pt-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1rem}
.rh-pt-item{padding:.7rem;display:flex;flex-direction:column;gap:.6rem}
.rh-pt-thumb{width:100%;max-height:300px;border-radius:10px;overflow:hidden;background:var(--ad-bg);display:flex;align-items:center;justify-content:center;color:var(--ad-ink-soft);font-size:2rem}
.rh-pt-thumb img{width:100%;height:100%;object-fit:cover}
.rh-pt-body{display:flex;flex-direction:column;gap:.15rem}
.rh-pt-body small{font-size:.75rem;color:var(--ad-ink-soft)}
.rh-pe-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;align-items:start}
.rh-pe-main{position:sticky;top:1rem}
.rh-pe-stage{position:relative;width:100%;max-width:440px;margin:0 auto;background:#f1f1f1 center/cover no-repeat;border-radius:10px;border:1px solid var(--ad-border);touch-action:none;user-select:none;overflow:hidden;
  background-image:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}
.rh-pe-box{position:absolute;border:2px dashed;border-radius:6px;cursor:move;display:flex;align-items:center;justify-content:center}
.rh-pe-box span{font-size:.7rem;font-weight:800;padding:.1rem .4rem;border-radius:999px;color:#fff;pointer-events:none}
.rh-pe-box.is-ph{border-color:#1F9D55;background:rgba(31,157,85,.16)} .rh-pe-box.is-ph span{background:#1F9D55}
.rh-pe-box.is-text{border-color:#2563EB;background:rgba(37,99,235,.14)} .rh-pe-box.is-text span{background:#2563EB}
.rh-pe-handle{position:absolute;right:-7px;bottom:-7px;width:16px;height:16px;border-radius:4px;background:#fff;border:2px solid currentColor;cursor:nwse-resize}
.rh-pe-box.is-ph .rh-pe-handle{color:#1F9D55} .rh-pe-box.is-text .rh-pe-handle{color:#2563EB}
.rh-pe-key{display:inline-block;width:14px;height:14px;border-radius:3px;border:2px dashed;vertical-align:middle}
.rh-pe-key.is-ph{border-color:#1F9D55;background:rgba(31,157,85,.16)} .rh-pe-key.is-text{border-color:#2563EB;background:rgba(37,99,235,.14)}
.rh-pe-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.4rem}
.rh-pe-num{display:flex;flex-direction:column;gap:.15rem;margin:0}
.rh-pe-num span{font-size:.7rem;color:var(--ad-ink-soft);font-weight:700}
.rh-pe-preview{display:block;width:100%;max-width:440px;margin:1rem auto 0;border-radius:10px;box-shadow:0 6px 20px rgba(0,0,0,.15)}
@media (max-width:1199px){.rh-pe-wrap{grid-template-columns:1fr}.rh-pe-main{position:static}}
@media (max-width:575px){.rh-pe-nums{grid-template-columns:1fr 1fr}}
.lb-pt-designs{display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.3rem}
.lb-pt-design{margin:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:.2rem;flex:0 0 72px}
.lb-pt-design input{position:absolute;opacity:0}
.lb-pt-design img,.lb-pt-design-auto{width:68px;height:68px;border-radius:10px;object-fit:cover;border:2px solid var(--ad-border);display:flex;align-items:center;justify-content:center;background:var(--ad-bg);color:var(--ad-accent);font-size:1.4rem}
.lb-pt-design input:checked ~ img,.lb-pt-design input:checked ~ .lb-pt-design-auto{border-color:var(--ad-accent);box-shadow:0 0 0 3px rgba(49,193,189,.25)}
.lb-pt-design input:focus-visible ~ img,.lb-pt-design input:focus-visible ~ .lb-pt-design-auto{outline:2px solid var(--ad-accent);outline-offset:2px}
.lb-pt-design small{font-size:.68rem;text-align:center;line-height:1.2;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-pt-opt input:disabled + span{opacity:.45;cursor:not-allowed}
/* Poster designs: AI prompt builder + import + text contrast */
.rh-pe-steps{margin:0 0 .75rem;padding-inline-start:1.2rem;font-size:.82rem;color:var(--ad-ink-soft);display:grid;gap:.25rem}
.rh-pe-prompt{font-family:ui-monospace,Consolas,monospace;font-size:.74rem;line-height:1.5;background:var(--ad-bg,#f7f7f9);white-space:pre-wrap}
.rh-pe-note{margin-top:.4rem;font-size:.78rem;padding:.4rem .6rem;border-radius:8px;background:rgba(31,157,85,.1);color:#1B7A45}
.rh-pe-stage.is-drop{outline:3px dashed #2563EB;outline-offset:3px}
.rh-pe-contrast{max-width:440px;margin:.6rem auto 0;font-size:.8rem;padding:.45rem .7rem;border-radius:8px;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.rh-pe-contrast.is-good{background:rgba(31,157,85,.1);color:#1B7A45}
.rh-pe-contrast.is-mid{background:rgba(217,119,6,.12);color:#9A5B05}
.rh-pe-contrast.is-bad{background:rgba(220,38,38,.1);color:#B42318}

/* ---------------- Phones: compact seller overview + product cards ----------------
   Overview: 2 stat cards per row (an odd last card spans the row) so the quick-add
   button shows without scrolling. Product cards: tighter padding/type, and the
   actions become one equal-width toolbar along the card's bottom edge — any number
   of buttons (4–5 with posters) always fits inside the card. */
@media (max-width:575px){
  .rh-admin-topbar-title{ font-size:.88rem; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rh-admin-main{ padding:.75rem; }
  .rh-admin-main > h2{ font-size:1.15rem; margin-bottom:.6rem; }
  .rh-stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; margin-bottom:.9rem; }
  .rh-stat-card{ padding:.6rem .7rem; gap:.55rem; min-width:0; }
  .rh-stat-card:last-child:nth-child(odd){ grid-column:1 / -1; }
  .rh-stat-card i{ width:34px; height:34px; flex:0 0 34px; border-radius:9px; font-size:.95rem; }
  .rh-stat-card > div{ min-width:0; }
  .rh-stat-card .num{ font-size:1.12rem; }
  .rh-stat-card .num[style]{ font-size:.95rem !important; }
  .rh-stat-card .lbl{ font-size:.7rem; line-height:1.3; }
  .rh-quickadd{ padding:.75rem .85rem; gap:.55rem; margin-bottom:.9rem; }
  .rh-quickadd-title{ font-size:.88rem; }
  .rh-quickadd-cta-btn{ justify-content:center; padding:.55rem 1rem; }

  .rh-admin-card{ padding:.8rem .7rem; }
  .rh-panel-head{ gap:.5rem; margin-bottom:.7rem; }
  .rh-quick-grid{ gap:.5rem; }
  .rh-quick-card{ padding:.4rem .4rem 0; border-radius:10px; display:flex; flex-direction:column; overflow:hidden; }
  .rh-quick-card img,.rh-quick-noimg{ border-radius:7px; margin-bottom:.3rem; }
  .rh-product-card-status{ min-height:0; margin-bottom:.15rem; }
  .rh-product-card-status .rh-pill{ font-size:.66rem; padding:.1rem .45rem; }
  .rh-product-card-meta{ font-size:.66rem; margin-top:.15rem; gap:.25rem; }
  .rh-quick-name{ font-size:.8rem; line-height:1.3; min-height:2.6em; margin-top:.15rem; }
  .rh-quick-price{ font-size:.88rem; margin:.2rem 0 .4rem; }
  .rh-quick-actions{ margin:auto -.4rem 0; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:0; min-height:0; border-top:1px solid var(--ad-border); background:var(--ad-surface); }
  .rh-quick-actions > .rh-icon-btn,.rh-quick-actions > .rh-icon-state{ width:auto; height:38px; margin:0; border:0; border-radius:0; font-size:.8rem; }
  .rh-quick-actions > * + *{ border-inline-start:1px solid var(--ad-border) !important; }
}

/* ---------------- "Add similar" (copy last / this product into a new form) ---------------- */
.rh-quickadd-btns{display:flex;flex-wrap:wrap;gap:.5rem;align-items:stretch}
.rh-quickadd-copy-btn{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.55);border-radius:10px;padding:.45rem 1.1rem;font-weight:700;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.25;max-width:260px;transition:background .12s ease,transform .12s ease}
.rh-quickadd-copy-btn > span{white-space:nowrap}.rh-quickadd-copy-btn i{margin-inline-end:.35rem}
.rh-quickadd-copy-btn small{display:block;max-width:100%;font-weight:500;font-size:.7rem;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rh-quickadd-copy-btn:hover{background:rgba(255,255,255,.22);transform:translateY(-2px)}
.rh-copy-note{display:flex;gap:.65rem;align-items:flex-start;background:#EAF7F0;border:1px solid #BFE5CF;color:#12663f;border-radius:var(--ad-radius);padding:.75rem 1rem;margin-bottom:1rem;font-size:.88rem;line-height:1.7}
.rh-copy-note > i{margin-top:.3rem}
@media (max-width:575px){
  .rh-quickadd-btns{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}
  .rh-quickadd-btns > :only-child{grid-column:1 / -1}
  .rh-quickadd-cta-btn,.rh-quickadd-copy-btn{min-width:0;max-width:none;padding:.5rem .6rem;font-size:.85rem}
  /* sticky save bar: buttons share one row, the long hint is dropped */
  .rh-form-actions{padding:.55rem .6rem;gap:.4rem}
  .rh-form-actions > .btn{flex:1 1 0;min-width:0;padding:.5rem .35rem;font-size:.82rem;line-height:1.25;white-space:normal}
  .rh-form-actions > .rh-hint{display:none}
}

/* Offers inbox (Vendor::offerList) + listing details cards (LISTING) */
.rh-offer-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:.9rem}
.rh-offer{margin-bottom:0;display:flex;flex-direction:column;gap:.55rem}
.rh-offer.is-new{border-color:#E8B54A;box-shadow:0 0 0 3px rgba(232,181,74,.18)}
.rh-offer-item{display:flex;align-items:center;gap:.6rem}
.rh-offer-item img,.rh-offer-item .rh-quick-noimg{width:46px;height:46px;border-radius:8px;object-fit:cover;flex:0 0 46px;margin:0;aspect-ratio:auto}
.rh-offer-item a{font-weight:800;color:inherit;display:block}
.rh-offer-item small{color:var(--ad-ink-soft);font-size:.75rem}
.rh-offer-amount{display:flex;align-items:baseline;gap:.5rem}
.rh-offer-amount span{font-size:.8rem;color:var(--ad-ink-soft)}
.rh-offer-amount strong{font-size:1.4rem;font-family:'Cairo',sans-serif;color:var(--ad-accent-dk)}
.rh-offer-buyer{font-size:.88rem}
.rh-offer-msg{margin:0;padding:.55rem .75rem;border-radius:10px;background:var(--ad-bg);font-size:.88rem;line-height:1.7}
.rh-offer-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-top:auto}
.rh-spec-card .rh-field[hidden]{display:none}
@media (max-width:575px){.rh-offer-list{grid-template-columns:1fr}}

/* ── 3D market (Admin::market3dPanel + System/market3d-builder.js) ── */
.m3d-stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:.5rem; margin-bottom:.75rem; }
.m3d-stats > div{ background:#f6f8fa; border-radius:8px; padding:.5rem .75rem; display:flex; flex-direction:column; }
.m3d-stats span{ font-size:.75rem; color:var(--lb-muted, #6c757d); }
.m3b-toolbar{ display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center; margin-bottom:.75rem; }
.m3b-group{ display:flex; flex-wrap:wrap; gap:.25rem; align-items:center; }
.m3b-group input[type=number]{ width:4.5rem; display:inline-block; }
.m3b-group [data-tool].active{ background:var(--bs-primary, #0d6efd); color:#fff; }
.m3b-body{ display:flex; gap:1rem; align-items:flex-start; }
.m3b-side{ flex:0 0 250px; max-height:640px; overflow-y:auto; }
.m3b-side h4{ font-size:.9rem; margin:.75rem 0 .4rem; }
.m3b-side h4:first-child{ margin-top:0; }
.m3b-shoplist{ display:flex; flex-direction:column; gap:.25rem; max-height:220px; overflow-y:auto; }
.m3b-shop{ text-align:start; border:1px solid #dee2e6; background:#fff; border-radius:6px; padding:.3rem .5rem; font-size:.85rem; }
.m3b-shop.active{ border-color:var(--bs-primary, #0d6efd); background:#e7f1ff; }
.m3b-dot{ display:inline-block; width:.7rem; height:.7rem; border-radius:50%; vertical-align:middle; }
.m3b-props{ display:flex; flex-direction:column; gap:.25rem; }
.m3b-facing{ display:flex; flex-wrap:wrap; gap:.25rem; }
.m3b-issues{ display:flex; flex-direction:column; gap:.2rem; }
.m3b-issue{ text-align:start; border:0; background:#fdecee; color:#842029; border-radius:6px; padding:.25rem .5rem; font-size:.8rem; }
.m3b-help{ font-size:.78rem; color:var(--lb-muted, #6c757d); margin-top:.75rem; }
.m3b-stage{ flex:1; min-width:0; overflow:auto; max-height:640px; border:1px solid #dee2e6; border-radius:8px; background:#f8f9fa; }
.m3b-stage canvas{ display:block; touch-action:none; cursor:crosshair; }
.m3b-status{ display:flex; justify-content:space-between; font-size:.8rem; color:var(--lb-muted, #6c757d); margin-top:.4rem; }
.m3b-status [data-role=dirty]{ color:#b35c00; font-weight:bold; }
.m3b-end{ margin-inline-start:auto; }
@media (max-width: 900px){ .m3b-body{ flex-direction:column; } .m3b-side{ flex:none; width:100%; max-height:none; } }
/* Phones: one scrolling row of icon-only buttons (labels stay as title/aria-label). */
@media (max-width: 767.98px){
  .m3b .m3b-lbl, .m3d-head .m3b-lbl{ display:none; }
  .m3b-toolbar{ flex-wrap:nowrap; overflow-x:auto; gap:.4rem; padding-bottom:.35rem; scrollbar-width:thin; -webkit-overflow-scrolling:touch; }
  .m3b-group{ flex-wrap:nowrap; flex:none; gap:.2rem; }
  .m3b-group + .m3b-group{ padding-inline-start:.4rem; border-inline-start:1px solid #dee2e6; }
  .m3b-end{ margin-inline-start:0; }
  .m3b-toolbar .btn, .m3d-head .btn{ width:2.25rem; height:2.25rem; padding:0; display:inline-flex; align-items:center; justify-content:center; flex:none; }
  .m3b-toolbar select{ width:7.5rem !important; }
  .m3b-group input[type=number]{ width:3.2rem; padding-inline:.3rem; }
  .m3b-toolbar label{ margin:0; }
}
.m3b-field{ display:flex; flex-direction:column; gap:.15rem; margin-top:.35rem; }
.m3b-size{ display:flex; gap:.5rem; }
.m3b-size .m3b-field{ flex:1; }
.m3b-color{ display:flex; align-items:flex-end; gap:.5rem; }
.m3b-color .form-control-color{ width:3rem; height:2rem; padding:.15rem; }
/* automatic-layout dialog (pick + order) */
.m3b{ position:relative; }
.m3b-dialog{ position:absolute; inset:0; z-index:20; background:#00000040; display:flex; align-items:flex-start; justify-content:center; padding:1rem; border-radius:8px; }
.m3b-dialog-box{ background:#fff; border-radius:10px; box-shadow:0 8px 30px #0003; padding:1rem; width:min(560px, 100%); max-height:calc(100% - 2rem); display:flex; flex-direction:column; gap:.5rem; }
.m3b-dialog-box h4{ font-size:1rem; margin:0; }
.m3b-auto-opts{ display:flex; flex-wrap:wrap; gap:.5rem 1rem; }
.m3b-auto-opts select{ display:inline-block; width:auto; }
.m3b-auto-list{ overflow-y:auto; display:flex; flex-direction:column; gap:.5rem; min-height:120px; }
.m3b-auto-sec{ border:1px solid #dee2e6; border-radius:8px; padding:.4rem .5rem; }
.m3b-auto-head, .m3b-auto-shop{ display:flex; align-items:center; gap:.35rem; }
.m3b-auto-shop{ padding-inline-start:1.5rem; font-size:.85rem; }
.m3b-auto-sec.off, .m3b-auto-shop.off{ opacity:.55; }
.m3b-arrows{ margin-inline-start:auto; display:inline-flex; gap:.2rem; }
.m3b-arrows .btn{ padding:0 .45rem; line-height:1.4; }
.m3b-auto-actions{ display:flex; gap:.5rem; justify-content:flex-end; }

/* ---------------- Product form levels (Vendor::productFields 'lvl', SEL.productLevels) ---------------- */
form[data-level="1"] [data-lvl="2"], form[data-level="1"] [data-lvl="3"], form[data-level="2"] [data-lvl="3"],
form[data-levels]:not([data-level="1"]) [data-lvl-only="1"]{display:none !important}
.rh-level-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem;background:var(--ad-surface);border:1px solid var(--ad-border);border-radius:var(--ad-radius);padding:.6rem .75rem;margin-bottom:1rem;box-shadow:var(--ad-shadow);position:sticky;top:0;z-index:5}
.rh-level-label{font-weight:700;color:var(--ad-espresso);font-size:.88rem}
.rh-seg{display:inline-flex;flex-wrap:wrap;gap:.35rem}
.rh-seg-opt{margin:0;cursor:pointer}
.rh-seg-opt input{position:absolute;opacity:0;pointer-events:none}
.rh-seg-opt span{display:inline-flex;align-items:center;gap:.4rem;border:1px solid var(--ad-border);border-radius:999px;padding:.4rem .95rem;background:var(--ad-bg);color:var(--ad-ink);font-weight:700;font-size:.86rem;transition:background .12s ease,border-color .12s ease}
.rh-seg-opt span small{font-weight:500;color:var(--ad-ink-soft);font-size:.72rem}
.rh-seg-opt input:checked + span{background:var(--ad-espresso);border-color:var(--ad-espresso);color:#fff}
.rh-seg-opt input:checked + span small{color:rgba(255,255,255,.8)}
.rh-seg-opt input:focus-visible + span{outline:2px solid var(--ad-accent);outline-offset:2px}
.rh-cond .rh-seg{margin-bottom:.6rem}
.rh-quickadd-cta-btn.is-used{background:rgba(255,255,255,.9)}

/* ---------------- Photo tray (new product, SEL.imageTray) ---------------- */
.rh-img-tray{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.65rem;border-radius:12px;transition:background .12s ease}
.rh-img-tray.is-over{background:#EAF7F0}
.rh-img-tile{position:relative;border:1px solid var(--ad-border);border-radius:12px;overflow:hidden;background:var(--ad-surface)}
.rh-img-tile.is-main{border-color:var(--ad-green);box-shadow:0 0 0 2px rgba(78,125,75,.25)}
.rh-img-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:var(--ad-bg)}
.rh-img-main{position:absolute;top:.4rem;inset-inline-start:.4rem;background:var(--ad-green);color:#fff;font-size:.7rem;font-weight:700;border-radius:999px;padding:.15rem .55rem}
.rh-img-acts{display:flex;align-items:center;justify-content:center;gap:.3rem;padding:.4rem}
.rh-img-acts .rh-icon-btn{margin:0}
.rh-img-edit,.rh-bulk-edit{border:1px solid var(--ad-espresso);background:var(--ad-espresso);color:#fff;border-radius:8px;height:32px;padding:0 .6rem;font-weight:700;font-size:.8rem;display:inline-flex;align-items:center;gap:.3rem}
.rh-img-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;min-height:140px;aspect-ratio:1;margin:0;border:2px dashed var(--ad-border);border-radius:12px;background:var(--ad-bg);color:var(--ad-espresso);cursor:pointer;text-align:center;padding:.5rem}
.rh-img-add i{font-size:1.6rem}.rh-img-add small{color:var(--ad-ink-soft)}
.rh-img-add:hover{border-color:var(--ad-espresso)}
.rh-field-invalid .rh-img-tray .rh-img-add{border-color:var(--ad-red)}
.rh-bulk-edit{position:absolute;bottom:.35rem;inset-inline-start:.35rem;height:28px;font-size:.75rem;box-shadow:0 1px 4px rgba(0,0,0,.25)}
@media (max-width: 576px){
  .rh-level-bar{padding:.5rem}.rh-seg-opt span{padding:.45rem .7rem}.rh-level-tabs .rh-seg-opt span small{display:none}
  .rh-img-tray{grid-template-columns:repeat(2,minmax(0,1fr))}.rh-img-edit{height:40px}
}

/* ---------------- Photo editor (System/image-editor.js) ---------------- */
html.lbie-open{overflow:hidden}
.lbie-overlay{position:fixed;inset:0;z-index:2000;background:rgba(20,14,10,.72);display:flex;align-items:center;justify-content:center;padding:12px}
.lbie-dialog{background:var(--ad-surface);color:var(--ad-ink);border-radius:var(--ad-radius);width:min(760px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.lbie-head{display:flex;align-items:center;justify-content:space-between;padding:.6rem .9rem;border-bottom:1px solid var(--ad-border)}
.lbie-x{border:0;background:none;font-size:1.2rem;color:var(--ad-ink-soft);width:40px;height:40px}
.lbie-stage{background:#1d1714;display:flex;align-items:center;justify-content:center;padding:8px;min-height:180px;flex:0 0 auto}
.lbie-wrap{position:relative;overflow:hidden;direction:ltr;touch-action:none;user-select:none}
.lbie-canvas{display:block}
.lbie-crop{position:absolute;box-shadow:0 0 0 9999px rgba(0,0,0,.55);outline:2px solid #fff;cursor:move;touch-action:none}
.lbie-grid{position:absolute;inset:0;pointer-events:none;background:
  linear-gradient(to right,transparent 33.2%,rgba(255,255,255,.45) 33.3%,transparent 33.4%,transparent 66.6%,rgba(255,255,255,.45) 66.7%,transparent 66.8%),
  linear-gradient(to bottom,transparent 33.2%,rgba(255,255,255,.45) 33.3%,transparent 33.4%,transparent 66.6%,rgba(255,255,255,.45) 66.7%,transparent 66.8%)}
.lbie-h{position:absolute;width:22px;height:22px;background:#fff;border:2px solid var(--ad-espresso);border-radius:50%;touch-action:none}
.lbie-h-nw{left:-11px;top:-11px;cursor:nwse-resize}.lbie-h-ne{right:-11px;top:-11px;cursor:nesw-resize}
.lbie-h-sw{left:-11px;bottom:-11px;cursor:nesw-resize}.lbie-h-se{right:-11px;bottom:-11px;cursor:nwse-resize}
.lbie-tools{padding:.6rem .9rem;display:grid;gap:.45rem;overflow-y:auto}
.lbie-row{display:flex;align-items:center;gap:.6rem;margin:0;flex-wrap:wrap}
.lbie-lbl{min-width:84px;font-weight:700;font-size:.85rem;color:var(--ad-espresso)}
.lbie-aspects,.lbie-btns{display:flex;flex-wrap:wrap;gap:.35rem}
.lbie-chip{border:1px solid var(--ad-border);background:var(--ad-bg);border-radius:999px;padding:.3rem .8rem;font-weight:700;font-size:.8rem;color:var(--ad-ink);min-height:34px}
.lbie-chip.is-on{background:var(--ad-espresso);border-color:var(--ad-espresso);color:#fff}
.lbie-btn{border:1px solid var(--ad-border);background:var(--ad-bg);border-radius:8px;width:40px;height:36px;color:var(--ad-espresso)}
.lbie-slider input{flex:1;min-width:120px;accent-color:var(--ad-espresso)}
.lbie-slider output{width:2.6rem;text-align:center;font-size:.8rem;color:var(--ad-ink-soft);direction:ltr}
.lbie-foot{display:flex;align-items:center;gap:.5rem;padding:.6rem .9rem;border-top:1px solid var(--ad-border);flex-wrap:wrap}
.lbie-grow{flex:1}
@media (max-width: 576px){
  .lbie-overlay{padding:0}.lbie-dialog{border-radius:0;height:100%}
  .lbie-lbl{min-width:0;width:100%}.lbie-foot .btn{flex:1}.lbie-grow{display:none}
}

/* ---------------- Instagram bulk import (Vendor::instagramImport) ---------------- */
.rh-ig-steps{padding-inline-start:1.2rem;margin:0 0 .75rem;line-height:1.9}
.rh-ig-account{font-weight:700;color:var(--ad-espresso);display:inline-flex;align-items:center;gap:.35rem;direction:ltr}
.rh-ig-account i{color:#c13584;font-size:1.15rem}
.rh-ig-nav{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}
.rh-ig-skip{display:inline-flex;align-items:center;gap:.45rem;margin:0;font-weight:700}
.rh-ig-skip input{width:90px}
.rh-ig-pick{display:flex;align-items:center;gap:.45rem;margin:0;padding:.45rem .6rem;border-bottom:1px solid var(--ad-border);font-weight:700;font-size:.85rem;cursor:pointer}
.rh-ig-card:not(.is-done):has([data-f="pick"]:not(:checked)) .rh-bulk-thumb,
.rh-ig-card:not(.is-done):has([data-f="pick"]:not(:checked)) .rh-bulk-fields{opacity:.45}
.rh-ig-badge{position:absolute;bottom:.35rem;inset-inline-start:.35rem;background:rgba(0,0,0,.65);color:#fff;border-radius:999px;padding:.1rem .5rem;font-size:.72rem}
.rh-ig-badge + .rh-ig-badge{bottom:1.8rem}
.rh-ig-caption{font-size:.8rem;color:var(--ad-ink-soft)}
.rh-ig-caption summary{cursor:pointer;font-weight:700;color:var(--ad-espresso)}
.rh-ig-caption div{max-height:140px;overflow:auto;margin-top:.3rem;white-space:normal}
.rh-ig-link{font-weight:500;font-size:.78rem;color:var(--ad-ink-soft)}

/* Seller «منتجاتي»: search + filters + pages (Vendor::productList, SEL.plist) */
.rh-plist-bar{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; padding:.75rem 1rem; }
.rh-plist-bar .form-select{ width:auto; min-width:0; flex:1 1 150px; max-width:220px; }
.rh-plist-bar .rh-plist-per{ flex:0 0 auto; min-width:150px; }
.rh-plist-search{ position:relative; flex:2 1 260px; }
.rh-plist-search i{ position:absolute; inset-inline-start:.8rem; top:50%; transform:translateY(-50%); color:var(--ad-ink-soft); pointer-events:none; }
.rh-plist-search .form-control{ padding-inline-start:2.2rem; }
.rh-plist-info{ color:var(--ad-ink-soft); font-size:.85rem; margin-bottom:.6rem; }
.rh-pager{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:.35rem; margin-top:1rem; }
.rh-pager-btn{ min-width:2.4rem; height:2.4rem; padding:0 .6rem; border:1px solid var(--ad-border); background:var(--ad-surface); color:var(--ad-ink); border-radius:10px; font-weight:700; }
.rh-pager-btn:hover:not(:disabled){ border-color:var(--ad-espresso); }
.rh-pager-btn.is-current{ background:var(--ad-espresso); border-color:var(--ad-espresso); color:#fff; opacity:1; }
.rh-pager-btn:disabled:not(.is-current){ opacity:.4; }
.rh-pager-gap{ color:var(--ad-ink-soft); padding:0 .2rem; }
@media (max-width:575px){ .rh-plist-bar .form-select{ max-width:none; flex:1 1 45%; } }
/* Product list selection (SEL.plistPick) */
.rh-seller-product-card{ position:relative; }
.rh-pick{ position:absolute; top:.55rem; inset-inline-start:.55rem; z-index:2; width:1.9rem; height:1.9rem; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.92); border:1px solid var(--ad-border); border-radius:8px; cursor:pointer; margin:0; }
.rh-pick input{ width:1.1rem; height:1.1rem; cursor:pointer; accent-color:var(--ad-red); }
.rh-seller-product-card.is-picked{ border-color:var(--ad-red); box-shadow:0 0 0 2px rgba(161,54,40,.25); }
.rh-plist-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; margin-bottom:.6rem; }
.rh-plist-tools .rh-plist-info{ margin:0; }
.rh-plist-all{ display:flex; align-items:center; gap:.4rem; margin:0; font-size:.85rem; cursor:pointer; }
.rh-plist-all input{ accent-color:var(--ad-red); }
.rh-plist-selbar{ display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-inline-start:auto; background:#fdf1ef; border:1px solid #f0cfc9; border-radius:10px; padding:.3rem .6rem; }
.rh-plist-selbar[hidden]{ display:none; }
