/* DabenQR app screens: admin dashboard, client area, sign-in, installer, "not linked" page.
   Product UI, so it uses thin borders and stepped surfaces (see base.css for the tokens). */

/* ---------- form pieces ---------- */

.field {
  display: block;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--ink-2);
}
.field input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line-2); /* taste-skill-ignore */
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px: stops phones zooming in */
  font-weight: 400;
}
.field input::placeholder { color: var(--ink-4); }
.field input:focus { outline: 2px solid #2f6bff; outline-offset: 0; border-color: var(--line-2); }
.hint {
  display: block;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
}
.hint b { color: var(--ink-2); font-weight: 500; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-small);
  color: var(--ink-2);
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.stack { display: grid; gap: 18px; }

.flash {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.flash-ok { background: #e9f6ec; border: 1px solid #b9dfc3; } /* taste-skill-ignore */
.flash-error { background: #fdecec; border: 1px solid #f1b9b9; } /* taste-skill-ignore */

.linkbtn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--link);
  font: inherit;
  font-size: var(--step-small);
  text-decoration: none;
  cursor: pointer;
}
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

.codebox {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line-2); /* taste-skill-ignore */
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.act {
  display: inline-block;
  appearance: none;
  border: 1px solid var(--line-2); /* taste-skill-ignore */
  border-radius: 8px;
  background: var(--s2);
  color: var(--ink);
  font: inherit;
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.2;
  padding: 9px 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms var(--ease), transform 140ms var(--ease);
}
.act:hover { background: var(--s4); }
.act:active { transform: translateY(1px); }
.act-danger { color: var(--danger); }
.act-danger:hover { background: #fdecec; }

/* ---------- sign-in, unlock, installer ---------- */

.auth-wrap {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: clamp(40px, 12vh, 112px) var(--margin) 72px;
}
.auth-mark { margin-bottom: 36px; }
.auth h1 { font-size: 1.875rem; margin-bottom: 10px; }
.auth h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 12px; }
.auth-lead { color: var(--ink-2); margin-bottom: 28px; font-size: 1rem; }
.auth .note { margin: 0 0 24px; color: var(--ink-2); font-size: var(--step-small); }
.auth .btn { margin-top: 6px; width: 100%; }
.auth-alt { margin-top: 24px; font-size: var(--step-small); color: var(--ink-3); }
.auth-alt a, .auth-back a { color: var(--link); text-decoration: none; }
.auth-alt a:hover, .auth-back a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-back { margin-top: 36px; font-size: 0.8125rem; color: var(--ink-3); }

/* ---------- "this card is not linked / ready to set up" ---------- */

.lost-main {
  min-height: 100svh;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 36px var(--margin) clamp(56px, 12vh, 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.lost-mark { margin-bottom: auto; padding-bottom: 12vh; }
.lost h1 { font-size: var(--step-head); }
.lost-line { color: var(--ink-2); font-size: var(--step-body); max-width: 46ch; }
.lost-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 12px; }
.lost-acts .plain { color: var(--link); text-decoration: none; font-size: 0.9375rem; }
.lost-acts .plain:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- dashboard frame ---------- */

.dash-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px var(--margin);
  border-bottom: 1px solid var(--line); /* taste-skill-ignore */
}
.dash-mark { display: inline-flex; text-decoration: none; }
.dash-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 24px;
  font-size: var(--step-small);
  color: var(--ink-2);
}
.dash-nav a { text-decoration: none; }
.dash-nav a:hover { color: var(--ink); }
.dash-nav form { margin: 0; }
.dash-nav .linkbtn { color: var(--ink-2); }
.dash-nav .linkbtn:hover { color: var(--ink); text-decoration: none; }

.dash-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 var(--margin) 96px;
}

.dash-head { padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 3vw, 40px); }
.dash-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
.dash-total .num {
  font-size: clamp(3rem, 2rem + 4vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.dash-total .unit { font-size: var(--step-lead); color: var(--ink-3); letter-spacing: -0.02em; }
.dash-sub { margin-top: 10px; color: var(--ink-3); font-size: var(--step-small); }
.dash-sub .linkbtn { margin-left: 4px; }

.panel {
  background: var(--s1);
  border: 1px solid var(--line); /* taste-skill-ignore */
  border-radius: 12px;
  padding: clamp(20px, 2.4vw, 32px);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.panel h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 20px; }
.panel h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 14px; }

.add-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  align-items: start;
}
.field-wide { grid-column: 1 / -1; }
.add-form .btn, .row-edit .btn { justify-self: start; }

.current { margin: 0 0 18px; max-width: 72ch; overflow-wrap: anywhere; color: var(--ink-2); font-size: 0.9375rem; }
.current a { color: var(--link); text-underline-offset: 3px; }
.current b { color: var(--ink); font-weight: 600; }
.warn { color: var(--danger); font-size: 0.9375rem; }

/* ---------- lists of orders and cards ---------- */

.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: 16px;
}
.list-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -0.03em; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.filter input {
  width: min(100%, 300px);
  padding: 9px 12px;
  border: 1px solid var(--line-2); /* taste-skill-ignore */
  border-radius: 8px;
  background: var(--s1);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.filter input::placeholder { color: var(--ink-4); }
.filter input:focus { outline: 2px solid #2f6bff; outline-offset: 0; }
.sorts { display: flex; align-items: center; gap: 4px 16px; font-size: var(--step-small); color: var(--ink-3); }
.sorts a { text-decoration: none; }
.sorts a:hover { color: var(--ink); }
.sorts a[aria-current] { color: var(--ink); font-weight: 600; }

.empty { padding: 28px 0; color: var(--ink-3); max-width: 56ch; }
.empty a { color: var(--link); }

.row,
.crow {
  display: grid;
  align-items: center;
  gap: 8px 24px;
  padding: 18px 22px;
  margin-bottom: 8px;
  background: var(--s1);
  border: 1px solid var(--line); /* taste-skill-ignore */
  border-radius: 12px;
  scroll-margin-top: 16px;
  transition: background-color 140ms var(--ease);
}
.row { grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1.05fr) minmax(0, 1.6fr) auto; }
.crow { grid-template-columns: minmax(5.5rem, 6.5rem) minmax(0, 1.3fr) minmax(0, 1.4fr) auto; padding: 14px 22px; }
.row:hover, .crow:hover { background: var(--s2); }
.row-editing, .row-editing:hover { background: var(--s2); border-color: var(--line-2); } /* taste-skill-ignore */

.row-scans { display: flex; flex-direction: column; line-height: 1.05; }
.row-scans .num {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.crow .row-scans .num { font-size: 1.5rem; }
.row-scans .unit { margin-top: 4px; color: var(--ink-3); font-size: 0.8125rem; }

.row-who { min-width: 0; }
.row-who h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 4px; overflow-wrap: anywhere; }
.crow h3.code { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; }
.row-link { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; font-size: 0.8125rem; color: var(--ink-3); }
.row-link a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.row-link a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.code { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plainlink { text-decoration: none; }
.plainlink:hover { color: var(--accent); }

.row-dest { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: var(--step-small); }
.row-dest a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.row-dest a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-last { color: var(--ink-3); font-size: 0.8125rem; }

.row-acts { display: flex; gap: 8px; align-items: center; }
.row-acts form { margin: 0; }

.row-edit {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  align-items: start;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line); /* taste-skill-ignore */
}
.row-edit-reset { grid-column: 1 / -1; margin: 0; }

.order { margin-bottom: clamp(48px, 6vw, 80px); scroll-margin-top: 16px; }
.order-head { margin-bottom: 18px; }
.order-head h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }

.cards-fold { margin-bottom: 14px; }
.cards-fold > summary,
.account summary,
.danger-zone summary {
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
}
.cards-fold > summary {
  padding: 16px 22px;
  background: var(--s1);
  border: 1px solid var(--line); /* taste-skill-ignore */
  border-radius: 12px;
}
.cards-fold > summary:hover { background: var(--s2); }
.cards-fold[open] > summary { margin-bottom: 10px; }
.cards-fold > summary::-webkit-details-marker,
.account summary::-webkit-details-marker,
.danger-zone summary::-webkit-details-marker { display: none; }
.cards-fold > summary::after,
.account summary::after,
.danger-zone summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 400; }
.cards-fold[open] > summary::after,
.account details[open] > summary::after,
.danger-zone details[open] > summary::after { content: "–"; }
.cardlist .filter { display: block; margin: 0 0 10px; }

.account form { margin-top: 22px; max-width: 760px; }
.danger-zone summary:hover { color: var(--danger); }
.danger-zone form { margin-top: 12px; }

.inline-forms { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-forms form { margin: 0; }
.steps { display: grid; gap: 10px; max-width: 76ch; color: var(--ink-2); font-size: 0.9375rem; }
.steps li { overflow-wrap: anywhere; }
.steps a { color: var(--link); text-underline-offset: 3px; }
.steps b { color: var(--ink); font-weight: 600; }

.dash-foot {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 28px var(--margin) 48px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.dash-foot a { color: var(--ink-2); text-underline-offset: 3px; }

@media (max-width: 920px) {
  .row, .crow { grid-template-columns: 1fr auto; }
  .row-who, .row-dest { grid-column: 1 / -1; }
  .row-scans { flex-direction: row; align-items: baseline; gap: 10px; }
  .row-scans .unit { margin: 0; }
  .row-acts { grid-column: 2; grid-row: 1; }
}

@media (max-width: 640px) {
  .add-form, .row-edit { grid-template-columns: 1fr; }
  .row, .crow { padding: 14px 16px; }
  .cards-fold > summary { padding: 14px 16px; }
  .row-acts { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------- QR sheet ---------- */

.qr-help { display: grid; gap: 12px; }
.qr-help p { max-width: 60ch; color: var(--ink-2); }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.qr-card { margin: 0; padding: 14px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); /* taste-skill-ignore */ display: grid; gap: 12px; align-content: start; min-width: 0; }
.qr-img { background: #fff; border-radius: 8px; padding: 6px; line-height: 0; }
.qr-img svg { width: 100%; height: auto; display: block; }
.qr-card figcaption { display: grid; gap: 2px; font-size: 0.8125rem; color: var(--ink-3); min-width: 0; }
.qr-card .code { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.qr-link { overflow-wrap: anywhere; }
.qr-dl { display: flex; gap: 12px; margin-top: 6px; }
.qr-dl a { color: var(--link); text-decoration: none; }
.qr-dl a:hover { text-decoration: underline; }

@media print {
  body { background: #fff !important; color: #000 !important; }
  .no-print { display: none !important; }
  .qr-grid { grid-template-columns: repeat(4, 1fr); gap: 10mm; }
  .qr-card { background: #fff; border: 0; padding: 0; break-inside: avoid; }
  .qr-card figcaption, .qr-card .code { color: #000; }
}

.lost-home { margin-top: 28px; font-size: 0.875rem; }
.lost-home a { color: var(--ink-3); text-decoration: none; }
.lost-home a:hover { color: var(--ink); text-decoration: underline; }


/* ---------- menu: two dashes, opens a small panel (no JavaScript needed) ---------- */
.dash-bar { position: relative; flex-wrap: nowrap; }
.menu-chk { position: absolute; right: var(--margin); top: 12px; width: 44px; height: 44px; opacity: 0; margin: 0; cursor: pointer; z-index: 3; }
.menu-btn { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.menu-btn::before, .menu-btn::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 200ms, top 200ms; }
.menu-btn::before { top: 17px; }
.menu-btn::after { top: 25px; }
.menu-chk:checked + .menu-btn::before { top: 21px; transform: rotate(45deg); }
.menu-chk:checked + .menu-btn::after { top: 21px; transform: rotate(-45deg); }
.menu-chk:focus-visible + .menu-btn { outline: 3px solid #2f6bff; outline-offset: 2px; }
.menu-btn:hover { background: #f4f3ef; }
.dash-nav { display: none; position: absolute; z-index: 30; top: calc(100% + 6px); right: var(--margin); min-width: 240px; max-width: calc(100vw - 2 * var(--margin)); flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(17, 17, 19, 0.14); font-size: 1rem; color: var(--ink); }
.menu-chk:checked ~ .dash-nav { display: flex; }
.dash-nav a, .dash-nav .linkbtn { display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; color: var(--ink); text-align: left; text-decoration: none; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; }
.dash-nav a:hover, .dash-nav .linkbtn:hover { background: #f4f3ef; color: var(--ink); text-decoration: none; }
.dash-nav a[aria-current="page"] { font-weight: 700; }
.dash-nav form { margin: 0; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px; }
@media print { .menu-chk, .menu-btn, .dash-nav { display: none !important; } }

.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;background:#fff;color:#111113;border:1px solid #d9d8d3}
.btn-google:hover{background:#f4f3ef}
.auth-or{display:flex;align-items:center;gap:12px;margin:16px 0;color:#77767b;font-size:.85rem}
.auth-or:before,.auth-or:after{content:'';flex:1;height:1px;background:#e5e4df}

/* =====================================================================
   v3 dashboard patterns: stat tiles, status pills, link bar, mini card
   ===================================================================== */

.dash-title { margin: 8px 0 24px; }
.dash-title h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 6px; }
.dash-title p { margin: 0; color: var(--ink-3); font-size: var(--step-small); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 28px; }
.stats.s3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.stat .k { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; }
.stat .v { display: block; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v.sm { font-size: 1.25rem; letter-spacing: -0.02em; padding-top: 6px; }
.stat.alert { background: #fff6ee; border-color: #f6d3b8; }
.stat.alert .v { color: var(--accent-press); }
@media (max-width: 760px) { .stats, .stats.s3 { grid-template-columns: repeat(2, 1fr); } .stats.s3 .stat:last-child { grid-column: 1 / -1; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--s3); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: #e4f4e8; color: #17692f; }
.pill-warn { background: #fff0e0; color: #a14a0b; }
.pill-idle { background: var(--s3); color: var(--ink-3); }

/* "+ New order" opens the form instead of it always taking the screen */
details.add > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9375rem; }
details.add > summary::-webkit-details-marker { display: none; }
details.add > summary::before { content: "+"; font-size: 1.15rem; line-height: 1; }
details.add[open] > summary { background: var(--s3); color: var(--ink); }
details.add[open] > summary::before { content: "\00d7"; }
details.add > .add-form { margin-top: 18px; }
.panel.add.fold { background: none; border: 0; padding: 0; margin: 0 0 28px; }
.panel.add.fold > .add-form { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }

/* order rows read like a table row in Stripe or Linear */
.row { border: 1px solid var(--line); border-radius: 16px; background: var(--canvas); transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease); }
.row:hover { border-color: var(--line-2); box-shadow: 0 1px 0 rgba(15,15,16,.04), 0 6px 20px -12px rgba(15,15,16,.18); }
.row-who h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }

/* the current link, shown as a chip with its status */
.linkbar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); margin-bottom: 16px; }
.linkbar .u { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--step-small); color: var(--ink-2); text-decoration: none; }
.linkbar .u:hover { text-decoration: underline; text-underline-offset: 3px; }
.inline-save { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-save .field { flex: 1 1 260px; }
.inline-save .btn { margin-top: 0; }

.google-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -8px 0 20px; }
.google-link img { width: 16px; height: 16px; }

/* mini Google-style card, used beside the sign-in form and on the unset page */
.mcard { position: relative; width: 190px; aspect-ratio: 190 / 300; border-radius: 16px; background: #101215; color: #fff; padding: 18px 16px; display: flex; flex-direction: column; box-shadow: 0 24px 50px -22px rgba(15,15,16,.55); font-family: "Google Sans Flex", var(--font); }
.mcard.light { background: #fff; color: #111; border: 1px solid #dcdbd6; }
.mcard .t { font-size: 8px; font-weight: 600; letter-spacing: .14em; color: #c9cdd3; }
.mcard.light .t { color: #5f6066; }
.mcard .w { width: 82px; margin-top: 8px; display: block; }
.mcard .g { width: 70px; height: 70px; border-radius: 50%; background: #fff; display: grid; place-items: center; margin: 26px auto 0; }
.mcard.light .g { border: 1px solid #e5e4df; }
.mcard .g img { width: 38px; height: 38px; }
.mcard .p { margin: 18px 0 0; text-align: center; font-size: 8.5px; line-height: 1.4; color: #b6bbc2; }
.mcard.light .p { color: #5f6066; }
.mcard .s { margin-top: auto; color: #f5b301; text-align: center; letter-spacing: 3px; font-size: 13px; }
.mcard .nfc { position: absolute; top: 16px; right: 14px; width: 18px; opacity: .85; }
.art-pair { position: relative; width: 300px; height: 330px; }
.art-pair .mcard { position: absolute; }
.art-pair .mcard:nth-child(1) { left: 0; top: 30px; transform: rotate(-6deg); }
.art-pair .mcard:nth-child(2) { left: 100px; top: 0; transform: rotate(5deg); }

/* sign-in: form on the left, cards on the right (desktop only) */
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
.auth-art { display: none; }
@media (min-width: 960px) {
  .auth-split { grid-template-columns: minmax(420px, 1fr) minmax(0, 1.1fr); }
  .auth-split .auth-wrap { margin: 0; align-self: center; width: min(100%, 480px); justify-self: center; padding-top: 48px; }
  .auth-art { display: grid; place-items: center; background: var(--s1); border-left: 1px solid var(--line); padding: 40px; }
  .auth-art h2 { margin: 36px 0 0; font-size: 1.25rem; letter-spacing: -0.02em; text-align: center; }
  .auth-art p { margin: 6px 0 0; color: var(--ink-3); font-size: var(--step-small); text-align: center; }
  .auth-art .inner { display: grid; justify-items: center; }
}
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--s2); }
.lost-card { margin: 8px 0 12px; }

.dash-main { padding-top: clamp(24px, 4vw, 44px); }
.order-head { margin-bottom: 14px; }
@media (max-width: 760px) {
  .row { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .row-scans { display: flex; align-items: baseline; gap: 8px; }
  .row-acts { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 4px 0 0; justify-content: stretch; }
  .row-scans { order: 0; }
  .row-acts .act { text-align: center; padding: 10px 6px; }
}

/* simpler screens: rarely used options hide behind "More options" */
details.more > summary { cursor: pointer; list-style: none; color: var(--ink-3); font-size: var(--step-small); font-weight: 500; padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " +"; }
details.more[open] > summary::after { content: " \2212"; }
details.more > .check, details.more > .hint, details.more > .add-form { margin-top: 12px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats .stat { max-width: 320px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats .stat { max-width: none; } }
.stats { grid-template-columns: repeat(auto-fill, minmax(150px, 240px)); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* wide screens: header lines up with the page content */
.dash-bar { padding-inline: max(var(--margin), calc((100% - 1180px) / 2 + var(--margin))); }
.dash-nav { right: max(var(--margin), calc((100% - 1180px) / 2 + var(--margin))); }
/* status colour is never the brand orange (brand accent stays on the logo) */
.stat.alert { background: #fffaf0; border-color: #f0dfb4; }
.stat.alert .v { color: var(--ink); }
.stat.alert .k::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #d98a0b; vertical-align: 1px; }
.stat, .row, .panel { border-radius: 12px; }

/* =====================================================================
   v4: plainer pages. No tiles, no tags, no tinted boxes: type, rules, space.
   ===================================================================== */

.dash-title { margin: 0 0 22px; }
.dash-title h1 { font-size: 1.625rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.dash-title p { margin-top: 4px; }

/* figures sit in a line, not in boxes */
.stats { display: flex; flex-wrap: wrap; gap: 14px 48px; margin: 0 0 34px; padding: 0 0 26px; border-bottom: 1px solid var(--line); grid-template-columns: none; }
.stat, .stat.alert { background: none; border: 0; border-radius: 0; padding: 0; max-width: none; display: flex; flex-direction: column-reverse; gap: 3px; }
.stat .k { margin: 0; font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); }
.stat .k::before, .stat.alert .k::before { display: none; }
.stat .v { font-size: 2rem; font-weight: 700; letter-spacing: -0.035em; }
.stat .v.sm { font-size: 1.25rem; padding-top: 0; }
.stat.alert .v { color: var(--ink); }
@media (max-width: 760px) { .stats { grid-template-columns: none; gap: 14px 36px; } .stats .stat { grid-column: auto; } }

/* status is a word, not a badge */
.pill { background: none; padding: 0; border-radius: 0; font-size: 0.8125rem; font-weight: 600; gap: 0; }
.pill::before { display: none; }
.pill-ok { color: var(--ok); }
.pill-warn { color: #9a5a00; }
.pill-idle { color: var(--ink-3); font-weight: 500; }

/* sections are separated by a line, not wrapped in grey cards */
.panel, .panel.guide { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 26px 0 4px; margin: 34px 0 0; }
.panel.add.fold { border-top: 0; padding: 0; margin: 0 0 28px; }
.panel.add.fold > .add-form, details.add > .add-form { background: none; border: 0; border-radius: 0; padding: 0; }
.panel.danger-zone { border-top-color: #e8c4c4; }
.linkbar { background: none; border: 0; padding: 0; margin: 0 0 18px; gap: 6px 14px; }
.linkbar .act { background: none; border: 0; padding: 0; color: var(--link); }
.linkbar .act:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
.more-link { margin: 14px 0 0; font-size: var(--step-small); }
.more-link a, details.more > summary { color: var(--ink-3); }

/* order list reads like a ledger */
.row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 18px 0; background: none; }
.row:hover { background: none; border-color: var(--line); box-shadow: none; }
.act { background: var(--canvas); }

/* messages are a line of text with a rule */
.flash { background: none; border: 0; border-left: 3px solid var(--ink); border-radius: 0; padding: 2px 0 2px 14px; margin-bottom: 26px; }
.flash-ok { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--danger); }
@media (max-width: 760px) { .row { padding: 16px 0; } }
.stats { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.order-head { margin-bottom: 4px; }
.cards-fold { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 30px; }
.cards-fold > summary { padding: 18px 0; }
.crow { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
.crow:hover, .row-editing, .row-editing:hover { background: none; }
.cards-fold, .cards-fold > summary { background: none !important; box-shadow: none; }
.cards-fold > summary { border: 0; padding: 20px 0 14px; font-size: 1.0625rem; font-weight: 600; }
.panel + .list-head, .panel ~ section > .list-head, .panel + h2, .panel + section { margin-top: 34px; }

/* =====================================================================
   v5 app shell: sidebar on desktop, warm canvas, white cards, bold type.
   Reference points: Square Dashboard (left nav, big figures), Shopify admin
   (warm canvas + white cards), Mercury (calm tables).
   ===================================================================== */

body.dash { background: #f4f3ef; }
body.dash .dash-title h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); font-weight: 750; letter-spacing: -0.035em; }
body.dash .dash-title p { color: var(--ink-3); }

/* white cards on the warm canvas */
body.dash .panel, body.dash .panel.guide { background: #fff; border: 1px solid #e6e4dd; border-radius: 16px; padding: 24px; margin: 20px 0 0; }
body.dash .panel.add.fold { background: none; border: 0; padding: 0; margin: 0 0 20px; }
body.dash .panel.add.fold > .add-form, body.dash details.add > .add-form { background: #fff; border: 1px solid #e6e4dd; border-radius: 16px; padding: 24px; }
body.dash .panel.danger-zone { border-color: #ecc9c9; }
body.dash .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 0; margin: 0 0 22px; border: 0; }
body.dash .stat, body.dash .stat.alert { background: #fff; border: 1px solid #e6e4dd; border-radius: 16px; padding: 20px 22px; flex-direction: column; gap: 10px; }
body.dash .stat .k { font-weight: 500; }
body.dash .stat .v { font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); letter-spacing: -0.045em; }
body.dash .stat.alert { border-color: #ecd9a8; }
body.dash .stat.alert .k::before { display: inline-block; content: ""; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d98a0b; vertical-align: 1px; }
body.dash .list { background: #fff; border: 1px solid #e6e4dd; border-radius: 16px; padding: 6px 24px 0; }
body.dash .list .list-head { padding: 14px 0 10px; }
body.dash .row:last-of-type { border-bottom: 0; }
body.dash .cards-fold { background: #fff !important; border: 1px solid #e6e4dd; border-radius: 16px; padding: 0 22px; margin-top: 20px; }
body.dash .cards-fold > summary { padding: 18px 0; }
body.dash .flash { background: #fff; border: 1px solid #e6e4dd; border-left: 3px solid var(--ink); border-radius: 12px; padding: 12px 16px; }
body.dash .flash-ok { border-left-color: var(--ok); }
body.dash .flash-error { border-left-color: var(--danger); }
body.dash .field input { background: #fff; }

/* the client's actual card sits next to the link form */
.link-panel { display: grid; gap: 28px; }
.link-panel .lp-card { display: none; }
@media (min-width: 880px) {
  .link-panel { grid-template-columns: minmax(0, 1fr) 210px; align-items: center; }
  .link-panel .lp-card { display: block; justify-self: center; }
  .link-panel .mcard { transform: rotate(3deg); }
}

/* desktop: left sidebar */
@media (min-width: 960px) {
  body.dash { padding-left: 248px; }
  body.dash .dash-bar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 20; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 26px; min-height: 0; padding: 26px 16px 22px; background: #fbfaf7; border: 0; border-right: 1px solid #e6e4dd; }
  body.dash .dash-mark { padding: 0 8px; }
  body.dash .menu-chk, body.dash .menu-btn { display: none; }
  body.dash .dash-nav { display: flex; position: static; flex: 1; min-width: 0; max-width: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; font-size: 0.9375rem; }
  body.dash .dash-nav a, body.dash .dash-nav .linkbtn { position: relative; display: block; width: 100%; box-sizing: border-box; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 0.9375rem; text-decoration: none; }
  body.dash .dash-nav a:hover, body.dash .dash-nav .linkbtn:hover { background: #eeece6; color: var(--ink); text-decoration: none; }
  body.dash .dash-nav a[aria-current="page"] { background: #ecebe5; color: var(--ink); font-weight: 650; }
  body.dash .dash-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  body.dash .dash-nav form { margin-top: auto; padding-top: 14px; border-top: 1px solid #e6e4dd; }
  body.dash .dash-main { width: min(100%, 1060px); margin: 0 auto; padding: 44px 40px 96px; }
  body.dash .dash-foot { padding-left: 40px; }
}
.link-panel { grid-template-columns: minmax(0, 1fr); }
.link-panel > * { min-width: 0; }
@media (min-width: 880px) { .link-panel { grid-template-columns: minmax(0, 1fr) 210px; } }
body.dash .list .list-head { padding: 10px 0 6px; }
@media (max-width: 760px) { body.dash .list { padding: 6px 18px 0; } }

/* v6: one QR per order */
.qr-one-body{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.qr-one-img{width:132px;height:132px;flex:none;background:#fff;border:1px solid #e6e4dd;border-radius:12px;padding:8px}
.qr-one-img svg{width:100%;height:100%;display:block}

/* v7: tighter. Less air, smaller headings, same layout. */
body.dash .dash-title { margin: 0 0 14px; }
body.dash .dash-title h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }
body.dash .dash-title p { margin-top: 2px; font-size: 0.875rem; }
body.dash .stats { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; }
body.dash .stat, body.dash .stat.alert { padding: 12px 16px; gap: 2px; border-radius: 12px; }
body.dash .stat .v { font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem); }
body.dash .stat .v.sm { font-size: 1.125rem; }
body.dash .panel, body.dash .panel.guide { padding: 16px 18px; margin: 12px 0 0; border-radius: 12px; }
body.dash .panel h2 { font-size: 1rem; margin: 0 0 10px; }
body.dash .panel.add.fold { margin: 0 0 12px; }
body.dash .panel.add.fold > .add-form, body.dash details.add > .add-form { padding: 16px 18px; border-radius: 12px; }
body.dash details.add > .add-form { margin-top: 10px; }
body.dash .add-form { gap: 10px 14px; }
body.dash .field input { padding-block: 9px; }
body.dash .list { padding: 2px 18px 0; border-radius: 12px; margin-top: 12px; }
body.dash .list .list-head { padding: 8px 0 4px; }
body.dash .list-head h2 { font-size: 1.125rem; letter-spacing: -0.02em; }
body.dash .row { padding: 10px 0; }
body.dash .flash { padding: 9px 14px; margin-bottom: 12px; }
body.dash .link-panel { gap: 16px; }
body.dash .link-panel .mcard { transform: rotate(3deg) scale(0.82); }
@media (min-width: 960px) {
  body.dash .dash-main { padding: 28px 32px 40px; }
  body.dash .dash-bar { gap: 16px; padding: 20px 14px 16px; }
}
body.dash .dash-foot { padding-top: 0; padding-bottom: 20px; font-size: 0.8125rem; }
@media (max-width: 760px) { body.dash .list { padding: 2px 14px 0; } body.dash .panel { padding: 14px; } }
body.dash .list .list-head { margin: 0; min-height: 0; gap: 10px; align-items: center; }
body.dash .list .list-tools { margin: 0; }
@media (min-width: 1000px) { body.dash .panel > form.add-form:not(.stack) { grid-template-columns: repeat(3, minmax(0, 1fr)); } body.dash .add-form .field-wide, body.dash .add-form > details, body.dash .add-form > .btn { grid-column: 1 / -1; } body.dash .add-form > .btn { justify-self: start; } }
