/* Kervan panels (customer and staff): the pastel-consumer app style in Kervan's colours. Shared by account.html and admin.html.
   Desktop: a labelled 232px sidebar on the page ground beside a fluid canvas (max 1120px, 32px gutters).
   Two-column rows are 7fr + 5fr with one 20px gap. Phones: a top bar and a bottom bar of five labelled destinations. */
:root {
  --ground: #F5F6F8; --surface: #FFFFFF; --raised: #F0F3F8; --active: #E3E9F3;
  --border: #E3E8F0; --rule: #EEF1F6; --control: #C9D2E0;
  --text: #131619; --muted: #4A525E;
  --cobalt: #1C4A9A; --cobalt-deep: #163C80; --teal: #17A2A0; --teal-hover: #7FD6D3; --teal-ink: #062A2A;
  /* pale tiles with the dark of their own hue: parcels, buying, shipping, and the one warning */
  --tile-parcel: #E3ECFA; --ink-parcel: #163C80;
  --tile-buy: #DDF3F2; --ink-buy: #0B5E5C;
  --tile-ship: #FBEEDC; --ink-ship: #7A4B0E;
  --tile-warn: #FBE4E2; --ink-warn: #7D1F1A;
  --pill-ok-bg: #DCFAE5; --pill-ok-ink: #04250E;
  --pill-wait-bg: #EEF1F6; --pill-wait-ink: #3B4350;
  --negative: #B5302A; --positive: #0B6B2E; --star: #B97A06;
  --font: "Almarai", "Segoe UI", Tahoma, sans-serif;
  --r-card: 20px; --r-in: 10px;
  --gap: 20px; --pad: 24px;
  --fs-title: 26px; --fs-section: 18px; --fs-figure: 30px; --fs-body: 16px; --fs-small: 14px;
  --ctl: 44px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 var(--fs-body)/1.6 var(--font); }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--cobalt); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-title); font-weight: 800; line-height: 1.3; }
h2 { font-size: var(--fs-section); font-weight: 700; line-height: 1.4; }
h3 { font-size: var(--fs-body); font-weight: 700; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.num, bdi { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.ltr { direction: ltr; }
.iso { direction: ltr; unicode-bidi: isolate; }

/* controls: full pills, one height */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl); padding: 0 20px; border-radius: 999px; border: 1px solid var(--control);
  background: var(--surface); color: var(--text); font: 700 var(--fs-body) var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: var(--cobalt); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.btn.text { border-color: transparent; background: none; color: var(--cobalt); padding-inline: 10px; }
.btn.text:hover { background: var(--raised); }
.btn.danger { color: var(--negative); }
.btn.danger.solid { background: var(--negative); border-color: var(--negative); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span { font-size: var(--fs-small); font-weight: 700; }
.field .hint { font-size: var(--fs-small); color: var(--muted); font-weight: 400; }
.input, .select { width: 100%; min-height: var(--ctl); border: 1px solid var(--control); border-radius: var(--r-in); background: var(--surface); color: var(--text); font: 400 var(--fs-body) var(--font); padding: 0 14px; }
textarea.input { min-height: 84px; padding: 10px 14px; resize: vertical; line-height: 1.6; }
.select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%231C4A9A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px 9px; background-repeat: no-repeat; background-position: left 14px center; }
:root[dir="ltr"] .select { background-position: right 14px center; }
.input:focus, .select:focus { border-color: var(--cobalt); outline: none; }
.input:focus-visible, .select:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
:root[dir="rtl"] .input.ltr { text-align: right; }
.err { color: var(--negative); font-size: var(--fs-small); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); flex: none; }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; min-width: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* status pills: a pale tint with the dark of its hue */
.pill { flex: none; display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border-radius: 999px; font-size: var(--fs-small); font-weight: 700; white-space: nowrap; background: var(--pill-wait-bg); color: var(--pill-wait-ink); }
.pill.parcel { background: var(--tile-parcel); color: var(--ink-parcel); }
.pill.buy { background: var(--tile-buy); color: var(--ink-buy); }
.pill.ship { background: var(--tile-ship); color: var(--ink-ship); }
.pill.warn { background: var(--tile-warn); color: var(--ink-warn); }
.pill.ok { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.pill.act { background: var(--teal); color: var(--teal-ink); }

/* the demo's notices and its warehouse buttons: quiet, dashed, plainly marked */
.demo { border: 1px dashed var(--control); border-radius: var(--r-in); padding: 12px 16px; font-size: var(--fs-small); color: var(--muted); background: var(--surface); }
.demo b { color: var(--text); }
.btn.sim { border-style: dashed; color: var(--muted); font-weight: 400; min-height: 36px; font-size: var(--fs-small); }

/* ---------- signed out ---------- */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); max-width: 1180px; width: 100%; margin-inline: auto; }
.topbar .logo { flex: none; }
.topbar .logo img { height: 50px; width: auto; }
.topbar .sp { margin-inline-start: auto; }
.lang { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--active); font: 700 var(--fs-small) var(--font); color: var(--text); cursor: pointer; }
.auth-grid { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; display: grid; gap: 18px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--raised); border-radius: 999px; padding: 4px; gap: 4px; }
.tabs button { min-height: 40px; border: 0; border-radius: 999px; background: none; font: 700 var(--fs-body) var(--font); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); outline: 1px solid var(--border); }
.auth-form { display: grid; gap: 16px; }
/* sign-in: one centred card, three ways in */
.auth-one { width: 100%; max-width: 480px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.auth-one .auth-card { padding: 32px 28px; gap: 20px; }
.auth-h { font-size: 30px; line-height: 1.3; margin: 0; }
.auth-p { margin: -8px 0 0; color: var(--muted); }
.auth-card .forgot { justify-self: start; padding-inline: 0; min-height: 32px; margin-top: -6px; font-size: var(--fs-small); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-small); margin: 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sso { display: grid; gap: 12px; }
.sso-btn { position: relative; width: 100%; min-height: 56px; padding: 0 56px; background: #fff; color: #1F1F1F; border-color: var(--control); font-weight: 700; font-size: 17px; }
.sso-btn:hover { border-color: #1F1F1F; }
.sso-btn svg { position: absolute; inset-inline-start: 20px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; }
@media (max-width: 420px) { .auth-one .auth-card { padding: 24px 18px; } .auth-h { font-size: 26px; } }
.auth-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-small); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.side { display: grid; gap: 20px; align-content: start; }
.gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gets li { display: flex; gap: 12px; align-items: baseline; }
.gets li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); flex: none; transform: translateY(-1px); }

/* ---------- the address label, the account's own object ---------- */
.label { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.label-top { display: flex; align-items: center; gap: 10px; }
.label-top img { width: 30px; height: 30px; }
.label-top h2 { flex: 1; }
.label .perf { border-top: 4px dotted var(--control); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 6px 10px; border-radius: var(--r-in); }
.lines li:hover { background: var(--raised); }
.lines .k { grid-column: 1; font-size: var(--fs-small); color: var(--muted); }
.lines .k i { font-style: normal; direction: ltr; unicode-bidi: isolate; }
/* the address is Turkish, written left to right; it lines up with its label on the page's own start side */
.lines .v { grid-column: 1; font-weight: 700; direction: ltr; text-align: left; unicode-bidi: isolate; overflow-wrap: anywhere; }
:root[dir="rtl"] .lines .v { text-align: right; }
.lines .btn { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; padding: 0 12px; font-size: var(--fs-small); }
.label .code { font-weight: 800; color: var(--cobalt); }

/* ---------- signed in: the shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; border-inline-end: 1px solid var(--border); }
.nav .logo { padding: 4px 10px 14px; }
.nav .logo img { height: 36px; width: auto; }
.who { padding: 10px 12px 14px; display: grid; gap: 2px; }
.who b { font-size: var(--fs-body); overflow-wrap: anywhere; }
.who span { font-size: var(--fs-small); color: var(--muted); direction: ltr; text-align: start; unicode-bidi: plaintext; }
.nav a.item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: var(--r-in); color: var(--text); text-decoration: none; }
.nav a.item svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav a.item:hover { background: var(--raised); }
.nav a.item[aria-current="page"] { background: var(--active); font-weight: 700; }
.nav a.item .count { margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.nav a.item .aside { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.nav .foot { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; }
.main { min-width: 0; padding: 28px 32px 64px; }
.canvas { max-width: 1120px; display: grid; gap: var(--gap); }
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.title-row > div { display: grid; gap: 4px; min-width: 0; }
.title-row .sub { color: var(--muted); max-width: 72ch; }
.title-row .back { justify-self: start; margin-inline-start: -10px; }
.mobile-top, .tabbar { display: none; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.row2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.row2.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
/* cards that share a row share a bottom edge; the card's foot sits on it */
.row2.match { align-items: stretch; }
.card.fill { grid-template-rows: auto 1fr auto; }
.col { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.figure b { font-size: var(--fs-figure); font-weight: 800; line-height: 1.2; }
.figure .unit { font-size: var(--fs-small); color: var(--muted); }
.big { font-size: 40px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* four summary figures, each a door to its page: the label sits above the value */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: grid; gap: 4px; align-content: start; color: var(--text); text-decoration: none; transition: border-color .15s; min-width: 0; }
.stat:hover { border-color: var(--cobalt); }
.stat > span { font-size: var(--fs-small); color: var(--muted); }
.stat b { font-size: var(--fs-figure); font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat small { font-size: var(--fs-small); color: var(--muted); }

/* rows: a fixed 48px media slot, the text, then one edge for the figures */
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows > li { position: relative; display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; min-height: 68px; padding: 10px 6px; border-top: 1px solid var(--rule); }
.rows > li:first-child { border-top: 0; }
.rows.nocheck > li { grid-template-columns: 48px minmax(0, 1fr) auto; }
.tile { width: 48px; height: 48px; border-radius: var(--r-in); background: var(--tile-parcel); color: var(--ink-parcel); display: grid; place-items: center; overflow: hidden; }
.tile img { max-width: 40px; max-height: 24px; width: auto; height: auto; object-fit: contain; }
.tile.buy { background: var(--tile-buy); color: var(--ink-buy); }
.tile.ship { background: var(--tile-ship); color: var(--ink-ship); }
.tile.warn { background: var(--tile-warn); color: var(--ink-warn); }
.tile.plain { background: var(--raised); color: var(--muted); }
.tile svg { width: 22px; height: 22px; }
/* an icon stands bare in the media slot; only real pictures (store logos) sit on a tile */
.rows .tile:has(> svg), .read .tile:has(> svg) { background: none; color: var(--muted); }
.rows .tile.warn:has(> svg) { color: var(--ink-warn); }
.r-text { display: grid; gap: 2px; min-width: 0; }
.r-text b { overflow-wrap: anywhere; }
.r-text > span { font-size: var(--fs-small); color: var(--muted); }
.r-text .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.r-text .link { overflow-wrap: anywhere; font-size: var(--fs-small); }
.r-end { display: grid; gap: 4px; justify-items: end; text-align: end; }
.r-end b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-end .btn { min-height: 34px; padding: 0 14px; font-size: var(--fs-small); }
.r-end .acts { justify-content: flex-end; gap: 4px 8px; }
.rows .check { margin: 0; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.amt.plus { color: var(--positive); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule); }
.empty { border: 1px dashed var(--control); border-radius: var(--r-in); padding: 16px; color: var(--muted); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--raised); border-radius: 999px; padding: 4px; gap: 4px; justify-self: start; }
.seg button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font: 700 var(--fs-small) var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); outline: 1px solid var(--border); }
/* the selection bar floats over the list while you choose, the one resting thing lifted off the page */
.selbar { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; background: var(--text); color: #fff; border-radius: 28px; padding: 10px 10px 10px 22px; }
:root[dir="rtl"] .selbar { padding: 10px 22px 10px 10px; }

/* things you can't ship */
.banned { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.banned li { display: grid; gap: 2px; }
.banned span { font-size: var(--fs-small); color: var(--muted); }

/* the shipping request: numbered steps, then the step on the start side and the receipt on the other */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stepper li, .stepper button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 999px; background: var(--raised); color: var(--muted); font: 700 var(--fs-small) var(--font); }
.stepper li:has(button) { padding: 0; background: none; }
.stepper button { width: 100%; border: 0; cursor: pointer; text-align: start; }
.stepper button:hover { background: var(--active); }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--control); font-size: 13px; flex: none; color: var(--text); }
.stepper [aria-current] { background: var(--active); color: var(--text); }
.stepper [aria-current] .n { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.stepper .done .n { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.choices { display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--control); border-radius: 14px; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--cobalt); }
.choice:has(input:checked) { border-color: var(--cobalt); background: var(--active); outline: 1px solid var(--cobalt); }
.choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); }
.choice .price { font-size: var(--fs-section); font-weight: 800; white-space: nowrap; }
.dl { margin: 0; display: grid; }
.dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: center; }
.dl > div:first-child { border-top: 0; padding-top: 0; }
.dl dt { grid-column: 1; font-size: var(--fs-small); color: var(--muted); }
.dl dd { grid-column: 1; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.dl .btn { grid-column: 2; grid-row: 1 / span 2; }
.receipt { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px 26px; display: grid; gap: 10px; position: sticky; top: 24px; align-content: start; }
.receipt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.receipt li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.receipt li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt .bar { height: 3px; background: var(--text); margin-block: 4px; }
.receipt .total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.receipt .total b { font-size: var(--fs-figure); font-weight: 800; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.saving { background: var(--tile-parcel); color: var(--ink-parcel); border-radius: var(--r-in); padding: 10px 14px; font-size: var(--fs-small); }
.saving .btn { min-height: 32px; font-size: var(--fs-small); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.read { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-in); background: var(--raised); }
.timerbox { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r-in); background: var(--tile-buy); color: var(--ink-buy); }
.timer { font-size: var(--fs-figure); font-weight: 800; line-height: 1.2; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; justify-self: start; }

/* a journey: shipments, buying orders and returns */
.journey { list-style: none; margin: 0; padding: 0; display: grid; }
.journey li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; position: relative; padding-bottom: 18px; }
.journey li::before { content: ""; position: absolute; inset-inline-start: 13px; top: 26px; bottom: 0; width: 2px; background: var(--rule); }
.journey li:last-child::before { display: none; }
.journey .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); border: 2px solid var(--control); display: grid; place-items: center; }
.journey .done .dot { background: var(--cobalt); border-color: var(--cobalt); }
/* a tick reads the same in both directions, so its borders are physical */
.journey .done .dot::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.journey .now .dot { border-color: var(--teal); background: var(--surface); }
.journey .now .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.journey b { line-height: 28px; }
.journey .when { font-size: var(--fs-small); color: var(--muted); line-height: 28px; }
.journey .act { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stars { display: flex; gap: 6px; }
.stars button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--control); background: var(--surface); color: var(--control); cursor: pointer; display: grid; place-items: center; }
.stars button svg { width: 22px; height: 22px; }
.stars button[aria-pressed="true"] { color: var(--star); border-color: var(--star); }
.stars button[aria-pressed="true"] svg, .stars.read svg.on { fill: currentColor; }
.stars.read { color: var(--star); }
.stars.read svg { width: 22px; height: 22px; }

/* settings: label column beside the panel */
.set { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px 32px; padding-block: 24px; border-top: 1px solid var(--border); }
.set:first-child { border-top: 0; padding-top: 4px; }
.set .lab { display: grid; gap: 4px; align-content: start; padding-top: 6px; }
.set .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: grid; gap: 16px; min-width: 0; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.addr { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: grid; gap: 6px; align-content: start; }
.addr .acts .btn { min-height: 34px; padding: 0 10px; font-size: var(--fs-small); }
.amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amounts label { position: relative; }
.amounts input { position: absolute; opacity: 0; inset: 0; }
.amounts span { display: grid; place-items: center; min-height: var(--ctl); border: 1px solid var(--control); border-radius: 999px; font-weight: 700; cursor: pointer; }
.amounts input:checked + span { background: var(--active); border-color: var(--cobalt); outline: 1px solid var(--cobalt); }
.amounts input:focus-visible + span { outline: 3px solid var(--teal); }

dialog { border: 0; border-radius: var(--r-card); padding: 0; width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(19, 22, 25, .25); } /* taste-skill-ignore: a dialog floats */
dialog::backdrop { background: rgba(11, 31, 74, .45); }
.dlg { padding: 22px; display: grid; gap: 14px; }
.dlg form { display: grid; gap: 14px; }
.photo { aspect-ratio: 4 / 3; border-radius: var(--r-in); background: var(--raised); display: grid; place-items: center; }
.photo svg { width: 76%; height: auto; }
.toast { position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: var(--fs-small); z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
@media (min-width: 901px) { .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); } }

@media (max-width: 1100px) {
  .row2, .row2.even, .row2.flip { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt { position: static; }
  .banned { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: minmax(0, 1fr); }
  .side { order: 2; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--ground); padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--border); }
  .mobile-top img { height: 32px; width: auto; }
  .bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--text); margin-inline-start: auto; }
  .bell svg { width: 20px; height: 20px; }
  .bell .count, .tabbar .count { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
  .main { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 110px max(16px, env(safe-area-inset-left, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--border); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; min-height: 52px; border-radius: var(--r-in); color: var(--muted); text-decoration: none; font-size: 13px; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--cobalt); font-weight: 700; background: var(--tile-parcel); }
  .tabbar .count { top: 2px; inset-inline-end: 10px; }
  .set { grid-template-columns: minmax(0, 1fr); }
  .selbar { bottom: 84px; }
}
@media (max-width: 560px) {
  :root { --fs-title: 22px; --fs-figure: 24px; }
  .auth-card, .card, .label, .receipt, .stat { padding: 18px 16px; }
  .auth-form .two, .form-grid, .addr-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 12px; }
  .banned { grid-template-columns: minmax(0, 1fr); }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rows > li { grid-template-columns: auto 48px minmax(0, 1fr); }
  .rows.nocheck > li { grid-template-columns: 48px minmax(0, 1fr); }
  .rows .r-end { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: start; gap: 8px 12px; }
  .rows .r-end .acts { justify-content: flex-start; }
  .rows.nocheck .r-end { grid-column: 2 / -1; }
  .stepper { display: flex; }
  .stepper li { flex: none; }
  .stepper li[aria-current] { flex: 1; }
  .stepper li:not([aria-current]) .lbl { display: none; }
  .stepper li, .stepper button { padding: 0 11px; }
  .big { font-size: 34px; }
  .selbar { border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- the live panels: loading, real photos, staff forms ---------- */
.loading { min-height: 60vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); text-align: center; padding: 24px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--active); border-top-color: var(--cobalt); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mobile-top .sp { margin-inline-start: auto; }
.btn[aria-busy="true"] { cursor: progress; opacity: .7; }
.tile.pic { background: var(--raised); }
.tile.pic img { max-width: none; max-height: none; width: 100%; height: 100%; object-fit: cover; }
.photo { overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.banned.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* a photo being added on the receiving form */
.shot { position: relative; aspect-ratio: 16 / 9; max-height: 260px; border-radius: var(--r-in); border: 1px dashed var(--control); background: var(--raised); display: grid; place-items: center; align-content: center; gap: 8px; overflow: hidden; color: var(--muted); text-align: center; padding: 12px; cursor: pointer; }
.shot svg { width: 32px; height: 32px; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.found { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-in); background: var(--tile-buy); color: var(--ink-buy); }
.found b { color: var(--text); }
@media (max-width: 560px) {
  .banned.two { grid-template-columns: minmax(0, 1fr); }
  .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }