/* Seller Command Centre - one look for every page (owner, 22 Nov 2026).
   Tokens first, then base elements, controls (inputs / selects / buttons), layout, components.
   Pages add only what is truly their own; buttons and fields always come from here. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink: #101828; --ink-2: #344054; --muted: #667085; --faint: #98a2b3;
  --line: #d0d5dd; --line-soft: #eaecf0; --bg: #f5f6f8; --surface: #fff; --hover: #f9fafb;
  --brand: #1f6feb; --brand-dark: #175cd3; --brand-soft: #eff4ff; --brand-ring: rgba(31,111,235,.18);
  --red: #b42318; --red-soft: #fef3f2; --red-line: #fda29b;
  --amber: #b54708; --amber-soft: #fffaeb; --green: #067647; --green-soft: #ecfdf3;
  --radius: 8px; --radius-lg: 12px;
  --control-h: 36px; --control-h-sm: 30px;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
       -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--red); font-size: 14px; margin-top: 10px; }
code { background: #f2f4f7; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
iframe { width: 100%; border: 0; border-radius: var(--radius-lg); background: var(--surface); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 12px 0 6px; }

/* ---------------------------------------------------------------- form fields */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=number], input[type=tel], input[type=url], input:not([type]), select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  height: var(--control-h); padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; max-width: 100%;
}
textarea { height: auto; min-height: 80px; padding: 8px 10px; }
select { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input:disabled, select:disabled, textarea:disabled { background-color: #f2f4f7; color: var(--muted); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; vertical-align: middle; }
input[type=file] { font: inherit; font-size: 13px; color: var(--ink-2); }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; height: var(--control-h); padding: 0 14px; margin-right: 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--hover); }
.field-sm, .act input, .act select { height: var(--control-h-sm); font-size: 13px; padding: 0 8px; }
.act select { padding-right: 26px; background-position: right 8px center; }
.w-full { width: 100%; }

/* ---------------------------------------------------------------- buttons
   button / .btn          primary (blue): the main action of a form or row
   .btn-secondary         white with a border (also .light, .tool, details.pick summary)
   .danger                red outline (deactivate ...)
   .link-button           text only
   .btn-sm                small (table rows; also any button inside .act / .acts) */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-h); padding: 0 14px; margin: 0; width: auto;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover, .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
button:focus-visible, .btn:focus-visible, .tool:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
button:disabled, .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.btn-secondary, .light, .tool, details.pick > summary {
  display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 12px; width: auto; margin: 0;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; list-style: none;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); text-decoration: none;
}
.btn-secondary:hover, .light:hover, .tool:hover, details.pick > summary:hover { background: var(--hover); border-color: var(--line); color: var(--ink); }
.danger { color: var(--red); background: var(--surface); border: 1px solid var(--red-line); }
.danger:hover { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.link-button { color: var(--brand); background: none; border: 0; box-shadow: none; padding: 0 6px; font-weight: 500; }
.link-button:hover { background: var(--brand-soft); color: var(--brand-dark); border: 0; }
.btn-sm, .act button, .acts button, .acts .btn { height: var(--control-h-sm); padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
details.pick > summary::-webkit-details-marker { display: none; }

/* ---------------------------------------------------------------- layout */
.shell { display: flex; min-height: 100vh; }
.page { flex: 1 1 auto; min-width: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
main.wide { max-width: 1500px; }
.narrow { max-width: 420px; margin: 40px auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 16px; min-height: 48px;
         background: var(--surface); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 30; }
header h1 { font-size: 16px; font-weight: 600; margin: 0; }
header h1 a { color: inherit; text-decoration: none; }
.head-right { display: flex; align-items: center; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 16px 18px;
        margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 17px; font-weight: 600; }
.card.ok, .msg-ok { background: var(--green-soft); border-color: #abefc6; color: #054f31; }
.card.error, .msg-error { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.card.warn { background: var(--amber-soft); border-color: #fedf89; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- tables */
.wrap { overflow: auto; }
.rt, .ads { width: 100%; border-collapse: collapse; }
.rt td, .rt th, .ads td, .ads th { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 13px; vertical-align: middle; }
.rt th, .ads th { font-size: 12px; font-weight: 600; color: var(--muted); background: #f9fafb; white-space: nowrap; }
.rt tbody tr:hover td, .ads tbody tr:hover td { background: var(--hover); }
.rt td.num, .rt th.num, .ads td.num, .ads th.num, .rt .num { text-align: right; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
.sort-arrow { font-size: 10px; }

/* ---------------------------------------------------------------- chips, tags, pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; align-items: center; }
.chips .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.chips a { font-size: 13px; font-weight: 500; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
           text-decoration: none; color: var(--ink-2); background: var(--surface); }
.chips a:hover { background: var(--hover); }
.chips a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag, .st, .stock, .pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px;
                           background: #f2f4f7; color: var(--ink-2); white-space: nowrap; }
.pill { background: var(--brand-soft); color: var(--brand-dark); margin: 2px; }
.fresh { display: flex; flex-wrap: wrap; gap: 8px; }
.fresh span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--green-soft); color: #054f31; }
.fresh span.stale { background: var(--red-soft); color: var(--red); }
.qr svg { width: 200px; height: 200px; }

/* ---------------------------------------------------------------- reminder bell */
.bell { position: relative; }
.bell-btn { height: 36px; width: 36px; padding: 0; background: none; border: 0; box-shadow: none; color: var(--ink-2); position: relative; }
.bell-btn:hover { background: #f2f4f7; color: var(--ink); border: 0; }
.bell-badge { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
              background: #f79009; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.bell-badge.red { background: #d92d20; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 100; width: 340px; max-width: 90vw; max-height: 70vh;
              overflow: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
              box-shadow: var(--shadow-lg); padding: 6px; }
.bell-title { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 8px; text-transform: uppercase; letter-spacing: .05em; }
.bell-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.bell-item:hover { background: #f2f4f7; color: var(--ink); }
.bell-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.bell-item.red .bell-dot { background: #d92d20; } .bell-item.amber .bell-dot { background: #f79009; }
.bell-text { flex: 1; display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
.bell-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-count { font-weight: 700; font-size: 13px; }
.bell-empty { padding: 10px 8px; }

/* ---------------------------------------------------------------- left menu (~10% wide; collapses to icons) */
.side { flex: 0 0 clamp(150px, 10vw, 240px); position: sticky; top: 0; height: 100vh; overflow-y: auto;
        background: #0b1f3a; color: #cfd8e3; display: flex; flex-direction: column; padding: 10px 8px;
        transition: flex-basis .2s ease; font-size: 13px; }
.side-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nav-brand { color: #fff; font-weight: 700; font-size: 12px; line-height: 1.25; }
.side button { height: auto; width: auto; padding: 0; margin: 0; background: none; border: 0; box-shadow: none;
               color: inherit; border-radius: var(--radius); font-size: 13px; font-weight: 500; justify-content: flex-start; }
.side button:hover { color: #fff; }
.nav-toggle { padding: 7px !important; display: flex; }
.nav-toggle:hover, .nav-item:hover, .nav-head:hover { background: rgba(255,255,255,.08) !important; }
.nav-group { margin-bottom: 6px; }
.nav-head { display: flex !important; justify-content: space-between !important; align-items: center; width: 100% !important;
            padding: 6px 8px !important; text-transform: uppercase; letter-spacing: .05em; font-size: 11px !important;
            font-weight: 600 !important; color: #8fa3bb !important; text-align: left; }
.nav-head .ico { width: 14px; height: 14px; transition: transform .2s; }
.nav-group.closed .nav-head .ico { transform: rotate(-90deg); }
.nav-group.closed .nav-items { display: none; }
.nav-item { display: flex !important; align-items: center; gap: 10px; padding: 8px !important; border-radius: var(--radius);
            color: #cfd8e3; text-decoration: none; overflow: hidden; width: 100% !important; text-align: left; line-height: 1.25; }
.nav-item:hover { color: #fff; }
.nav-item.on { background: var(--brand) !important; color: #fff; }
.nav-item .ico { flex: 0 0 18px; }
.nav-label { overflow-wrap: anywhere; }
.nav-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 8px; }
.nav-user { padding: 4px 8px 6px; color: #fff; font-size: 12px; }
.nav-user small { color: #8fa3bb; }
html.nav-collapsed .side { flex-basis: 56px; }
html.nav-collapsed .side .nav-label, html.nav-collapsed .side .nav-head .ico { display: none; }
html.nav-collapsed .nav-head { padding: 2px !important; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0; height: 6px; }
html.nav-collapsed .nav-group.closed .nav-items { display: block; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 700px) {
  .side { flex-basis: 56px; }
  .side .nav-label, .side .nav-head .ico { display: none; }
  .nav-head { padding: 2px !important; height: 6px; }
  .nav-group.closed .nav-items { display: block; }
  /* 16px stops phones zooming in when a field is tapped */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
  input[type=number], select, textarea { font-size: 16px; }
  main { padding: 12px; }
}
