/* Jamba Staff — phone app. Brand: night green #0B1510, mist #EDEFE9, leaf #2F5F1F / #B9D47E, ink #0F1712.
   Token names and status colours follow the dashboard (public/assets/app.css). System fonts only, so the app
   looks the same offline and needs nothing beyond the CSP's 'self'. Touch targets are 48px or larger. */
:root {
  color-scheme: light;
  --night: #0B1510; --mist: #EDEFE9; --leaf: #2F5F1F; --leaf-soft: #B9D47E;
  --page: #EDEFE9; --surface: #FFFFFF; --surface-2: #F4F6F1; --surface-3: #E4E9DE;
  --ink: #0F1712; --ink-2: #3A463D; --muted: #5B675D; --line: #D6DDD0; --line-strong: #B4BFAD;
  --primary: #2F5F1F; --primary-press: #244A17; --on-primary: #FFFFFF;
  --selected: #0B1510; --on-selected: #EDEFE9; --accent-wash: #E4EED3;
  --focus: #2a78d6;
  --good-text: #1E6512; --good-wash: #E1F0DA; --warning-text: #7a5000; --warning-wash: #FCEFCF;
  --critical: #d03b3b; --critical-text: #A52323; --critical-wash: #FBE1DF; --info-text: #1c5cab; --info-wash: #E2EDFB;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 21, 16, .05), 0 3px 10px rgba(11, 21, 16, .05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --slab: Rockwell, "Roboto Slab", "Zilla Slab", Georgia, serif;
  --tabs-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0B1510; --surface: #14211A; --surface-2: #1A2A21; --surface-3: #22362A;
    --ink: #EDEFE9; --ink-2: #C5CDC2; --muted: #95A296; --line: #26382D; --line-strong: #3A5143;
    --primary: #B9D47E; --primary-press: #A7C569; --on-primary: #0F1712;
    --selected: #B9D47E; --on-selected: #0F1712; --accent-wash: #23361E;
    --good-text: #86D375; --good-wash: #1B2F1B; --warning-text: #F2C14E; --warning-wash: #33290F;
    --critical: #E25D5D; --critical-text: #F29191; --critical-wash: #3A1D1C; --info-text: #8DBBF0; --info-wash: #1A2738;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0B1510; --surface: #14211A; --surface-2: #1A2A21; --surface-3: #22362A;
  --ink: #EDEFE9; --ink-2: #C5CDC2; --muted: #95A296; --line: #26382D; --line-strong: #3A5143;
  --primary: #B9D47E; --primary-press: #A7C569; --on-primary: #0F1712;
  --selected: #B9D47E; --on-selected: #0F1712; --accent-wash: #23361E;
  --good-text: #86D375; --good-wash: #1B2F1B; --warning-text: #F2C14E; --warning-wash: #33290F;
  --critical: #E25D5D; --critical-text: #F29191; --critical-wash: #3A1D1C; --info-text: #8DBBF0; --info-wash: #1A2738;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; background: var(--night); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--page); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.sheet-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--info-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.ico { flex: 0 0 auto; }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; }

/* ───── Splash & sign-in (always on night green) ───── */
.splash { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; background: var(--night); color: var(--mist); text-align: center; }
.splash img { border-radius: 50%; }
.signin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 36px) 20px calc(var(--safe-b) + 24px); background: var(--night); color: var(--mist); }
.signin-logo { border-radius: 50%; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.signin h1 { font: 700 30px/1.1 var(--slab); letter-spacing: .01em; margin-top: 4px; }
.signin-sub { color: #C9D2C5; text-align: center; max-width: 320px; }
.signin .notice, .signin-card { width: 100%; max-width: 420px; }
.signin .notice { color: var(--ink); }
.signin-card { margin-top: 6px; padding: 20px; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.signin-form { display: flex; flex-direction: column; gap: 14px; }
.signin-foot { color: #A9B6A6; font-size: 14px; text-align: center; margin-top: 4px; }

/* ───── Controls ───── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=search], select {
  width: 100%; min-height: 50px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 17px; font-weight: 400; -webkit-appearance: none; appearance: none; }
input::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:active:not(:disabled) { background: var(--primary-press); }
.btn.danger { background: transparent; border-color: var(--critical); color: var(--critical-text); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 42px; padding: 0 14px; font-size: 15px; }
.btn.big { min-height: 58px; border-radius: 16px; font-size: 18px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.form-err { color: var(--critical-text); font-size: 15px; font-weight: 650; }
.form-err:empty { display: none; }

/* ───── App frame: header, content, tab bar ───── */
.frame { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 14px 10px 16px; background: var(--night); color: var(--mist); }
.bar-logo { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; }
.bar-text { flex: 1; min-width: 0; }
.bar-title { font: 700 21px/1.1 var(--slab); letter-spacing: .01em; }
.bar-sub { font-size: 13px; color: #B7C3B3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; background: rgba(185, 212, 126, .14); color: #D6E7B0; font-size: 13px; font-weight: 650; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9BD35F; }
.net.offline { background: rgba(242, 193, 78, .16); color: #F6D88C; }
.net.offline::before { background: #F2C14E; }
.net.syncing { background: rgba(141, 187, 240, .16); color: #C4DBF7; }
.net.syncing::before { background: #8DBBF0; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid rgba(237, 239, 233, .35); border-radius: 50%; background: rgba(237, 239, 233, .08); color: var(--mist); font-size: 15px; font-weight: 750; }
.demo { padding: 5px 16px; background: var(--warning-wash); color: var(--warning-text); font-size: 13px; font-weight: 650; text-align: center; }
.main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 16px calc(var(--tabs-h) + var(--safe-b) + 24px); }
.main:focus { outline: none; }
body.has-cart .main { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 100px); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--night); border-top: 1px solid rgba(237, 239, 233, .08); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9AA897; font-size: 12.5px; font-weight: 650; text-decoration: none; }
.tab[aria-current="page"] { color: #FFFFFF; }
.tab[aria-current="page"] .ico { color: var(--leaf-soft); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--leaf-soft); }
.tab .count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; background: #F2C14E; color: #0F1712; font-size: 12px; font-weight: 800; }
.tab .count.crit { background: #E25D5D; color: #FFFFFF; }

/* Cart bar: the thumb-zone way into checkout. */
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px); z-index: 25; max-width: 736px; margin: 0 auto; height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px;
  border: 0; border-radius: 18px; background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 28px rgba(11, 21, 16, .32); font-size: 17px; font-weight: 750; text-align: left; }
.cb-count { min-width: 36px; height: 36px; padding: 0 9px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--on-primary) 16%, transparent); font-variant-numeric: tabular-nums; }
.cb-label { font-weight: 600; }
.cb-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.cb-cta { height: 36px; display: inline-flex; align-items: center; gap: 2px; padding-left: 12px; border-left: 1px solid color-mix(in srgb, var(--on-primary) 30%, transparent); }

/* ───── Notices & shared bits ───── */
.notices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.notices:empty { display: none; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--info-wash); font-size: 15px; }
.notice.warn { background: var(--warning-wash); }
.notice.crit { background: var(--critical-wash); border-color: color-mix(in srgb, var(--critical) 40%, transparent); }
.notice.ok { background: var(--good-wash); }
.notice-text { flex: 1 1 200px; min-width: 0; }
.notice-text strong { display: block; }
.notice-actions { display: flex; gap: 6px; }
.section-label { margin: 18px 4px 8px; color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.section-label.crit { color: var(--critical-text); }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 2px; }
.section-row .section-label { margin: 8px 4px; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-wash); color: var(--good-text); }
.badge.warn { background: var(--warning-wash); color: var(--warning-text); }
.badge.crit { background: var(--critical-wash); color: var(--critical-text); }
.badge.info { background: var(--info-wash); color: var(--info-text); }
.search { position: relative; margin-bottom: 12px; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; }

/* ───── Sell ───── */
.loc { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; padding-left: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--primary); }
.loc-field { position: relative; flex: 1; min-width: 0; }
.loc-label { position: absolute; top: 8px; left: 10px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; pointer-events: none; }
.loc-select { min-height: 62px; padding: 22px 42px 6px 10px; border: 0; border-radius: var(--radius); font-size: 17.5px; font-weight: 700; text-overflow: ellipsis;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B675D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 20px; }
.product { margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.p-name { font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.p-fac { margin-top: 1px; color: var(--muted); font-size: 13.5px; }
.sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.size { position: relative; min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 2px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.2; }
.size .sz { font-size: 15px; font-weight: 800; }
.size .pr { font-size: 14.5px; font-variant-numeric: tabular-nums; }
.size .left { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.size:active:not(:disabled) { background: var(--accent-wash); transform: scale(.97); }
.size[data-incart] { border-color: var(--primary); background: var(--accent-wash); }
.size:disabled { opacity: .45; cursor: not-allowed; }
.size .incart { position: absolute; top: -9px; right: -6px; min-width: 25px; height: 25px; padding: 0 6px; display: grid; place-items: center; border-radius: 13px; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 800; box-shadow: 0 0 0 2px var(--surface); }

/* ───── Sheets (checkout, receipt, account) ───── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5, 10, 7, .55); animation: fade .15s ease-out; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 760px; max-height: calc(100dvh - var(--safe-t) - 12px); margin: 0 auto; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--page); box-shadow: 0 -12px 40px rgba(0, 0, 0, .28); animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 4px; padding: 12px 8px 6px 18px; }
.sheet-head h2 { flex: 1; font: 700 21px/1.2 var(--slab); }
.sheet-head h2:focus { outline: none; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.sheet-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.lines { padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.l-main { flex: 1; min-width: 0; }
.l-name { font-weight: 700; line-height: 1.25; }
.l-meta { color: var(--muted); font-size: 14px; }
.l-warn { margin-top: 2px; color: var(--critical-text); font-size: 14px; font-weight: 650; }
.l-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.l-total { font-weight: 750; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.stepper button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink); }
.stepper button:disabled { opacity: .3; }
.stepper .qty { min-width: 30px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.group { margin: 16px 0; }
.group-label { margin: 0 2px 8px; color: var(--muted); font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.seg button { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-2); font-size: 15.5px; font-weight: 650; line-height: 1.15; }
.seg button small { font-size: 12px; font-weight: 600; opacity: .85; }
.seg button[aria-pressed="true"] { background: var(--selected); border-color: var(--selected); color: var(--on-selected); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1fr) 76px 112px; gap: 10px; }
.ship-block { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.with-btn { display: flex; gap: 8px; }
.with-btn input { flex: 1; min-width: 0; }
.with-btn .btn { min-height: 50px; }
.totals { display: flex; flex-direction: column; gap: 2px; }
.t-row { display: flex; justify-content: space-between; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.t-total { color: var(--ink); font-size: 18px; font-weight: 800; }
@media (min-width: 540px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* Receipt */
.sheet-receipt .sheet-body { padding-top: 26px; }
.receipt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.r-ico { width: 88px; height: 88px; margin-bottom: 8px; display: grid; place-items: center; border-radius: 50%; background: var(--good-wash); color: var(--good-text); }
.receipt.saved .r-ico { background: var(--warning-wash); color: var(--warning-text); }
.r-title { font: 700 26px/1.15 var(--slab); }
.r-num { font-size: 34px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.r-ref { color: var(--ink-2); font-size: 21px; font-weight: 750; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.r-total { margin-top: 2px; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.r-meta { color: var(--muted); }
.r-lines { width: 100%; margin: 10px 0 4px; padding: 10px 14px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 15px; text-align: left; }
.r-lines li + li { margin-top: 3px; }
.r-note { max-width: 340px; color: var(--ink-2); font-size: 15px; }

/* ───── Stock ───── */
.chips { display: flex; gap: 8px; margin: 0 -16px 8px; padding: 2px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: 22px; background: var(--surface); color: var(--ink-2); font-size: 15px; font-weight: 650; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--selected); border-color: var(--selected); color: var(--on-selected); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; }
.stock-status { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #3FA34D; }
.stock-status.offline .dot, .sync-card.offline .dot { background: #E0A526; }
.stock-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stock-row.zero .sr-qty { color: var(--muted); }
.sr-main { flex: 1; min-width: 0; }
.sr-name { font-weight: 700; line-height: 1.25; }
.sr-size { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.sr-meta { margin-top: 2px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.sr-locs { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; color: var(--ink-2); font-size: 13.5px; }
.sr-locs b { font-variant-numeric: tabular-nums; }
.sr-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.sr-qty { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sr-unit { margin-bottom: 4px; color: var(--muted); font-size: 12px; }

/* ───── Track ───── */
.track-form { display: flex; gap: 8px; margin-bottom: 12px; }
.track-form .search { flex: 1; margin: 0; }
.track-form .go { width: 56px; min-height: 50px; padding: 0; }
.search input::placeholder { font-size: 15.5px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 8px; color: var(--muted); font-size: 14px; }
.order { margin-bottom: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.o-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.o-num { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.o-meta { margin-top: 2px; color: var(--muted); font-size: 14px; }
.o-lines { margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.o-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.o-lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.o-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; }
.o-note { margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.parcel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.p-service { font-weight: 700; }
.p-track { margin-top: 2px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.p-link { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.events { margin: 10px 0 0 6px; padding: 0 0 0 16px; list-style: none; border-left: 2px solid var(--line-strong); }
.events li { position: relative; padding: 0 0 10px 4px; font-size: 14.5px; }
.events li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.events li:first-child::before { border-color: var(--primary); background: var(--primary); }
.events li span { display: block; color: var(--muted); font-size: 13px; }
.recent-row { width: 100%; min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px 10px 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-align: left; }
.rr-main { min-width: 0; display: flex; flex-direction: column; }
.rr-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-meta { overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rr-total { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ───── Sync ───── */
.sync-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.sc-state { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sc-main { font-size: 19px; font-weight: 700; line-height: 1.3; }
.sc-sub { color: var(--ink-2); font-size: 15px; }
.sync-card .btn { margin-top: 6px; }
.q-item { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.q-item.attention { border-color: color-mix(in srgb, var(--critical) 45%, var(--line)); }
.q-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 18px; font-variant-numeric: tabular-nums; }
.q-ref { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.q-meta { color: var(--ink-2); font-size: 14.5px; }
.q-lines { color: var(--muted); font-size: 14px; }
.q-err { color: var(--warning-text); font-size: 14px; }
.q-reason { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--critical-wash); color: var(--critical-text); font-size: 15px; font-weight: 650; }
.q-reason .ico { margin-top: 2px; }
.q-hint { color: var(--ink-2); font-size: 14.5px; }
.q-actions { display: flex; gap: 8px; margin-top: 8px; }
.q-actions .btn { flex: 1; }
.q-confirm { margin-top: 8px; scroll-margin-bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); }
.q-confirm p { font-weight: 650; }
.help { margin: 16px 4px; color: var(--muted); font-size: 14px; }

/* ───── Account ───── */
.acct { display: flex; flex-direction: column; gap: 12px; padding-bottom: calc(8px + var(--safe-b)); }
.acct-user { display: flex; align-items: center; gap: 14px; padding: 4px 2px 8px; }
.avatar.big { width: 56px; height: 56px; border: 0; background: var(--night); color: var(--mist); font-size: 20px; }
.signout-warn { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid color-mix(in srgb, var(--critical) 45%, transparent); border-radius: var(--radius); background: var(--critical-wash); }
.sw-title { display: flex; align-items: center; gap: 8px; color: var(--critical-text); font-size: 17px; }

/* ───── Toasts ───── */
/* Under the header, away from the thumb-zone buttons they would otherwise cover. */
.toasts { position: fixed; left: 16px; right: 16px; top: calc(var(--safe-t) + 66px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 12px; background: #1B2A21; color: #EDEFE9; font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: rise .2s ease-out; transition: opacity .3s; }
.toast.ok { background: #1E5B14; }
.toast.warn { background: #6B4A05; }
.toast.crit { background: #8E1F1F; }
.toast.out { opacity: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
