/* ==========================================================================
   Sidra Jewellery & Fashion admin — luxe dark: charcoal surfaces, gold accents, metallic stat cards.
   Three panes on desktop (sidebar · work area · right rail), icon rail on tablet, drawer + top bar on phones.
   Tables turn into stacked cards under 760px (no horizontal scrolling). The dark theme tokens and overrides
   live at the end of this file ("Luxe dark theme").
   ========================================================================== */
:root {
  --bg: var(--a-bg, #F1EDF8);
  --ink: #2A2240;
  --ink-soft: #6F6690;
  --line: #E1DAF0;
  --white: #FFFFFF;
  --shadow-dark: color-mix(in srgb, var(--a-primary, #6D3FC0) 14%, #cfc8dc);
  --shadow-light: #FFFFFF;
  --raise: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
  --raise-sm: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  --inset: inset 4px 4px 9px var(--shadow-dark), inset -4px -4px 9px var(--shadow-light);
  --grad: linear-gradient(135deg, var(--a-primary, #6D3FC0) 0%, color-mix(in srgb, var(--a-primary, #6D3FC0) 50%, var(--a-pink, #E75A9B)) 55%, var(--a-pink, #E75A9B) 100%);
  --grad-side: linear-gradient(180deg, var(--a-primary-deep, #4B2590) 0%, var(--a-primary, #6D3FC0) 60%, color-mix(in srgb, var(--a-primary, #6D3FC0) 70%, var(--a-pink, #E75A9B)) 100%);
  --r: 22px;
  --ok: #1F9D6B; --warn: #D98A12; --bad: #D64550; --info: #3C74D6;
  --k1: #7B4AD1; --k2: #E75A9B; --k3: #F29E38; --k4: #19A7A0; --k5: #EF6F5C; --k6: #4A7BE0;
  font-family: "Jost", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; }
body { overflow-x: hidden; }
a { color: var(--a-primary, #6D3FC0); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--a-pink, #E75A9B); outline-offset: 2px; }
.muted { color: var(--ink-soft); } .small { font-size: .85rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 900px) { .shell { grid-template-columns: 92px minmax(0, 1fr); } }
@media (min-width: 1280px) { .shell { grid-template-columns: 250px minmax(0, 1fr) 300px; } .shell.collapsed { grid-template-columns: 92px minmax(0, 1fr) 300px; } }

/* Left sidebar */
.side {
  background: var(--grad-side); color: #fff; position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50;
  border-radius: 0 30px 30px 0; padding: 18px 12px; display: flex; flex-direction: column; gap: 6px;
  transform: translateX(-105%); transition: transform .25s ease; overflow-y: auto; box-shadow: 10px 0 30px -18px rgba(40, 10, 80, .6);
}
.side.open { transform: none; }
@media (min-width: 900px) { .side { position: sticky; top: 0; height: 100vh; width: auto; transform: none; } }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; }
.brand-mark { width: 46px; height: 46px; border-radius: 16px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; box-shadow: inset 2px 2px 6px rgba(255,255,255,.2), inset -3px -3px 8px rgba(0,0,0,.15); flex: none; }
.brand b { display: block; font-size: 1.05rem; } .brand small { opacity: .75; }
.nav-group { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .6; padding: 12px 12px 4px; }
.nav a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 16px; color: #fff; text-decoration: none; opacity: .88; position: relative; }
.nav a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.nav a[aria-current="page"] { background: #fff; color: var(--a-primary-deep, #4B2590); opacity: 1; box-shadow: 0 10px 20px -12px rgba(0,0,0,.5); }
.nav a .count { margin-left: auto; background: var(--a-pink, #E75A9B); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.side-foot { margin-top: auto; padding: 12px 8px 4px; }
.collapse-btn { width: 100%; min-height: 44px; border: 0; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; display: none; align-items: center; justify-content: center; gap: 8px; }
@media (min-width: 1280px) { .collapse-btn { display: flex; } }
/* Icon rail: tablet always, desktop when collapsed */
@media (min-width: 900px) and (max-width: 1279px) { .side .label, .side .nav-group, .side .brand-text, .nav a .count { display: none; } .nav a { justify-content: center; padding: 0; } .brand { justify-content: center; } }
@media (min-width: 1280px) { .shell.collapsed .side .label, .shell.collapsed .side .nav-group, .shell.collapsed .brand-text, .shell.collapsed .nav a .count { display: none; } .shell.collapsed .nav a { justify-content: center; padding: 0; } .shell.collapsed .brand { justify-content: center; } }
.scrim { position: fixed; inset: 0; background: rgba(30, 15, 50, .35); z-index: 45; }

/* Top bar (phone & tablet) */
.topbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.topbar .title { font-weight: 700; margin-right: auto; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1280px) { .topbar { display: none; } }
.topbar .menu-btn { display: inline-grid; } @media (min-width: 900px) { .topbar .menu-btn { display: none; } }
@media (min-width: 1280px) { .work { padding-top: 20px; } }

/* Center */
.work { padding: 0 16px 40px; min-width: 0; }
@media (min-width: 900px) { .work { padding: 0 28px 48px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 20px; }
.page-head h1 { margin: 0 auto 0 0; }

/* Right rail */
.rail { display: none; padding: 20px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
@media (min-width: 1280px) { .rail { display: flex; flex-direction: column; gap: 18px; } }
.rail.drawer { display: flex; flex-direction: column; gap: 18px; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); background: var(--bg); z-index: 50; box-shadow: -10px 0 30px -12px rgba(40,10,80,.4); border-radius: 30px 0 0 30px; }

/* ---------- Soft UI primitives ---------- */
.card { background: var(--bg); border-radius: var(--r); box-shadow: var(--raise); padding: 18px; min-width: 0; }
@media (min-width: 700px) { .card { padding: 22px; } }
.card + .card { margin-top: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title h2 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 16px; background: var(--bg); box-shadow: var(--raise-sm); font-weight: 600; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .1s; white-space: nowrap; }
.btn:hover { box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light); }
.btn:active { box-shadow: var(--inset); transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--a-primary, #6D3FC0) 70%, transparent); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: 0 10px 22px -12px var(--bad); }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .88rem; border-radius: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 46px; height: 46px; border-radius: 16px; border: 0; background: var(--bg); box-shadow: var(--raise-sm); display: inline-grid; place-items: center; position: relative; color: var(--ink); flex: none; }
.icon-btn:active { box-shadow: var(--inset); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--a-pink, #E75A9B); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--bg); box-shadow: var(--inset); }
textarea.input { min-height: 100px; resize: vertical; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--a-primary, #6D3FC0) 50%, transparent); }
.input.invalid { outline: 2px solid var(--bad); }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; display: block; }
.field-error { color: var(--bad); font-size: .83rem; margin-top: 4px; display: block; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--a-primary, #6D3FC0); }
.grid2 { display: grid; gap: 0 16px; } @media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid3 { display: grid; gap: 0 16px; } @media (min-width: 640px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #ECE6F7; color: var(--ink); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.pending { background: #FFF1D6; color: #8A5A00; } .pill.confirmed { background: #E6E0FA; color: #4B2590; } .pill.packed { background: #FCE3F0; color: #9C1F5E; }
.pill.shipped { background: #DFEAFB; color: #1F4C9C; } .pill.delivered, .pill.paid, .pill.approved, .pill.active { background: #DDF5EA; color: #11704B; }
.pill.cancelled, .pill.returned, .pill.failed, .pill.rejected, .pill.blocked { background: #FBE1E3; color: #9E1D27; }
.pill.flagged, .pill.draft, .pill.refunded, .pill.partially_refunded { background: #FFF1D6; color: #8A5A00; } .pill.archived, .pill.inactive { background: #ECE8F3; color: #6F6690; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--bg); box-shadow: var(--raise-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"] { background: var(--grad); color: #fff; }
.chip .n { background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 7px; font-size: .75rem; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 22px; }
.kpi { --c: var(--k1); position: relative; overflow: hidden; }
.kpi .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 8px 16px -8px var(--c); margin-bottom: 12px; }
.kpi .label { color: var(--ink-soft); font-size: .88rem; font-weight: 600; }
.kpi .value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 2px 0 10px; }
.kpi .bar { height: 8px; border-radius: 8px; box-shadow: var(--inset); overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 8px; background: var(--c); }
.kpi .delta { font-size: .8rem; font-weight: 700; margin-top: 6px; display: block; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.dash-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .dash-grid .card + .card { margin-top: 0; } }
.chart-box { position: relative; height: 260px; }
.top-item { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.top-item img { width: 46px; height: 56px; border-radius: 12px; object-fit: cover; background: #fff; }

/* ---------- Tables → cards on small screens ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { flex: 1 1 200px; min-height: 44px; }
.toolbar select.input { flex: 0 1 180px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 4px 12px; font-weight: 700; }
.table td { background: color-mix(in srgb, var(--bg) 60%, #fff); padding: 12px; vertical-align: middle; }
.table td:first-child { border-radius: 14px 0 0 14px; } .table td:last-child { border-radius: 0 14px 14px 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: #fff; }
.table .actions { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 54px; border-radius: 10px; object-fit: cover; background: #fff; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: color-mix(in srgb, var(--bg) 60%, #fff); border-radius: 16px; padding: 8px 12px; margin-bottom: 10px; }
  .table td { background: none !important; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; border-radius: 0 !important; }
  .table td::before { content: attr(data-label); font-weight: 600; color: var(--ink-soft); text-align: left; flex: none; }
  .table td.actions { justify-content: flex-end; }
  .table td.actions::before { display: none; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.state { text-align: center; padding: 40px 12px; color: var(--ink-soft); }
.state .big { width: 72px; height: 72px; border-radius: 24px; box-shadow: var(--inset); display: grid; place-items: center; margin: 0 auto 12px; color: var(--a-primary, #6D3FC0); }
.skel { border-radius: 14px; height: 54px; margin-bottom: 8px; background: linear-gradient(90deg, #e9e3f4 25%, #f6f2fc 50%, #e9e3f4 75%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.error-box { background: #FBE1E3; color: #7E1720; border-radius: 14px; padding: 12px 14px; }

/* ---------- Right rail widgets ---------- */
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 14px; top: 13px; color: var(--ink-soft); }
.search-box .input { padding-left: 44px; }
.search-results { margin-top: 10px; display: grid; gap: 6px; }
.search-results a { display: block; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 50%, #fff); text-decoration: none; color: var(--ink); font-size: .9rem; }
.profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; flex: none; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg); box-shadow: var(--raise); border-radius: 16px; padding: 8px; min-width: 200px; z-index: 20; }
.menu-list a, .menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 10px; text-decoration: none; color: var(--ink); }
.menu-list a:hover, .menu-list button:hover { background: #fff; }
.notif { display: grid; gap: 8px; }
.notif a { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 50%, #fff); text-decoration: none; color: var(--ink); font-size: .88rem; }
.notif .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.online { display: grid; gap: 10px; }
.online div { display: flex; gap: 10px; align-items: center; }
.online .avatar { width: 36px; height: 36px; border-radius: 12px; font-size: .9rem; position: relative; }
.online .avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }

/* ---------- Overlays ---------- */
.overlay-scrim { position: fixed; inset: 0; background: rgba(30, 15, 50, .38); z-index: 80; }
.slide { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); z-index: 81; display: flex; flex-direction: column; border-radius: 28px 0 0 28px; box-shadow: -20px 0 40px -20px rgba(40,10,80,.5); animation: slide-in .22s ease; }
@media (max-width: 640px) { .slide { border-radius: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.slide header, .dialog header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; }
.slide header h2, .dialog header h2 { margin: 0; }
.slide .body { padding: 6px 20px 20px; overflow-y: auto; flex: 1; }
.slide footer { padding: 14px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; box-shadow: 0 -10px 20px -18px rgba(40,10,80,.5); }
.dialog { position: fixed; z-index: 82; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 24px)); background: var(--bg); border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(40,10,80,.5); animation: pop .18s ease; }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.dialog .body { padding: 0 20px 8px; }
.dialog footer { padding: 14px 20px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); }
.toast { padding: 14px 16px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 16px 30px -12px rgba(0,0,0,.4); display: flex; gap: 10px; align-items: center; animation: pop2 .2s ease; font-weight: 600; }
.toast.ok { background: var(--ok); } .toast.err { background: var(--bad); }
@keyframes pop2 { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Order detail ---------- */
.pipeline { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.pipeline span { flex: 1 1 90px; text-align: center; padding: 8px 6px; border-radius: 12px; font-size: .78rem; font-weight: 700; box-shadow: var(--inset); color: var(--ink-soft); }
.pipeline span.done { background: var(--grad); color: #fff; box-shadow: none; }
.pipeline span.bad { background: var(--bad); color: #fff; box-shadow: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: .92rem; }
.kv dt { color: var(--ink-soft); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.history li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; font-size: .88rem; }
.history li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--a-pink, #E75A9B); margin-top: 6px; }
.item-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }

/* Variants editor */
.variants { display: grid; gap: 10px; }
.variant { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; align-items: end; padding: 12px; border-radius: 16px; box-shadow: var(--inset); }
@media (min-width: 640px) { .variant { grid-template-columns: 1.3fr 1fr 1.2fr 64px 90px 100px 44px; } }
.variant .field { margin: 0; }
.variant .input { min-height: 42px; }
.variant input[type="color"] { padding: 4px; height: 42px; }
.images { display: flex; flex-wrap: wrap; gap: 10px; }
.images figure { margin: 0; width: 88px; position: relative; }
.images img { width: 88px; height: 110px; object-fit: cover; border-radius: 12px; background: #fff; }
.images figure button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; }
.images figure .first { position: absolute; left: 4px; bottom: 4px; font-size: .65rem; background: var(--grad); color: #fff; padding: 1px 6px; border-radius: 6px; }
.upload { width: 88px; height: 110px; border-radius: 12px; box-shadow: var(--inset); display: grid; place-items: center; text-align: center; font-size: .75rem; color: var(--ink-soft); cursor: pointer; }

/* Category tree drag & drop */
.tree { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tree .tree { margin: 8px 0 0 28px; }
.tree-item > .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 55%, #fff); }
.tree-item.dragging > .row { opacity: .4; }
.tree-item.drop-before > .row { box-shadow: 0 -3px 0 var(--a-pink, #E75A9B); }
.tree-item.drop-inside > .row { outline: 2px dashed var(--a-pink, #E75A9B); }
.handle { cursor: grab; color: var(--ink-soft); min-width: 32px; min-height: 32px; display: grid; place-items: center; border: 0; background: none; touch-action: none; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--a-pink, #E75A9B) 22%, transparent), transparent), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--a-primary, #6D3FC0) 22%, transparent), transparent), var(--bg); }
.login-card { width: min(420px, 100%); }
.login-card .brand-mark { background: var(--grad); color: #fff; box-shadow: 0 12px 24px -10px var(--a-primary, #6D3FC0); }

/* Printing: invoices & shipping labels */
.print-only { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; display: block !important; color: #000; }
  .no-print { display: none !important; }
}
.invoice { font-family: system-ui, sans-serif; padding: 24px; color: #111; background: #fff; }
.invoice table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice th, .invoice td { border-bottom: 1px solid #ddd; padding: 8px; text-align: left; }
.invoice .right { text-align: right; }
.ship-label { border: 2px dashed #000; padding: 16px; width: 100mm; font-family: system-ui, sans-serif; background: #fff; color: #000; }
.ship-label .big { font-size: 20px; font-weight: 800; }

/* Product editor: live shop preview (sticky above the form on wide screens) */
.live-preview { margin-top: 0; }
@media (min-width: 900px) and (min-height: 880px) { .live-preview { position: sticky; top: 0; z-index: 2; } }
.pv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 640px) { .pv { grid-template-columns: 130px minmax(0, 1fr); } }
.pv-img { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--bg, #f4f1f8); display: grid; place-items: center; box-shadow: var(--inset); }
.pv-img img { width: 100%; height: 100%; object-fit: cover; }
.pv-badge { position: absolute; top: 6px; left: 6px; background: #D6246E; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.pv-badge.pv-free { top: auto; bottom: 6px; background: #1F7A4D; }
.pv-body { display: grid; gap: 5px; min-width: 0; }
.pv-name { font-size: 1.05rem; overflow-wrap: anywhere; }
.pv-price b { font-size: 1.15rem; }
.pv-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; margin-right: 3px; }
.search-results .sr-meta { display: block; font-size: 12px; opacity: .75; }

/* ---------- Luxe dark theme: tokens ---------- */
:root {
  color-scheme: dark;
  --a-bg: #0F0E0C; --a-primary: #D4AF6A; --a-primary-deep: #B8914A; --a-pink: #C75B7A;
  --surface: #181612; --surface-2: #1F1C17; --surface-3: #26221C; --field: #13110E; --on-gold: #17130B;
  --ink: #F1E9DA; --ink-soft: #A89F8D; --line: rgba(212, 175, 106, .16); --line-soft: rgba(241, 233, 218, .07);
  --raise: 0 12px 30px rgba(0, 0, 0, .45); --raise-sm: 0 3px 12px rgba(0, 0, 0, .4); --inset: inset 0 0 0 1px rgba(212, 175, 106, .18);
  --grad: linear-gradient(135deg, #F1DDB0 0%, #D4AF6A 45%, #B8914A 100%);
  --grad-side: linear-gradient(180deg, #17140F 0%, #0C0B09 100%);
  --k1: #D4AF6A; --k2: #E3A48F; --k3: #4FB58C; --k4: #A58BDB; --k5: #7EA2E0; --k6: #DB6C8C;
  --ok: #4FB58C; --warn: #E0A94A; --bad: #E0626B; --info: #7EA2E0;
  --yellow: #2A2416; --mint: #14271F; --lavender: #221A2B; --peach: #2B1E1A; --sky: #151F2B; --pink: #2B1620;
}
h1, h2 { font-family: "Cormorant Garamond", "Noto Serif Bengali", Georgia, serif; font-weight: 600; letter-spacing: .005em; }
h1 { font-size: 1.95rem; } h2 { font-size: 1.4rem; }
.card { background: var(--surface); border: 1px solid var(--line-soft); }
.btn, .icon-btn, .chip { background: var(--surface-2); border: 1px solid var(--line-soft); }
.btn:hover, .icon-btn:hover, .chip:hover { border-color: var(--line); box-shadow: var(--raise-sm); }
.input, select.input, textarea.input { background: var(--field); border: 1px solid var(--line); box-shadow: none; color: var(--ink); }
.input::placeholder { color: #7D7466; }
.input:focus { outline: 2px solid rgba(212, 175, 106, .45); }
.table td { background: var(--surface); }
.table tr.clickable:hover td { background: var(--surface-2); }
@media (max-width: 760px) { .table tr { background: var(--surface); box-shadow: var(--raise-sm); } }
.menu-list, .dialog, .slide, .rail.drawer { background: #14120F; border: 1px solid var(--line); }
.skel { background: linear-gradient(90deg, #1A1814 25%, #25211B 50%, #1A1814 75%); background-size: 200% 100%; }
.nav a { color: #D8CFBF; }
.nav a:hover { background: rgba(212, 175, 106, .08); color: var(--a-primary); }
.nav a[aria-current="page"] { background: var(--grad); color: var(--on-gold); }
.brand-mark img { width: 100%; height: 100%; border-radius: 14px; object-fit: contain; background: #0E0D0B; }

/* Risk badges & attention list */
.risk { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: help; white-space: nowrap; }
.risk.low { background: #DDF5EA; color: #11704B; } .risk.medium { background: #FFF1D6; color: #8A5A00; } .risk.high { background: #FBE1E3; color: #9E1D27; }
.flag { display: inline-block; background: #FBE1E3; color: #9E1D27; font-size: .75rem; font-weight: 700; border-radius: 8px; padding: 2px 8px; margin: 2px 4px 2px 0; }
.health ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.health li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: var(--raise-sm); font-size: .9rem; }
.health .led { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; background: #D64550; }
.health .led.ok { background: #1F9D6B; } .health .led.partial { background: #E0A92E; }
.card.health, .card.attention, .card.onboard { margin-bottom: 20px; }
.attention .att-group { margin-bottom: 16px; }
.attention h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 1rem; }
.attention h3 .n { background: var(--a-pink); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 9px; }
.att-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: var(--raise-sm); margin-bottom: 8px; color: inherit; text-decoration: none; }
.att-row .att-main { flex: 1 1 220px; min-width: 0; color: inherit; text-decoration: none; }
@media (max-width: 520px) { .hide-narrow { display: none; } }
.onboard { background: linear-gradient(135deg, var(--yellow), var(--peach)); }
.onboard ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.onboard li { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 14px; }
.onboard li .tick { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-weight: 700; flex: none; }
.onboard li.done .tick { background: #1F9D6B; color: #fff; }
.onboard li.done a { text-decoration: line-through; color: var(--ink-soft); }
.one-tap { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.call { background: #1F9D6B; color: #fff; } .btn.wa { background: #25D366; color: #fff; } .btn.warn { background: #FFF1D6; color: #8A5A00; }
.gate { border-radius: 14px; padding: 10px 14px; font-weight: 600; margin: 8px 0; }
.gate.ok { background: #DDF5EA; color: #11704B; } .gate.no { background: #FFF1D6; color: #8A5A00; }
.cert-row { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 12px; border-radius: 16px; box-shadow: var(--inset); margin-bottom: 10px; }
@media (min-width: 640px) { .cert-row { grid-template-columns: 1.2fr 1fr 1fr 1fr 44px; align-items: end; } }
.cert-row .field { margin: 0; }
.cert-doc { font-size: .82rem; }
.cert-doc.missing { color: var(--bad); font-weight: 700; }
.variant { background: #fff; }
@media (min-width: 640px) { .variant { grid-template-columns: 1.45fr .9fr 1fr 1.45fr 72px 90px 44px; } }
.bulkbar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 18px; box-shadow: var(--raise); margin-top: 12px; }
.bulkbar .btn { min-height: 40px; }
.help details { background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: var(--raise-sm); margin-bottom: 10px; }
.help summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.qr { background: #fff; padding: 12px; border-radius: 16px; display: inline-block; }
.otp-code { letter-spacing: .3em; font-size: 1.3rem; text-align: center; font-weight: 700; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.bar { height: 8px; border-radius: 8px; box-shadow: var(--inset); overflow: hidden; margin: 4px 0; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--grad); }
a.chip { text-decoration: none; color: inherit; }
/* Category Active / Inactive switch */
.tree-item > .row { flex-wrap: wrap; }
.tree-item.is-off > .row { opacity: .72; background: repeating-linear-gradient(135deg, #f4f1f8, #f4f1f8 8px, #fbfafc 8px, #fbfafc 16px); }
.cat-path { display: block; font-weight: 400; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: #ECE8F3; color: #5B5470; font-weight: 700; font-size: .85rem; cursor: pointer; }
.switch .knob { width: 38px; height: 22px; border-radius: 999px; background: #C9C2D8; position: relative; transition: background .15s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch[aria-checked="true"] { background: #DDF5EA; color: #11704B; }
.switch[aria-checked="true"] .knob { background: #1F9D6B; }
.switch[aria-checked="true"] .knob::after { transform: translateX(16px); }
.switch:disabled { cursor: progress; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .switch .knob, .switch .knob::after { transition: none; } }
/* Banners & logo page */
.logo-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.logo-preview { width: 96px; height: 96px; border-radius: 22px; background: #fff; box-shadow: var(--raise-sm); display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-preview img { width: 84px; height: 84px; object-fit: contain; }
.pill.offer { background: #FFE9D6; color: #8A4A00; } .pill.marketing { background: #E3EEFF; color: #1D4F91; } .pill.popup { background: #F6E3FF; color: #6B2A8F; } .pill.hero { background: #DDF5EA; color: #11704B; }

/* ---------- Luxe dark theme: overrides for the light-surface rules above ---------- */
body { -webkit-font-smoothing: antialiased; }
.side { border-right: 1px solid var(--line); box-shadow: 10px 0 30px -18px rgba(0, 0, 0, .8); }
.brand b { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { background: rgba(212, 175, 106, .12); border: 1px solid var(--line); color: var(--a-primary); box-shadow: none; }
.nav-group { color: var(--a-primary); opacity: .7; }
.nav a .count { background: var(--a-pink); }
.collapse-btn { background: rgba(212, 175, 106, .08); color: var(--ink); }
.topbar { background: rgba(15, 14, 12, .9); border-bottom: 1px solid var(--line-soft); }
.btn.primary, .chip[aria-pressed="true"], .pipeline span.done, .avatar, .images figure .first, .login-card .brand-mark { background: var(--grad); color: var(--on-gold); border-color: transparent; }
.btn.primary { box-shadow: 0 10px 24px -12px rgba(212, 175, 106, .55); }
.btn.danger { background: #7A2430; border-color: #7A2430; color: #FFE3E6; box-shadow: none; }
.btn.call { background: #1F6B4B; color: #E6FFF2; } .btn.wa { background: #1E9E55; color: #fff; } .btn.warn { background: #3A2E14; color: #F0C069; }
.icon-btn .dot { background: var(--a-pink); }
.chip .n { background: rgba(255, 255, 255, .08); }
.chip[aria-pressed="true"] .n { background: rgba(0, 0, 0, .15); }
/* Metallic stat cards */
.kpi { background: linear-gradient(150deg, #211E18 0%, #15130F 60%, #1B1813 100%); border: 1px solid var(--line); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .8; }
.kpi .ico { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000)); color: var(--on-gold); box-shadow: 0 10px 20px -10px var(--c); }
.kpi .value { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2rem; font-weight: 600; color: #FBF4E6; }
.kpi .bar { background: #0F0E0C; }
.top-item img, .thumb, .images img, .pv-img { background: #0B0A08; }
.pill { background: rgba(255, 255, 255, .06); color: var(--ink-soft); }
.pill.pending, .pill.flagged, .pill.draft, .pill.refunded, .pill.partially_refunded { background: rgba(224, 169, 74, .14); color: #F0C069; }
.pill.confirmed { background: rgba(165, 139, 219, .16); color: #C9B8F2; } .pill.packed { background: rgba(219, 108, 140, .16); color: #F2A6BD; }
.pill.shipped { background: rgba(126, 162, 224, .16); color: #AFC7F2; }
.pill.delivered, .pill.paid, .pill.approved, .pill.active, .pill.hero { background: rgba(79, 181, 140, .15); color: #86D8B0; }
.pill.cancelled, .pill.returned, .pill.failed, .pill.rejected, .pill.blocked { background: rgba(224, 98, 107, .15); color: #F29AA1; }
.pill.archived, .pill.inactive { background: rgba(255, 255, 255, .05); color: var(--ink-soft); }
.pill.offer { background: rgba(224, 169, 74, .14); color: #F0C069; } .pill.marketing { background: rgba(126, 162, 224, .16); color: #AFC7F2; } .pill.popup { background: rgba(165, 139, 219, .16); color: #C9B8F2; }
.error-box { background: rgba(224, 98, 107, .12); color: #F6B3B8; border: 1px solid rgba(224, 98, 107, .3); }
.search-results a, .notif a { background: var(--surface-2); color: var(--ink); }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-3); }
.online .avatar::after { border-color: var(--a-bg); }
.overlay-scrim, .scrim { background: rgba(0, 0, 0, .6); }
.slide footer { box-shadow: 0 -1px 0 var(--line-soft); }
.toast { background: #26221C; color: var(--ink); border: 1px solid var(--line); }
.toast.ok { background: #16372A; color: #A6EBC8; } .toast.err { background: #3F171C; color: #F6B3B8; }
.pipeline span.bad { background: #7A2430; color: #FFE3E6; }
.history li::before { background: var(--a-primary); }
.variant { background: var(--surface-2); }
.tree-item > .row { background: var(--surface-2); }
.tree-item.is-off > .row { background: repeating-linear-gradient(135deg, #1A1814, #1A1814 8px, #15130F 8px, #15130F 16px); }
.tree-item.drop-before > .row { box-shadow: 0 -3px 0 var(--a-primary); }
.tree-item.drop-inside > .row { outline-color: var(--a-primary); }
.switch { background: rgba(255, 255, 255, .06); color: var(--ink-soft); }
.switch .knob { background: #3A352D; }
.switch[aria-checked="true"] { background: rgba(79, 181, 140, .15); color: #86D8B0; }
.switch[aria-checked="true"] .knob { background: var(--ok); }
.logo-preview { background: #0B0A08; border: 1px solid var(--line); }
.risk.low { background: rgba(79, 181, 140, .15); color: #86D8B0; } .risk.medium { background: rgba(224, 169, 74, .14); color: #F0C069; } .risk.high { background: rgba(224, 98, 107, .15); color: #F29AA1; }
.flag { background: rgba(224, 98, 107, .15); color: #F29AA1; }
.health li, .att-row, .help details { background: var(--surface-2); border: 1px solid var(--line-soft); }
.health .led { background: var(--bad); } .health .led.ok { background: var(--ok); } .health .led.partial { background: var(--warn); }
.attention h3 .n { background: var(--a-pink); }
.onboard { background: linear-gradient(135deg, #2A2416, #1B1712); border: 1px solid var(--line); }
.onboard li { background: var(--surface-2); }
.onboard li .tick { background: #332D24; }
.onboard li.done .tick { background: var(--ok); color: #0F0E0C; }
.gate.ok { background: rgba(79, 181, 140, .15); color: #86D8B0; } .gate.no { background: rgba(224, 169, 74, .14); color: #F0C069; }
.bulkbar { background: #26221C; color: var(--ink); border: 1px solid var(--line); }
.cert-doc.missing { color: #F29AA1; }
.pv-badge { background: #7D1B32; } .pv-badge.pv-free { background: #1F6B4B; }
.pv-dot { border-color: rgba(255, 255, 255, .2); }
.login-wrap { background: radial-gradient(1000px 500px at 10% -10%, rgba(212, 175, 106, .14), transparent), radial-gradient(900px 500px at 110% 110%, rgba(125, 27, 50, .25), transparent), var(--a-bg); }
.login-card { border: 1px solid var(--line); }
/* The QR code, invoice and shipping label stay black-on-white so they scan and print correctly. */
.qr { background: #fff; }
.m-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 4px; border: 1px solid rgba(255, 255, 255, .2); }
.picker { display: grid; gap: 8px; max-height: 340px; overflow: auto; padding: 4px; border-radius: 14px; box-shadow: var(--inset); }
.picker label { display: grid; grid-template-columns: 22px 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; cursor: pointer; }
.picker label:hover { background: var(--surface-2); }
.picker label:has(input:checked) { background: rgba(212, 175, 106, .1); outline: 1px solid var(--line); }
.picker img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #0B0A08; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.picked span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(212, 175, 106, .12); color: var(--a-primary); font-size: .82rem; }
