
  :root{
    color-scheme:dark;
    /* espresso-dark, same brand gold as light mode so the two themes feel
       like one identity rather than two different apps -- converged with
       site-app's Phase 5 token set so both apps share one design system. */
    --ground:#17120f; --panel:#241c17; --panel-2:#30251e; --line:#3c3024;
    --gold:#b69a64; --gold-hi:#d2ac70; --gold-lo:#8a7142;
    /* ink-3 lightened (#8f8372->#9d907d) during the Phase 5g contrast
       sweep so it clears 4.5:1 against every dark-theme surface it's
       used on -- unlike the light-theme tier (see the matching comment
       there), this one fully resolves without colliding with ink-2. */
    --ink:#f6f0e7; --ink-2:#c2b6a2; --ink-3:#9d907d;
    --wa:#5fa883; --wa-lo:#3d7a5c; --bad:#c76c62; --bad-lo:#94504a;
    --info:#4f93aa; --info-lo:#376b7d;
    --success:var(--wa); --danger:var(--bad);
    --gold-bg:rgba(182,154,100,.18); --bad-bg:rgba(193,92,80,.16);
    --card-shadow:0 6px 20px -14px rgba(0,0,0,.45);
    --display:"Amiri",serif; --body:"IBM Plex Sans Arabic",system-ui,sans-serif;
    --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px; --sp-7:48px;
    --r-sm:8px; --r-md:10px; --r-lg:14px; --r-xl:18px;
    --ease:cubic-bezier(.2,.8,.2,1);
    --dur-hover:180ms; --dur-menu:220ms; --dur-modal:240ms;
  }
  :root[data-theme="light"]{
    color-scheme:light;
    /* ivory / espresso / champagne-gold -- the shop's own palette */
    --ground:#f7f3eb; --panel:#ffffff; --panel-2:#f0ebe3; --line:#e7e0d7;
    --gold:#b69a64; --gold-hi:#866b3b; --gold-lo:#d8c9a3;
    /* ink-2 nudged 1 shade darker (#756c61->#70685d) and ink-3 darkened
       more noticeably (#9e9384->#7e766a) during the Phase 5g contrast
       sweep -- ink-2 now clears 4.5:1 everywhere it's used; ink-3 is
       still the deliberately-muted tertiary tier (timestamps, counts,
       disclaimers -- never primary content) and a 3rd accepted exception
       alongside the 2 already documented below, since darkening it enough
       to hit 4.5:1 against every surface would make it indistinguishable
       from ink-2 and erase the 3-tier hierarchy; it's meaningfully closer
       now (was ~2.7-3.0:1, now ~3.8-4.5:1 depending on surface). */
    --ink:#35291f; --ink-2:#70685d; --ink-3:#7e766a;
    --wa:#3d8361; --wa-lo:#2e6b4e; --bad:#a8453d; --bad-lo:#8c352c;
    --info:#3e7c93; --info-lo:#2a5a6b;
    --gold-bg:rgba(182,154,100,.14); --bad-bg:rgba(168,69,61,.12);
    --card-shadow:0 6px 20px -14px rgba(60,46,10,.2);
  }
  *{box-sizing:border-box}
  [hidden]{display:none!important}
  /* overflow-x:hidden here matches site-app's own html,body rule -- it's
     defense-in-depth against a hover-only absolutely-positioned decoration
     (a long [data-tip] tooltip, mainly) inflating the page's scrollable
     width on narrow screens even while invisible pre-hover; nothing meant
     to be seen is ever positioned off the left/right edge, so this never
     clips real content. */
  html,body{background:var(--ground);touch-action:manipulation;overflow-x:hidden}
  body{margin:0;color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.6;min-height:100%}

  /* ---------- responsive app shell: a right-aligned collapsible sidebar on
     desktop, a bottom nav + "more" sheet on mobile -- see DESKTOP_BP below.
     Both surfaces drive the SAME .tab click handler (unchanged JS), they
     just present the tab list differently at each width. ---------- */
  .app-shell{display:flex;align-items:flex-start;min-height:100vh;gap:0}
  .main{flex:1;min-width:0;padding:calc(32px + env(safe-area-inset-top,0px)) 20px 60px}
  .wrap{max-width:1100px;margin-inline:auto;display:flex;flex-direction:column;gap:20px}
  /* gold-hi, not the base gold, for the page title -- the base --gold on
     a light panel only hit 2.43:1 against the Phase 5g contrast sweep's
     3:1 large-text floor; gold-hi is the variant meant for exactly this
     kind of higher-contrast gold-on-text use. */
  h1{font-family:var(--display);color:var(--gold-hi);font-size:1.4rem;margin:0}
  h2{font-family:var(--display);color:var(--gold-hi);font-size:1.1rem;margin:0 0 10px}
  a{color:var(--gold-hi)}
  .topbar{position:relative;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
  .topbar h1{flex:none}
  .pending-pill{flex:none;border:1px solid var(--gold-lo);background:var(--gold-bg);color:var(--gold-hi);font-size:.78rem;font-weight:600;border-radius:999px;padding:7px 14px;cursor:pointer;white-space:nowrap}
  .pending-pill:hover{filter:brightness(1.05)}
  .icon-btn{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);display:grid;place-items:center;cursor:pointer;padding:0;transition:border-color var(--dur-hover) var(--ease),color var(--dur-hover) var(--ease),transform var(--dur-hover) var(--ease)}
  .icon-btn:hover{border-color:var(--gold-lo);color:var(--gold-hi)}
  .icon-btn:active{transform:scale(.94)}
  .tab{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 14px;border-radius:10px;cursor:pointer;color:var(--ink-2);font-size:.9rem;font-weight:600;transition:color var(--dur-hover) var(--ease),background var(--dur-hover) var(--ease)}
  .tab svg{flex:none;opacity:.8}
  .tab:hover:not(.active){background:var(--panel-2);color:var(--ink)}
  .tab.active{background:var(--gold);color:#1a1408}
  .tab.active svg{opacity:1}
  .panel{display:none;flex-direction:column;gap:18px}
  .panel.active{display:flex}

  /* ---------- desktop sidebar (>=960px) -- hidden below that width, where
     the bottom nav + "more" sheet take over instead ---------- */
  .sidebar{display:none}
  @media (min-width:960px){
    .sidebar{
      display:flex;flex-direction:column;flex:none;width:232px;
      height:100vh;position:sticky;top:0;padding:18px 14px;
      background:var(--panel);border-inline-end:1px solid var(--line);
      gap:4px;transition:width var(--dur-menu) var(--ease)
    }
    .sidebar.collapsed{width:76px}
    /* gold-hi (not base gold) for the same reason as the h1 rule above --
       the brand wordmark is real text a user reads, not a decorative
       accent, so it needs the higher-contrast gold variant. */
    .sidebar-brand{display:flex;align-items:center;gap:10px;color:var(--gold-hi);padding:4px 10px 16px;flex:none}
    .sidebar-brand-mark{flex:none}
    .sidebar-brand-wordmark{height:24px;width:auto;display:block}
    .sidebar.collapsed .sidebar-brand-wordmark{display:none}
    .sidebar-nav{display:flex;flex-direction:column;gap:2px;overflow-y:auto}
    .sidebar-tab{justify-content:flex-start;padding:11px 12px;white-space:nowrap}
    .sidebar-tab span{overflow:hidden;text-overflow:ellipsis}
    .sidebar.collapsed .sidebar-tab{justify-content:center;padding:11px 0}
    .sidebar.collapsed .sidebar-tab span{display:none}
    .sidebar-quick{display:flex;flex-direction:column;gap:6px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
    .sidebar-quick-btn{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);font-family:var(--body);font-size:.82rem;font-weight:600;cursor:pointer;white-space:nowrap;overflow:hidden}
    .sidebar-quick-btn:hover{border-color:var(--gold-lo);color:var(--gold-hi)}
    .sidebar-quick-btn svg{flex:none}
    .sidebar-quick-btn span{overflow:hidden;text-overflow:ellipsis}
    .sidebar.collapsed .sidebar-quick-btn{justify-content:center;padding:9px 0}
    .sidebar.collapsed .sidebar-quick-btn span{display:none}
    .sidebar-collapse{margin-top:10px;flex:none;align-self:center;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);display:grid;place-items:center;cursor:pointer}
    .sidebar-collapse:hover{border-color:var(--gold-lo);color:var(--gold-hi)}
    .sidebar.collapsed .sidebar-collapse svg{transform:rotate(180deg)}
  }

  /* ---------- mobile bottom navigation + "more" sheet (<960px only -- the
     whole block lives inside this one media query so there's no cross-
     breakpoint override ordering to get wrong) ---------- */
  @media (max-width:959px){
    /* the bottom nav below grows taller on a notched/home-indicator
       iPhone (its own padding-bottom already adds the safe-area inset),
       so this reserved space must grow by the same amount or the last
       bit of scrolled content ends up hidden behind the taller bar --
       found during the Phase 5g safe-area re-check */
    .main{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
    /* the title eats most of a phone's width, so give it the full row */
    .topbar h1{flex:1 1 auto}
    .bottom-nav{
      position:fixed;inset-inline:0;bottom:0;z-index:40;
      display:flex;align-items:stretch;
      padding-bottom:env(safe-area-inset-bottom,0px);
      background:var(--panel);border-top:1px solid var(--line);
      box-shadow:0 -8px 20px -14px rgba(0,0,0,.3)
    }
    .bottom-tab{flex:1;flex-direction:column;gap:3px;padding:9px 2px;border-radius:0;font-size:.68rem;min-width:0}
    .bottom-tab span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
    .bottom-tab.active{background:none;color:var(--gold-hi)}
    .bottom-tab.active svg{opacity:1}
    .bottom-more-item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:9px 2px}
    .bottom-more-item .icon-btn{width:30px;height:30px;border:none;background:none;color:var(--ink-2)}
    .bottom-more-item .icon-btn:hover{border-color:transparent}
    .bottom-tab-label{font-size:.68rem;color:var(--ink-2);font-weight:600}
    #tabsToggle[aria-expanded="true"]{color:var(--gold-hi)}
    #tabsToggle[aria-expanded="true"] ~ .bottom-tab-label{color:var(--gold-hi)}
    /* the "more" sheet opens UPWARD, anchored just above the bottom nav,
       instead of the old dropdown-under-the-topbar placement -- its
       trigger moved down into the bottom nav, so it now anchors there too */
    .tabs-dropdown{
      position:fixed;inset-inline:10px;bottom:calc(74px + env(safe-area-inset-bottom,0px));z-index:40;
      display:flex;flex-direction:column;gap:2px;padding:10px;
      max-height:calc(100vh - 160px);overflow-y:auto;
      background:var(--panel);border:1px solid var(--line);border-radius:14px;
      box-shadow:0 16px 30px rgba(0,0,0,.4);
      opacity:0;transform:translateY(8px);transform-origin:bottom center;
      transition:opacity var(--dur-menu) var(--ease),transform var(--dur-menu) var(--ease)
    }
    .tabs-dropdown[hidden]{display:none}
    .tabs-dropdown.open{opacity:1;transform:translateY(0)}
  }
  /* above 960px neither surface should ever render, regardless of any
     inline/JS state (defense in depth alongside the media-scoped rules
     above, which already keep both out of the layout by default here) */
  @media (min-width:960px){
    .bottom-nav,#tabsDropdown{display:none}
  }

  .card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);padding:16px;box-shadow:var(--card-shadow)}
  .card > h2{display:flex;align-items:center;gap:8px;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--line)}

  /* ---------- uniform field rhythm: every field (whatever control it holds)
     takes the same bottom margin, so forms line up evenly regardless of
     whether the control is a text input, a chip group or the upload box ---- */
  .field{margin-bottom:16px}
  .field:last-of-type{margin-bottom:0}
  label{display:block;font-size:.84rem;color:var(--ink-2);margin-bottom:6px}
  input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=time],textarea,select{
    width:100%;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);font-family:var(--body);font-size:.92rem;
    -webkit-appearance:none;-moz-appearance:none;appearance:none;height:44px;box-sizing:border-box;line-height:1.2
  }
  textarea{height:auto}
  input[type=text]:focus,input[type=number]:focus,input[type=password]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=time]:focus,textarea:focus,select:focus{outline:2px solid var(--gold-lo);outline-offset:1px}
  textarea{min-height:90px;resize:vertical}
  /* native <select> and <input type=number> otherwise render with the browser's
     own chrome (OS dropdown arrow, spin-button arrows) which makes them look
     like different-sized controls next to a plain text input -- normalize both
     so every field in a filter/form row is visually identical. */
  select{
    padding-left:34px;cursor:pointer;
    background-repeat:no-repeat;background-position:left 12px center;background-size:14px 14px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23b4a993' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
  }
  :root[data-theme="light"] select{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c5240' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
  }
  select::-ms-expand{display:none}
  input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
  input[type=number]{-moz-appearance:textfield}
  .row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
  .row .field{margin-bottom:0}
  .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;line-height:1.3;padding:10px 16px;border-radius:var(--r-md);font-weight:600;font-size:.88rem;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);cursor:pointer;transition:filter var(--dur-hover) var(--ease),border-color var(--dur-hover) var(--ease),transform var(--dur-hover) var(--ease)}
  .btn:hover:not(:disabled){border-color:var(--gold-lo)}
  .btn:active:not(:disabled){transform:scale(.98)}
  .btn.gold{background:var(--gold);border-color:var(--gold);color:#1a1408}
  .btn.gold:hover{filter:brightness(1.08)}
  .btn.danger{background:var(--bad);border-color:var(--bad);color:#fff}
  /* dark theme only: white text on dark theme's --bad only reached
     3.65:1 (Phase 5g contrast sweep) -- --bad-lo is the already-existing
     darker-shade token (currently only used for .half-pill's gradient),
     which gives white text 6.0:1 here. Light theme's --bad already
     passed with white text, so it's left alone. */
  :root[data-theme="dark"] .btn.danger{background:var(--bad-lo);border-color:var(--bad-lo)}
  .btn.danger:hover{filter:brightness(1.1)}
  .btn.wa{background:var(--wa);border-color:var(--wa);color:#fff}
  /* dark theme only: white text on dark theme's --wa only reached 2.83:1
     (Phase 5g contrast sweep) -- --wa-lo is the already-existing
     darker-shade token, which gives white text 5.1:1 here. Light theme's
     --wa already passed with white text, so it's left alone. */
  :root[data-theme="dark"] .btn.wa{background:var(--wa-lo);border-color:var(--wa-lo)}
  .btn.wa:hover{filter:brightness(1.08)}
  .btn.ghost{background:none}
  .btn:disabled{opacity:.5;cursor:default}
  .btn.block{width:100%}
  .btn.danger-sm,.btn.wa{min-height:36px;padding:8px 14px;font-size:.82rem;flex:none}
  .list{display:flex;flex-direction:column;gap:10px}
  .pager{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:4px;padding-top:12px}
  .pager button{min-height:38px;padding:0 16px;border-radius:10px;font-size:.86rem;font-weight:600;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);cursor:pointer}
  .pager button:disabled{opacity:.4;cursor:default}
  .pager span{color:var(--ink-3);font-size:.82rem}
  .row-item{display:flex;gap:12px;align-items:center;padding:14px;border-radius:12px;background:var(--panel-2);border:1px solid var(--line);transition:border-color var(--dur-hover) var(--ease)}
  .row-item.has-actions-col{align-items:flex-start}
  .row-item:hover{border-color:var(--gold-lo)}
  .row-item img{width:64px;height:64px;object-fit:cover;border-radius:8px;flex:none}
  .row-item img.cat-thumb{cursor:zoom-in;transition:opacity var(--dur-hover) var(--ease),transform var(--dur-hover) var(--ease)}
  .row-item img.cat-thumb:hover{opacity:.85;transform:scale(1.04)}
  .row-item .meta{flex:1;min-width:0}
  .row-item .meta b{display:block;font-size:.92rem;margin-bottom:5px;line-height:1.4;overflow-wrap:anywhere}
  .row-item .meta small{color:var(--ink-3);display:block;text-align:right;font-size:.78rem;margin-top:5px}
  .row-item .cats{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
  .row-item .meta-line1{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:5px}
  .row-item .meta-line1 b{display:inline;margin-bottom:0;font-size:.92rem}
  .row-item .meta-line1 .cat-tag{flex:none;font-size:.72rem;font-weight:600;padding:2px 9px;border-radius:99px;border:1px solid var(--gold-lo);color:var(--gold-hi);white-space:nowrap}
  /* light theme only: --gold-hi against --panel-2 (the card background
     these pills usually sit on) landed at 4.23:1, just under the Phase
     5g sweep's 4.5:1 floor -- #7f6638 is gold-hi darkened enough to clear
     it there (5.0:1) without touching the shared --gold-hi token, which
     already passes everywhere else it's used. Excludes .off/.draft-pill,
     which use --ink-3 instead and would otherwise be overridden by this
     selector's higher specificity. */
  :root[data-theme="light"] .cat-tag,
  :root[data-theme="light"] .pill:not(.off):not(.draft-pill){color:#7f6638}
  .row-item .meta-line2{color:var(--ink-3);font-size:.78rem}
  .row-item .meta-tags{margin-top:6px;display:flex;flex-wrap:wrap;gap:6px}
  .row-item button.danger-sm{flex:none}
  .row-item .actions{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:2px}
  .row-item .actions .icon-row{display:flex;gap:6px}
  .icon-btn-sm{flex:none;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--panel);color:var(--ink-2);display:grid;place-items:center;cursor:pointer;padding:0;transition:border-color var(--dur-hover) var(--ease),color var(--dur-hover) var(--ease),background var(--dur-hover) var(--ease),transform var(--dur-hover) var(--ease)}
  .icon-btn-sm:hover{border-color:var(--gold-lo);color:var(--gold-hi)}
  .icon-btn-sm:active{transform:scale(.92)}
  .icon-btn-sm.del-icon{color:var(--bad);border-color:var(--bad-bg)}
  .icon-btn-sm.del-icon:hover{background:var(--bad);border-color:var(--bad);color:#fff}
  .likes-box{flex:none;display:flex;align-items:center;gap:4px;font-size:.78rem;font-weight:600;color:var(--ink-2);border:1px solid var(--line);border-radius:99px;padding:4px 10px;background:var(--panel);white-space:nowrap}
  .row-item .actions .likes-row{display:flex;align-items:center;gap:6px}
  .icon-btn-sm.share-icon.copied{color:var(--wa);border-color:var(--wa)}
  .row-item .actions .votes-row{display:flex;gap:4px;flex-wrap:wrap;justify-content:center}
  .row-item .actions .votes-row .pill{white-space:nowrap}
  @media (max-width:719px){
    .row-item.has-actions-col{flex-wrap:wrap;align-items:flex-start}
    .row-item.has-actions-col .meta{flex:1 1 0;min-width:0}
    .row-item.has-actions-col .actions{flex:1 1 100%;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:5px;padding-top:10px;margin-top:2px;border-top:1px dashed var(--line)}
    .row-item.has-actions-col .actions .icon-row,.row-item.has-actions-col .actions .likes-row{display:contents}
    .row-item.has-actions-col .actions .likes-box{order:-1}
    .row-item.has-actions-col .actions .icon-btn-sm{width:32px;height:32px}
  }
  .range-btn{min-height:34px}
  .pill{display:inline-block;font-size:.72rem;padding:2px 8px;border-radius:99px;border:1px solid var(--gold-lo);color:var(--gold-hi)}
  .ref-pill{display:inline-block;margin:3px 4px 5px 0;direction:ltr}
  .half-pill{display:inline-block;margin:3px 4px 5px 0;background:linear-gradient(135deg,var(--bad),var(--bad-lo));border-color:var(--bad);color:#fff;font-weight:700}
  .feefixed-pill{display:inline-block;margin:3px 4px 5px 0;background:linear-gradient(135deg,var(--info),var(--info-lo));border-color:var(--info);color:#fff;font-weight:700}
  .vote-like-pill{border-color:var(--wa);color:var(--wa);margin-inline-end:6px}
  .vote-dislike-pill{border-color:var(--bad);color:var(--bad)}
  /* Phase 5g contrast sweep: --wa text on --panel-2 only reached 3.83:1 in
     light theme, and --bad text on --panel-2 only reached 4.08:1 in dark
     theme -- both just under the 4.5:1 floor for this small pill text.
     Each gets a theme-specific, further-tuned shade (darker green for
     light, brighter red for dark) rather than changing the shared --wa/
     --bad tokens, which already pass everywhere else they're used. */
  :root[data-theme="light"] .vote-like-pill{color:#346f52}
  :root[data-theme="dark"] .vote-dislike-pill{color:#db776c}
  .pill.off{border-color:var(--ink-3);color:var(--ink-3)}
  /* ---------- enquiry card sub-elements (Phase 5e cleanup) ----------
     The standalone .order-card/.question-card containers (and their -head/
     -id/-name/-date/-actions-row rules) from before the 3b enquiries merge
     are gone -- grep-confirmed zero markup references (replaced by
     .enquiry-card/.enquiry-card-head/.enquiry-card-meta etc.). These
     sub-element rules are kept: the unified enquiry card still reuses them
     for the phone link, image, and text styling. */
  .order-card-phone{display:inline-flex;align-items:center;gap:6px;font-size:.94rem;font-weight:600;color:var(--gold-hi);direction:ltr;width:fit-content;text-decoration:none}
  /* same light-theme/--panel-2 contrast gap as .cat-tag/.pill above
     (4.23:1, Phase 5g sweep) and the same fix. */
  :root[data-theme="light"] .order-card-phone{color:#7f6638}
  .order-card-phone:hover{text-decoration:underline}
  .order-card-img{display:block;width:100%;max-height:220px;object-fit:contain;background:var(--panel);border-radius:12px;border:1px solid var(--line)}
  .order-card-text{margin:0;color:var(--ink);line-height:1.7;font-size:.95rem;white-space:pre-wrap}
  .question-card-text{margin:0;color:var(--ink);line-height:1.7;font-size:.95rem;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
  .question-card-edit-ta{width:100%;min-height:80px;resize:vertical;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--panel);color:var(--ink);font-family:var(--body);font-size:.92rem;line-height:1.6}
  .question-card-edit-actions{display:flex;gap:8px;margin-top:8px}

  /* ---------- unified enquiries (questions + orders) ---------- */
  .enquiry-filters{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
  .enquiry-card{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:14px;background:var(--panel-2);border:1px solid var(--line);transition:border-color var(--dur-hover) var(--ease)}
  .enquiry-card:hover{border-color:var(--gold-lo)}
  .enquiry-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
  .enquiry-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .enquiry-card-date{font-size:.76rem;color:var(--ink-3);white-space:nowrap}
  .pill.order-type-pill{border-color:var(--gold-lo);color:var(--gold-hi)}
  /* Uses background-color (not the "background" shorthand) deliberately --
     the shorthand resets background-repeat/position/size to their initial
     values (repeat/auto/0 0), which made the shared select-chevron icon
     (set globally on `select{}`, and re-set at higher specificity by the
     light-theme override) tile across the whole pill instead of sitting
     once on the left. background-color leaves those inherited-via-cascade
     sub-properties alone; the explicit repeat/position/size below just
     re-scales the chevron for this compact pill. */
  .enq-status-sel{min-height:34px;padding:4px 10px 4px 26px;border-radius:99px;font-size:.78rem;font-weight:600;border:1px solid var(--line);background-color:var(--panel);color:var(--ink);cursor:pointer;background-repeat:no-repeat;background-position:left 8px center;background-size:11px 11px}
  .enq-name{font-size:.92rem;font-weight:600;color:var(--ink-2)}
  .enq-note-ta{width:100%;min-height:52px;resize:vertical;padding:9px 11px;border-radius:10px;border:1px solid var(--line);background:var(--panel);color:var(--ink);font-family:var(--body);font-size:.86rem;line-height:1.6}
  .enq-meta-row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;padding-top:10px;border-top:1px dashed var(--line)}
  .enq-meta-row .field{flex:1;min-width:170px;margin-bottom:0}
  .enq-actions-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
  .msg{font-size:.85rem;color:var(--ink-3);min-height:1.2em;margin-top:10px}
  .msg.err{color:var(--bad)}
  .msg.ok{color:var(--wa)}
  .empty{color:var(--ink-3);text-align:center;padding:28px 16px;border:1.5px dashed var(--line);border-radius:12px;font-size:.88rem}
  .stat{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
  .stat div{background:var(--panel-2);border:1px solid var(--line);border-top:2px solid var(--gold-lo);border-radius:12px;padding:11px 10px;text-align:center}
  .stat b{display:block;font-size:1.2rem;color:var(--gold-hi);line-height:1.3}
  .stat small{color:var(--ink-3);font-size:.74rem}
  @media (min-width:960px){
    .stat{grid-template-columns:repeat(4,1fr)}
    .stat div{padding:16px 12px}
    .stat b{font-size:1.5rem}
  }
  .hint{font-size:.8rem;color:var(--ink-2);background:var(--gold-bg);border:1px solid var(--gold-lo);border-radius:10px;padding:10px 12px;margin:-4px 0 16px;line-height:1.55}

  /* ---------- الرئيسية dashboard: date-range buttons, KPI tiles, charts ---------- */
  .analytics-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
  .analytics-head h2{margin:0}
  .range-btns{display:flex;flex-wrap:wrap;gap:6px}
  .range-btn{border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);font-size:.78rem;font-weight:600;border-radius:999px;padding:6px 13px;cursor:pointer;white-space:nowrap}
  .range-btn.active{border-color:var(--gold);background:var(--gold-bg);color:var(--gold-hi)}
  .analytics-insights{font-size:.8rem;color:var(--ink-2);line-height:1.7;margin:4px 0 14px}
  .analytics-insights div{margin-bottom:4px}
  .chart-wrap{background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:14px}
  /* Chart.js's own responsive:true option resizes these once it loads, but
     a bare <canvas height="..."> defaults to a 300px-wide intrinsic size
     before that JS runs -- this keeps the very first paint (and the
     narrowest phones) from ever being wider than the card around it. */
  .chart-wrap canvas{max-width:100%}
  .chart-wrap-row{display:grid;grid-template-columns:1fr;gap:14px}
  @media (min-width:720px){ .chart-wrap-row{grid-template-columns:1fr 1fr} }
  .analytics-delta{font-size:.72rem;font-weight:600}
  .analytics-delta.up{color:var(--wa)}
  .analytics-delta.down{color:var(--bad)}
  /* ---------- KPI tile sparkline (Phase 5e): a trend line under a tile's
     number, drawn with window.ddSparkline() -- purely decorative, no new
     data fetch, fed from the daily trend array the summary endpoint
     already returns ---------- */
  /* gold-hi, not gold-lo -- a hand-checked contrast pass found gold-lo
     on panel-2 only reaches 1.38:1 in light mode (nowhere near the WCAG
     1.4.11 graphical-object minimum of 3:1); gold-hi clears it in both
     themes (4.23:1 light / 7.01:1 dark). */
  .kpi-spark{display:flex;justify-content:center;margin-top:6px;color:var(--gold-hi)}
  .kpi-spark .sparkline path{stroke-width:1.75}

  /* ---------- price calculator (gold price + crafting fee x weight) ---------- */
  .price-calc-box{background:var(--panel-2);border:1px solid var(--gold-lo);border-radius:12px;padding:12px 14px;margin-bottom:16px;display:flex;flex-direction:column;gap:6px}
  .pc-line{display:flex;align-items:center;justify-content:space-between;font-size:.85rem;color:var(--gold-hi);opacity:.85}
  .pc-line span:last-child{direction:ltr;font-weight:600}
  .pc-line.pc-total{opacity:1;padding-top:6px;border-top:1px dashed var(--gold-lo);font-size:.98rem}
  .pc-line.pc-total span:last-child{font-size:1.1rem;color:var(--gold-hi)}

  /* ---------- multi-photo grid (add/edit piece) ---------- */
  .img-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-bottom:10px}
  .img-tile{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:var(--panel-2)}
  .img-tile img{width:100%;height:100%;object-fit:cover;display:block}
  .img-tile .img-rm{position:absolute;top:4px;left:4px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;border:none;display:grid;place-items:center;cursor:pointer;font-size:.9rem;line-height:1;padding:0}
  .img-tile .img-new-tag{position:absolute;bottom:4px;right:4px;background:var(--gold);color:#1a1408;font-size:.62rem;font-weight:700;padding:1px 6px;border-radius:99px}
  /* up/down reorder buttons -- simple arrow buttons rather than drag-and-drop
     (no drag library exists anywhere in this codebase) */
  .img-tile .img-move-row{position:absolute;bottom:4px;left:4px;display:flex;gap:3px}
  .img-tile .img-move{width:20px;height:20px;border-radius:6px;background:rgba(0,0,0,.65);color:#fff;border:none;display:grid;place-items:center;cursor:pointer;font-size:.68rem;line-height:1;padding:0}
  .img-tile .img-move:disabled{opacity:.3;cursor:default}
  /* same up/down reorder idea as .img-move above, but for a plain list row
     (home-page section order) instead of overlaid on an image tile */
  .sec-order-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--panel-2);margin-bottom:8px}
  .sec-order-row:last-child{margin-bottom:0}
  .sec-order-row .sec-order-label{font-weight:600;font-size:.9rem}
  .sec-order-row .sec-order-pos{font-size:.74rem;color:var(--ink-3);margin-inline-start:6px}
  .sec-order-row .sec-order-moves{display:flex;gap:6px;align-items:center;flex:none}
  .sec-order-row .img-move{position:static;background:var(--panel);color:var(--ink);border:1px solid var(--line);width:26px;height:26px;border-radius:7px;font-size:.78rem}
  .sec-order-row .img-move:disabled{opacity:.3;cursor:default}

  /* category list rows (Settings -> الأقسام): same .sec-order-row shell as
     home-section-order above, plus a cover thumbnail, an inline-editable
     label, and a visible/hidden switch -- flex-wraps on narrow screens. */
  .sec-order-row > span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
  .sec-order-url{display:block;color:var(--ink-3);font-size:.76rem;text-align:right;margin-top:2px;unicode-bidi:plaintext}
  .sec-order-row .img-move,.sec-order-row .row-x{width:34px;height:34px;border-radius:8px;font-size:.8rem}
  .row-x{flex:none;display:grid;place-items:center;padding:0;border:1px solid var(--line);background:var(--panel);color:var(--ink-2);font-size:1.1rem;line-height:1;cursor:pointer}
  .row-x:hover{border-color:var(--bad);color:var(--bad)}
  .cat-row{flex-wrap:nowrap}
  .cat-cover-thumb{width:34px;height:34px;border-radius:8px;object-fit:cover;flex:none;border:1px solid var(--line);background:var(--panel)}
  .cat-cover-empty{display:inline-block}
  .cat-row-label{flex:1;min-width:90px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);padding:6px 8px;font-size:.88rem;font-family:inherit}

  /* ---------- draft/published pill ---------- */
  .pill.draft-pill{border-color:var(--ink-3);color:var(--ink-3)}

  /* ---------- catalog grid view (toggle, persisted per-admin) ---------- */
  #catList.grid-view{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;align-items:start}
  #catList.grid-view .row-item{flex-direction:column;align-items:stretch;padding:0;overflow:hidden}
  #catList.grid-view .row-item .cat-thumb{width:100%;height:170px;border-radius:0}
  #catList.grid-view .row-item .meta{padding:10px 12px 0}
  #catList.grid-view .row-item .meta-line2{margin-bottom:2px}
  #catList.grid-view .row-item .row-check{position:absolute;top:8px;inset-inline-start:8px;background:var(--panel);border-radius:6px;padding:2px}
  #catList.grid-view .row-item{position:relative}
  #catList.grid-view .row-item .actions{flex-direction:row;align-items:center;justify-content:space-between;width:100%;padding:8px 12px 12px}
  #catList.grid-view .row-item .actions .icon-row{flex-direction:row}
  #catList.grid-view .pager{grid-column:1/-1}

  /* ---------- editing an existing piece ---------- */
  .editing-banner{background:var(--gold-bg);border:1px solid var(--gold-lo);color:var(--gold-hi);font-size:.85rem;padding:9px 12px;border-radius:10px;margin-bottom:16px}
  .editing-banner a{color:var(--gold-hi);text-decoration:underline;cursor:pointer}

  /* ---------- catalog filters (search + category/karat/weight) ---------- */
  .cat-filters{background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:14px}
  .cat-filters #catSearch{margin-bottom:10px}
  .cat-filters-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
  .cat-filter-field{margin-bottom:0}
  .cat-filter-field label{font-size:.76rem}
  /* the sort field + sort direction are the only two fields on their row --
     span 2 of the 4 columns each so together they fill the row's full width
     instead of sitting half-empty next to the row above them */
  .cat-filter-field.wide{grid-column:span 2}
  .cat-filters-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
  .cat-filters-foot span{font-size:.8rem;color:var(--ink-3)}
  @media (max-width:640px){
    .cat-filters-row{grid-template-columns:1fr 1fr}
    /* already 2-per-row on mobile, so the sort pair already fills the row
       width without the span -- span 2 there would stack them instead */
    .cat-filter-field.wide{grid-column:span 1}
  }

  /* ---------- bulk select / delete / edit ---------- */
  .bulk-bar{display:flex;align-items:center;gap:10px;background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-bottom:12px;font-size:.85rem;flex-wrap:wrap}
  .bulk-bar span{flex:1;color:var(--ink-2)}
  .row-check{flex:none;width:22px;height:22px;cursor:pointer;accent-color:var(--gold)}
  .bulk-edit-panel{background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:12px}
  .bulk-edit-panel .field{margin-bottom:12px}
  .bulk-edit-panel .btn{margin-top:4px}

  /* ---------- نصف اجور checkbox row ---------- */
  .check-row{display:flex;align-items:flex-start;gap:10px;background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:16px;cursor:pointer}
  /* Direct-child only: a plain native checkbox sits right in the label,
     but a Phase-5e .switch-converted row nests its (visually hidden)
     input one level deeper inside .switch, so this rule never reaches it
     and never fights .switch's own hiding styles. */
  .check-row > input[type=checkbox]{flex:none;width:20px;height:20px;margin-top:1px;cursor:pointer;accent-color:var(--gold)}
  .check-row .switch{margin-top:1px}
  .check-row span{display:flex;flex-direction:column;gap:2px;font-size:.88rem;font-weight:600}
  .check-row small{font-weight:400;opacity:.7;font-size:.78rem}

  /* ---------- category chips (multi-select) ---------- */
  .chip-group{display:flex;flex-wrap:wrap;gap:8px}
  .chip{flex:none;padding:9px 14px;line-height:1.3;border-radius:99px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);font-size:.84rem;cursor:pointer;font-family:var(--body)}
  .chip.on{background:var(--gold);border-color:var(--gold);color:#1a1408;font-weight:600}
  .chip:hover:not(.on){border-color:var(--gold-lo)}

  /* ---------- upload dropzone ---------- */
  .upload{position:relative;border:1.5px dashed var(--line);border-radius:var(--r-lg);padding:22px 16px;
    display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;cursor:pointer;
    background:var(--panel-2);transition:border-color var(--dur-hover) var(--ease),background var(--dur-hover) var(--ease)}
  .upload:hover{border-color:var(--gold-lo)}
  .upload input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
  .upload .uicon{color:var(--gold-lo)}
  .upload b{font-size:.88rem;font-weight:600;color:var(--ink-2)}
  .upload small{font-size:.76rem;color:var(--ink-3)}
  .upload .preview{display:none;align-items:center;gap:12px;width:100%;text-align:right}
  .upload.has-file{padding:12px}
  .upload.has-file .placeholder{display:none}
  .upload.has-file .preview{display:flex}
  .upload .preview img{width:56px;height:56px;border-radius:10px;object-fit:cover;flex:none;border:1px solid var(--line)}
  .upload .preview .pname{flex:1;min-width:0;font-size:.85rem;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .upload .preview .pchange{font-size:.78rem;color:var(--gold-hi);text-decoration:underline;flex:none}

  /* ---------- rich text editor (Quill) -- used for "من نحن", article body,
     and question answers, so the shop owner can bold/italic/color/size/
     heading text without writing HTML by hand ---------- */
  .rte{border-radius:var(--r-md);overflow:hidden;border:1px solid var(--line)}
  .rte .ql-toolbar.ql-snow{background:var(--panel-2);border:none;border-bottom:1px solid var(--line);font-family:var(--body);padding:9px 10px}
  .rte .ql-container.ql-snow{border:none;font-family:var(--body);font-size:.94rem;background:var(--panel-2)}
  .rte .ql-editor{min-height:140px;color:var(--ink)}
  .rte .ql-editor.ql-blank::before{color:var(--ink-3);font-style:normal}
  .rte .ql-snow .ql-stroke{stroke:var(--ink-2)}
  .rte .ql-snow .ql-fill{fill:var(--ink-2)}
  .rte .ql-snow .ql-picker{color:var(--ink-2)}
  .rte .ql-snow .ql-picker-options{background:var(--panel);border:1px solid var(--line)!important;border-radius:8px;padding:4px}
  .rte .ql-snow .ql-picker-item{border-radius:6px}
  .rte .ql-snow .ql-picker-item:hover,.rte .ql-snow .ql-stroke:hover,.rte .ql-snow .ql-toolbar button:hover .ql-stroke{stroke:var(--gold-hi)}
  .rte .ql-snow .ql-toolbar button:hover{color:var(--gold-hi)}
  .rte .ql-snow .ql-toolbar button.ql-active,.rte .ql-snow .ql-toolbar .ql-picker-label.ql-active{color:var(--gold-hi)}
  .rte .ql-snow .ql-toolbar button.ql-active .ql-stroke{stroke:var(--gold-hi)}
  .rte .ql-snow.ql-toolbar button:hover,.rte .ql-snow .ql-toolbar button:hover{color:var(--gold-hi)}
  /* ---------- nicer toolbar buttons: rounded hover/active highlight boxes
     instead of Quill's flat default, and breathing room between groups ---- */
  .rte .ql-snow .ql-formats{margin-inline-end:10px;display:inline-flex;align-items:center;gap:1px}
  .rte .ql-snow .ql-formats:last-child{margin-inline-end:0}
  .rte .ql-snow.ql-toolbar button,.rte .ql-snow .ql-toolbar button{border-radius:7px;padding:3px 5px;transition:background var(--dur-hover) var(--ease)}
  .rte .ql-snow .ql-toolbar button:hover,.rte .ql-snow.ql-toolbar button:hover{background:rgba(201,162,75,.14)}
  .rte .ql-snow .ql-toolbar button.ql-active,.rte .ql-snow.ql-toolbar button.ql-active{background:rgba(201,162,75,.22)}
  .rte .ql-snow .ql-picker-label{border-radius:7px;padding-inline:6px}
  .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) .ql-picker-label{padding-left:20px;padding-right:6px;text-align:right}
  .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) .ql-picker-label svg{right:auto;left:2px}
  .ql-snow .ql-picker.ql-header,.ql-snow .ql-picker.ql-size{width:auto;min-width:84px}
  .ql-toolbar.ql-snow{background:var(--panel-2);border:1px solid var(--line);border-bottom:none;border-radius:12px 12px 0 0;font-family:var(--body);padding:8px 10px}
  .ql-toolbar.ql-snow + .ql-container.ql-snow{border:1px solid var(--line);border-radius:0 0 12px 12px;background:var(--panel-2)}
  .ql-toolbar.ql-snow .ql-stroke{stroke:var(--ink-2)}
  .ql-toolbar.ql-snow .ql-fill,.ql-toolbar.ql-snow .ql-stroke.ql-fill{fill:var(--ink-2)}
  .ql-toolbar.ql-snow .ql-picker,.ql-toolbar.ql-snow .ql-picker-label{color:var(--ink-2)}
  .ql-toolbar.ql-snow .ql-picker-options{background:var(--panel);border:1px solid var(--line)!important;border-radius:8px;color:var(--ink)}
  .ql-toolbar.ql-snow button:hover .ql-stroke,.ql-toolbar.ql-snow button.ql-active .ql-stroke,.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke{stroke:var(--gold-hi)}
  .ql-toolbar.ql-snow button:hover .ql-fill,.ql-toolbar.ql-snow button.ql-active .ql-fill{fill:var(--gold-hi)}
  .ql-toolbar.ql-snow button:hover,.ql-toolbar.ql-snow button.ql-active,.ql-toolbar.ql-snow .ql-picker-label:hover,.ql-toolbar.ql-snow .ql-picker-item:hover,.ql-toolbar.ql-snow .ql-picker-item.ql-selected{color:var(--gold-hi)}
  .ql-toolbar.ql-snow button{border-radius:7px}
  .ql-toolbar.ql-snow button:hover{background:var(--gold-bg)}
  .ql-snow .ql-picker-item{text-align:right}
  .ql-snow .ql-picker.ql-header .ql-picker-label::before,.ql-snow .ql-picker.ql-header .ql-picker-item::before{content:"نص عادي"}
  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before{content:"عنوان"}
  .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before{content:"عنوان صغير"}
  .ql-snow .ql-picker.ql-size .ql-picker-label::before,.ql-snow .ql-picker.ql-size .ql-picker-item::before{content:"حجم عادي"}
  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before{content:"صغير"}
  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before{content:"كبير"}
  .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before{content:"كبير جداً"}
  .rte .ql-snow .ql-picker-label:hover{background:rgba(201,162,75,.14)}
  .rte .ql-snow .ql-picker.ql-expanded .ql-picker-label{border-color:var(--gold-lo)}
  .rte-fallback{width:100%;min-height:140px;padding:11px 13px;border:none;background:var(--panel-2);color:var(--ink);font-family:var(--body);font-size:.94rem;resize:vertical;box-sizing:border-box}

  /* ---------- article: upload-only zip composer, replacing the old Quill
     editor now that an article is a full page the admin designs on their
     own device and just uploads, rather than a short rich-text snippet. ---------- */
  #artZipResult:empty{display:none}
  #artZipResult{margin-top:8px;padding:10px;border-radius:10px;background:var(--panel-2);border:1px solid var(--line);font-size:.82rem}
  #artZipResult.err{color:var(--bad)}
  #artZipResult ul{margin:4px 0 0;padding-inline-start:18px}

  /* ---------- auth overlay ---------- */
  .ovl{position:fixed;inset:0;background:rgba(5,4,2,.9);display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}
  :root[data-theme="light"] .ovl{background:rgba(60,52,30,.45)}
  .ovl[hidden]{display:none}

  /* ---------- image lightbox (zoom a catalog piece's photo) ---------- */
  .img-lightbox-ovl{z-index:60;flex-direction:column}
  .img-lightbox-ovl .lb-inner{position:relative;width:100%;max-width:520px;display:flex;flex-direction:column;align-items:center;gap:14px}
  .img-lightbox-ovl img{max-width:100%;max-height:72vh;border-radius:var(--r-lg);object-fit:contain;background:var(--panel-2);box-shadow:0 20px 50px rgba(0,0,0,.5)}
  .img-lightbox-ovl .lb-close{position:absolute;top:-16px;right:-8px;width:36px;height:36px;border-radius:50%;background:var(--panel);border:1px solid var(--line);color:var(--ink);display:grid;place-items:center;cursor:pointer;font-size:1rem}
  .img-lightbox-ovl .lb-nav{display:flex;align-items:center;gap:18px}
  .img-lightbox-ovl .lb-nav button{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);color:#fff;display:grid;place-items:center;cursor:pointer}
  .img-lightbox-ovl .lb-nav button:hover{background:rgba(255,255,255,.18)}
  .img-lightbox-ovl .lb-count{color:rgba(255,255,255,.8);font-size:.8rem;min-width:52px;text-align:center}

  /* ---------- article preview modal: the already-composed, image-URL-rewritten
     article HTML in the same sandboxed iframe pattern the public site uses to
     render a published article, so "معاينة" shows exactly what will go live ---------- */
  .art-preview-ovl{z-index:60;flex-direction:column}
  .art-preview-inner{position:relative;width:100%;max-width:900px;height:85vh;background:var(--panel);border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
  .art-preview-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--line);flex:0 0 auto}
  .art-preview-head h3{margin:0;font-size:.95rem}
  .art-preview-close{width:32px;height:32px;border-radius:50%;background:var(--panel-2);border:1px solid var(--line);color:var(--ink);display:grid;place-items:center;cursor:pointer;font-size:1rem}
  .art-preview-frame{flex:1 1 auto;width:100%;border:none;background:#fff}

  .sheet{width:100%;max-width:380px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-xl);padding:22px}
  .sheet h2{text-align:center}
  .sheet .sub{color:var(--ink-3);font-size:.85rem;text-align:center;margin:-4px 0 14px}
  .sheet-actions{display:flex;gap:8px;margin-top:4px}
  .sheet-actions .btn{flex:1}
  /* ---------- confirm dialog: a little icon + a soft scale-in, so it reads
     as part of this app instead of a bare generic modal ---------- */
  .confirm-ovl{opacity:0;transition:opacity var(--dur-modal) var(--ease)}
  .confirm-ovl.open{opacity:1}
  .confirm-sheet{transform:scale(.94) translateY(6px);opacity:0;transition:transform var(--dur-modal) var(--ease),opacity var(--dur-modal) var(--ease)}
  .confirm-ovl.open .confirm-sheet{transform:scale(1) translateY(0);opacity:1}
  .confirm-icon{width:52px;height:52px;border-radius:50%;margin:0 auto 14px;display:grid;place-items:center}
  .confirm-icon.warn{background:var(--bad-bg);color:var(--bad)}
  .confirm-icon.info{background:var(--gold-bg);color:var(--gold-hi)}

  /* =========================================================================
     Phase 5a — shared component groundwork (toast stack, tooltip, skeleton
     loader, sparkline, toggle switch). Declared now as inert, reusable CSS/JS
     -- NOT wired into any panel yet. Each gets its first real use in a later
     Phase 5 sub-phase (5e restyle / 5f toasts+tooltips), at which point only
     the call sites change, not these definitions. ========================= */

  /* ---- toast stack: stacks top-to-bottom, newest on top, auto-dismiss.
     Distinct from the existing single-slot .msg inline text -- this is for
     a transient confirmation that shouldn't rely on the user still looking
     at the form they just submitted (e.g. after navigating away). */
  .toast-stack{position:fixed;inset-inline-end:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:9999;
    display:flex;flex-direction:column-reverse;gap:8px;max-width:min(360px,92vw);pointer-events:none}
  .toast-item{pointer-events:auto;display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:var(--r-md,10px);
    background:var(--panel);border:1px solid var(--line);box-shadow:var(--card-shadow);color:var(--ink);font-size:.86rem;
    opacity:0;transform:translateY(8px);transition:opacity var(--dur-menu,220ms) var(--ease,ease),transform var(--dur-menu,220ms) var(--ease,ease)}
  .toast-item.show{opacity:1;transform:translateY(0)}
  .toast-item .ic{flex:none;width:20px;height:20px;display:grid;place-items:center}
  .toast-item.ok .ic{color:var(--wa)}
  .toast-item.err .ic{color:var(--bad)}
  .toast-item.info .ic{color:var(--info)}
  .toast-item .tx{flex:1;line-height:1.5}
  .toast-item .close{flex:none;background:none;border:0;color:var(--ink-3);cursor:pointer;padding:2px;line-height:1}

  /* ---- tooltip: hover/focus-triggered label for icon-only controls.
     data-tip="..." on any element; positioned above by default. */
  [data-tip]{position:relative}
  [data-tip]::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 8px);inset-inline-start:50%;
    transform:translateX(-50%) translateY(4px);background:var(--ink);color:var(--ground);font-size:.74rem;font-weight:600;
    white-space:nowrap;padding:5px 9px;border-radius:7px;pointer-events:none;opacity:0;
    transition:opacity var(--dur-hover,180ms) var(--ease,ease),transform var(--dur-hover,180ms) var(--ease,ease);z-index:200}
  [data-tip]:hover::after,[data-tip]:focus-visible::after{opacity:1;transform:translateX(-50%) translateY(0)}

  /* ---- skeleton loader: shimmering placeholder for content still loading
     (image/card/row). Apply .skel to a block with a fixed size, or use the
     pre-sized .skel-line/.skel-thumb helpers. */
  @keyframes skelShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
  .skel{background:linear-gradient(110deg,var(--panel-2) 8%,var(--line) 18%,var(--panel-2) 33%);
    background-size:200% 100%;animation:skelShimmer 1.4s ease-in-out infinite;border-radius:var(--r-sm,8px)}
  .skel-line{height:14px;border-radius:5px}
  .skel-thumb{width:100%;aspect-ratio:1/1;border-radius:var(--r-md,10px)}

  /* ---- sparkline: tiny inline trend line, drawn as an SVG path by
     ddSparkline() (see script section). No chart library -- a handful of
     numbers in, a <path> out. Used on KPI tiles next to the headline figure. */
  .sparkline{display:block;overflow:visible}
  .sparkline path{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .sparkline .fill{stroke:none}

  /* ---- toggle switch: replaces a native checkbox for on/off settings
     (e.g. published/draft). Markup: <label class="switch"><input
     type="checkbox"><span class="track"><span class="thumb"></span></span></label> */
  .switch{display:inline-flex;align-items:center;cursor:pointer;flex:none;position:relative}
  /* Visually hidden but sized/positioned to exactly cover .track (not
     shrunk to 1x1 off in a corner) so it stays the real, directly
     clickable hit target -- both for real pointer/keyboard use and for
     automated tools that click the checkbox element itself rather than a
     neighboring label area. z-index lifts it above .track/.thumb, which
     are otherwise later-painted siblings that would intercept the click. */
  .switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;z-index:1}
  .switch .track{width:40px;height:24px;border-radius:99px;background:var(--panel-2);border:1px solid var(--line);
    position:relative;transition:background var(--dur-hover,180ms) var(--ease,ease),border-color var(--dur-hover,180ms) var(--ease,ease)}
  /* ink-3 (not ink-2) was the original inert-component choice, but on
     .track's panel-2 fill it only reached 2.54:1 (light) / 4.02:1 (dark)
     -- a hand-checked contrast pass before shipping this to real UI found
     ink-2 clears WCAG 1.4.11's 3:1 graphical-object minimum in both
     themes (4.34:1 light / 7.46:1 dark). */
  .switch .thumb{position:absolute;top:2px;inset-inline-start:2px;width:18px;height:18px;border-radius:50%;background:var(--ink-2);
    transition:transform var(--dur-hover,180ms) var(--ease,ease),background var(--dur-hover,180ms) var(--ease,ease)}
  .switch input:checked + .track{background:var(--gold-bg);border-color:var(--gold-lo)}
  /* the app is always dir="rtl" (see <html> above), so the thumb's "on"
     position is a literal -16px, not a logical-property flip.
     gold-hi (not plain gold) on the checked thumb: plain gold against the
     checked track's gold-tinted fill only reached 2.05:1 (light) /
     4.07:1 (dark); gold-hi clears 3:1 in both (3.83:1 light / 5.16:1 dark). */
  .switch input:checked + .track .thumb{transform:translateX(-16px);background:var(--gold-hi)}
  .switch input:focus-visible + .track{outline:2px solid var(--gold-lo);outline-offset:2px}

  /* ---------- Phase 5f: reduced motion ----------
     Admin had NO reduced-motion handling at all before this (unlike
     site-app, which already carries the equivalent blanket rule) --
     this covers every hover/menu/modal transition tokenized in 5e/5f
     plus the .skel shimmer loop above (an `infinite` animation is
     exactly the continuous/perpetual motion this project's own brief
     says to avoid). One blanket !important rule, same approach already
     proven in site-app, rather than annotating each component one by
     one. */
  @media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
  /* ---------- campaign links + attribution report ---------- */
  .camp-sheet{max-width:440px;max-height:calc(100vh - 40px);overflow:auto}
  .camp-sheet .field{margin-bottom:12px}
  .camp-url{width:100%;direction:ltr;text-align:left;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.78rem;min-height:72px;word-break:break-all}
  .camp-piece{color:var(--gold-hi);font-weight:600;text-align:center;margin:-6px 0 14px;font-size:.9rem}
  .camp-msg{font-size:.8rem;color:var(--wa);text-align:center;min-height:1.2em;margin-top:8px}
  .icon-btn-sm.camp-icon{font-size:15px;line-height:1}
  .attr-h{font-size:.95rem;margin:16px 0 8px;color:var(--ink)}
  #attrBody .row-item{flex-wrap:wrap}
  #attrBody .row-item .meta{flex:1 1 140px;min-width:0}
  .pill.attr-rate{background:var(--gold-bg)}
  .pill.sold-pill{border-color:var(--bad);color:var(--bad)}
  .icon-btn-sm.sold-icon.on{background:var(--bad);border-color:var(--bad);color:#fff}
  .row-item.is-sold .cat-thumb{filter:grayscale(.7);opacity:.75}
  .row-item .actions .extra-row:empty{display:none}
  /* ---------- bulk upload + quick edit ---------- */
  .bulk-shared{background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:12px;margin:12px 0}
  .bulk-shared .field,.bulk-shared .field:last-of-type{margin-bottom:16px}
  .bulk-shared .check-row:last-child{margin-bottom:0}
  .bp-pub{display:flex;align-items:center;gap:10px;margin:8px 0 0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:.86rem;color:var(--ink-2)}
  .bp-pub.on{border-color:var(--gold-lo);color:var(--ink)}
  .bulk-done{display:flex;flex-wrap:wrap;align-items:center;gap:10px;justify-content:space-between;background:var(--panel-2);border:1px solid var(--gold);border-radius:12px;padding:12px;margin:0 0 12px;font-size:.88rem;line-height:1.6}
  .bulk-done span{flex:1 1 220px}
  .bulk-shared h3,.bulk-h{font-size:.92rem;margin:0 0 10px;color:var(--ink)}
  .bulk-count{font-size:.82rem;color:var(--ink-2);margin:6px 0 10px}
  .bp-card{border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px;background:var(--panel);transition:border-color .2s}
  .bp-card.st-done{border-color:var(--wa);opacity:.85}
  .bp-card.st-failed{border-color:var(--bad)}
  .bp-card.st-uploading,.bp-card.st-processing{border-color:var(--gold)}
  .bp-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:.85rem}
  .bp-state{font-size:.78rem;color:var(--ink-2)}
  .bp-state.ok{color:var(--wa)} .bp-state.err{color:var(--bad)}
  .bp-imgs{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}
  .bp-img{position:relative;flex:none;width:86px;height:86px;border-radius:10px;overflow:hidden;background:var(--panel-2);border:1px solid var(--line)}
  .bp-img.bad{border-color:var(--bad)}
  .bp-img img{width:100%;height:100%;object-fit:cover;display:block}
  .bp-img-err{position:absolute;inset:auto 0 0 0;background:rgba(150,30,30,.88);color:#fff;font-size:.6rem;line-height:1.3;padding:3px 4px}
  .bp-img-tools{position:absolute;top:3px;inset-inline-start:3px;display:flex;gap:3px}
  .bp-img-tools button{width:24px;height:24px;border-radius:50%;border:none;background:rgba(0,0,0,.6);color:#fff;font-size:.72rem;cursor:pointer;padding:0;line-height:1}
  .bp-bar{height:5px;border-radius:99px;background:var(--panel-2);overflow:hidden;margin:6px 0}
  .bp-bar span{display:block;height:100%;background:var(--gold);transition:width .2s}
  .bp-fields{display:flex;flex-direction:column;gap:8px;margin-top:8px}
  .bp-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .bp-foot{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
  .bulk-actions{display:flex;gap:8px;margin-top:6px}
  .bulk-actions .btn.gold{flex:1}
  .bulk-review{margin-top:12px;background:var(--gold-bg);border:1px solid var(--gold-lo);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;font-size:.85rem}
  .bulk-review-btns{display:flex;gap:8px}
  .bulk-review-btns .btn{flex:1}
  .row-item .meta{cursor:pointer}
  .qe{display:flex;flex-direction:column;gap:6px;cursor:default}
  .qe-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .qe label{display:flex;flex-direction:column;gap:2px;font-size:.7rem;color:var(--ink-3)}
  .qe input{padding:7px 8px;font-size:.85rem}
  .qe-actions{display:flex;gap:6px}
  .cat-qe-hint{font-size:.74rem;color:var(--ink-3);margin:-4px 0 8px}
  .pill.health-bad{border-color:var(--bad);color:var(--bad)}
  .trust-login{margin-top:10px}
  #trustCard .btn.block + .btn.block{margin-top:8px}
  #trustList{margin-bottom:12px}
  #trustOvl label{display:block;margin:10px 0 4px}
  #trustOvl .msg{min-height:1.2em;margin:8px 0}
  .pill.health-off{border-color:var(--line);color:var(--ink-3)}
  #healthRefresh{margin-top:14px}
  .health-tech{display:block;text-align:right;font-weight:400;font-size:.8em;opacity:.7;margin-top:2px}
  /* ---------- التحليلات dashboard (same tokens as the rest of the panel) ---------- */
  .an-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -4px 14px;padding:2px 4px 6px;-webkit-overflow-scrolling:touch}
  .an-tabs::-webkit-scrollbar{display:none}
  .an-tab{flex:none;border:1px solid var(--line);background:var(--panel-2);color:var(--ink-2);font-family:var(--body);font-size:.82rem;font-weight:600;border-radius:999px;padding:8px 14px;cursor:pointer;white-space:nowrap}
  .an-tab.on{background:var(--gold);border-color:var(--gold);color:#1a1408}
  .an-sub{font-size:.78rem;font-weight:600;color:var(--ink-3);margin:2px 0 8px}
  .an-sub ~ .an-sub{margin-top:14px}
  .an-custom{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:-2px 0 12px}
  .an-custom label{display:flex;flex-direction:column;gap:4px;margin:0;font-size:.78rem}
  .an-custom input[type=date]{height:40px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--panel-2);color:var(--ink);font-family:var(--body)}
  .an-meta{font-size:.84rem;color:var(--ink-2);margin:-2px 0 14px;line-height:1.7}
  .an-note{font-size:.76rem;color:var(--ink-3);line-height:1.6;margin-top:6px}
  .an-muted{color:var(--ink-3)}
  .an-loading{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:14px}
  @media (min-width:960px){ .an-loading{grid-template-columns:repeat(4,1fr)} }
  .an-loading i{display:block;height:70px;border-radius:12px;background:linear-gradient(90deg,var(--panel-2),var(--line),var(--panel-2));background-size:200% 100%;animation:anShimmer 1.2s linear infinite}
  @keyframes anShimmer{to{background-position:-200% 0}}
  @media (prefers-reduced-motion:reduce){ .an-loading i{animation:none} }
  .an-dim{opacity:.55;transition:opacity var(--dur-hover) var(--ease)}
  .an-kpis div{display:flex;flex-direction:column;align-items:center;gap:2px}
  .an-delta{font-size:.7rem;font-weight:600;color:var(--ink-3)}
  .an-delta.up{color:var(--wa)} .an-delta.down{color:var(--bad)}
  .an-h{font-family:var(--display);color:var(--gold-hi);font-size:1rem;margin:18px 0 10px}
  .an-box{background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:14px;min-width:0}
  .an-box .an-h{margin-top:0}
  .an-box-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
  .an-box-head .an-h{margin:0}
  .an-grid2{display:grid;grid-template-columns:1fr;gap:0 14px}
  @media (min-width:860px){ .an-grid2{grid-template-columns:1fr 1fr} }
  .an-insights{display:grid;grid-template-columns:1fr;gap:10px}
  @media (min-width:860px){ .an-insights{grid-template-columns:1fr 1fr} }
  .an-insight{border:1px solid var(--line);border-inline-start:3px solid var(--gold);border-radius:10px;padding:10px 12px;background:var(--panel-2);font-size:.84rem;line-height:1.65}
  .an-insight b{display:block;color:var(--ink);margin-bottom:2px}
  .an-insight.an-ins-low{border-inline-start-color:var(--bad)}
  .an-insight.an-ins-strong,.an-insight.an-ins-campaign{border-inline-start-color:var(--wa)}
  .an-insight.an-ins-info{border-inline-start-color:var(--ink-3)}
  .an-insight details{margin-top:6px;font-size:.76rem;color:var(--ink-3)}
  .an-insight summary{cursor:pointer;color:var(--gold-hi)}
  .an-fstep{margin-bottom:12px}
  .an-frow{display:flex;justify-content:space-between;gap:8px;font-size:.86rem}
  .an-frow b{color:var(--gold-hi)}
  .an-fbar,.an-bar{height:10px;border-radius:99px;background:var(--panel);border:1px solid var(--line);overflow:hidden;margin:5px 0 3px}
  .an-fbar i,.an-bar i{display:block;height:100%;background:var(--gold);border-radius:99px}
  .an-fstep small{color:var(--ink-3);font-size:.74rem}
  .an-trend svg{width:100%;height:auto;display:block;direction:ltr}
  .an-grid{stroke:var(--line);stroke-width:1}
  .an-axis{fill:var(--ink-3);font-size:11px;font-family:var(--body)}
  .an-l1{fill:none;stroke:var(--gold);stroke-width:2.2;stroke-linejoin:round}
  .an-l2{fill:none;stroke:var(--wa);stroke-width:2.2;stroke-linejoin:round;stroke-dasharray:5 4}
  .an-hit{fill:transparent}
  .an-hit:hover{fill:var(--gold-bg)}
  .an-legend{display:flex;gap:16px;justify-content:center;font-size:.76rem;color:var(--ink-2);margin-top:6px}
  .an-legend i{display:inline-block;width:16px;height:3px;border-radius:2px;vertical-align:middle;margin-inline-end:6px}
  .an-k1{background:var(--gold)} .an-k2{background:var(--wa)}
  .an-split{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:.8rem;color:var(--ink-2);margin-bottom:10px}
  .an-bar-row{display:grid;grid-template-columns:minmax(90px,1.1fr) 2fr;gap:2px 12px;align-items:center;padding:7px 0;border-bottom:1px dashed var(--line)}
  .an-bar-row:last-child{border-bottom:none}
  .an-bar-label b{font-size:.86rem;display:block;line-height:1.3}
  .an-bar-label small{color:var(--ink-3);font-size:.72rem}
  .an-bar-row .an-bar{margin:0}
  .an-bar-nums{grid-column:2;font-size:.74rem;color:var(--ink-3)}
  .an-bar-nums b{color:var(--ink)}
  .an-bar-row.unknown .an-bar i{background:var(--ink-3)}
  .an-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
  .an-filters input[type=text]{grid-column:1/-1}
  .an-filters input,.an-filters select{height:40px;font-size:.84rem}
  .an-check{display:flex;align-items:center;gap:8px;grid-column:1/-1;margin:0;font-size:.8rem}
  @media (min-width:860px){ .an-filters{grid-template-columns:2fr 1fr 1fr 1fr} .an-filters input[type=text]{grid-column:auto} }
  .an-sel-sm{width:auto;min-width:140px;height:36px;font-size:.8rem;padding-top:6px;padding-bottom:6px}
  .an-table-wrap{overflow-x:auto}
  .an-table{width:100%;border-collapse:collapse;font-size:.84rem}
  .an-table th{text-align:right;font-weight:600;color:var(--ink-3);font-size:.74rem;padding:8px 6px;border-bottom:1px solid var(--line);white-space:nowrap}
  .an-table th button{background:none;border:none;color:inherit;font:inherit;cursor:pointer;padding:0}
  .an-table th button.on{color:var(--gold-hi)}
  .an-table td{padding:9px 6px;border-bottom:1px solid var(--line);vertical-align:middle}
  .an-table tr:last-child td{border-bottom:none}
  .an-td-img img,.an-noimg{width:46px;height:46px;border-radius:8px;object-fit:cover;display:block;background:var(--panel)}
  .an-td-title b{display:block;line-height:1.35}
  .an-td-title small{display:block;color:var(--ink-3);font-size:.72rem}
  .an-td-title .pill{margin-top:4px}
  .pill.an-flag-low{border-color:var(--bad);color:var(--bad)}
  .pill.an-flag-strong{border-color:var(--wa);color:var(--wa)}
  .an-row-low td{background:var(--bad-bg)}
  .an-camp-row{cursor:pointer}
  .an-camp-row:hover td,.an-camp-row:focus td{background:var(--gold-bg)}
  .an-camp-row:focus{outline:none}
  .an-drill td{background:var(--panel)}
  .an-drill-list{display:flex;flex-direction:column;gap:4px;font-size:.8rem}
  /* phones: each table row becomes a small card with labelled values */
  @media (max-width:719px){
    .an-table thead{display:none}
    .an-table,.an-table tbody,.an-table tr,.an-table td{display:block;width:100%}
    .an-table tr{display:grid;grid-template-columns:repeat(3,1fr);gap:6px 10px;padding:10px 0;border-bottom:1px solid var(--line)}
    .an-table tr.an-drill{display:block}
    .an-table tr.an-drill[hidden]{display:none}
    .an-table td{border:none;padding:0;font-size:.82rem}
    .an-table td[data-label]::before{content:attr(data-label);display:block;font-size:.68rem;color:var(--ink-3)}
    .an-table .an-td-img{grid-row:span 2;width:auto}
    .an-table:not(.an-camp) tr:not(.an-drill){display:flex;flex-wrap:wrap;align-items:center;gap:5px 4px;padding:12px 0}
    .an-table:not(.an-camp) .an-td-img{flex:0 0 46px}
    .an-table:not(.an-camp) .an-td-title{flex:1 1 calc(100% - 60px);min-width:0}
    .an-table:not(.an-camp) td[data-label]:not(.an-td-title){width:auto;flex:none;display:inline-flex;align-items:baseline;gap:3px;padding:2px 7px;border:1px solid var(--line);border-radius:99px;background:var(--panel);font-size:.74rem;line-height:1.5}
    .an-table:not(.an-camp) td[data-label]:not(.an-td-title)::before{display:inline;font-size:.7rem}
    .an-table:not(.an-camp) td[data-label="التوفر"]{border:none;background:none;padding:0}
    .an-table:not(.an-camp) td[data-label="التوفر"]::before{display:none}
    .an-table:not(.an-camp) td small{font-size:.66rem}
    .an-table:not(.an-camp) td[data-short]::before{content:attr(data-short)}
    .an-table:not(.an-camp) td[data-label].an-c-uniq:not(.an-td-title),.an-table:not(.an-camp) td[data-label].an-c-pub:not(.an-td-title){display:none}
    .an-bar-row{grid-template-columns:1fr;gap:4px;padding:9px 0}
    .an-bar-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
    .an-bar-label small{white-space:nowrap}
    .an-bar-nums{grid-column:1}
    .an-table .an-td-title{grid-column:2/-1}
    .an-table .an-td-title::before{display:none!important}
    .an-camp .an-td-title{grid-column:1/-1}
  }
  .an-defs{margin-top:16px;font-size:.8rem;color:var(--ink-2);background:var(--panel-2);border:1px solid var(--line);border-radius:12px;padding:10px 14px}
  .an-defs summary{cursor:pointer;color:var(--gold-hi);font-weight:600}
  .an-defs ul{margin:8px 0 0;padding-inline-start:18px;line-height:1.8}
  .an-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
