:root {
  --ink: #111827; --text: #374151; --muted: #6b7280; --line: #e5e7eb; --bg: #f6f7fb; --card: #fff;
  --brand: #0f766e; --brand-soft: #e6f4f2; --radius: 12px;
  --input: #fff; --hover: #fafbff; color-scheme: light;
  --s-pending: #7c3aed; --s-confirmed: #2563eb; --s-shipped: #0891b2; --s-delivered: #16a34a; --s-cancelled: #dc2626;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: "Hind Siliguri", system-ui, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: .5rem 1rem; border-radius: 10px; font-weight: 500; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost:hover { background: var(--bg); }
.btn.small { padding: .3rem .7rem; font-size: .9rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.icon-btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 38px; height: 38px; font-size: 1.1rem; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.right { text-align: right; }

/* gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: min(400px, 100%); }
.form { display: grid; gap: .8rem; margin-top: 1rem; }
.form label { display: grid; gap: .25rem; font-weight: 500; }
.form input { font: inherit; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text); }
.form-error { color: var(--s-cancelled); margin: 0; min-height: 1.2em; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand img { border-radius: 8px; background: var(--card); }
.sidebar { width: 240px; background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 8px 18px; }
.sidebar nav { display: grid; gap: 2px; flex: 1; align-content: start; }
.sidebar nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: 10px; color: var(--text); font-weight: 500; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav-badge { margin-left: auto; background: var(--s-pending); color: #fff; border-radius: 99px; font-size: .75rem; min-width: 22px; text-align: center; padding: 0 6px; }
.nav-head { font-size: .8rem; color: var(--muted); margin: 14px 12px 4px; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 8px 0; display: grid; gap: .5rem; }
.side-foot small { color: var(--muted); word-break: break-all; }
.main { flex: 1; min-width: 0; padding: 20px 26px 40px; }
.topbar { display: flex; align-items: center; gap: .7rem; margin-bottom: 18px; }
.topbar h1 { margin: 0; font-size: 1.5rem; color: var(--ink); }
#menu-btn { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: .85rem; background: #eef2ff; color: #4338ca; flex-shrink: 0; }
.avatar.me { background: var(--brand); color: #fff; }

/* stat cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.3rem; }
.card small { color: var(--muted); display: block; }
.card b { font-size: 1.45rem; color: var(--ink); }

/* orders panel */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel-head { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 12px; }
.search { display: flex; flex: 1; min-width: 260px; max-width: 520px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.search select { font: inherit; border: none; border-right: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 .6rem; }
.search input { font: inherit; border: none; padding: .55rem .75rem; flex: 1; min-width: 0; outline: none; background: var(--input); color: var(--text); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 12px; width: fit-content; max-width: 100%; }
.tab { border: none; background: transparent; padding: .35rem .8rem; border-radius: 8px; font-weight: 500; }
.tab.active { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--ink); }
.tab .n { font-size: .78rem; color: var(--muted); margin-left: .25rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .88rem; padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tr:hover td { background: var(--hover); }
.oid b { color: var(--ink); }
.oid small, .cust small, .amt small, .date small { display: block; color: var(--muted); font-size: .8rem; }
.cust { display: flex; align-items: center; gap: .6rem; }
.pill { display: inline-block; padding: .15rem .65rem; border-radius: 99px; font-size: .82rem; font-weight: 600; border: 1px solid; }
.pill.pending { color: var(--s-pending); background: #f5f3ff; border-color: #ddd6fe; }
.pill.confirmed { color: var(--s-confirmed); background: #eff6ff; border-color: #bfdbfe; }
.pill.shipped { color: var(--s-shipped); background: #ecfeff; border-color: #a5f3fc; }
.pill.delivered { color: var(--s-delivered); background: #f0fdf4; border-color: #bbf7d0; }
.pill.cancelled { color: var(--s-cancelled); background: #fef2f2; border-color: #fecaca; }
.type { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .15rem .55rem; border-radius: 6px; font-weight: 600; }
.type.digital { background: #111827; color: #fff; }
.type.physical { background: #f3f4f6; color: var(--text); border: 1px solid var(--line); }
.acts { text-align: right; }
.acts button { border: none; background: none; font-size: 1.05rem; padding: .25rem .35rem; border-radius: 6px; color: var(--muted); }
.acts button:hover { background: var(--bg); color: var(--ink); }
.pager { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding-top: 12px; color: var(--muted); }
.pager select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .2rem .4rem; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px !important; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(17,24,39,.4); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--card); z-index: 31; overflow-y: auto; padding: 22px; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.drawer h2 { margin: 0 0 4px; color: var(--ink); }
.drawer .close { position: absolute; top: 14px; right: 14px; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: .45rem .8rem; margin: 14px 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.items { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.items div { display: flex; justify-content: space-between; padding: .3rem 0; }
.items .tot { border-top: 1px dashed var(--line); font-weight: 700; color: var(--ink); }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 12px; display: grid; gap: .6rem; }
.box h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.box select, .box input { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cid { background: var(--brand-soft); color: var(--brand); padding: .1rem .5rem; border-radius: 6px; font-weight: 600; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1.1rem; border-radius: 99px; z-index: 50; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0,0,0,.1); }
  .sidebar.open { transform: none; }
  #menu-btn { display: inline-block; }
  .main { padding: 14px 14px 40px; }
}
.pay { font-size: .75rem; padding: 2px 8px; border-radius: 99px; border: 1px solid #e2e8f0; background: #f8fafc; color: #475569; white-space: nowrap; }
.pay.paid { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.pay.pending_verify { color: #3730a3; background: #eef2ff; border-color: #c7d2fe; }
.pay.refunded { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.trx { font-family: ui-monospace, Consolas, monospace; background: #f1f5f9; padding: 1px 6px; border-radius: 6px; }

/* ---------- v2: dashboard, bulk, drawer tools ---------- */
.btn.danger { background: var(--s-cancelled); border-color: var(--s-cancelled); color: #fff; }
.btn.danger-ghost { color: var(--s-cancelled); border-color: #fecaca; }
.btn.danger-ghost:hover { background: #fef2f2; }
a.btn { display: inline-flex; align-items: center; }
.btn.primary:hover { filter: brightness(1.08); }
.icon-btn.sm { width: 28px; height: 28px; font-size: .8rem; }
.select, .panel-head select.select { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; background: var(--card); }
.link { color: var(--brand); font-weight: 600; font-size: .9rem; }
.hint { margin: 0; color: var(--muted); font-size: .9rem; }
.row.end { justify-content: flex-end; }
.card { transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 14px rgba(17,24,39,.06); }
.card.warn .ic { background: #fef3c7; }
.card.warn b { color: #b45309; }
#cards, #dash-cards { margin-bottom: 18px; }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.dash-grid .panel { min-width: 0; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: 12px; flex-wrap: wrap; }
.panel-title h2 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.chart { position: relative; height: 220px; }
.bars { display: flex; align-items: stretch; gap: 6px; height: 100%; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; position: relative; cursor: default; outline: none; border-radius: 6px; }
.bar-col:hover, .bar-col:focus-visible { background: #f3f6f9; }
.bar { background: var(--brand); border-radius: 4px 4px 0 0; min-height: 0; transition: height .3s; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { background: #115e59; }
.bar-x { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.dash-grid .panel:first-child { position: relative; }
.chart-tip { position: absolute; top: 48px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .82rem; padding: .35rem .6rem; border-radius: 8px; pointer-events: none; white-space: nowrap; z-index: 2; }
.todo { display: grid; gap: 6px; }
.todo-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; }
.todo-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.todo-row span:nth-child(2) { flex: 1; }
.todo-row b { background: #fef3c7; color: #92400e; border-radius: 99px; padding: 0 .55rem; min-width: 28px; text-align: center; }
.todo-row.done { opacity: .65; }
.todo-row.done b { background: #dcfce7; color: #166534; }
.mini-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-row > span:nth-child(2) { flex: 1; min-width: 0; }
.mini-row b { color: var(--ink); }
.mini-row small { display: block; color: var(--muted); font-size: .8rem; }
.mini-row .right { text-align: right; }
.top-row { padding: .45rem 0; }
.top-line { display: flex; justify-content: space-between; gap: .6rem; }
.top-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 6px; background: #eef2f6; border-radius: 99px; margin: 4px 0 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

.tab.t-pending { color: var(--s-pending); } .tab.t-confirmed { color: var(--s-confirmed); } .tab.t-shipped { color: var(--s-shipped); }
.tab.t-delivered { color: var(--s-delivered); } .tab.t-cancelled { color: var(--s-cancelled); } .tab.t-special { color: #b45309; }
.bulk { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid #b7e0da; border-radius: 10px; padding: .5rem .75rem; margin-bottom: 10px; }
.bulk select { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .5rem; }
.ck { width: 34px; }
.table tr.sel td { background: #f0fbf9; }
.table tr[data-id] { cursor: pointer; }

.drawer { width: min(520px, 100vw); }
.drawer h2 { padding-right: 40px; }
.tools { margin-top: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: .3rem .65rem; font-size: .88rem; }
.seg button:hover { background: var(--bg); }
.seg button.on { color: #fff; border-color: transparent; }
.seg .on.s-pending { background: var(--s-pending); } .seg .on.s-confirmed { background: var(--s-confirmed); } .seg .on.s-shipped { background: var(--s-shipped); }
.seg .on.s-delivered { background: var(--s-delivered); } .seg .on.s-cancelled { background: var(--s-cancelled); }
.box textarea, .form textarea, .form select { font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; resize: vertical; }
.box.focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.grid2 label { display: grid; gap: .25rem; font-weight: 500; min-width: 0; }
.grid2 select { min-width: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: .6rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline li b { display: block; font-weight: 500; color: var(--ink); }
.timeline small { color: var(--muted); }
.ed-item { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.ed-item span { flex: 1; min-width: 0; }
.ed-item input { width: 64px; }
.seg-radio { border: none; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.seg-radio legend { font-weight: 500; padding: 0; margin-bottom: .25rem; }
.seg-radio label { display: flex; gap: .35rem; align-items: center; font-weight: 400; }
.form label.row { display: flex; font-weight: 400; }
.ed-total { margin: 0; font-size: 1.05rem; color: var(--ink); }
.toast.bad { background: var(--s-cancelled); }
.confirm { border: none; border-radius: 14px; padding: 20px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.confirm::backdrop { background: rgba(17,24,39,.45); }
.confirm p { margin: 0 0 16px; color: var(--ink); line-height: 1.6; }
.sidebar { background: linear-gradient(180deg, var(--card) 0%, var(--side2, #f8fbfb) 100%); }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  #new-order { padding: .45rem .7rem; }
  .topbar h1 { font-size: 1.2rem; }
  .search { min-width: 0; max-width: none; width: 100%; }
}

/* ===== dark mode ===== */
html[data-theme="dark"] {
  --ink: #e8eef7; --text: #cbd5e1; --muted: #94a3b8; --line: #263248; --bg: #0b1220; --card: #111a2b;
  --brand: #2dd4bf; --brand-soft: #0f2a2a; --input: #0e1626; --hover: #16213a; --side2: #0d1526;
  --s-pending: #a78bfa; --s-confirmed: #60a5fa; --s-shipped: #22d3ee; --s-delivered: #4ade80; --s-cancelled: #f87171;
  color-scheme: dark;
}
html[data-theme="dark"] .btn.primary, html[data-theme="dark"] .avatar.me { color: #04201d; }
html[data-theme="dark"] .avatar { background: #1e1b4b; color: #c7d2fe; }
html[data-theme="dark"] .pill { background: transparent !important; }
html[data-theme="dark"] .type.digital { background: #e8eef7; color: #0b1220; }
html[data-theme="dark"] .type.physical { background: #1e293b; }
html[data-theme="dark"] .pay { background: #1e293b; border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .pay.paid { background: #052e1a; border-color: #14532d; color: #86efac; }
html[data-theme="dark"] .pay.pending_verify { background: #1e1b4b; border-color: #3730a3; color: #c7d2fe; }
html[data-theme="dark"] .pay.refunded { background: #3b0d0d; border-color: #7f1d1d; color: #fca5a5; }
html[data-theme="dark"] .trx { background: #1e293b; }
html[data-theme="dark"] .card.warn .ic, html[data-theme="dark"] .todo-row b { background: #3a2a0a; color: #fcd34d; }
html[data-theme="dark"] .card.warn b { color: #fcd34d; }
html[data-theme="dark"] .todo-row.done b { background: #052e1a; color: #86efac; }
html[data-theme="dark"] .bulk { border-color: #1f4d48; }
html[data-theme="dark"] .table tr.sel td { background: #0f2a2a; }
html[data-theme="dark"] .bar-col:hover, html[data-theme="dark"] .bar-col:focus-visible { background: #16213a; }
html[data-theme="dark"] .bar-col:hover .bar { background: #5eead4; }
html[data-theme="dark"] .meter { background: #1e293b; }
html[data-theme="dark"] .btn.danger-ghost { border-color: #7f1d1d; }
html[data-theme="dark"] .btn.danger-ghost:hover { background: #3b0d0d; }
html[data-theme="dark"] .toast { background: #e8eef7; color: #0b1220; }
html[data-theme="dark"] .toast.bad { background: #b91c1c; color: #fff; }
html[data-theme="dark"] .confirm, html[data-theme="dark"] .drawer { background: var(--card); color: var(--text); }
html[data-theme="dark"] .timeline li::before { border-color: var(--card); }
html[data-theme="dark"] .brand img { background: #fff; }
.select, .pager select, .bulk select, .box select, .box input, .box textarea, .form textarea, .form select { background: var(--input); color: var(--text); }

/* ===== profile + password helpers ===== */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 2.6rem; }
.pw-eye { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.05rem; padding: .2rem .35rem; color: var(--muted); }
.form-ok { color: var(--s-delivered); margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; font-weight: 500; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.gate-links { text-align: center; margin: .8rem 0 0; font-size: .92rem; }
.gate-links a { color: var(--brand); font-weight: 500; }
.gate-tools { display: flex; justify-content: flex-end; gap: .4rem; margin-bottom: .4rem; }
.avatar.me { cursor: pointer; border: 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.profile-head { display: flex; align-items: center; gap: 14px; grid-column: 1 / -1; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.profile-head h2 { margin: 0; color: var(--ink); font-size: 1.25rem; }
.profile-head small { color: var(--muted); display: block; }
.panel h3 { margin: 0 0 .2rem; color: var(--ink); font-size: 1.05rem; }
.panel .form { margin-top: .6rem; }
.panel .form input, .panel .form textarea { width: 100%; }
.badge-admin { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: .78rem; font-weight: 600; padding: .05rem .55rem; border-radius: 99px; margin-left: .3rem; vertical-align: middle; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row small { display: block; color: var(--muted); }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.switch button { border: 0; background: var(--card); color: var(--text); padding: .35rem .8rem; }
.switch button.on { background: var(--brand); color: #fff; }
html[data-theme="dark"] .switch button.on { color: #04201d; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
html[data-theme="dark"] .avatar.me { background: var(--brand); color: #04201d; }

/* ===== shop pages (admin-shop.js) ===== */
.pl-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 14px; }
.pl-head h2 { margin: 0; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.count-pill { font-size: .8rem; background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: .05rem .6rem; font-weight: 600; }
.pl-search { max-width: 320px; min-width: 200px; }
.chip-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 12px; }
.chip-tab { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: .4rem .85rem; font-size: .9rem; }
.chip-tab.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pl-table td { white-space: normal; }
.pl-prod { display: flex; align-items: center; gap: .7rem; min-width: 260px; }
.pl-prod img, .pl-ph { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--bg); border: 1px solid var(--line); flex-shrink: 0; display: grid; place-items: center; font-size: 1.2rem; }
.pl-prod b { color: var(--ink); }
.pl-prod small { display: block; color: var(--muted); font-size: .8rem; }
.pl-prod .pill-soft { margin-left: .3rem; }
.pill-soft { display: inline-block; font-size: .78rem; padding: .05rem .55rem; border-radius: 99px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.pill-soft.warn { border-color: #fcd34d; color: #b45309; }
.pill-soft.bad { border-color: #fecaca; color: var(--s-cancelled); }
.pill-soft.ok { border-color: #bbf7d0; color: var(--s-delivered); }
.row-off td { opacity: .55; }
.drag { cursor: grab; color: var(--muted); font-size: 1.1rem; user-select: none; }
tr.dragging td { background: var(--brand-soft) !important; }
.acts.nowrap { white-space: nowrap; }
.acts .btn { margin-left: .2rem; }
.pop-menu { position: absolute; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; width: 230px; display: grid; }
.pop-menu a, .pop-menu button { text-align: left; background: none; border: 0; padding: .5rem .7rem; border-radius: 8px; color: var(--text); font-size: .92rem; }
.pop-menu a:hover, .pop-menu button:hover { background: var(--bg); }
.danger-text { color: var(--s-cancelled) !important; }

/* product editor */
.pe-top, .pe-bottom { display: flex; align-items: center; gap: .6rem; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.pe-bottom { position: static; margin-top: 14px; }
.pe-top h2 { margin: 0; font-size: 1.3rem; color: var(--ink); }
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: .6rem; }
.type-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; display: flex; gap: .6rem; align-items: flex-start; }
.type-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.type-card span { display: grid; gap: .2rem; }
.type-card small { color: var(--muted); }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.pe-main, .pe-side { display: grid; gap: 14px; }
.ed-sec { padding: 0; }
.ed-sec summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.ed-sec summary::-webkit-details-marker { display: none; }
.ed-sec summary::after { content: "\2304"; color: var(--muted); font-size: 1.1rem; }
.ed-sec[open] summary::after { content: "\2303"; }
.ed-sec summary h3 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.ed-body { padding: 0 16px 16px; display: grid; gap: .7rem; }
.ed-body label, .settings-grid .form label { display: grid; gap: .25rem; font-weight: 500; font-size: .92rem; }
.ed-body input, .ed-body select, .ed-body textarea, .settings-grid input, .settings-grid select, .settings-grid textarea {
  font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: var(--input); color: var(--text); }
.ed-body textarea { resize: vertical; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.media-row { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; }
.img-drop { width: 180px; height: 180px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .85rem; cursor: pointer; overflow: hidden; background: var(--bg); }
.img-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.img-drop img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.media-side { display: grid; gap: .5rem; align-content: start; }
.media-side .btn { justify-self: start; }
.detail-row { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: .4rem; align-items: center; }
.file-list { display: grid; gap: .3rem; }
.file-item { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; }
.file-item .icon-btn { margin-left: auto; }

/* abandoned carts */
.cart-st { font-size: .8rem; padding: .1rem .6rem; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.st-open { background: var(--bg); border: 1px solid var(--line); }
.st-contacted { background: #eff6ff; color: #1d4ed8; }
.st-dismissed { background: #fef2f2; color: #b91c1c; }
.st-recovered { background: #f0fdf4; color: #15803d; }
html[data-theme="dark"] .st-contacted { background: #172554; color: #93c5fd; }
html[data-theme="dark"] .st-dismissed { background: #3b0d0d; color: #fca5a5; }
html[data-theme="dark"] .st-recovered { background: #052e1a; color: #86efac; }
.link-cell { color: var(--brand); font-size: .85rem; }
a.icon-btn { display: inline-grid; place-items: center; }

/* promo codes */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.promo-card { display: grid; gap: .5rem; border-top: 4px solid var(--brand); }
.promo-card.off { border-top-color: var(--muted); opacity: .8; }
.promo-top { display: flex; justify-content: space-between; align-items: center; }
.promo-val { font-size: 1.3rem; color: var(--ink); }
.promo-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .08em; background: var(--brand-soft); color: var(--brand); padding: .35rem .6rem; border-radius: 8px; border: 1px dashed var(--brand); cursor: pointer; justify-self: start; }
.promo-dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0; font-size: .9rem; }
.promo-dl dt { color: var(--muted); }
.promo-dl dd { margin: 0; text-align: right; color: var(--ink); }

/* settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.settings-grid h3 { margin: 0 0 .5rem; color: var(--ink); }
.settings-grid .form { margin-top: .4rem; }
.st-save { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; position: sticky; bottom: 0; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.toggle span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::before { transform: translateX(20px); }

/* dashboard extras */
#dash-extra { display: grid; gap: 14px; margin-bottom: 14px; }
.greet { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.greet h2 { margin: 0; color: var(--ink); font-size: 1.3rem; }
.greet p { margin: .2rem 0 0; }
.dash-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-3 .mini-row span:nth-child(2) b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rank { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.rank.r1 { background: #fef3c7; color: #b45309; }
.rank.r2 { background: #e5e7eb; color: #374151; }
.rank.r3 { background: #fde7d9; color: #c2410c; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-btn { border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; display: grid; justify-items: center; gap: .3rem; font-size: .85rem; color: var(--text); text-align: center; }
.quick-btn span { font-size: 1.3rem; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; }
.quick-btn:hover { border-color: var(--brand); }
@media (max-width: 1100px) { .pe-grid, .settings-grid, .dash-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid3, .type-cards, .media-row { grid-template-columns: 1fr; } .img-drop { width: 100%; } }

/* product editor: counters, rich text, gallery */
.lbl-row { display: flex; justify-content: space-between; gap: .5rem; }
.rte-label { font-weight: 500; font-size: .92rem; margin-top: .2rem; }
.rte { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--input); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg); }
.rte-bar button { border: 0; background: none; color: var(--text); padding: .25rem .55rem; border-radius: 6px; font-size: .9rem; }
.rte-bar button:hover { background: var(--card); }
.rte-body { min-height: 160px; max-height: 420px; overflow: auto; padding: .7rem .8rem; outline: none; line-height: 1.6; color: var(--text); }
.rte-body:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte-body h3 { font-size: 1.05rem; margin: .5rem 0 .3rem; color: var(--ink); }
.rte-body blockquote { border-left: 3px solid var(--brand); margin: .4rem 0; padding-left: .7rem; color: var(--muted); }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-width: 180px; }
.g-thumb { position: relative; width: 54px; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb button { position: absolute; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; font-size: .65rem; line-height: 18px; padding: 0; background: rgba(0,0,0,.6); color: #fff; }
.g-thumb [data-main] { left: 2px; }
.g-thumb [data-rm-img] { right: 2px; }
@media (max-width: 640px) { .gallery { max-width: none; } }

/* shop settings (Zatiq-like) */
.st-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.st-main, .st-side { display: grid; gap: 14px; }
.toggle-wrap { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.toggle-state { font-size: .75rem; color: var(--muted); font-weight: 600; min-width: 26px; text-align: right; }
.brand-img { height: 150px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--bg); margin: .5rem 0 .7rem; overflow: hidden; text-align: center; padding: 8px; }
.brand-img img { max-width: 100%; max-height: 130px; object-fit: contain; background: #fff; border-radius: 8px; }
.color-row { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.color-row input[type=color] { width: 52px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); }
.color-row input:not([type=color]) { flex: 1; font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); }
.swatches { display: flex; gap: 6px; margin: .7rem 0 .3rem; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.seo-panel { grid-column: 1 / -1; }
.seo-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: .5rem 0; display: grid; gap: .3rem; }
.seo-item small { color: var(--muted); }
.copy-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--bg); border-radius: 8px; padding: .45rem .7rem; }
.copy-line code { color: var(--brand); font-size: .85rem; word-break: break-all; }
@media (max-width: 1100px) { .st-layout { grid-template-columns: 1fr; } }

/* ---------- orders like Zatiq: list header, order page, create page ---------- */
.op-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 14px; }
.op-title h2 { margin: 0; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.op-title small { color: var(--muted); }
.op-tools { display: flex; gap: .4rem; flex-wrap: wrap; }
.op-link { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.op-link span { font-weight: 600; color: var(--brand); }
.op-link input { flex: 1; min-width: 200px; font: inherit; font-size: .9rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.op-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.op-col { display: grid; gap: 16px; min-width: 0; }
.op-col .panel h3 { margin: 0 0 10px; font-size: 1.02rem; color: var(--ink); }
.op-col .panel-title h3 { margin: 0; }
.panel.focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.op-items { display: grid; gap: 8px; }
.op-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.op-item-t { flex: 1; min-width: 0; }
.op-item-t b { display: block; color: var(--ink); font-weight: 600; }
.op-item-t small { color: var(--muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.op-img { width: 52px; height: 52px; flex: none; border-radius: 8px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.5rem; overflow: hidden; }
.op-img img { width: 100%; height: 100%; object-fit: cover; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sum-row.tot { font-size: 1.12rem; color: var(--ink); border-bottom: 2px solid var(--line); }
.sum-row.due b { color: var(--s-cancelled); }
.sum-in { display: flex; gap: 4px; }
.sum-in select, .sum-in input { font: inherit; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input, var(--card)); color: var(--text); }
.sum-in input { width: 110px; text-align: right; }
.sum-in input:disabled { opacity: .5; }
.pay-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin: 12px 0 4px; }
.pay-pick label { display: flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; cursor: pointer; }
.pay-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lbl { display: grid; gap: .25rem; font-weight: 500; margin-bottom: 10px; }
.lbl select, .lbl input, .lbl textarea, .input { font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: var(--input, var(--card)); color: var(--text); resize: vertical; }
.form.tight { gap: .6rem; margin-top: 12px; }
.form.tight input, .form.tight textarea { width: 100%; }
.cust.big .avatar { width: 46px; height: 46px; font-size: 1.05rem; }
.cust.big b { color: var(--ink); }
.btn.wide { width: 100%; justify-content: center; }
.btn.big { padding: .8rem 1rem; font-size: 1.05rem; }
.val { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; }
.val span { font-size: .88rem; }
.val.good { background: #f0fdf4; color: #166534; }
.val.warn { background: #fffbeb; color: #92400e; }
.val.bad { background: #fef2f2; color: #991b1b; }
.val.new { background: #eff6ff; color: #1e40af; }
.val-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; text-align: center; }
.val-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; }
.val-grid b { display: block; font-size: 1.1rem; color: var(--ink); }
.val-grid small { color: var(--muted); font-size: .75rem; }
.small { font-size: .85rem; }
.block { display: block; }
.switch-row { display: flex; gap: .6rem; align-items: flex-start; margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch-row small { display: block; color: var(--muted); }
.switch-row.on { border-color: #fecaca; background: #fef2f2; }
.switch-row input { margin-top: 4px; accent-color: var(--s-cancelled); }
.hist-box { margin: 2px 0 6px; }
.st-sel { font: inherit; font-size: .88rem; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: .25rem .55rem; background: var(--card); color: var(--text); cursor: pointer; }
.st-sel.s-pending { color: var(--s-pending); border-color: #ddd6fe; }
.st-sel.s-confirmed { color: var(--s-confirmed); border-color: #bfdbfe; }
.st-sel.s-shipped { color: var(--s-shipped); border-color: #a5f3fc; }
.st-sel.s-delivered { color: var(--s-delivered); border-color: #bbf7d0; }
.st-sel.s-cancelled { color: var(--s-cancelled); border-color: #fecaca; }
.lbl .st-sel { border-radius: 8px; }
.acts a { text-decoration: none; font-size: 1.05rem; padding: .25rem .35rem; }
.oid a { color: var(--ink); text-decoration: none; }
.card.date b { font-size: 1.1rem; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; margin: 10px 0 14px; padding: 2px; }
.pick { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.pick:hover { border-color: var(--brand); }
.pick.on { border-color: var(--brand); background: var(--brand-soft); }
.pick .op-img { width: 40px; height: 40px; font-size: 1.2rem; }
.pick b { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); line-height: 1.25; }
.pick small { color: var(--muted); font-size: .8rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: 0; background: var(--bg); color: var(--ink); width: 30px; height: 30px; font-size: 1rem; cursor: pointer; }
.qty b { min-width: 30px; text-align: center; }
.op-item .lt { min-width: 70px; text-align: right; }
.empty-line { text-align: center; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; margin: 0; }
@media (max-width: 1080px) { .op-grid { grid-template-columns: 1fr; } }
html[data-theme="dark"] .val.good { background: #052e1a; color: #86efac; }
html[data-theme="dark"] .val.warn { background: #3a2a05; color: #fcd34d; }
html[data-theme="dark"] .val.bad, html[data-theme="dark"] .switch-row.on { background: #3b0d0d; color: #fca5a5; border-color: #7f1d1d; }
html[data-theme="dark"] .val.new { background: #172554; color: #bfdbfe; }
#pathao-box select, #pathao-box input, #access-box textarea { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input, var(--card)); color: var(--text); width: 100%; }
#pathao-box .row input { width: 80px; }
#pathao-box .grid2 { margin: 8px 0; }
.op-col.side .seg-radio label { white-space: nowrap; }
.lang-btn { font-size: .85rem; font-weight: 700; }

/* shop settings: Zatiq-like menu on the left, one page at a time */
.st-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.st-nav { position: sticky; top: 76px; display: grid; gap: 4px; padding: 8px; }
.st-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid transparent; background: none; color: var(--text); border-radius: 10px; padding: 9px 10px; font: inherit; cursor: pointer; text-decoration: none; }
.st-nav-item b { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; }
.st-nav-item small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.st-nav-item:hover { background: var(--bg); }
.st-nav-item.active { background: var(--brand-soft); border-color: var(--brand); }
.st-nav-item.active b { color: var(--brand); }
.st-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--bg); display: grid; place-items: center; font-size: 1.05rem; }
.st-nav-item.active .st-ic { background: var(--card); }
.st-nav-link { border-top: 1px dashed var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; padding-top: 12px; }
.st-go { margin-left: auto; color: var(--muted); }
.st-body { display: grid; gap: 14px; min-width: 0; }
.st-sec { display: grid; gap: 14px; }
.st-head h2 { margin: 0; font-size: 1.25rem; color: var(--ink); }
.st-head p { margin: 2px 0 0; }
.st-body .st-save { position: sticky; bottom: 10px; z-index: 5; box-shadow: 0 6px 24px rgba(15, 23, 42, .12); }
@media (max-width: 900px) { .st-shell { grid-template-columns: 1fr; } .st-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .st-nav-item small { display: none; } .st-nav-link { border-top: 0; margin: 0; padding-top: 9px; } }

/* authors & trainers page */
.tr-list { display: grid; gap: 14px; margin-top: 14px; }
.tr-card { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; }
.tr-photo { display: grid; gap: 8px; justify-items: center; align-content: start; }
.tr-pic { width: 130px; height: 130px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: var(--brand); border: 3px solid var(--line); }
.tr-pic img { width: 100%; height: 100%; object-fit: cover; }
.tr-order { display: flex; gap: 6px; }
.tr-fields { gap: .55rem; }
.tr-fields input, .tr-fields textarea { width: 100%; }
.tr-links { border-top: 1px dashed var(--line); padding-top: 10px; }
.tr-links .grid2 { margin-top: 8px; }
@media (max-width: 700px) { .tr-card { grid-template-columns: 1fr; } }

/* website editor */
.se-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.se-more { display: grid; gap: 6px; border-top: 1px dashed var(--line); margin-top: 6px; padding: 12px 10px 4px; font-size: .88rem; }
.se-more b { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.se-more a { color: var(--brand); text-decoration: none; }
.se-list { display: grid; gap: 10px; }
.se-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.se-item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.se-item .form { gap: .5rem; }
.grid3 { display: grid; grid-template-columns: 90px 1fr 1fr; gap: .6rem; }
.grid3 label { display: grid; gap: .25rem; font-weight: 500; min-width: 0; }
.se-img { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.se-img-box { width: 180px; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px dashed var(--line); background: var(--card); display: grid; place-items: center; overflow: hidden; flex: none; text-align: center; padding: 4px; }
.se-img-box img { width: 100%; height: 100%; object-fit: cover; }
.se-img-ctl { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.se-img-ctl input { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input, var(--card)); color: var(--text); width: 100%; }
.se-order { display: grid; gap: 6px; }
.se-ord-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.se-ord-n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.se-dirty { color: #b45309; font-weight: 600; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.icon-cell { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; justify-items: center; text-align: center; }
.icon-prev { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.icon-prev svg { width: 24px; height: 24px; }
.icon-prev img { width: 30px; height: 30px; object-fit: contain; }
.icon-prev .ic-letter { font-weight: 800; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }

/* line icons (assets/icons.js) instead of emoji */
.aic { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sidebar nav a > span .aic { width: 19px; height: 19px; }
.st-ic .aic { width: 19px; height: 19px; color: var(--brand); }
.card .ic .aic { width: 24px; height: 24px; color: var(--brand); }
.op-img .aic { width: 26px; height: 26px; color: var(--brand); }
.panel h3 .aic, .panel h2 .aic, .op-title h2 .aic, .st-head h2 .aic { color: var(--brand); }
.se-icsel { display: flex; gap: 6px; align-items: center; }
.se-icsel select { flex: 1; min-width: 0; }
.se-icprev { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.se-icprev .aic { width: 20px; height: 20px; }
.todo-row > span:first-child .aic { width: 20px; height: 20px; color: var(--brand); }
.aic-r { margin-inline-end: .38em; }
.aic-l { margin-inline-start: .3em; }

/* customers + accounts */
.cu-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.cu-tabs button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.cu-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cu-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); }
.cu-stats b { display: block; font-size: 1.35rem; color: var(--ink); }
.cu-stats small { color: var(--muted); }
.sidebar nav a.sub-link { padding-left: 34px; font-size: .92rem; }
.avatar { position: relative; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--card); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }
.warn-text { color: #b45309; }
.pad { padding: 4px 2px 10px; margin: 0; }
.acc-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.acc-top h2 { margin: 0; }
.acc-top p { margin: 2px 0 4px; }
.avatar.big { width: 58px; height: 58px; font-size: 1.3rem; }
.acc-sessions { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.acc-sessions li { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.acc-sessions small { margin-left: auto; color: var(--muted); }
.acc-orders { display: grid; gap: 6px; }
.acc-order { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); text-decoration: none; }
.acc-order span:nth-child(2) { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-order small { grid-column: 1 / -1; color: var(--muted); }
.acc-order:hover { border-color: var(--brand); }
.timeline li.warn::before { background: #f59e0b; }

.pay-logo-sm { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; vertical-align: -3px; margin-right: 5px; background: #fff; }
.pay .aic { width: 14px; height: 14px; margin-right: 4px; color: #15803d; }
.avatar.admin-av { background: #0f172a; color: #fff; }
html[data-theme="dark"] .avatar.admin-av { background: #e2e8f0; color: #0f172a; }

/* shared save bar */
.save-bar { position: sticky; bottom: 10px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 8px 28px rgba(15, 23, 42, .14); }
.sb-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.sb-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.save-bar.dirty { border-color: #f59e0b; }
.save-bar.dirty .sb-state { color: #b45309; font-weight: 600; }
.save-bar.dirty .sb-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.save-bar .form-error:empty { display: none; }
.sb-discard:disabled { opacity: .45; cursor: not-allowed; }
.sb-save .aic, .sb-discard .aic { width: 18px; height: 18px; }

/* the save bar shows up only after something changed (or always for a new product) */
.save-bar { display: none !important; }
.save-bar.dirty, .save-bar.always { display: flex !important; animation: sb-in .18s ease-out; }
@keyframes sb-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* create order: physical / digital picker, price per line */
.type-pick { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.type-pick button { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 12px; padding: 10px 14px; font: inherit; cursor: pointer; }
.type-pick button b { display: block; color: var(--ink); }
.type-pick button small { color: var(--muted); font-size: .8rem; }
.type-pick button.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px var(--brand-soft); }
.type-pick button.on b { color: var(--brand); }
.line-price { width: 84px; font: inherit; font-size: .85rem; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--input, var(--card)); color: var(--text); }
.sum-row.due input { color: #b91c1c; font-weight: 700; }
@media (max-width: 700px) { .type-pick { grid-template-columns: 1fr; } }

/* new statuses + bulk window */
.pill.on_hold { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.pill.returned { color: #7e22ce; background: #faf5ff; border-color: #e9d5ff; }
.st-sel.s-on_hold { color: #b45309; border-color: #fde68a; }
.st-sel.s-returned { color: #7e22ce; border-color: #e9d5ff; }
.tab.t-on_hold .n { color: #b45309; } .tab.t-returned .n { color: #7e22ce; }
.bulk-dlg { border: 0; border-radius: 16px; padding: 22px 22px 18px; width: min(420px, 94vw); background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(15, 23, 42, .35); }
.bulk-dlg::backdrop { background: rgba(15, 23, 42, .45); }
.bulk-dlg h3 { margin: 0 0 14px; color: var(--ink); }
.bulk-dlg .bulk-x { position: absolute; right: 12px; top: 12px; }
.bulk-count { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; font-weight: 600; }
.bulk-dlg .row.end { margin-top: 12px; }

/* dashboard: income per period */
.pcard b { display: block; }
.delta { display: inline-block; margin-top: 4px; font-size: .78rem; font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.delta.up { color: #15803d; background: #f0fdf4; } .delta.down { color: #b91c1c; background: #fef2f2; } .delta.flat { color: var(--muted); background: var(--bg); }
html[data-theme="dark"] .delta.up { background: #052e1a; color: #86efac; } html[data-theme="dark"] .delta.down { background: #3b0d0d; color: #fca5a5; }

/* customer reviews page */
.note-warn { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.note-warn a { text-decoration: underline; font-weight: 600; }
.a-stars { display: inline-flex; gap: 1px; font-size: 1rem; line-height: 1; }
.a-stars i { font-style: normal; color: #d1d5db; }
.a-stars i.on { color: #f59e0b; }
.rv-admin { display: grid; gap: 10px; margin-top: 12px; }
.rv-a { display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.rv-a:hover { background: var(--hover); }
.rv-a-prod { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.rv-a-prod img, .rv-a-ph { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; background: var(--bg); display: grid; place-items: center; }
.rv-a-prod a { color: var(--ink); }
.rv-a-prod a:hover b { color: var(--brand); text-decoration: underline; }
.rv-a-prod b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .93rem; }
.rv-a-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .3rem; }
.rv-a-who b { color: var(--ink); }
.rv-a-body h4 { margin: .35rem 0 0; color: var(--ink); font-size: .98rem; }
.rv-a-body p { margin: .3rem 0 0; white-space: pre-line; }
.rv-a-reply { margin-top: .6rem; padding: .5rem .8rem; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 8px 8px 0; }
.rv-a-reply small { color: var(--brand); font-weight: 600; }
.rv-a-form { margin-top: .6rem; display: grid; gap: .5rem; }
.rv-a-form textarea { font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text); }
.rv-a-acts { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
@media (max-width: 900px) {
  .rv-a { grid-template-columns: 1fr; }
  .rv-a-acts { flex-direction: row; flex-wrap: wrap; }
}
html[data-theme="dark"] .note-warn { background: #3a2a0a; border-color: #854d0e; color: #fcd34d; }
html[data-theme="dark"] .a-stars i:not(.on) { color: #374151; }

/* digital delivery panel (order page) */
.df { display: grid; gap: 10px; }
.df-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.df-card > b { color: var(--ink); }
.df-k { display: block; font-size: .7rem; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: .35rem 0 .3rem; }
.df-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.df-top p { margin: .15rem 0 0; font-size: .88rem; }
.df-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.df-state { font-weight: 700; }
.df-state.ok { color: #16a34a; } .df-state.warn { color: #b45309; } .df-state.bad { color: #dc2626; }
.df-note { margin: .6rem 0 0; padding: .45rem .7rem; border-radius: 8px; font-size: .88rem; }
.df-note.bad { background: #fef2f2; color: #b91c1c; }
.df-links { display: grid; gap: 6px; }
.df-link { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--bg); }
.df-name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-count { font-weight: 700; font-size: .85rem; padding: .05rem .5rem; border-radius: 99px; border: 1px solid var(--line); }
.df-count.ok { color: #16a34a; border-color: #bbf7d0; } .df-count.warn { color: #b45309; border-color: #fcd34d; } .df-count.bad { color: #dc2626; border-color: #fecaca; }
.df-acts { display: flex; gap: 4px; }
.df-acts .icon-btn.sm { width: 30px; height: 30px; font-size: .9rem; }
.df-exp { grid-column: 1 / -1; font-size: .78rem; }
.df-edit { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .88rem; }
.df-edit input { font: inherit; padding: .25rem .45rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); }
.df-edit input[type=number] { width: 80px; }
.df-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .86rem; }
.df-act li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.df-act li:last-child { border-bottom: 0; }
@media (max-width: 640px) { .df-act li { grid-template-columns: 1fr; gap: 0; } }
html[data-theme="dark"] .df-note.bad { background: #3b0d0d; color: #fca5a5; }

/* blog list + editor */
.bl-admin { display: grid; gap: 10px; }
.bl-a { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card); }
.bl-a-cover { width: 120px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; font-size: 1.6rem; }
.bl-a-cover img { width: 100%; height: 100%; object-fit: cover; }
.bl-a-body b { color: var(--ink); } .bl-a-body small { display: block; margin-top: .2rem; } .bl-a-body p { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }
.bl-a-acts { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.bl-ed .rte-body.bl-body-ed { min-height: 420px; font-size: 1rem; line-height: 1.75; }
.bl-ed .rte-body img { max-width: 100%; border-radius: 8px; }
.bl-ed .rte-body iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.bl-ed .rte-body h2 { font-size: 1.35rem; } .bl-ed .rte-body pre { background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 8px; }
.bl-ed .rte-bar { position: sticky; top: 0; z-index: 2; }
.bl-ed .save-bar { justify-content: flex-end; }
@media (max-width: 760px) { .bl-a { grid-template-columns: 80px minmax(0, 1fr); } .bl-a-cover { width: 80px; } .bl-a-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* referrals / certificates / feedback */
.rf-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: .5rem; }
.rf-box legend { font-weight: 600; padding: 0 .3rem; }
.rf-box .row { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.block { display: block; }
.fb-a.is-new { border-left: 4px solid #f59e0b; }
/* trainers: profile page + portfolio */
.tr-more { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.tr-more summary { cursor: pointer; font-weight: 600; display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.tr-more[open] summary { margin-bottom: 8px; }
.tr-more .form, .tr-more label { margin-top: 6px; }
.pf-list { display: grid; gap: 8px; margin: 6px 0; }
.pf-row { display: grid; grid-template-columns: 1.4fr .5fr 1fr 1fr auto; gap: 6px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }
.pf-row textarea { grid-column: 1 / 5; }
.pf-row input, .pf-row textarea { font: inherit; font-size: .9rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); min-width: 0; }
@media (max-width: 760px) { .pf-row { grid-template-columns: 1fr 1fr; } .pf-row textarea { grid-column: 1 / -1; } }

/* community admin */
.rv-a.is-hidden { opacity: .6; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cm-alb { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.lb-medal { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); font-size: .78rem; }
.lb-medal.m1 { background: #fbbf24; color: #fff; } .lb-medal.m2 { background: #94a3b8; color: #fff; } .lb-medal.m3 { background: #d97706; color: #fff; }
