.admin { background: #f4f2ee; }
.adm-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.adm-head-in { height: 55px; box-sizing: border-box; padding: 0 20px; display: flex; gap: 16px; align-items: center; }
.adm-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 2px 6px; margin-inline-start: 6px; align-self: center; }
/* Shell: grouped side menu + page. Under 900px the menu is a drawer opened by the button in the header */
.adm-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); align-items: start; }
.adm-side { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; background: #fff; border-inline-end: 1px solid var(--line); scrollbar-width: thin; }
.adm-nav { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px 40px; }
.adm-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 14px 10px 4px; }
.adm-nav a { color: var(--ink); padding: 7px 10px; border-radius: 8px; font-size: .9rem; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.adm-nav a.on, .adm-nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.adm-nav a.on { font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.adm-right { display: flex; gap: 14px; align-items: center; font-size: .9rem; margin-inline-start: auto; }
.adm-main { max-width: 1280px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 24px 24px 60px; }
.adm-burger { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 0 9px; flex-direction: column; justify-content: center; gap: 4px; }
.adm-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.adm-scrim { display: none; }
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: minmax(0, 1fr); }
  .adm-burger { display: inline-flex; }
  .adm-side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 264px; height: auto; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  [dir=rtl] .adm-side { transform: translateX(100%); }
  body.nav-open .adm-side { transform: none; }
  body.nav-open .adm-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 20, 20, .35); z-index: 25; }
  .adm-main { padding: 18px 16px 60px; }
}
@media (max-width: 700px) {
  .adm-head-in { gap: 10px; padding: 8px 12px; }
  .adm-right { font-size: .85rem; gap: 10px; }
}
.adm-main h1 { font-family: var(--display); font-size: 1.8rem; }
.fr { color: var(--muted); font-weight: 400; font-size: .85em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: block; color: var(--ink); }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat.warn { border-color: var(--accent); background: var(--accent-soft); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
.tbl th, .tbl td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #faf8f4; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; background: #eee; white-space: nowrap; }
.chip.green { background: #e3f3ea; color: var(--ok); }
.chip.orange { background: var(--accent-soft); color: #8a3218; }
.chip.grey { background: #ececec; color: #555; }
.chip.blue { background: #e4ecfb; color: #234a9a; }
.help { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }
.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .72rem; font-weight: 700; cursor: help; margin-inline-start: 4px; vertical-align: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.inline { display: inline-flex; gap: 6px; align-items: center; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.task { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-title { font-weight: 600; }
.task form { margin: 0; }
.check-btn { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--ok); padding: 0; }
.task.done .check-btn { background: #e3f3ea; border-color: var(--ok); }
.mini-input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; width: 80px; background: #fff; }
.switch { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; cursor: pointer; }
.login-box { max-width: 380px; margin: 80px auto; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 40px; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
/* Tick boxes inside a .field (markets on codes, flash sales, banners) keep their own size */
.field input[type=checkbox], .field input[type=radio] { width: auto; padding: 0; flex: none; }
.field input[type=color] { height: 46px; padding: 4px; }

/* Team page: area ticks */
.staff-areas { grid-column: 1/-1; border: 0; padding: 0; margin: 0; }
.staff-areas label.check { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin: 8px 0; }
.staff-areas input[type=checkbox] { width: auto; }

/* Seller till (POS) */
.till-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.till-head h1 { margin: 0; }
.till { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.till-search { width: 100%; font-size: 1.05rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; box-sizing: border-box; }
.till-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.till-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; cursor: pointer; font: inherit; color: var(--ink); min-height: 44px; }
.till-tile:hover, .till-tile:focus-visible { border-color: var(--brand); }
.till-tile img, .till-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--soft, #f3f0ea); display: block; }
.till-name { font-size: .9rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.till-variants { grid-column: 1 / -1; background: #fff; border: 1px solid var(--brand); border-radius: var(--radius); padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.till-variants p { width: 100%; margin: 0; }
.till-other { margin-top: 14px; }
.till-other summary { cursor: pointer; font-weight: 600; }
.till-other-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.till-other-row input { padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; flex: 1 1 120px; }
.till-ticket { position: sticky; top: 12px; margin: 0; }
.till-ticket h2 { margin-top: 0; }
.till-line { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.till-lname { font-size: .92rem; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.till-qty { display: inline-flex; align-items: center; gap: 6px; }
.till-qty button, .till-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.05rem; line-height: 1; color: var(--ink); }
.till-x { border: 0; color: var(--muted); }
.till-ltotal { white-space: nowrap; }
.till-sum { margin-top: 10px; }
.till-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0; }
.till-row input { width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: right; }
.till-row[hidden] { display: none; }
.till-total { font-size: 1.35rem; }
.till-pay { border: 0; padding: 0; margin: 12px 0 4px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.till-pay label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.till-more { margin: 10px 0; }
.till-more summary { cursor: pointer; color: var(--muted); }
.till-go { width: 100%; justify-content: center; font-size: 1.05rem; padding: 14px; margin: 8px 0; }
.till-go:disabled { opacity: .45; cursor: not-allowed; }
.till-jump { display: none; }
.receipt-paper { background: #fff; max-width: 380px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
@media (max-width: 860px) {
  .till { grid-template-columns: 1fr; }
  .till-ticket { position: static; }
  .till-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .till-jump:not([hidden]) { display: block; position: fixed; left: 16px; right: 16px; bottom: 14px; background: var(--ink); color: #fff; text-align: center; padding: 14px; border-radius: 999px; font-weight: 600; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
}
@media print {
  .adm-head, .adm-side, .no-print, .flash { display: none !important; }
  .adm-shell { display: block; }
  body.admin, .adm-main { background: #fff; padding: 0; margin: 0; }
  .receipt-paper { border: 0; padding: 0; max-width: 80mm; }
}
#till-err[hidden], .till-jump.in-view { display: none !important; }

/* Seller dropshipping tables: cost to profit */
.ds-tbl th.num, .ds-tbl td.num { text-align: right; white-space: nowrap; }
.ds-tbl .ds-prod { min-width: 200px; }
.ds-loss { color: #b42318; }
.ds-formula { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.ds-top { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .ds-top { grid-template-columns: 1fr; } }
.ds-pair { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; white-space: nowrap; }
.ds-pair span { color: var(--muted); font-size: .82rem; }
.ds-sum { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 3px; font-weight: 700; }
.ds-profit { font-size: 1.1rem; }

/* ---- Seller plans ---- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.plan-grid .panel { margin: 0; display: flex; flex-direction: column; }
.plan-grid .panel form, .plan-grid .panel > p:last-child { margin-top: auto; }
.plan-card.on { border: 2px solid var(--accent); }
.plan-price { font-size: 1.8rem; font-weight: 700; margin: 4px 0 8px; }
.plan-list { padding-inline-start: 18px; margin: 8px 0 16px; line-height: 1.7; }


/* ---- Reports ---- */
.rep-tbl th { font-weight: 500; width: 60%; }
.rep-tbl td { text-align: end; font-variant-numeric: tabular-nums; }
.rep-tbl tr.rep-sub th, .rep-tbl tr.rep-sub td { font-weight: 700; border-top: 2px solid var(--line); }
.rep-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; overflow-x: auto; padding-bottom: 18px; }
.rep-bar { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.rep-bar span { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.rep-bar small { position: absolute; bottom: -18px; font-size: .62rem; color: var(--muted); white-space: nowrap; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rep-grid .panel { margin: 0 0 16px; }
.rep-tbl th { text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--ink); background: none; }

/* ---- Settings: features at a glance ---- */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.feat-group a { color: var(--ink); }
.feat-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .86rem; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.feat-row .chip { flex: none; }

/* ---- Dashboard ---- */
.btn-sm { padding: 7px 16px; font-size: .88rem; }
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.db-head h1 { margin: 0 0 2px; }
.db-head p { margin: 0; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--ink); font-size: .88rem; font-weight: 500; white-space: nowrap; }
.seg a:hover { text-decoration: none; background: var(--soft); }
.seg a.on { background: var(--brand); color: #fff; }
.db-status { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.db-status > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.db-status .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #c98a1b; box-shadow: 0 0 0 4px #fbefd9; }
.db-status.is-open .dot { background: var(--ok); box-shadow: 0 0 0 4px #e3f3ea; }
.db-todo h2 { margin: 0; }
.db-todo .sec-head { margin-bottom: 10px; }
.db-todo-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line); margin-top: 8px; }
.db-todo-row:hover { text-decoration: none; border-color: var(--brand); }
.db-todo-row b { min-width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1rem; padding: 0 6px; box-sizing: border-box; }
.db-todo-row.urgent b { background: #fbe4d6; color: #8a3218; }
.db-todo-row > span:not(.go) { flex: 1; }
.db-todo-row .go { color: var(--muted); }
.db-clear { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ok); font-weight: 500; }
.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.db-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.db-kpi:hover { text-decoration: none; border-color: var(--brand); }
.db-kpi .lbl { color: var(--muted); font-size: .84rem; font-weight: 500; }
.db-kpi b { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.db-kpi .delta { font-size: .8rem; font-weight: 600; }
.db-kpi .delta .muted { font-weight: 400; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.db-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
.db-grid .db-wide { grid-column: 1 / -1; }
.db-grid .panel h2 { margin: 0; }
.db-grid .sec-head { margin-bottom: 14px; }
.db-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 4px; }
@media (max-width: 900px) { .db-grid { grid-template-columns: minmax(0, 1fr); } }

/* Sales chart: one bar per day, value on hover or keyboard focus */
.db-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: 220px; padding-bottom: 22px; }
.db-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); text-align: end; margin: -6px 0; font-variant-numeric: tabular-nums; }
.db-plot { position: relative; display: flex; align-items: flex-end; gap: 2px; }
.db-gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.db-gl.base { border-top: 1px solid #cfc9bf; }
.db-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; outline: none; cursor: default; }
.db-col .bar { width: min(100%, 28px); background: var(--brand); border-radius: 4px 4px 0 0; position: relative; z-index: 1; }
.db-col:hover .bar, .db-col:focus-visible .bar { background: var(--accent); }
.db-col:hover, .db-col:focus-visible { background: rgba(23, 48, 122, .05); border-radius: 6px 6px 0 0; }
.db-col small { position: absolute; bottom: -20px; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.db-col .tt { display: none; position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .78rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 5; pointer-events: none; flex-direction: column; }
.db-col:first-child .tt, .db-col:nth-child(5) .tt { left: 0; transform: none; }
.db-col:last-child .tt { left: auto; right: 0; transform: none; }
.db-col:hover .tt, .db-col:focus-visible .tt { display: flex; }
.db-table { margin-top: 10px; }
.db-table summary { cursor: pointer; }
.db-table .tbl-wrap { margin-top: 8px; max-height: 280px; overflow-y: auto; }
.db-empty { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.db-empty p { margin: 0; flex: 1 1 220px; }
.db-empty-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; width: 220px; border-bottom: 1px solid var(--line); }
.db-empty-bars span { flex: 1; background: var(--brand-soft); border-radius: 3px 3px 0 0; }

/* Orders in progress */
.db-pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.db-pipe-step { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.db-pipe-step b { font-size: 1.3rem; color: #b5aea4; }
.db-pipe-step.has b { color: var(--ink); }
.db-pipe-step.warn { border-color: #f0b892; background: #fdf1e9; }
.db-pipe-step.warn b { color: #8a3218; }
.db-pipe-step:hover { text-decoration: none; border-color: var(--brand); }

/* Funnel */
.db-fun { margin: 0 0 10px; }
.db-fun-l { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 4px; }
.db-fun-l b { font-variant-numeric: tabular-nums; }
.db-fun-track { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.db-fun-track span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }

/* Ranked lists, tiles, checklist */
.db-rank { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.db-rank:last-child { border-bottom: 0; }
.db-rank .n { color: var(--muted); font-size: .8rem; min-width: 22px; font-variant-numeric: tabular-nums; }
.db-rank .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.db-rank .name a { color: var(--ink); }
.db-rank b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.db-mini a { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); display: flex; flex-direction: column; }
.db-mini a:hover { text-decoration: none; border-color: var(--brand); }
.db-mini b { font-size: 1.3rem; }
.db-mini span { font-size: .84rem; }
.db-mini small { color: var(--muted); font-size: .76rem; }
.db-progress { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.db-progress span { display: block; height: 100%; background: var(--ok); }
.db-task { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: .9rem; }
@media (max-width: 520px) {
  .seg { width: 100%; }
  .seg a { flex: 1; text-align: center; padding: 6px 4px; }
  .db-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .db-kpi b { font-size: 1.3rem; }
  .db-chart { height: 180px; }
}
.adm-burger, .adm-head .brand { flex: none; }
.adm-right a, .adm-right button { white-space: nowrap; }
.db-nowrap { white-space: nowrap; }
@media (max-width: 520px) {
  .adm-right .adm-me { display: none; }
  .db-col small.minor { display: none; }
}
.adm-shop { font-weight: 700; padding: 10px 10px 2px; font-size: .95rem; overflow-wrap: anywhere; }
.adm-shop small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
[dir=rtl] .adm-nav a.on { box-shadow: inset -3px 0 0 var(--brand); }
[dir=rtl] .db-col .tt { left: auto; right: 50%; transform: translateX(50%); }
.db-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }

/* Categories (admin) */
.cat-tbl td { vertical-align: top; }
.cat-names { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cat-sub td:first-child { padding-inline-start: 28px; }
.cat-arrow { color: var(--muted); }
.cat-more { margin-top: 6px; }
.cat-more summary, .cat-del summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.cat-more .form-grid { margin-top: 8px; min-width: 420px; }
.cat-del { display: inline-block; margin-inline-start: 6px; }
.cat-del form { margin-top: 6px; display: grid; gap: 6px; }
tr.muted input { opacity: .7; }
@media (max-width: 700px) { .cat-more .form-grid { min-width: 0; } .cat-sub td:first-child { padding-inline-start: 12px; } }

/* Seller reviews */
.rv-stars { display: grid; gap: 6px; max-width: 460px; }
.rv-star { display: grid; grid-template-columns: 80px 1fr 36px; gap: 10px; align-items: center; font-size: .9rem; }
.rv-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.rv-head { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; margin: 0; }
.rv-todo { border-color: var(--accent); }
.rv-form { margin-top: 10px; }
.rv-form textarea { width: 100%; box-sizing: border-box; }

/* Seller stock bar */
.stock-bar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stock-at { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.stock-quick { display: inline-flex; gap: 4px; align-items: center; }

/* Dashboard extras: 12 months, lost tiles, satisfaction */
.db-legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.db-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-inline-end: 4px; }
.sw-a, .db-month .bar.a { background: var(--brand); }
.sw-b, .db-month .bar.b { background: var(--accent); }
.db-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 190px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.db-month { position: relative; display: flex; flex-direction: column; align-items: center; height: 100%; outline: none; }
.db-month-bars { flex: 1; width: 100%; display: flex; gap: 2px; align-items: flex-end; justify-content: center; }
.db-month .bar { width: 42%; max-width: 18px; border-radius: 4px 4px 0 0; min-height: 0; }
.db-month small { font-size: .7rem; color: var(--muted); margin-top: 4px; white-space: nowrap; transform: translateY(18px); }
.db-months { margin-bottom: 22px; }
.db-month .tt { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #111; color: #fff; padding: 6px 9px; border-radius: 8px; font-size: .78rem; white-space: nowrap; z-index: 5; }
.db-month:hover .tt, .db-month:focus .tt { display: block; }
.db-pipe-step.lost.has { border-color: var(--line); color: var(--muted); }
.db-sat-avg { font-size: 1.05rem; margin: 0 0 10px; }
.db-sat-avg b { font-size: 1.6rem; }
.sat-good span { background: var(--ok) !important; }
.sat-bad span { background: var(--bad) !important; }
@media (max-width: 600px) { .db-month small.minor { visibility: hidden; } .db-months { gap: 3px; } }
.adm-find { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; background: var(--soft); }
.adm-nav a[hidden], .adm-group[hidden] { display: none !important; }
.db-promo { background: linear-gradient(135deg, var(--brand-soft, #eef2fb), #fff); border-color: var(--accent); }

/* Till v2 (root-de 2026-10-24): channel select, discount amount or %, delivery */
.till-row select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.till-disc { display: flex; gap: 6px; }
.till-disc input { width: 90px; }
.till-more textarea { width: 100%; box-sizing: border-box; }
.receipt-paper.w58 { max-width: 58mm; font-size: 12px; }
.receipt-paper.wA4 { max-width: 640px; }
@media print { .receipt-paper.w58 { max-width: 58mm; } .receipt-paper.wA4 { max-width: none; } }

/* Seller share kit (root-de 2026-10-24) */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-row input { flex: 1 1 260px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #f7f9fb; }
.share-qr { margin-top: 14px; }
.share-qr img, .share-qr canvas { background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.share-prod { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.share-prod img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.share-name { flex: 1 1 180px; min-width: 0; }
.share-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.share-acts .btn { padding: 6px 10px; font-size: .9rem; }
/* Seller product options */
.opt-gen { margin: 10px 0; background: var(--soft); }
.opt-tbl .mini-input { width: 100%; box-sizing: border-box; min-width: 90px; }
#opt-box[hidden], #single-stock[hidden] { display: none !important; }
/* Seller shop page */
.sp-cover { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.sp-logo { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; display: block; margin: 4px 0 8px; border: 1px solid var(--line); }
.bl-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.bl-line select { flex: 1 1 220px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.bl-line input { width: 70px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.sh-box .db-mini > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; }
.chip.red { background: #fde8e8; color: var(--bad, #b42318); }
/* Seller first steps */
.db-steplist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.db-steplist li { display: flex; gap: 10px; align-items: center; }
.db-steplist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.db-steplist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.db-steplist li.done span:last-child { color: var(--muted); text-decoration: line-through; }
@media (min-width: 700px) { .db-pipe.db-pipe-4 { grid-template-columns: repeat(4, 1fr); } }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
/* Dashboard icons (6amMart-style cards) */
.db-kpi, .db-pipe-step { position: relative; }
.db-ico { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft, #eef2fb); color: var(--brand); }
.db-ico.sm { top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; }
.db-pipe-step.warn .db-ico { background: #fde9df; color: #b5471b; }
.db-pipe-step.lost .db-ico { background: var(--soft); color: var(--muted); }
[dir="rtl"] .db-ico { right: auto; left: 12px; }
@media (max-width: 520px) { .db-ico { width: 28px; height: 28px; top: 10px; right: 10px; } .db-ico svg { width: 15px; height: 15px; } }
.db-kpi .lbl { display: block; padding-inline-end: 40px; }
.db-pipe-step > span:last-child { padding-inline-end: 30px; }
.db-mini > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); display: flex; flex-direction: column; }
.db-mini small { color: var(--muted); font-size: .76rem; }
.ds-top > * { min-width: 0; } /* root-de: grid items shrink, so the price table scrolls inside its box on phones */
.bulk-bar { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
/* Help bubble text shown on tap */
.tip { cursor: pointer; }
.tip-pop { display: block; margin: 6px 0; padding: 8px 10px; background: #111; color: #fff; border-radius: 8px; font-size: .82rem; font-weight: 400; line-height: 1.4; text-transform: none; letter-spacing: 0; max-width: 360px; white-space: normal; }
th .tip-pop { position: absolute; z-index: 20; }

/* root-de seller phone sweep 2026-10-24: the 12-month chart fits a phone, small link-buttons are easier to tap */
.db-months { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .db-month small { font-size: .62rem; }
  .db-month:nth-child(even) small { visibility: hidden; }
  .adm-main .linkish { display: inline-block; padding: 8px 2px; }
  .adm-main .btn-sm, .adm-main .btn.btn-sm { min-height: 36px; }
}
/* Product options as cards on phones: name on top, then price and stock side by side */
@media (max-width: 600px) {
  .opt-tbl, .opt-tbl tbody { display: block; }
  .opt-tbl thead { display: none; }
  .opt-tbl tr { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 6px 8px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .opt-tbl td { display: block; padding: 0; border: 0; }
  .opt-tbl td::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
  .opt-tbl td.opt-name { grid-column: 1 / 3; }
  .opt-tbl td.opt-x { grid-column: 3; grid-row: 1; align-self: end; }
  .opt-tbl td.opt-en, .opt-tbl td.opt-sku { font-size: .9rem; }
  .opt-tbl .mini-input { width: 100% !important; min-width: 0; }
  .opt-tbl + * { margin-top: 4px; }
}
@media (max-width: 600px) {
  .opt-tbl td.opt-price { grid-column: 1; grid-row: 2; }
  .opt-tbl td.opt-stock { grid-column: 2 / 4; grid-row: 2; }
  .opt-tbl td.opt-en { grid-column: 1; grid-row: 3; }
  .opt-tbl td.opt-sku { grid-column: 2 / 4; grid-row: 3; }
}
details.db-steps > summary { cursor: pointer; list-style: none; }
details.db-steps > summary::-webkit-details-marker { display: none; }
details.db-steps > summary h2::after { content: " ▾"; color: var(--muted); font-size: .8em; }
details.db-steps[open] > summary h2::after { content: " ▴"; }

/* root-de admin phone sweep: any table with class tbl-cards turns into one card per row under 600px (cells need data-label) */
@media (max-width: 600px) {
  .tbl-wrap:has(> .tbl-cards) { border: 0; overflow: visible; }
  .tbl-cards, .tbl-cards tbody { display: block; }
  .tbl-cards tr:has(> th) { display: none; }
  .tbl-cards tr { display: block; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
  .tbl-cards td { display: block; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .tbl-cards td::after { content: ''; display: block; clear: both; }
  .tbl-cards td[data-label]::before { content: attr(data-label); float: left; margin-right: 12px; color: var(--muted); font-size: .8rem; text-align: left; }
  .tbl-cards td:first-child { text-align: left; font-size: 1.02rem; }
  .tbl-cards td form, .tbl-cards td .toolbar { justify-content: flex-end; }
  .tbl-cards td input:not([type=checkbox]):not([type=radio]) { max-width: 100%; }
  .tbl-cards td:empty { display: none; }
  .order-filters { gap: 8px; }
  .order-filters .mini-input, .order-filters select { flex: 1 1 45%; min-width: 0; width: auto !important; }
  .order-filters label.small { flex: 1 1 45%; display: flex; gap: 6px; align-items: center; }
  .order-filters label.small input[type=date] { flex: 1; min-width: 0; }
}
@media (max-width: 600px) {
  .adm-main form.toolbar select.mini-input, .adm-main form.toolbar input.mini-input:not([type=checkbox]) { flex: 1 1 40%; min-width: 0; width: auto !important; }
}
@media (max-width: 600px) { .adm-main { overflow-wrap: break-word; } .adm-main a[href^="http"] { overflow-wrap: anywhere; } }
@media (max-width: 600px) { .task > * { min-width: 0; } }
/* Admin dashboard on phones: fold after the numbers (root-69) */
.db-more { display: none; }
@media (max-width: 600px) {
  .db-more { display: block; margin: 4px 0 12px; }
  .db-grid.db-folded > section:not(.db-keep) { display: none; }
}
/* root-de Settings: chips, find box, collapsible groups, sticky Save */
.set-tools { display: grid; gap: 8px; margin-bottom: 14px; }
.set-tools #set-find { width: 100%; box-sizing: border-box; padding: 10px 12px; }
.set-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.set-chips .chip { white-space: nowrap; }
details.set-group > summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; list-style: none; }
details.set-group > summary > .small { white-space: nowrap; }
details.set-group > summary > h2 { flex: 1; }
details#g-glance > summary { cursor: pointer; }
details.set-group > summary::-webkit-details-marker { display: none; }
details.set-group > summary h2 { margin: 0; }
details.set-group > summary::after { content: '▾'; color: var(--muted); }
details.set-group[open] > summary::after { content: '▴'; }
details.set-group[open] > summary { margin-bottom: 12px; }
.set-save { position: sticky; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; margin: 0 -12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; box-shadow: 0 -4px 12px rgba(0,0,0,.05); }
.set-group[hidden], .field[hidden] { display: none !important; }
/* tbl-cards: cells marked tc-mini sit side by side on one line (e.g. country, items, payment) */
@media (max-width: 600px) {
  .tbl-cards td.tc-mini { display: inline-block; text-align: left; margin-right: 14px; }
  .tbl-cards td.tc-mini::before { float: none; margin-right: 4px; }
  .tbl-cards td.tc-mini::after { display: none; }
}
.help-sec > summary { cursor: pointer; list-style: none; } .help-sec > summary::-webkit-details-marker { display: none; }
.help-sec > summary h2 { margin: 0; } .help-sec > summary h2::after { content: " ▾"; color: var(--muted); font-size: .8em; } .help-sec[open] > summary h2::after { content: " ▴"; }
.help-sec ul { margin: 10px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; }
.jump-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.jump-bar .chip { white-space: nowrap; }
[id^="s-"] { scroll-margin-top: 70px; }

/* Till: camera scanner (root-69) */
.till-searchrow { display: flex; gap: 8px; align-items: flex-start; }
.till-searchrow .till-search { flex: 1; min-width: 0; }
.till-cam-btn { white-space: nowrap; padding-top: 12px; padding-bottom: 12px; }
#till-scan-msg { color: var(--accent); margin: -6px 0 10px; }
.till-cam { border: 0; border-radius: var(--radius); padding: 12px; width: min(480px, calc(100vw - 32px)); box-sizing: border-box; }
.till-cam::backdrop { background: rgba(0,0,0,.6); }
.till-cam video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 4/3; object-fit: cover; display: block; }
.till-cam p { margin: 10px 0; min-height: 2.6em; }
.till-cam .btn { width: 100%; }

/* Till: tickets on hold (root-69) */
#till-hold { margin-left: 12px; }
.till-held { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.till-held p { margin: 4px 0 6px; }
.till-held-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.till-held-row .btn { flex: 1; min-width: 0; justify-content: flex-start; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Till sales: cash drawer count (root-69) */
.till-close summary { cursor: pointer; }
.till-close form { margin-top: 12px; }
.till-close-n { display: block; font-size: 1.15rem; padding: 8px 0; }
.till-close .tbl-wrap { margin-top: 14px; }

/* Till: returning customer picker */
.till-cust { position: relative; }
.till-cust-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--card, #fff); border: 1px solid var(--line, #ddd); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); overflow: hidden; }
.till-cust-list button { display: block; width: 100%; text-align: start; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line, #eee); background: none; cursor: pointer; font: inherit; }
.till-cust-list button:last-child { border-bottom: 0; }
.till-cust-list button:hover, .till-cust-list button:focus { background: var(--soft, #f3f5f9); }
.till-cust-info { color: var(--green, #1a7f37); margin: 0 0 6px; }
/* root-de till sweep: stat tiles two per row on phones instead of one long column */
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; overflow-wrap: anywhere; }
}

/* Till: make a product from an unknown scanned code */
.till-new { border: 0; border-radius: 14px; padding: 18px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.till-new::backdrop { background: rgba(16,24,40,.45); }
.till-new h3 { margin: 0 0 6px; }
.till-new .field { display: grid; gap: 4px; margin: 10px 0; }
.till-new input { width: 100%; box-sizing: border-box; }
#till-scan-msg .btn { margin-inline-start: 6px; }

/* Seller product form: Duplicate button 2026-10-24 (root-11) */
.dup-form { display: flex; align-items: center; gap: 6px; margin: -4px 0 14px; }

/* Goods in and stock count (seller/till/stock) */
.stk-mode { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.stk-mode label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.stk-found { display: grid; gap: 4px; margin: 6px 0; }
.stk-found button { text-align: start; padding: 9px 12px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--card, #fff); cursor: pointer; font: inherit; }
/* root-de: hidden flash messages stay hidden (.flash.bad sets display:block, which beat the hidden attribute: empty pink bar on Till stock) */
.flash[hidden] { display: none !important; }

/* Seller profile: ways of selling */
.ways { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.way { border: 1px solid var(--line, #e4e7ec); border-radius: 12px; padding: 12px; }
.way p { margin: 0 0 6px; }
