/* SASPC Shop Admin: AdminLTE-dhoner layout, SASPC-er rong (indigo + gold) */
:root {
  --ink: #1b1740;
  --indigo: #1d0f63;
  --indigo-2: #2c1a86;
  --indigo-3: #4b36c9;
  --gold: #fbb515;
  --side: #17103f;
  --side-2: #221a55;
  --side-txt: #c9c5e6;
  --bg: #f4f5fb;
  --card: #fff;
  --line: #e7e6f0;
  --text: #2d2a45;
  --muted: #6d6a86;
  --ok: #16803c;
  --ok-bg: #e2f6e8;
  --warn: #9a5b00;
  --warn-bg: #fff1d6;
  --err: #b42318;
  --err-bg: #fde8e7;
  --info: #175cd3;
  --info-bg: #e5efff;
  --violet: #6b3fc9;
  --violet-bg: #efe8ff;
  --teal: #0e7c86;
  --teal-bg: #ddf4f5;
  --shadow: 0 1px 2px rgba(23, 16, 63, .06), 0 2px 8px rgba(23, 16, 63, .05);
  --r: 12px;
  --sb: 250px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Hind Siliguri", system-ui, sans-serif; font-size: 15px; line-height: 1.6; }
a { color: var(--indigo-2); }
h1, h2, h3 { color: var(--ink); line-height: 1.3; }
input, select, textarea, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.txt-err { color: var(--err); font-weight: 600; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sb); background: var(--side); color: var(--side-txt);
  display: flex; flex-direction: column; overflow-y: auto;
  transition: width .2s ease, transform .2s ease;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 14px 16px; min-height: 64px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sb-brand img { border-radius: 9px; flex-shrink: 0; }
.sb-brand span, .sb-user > span:last-child { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; overflow: hidden; }
.sb-brand b { font-size: 1.05rem; }
.sb-brand small { color: var(--gold); font-size: .75rem; font-weight: 600; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 700; flex-shrink: 0; }
.sb-user b { color: #fff; font-size: .95rem; }
.sb-user small { font-size: .78rem; display: flex; align-items: center; gap: 5px; }
.dot-on { width: 8px; height: 8px; border-radius: 50%; background: #3ccf6e; display: inline-block; }
.sb-nav { padding: 8px 10px 20px; }
.sb-head { margin: 14px 10px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: #8c86b8; text-transform: uppercase; white-space: nowrap; }
.sb-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px; border-radius: 9px; color: var(--side-txt); text-decoration: none; font-weight: 500; white-space: nowrap; }
.sb-nav a span { flex: 1; }
.sb-nav a:hover { background: var(--side-2); color: #fff; }
.sb-nav a.on { background: var(--indigo-3); color: #fff; box-shadow: 0 4px 12px rgba(75, 54, 201, .4); }
.sb-badge { font-style: normal; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--gold); color: var(--ink); font-size: .76rem; font-weight: 700; text-align: center; line-height: 20px; }
.sb-backdrop { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sb); display: flex; flex-direction: column; transition: margin-left .2s ease; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.tb-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; }
.tb-btn:hover { background: var(--bg); }
.tb-btn em { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--err); color: #fff; font-size: .7rem; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.tb-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); color: var(--muted); }
.tb-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-link { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.tb-link:hover { background: var(--err-bg); color: var(--err); }

.content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 22px 24px 4px; }
.content-head h1 { margin: 0; font-size: 1.55rem; }
.crumb { font-size: .88rem; color: var(--muted); }
.crumb a { text-decoration: none; }
.content { flex: 1; padding: 16px 24px 24px; }
.afoot { padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .85rem; }

/* Sidebar choto (desktop) */
.sb-mini .sidebar { width: 72px; }
.sb-mini .main { margin-left: 72px; }
.sb-mini .sb-brand span, .sb-mini .sb-user > span:last-child, .sb-mini .sb-head, .sb-mini .sb-nav a span, .sb-mini .sb-nav a > .ic:last-child:not(:first-child) { display: none; }
.sb-mini .sb-nav a { justify-content: center; padding: 11px; }
.sb-mini .sb-badge { position: absolute; top: 2px; right: 4px; min-width: 18px; padding: 0 4px; line-height: 18px; font-size: .68rem; }
.sb-mini .sb-brand, .sb-mini .sb-user { justify-content: center; padding-left: 8px; padding-right: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--indigo-2); color: #fff; }
.btn-primary:hover { background: var(--indigo); box-shadow: 0 4px 12px rgba(44, 26, 134, .28); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: #c9c6dc; background: var(--bg); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: .88rem; }
.btn-lg { min-height: 48px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; min-height: 0; padding: 0; background: #fff; border-color: var(--line); color: var(--muted); }
.btn-icon:hover { color: var(--indigo-2); border-color: var(--indigo-2); }
.btn-icon.danger:hover { color: var(--err); border-color: var(--err); background: var(--err-bg); }
form.inline { display: inline; margin: 0; }

/* ---------- Alerts / badges ---------- */
.alert { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; border-left: 4px solid; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.callout { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; border-left: 4px solid; font-size: .92rem; }
.callout b { display: flex; align-items: center; gap: 6px; }
.callout.warn { background: var(--warn-bg); color: var(--warn); }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.b-verify { background: var(--warn-bg); color: var(--warn); }
.b-pending { background: #fff7d1; color: #7a5a00; }
.b-contacted { background: var(--teal-bg); color: var(--teal); }
.b-fake, .b-cancelled { background: var(--err-bg); color: var(--err); }
.b-confirmed { background: var(--info-bg); color: var(--info); }
.b-shipped, .b-ready { background: var(--violet-bg); color: var(--violet); }
.b-delivered { background: var(--ok-bg); color: var(--ok); }
.b-returned { background: #ececf1; color: #555; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.b-verify, .tl-dot.b-verify { background: #f08c00; } .dot.b-pending, .tl-dot.b-pending { background: #e6b400; }
.dot.b-contacted, .tl-dot.b-contacted { background: var(--teal); } .dot.b-fake, .dot.b-cancelled, .tl-dot.b-fake, .tl-dot.b-cancelled { background: var(--err); }
.dot.b-confirmed, .tl-dot.b-confirmed { background: var(--info); } .dot.b-shipped, .dot.b-ready, .tl-dot.b-shipped, .tl-dot.b-ready { background: var(--violet); }
.dot.b-delivered, .tl-dot.b-delivered { background: var(--ok); } .dot.b-returned, .tl-dot.b-returned { background: #888; }
.chip-s { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--bg); color: var(--indigo-2); font-size: .78rem; font-weight: 700; }
.chip-s.pick { background: var(--warn-bg); color: var(--warn); }
.flag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 0 7px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: .74rem; font-weight: 700; }

/* ---------- Small boxes ---------- */
.small-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.sbox { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--r); color: #fff; box-shadow: var(--shadow); }
.sbox > div { padding: 16px 18px 12px; position: relative; z-index: 1; }
.sbox b { display: block; font-size: 1.75rem; line-height: 1.2; }
.sbox span { display: block; font-weight: 600; }
.sbox small { opacity: .85; font-size: .82rem; }
.sbox > .ic { position: absolute; right: 14px; top: 14px; opacity: .22; transition: transform .2s; }
.sbox:hover > .ic { transform: scale(1.08); }
.sbox a { margin-top: auto; padding: 6px 18px; background: rgba(0, 0, 0, .12); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; text-align: center; }
.sbox a:hover { background: rgba(0, 0, 0, .2); }
.c-indigo { background: linear-gradient(135deg, #2c1a86, #4b36c9); }
.c-gold { background: linear-gradient(135deg, #f0a400, #fbb515); color: var(--ink); }
.c-gold a { color: var(--ink); background: rgba(0, 0, 0, .08); }
.c-green { background: linear-gradient(135deg, #12703a, #1f9d55); }
.c-teal { background: linear-gradient(135deg, #0b6670, #14939e); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; border-top: 3px solid var(--indigo-2); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 16px 18px; }
.card-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .9rem; }
.tabs-h { padding: 0 10px; }
.row-2 { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 0; }
.narrow-card { max-width: 760px; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state .ic { color: #c5c2dc; }
.empty-state p { margin: 8px 0 14px; }

/* Pill tabs */
.pill-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.pill-tabs a { display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.pill-tabs a:hover { color: var(--ink); }
.pill-tabs a.on { color: var(--indigo-2); border-bottom-color: var(--indigo-2); }
.pill-tabs em { font-style: normal; min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--bg); font-size: .75rem; text-align: center; color: var(--ink); }
.pill-tabs a.on em { background: var(--indigo-2); color: #fff; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filters label { display: flex; flex-direction: column; font-size: .78rem; font-weight: 700; color: var(--muted); }
.filters input, .filters select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.in-ic { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; }
.in-ic > .ic { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.in-ic input { width: 100%; padding-left: 36px !important; }
.quick { display: flex; gap: 6px; align-self: center; }
.quick a { padding: 4px 11px; border-radius: 14px; background: var(--bg); font-size: .82rem; font-weight: 700; text-decoration: none; }
.quick a:hover { background: var(--indigo-2); color: #fff; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 10px 14px; background: #f8f8fc; color: var(--muted); font-size: .8rem; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
.tbl tbody tr:hover { background: #fafaff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td > b, .tbl td > small, .tbl td > a.muted { display: block; }
.tbl td small { font-size: .8rem; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl.compact td { padding: 7px 10px; }
.tbl .tot td { font-weight: 700; color: var(--ink); background: #f8f8fc; }
.ono { color: var(--ink); }
.items-cell { max-width: 260px; color: var(--text); }
.tbl tr.off td { opacity: .55; }
.p-cell { display: flex; align-items: center; gap: 12px; }
.p-cell > span:last-child { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.thumb { width: 44px; flex-shrink: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.tbl s { display: block; font-size: .8rem; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.pager a.on { background: var(--indigo-2); color: #fff; border-color: var(--indigo-2); }

/* Toggle switch (product chalu/bondho) */
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); }
.toggle span, .switch span { position: relative; width: 38px; height: 22px; border-radius: 11px; background: #cfcde0; transition: background .15s; flex-shrink: 0; }
.toggle span::after, .switch span::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, .2); transition: transform .15s; }
.toggle.on { color: var(--ok); }
.toggle.on span, .switch input:checked + span { background: var(--ok); }
.toggle.on span::after, .switch input:checked + span::after { transform: translateX(16px); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid .wide, .edit-grid .wide, .settings-grid .wide { grid-column: 1 / -1; }
.fl { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.fl small { color: var(--muted); font-weight: 500; }
.req { color: var(--err); font-style: normal; }
.fl input, .fl select, .fl textarea, .in-pre input {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #d9d7e6; border-radius: 9px; background: #fff; font-weight: 400; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.fl textarea { resize: vertical; }
.fl input:focus, .fl select:focus, .fl textarea:focus, .in-pre input:focus, .filters input:focus, .filters select:focus { outline: none; border-color: var(--indigo-3); box-shadow: 0 0 0 3px rgba(75, 54, 201, .15); }
.in-pre { display: flex; }
.in-pre b { display: grid; place-items: center; padding: 0 12px; border: 1px solid #d9d7e6; border-right: 0; border-radius: 9px 0 0 9px; background: var(--bg); color: var(--muted); }
.in-pre input { border-radius: 0 9px 9px 0; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; font-size: .9rem; }
.check input { width: 17px; height: 17px; accent-color: var(--indigo-2); }
.edit-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.edit-grid .card, .settings-grid .card { margin-bottom: 0; }
.edit-grid .stack, .settings-grid .stack { gap: 18px; }
.form-bar { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.modal .form-bar { box-shadow: none; padding: 10px 0 0; }
.settings-grid + .card { margin-top: 18px; }
.img-preview { width: 150px; margin: 0 auto 14px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border: 2px dashed #cfcde0; border-radius: 10px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover { border-color: var(--indigo-3); background: #fafaff; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop b { color: var(--indigo-2); overflow-wrap: anywhere; }
.file-drop small { color: var(--muted); font-size: .8rem; }

/* ---------- Modal ---------- */
.modal { width: min(980px, 96vw); max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: var(--bg); box-shadow: 0 24px 60px rgba(10, 5, 40, .35); }
.modal.small { width: min(440px, 94vw); background: #fff; }
.modal::backdrop { background: rgba(15, 8, 45, .55); backdrop-filter: blur(2px); }
.modal-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--indigo); }
.modal-h h2 { margin: 0; color: #fff; font-size: 1.1rem; }
.modal-x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; font-size: 1rem; }
.modal-x:hover { background: rgba(255, 255, 255, .22); }
.modal-b { padding: 16px 18px; }
.md-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
.box { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.box-t { margin: 0 0 10px; font-size: .95rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.status-form { display: flex; flex-direction: column; gap: 10px; }
.save-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.save-state { font-size: .85rem; font-weight: 700; }
.save-state.ok { color: var(--ok); } .save-state.err { color: var(--err); } .save-state.busy { color: var(--muted); }
.dl { margin: 0; }
.dl-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.dl-row:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; display: flex; flex-direction: column; padding: 0 0 12px 22px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline b { color: var(--ink); font-size: .92rem; }
.timeline small { color: var(--muted); font-size: .8rem; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.mini-stats span { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 8px; background: var(--bg); font-size: .74rem; color: var(--muted); text-align: center; }
.mini-stats b { font-size: 1.15rem; color: var(--ink); }
.mini-stats.danger span { background: var(--err-bg); }
.past { list-style: none; margin: 0; padding: 0; }
.past li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.past li:last-child { border-bottom: 0; }
.past li.current b { color: var(--indigo-3); }
.past small { width: 100%; color: var(--muted); font-size: .8rem; }
.spinner { width: 34px; height: 34px; margin: 40px auto; border: 3px solid var(--line); border-top-color: var(--indigo-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dashboard ---------- */
.bars { position: relative; height: 240px; padding-left: 64px; }
.bars-grid { position: absolute; inset: 0 0 26px 64px; }
.bars-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.bars-grid span:last-child { border-top-color: #cfcde0; }
.bars-grid i { position: absolute; right: 100%; top: -9px; margin-right: 8px; font-style: normal; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.bars-plot { position: absolute; inset: 0 0 0 64px; display: flex; gap: 2px; }
.bar-col { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 26px; cursor: default; outline-offset: 0; }
.bar-col:hover, .bar-col:focus-visible { background: rgba(75, 54, 201, .05); border-radius: 6px; }
.bar { width: min(28px, 70%); background: var(--indigo-3); border-radius: 4px 4px 0 0; }
.bar.today { background: var(--indigo-2); }
.bar-col i { position: absolute; bottom: 4px; font-style: normal; font-size: .75rem; color: var(--muted); }
.bar-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 3; }
.tbl-view { margin-top: 12px; font-size: .88rem; }
.tbl-view summary { cursor: pointer; color: var(--indigo-2); font-weight: 600; }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list a { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.status-list li:last-child a { border-bottom: 0; }
.status-list a:hover { background: #fafaff; }
.status-list b { margin-left: auto; color: var(--ink); }
.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; overflow: hidden; font-size: .92rem; }
.top-list li span, .top-list li b { position: relative; z-index: 1; }
.top-list li i { position: absolute; inset: 0 auto 0 0; background: var(--violet-bg); border-radius: 8px; }
.low-list { list-style: none; margin: 0; padding: 0; }
.low-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.low-list li:last-child { border-bottom: 0; }

/* Product cover (shop.css-er moto) */
.pimg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.pcover { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 100%; aspect-ratio: 3 / 4; padding: 12px; color: #fff; text-align: center; background: linear-gradient(160deg, var(--indigo), var(--indigo-2)); border-left: 6px solid rgba(0, 0, 0, .18); overflow: hidden; }
.pcover.v2 { background: linear-gradient(160deg, #2c1a86, #4b2fb8); }
.pcover.v3 { background: linear-gradient(160deg, #1b1740, #3b2a8f); }
.pcover.v4 { background: linear-gradient(160deg, var(--gold), #f39c12); color: var(--ink); }
.pcover-top { font-size: .62rem; letter-spacing: .15em; opacity: .75; font-weight: 700; }
.pcover-name { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.pcover-sub { font-size: .7rem; opacity: .85; }
.pcover.mini { padding: 3px; border-left-width: 3px; gap: 0; }
.pcover.mini .pcover-top, .pcover.mini .pcover-sub { display: none; }
.pcover.mini .pcover-name { font-size: .42rem; line-height: 1.2; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(circle at 20% 10%, #3a24a8 0, transparent 45%), linear-gradient(135deg, #140b48, #2c1a86); }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; width: min(860px, 100%); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(5, 2, 30, .45); }
.login-side { padding: 40px 36px; background: linear-gradient(160deg, rgba(251, 181, 21, .16), rgba(255, 255, 255, .04)); color: #e2dff5; border-right: 1px solid rgba(255, 255, 255, .1); }
.login-side img { border-radius: 14px; margin-bottom: 18px; }
.login-side h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; }
.login-side ul { list-style: none; margin: 22px 0 0; padding: 0; }
.login-side li { position: relative; padding: 6px 0 6px 28px; }
.login-side li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold); transform: rotate(-45deg); }
.login-box { display: flex; flex-direction: column; gap: 14px; padding: 40px 36px; background: #fff; }
.login-box h1 { margin: 0; font-size: 1.5rem; }
.login-box > .muted { margin: -8px 0 4px; }
.login-box .alert { margin: 0; }
.login-box .in-ic input { min-height: 46px; padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; padding: 5px 10px; border: 0; border-radius: 7px; background: var(--bg); color: var(--indigo-2); font-size: .8rem; font-weight: 700; cursor: pointer; }
.back-link { align-self: center; color: var(--muted); font-size: .9rem; text-decoration: none; }
.back-link:hover { color: var(--indigo-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .small-boxes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sb-open .sidebar { transform: none; }
  .sb-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15, 8, 45, .45); }
  .main, .sb-mini .main { margin-left: 0; }
  .sb-mini .sidebar { width: var(--sb); }
  .sb-mini .sb-brand span, .sb-mini .sb-user > span:last-child, .sb-mini .sb-head, .sb-mini .sb-nav a span { display: flex; }
  .row-2, .edit-grid, .settings-grid, .md-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .tb-search { display: none; }
  .tb-link span { display: none; }
  .content-head { padding: 16px 14px 2px; }
  .content-head h1 { font-size: 1.3rem; }
  .content { padding: 12px 12px 20px; }
  .small-boxes { gap: 10px; }
  .sbox b { font-size: 1.3rem; }
  .sbox > .ic { width: 38px; height: 38px; }
  .sbox > div { padding: 12px 12px 10px; }
  .card-b, .card-h { padding-left: 14px; padding-right: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .bars { padding-left: 52px; }
  .bars-grid, .bars-plot { left: 52px; }
  .bar-col i { font-size: .62rem; }

  /* Table -> card list */
  .tbl.orders-tbl thead, .tbl.prod-tbl thead, .row-2 .tbl thead { display: none; }
  .tbl.orders-tbl, .tbl.orders-tbl tbody, .tbl.orders-tbl tr, .tbl.orders-tbl td,
  .tbl.prod-tbl, .tbl.prod-tbl tbody, .tbl.prod-tbl tr, .tbl.prod-tbl td,
  .row-2 .tbl:not(.compact), .row-2 .tbl:not(.compact) tbody, .row-2 .tbl:not(.compact) tr, .row-2 .tbl:not(.compact) td { display: block; }
  .tbl.orders-tbl tr, .tbl.prod-tbl tr, .row-2 .tbl:not(.compact) tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl.orders-tbl td, .tbl.prod-tbl td, .row-2 .tbl:not(.compact) td { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 4px 0; border: 0; text-align: left; }
  .tbl.orders-tbl td::before, .tbl.prod-tbl td::before, .row-2 .tbl:not(.compact) td::before { content: attr(data-l); color: var(--muted); font-size: .78rem; font-weight: 700; }
  .tbl td.act { display: flex !important; justify-content: flex-end; gap: 6px; padding-top: 8px; }
  .tbl td.act::before { display: none; }
  .tbl td.num { text-align: left; }
  .items-cell { max-width: none; }
  .dl-row { grid-template-columns: 1fr; gap: 0; }
  .modal { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100%; border-radius: 0; margin: 0; }
  .modal.small { height: auto; border-radius: 14px; margin: auto; width: 94vw; }
  .modal-b { padding: 12px; }
  .login-box { padding: 30px 22px; }
  .form-bar { position: sticky; bottom: 0; z-index: 5; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .main, .sbox > .ic { transition: none; }
  .spinner { animation-duration: 2s; }
}
