/* ============================================================
   China Import — one stylesheet, no build step.

   DIRECTION C · "FIELD" — a working buyer's instrument, not a
   consumer app. High-vis orange on warm concrete, heavy black rules,
   blocks rather than cards. Designed to be read at arm's length, in a
   crowded aisle, in bad light, one-handed.

   Colour rules that must not be "tidied up":
     --ink        #15171a  near-black. Borders are 2px of this, not
                           hairlines — a 1px rule disappears on a
                           phone in sunlight.
     --hi         #f06a2a  the safety orange. It carries BLACK text
                           only: white on it is ~3.4:1 and fails.
     --hi-deep    #a33912  the same hue dark enough for WHITE text
                           (6.8:1). Use this whenever white sits on it.
   Type: Archivo (body + numerals), Archivo Narrow (labels, caps).
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Archivo+Narrow:wght@600;700&display=swap");

:root {
  --ink: #15171a;
  --hi: #f06a2a;            /* black text only */
  --hi-deep: #a33912;       /* white text safe */
  --hi-soft: #fdefe6;

  /* Kept for continuity with NGH; used for links and quiet accents. */
  --brand: #f06a2a;
  --primary: #a33912;
  --primary-dark: #7d2b0c;
  --accent-bg: #15171a;     /* fills that carry white text */
  --accent-bg-dark: #000;

  --danger: #b3261e;
  --success: #1f7a45;
  --warn: #9a6207;

  --bg: #eae7e0;
  --surface: #ffffff;
  --border: #15171a;        /* deliberate: borders are ink, not grey */
  --rule: #cfccc5;          /* the quiet divider, inside a block */
  --text: #15171a;
  --muted: #5d5a53;

  --radius: 0px;            /* Field has no rounded corners */
  --shadow: none;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2126;
    --border: #f2efe8;      /* the rules invert: light ink on dark */
    --rule: #39404a;
    --text: #f2efe8;
    --muted: #a3a9b2;
    --primary: #ff8b4d;     /* readable on a dark surface */
    --primary-dark: #ffa877;
    --accent-bg: #f06a2a;   /* on dark, the orange block carries... */
    --accent-bg-dark: #d4531b;
    --hi-soft: #2a1d15;
    --shadow: none;
  }
  /* ...black text, because white on orange fails at any brightness. */
  .btn, .nav a.active, .fab { color: #15171a !important; }
  .topbar { color: #f2efe8; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 "Archivo", system-ui, -apple-system, "PingFang SC",
        "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); }

/* ---- top bar ---- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--hi);
}
.topbar a { color: #fff; text-decoration: none; }
.topbar .brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "Archivo Narrow", sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: .02em;
  text-transform: uppercase;
}
.topbar .brand img {
  /* The mark is now ink-on-orange, which stands off the black bar on
     its own — the white chip it used to need would read as a sticker. */
  display: block; border-radius: 0;
}
.topbar .spacer { flex: 1; }

/* Which business you are working in — the answer to "whose data is
   this?", which a multi-org install must never leave ambiguous. */
.orgchip {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 0;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; white-space: nowrap;
  background: var(--hi); color: var(--ink);
}
@media (max-width: 560px) { .orgchip { max-width: 110px; overflow: hidden; text-overflow: ellipsis; display: block; } }

/* Shown only while a user is looking at everybody's records. */
.scopechip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: #fff; color: var(--accent-bg) !important;
  text-decoration: none;
}
@media (max-width: 560px) { .scopechip { display: none; } }
.topbar .btn.signout {
  background: transparent; color: #cfd3d8;
  border-color: #4a5058;
  padding: 7px 13px; font-size: 13px; min-height: 36px;
}
.topbar .btn.signout:hover { background: #262b31; color: #fff; border-color: #6b727b; }

@media (max-width: 420px) {
  /* On a phone the wordmark is the first thing to go — the icon and
     the sync state are what actually get looked at. */
  .topbar .brand span { display: none; }
}

/* ---- offline / sync indicator ---- */

.syncchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 0;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  background: #1f7a45; color: #fff;
}
.syncchip .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee08a; }
.syncchip[data-state="offline"] { background: var(--warn); }
.syncchip[data-state="offline"] .dot { background: #ffd28a; }
.syncchip[data-state="pending"] .dot { background: #ffd28a; animation: pulse 1.4s infinite; }
.syncchip[data-state="syncing"] .dot { background: #fff; animation: pulse .8s infinite; }
.syncchip[data-state="error"] { background: var(--danger); }

@keyframes pulse { 50% { opacity: .3; } }

/* ---- nav ---- */

.nav {
  position: sticky; top: 53px; z-index: 39;
  display: flex; gap: 0; overflow-x: auto;
  padding: 0;
  background: var(--ink);
  border-bottom: 2px solid var(--ink);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 15px; min-height: 44px;
  text-decoration: none; color: #9aa0a4;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.nav a:hover { color: #fff; }
.nav a .ico { font-size: 13px; line-height: 1; }
.nav a.active, .nav a.active:hover { background: var(--hi); color: var(--ink); font-weight: 700; }

/* ---- layout ---- */

/* The bottom padding clears the fixed save/selection bar. */
main { padding: 16px; max-width: 1200px; margin: 0 auto;
       padding-bottom: calc(132px + var(--safe-bottom)); }

h1.page {
  font-size: 30px; font-weight: 800; margin: 0 0 3px; letter-spacing: -.025em;
  line-height: 1.1;
}
.sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 15px;
  margin-bottom: 14px;
}
.card h2 {
  font-family: "Archivo Narrow", sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px;
}

.grid { display: grid; gap: 12px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.stat {
  background: var(--surface); border: 2px solid var(--border);
  padding: 12px 14px;
  border-top: 6px solid var(--hi);
}
.stat .label { font-family: "Archivo Narrow", sans-serif; font-size: 11px;
               color: var(--muted); text-transform: uppercase;
               letter-spacing: .08em; font-weight: 700; }
.stat .value {
  font-size: 28px; font-weight: 800; color: var(--text); line-height: 1.1;
  letter-spacing: -.03em;
  margin-top: 2px;
  /* Money values are long. Let them shrink rather than overflow the card. */
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat .note { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- forms ---- */

label {
  display: block; font-family: "Archivo Narrow", sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin: 0 0 5px; color: var(--muted);
}
.field { margin-bottom: 14px; }

input, select, textarea {
  width: 100%; padding: 11px; min-height: 46px;
  border: 2px solid var(--border); border-radius: 0;
  background: var(--surface); color: var(--text);
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  font-weight: 500; font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--hi); outline-offset: -3px; border-color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 0; border: 2px solid var(--hi);
  background: var(--hi); color: var(--ink);
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
  font-family: inherit; line-height: 1.2;
  /* 44px is the smallest comfortable target for a thumb, and this app
     is used one-handed while holding a phone in a crowded market. */
  min-height: 44px;
  transition: background .12s ease, border-color .12s ease, transform .04s ease;
}
.btn:hover { background: #d4531b; border-color: #d4531b; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--hi-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #8e1d17; border-color: #8e1d17; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--border); background: var(--surface); }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 20px; font-size: 17px; min-height: 52px; }
.btn.sm { padding: 6px 12px; font-size: 13px; min-height: 34px; }

/* Keyboard users get a visible ring; mouse users do not. */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- tables ---- */

.tablewrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  /* A fading edge is the only honest hint that a wide table on a
     phone scrolls sideways. */
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left / 24px 100% no-repeat,
    linear-gradient(to left,  var(--surface) 30%, rgba(255, 255, 255, 0)) right / 24px 100% no-repeat;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rule);
         white-space: nowrap; }
th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ink); color: #fff;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:nth-child(even) { background: rgba(21, 23, 26, .035); }
tbody tr:hover { background: var(--hi-soft); }
tbody tr:last-child td { border-bottom: 0; }

/* ---- product cards ---- */

.pcard {
  background: var(--surface); border: 2px solid var(--border);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  transition: transform .12s ease;
}
.pcard:hover { transform: translateY(-2px); }
.pcard .thumb {
  aspect-ratio: 1; background: var(--bg) center/cover no-repeat;
  display: block; border-bottom: 2px solid var(--border);
}
.pcard .body { padding: 10px 11px 11px; flex: 1; display: flex;
               flex-direction: column; gap: 3px; }
.pcard .code { font-size: 11px; font-weight: 700; color: var(--muted);
               font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.pcard .name { font-size: 14px; font-weight: 600; line-height: 1.3;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
               overflow: hidden; }
.pcard .shop { font-size: 12px; color: var(--muted);
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .prices {
  margin-top: auto; padding-top: 8px; margin-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.pcard .cny { font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.pcard .lkr { font-size: 12px; color: var(--primary); font-weight: 800; }

/* The status pill sits ON the photo so the body keeps its lines for
   the name, which is what you actually read. */
.pcard .statuspill {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* A bare checkbox vanishes against a photo, so it gets its own chip. */
.pcard .tick {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  width: 28px; height: 28px; margin: 0;
  accent-color: var(--accent-bg);
  border-radius: 0;
  background: #fff; border: 2px solid var(--ink);
  cursor: pointer;
}
.pcard.selected {
  outline: 4px solid var(--hi); outline-offset: -4px;
}
tr.selected { background: rgba(71, 188, 252, .12) !important; }

/* The same control in the table view, where there is no photo to
   sit on but the target still has to be thumb-sized. */
td .tick { width: 22px; height: 22px; accent-color: var(--accent-bg); cursor: pointer; }

/* ---- badges ---- */

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 0;
  font-family: "Archivo Narrow", sans-serif;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface); color: var(--text); border: 2px solid var(--ink);
}
.badge.shortlisted { background: var(--hi); color: var(--ink); }
.badge.ordered    { background: #1f7a45; color: #fff; border-color: #1f7a45; }
.badge.rejected   { background: #b3261e; color: #fff; border-color: #b3261e; }
.badge.draft      { background: var(--surface); color: var(--muted); border-color: var(--rule); }
@media (prefers-color-scheme: dark) {
  .badge.shortlisted { background: #0c2f47; color: #7cc9f5; border-color: #17496b; }
  .badge.ordered    { background: #10331d; color: #7fd39a; border-color: #1d5730; }
  .badge.rejected   { background: #3a1616; color: #f3a2a2; border-color: #5c2323; }
}

/* ---- selection bar (appears when items are ticked) ---- */

.selbar, .savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  background: var(--ink); border-top: 3px solid var(--hi);
}
.selbar .count, .savebar .hint { color: #fff; }
.selbar .btn.ghost { color: #cfd3d8; border-color: #3c434b; }
.selbar .btn.ghost:hover { color: #fff; background: #262b31; }
.selbar { display: none; }
.selbar.show { display: flex; }
.selbar .count { font-weight: 700; font-size: 15px; }
.selbar .count .n { color: var(--primary); }

/* The capture form is long; the save action must never be a scroll
   away when you are standing at a stall. */
.savebar { display: flex; }
.savebar .btn { flex: 1 1 auto; }
.savebar .hint {
  flex: 1 1 100%; order: -1;
  font-family: "Archivo Narrow", sans-serif; font-size: 11px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

@media (min-width: 760px) {
  .selbar, .savebar {
    left: 50%; right: auto; transform: translateX(-50%);
    bottom: 16px; width: min(1100px, calc(100% - 32px));
    border: 2px solid var(--ink); border-top: 3px solid var(--hi);
  }
}

/* ---- capture screen ---- */

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 0; overflow: hidden;
        border: 2px solid var(--border); background: var(--bg); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
.shotadd {
  aspect-ratio: 1; border: 2px dashed var(--muted); border-radius: 0;
  background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 12px; font-weight: 600; cursor: pointer;
}

/* ---- active shop panel (capture screen) ---- */

.activeshop {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 13px;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--hi);
  background: var(--surface);
}
.activeshop .as-body { flex: 1 1 180px; min-width: 0; }
.activeshop .as-label {
  font-family: "Archivo Narrow", sans-serif;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.activeshop .as-name {
  font-size: 22px; font-weight: 800; line-height: 1.15;
  letter-spacing: -.025em; overflow-wrap: anywhere;
}
.activeshop .as-meta { font-size: 13px; color: var(--muted); }
.activeshop .as-count {
  font-size: 12px; font-weight: 800; color: var(--primary); margin-top: 4px;
}
.activeshop .as-actions {
  display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap;
}
.activeshop .as-actions .btn { padding: 8px 14px; font-size: 13px; }

/* ---- shop grouping (products screen) ---- */

.shopgroup { margin-bottom: 20px; }
.shopgroup > .shophead {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 9px 13px; margin-bottom: 10px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink);
}
.shopgroup > .shophead .meta { color: #a3a9b2; }
.shopgroup > .shophead a { color: var(--hi); }
.shopgroup > .shophead .name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.shopgroup > .shophead .meta { font-size: 12px; color: var(--muted); }
.shopgroup > .shophead .spacer { flex: 1; }

.pricebox {
  background: var(--hi); border: 2px solid var(--ink); padding: 13px;
}
.pricebox .big {
  font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1.05;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.pricebox .formula {
  font-size: 12px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* Each figure sits in its own white cell: readable on the orange. */
.pricebox .split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 2px; margin-top: 11px; background: var(--ink); border: 2px solid var(--ink);
}
.pricebox .split div {
  background: var(--surface); padding: 7px 9px;
  font-family: "Archivo Narrow", sans-serif; font-size: 11px;
  font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
}
.pricebox .split strong {
  display: block; font-family: "Archivo", sans-serif; font-size: 15px;
  font-weight: 800; letter-spacing: -.02em; text-transform: none;
  color: var(--text); font-variant-numeric: tabular-nums;
}

/* ---- misc ---- */

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert { border: 2px solid var(--ink); border-radius: 0; font-weight: 500; }
.alert.error { background: #fdecea; color: #7a1b15; border-left: 6px solid #b3261e; }
.alert.ok    { background: #e9f5ee; color: #14602c; border-left: 6px solid #1f7a45; }
.alert.info  { background: var(--hi-soft); color: #6d2508; border-left: 6px solid var(--hi); }
@media (prefers-color-scheme: dark) {
  .alert.error { background: #2c1512; color: #ffb3ab; }
  .alert.ok    { background: #12261a; color: #93dcae; }
  .alert.info  { background: #2a1d15; color: #ffc4a1; }
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; flex: 1 1 150px; }
.filters .field.grow { flex: 2 1 240px; }
.filters .field.auto { flex: 0 0 auto; }

/* Secondary filters: collapsed on a phone, inline on a wide screen
   (app.js sets `open` above 760px). */
.morefilters { flex: 1 1 100%; }
.morefilters > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; min-height: 44px;
  border: 2px solid var(--border); border-radius: 0;
  font-size: 14px; font-weight: 700; color: var(--text);
  background: var(--surface);
}
.morefilters > summary::-webkit-details-marker { display: none; }
.morefilters > summary::after { content: '▾'; font-size: 11px; }
.morefilters[open] > summary::after { content: '▴'; }
.morefilters > .fields {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px;
}
.morefilters > .fields .field { flex: 1 1 150px; margin: 0; }

@media (min-width: 760px) {
  /* Part of the single filter row, with no disclosure control. */
  .morefilters { flex: 3 1 460px; }
  .morefilters > summary { display: none; }
  .morefilters > .fields { margin-top: 0; }
}

@media (max-width: 759px) {
  /* Those labels are `&nbsp;` spacers that align buttons with the
     inputs beside them. Stacked on a phone there is nothing to align
     to, and they just burn a line each. */
  .filters .field.auto > label { display: none; }
  .filters .field.auto { flex: 0 1 auto; }
}

/* A view toggle is a set of related choices, so it reads as one
   control rather than three loose buttons. */
.segmented { display: inline-flex; border: 2px solid var(--border);
             overflow: hidden; background: var(--surface); }
.segmented a {
  padding: 9px 15px; font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none; white-space: nowrap;
  border-right: 2px solid var(--border); min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px;
}
.segmented a:last-child { border-right: 0; }
.segmented a:hover { background: var(--hi-soft); color: var(--text); }
.segmented a.on { background: var(--hi); color: var(--ink); font-weight: 700; }

/* The floating button and the selection bar both live bottom-right;
   when something is ticked, the bar is the one that matters. */
body.has-selection .fab { display: none; }

.fab {
  position: fixed; right: 16px; bottom: calc(88px + var(--safe-bottom)); z-index: 45;
  width: 62px; height: 62px; border-radius: 0;
  background: var(--hi); color: var(--ink); border: 3px solid var(--ink);
  font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}

/* ---- login ---- */

.loginwrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.loginwrap .card { width: 100%; max-width: 380px; margin: 0; }
.loginwrap .logo {
  text-align: center; font-family: "Archivo Narrow", sans-serif;
  font-size: 26px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--text); margin-bottom: 4px;
  border-bottom: 5px solid var(--hi); padding-bottom: 7px;
}

/* Google's brand guidance: white button, grey border, their mark. */
.btn.google {
  background: #fff; color: #1f1f1f; border-color: #dadce0;
  font-weight: 500; gap: 10px;
}
.btn.google:hover { background: #f7f8f8; border-color: #c9ccd1; }
.btn.google svg { flex: 0 0 auto; }
@media (prefers-color-scheme: dark) {
  .btn.google { background: #1f2733; color: #e6edf3; border-color: #3a4653; }
  .btn.google:hover { background: #263040; }
}

.orline {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .6px;
}
.orline::before, .orline::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ---- print ---- */

@media print {
  .topbar, .nav, .selbar, .fab, .noprint { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .ordergroup { break-inside: avoid; page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
