/* DokanPilot design system ------------------------------------------------ */
:root {
  --brand: #3b5bdb; --brand-600: #3049c4; --brand-50: #eef2ff; --brand-100: #dbe4ff;
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #f8fafc;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --line-2: #eef2f7;
  --green: #0f9f6e; --green-50: #e7f8f1; --amber: #c2610c; --amber-50: #fff4e6;
  --red: #d92d4b; --red-50: #fdecef; --violet: #7048e8; --violet-50: #f1ecff; --blue-50: #e8f1ff; --blue: #1c6fd8;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
  --font: "Inter", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5c7cfa; --brand-600: #4c6ef5; --brand-50: #1b2342; --brand-100: #25305a;
    --bg: #0b1020; --surface: #121a2e; --surface-2: #0f1628;
    --ink: #e7ecf6; --ink-2: #c3cbe0; --muted: #8b96b0; --line: #222c45; --line-2: #1a2238;
    --green-50: #0f2e25; --amber-50: #33240f; --red-50: #3a1520; --violet-50: #241b45; --blue-50: #15264a;
    --green: #34d399; --amber: #fbbf24; --red: #fb7185; --violet: #a78bfa; --blue: #60a5fa;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:lang(bn) { --font: "Hind Siliguri", "Inter", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink, var(--brand)); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.02rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.i { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 2px; border-radius: 6px; }

/* Buttons & inputs --------------------------------------------------------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 var(--font); padding: 11px 16px; min-height: 42px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
}
button:hover, .button:hover { border-color: #cbd5e1; text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand, #fff); box-shadow: 0 1px 2px rgba(15, 23, 42, .15); }
.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.ghost { background: transparent; }
.ghost:hover { background: var(--surface-2); }
.danger { color: var(--red); }
.sm { padding: 7px 11px; min-height: 34px; font-size: .85rem; }
.lg { padding: 14px 20px; min-height: 50px; font-size: 1rem; }
.block { width: 100%; }
.icon-btn { padding: 8px; min-height: 0; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row form { display: contents; }

label { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
textarea { resize: vertical; }
.stack > * + * { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }

/* Cards --------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 .i { color: var(--muted); }
.card-head.pad { padding: 16px 18px 4px; margin: 0; }
.card-head + .card-head { margin-top: 8px; }
.more { font-size: .88rem; font-weight: 600; }
.link-card { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; }
.link-card:hover { text-decoration: none; border-color: var(--brand-100); }
.link-card .i { color: var(--brand); }
.link-card .chev { margin-left: auto; color: var(--muted); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.sub { color: var(--muted); margin: 6px 0 0; }
.crumb { display: inline-block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); }

/* Badges -------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); line-height: 1.6; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-confirmed, .st-packed, .plan-trial-soft { background: var(--blue-50); color: var(--blue); }
.st-shipped, .risk-medium, .plan-trial { background: var(--amber-50); color: var(--amber); }
.st-delivered, .risk-trusted, .plan-active { background: var(--green-50); color: var(--green); }
.st-returned, .st-cancelled, .risk-high, .plan-expired { background: var(--red-50); color: var(--red); }
.risk-new { background: var(--violet-50); color: var(--violet); }

/* Alerts, toasts, banners -------------------------------------------------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; }
.alert.error { background: var(--red-50); color: var(--red); }
.toast {
  position: fixed; z-index: 50; left: 50%; top: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg);
  font-size: .92rem; cursor: pointer; animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s;
}
.toast.ok .i { color: #4ade80; }
.toast.error { background: var(--red); color: #fff; }
.toast.hide { opacity: 0; transform: translate(-50%, -12px); pointer-events: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 20px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.banner.warn { background: var(--amber-50); color: var(--amber); }
.banner.danger { background: var(--red-50); color: var(--red); }
.banner .i { margin-top: 2px; }

/* App shell ---------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.logo { width: 30px; height: 30px; flex: none; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-2); }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.lang-switch a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
}
.sidebar .brand { padding: 0 6px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; }
.sidebar nav a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar nav a.on { background: var(--brand-50); color: var(--brand-ink, var(--brand)); font-weight: 600; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.plan-chip { display: block; padding: 8px 12px; border-radius: 10px; font-size: .8rem; font-weight: 600; }
.plan-chip:hover { text-decoration: none; filter: brightness(.97); }
.who { display: flex; align-items: center; gap: 10px; padding: 6px; min-width: 0; }
.who div { min-width: 0; }
.who b, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { font-size: .9rem; }
.side-row { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }

.content { margin-left: var(--sidebar); padding: 28px 32px 48px; max-width: calc(1120px + var(--sidebar)); }
body.app .banner { margin-left: var(--sidebar); }
.mobile-top, .bottom-nav, .only-sm { display: none; }

.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .85rem;
}

/* Dashboard ---------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.kpi:hover { text-decoration: none; border-color: var(--brand-100); }
.kpi-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 8px; }
.kpi-label { font-size: .82rem; color: var(--muted); }
.kpi strong { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.tone-blue { background: var(--blue-50); color: var(--blue); }
.tone-violet { background: var(--violet-50); color: var(--violet); }
.tone-green { background: var(--green-50); color: var(--green); }
.tone-amber { background: var(--amber-50); color: var(--amber); }
.tone-red { background: var(--red-50); color: var(--red); }
.bar { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.seg { min-width: 6px; background: var(--line); }
.seg.st-pending { background: #94a3b8; }
.seg.st-confirmed, .seg.st-packed { background: var(--blue); }
.seg.st-shipped { background: var(--amber); }
.seg.st-delivered { background: var(--green); }
.seg.st-returned, .seg.st-cancelled { background: var(--red); }
.pipeline { display: flex; flex-wrap: wrap; gap: 8px; }
.pipeline a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.pipeline a:hover { text-decoration: none; background: var(--surface-2); }

/* Lists -------------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line-2); }
.row-link { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--ink); }
.row-link:hover { background: var(--surface-2); text-decoration: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main b { font-weight: 600; }
.row-main small, .row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-side b { font-weight: 700; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.chip:hover { text-decoration: none; border-color: #cbd5e1; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.search { position: relative; margin-bottom: 16px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { margin: 0; padding-left: 42px; background: var(--surface); }

.empty { text-align: center; padding: 48px 24px; }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand); margin-bottom: 14px; }
.empty-icon .i { width: 26px; height: 26px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 380px; margin: 0 auto 18px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
form.pay { display: flex; flex-wrap: wrap; gap: 6px; }
form.pay input, form.pay select { width: auto; flex: 1 1 70px; margin: 0; padding: 7px 9px; font-size: .88rem; }

/* New order form ----------------------------------------------------------- */
.order-form { max-width: 760px; padding-bottom: 90px; }
.risk-box { padding: 10px 12px; border-radius: var(--radius-sm); margin: -6px 0 14px; font-size: .88rem; font-weight: 500; }
.seg-control { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seg-opt { margin: 0; position: relative; }
.seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg-opt input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.seg-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-100); }
.item { display: grid; grid-template-columns: 1fr 76px 110px; gap: 8px; margin-bottom: 8px; }
.item input { margin: 0; }
.item.head { font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.sticky-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 12px 12px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.sum { display: flex; flex-direction: column; font-size: .88rem; color: var(--muted); }
.sum b { color: var(--ink); font-size: 1.05rem; }
.sum .cod b { color: var(--brand); font-size: 1.2rem; }

/* Order detail ------------------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail-side { position: sticky; top: 20px; }
.stepper { display: flex; list-style: none; margin: 0; padding: 0; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--brand); }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); color: var(--on-brand, #fff); }
.step-dot .i { width: 14px; height: 14px; stroke-width: 3; }
.done .step-dot { background: var(--brand); border-color: var(--brand); }
.current .step-dot { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-50); }
.step-label { font-size: .78rem; font-weight: 500; color: var(--muted); }
.done .step-label, .current .step-label { color: var(--ink); font-weight: 600; }
.stepper.ended { opacity: .45; }
.ended-note { text-align: center; margin: 12px 0 0; }

.person { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.person b { display: block; font-size: 1.02rem; }
.phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.phone .i { width: 15px; height: 15px; }
.addr { color: var(--ink-2); }
.note { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }
.lines { list-style: none; margin: 0 0 12px; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.lines small { display: block; color: var(--muted); }
.totals-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; }
.totals-list dt { color: var(--muted); }
.totals-list dd { margin: 0; text-align: right; font-weight: 500; }
.totals-list .strong { color: var(--ink); font-weight: 700; }
.totals-list .due { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 1.08rem; }
.totals-list dd.due { color: var(--brand); }
.action-card .label { margin: 14px 0 8px; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.tpl + .tpl { margin-top: 14px; }
.tpl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tpl-head form { margin: 0; }
.tpl textarea { margin: 0; font-size: .9rem; background: var(--surface-2); }
.copy.copied { color: var(--green); border-color: var(--green); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 16px; }
.tpl-body { white-space: pre-wrap; color: var(--ink-2); font-size: .92rem; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: var(--line-2); }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex: none; }
.timeline small { display: block; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.mini-stats div { padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.mini-stats span { display: block; font-size: .78rem; color: var(--muted); }
.mini-stats b { font-size: 1.15rem; }

/* Public pages ------------------------------------------------------------- */
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; max-width: 1160px; margin: 0 auto; }
.public-actions { display: flex; align-items: center; gap: 10px; }
.public-main { max-width: 1160px; margin: 0 auto; padding: 0 24px 48px; }
.auth { max-width: 440px; margin: 40px auto; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .sub { margin-bottom: 18px; }
.auth-alt { text-align: center; color: var(--muted); }
.trial-pill { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--green-50); color: var(--green); font-weight: 500; font-size: .9rem; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding: 40px 0 24px; }
.eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.15; letter-spacing: -.025em; margin-bottom: 16px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 540px; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.fine { color: var(--muted); font-size: .88rem; margin: 0; }
.hero-shot { display: flex; justify-content: center; }
.device { width: min(300px, 80vw); border-radius: 36px; padding: 10px; background: #0f172a; box-shadow: var(--shadow-lg), 0 30px 60px rgba(59, 91, 219, .18); }
.device img { display: block; width: 100%; height: 540px; object-fit: cover; object-position: top; border-radius: 28px; background: var(--surface); }
.section { padding: 40px 0; }
.section.narrow { max-width: 720px; margin: 0 auto; }
.section-title { font-size: 1.6rem; text-align: center; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-num { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--brand); color: var(--on-brand, #fff); font-weight: 700; }
.steps p { margin: 4px 0 0; }
.price-card { max-width: 400px; margin: 0 auto; padding: 28px; border-radius: 20px; background: var(--surface); border: 2px solid var(--brand); box-shadow: var(--shadow-lg); text-align: center; }
.price-card h3 { margin: 14px 0 4px; font-size: 1.1rem; }
.price { margin: 0 0 18px; }
.price b { font-size: 3rem; letter-spacing: -.03em; }
.price span { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; }
.checks li { display: flex; gap: 10px; padding: 7px 0; }
.checks .i { color: var(--green); margin-top: 3px; }
.price-card .fine { margin-top: 12px; }
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary { padding: 16px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px 0 8px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 24px; }
.footer .logo { width: 22px; height: 22px; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1080px) { .detail { display: flex; flex-direction: column; align-items: stretch; gap: 16px; } .detail-main, .detail-side { display: contents; } .detail .card { margin: 0; } .action-card { order: 1; } .o-customer { order: 2; } .o-items { order: 3; } .o-courier { order: 4; } .o-replies { order: 5; } .o-history { order: 6; } .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .content, body.app .banner { margin-left: 0; }
  .content { padding: 16px 16px 110px; }
  .mobile-top {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .mobile-top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px 6px max(8px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: .7rem; font-weight: 500; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.on { color: var(--brand); font-weight: 600; }
  .bottom-nav .i { width: 22px; height: 22px; }
  .bottom-nav .fab { justify-self: center; width: 56px; height: 56px; margin-top: -26px; padding: 0; justify-content: center; border-radius: 18px; background: var(--brand); color: var(--on-brand, #fff); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 40%, transparent); }
  .bottom-nav .fab .i { width: 26px; height: 26px; stroke-width: 2.4; }
  .hide-sm { display: none !important; }
  .only-sm { display: block; margin-top: 8px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpis .kpi:first-child { grid-column: span 2; }
  .kpi strong { font-size: 1.25rem; }
  .page-head { margin-bottom: 14px; align-items: center; }
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; border-radius: 12px; }
  .row-link { padding: 12px 14px; gap: 12px; }
  .sticky-bar { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 16px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .device img { height: 460px; }
  .steps { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .public-top, .public-main { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr 58px 88px; }
  .stepper .step-label { font-size: .68rem; }
  .avatar { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Shop branding ------------------------------------------------------------ */
.shop-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-logo { width: 34px; height: 34px; flex: none; border-radius: 9px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.shop-initials { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--brand); color: var(--on-brand, #fff); font-weight: 700; font-size: .85rem; }
.shop-initials.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 1.4rem; }
.powered { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 6px; font-size: .72rem; color: var(--muted); }
.powered .logo { width: 14px; height: 14px; }
.label { display: block; margin: 0 0 10px; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.brand-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; margin-top: 8px; }
.logo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.logo-preview { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; border: 1px dashed var(--line); background: var(--surface-2); overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-actions form { margin: 0; }
.file-btn { position: relative; margin: 0; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.i.flip { transform: rotate(180deg); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.swatch { position: relative; margin: 0; cursor: pointer; }
.swatch input[type=radio] { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .1s; }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sw); transform: scale(1.05); }
.swatch input:focus-visible + span { outline: 3px solid var(--brand-100); outline-offset: 4px; }
.swatch.custom { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: conic-gradient(#e03131, #f59f00, #2f9e44, #1c7ed6, #9c36b5, #e03131); }
.swatch.custom input[type=color] { position: absolute; inset: -6px; width: 46px; height: 46px; padding: 0; border: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch.custom:has(input[type=radio]:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.brand-preview { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 16px; }
.pv-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-chip { padding: 8px 12px; border-radius: 10px; background: var(--p-50); color: var(--p-brand); font-weight: 600; font-size: .88rem; }
.pv-btn { padding: 10px 16px; border-radius: 10px; background: var(--p-brand); color: var(--p-on); font-weight: 600; font-size: .9rem; }
@media (max-width: 900px) { .brand-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Analytics ---------------------------------------------------------------- */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-grid .card { margin: 0; }
.span-2 { grid-column: span 2; }
.no-data { margin: 8px 0 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--brand-ink, var(--brand)); }
.chart .col:hover .bar { fill: var(--brand-600); }
.chart .hit { fill: transparent; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart text { font: 500 13px var(--font); fill: var(--muted); }
.chart .val { fill: var(--ink); font-weight: 700; }
.barlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bl-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 5px; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bl-track { display: block; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bl-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand-ink, var(--brand)); }
.bl-fill.warn { background: var(--red); }
.barlist small { display: block; margin-top: 3px; font-size: .78rem; }
.section-head { margin: 28px 0 14px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.section-head .i { color: var(--amber); }
.stat-stack { display: flex; flex-direction: column; gap: 14px; }
.stat-stack div { display: flex; flex-direction: column; }
.stat-stack span { font-size: .8rem; color: var(--muted); }
.stat-stack b { font-size: 1.35rem; letter-spacing: -.02em; }
.mini-stats.two { grid-template-columns: 1fr 1fr; margin-top: 0; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.rank a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rank-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-50); color: var(--brand-ink, var(--brand)); font-size: .75rem; font-weight: 700; }
.heat { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; margin-bottom: 10px; }
.heat-row { display: grid; grid-template-columns: 44px repeat(8, minmax(30px, 1fr)); gap: 4px; }
.heat-row.head span { font-size: .72rem; color: var(--muted); text-align: center; }
.heat-day { font-size: .78rem; color: var(--muted); align-self: center; }
.cell { height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: .72rem; font-weight: 600;
  background: color-mix(in srgb, var(--brand-ink, var(--brand)) var(--a), var(--line-2)); color: var(--ink); }
.cell[style*="--a:6"], .cell[style*="--a:7"], .cell[style*="--a:8"], .cell[style*="--a:9"], .cell[style*="--a:100"] { color: var(--on-brand, #fff); }
.locked { position: relative; }
.locked-preview { filter: blur(6px) saturate(.6); opacity: .55; pointer-events: none; user-select: none; }
.locked-cta { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); text-align: center; padding: 28px; box-shadow: var(--shadow-lg); }
.locked-cta .empty-icon { background: var(--amber-50); color: var(--amber); }
.locked-cta h3 { margin-bottom: 8px; font-size: 1.15rem; }
.locked-cta p { color: var(--muted); margin-bottom: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } .locked-cta { top: 24px; } }
.install-btn[hidden], .install-done[hidden], .install-manual[hidden] { display: none !important; }
.install-done { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; margin: 0; }
.install-card .install-btn { margin-bottom: 10px; }
.side-foot .install-btn { justify-content: flex-start; }

/* Screenshot import -------------------------------------------------------- */
.ai-card { border-style: dashed; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand-50) 40%, var(--surface)); padding-bottom: 12px; }
.order-form.ai-card { padding-bottom: 12px; margin-bottom: 16px; }
.dropzone { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-sm); border: 2px dashed var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-50); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 74px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .75); color: #fff; font-size: 16px; line-height: 1; }
.ai-actions[hidden] { display: none; }
.ai-status { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; }
.ai-status[hidden] { display: none; }
.ai-status.loading { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); }
.ai-status.ok { background: var(--green-50); color: var(--green); }
.ai-status.error { background: var(--red-50); color: var(--red); }
.ai-status ul { margin: 4px 0 0; padding-left: 18px; color: var(--amber); }
.ai-warn-title { margin: 8px 0 0; color: var(--amber); font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-filled { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); background: color-mix(in srgb, var(--brand-50) 55%, var(--surface)); }
.fine-print { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.fine-print .i { width: 14px; height: 14px; }

/* Plans -------------------------------------------------------------------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.plan-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.plan-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan-card.current { background: var(--green-50); border-color: var(--green); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-card .price { margin: 8px 0 12px; }
.plan-card .price b { font-size: 2.2rem; }
.plan-card .checks { margin-bottom: 14px; }
.tier-pro { background: var(--violet-50); color: var(--violet); }
.pay-note { margin: 14px 0 0; }
.ai-locked { border-style: solid; }
#plan .plans { margin: 0; max-width: none; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plans + .fine { display: block; text-align: center; margin-top: 16px; }

/* Monthly report ----------------------------------------------------------- */
.kpi.static { cursor: default; }
.kpi .delta { font-size: .8rem; font-weight: 600; color: var(--muted); }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--red); }
.open-note { margin: -6px 0 16px; }
.report-link { margin-top: 4px; }
.analysis .verdict { font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.analysis .summary { color: var(--ink-2); font-size: 1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.an-box { padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line-2); }
.an-box h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .95rem; }
.an-box ul { margin: 0; padding-left: 18px; }
.an-box li + li { margin-top: 6px; }
.an-box p { margin: 0; color: var(--ink-2); }
.an-box.good { background: var(--green-50); border-color: transparent; }
.an-box.good h3 { color: var(--green); }
.an-box.warn { background: var(--amber-50); border-color: transparent; }
.an-box.warn h3 { color: var(--amber); }
.an-h { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; }
.an-h .i { color: var(--amber); }
.an-actions { margin: 0; padding: 0; list-style: none; counter-reset: act; display: flex; flex-direction: column; gap: 10px; }
.an-actions li { counter-increment: act; position: relative; padding: 14px 14px 14px 52px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.an-actions li::before { content: counter(act); position: absolute; left: 14px; top: 13px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand, #fff); font-weight: 700; font-size: .85rem; }
.an-actions p { margin: 4px 0 0; color: var(--ink-2); }
.target { padding: 16px; border-radius: var(--radius-sm); background: var(--brand-50); }
.target b { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.target p { margin: 0; color: var(--ink-2); }
.an-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.ai-gen { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty.compact { padding: 20px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
@media print {
  .sidebar, .mobile-top, .bottom-nav, .banner, .no-print, .toast, .crumb, .ai-gen, .report-link { display: none !important; }
  .content { margin: 0 !important; padding: 0 !important; max-width: none; }
  body { background: #fff; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* Add-on services ---------------------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.svc-grid .card { margin: 0; display: flex; flex-direction: column; }
.svc-card h2 { font-size: 1.15rem; margin: 12px 0 6px; }
.svc-card .checks { flex: 1; }
.svc-top { display: flex; align-items: center; justify-content: space-between; }
.svc-top .feature-icon { margin: 0; }
.svc-new { background: var(--blue-50); color: var(--blue); }
.svc-contacted, .svc-in_progress { background: var(--amber-50); color: var(--amber); }
.svc-done { background: var(--green-50); color: var(--green); }
.svc-cancelled { background: var(--red-50); color: var(--red); }
.row-link.static:hover { background: none; }
.pad-x { padding: 0 18px 18px; }
.promo-card { display: flex; align-items: center; gap: 14px; color: var(--ink); background: linear-gradient(120deg, var(--brand-50), var(--surface)); }
.promo-card:hover { text-decoration: none; border-color: var(--brand-100); }
.promo-card .feature-icon { margin: 0; }
.promo-card b { display: block; }
.promo-card small { color: var(--muted); }
.promo-card .chev { margin-left: auto; color: var(--muted); }
.svc-form { max-width: 720px; }
.svc-admin .card { margin-bottom: 12px; }
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } }

/* Low-effort entry ---------------------------------------------------------- */
.paste-card { padding: 0; }
.paste-card summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; cursor: pointer; list-style: none; }
.paste-card summary::-webkit-details-marker { display: none; }
.paste-card summary span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.paste-card summary span .i { color: var(--brand-ink, var(--brand)); }
.paste-card textarea { margin: 0 18px 12px; width: calc(100% - 36px); }
.paste-card #paste-status { margin: -4px 18px 14px; }
.quick-products { flex-wrap: wrap; overflow: visible; margin-bottom: 14px; }
.quick-products .chip { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font: inherit; font-size: .85rem; }
.quick-products .chip .i { width: 14px; height: 14px; color: var(--brand-ink, var(--brand)); }
.quick-products .chip b { color: var(--muted); font-weight: 600; }
.chip.pulse { background: var(--brand-50); border-color: var(--brand); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sm-chip { padding: 4px 10px; font-size: .78rem; min-height: 0; cursor: pointer; font-family: inherit; }
.sm-chip.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand-ink, var(--brand)); font-weight: 600; }
.save-btns { display: flex; gap: 8px; }
.bulk-head { padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.sel-row { display: flex; align-items: center; }
.row-check { padding-left: 18px; }
.sel-row .row-link { flex: 1; min-width: 0; padding-left: 12px; }
.sel-row.picked { background: var(--brand-50); }
.bulk-bar { position: fixed; bottom: 20px; left: calc(var(--sidebar) + 32px); right: 32px; max-width: 1056px; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.bulk-bar[hidden] { display: none; }
.setup-card .setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.setup-steps a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .92rem; }
.setup-steps a:hover { text-decoration: none; border-color: var(--brand); }
.setup-steps .step-dot { width: 24px; height: 24px; border-width: 2px; }
.setup-steps li.done a { color: var(--muted); text-decoration: line-through; }
.setup-steps li.done .step-dot { background: var(--green); border-color: var(--green); }
.setup-steps .chev { margin-left: auto; color: var(--muted); }
@media (max-width: 900px) {
  .bulk-bar { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .setup-card .setup-steps { grid-template-columns: 1fr; }
  .sticky-bar { flex-wrap: wrap; }
  .save-btns { width: 100%; }
  .save-btns button { flex: 1; padding-left: 10px; padding-right: 10px; }
}
#bulk-form.has-picks { padding-bottom: 140px; }
@media (max-width: 900px) { #bulk-form.has-picks { padding-bottom: 170px; } }

/* Inside / outside Dhaka address -------------------------------------------- */
.zone-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.zone-opt { margin: 0; position: relative; }
.zone-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.zone-opt span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.zone-opt span .i { color: var(--muted); margin-bottom: 4px; }
.zone-opt b { font-size: .98rem; color: var(--ink); }
.zone-opt small { color: var(--muted); font-size: .8rem; }
.zone-opt input:checked + span { border-color: var(--brand); background: var(--brand-50); }
.zone-opt input:checked + span .i, .zone-opt input:checked + span b { color: var(--brand-ink, var(--brand)); }
.zone-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-100); }
.zone-fields[hidden] { display: none; }
.delivery-note { display: block; margin-top: 4px; font-weight: 400; }

/* Products ----------------------------------------------------------------- */
.prod-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr auto; gap: 0 12px; align-items: end; }
.prod-grid > button, .prod-grid > .btn-row { margin-bottom: 14px; }
.prod-grid.edit { padding: 4px 18px 6px; grid-template-columns: 2fr 1.5fr 1fr 1fr; }
.prod-grid.edit .btn-row { grid-column: 1 / -1; }
.prod-row details summary { display: flex; align-items: center; gap: 14px; padding: 12px 18px; cursor: pointer; list-style: none; }
.prod-row details summary::-webkit-details-marker { display: none; }
.prod-row details[open] summary { background: var(--surface-2); }
.prod-row .row-side small { font-size: .75rem; }
.prod-row.off { opacity: .55; }
.prod-group .card-head.pad { padding-bottom: 8px; }
@media (max-width: 760px) {
  .prod-grid, .prod-grid.edit { grid-template-columns: 1fr 1fr; }
  .prod-grid label:first-child { grid-column: 1 / -1; }
  .prod-grid > button { grid-column: 1 / -1; }
}

/* Finance ------------------------------------------------------------------ */
.fin-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; padding-bottom: 4px; }
.fin-filters label { flex: 1 1 150px; }
.fin-filters label[hidden] { display: none; }
.fin-filters .btn-row { margin-bottom: 14px; }
.fin-range { margin: -6px 0 14px; }
.fin-kpis { grid-template-columns: repeat(6, 1fr); }
.coverage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--amber-50); color: var(--amber); font-size: .88rem; margin: -4px 0 16px; }
.coverage .i { width: 16px; height: 16px; }
.pl-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.pl-row span { color: var(--ink-2); }
.pl-row.minus b { color: var(--red); font-weight: 500; }
.pl-row.plus b { color: var(--green); font-weight: 500; }
.pl-row.sub span { padding-left: 12px; font-size: .88rem; }
.pl-row.pl-sum { border-bottom: 1px solid var(--line); }
.pl-row.pl-sum span, .pl-row.pl-sum b { color: var(--ink); font-weight: 700; }
.pl-row.total { border: 0; margin-top: 6px; padding: 12px; border-radius: var(--radius-sm); background: var(--green-50); }
.pl-row.total span, .pl-row.total b { color: var(--green); font-weight: 700; font-size: 1.05rem; }
.pl-row.total.neg { background: var(--red-50); }
.pl-row.total.neg span, .pl-row.total.neg b { color: var(--red); }
.pl-card p.muted { margin: 10px 0 0; }
.fin-table td.neg { color: var(--red); }
.fin-table td:first-child { font-weight: 600; }
@media (max-width: 1200px) { .fin-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .fin-kpis { grid-template-columns: repeat(2, 1fr); } .fin-kpis .kpi:first-child { grid-column: auto; } }
.fin-trend { align-self: start; }

/* Voice order entry --------------------------------------------------------- */
.voice-row { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.mic-btn { flex: none; width: 64px; height: 64px; min-height: 0; padding: 0; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand, #fff); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.mic-btn svg { width: 28px; height: 28px; }
.mic-btn.on { background: var(--red); animation: mic-pulse 1.2s ease-in-out infinite; }
.mic-btn.off { background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); } 50% { box-shadow: 0 0 0 12px transparent; } }
.voice-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.voice-side b { font-size: 1rem; }
.voice-side small { font-size: .8rem; line-height: 1.45; }
.voice-card textarea { margin: 0 0 12px; }

/* One-tap replies ---------------------------------------------------------- */
.send-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.send-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 0; font: 600 .88rem var(--font); color: #fff; cursor: pointer; text-decoration: none; }
.send-btn:hover { text-decoration: none; filter: brightness(.95); }
.send-btn .i { width: 17px; height: 17px; }
.send-btn.wa { background: #1fa855; }
.send-btn.ms { background: #0866ff; }
.send-btn.share { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.send-btn[hidden] { display: none; }
.send-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--blue-50); color: var(--blue); font-size: .85rem; }
.contact-row { display: flex; gap: 8px; margin: 2px 0 10px; }
.chip.contact { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.chip.contact.wa .i { color: #1fa855; }
.chip.contact.ms .i { color: #0866ff; }
.chip.contact .i { width: 16px; height: 16px; }
.ms-form { display: flex; gap: 8px; margin: 0 0 10px; }
.ms-form input { margin: 0; padding: 7px 10px; font-size: .88rem; }
.ms-hint { margin: 12px 0 0; }
label.optional { color: var(--muted); }

/* Buyer tracking page ------------------------------------------------------ */
.track-body { background: var(--bg); }
.track { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 16px; }
.track-shop { display: flex; align-items: center; gap: 10px; min-width: 0; }
.track-shop img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.track-shop .shop-initials { width: 40px; height: 40px; }
.track-shop b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-lang { font-size: .85rem; font-weight: 600; }
.track-hero h1 { font-size: 1.5rem; margin: 2px 0 6px; color: var(--brand-ink, var(--brand)); }
.track-hero > p { margin-bottom: 4px; }
.track-steps { list-style: none; margin: 18px 0 0; padding: 0; }
.track-steps li:last-child { padding-bottom: 0; }
.track-steps + .button { margin-top: 16px; }
.track-steps li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.track-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.track-steps li.done::after { background: var(--brand); }
.ts-dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--line); background: var(--surface); color: var(--on-brand, #fff); }
.ts-dot svg { width: 14px; height: 14px; }
.track-steps .done .ts-dot { background: var(--brand); border-color: var(--brand); }
.track-steps .current .ts-dot { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-50); }
.ts-text { display: flex; flex-direction: column; padding-top: 3px; }
.ts-text b { font-weight: 500; color: var(--muted); }
.done .ts-text b, .current .ts-text b { color: var(--ink); font-weight: 600; }
.ts-text small { color: var(--muted); font-size: .8rem; }
.track-pay { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--brand); color: var(--on-brand, #fff); }
.track-pay b { font-size: 1.4rem; }
.track-pay.paid { background: var(--green-50); color: var(--green); }
.track-items { list-style: none; margin: 0 0 8px; padding: 0; }
.track-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.track-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 8px 0 0; font-size: .92rem; }
.track-sum dt { color: var(--muted); }
.track-sum dd { margin: 0; text-align: right; }
.track-sum .strong { color: var(--ink); font-weight: 700; }
.track-meta { display: grid; gap: 14px; }
.track-meta div { display: flex; flex-direction: column; }
.track-meta span { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.track-meta small { color: var(--muted); }
.track-wa { background: #1fa855; border-color: #1fa855; color: #fff; margin-bottom: 12px; }
.track-note { text-align: center; }
.track-foot { text-align: center; color: var(--muted); padding-top: 8px; }
.track-card .track-url { width: 100%; font-size: .85rem; font-family: ui-monospace, Menlo, monospace; text-overflow: ellipsis; margin-bottom: 10px; }
@media (max-width: 1080px) { .o-track { order: 1; } .action-card { order: 0; } }

/* Buyer SMS settings ------------------------------------------------------- */
.sms-card .banner { margin: 0 0 12px; }
.sms-events { display: grid; gap: 10px; }
.sms-ev { display: flex; gap: 12px; align-items: flex-start; padding: 12px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; }
.sms-ev:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.sms-ev input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.sms-ev-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sms-bubble { display: block; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.sms-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sms-buy { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sms-buy h3 { font-size: 1rem; margin: 0 0 10px; }
.sms-packs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sms-packs li { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.sms-packs span { font-size: 1.25rem; font-weight: 700; color: var(--brand-ink, var(--brand)); }
.sms-stats { margin: 12px 0 0; }
.sms-missed { color: var(--red); }
.sms-topup { margin-top: 8px; }

/* Inventory ---------------------------------------------------------------- */
.badge.stock-ok { background: var(--green-50); color: var(--green); }
.badge.stock-low { background: var(--amber-50); color: var(--amber); }
.badge.stock-out { background: var(--red-50); color: var(--red); }
.badge.stock-untracked { background: var(--bg); color: var(--muted); }
.chip-stock { font-size: .72rem; font-weight: 600; color: var(--green); }
.chip-stock.low { color: var(--amber); }
.chip-stock.out { color: var(--red); }
.inv-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.inv-kpis .kpi small { display: block; margin-top: 2px; font-size: .78rem; }
.inv-tabs { margin: 4px 0 14px; }
.inv-row details > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.inv-row details > summary::-webkit-details-marker { display: none; }
.inv-row .row-main { flex: 1; min-width: 0; }
.inv-count { display: flex; align-items: center; gap: 10px; }
.inv-count b { font-size: 1.3rem; min-width: 2ch; text-align: right; }
.inv-row.lvl-out .inv-count b { color: var(--red); }
.inv-row.lvl-low .inv-count b { color: var(--amber); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 4px 18px 18px; }
.inv-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); flex: 1 1 300px; }
.inv-form.inline { background: none; border: 0; padding: 0; flex: 0 1 auto; }
.inv-form label { flex: 1 1 110px; margin: 0; }
.inv-form-title { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.inv-form-title svg { width: 16px; height: 16px; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.inv-big { display: flex; flex-direction: column; gap: 4px; }
.inv-big b { font-size: 2.4rem; line-height: 1; }
.table.moves .num { text-align: right; white-space: nowrap; }
.table.moves .pos { color: var(--green); font-weight: 600; }
.table.moves .neg { color: var(--red); font-weight: 600; }
.low-card { margin-bottom: 16px; }
.low-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.low-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.prod-row .badge[class*="stock-"] { text-decoration: none; white-space: nowrap; }
button.danger { color: var(--red); }
@media (max-width: 1080px) { .inv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-head > .button, .page-head > a.button { white-space: nowrap; flex: none; }

/* Purchasing ---------------------------------------------------------------- */
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi small { display: block; margin-top: 2px; font-size: .78rem; }
.badge.pur-ordered { background: var(--amber-50); color: var(--amber); }
.badge.pur-received { background: var(--green-50); color: var(--green); }
.badge.pur-cancelled { background: var(--bg); color: var(--muted); }
.due-pos { color: var(--red); }
.due-adv { color: var(--green); font-size: .85rem; }
.item.po { grid-template-columns: minmax(0, 1fr) 90px 120px; }
.po-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 6px; border-top: 1px solid var(--line); margin-top: 8px; }
.po-total b { font-size: 1.6rem; }
#po-pay-all { margin: -4px 0 12px; }
.po-sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 14px 18px 18px; margin: 0; max-width: 360px; margin-left: auto; }
.po-sum dt { color: var(--muted); }
.po-sum dd { margin: 0; text-align: right; }
.po-sum .strong { color: var(--ink); font-weight: 700; }
.table .num { text-align: right; white-space: nowrap; }
.po-actions p { margin-top: 0; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.add-card > summary { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; list-style: none; }
.add-card > summary::-webkit-details-marker { display: none; }
.add-card[open] > summary { margin-bottom: 14px; }
.inv-paid { flex-basis: 100%; }
@media (max-width: 720px) { .kpis.kpis-3 { grid-template-columns: 1fr 1fr; } .item.po { grid-template-columns: minmax(0, 1fr) 64px 88px; } }

/* Users & roles ------------------------------------------------------------ */
.badge.role-owner { background: var(--brand); color: var(--on-brand, #fff); }
.badge.role-manager { background: var(--brand-50); color: var(--brand-ink, var(--brand)); }
.badge.role-accountant { background: var(--green-50); color: var(--green); }
.badge.role-sales { background: var(--amber-50); color: var(--amber); }
.badge.role-packer, .badge.role-viewer { background: var(--bg); color: var(--muted); }
.user-rows details > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.user-rows details > summary::-webkit-details-marker { display: none; }
.user-rows .row-main { flex: 1; min-width: 0; }
.user-rows li.off { opacity: .6; }
.user-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 0 18px 18px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.perm-table th, .perm-table td { text-align: center; font-size: .85rem; white-space: nowrap; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; white-space: normal; min-width: 180px; }
.perm-table td.yes { color: var(--green); }
.perm-table td.yes svg { width: 16px; height: 16px; }
.perm-table td.no { color: var(--line); }
.role-notes { margin: 0; padding: 14px 18px 18px 34px; display: grid; gap: 6px; font-size: .9rem; }
.perm-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.perm-list li { display: flex; align-items: center; gap: 8px; }
.perm-list svg { width: 16px; height: 16px; color: var(--green); }
a.who { color: inherit; text-decoration: none; }

/* Accounting ---------------------------------------------------------------- */
.period-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period-form select, .period-form input { width: auto; }
.period-form label.inline { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.acc-tabs { margin: 0 0 16px; }
.section-title { font-size: 1rem; margin: 18px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.acc-money { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acc-money .kpi strong { font-size: 1.25rem; }
.neg { color: var(--red); }
.pl-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pl-strip div { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg); }
.pl-strip span { font-size: .8rem; color: var(--muted); }
.pl-strip b { font-size: 1.15rem; }
.pl-strip .net { background: var(--green-50); }
.pl-strip .net b { color: var(--green); }
.pl-strip .net.loss { background: var(--red-50); }
.pl-strip .net.loss b { color: var(--red); }
.acc-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.acc-forms .acc-form { margin: 0; }
.acc-forms .acc-form[open] { grid-column: 1 / -1; }
.jl-head, .jl-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; gap: 8px; }
.jl-head { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.jl-row { margin-bottom: 8px; }
.jl-sum.bad { color: var(--red); }
.je-list { list-style: none; margin: 0; padding: 0; }
.je { padding: 12px 18px; border-top: 1px solid var(--line); }
.je-head { display: flex; align-items: center; gap: 12px; }
.je-date { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.je-text { flex: 1; min-width: 0; }
.je-head form { margin: 0; }
.je-lines { width: 100%; margin-top: 6px; font-size: .84rem; border-collapse: collapse; }
.je-lines td { padding: 2px 0; color: var(--muted); }
.je-lines td.cr { padding-left: 24px; }
.je-lines .num { width: 110px; text-align: right; white-space: nowrap; }
.je-lines a { color: inherit; }
.statement h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.statement h3:first-of-type { margin-top: 4px; }
.statement .pl-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.statement .pl-row.sub span { padding-left: 12px; }
.statement .pl-row.strong { font-weight: 700; }
.statement .pl-row.total { font-weight: 700; font-size: 1.1rem; border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.statement .pl-row.total.loss b { color: var(--red); }
.statement .pl-row a { color: inherit; }
.statement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.table tfoot th { border-top: 2px solid var(--ink); }
.acc-code { width: 52px; color: var(--muted); }
@media (max-width: 900px) {
  .acc-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-strip .net { grid-column: 1 / -1; }
  .acc-forms, .statement-grid { grid-template-columns: 1fr; }
  .jl-head, .jl-row { grid-template-columns: minmax(0, 1fr) 80px 80px; }
}
.period-form [hidden] { display: none !important; }
.statement .pl-row.total.loss { background: var(--red-50); }
.statement .pl-row.total.loss span, .statement .pl-row.total.loss b { color: var(--red); }

/* Variants ----------------------------------------------------------------- */
.var-block { padding: 4px 18px 18px; border-top: 1px dashed var(--line); margin-top: 8px; }
.var-block h3 { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 14px 0 10px; }
.var-block h3 svg { width: 16px; height: 16px; }
.var-table input { width: 90px; padding: 6px 8px; }
.var-table td, .var-table th { white-space: nowrap; }
.var-more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: .9rem; margin-top: 10px; list-style: none; }
.var-more > summary::-webkit-details-marker { display: none; }
.var-add { margin-top: 10px; }
.sm-chips .chip { font-size: .8rem; padding: 4px 10px; }
.var-picker { margin: 10px 0 4px; padding: 12px 14px; border: 1.5px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand-50); }
.vp-head { display: flex; justify-content: space-between; align-items: center; }
.var-picker .label { margin: 8px 0 6px; }
.var-picker .chip.on { background: var(--brand); color: var(--on-brand, #fff); border-color: var(--brand); }
.var-picker .chip.out { opacity: .55; text-decoration: line-through; }
.stock-grid { border-collapse: separate; border-spacing: 6px; margin: 0 auto 10px; }
.stock-grid th { font-size: .85rem; padding: 4px 6px; text-align: center; }
.stock-grid tbody th { text-align: left; white-space: nowrap; }
.stock-grid td { position: relative; text-align: center; }
.stock-grid td input { width: 72px; text-align: center; font-weight: 600; font-size: 1.05rem; padding: 10px 4px; }
.stock-grid td.lvl-low input { border-color: var(--amber); background: var(--amber-50); }
.stock-grid td.lvl-out input { border-color: var(--red); background: var(--red-50); }
.stock-grid td.none { color: var(--muted); }
.stock-grid .tot { color: var(--muted); font-weight: 600; min-width: 48px; }
.stock-grid .grand { color: var(--ink); }
.cell-link { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.cell-link svg { width: 11px; height: 11px; }
@media (max-width: 720px) { .stock-grid { border-spacing: 4px; } .stock-grid td input { width: 52px; padding: 8px 2px; font-size: .95rem; } .stock-grid th { font-size: .8rem; padding: 2px; } }

/* Scanning ----------------------------------------------------------------- */
.scan-overlay { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #0b0f19; color: #fff; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.scan-overlay[hidden] { display: none; }
.scan-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.scan-top .icon-btn { color: #fff; }
.scan-view { position: relative; flex: 1; overflow: hidden; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 10%; right: 10%; top: 32%; height: 28%; border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.scan-frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff4d4f; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { transform: translateY(-40px); } to { transform: translateY(40px); } }
.scan-msg { margin: 0; padding: 12px 16px; text-align: center; font-weight: 600; }
.scan-msg.ok { color: #4ade80; } .scan-msg.bad { color: #f87171; }
.scan-manual { display: flex; gap: 8px; padding: 0 16px 16px; }
.scan-manual input { flex: 1; }
body.scanning { overflow: hidden; }
.scan-type { display: flex; gap: 8px; margin: 14px 0 6px; flex: 1 1 260px; }
.scan-type input { flex: 1; }
.scan-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.scan-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.scan-result b { flex-basis: 100%; }
.scan-result.miss { border-color: var(--red); }
.pack-progress { font-size: 1.1rem; }
.pack-progress b { font-size: 2rem; }
.pack-bar { height: 8px; border-radius: 99px; background: var(--bg); margin: 8px 0 14px; overflow: hidden; }
.pack-bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.pack-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.pack-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.pack-item.done { border-color: var(--green); background: var(--green-50); }
.pk-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); color: transparent; flex: none; }
.pack-item.done .pk-check { background: var(--green); border-color: var(--green); color: #fff; }
.pk-check svg { width: 15px; height: 15px; }
.pk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-qty { font-size: 1.1rem; white-space: nowrap; }
.pack-msg { min-height: 1.5em; font-weight: 600; margin: 6px 0 12px; }
.pack-msg.ok { color: var(--green); } .pack-msg.bad { color: var(--red); }
.pack-done { margin-top: 14px; }
.pack-link { margin-bottom: 10px; }
.bc-form { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; padding: 0 18px 14px; }
.bc-form label { flex: 1 1 240px; margin: 0; }
.bc-form p { flex-basis: 100%; margin: 0; }
.bc-row { display: flex; gap: 6px; align-items: center; }
.bc-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; }
.label-picker .copies { width: 72px; }
.pack-done button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.scan-manual button { color: #fff; border-color: rgba(255,255,255,.5); }

/* Plans & billing ---------------------------------------------------------- */
.plans.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card .yearly { margin: -6px 0 10px; font-size: .82rem; color: var(--green); font-weight: 600; }
.no-commission { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--green); margin: 12px 0 0; }
.no-commission svg { width: 18px; height: 18px; }
.usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 6px; }
.meter { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.meter-bar { height: 6px; border-radius: 99px; background: var(--bg); margin-top: 8px; overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--brand); }
.meter-bar span.high { background: var(--amber); } .meter-bar span.full { background: var(--red); }
.pay-box { margin: 14px 0; padding: 14px; border: 1.5px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand-50); }
.pay-box > summary { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; list-style: none; }
.pay-box > summary::-webkit-details-marker { display: none; }
.pay-box[open] > summary { margin-bottom: 12px; }
.pay-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.badge.pay-pending { background: var(--amber-50); color: var(--amber); }
.badge.pay-approved { background: var(--green-50); color: var(--green); }
.badge.pay-rejected { background: var(--red-50); color: var(--red); }
.pay-req { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; }
@media (max-width: 900px) { .plans.plans-3, .usage { grid-template-columns: 1fr; } }

/* Risk & advances ---------------------------------------------------------- */
.risk-box { display: flex; flex-direction: column; gap: 2px; }
.risk-box small { font-weight: 600; margin-top: 2px; }
.risk-box.risk-new { background: var(--bg); color: var(--ink); }
.risk-line { font-size: .84rem; margin: -4px 0 10px; color: var(--muted); }
.risk-line.risk-high { color: var(--red); } .risk-line.risk-medium { color: var(--amber); }
.adv-card.suggest { border: 1.5px solid var(--amber); background: var(--amber-50); }
.adv-amount { font-weight: 700; font-size: 1.05rem; margin-top: 0; }
.adv-form .inline-form label { flex: 1; }
.adv-pay .adv-number { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.adv-m { font-weight: 700; padding: 2px 8px; border-radius: 6px; color: #fff; font-size: .85rem; }
.adv-m.bkash { background: #e2136e; } .adv-m.nagad { background: #f6921e; }
.adv-number b { flex: 1; font-size: 1.15rem; }
.adv-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }
.adv-card-dash { margin-bottom: 16px; border-color: var(--amber); }

.quick-ship { margin-bottom: 6px; }
.quick-help { text-align: center; margin: 0 0 12px; }

/* Shop page ---------------------------------------------------------------- */
.store { max-width: 640px; padding-bottom: 90px; }
.store-note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-50); color: var(--brand-ink, var(--brand)); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.store-cats { margin-bottom: 12px; }
.store-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.store-item { display: flex; gap: 14px; margin: 0; }
.store-item.out { opacity: .6; }
.si-tile { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 1.2rem; }
.si-body { flex: 1; min-width: 0; }
.si-body h2 { font-size: 1.02rem; margin: 2px 0; }
.si-price { margin: 0 0 8px; font-weight: 700; color: var(--brand-ink, var(--brand)); }
.si-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.si-options li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.si-options li.picked { background: var(--brand-50); }
.si-options li.out { color: var(--muted); }
.stepper-q { display: inline-flex; align-items: center; gap: 4px; }
.stepper-q input { width: 46px; text-align: center; padding: 6px 2px; }
.sq-btn { width: 34px; height: 34px; border-radius: 50%; padding: 0; font-size: 1.1rem; line-height: 1; border: 1px solid var(--line); background: var(--surface); }
.store-checkout h2 { margin-top: 0; font-size: 1.1rem; }
.store-sum { margin: 10px 0 14px; }
.store-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); z-index: 20; }
.store-bar[hidden] { display: none; }
.store-done h1 { color: var(--green); }
.slug-row { display: flex; align-items: center; gap: 6px; }
.slug-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; }

/* AI writing help ---------------------------------------------------------- */
.ai-out { display: grid; gap: 12px; }
.ai-card { margin: 0; }
.ai-card p { white-space: pre-wrap; margin: 8px 0 10px; line-height: 1.55; }
.ai-form[inert] { opacity: .5; }
