/* app.css — VPP dashboard. Design system lifted from the Vintesh CRM (app.css
   tokens, topbar, buttons, pills). Don't add top-level color tokens without
   checking this block first. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;450;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  color-scheme: dark;

  --bg-0: #07070b;
  --bg-1: #0d0c14;
  --bg-2: #15131f;

  --surface-0: rgba(255, 255, 255, 0.035);
  --surface-1: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.082);
  --surface-solid: #12111b;

  --text-0: #fbfaf7;
  --text-1: rgba(251, 250, 247, 0.78);
  --text-2: rgba(251, 250, 247, 0.56);
  --text-3: rgba(251, 250, 247, 0.36);

  --cream: #f5efe3;
  --champagne: #d8c8a7;
  --lavender: #b9b0d4;
  --violet: #7d67c8;
  --indigo: #181530;

  --line-0: rgba(255, 255, 255, 0.075);
  --line-1: rgba(255, 255, 255, 0.12);
  --line-2: rgba(216, 200, 167, 0.22);

  --good: #86d9a3;
  --warn: #e1bf72;
  --bad: #e28a8f;
  --blue: #9db7e8;
  --teal: #92dacb;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, 0.48);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.2,.8,.2,1);
  --max: 1440px;
}

/* ========= BASE ========= */
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-0); text-rendering: geometricPrecision; -webkit-font-smoothing: antialiased; }
body {
  margin: 0; min-height: 100vh; color: var(--text-0);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400; letter-spacing: -0.018em; overflow-x: hidden;
  background: var(--bg-0); position: relative; isolation: isolate;
}
.bg-fixed {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(circle at 14% -8%, rgba(125, 103, 200, 0.32), transparent 30rem),
    radial-gradient(circle at 92% 4%, rgba(216, 200, 167, 0.11), transparent 28rem),
    radial-gradient(circle at 50% 112%, rgba(72, 52, 137, 0.24), transparent 34rem),
    linear-gradient(180deg, #08080d 0%, #0d0c14 46%, #07070b 100%);
}
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 34px; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text-2); }
.muted a { color: var(--text-1); }

/* ========= TOPBAR ========= */
.topbar {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 22px;
  min-height: 76px; padding: 14px clamp(18px, 3vw, 44px);
  background: rgba(7, 7, 11, 0.68); border-bottom: 1px solid var(--line-0);
  backdrop-filter: blur(26px) saturate(145%); -webkit-backdrop-filter: blur(26px) saturate(145%);
}
.brand { min-width: 96px; color: var(--text-0); text-decoration: none; font-weight: 700; letter-spacing: .08em; font-size: 15px; }
.nav-links {
  position: relative; flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px;
  max-width: max-content; background: rgba(255,255,255,.035); border: 1px solid var(--line-0); border-radius: var(--radius-pill);
  overflow-x: auto; scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; color: var(--text-2);
  text-decoration: none; white-space: nowrap; transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--text-0); }
.nav-link.is-active { color: #100f16; background: linear-gradient(180deg, #f5efe3, #cdbf9f); }
.user-menu { position: relative; margin-left: auto; }
.user-menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px;
  background: var(--surface-solid); border: 1px solid var(--line-1); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
}
.user-menu-item { display: block; padding: 10px 12px; border-radius: var(--radius-xs); color: var(--text-1); text-decoration: none; font-size: 13px; }
.user-menu-item:hover { color: var(--text-0); background: var(--surface-1); }

/* ========= LAYOUT ========= */
.main { max-width: var(--max); margin: 0 auto; padding: 28px clamp(18px, 3vw, 44px) 80px; }
.page-head { margin: 8px 0 22px; }
.page-head .muted { margin-top: 6px; font-size: 14px; }
.card {
  background: var(--surface-0); border: 1px solid var(--line-0); border-radius: var(--radius-md);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }
.empty { text-align: center; padding: 56px 24px; }
.empty h2 { margin-bottom: 6px; }
.empty .muted { max-width: 52ch; margin: 0 auto; font-size: 14px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 0 0 16px; }
.kv dt { font-size: 11px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.kv dd { margin: 0; font-size: 15px; }

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px;
  color: var(--text-1); text-decoration: none; text-align: center; font-family: inherit; font-size: 12px; font-weight: 660; letter-spacing: .005em;
  cursor: pointer; border: 1px solid var(--line-0); border-radius: var(--radius-pill); background: rgba(255,255,255,.034);
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { color: var(--text-0); transform: translateY(-1px); border-color: rgba(216,200,167,.26); background: rgba(216,200,167,.075); box-shadow: 0 10px 24px rgba(0,0,0,.20); }
.btn:focus-visible { outline: 2px solid var(--champagne); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.btn-gold {
  color: #100f16; border-color: rgba(216,200,167,.48); background: linear-gradient(180deg, #f5efe3, #cdbf9f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 10px 26px rgba(216,200,167,.10);
}
.btn-gold:hover { color: #050509; background: linear-gradient(180deg, #fff8ee, #d8c8a7); }
.btn-secondary { color: var(--text-2); background: rgba(255,255,255,.028); }
.btn-secondary:hover { color: var(--text-0); background: rgba(255,255,255,.06); box-shadow: none; }
.btn-block { width: 100%; min-height: 48px; font-size: 13px; }

/* ========= PILLS (quote status) ========= */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; border: 1px solid var(--line-1); color: var(--text-1); background: var(--surface-1); }
.pill-draft { color: var(--text-2); }
.pill-sent, .pill-viewed { color: var(--blue); border-color: rgba(157,183,232,.3); background: rgba(157,183,232,.08); }
.pill-accepted, .pill-delivered { color: var(--good); border-color: rgba(134,217,163,.3); background: rgba(134,217,163,.08); }
.pill-in_production { color: var(--warn); border-color: rgba(225,191,114,.3); background: rgba(225,191,114,.08); }
.pill-lost, .pill-superseded { color: var(--bad); border-color: rgba(226,138,143,.3); background: rgba(226,138,143,.08); }

/* ========= FORMS ========= */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11px; font-weight: 600; color: var(--text-3); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 0 14px; color: var(--text-0); font-family: inherit; font-size: 14px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line-0); border-radius: var(--radius-sm); outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
input::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { border-color: rgba(216,200,167,.50); background: rgba(255,255,255,.044); box-shadow: 0 0 0 4px rgba(216,200,167,.075); }
input:-webkit-autofill { -webkit-text-fill-color: var(--text-0); -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset; caret-color: var(--text-0); }
.alert { padding: 10px 12px; border-radius: var(--radius-xs); font-size: 13px; margin: 0 0 14px; border: 1px solid; }
.alert-bad { color: var(--bad); border-color: rgba(226,138,143,.3); background: rgba(226,138,143,.08); }
.alert-good { color: var(--good); border-color: rgba(134,217,163,.3); background: rgba(134,217,163,.08); }

/* ========= CARDS: HEADS, TABLES, TOKENS ========= */
.card-head { margin-bottom: 16px; }
.card-head .muted { margin-top: 4px; font-size: 13px; max-width: 72ch; }
code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--champagne); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 18px; }
.table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-0); }
.table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line-0); vertical-align: middle; color: var(--text-1); }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-revoked td { color: var(--text-3); }
.table .row-actions { text-align: right; padding-right: 0; white-space: nowrap; }
.table .btn { min-height: 32px; padding: 0 12px; font-size: 11px; }
.token-form { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.2fr) auto; gap: 14px; align-items: end; padding-top: 4px; }
.token-form .field { margin-bottom: 0; }
.token-form .btn { min-height: 44px; }
.token-plain { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin: 0 0 16px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.token-plain code { flex: 1; word-break: break-all; font-size: 13px; color: var(--text-0); }
.alert strong { color: inherit; }
@media (max-width: 720px) { .token-form { grid-template-columns: 1fr; } #tokens-list .table th:nth-child(3), #tokens-list .table td:nth-child(3) { display: none; } }

/* ========= SUPPLIERS (price sheets) ========= */
.tiny { font-size: 11px; color: var(--text-3); }
h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.page-suppliers, .page-catalog, .page-clients, .page-quotes, .page-builder { font-variant-numeric: tabular-nums; }
.page-suppliers .head, .page-catalog .head, .page-clients .head, .page-quotes .head, .page-builder .head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin: 8px 0 18px; }
.page-suppliers .head .muted, .page-catalog .head .muted, .page-clients .head .muted, .page-quotes .head .muted, .page-builder .head .muted { margin-top: 6px; font-size: 14px; max-width: 64ch; }
.head-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mult { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); background: rgba(216,200,167,.06); }
.mult label { font-size: 12px; font-weight: 600; color: var(--champagne); white-space: nowrap; }
.mult input { width: 78px; min-height: 32px; padding: 0 8px; text-align: center; font-weight: 600; border-radius: var(--radius-pill); }
.mult select { width: auto; min-height: 32px; font-size: 12.5px; padding: 0 30px 0 12px; border-radius: var(--radius-pill); }
.page-suppliers select, .page-catalog select, .page-clients select, .page-quotes select, .page-builder select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.page-suppliers input, .page-suppliers select, .page-suppliers textarea, .page-catalog input, .page-catalog select, .page-catalog textarea, .page-clients input, .page-clients select, .page-clients textarea, .page-quotes input, .page-quotes select, .page-builder input, .page-builder select, .page-builder textarea { min-height: 38px; padding: 0 12px; font-size: 13.5px; border-radius: var(--radius-xs); }
.page-suppliers textarea, .page-catalog textarea, .page-clients textarea, .page-builder textarea { min-height: 64px; padding: 9px 12px; }
.page-suppliers input[type=number], .page-catalog input[type=number] { -moz-appearance: textfield; }
.page-suppliers input[type=number]::-webkit-inner-spin-button, .page-catalog input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.page-suppliers .field, .page-catalog .field, .page-clients .field, .page-quotes .field, .page-builder .field { margin-bottom: 0; }
.page-suppliers .field label, .page-catalog .field label, .page-clients .field label, .page-quotes .field label, .page-builder .field label { margin-bottom: 5px; }
.money, .pct { position: relative; }
.money input { padding-left: 24px; }
.pct input { padding-right: 28px; }
.money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.pct::after { content: "%"; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.note { padding: 12px 14px; border-radius: var(--radius-xs); background: rgba(216,200,167,.07); border: 1px solid var(--line-2); color: var(--text-1); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
.note b { color: var(--champagne); }
.layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }
.side { padding: 10px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 12px; }
.sup { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 12px; border-radius: var(--radius-xs); cursor: pointer; color: var(--text-1); }
.sup:hover { background: var(--surface-1); color: var(--text-0); }
.sup.on { background: rgba(216,200,167,.10); color: var(--text-0); outline: 1px solid var(--line-2); }
.sup b { font-weight: 600; font-size: 13.5px; }
.sup .sub { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.review-dot { display: inline-block; width: 6px; height: 6px; margin: 0 4px 1px 0; border-radius: 50%; background: var(--warn); }
.pill-review { color: var(--warn); border-color: rgba(225,191,114,.3); background: rgba(225,191,114,.08); }
.pill-alibaba { color: var(--warn); border-color: rgba(225,191,114,.3); background: rgba(225,191,114,.08); }
.pill-direct { color: var(--good); border-color: rgba(134,217,163,.3); background: rgba(134,217,163,.08); }
.pill-agent { color: var(--blue); border-color: rgba(157,183,232,.3); background: rgba(157,183,232,.08); }
.panel { padding: 22px 24px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.panel-actions { display: flex; gap: 8px; flex-shrink: 0; }
.save-state { min-width: 48px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 14px; }
.grid .wide { grid-column: 1 / -1; }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: 11.5px; }
.btn-danger:hover { color: var(--bad); border-color: rgba(226,138,143,.35); background: rgba(226,138,143,.08); }
.sheet { background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--radius-sm); padding: 16px 18px; }
.sheet + .sheet { margin-top: 12px; }
.sheet-top { display: grid; grid-template-columns: 1fr 110px 150px auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.sheet-top .field:first-child input { font-weight: 600; font-size: 15px; }
.sheet-flags { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
@media (max-width: 720px) { .sheet-top { grid-template-columns: 1fr 1fr; } .sheet-top .field:first-child { grid-column: 1 / -1; } }
.tiers { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.tiers th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--line-0); }
.tiers th.r, .tiers td.r, .table th.r, .table td.r { text-align: right; }
.tiers td { padding: 5px 8px; border-bottom: 1px solid var(--line-0); vertical-align: middle; }
.tiers td input { min-height: 34px; }
.tiers td.r { font-size: 14px; white-space: nowrap; }
.tiers td.price { font-weight: 700; color: var(--cream); font-size: 15px; }
.m-good { color: var(--good); } .m-warn { color: var(--warn); } .m-bad { color: var(--bad); }
.tiers .x { width: 34px; text-align: center; }
.x button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-0); background: transparent; color: var(--text-3); cursor: pointer; font: inherit; }
.x button:hover { color: var(--bad); border-color: rgba(226,138,143,.4); }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; }
.sheet-foot .tiny { flex: 1 1 260px; }
.calc-sample { color: var(--cream); font-weight: 600; }
.pay-table td { font-size: 13px; }
.pay-table td:first-child { white-space: nowrap; }
.pay-form .note-field { grid-column: span 2; }
.pay-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; align-items: end; }
.pay-form .btn { min-height: 38px; }
.report { margin: 0; padding: 14px 16px; background: rgba(0,0,0,.28); border: 1px solid var(--line-0); border-radius: var(--radius-xs); font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.55; color: var(--text-1); white-space: pre-wrap; max-height: 420px; overflow: auto; }
.import-panel { margin-bottom: 18px; }

/* ========= CLIENTS ========= */
#cli-search { width: 260px; min-height: 36px; border-radius: var(--radius-pill); padding: 0 16px; }
.new-panel { margin-bottom: 18px; border-color: var(--line-2); }
.panel-actions .btn-sm { min-height: 32px; }
.reach-links { display: inline-flex; gap: 8px; }

/* ========= QUOTES: LIST + BUILDER ========= */
.empty-hero { position: relative; padding: 78px 24px 70px; overflow: hidden; }
.empty-hero::before {          /* a pool of light under the button — the page's own gradient, focused */
  content: ""; position: absolute; left: 50%; top: 58%; width: 560px; height: 320px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(216,200,167,.13), rgba(125,103,200,.07) 45%, transparent 70%);
  pointer-events: none;
}
.empty-hero > * { position: relative; }
.empty-hero h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 30px; letter-spacing: -.01em; margin-bottom: 10px; }
.empty-hero .muted { max-width: 46ch; margin: 0 auto; font-size: 14.5px; line-height: 1.6; }
.empty-hero .hero-fine { margin-top: 18px; color: var(--text-3); }
/* The "start a quote" moment: an aurora ring (champagne → lavender → violet) turning slowly behind
   the button, a blurred copy of it as the glow, five glints that twinkle at rest and burst on hover,
   a sheen across the face on hover. All CSS; reduced-motion gets the plain button. */
/* ========= "Start a quote" — the hero CTA (built in Astra, wired in here) =========
   Layered pill: a conic aurora rotating inside a blurred mask (the glow) and a crisp
   1.5px copy of it (the edge), a cream face with its own sheen, three ambient glints,
   and a star burst on click built in JS. All motion is transform/opacity. Tokens are
   the app's own — the palette never leaves champagne → lavender → violet → cream. */
.quote-cta {
  --duration: 420ms;
  --ease-cta: cubic-bezier(.2, .8, .2, 1);
  --lift: 0px;
  --scale: 1;
  --aura-opacity: .36;
  --aura-scale: 1;
  --edge-opacity: .42;
  --polish-opacity: 0;
  --label-scale: 1;
  --arrow-x: 0px;

  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 15px;
  box-sizing: border-box; min-width: 244px; height: 62px; margin-top: 36px; padding: 0 38px;
  border: 0; border-radius: 999px; background: transparent; color: #100f16;
  font: 600 16px/1 "Inter", sans-serif; letter-spacing: -.015em; white-space: nowrap;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transform: translateY(var(--lift)) scale(var(--scale));
  transition: transform var(--duration) var(--ease-cta);
}
.quote-cta *, .quote-cta *::before, .quote-cta *::after { box-sizing: border-box; pointer-events: none; }

.quote-cta__aura, .quote-cta__edge {
  position: absolute; inset: -5px; z-index: 0; overflow: hidden; border-radius: inherit;
  opacity: var(--aura-opacity); filter: blur(16px); transform: scale(var(--aura-scale));
  transition: opacity var(--duration) var(--ease-cta), transform var(--duration) var(--ease-cta);
}
.quote-cta__aura::before, .quote-cta__edge::before {
  content: ""; position: absolute; width: 340px; height: 340px; left: calc(50% - 170px); top: calc(50% - 170px);
  background: conic-gradient(from 35deg, var(--champagne), var(--lavender) 25%, var(--violet) 46%, var(--lavender) 60%, var(--cream) 78%, var(--champagne));
  animation: quote-orbit 18s linear infinite;
}
.quote-cta__edge { inset: -1px; opacity: var(--edge-opacity); filter: blur(1.5px); transform: none; }

.quote-cta__face {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: inherit;
  background: linear-gradient(112deg, var(--cream) 7%, var(--champagne) 75%, var(--cream) 150%);
  box-shadow: inset 0 1px 0 rgba(251,250,247,.78), inset 0 -2px 1px rgba(216,200,167,.65), 0 9px 22px rgba(7,7,11,.38);
}
.quote-cta__face::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(105deg, var(--cream), transparent 80%);
  opacity: var(--polish-opacity); transition: opacity var(--duration) var(--ease-cta);
}
.quote-cta__sheen {
  position: absolute; width: 72px; height: 160px; left: calc(50% - 36px); top: calc(50% - 80px);
  background: linear-gradient(90deg, transparent, rgba(251,250,247,.6) 50%, transparent);
  opacity: 0; transform: translateX(-190px) rotate(24deg);
}
.quote-cta__press-light {
  position: absolute; inset: -9px; z-index: 0; border-radius: inherit;
  background: var(--cream); filter: blur(16px); opacity: 0;
}
.quote-cta__label, .quote-cta__arrow { position: relative; z-index: 2; transition: transform var(--duration) var(--ease-cta); }
.quote-cta__label { transform: scaleX(var(--label-scale)); }
.quote-cta__arrow { display: block; width: 19px; height: 19px; flex: 0 0 19px; transform: translateX(var(--arrow-x)); }

.quote-cta__glint {
  position: absolute; z-index: 0; width: 7px; height: 7px; background: var(--cream);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0; animation: quote-glint 8.4s ease-in-out infinite;
}
.quote-cta__glint--one   { left: 26px; top: -14px; animation-delay: -1s; }
.quote-cta__glint--two   { right: -16px; top: 34px; width: 5px; height: 5px; background: var(--lavender); animation-delay: -3.8s; }
.quote-cta__glint--three { right: 54px; bottom: -15px; width: 6px; height: 6px; background: var(--champagne); animation-delay: -6.6s; }

/* Click stars can leave the pill without creating page overflow. */
.quote-cta__stars {
  position: absolute; z-index: 3; left: 50%; top: 50%;
  width: min(660px, calc(100vw - 32px)); height: 340px; overflow: hidden; transform: translate(-50%, -50%);
}
.quote-cta__burst { position: absolute; inset: 0; }
.quote-cta__star {
  position: absolute; left: calc(50% - var(--star-size) / 2); top: calc(50% - var(--star-size) / 2);
  width: var(--star-size); height: var(--star-size); opacity: 0; filter: drop-shadow(0 0 4px currentColor);
  animation: quote-star-flight var(--star-time) cubic-bezier(.16, .7, .25, 1) var(--star-delay) both;
}
.quote-cta__star::before {
  content: ""; position: absolute; inset: 0; background: currentColor;
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
}

@media (hover: hover) and (pointer: fine) {
  .quote-cta:hover {
    --lift: -3px; --scale: 1.035; --aura-opacity: .68; --aura-scale: 1.085;
    --edge-opacity: .66; --polish-opacity: .34; --label-scale: 1.015; --arrow-x: 4px;
  }
  .quote-cta:hover .quote-cta__sheen { animation: quote-sheen 850ms var(--ease-cta) both; }
}
.quote-cta:focus-visible { outline: 2px solid var(--champagne); outline-offset: 7px; }
.quote-cta:active {
  --duration: 120ms; --lift: 1px; --scale: .97; --aura-opacity: .78;
  --aura-scale: 1.025; --polish-opacity: .18; --label-scale: 1; --arrow-x: 2px;
}
.quote-cta:active .quote-cta__press-light { animation: quote-press 460ms ease-out both; }

@keyframes quote-orbit { to { transform: rotate(360deg); } }
@keyframes quote-glint {
  0%, 32%, 100% { opacity: 0; transform: scale(.55) rotate(-12deg); }
  15% { opacity: .65; transform: scale(1) rotate(0deg); }
}
@keyframes quote-sheen {
  0% { opacity: 0; transform: translateX(-190px) rotate(24deg); }
  18% { opacity: .75; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translateX(190px) rotate(24deg); }
}
@keyframes quote-press {
  0% { opacity: 0; transform: scale(.96); }
  25% { opacity: .34; }
  100% { opacity: 0; transform: scale(1.09); }
}
@keyframes quote-star-flight {
  0% { opacity: 0; transform: translate3d(var(--star-from-x), var(--star-from-y), 0) rotate(-25deg) scale(.2); }
  12%, 45% { opacity: 1; }
  35% { transform: translate3d(calc(var(--star-to-x) * .82), calc(var(--star-to-y) * .82), 0) rotate(10deg) scale(1.1); }
  100% { opacity: 0; transform: translate3d(var(--star-to-x), var(--star-to-y), 0) rotate(var(--star-turn)) scale(.45); }
}

@media (prefers-reduced-motion: reduce) {
  .quote-cta, .quote-cta:hover, .quote-cta:active {
    --duration: 160ms; --scale: 1; --aura-opacity: .22; --aura-scale: 1;
    --edge-opacity: .3; --polish-opacity: 0; --label-scale: 1; --arrow-x: 0px;
  }
  .quote-cta *, .quote-cta *::before, .quote-cta *::after { animation: none !important; transition: none !important; }
  .quote-cta__glint, .quote-cta__sheen, .quote-cta__press-light, .quote-cta__stars { display: none; }
  @media (hover: hover) and (pointer: fine) { .quote-cta:hover { --lift: -2px; } }
  .quote-cta:active { --lift: 0px; }
}
@media (forced-colors: active) {
  .quote-cta { color: ButtonText; background: ButtonFace; border: 2px solid ButtonText; }
  .quote-cta__aura, .quote-cta__edge, .quote-cta__face, .quote-cta__glint, .quote-cta__press-light, .quote-cta__stars { display: none; }
  .quote-cta:focus-visible { outline-color: Highlight; }
}

.quotes-table .row-link { cursor: pointer; }
.quotes-table .row-link:hover td { background: var(--surface-1); }
.quotes-table td b { color: var(--text-0); }
.quotes-table .c-title, .quotes-table .c-client { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Phones: eight columns can't fit, and a wide table drags the whole page
   sideways. Each row becomes a card — number and status on top, then the
   client, then the two numbers she's scanning for. */
@media (max-width: 560px) {
  .quotes-table, .quotes-table tbody, .quotes-table tr, .quotes-table td { display: block; width: auto; }
  .quotes-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .quotes-table tr {
    position: relative; padding: 14px 15px 13px; margin-bottom: 10px;
    background: var(--surface-1); border: 1px solid var(--line-0); border-radius: var(--radius-sm);
  }
  .quotes-table tr:last-child { margin-bottom: 0; }
  .quotes-table td { padding: 0; border: 0; }
  .quotes-table .c-num { font-size: 14px; padding-right: 92px; }
  .quotes-table .c-status { position: absolute; top: 12px; right: 13px; }
  .quotes-table .c-client { margin-top: 3px; max-width: none; font-size: 13px; color: var(--text-1); }
  .quotes-table .c-title { max-width: none; white-space: normal; font-size: 12px; color: var(--text-3); }
  .quotes-table .c-title:empty { display: none; }
  .quotes-table .c-total, .quotes-table .c-due {
    display: inline-block; margin: 10px 18px 0 0; text-align: left;
    font-size: 15px; font-weight: 600; color: var(--text-0);
  }
  .quotes-table .c-total::before, .quotes-table .c-due::before,
  .quotes-table .c-valid::before {
    content: attr(data-label); display: block;
    font-size: 10px; font-weight: 500; color: var(--text-3); letter-spacing: .02em;
  }
  .quotes-table .c-valid { display: inline-block; margin: 10px 0 0; font-size: 12px; color: var(--text-2); }
  .quotes-table .c-updated { display: none; }   /* least useful line on a phone */
  .quotes-table .row-link:hover td { background: transparent; }
}
.qb-head { align-items: flex-start; }
.qb-crumbs { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.qb-crumbs a { color: var(--text-2); text-decoration: none; }
.qb-crumbs a:hover { color: var(--text-0); }
.qb-crumbs b { color: var(--text-0); }
.page-builder h1 { margin: 0; }
.page-builder .title-input { width: min(640px, 100%); min-height: 44px; padding: 0 4px; font-family: "Instrument Serif", Georgia, serif; font-size: 30px; letter-spacing: -0.01em; background: transparent; border: 1px solid transparent; border-radius: var(--radius-xs); color: var(--text-0); }
.page-builder .title-input:hover { border-color: var(--line-0); }
.page-builder .title-input:focus { background: rgba(0,0,0,.22); border-color: rgba(216,200,167,.5); box-shadow: none; }
.builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .builder-layout { grid-template-columns: 1fr; } }
.builder-side { position: sticky; top: 92px; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px 18px; background: var(--surface-1); border: 1px solid var(--line-1); border-radius: var(--radius-sm); }
.line + .line { margin-top: 12px; }
.line-img { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.thumb { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: var(--radius-xs); border: 1px solid var(--line-1); background: rgba(0,0,0,.28); overflow: hidden; cursor: pointer; }
.thumb.empty { border-style: dashed; padding: 0; }   /* not the generic .empty state's 56px padding — that stretched the box */
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-img a { color: var(--champagne); }
.line-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.line-fields .wide2 { grid-column: span 2; }
.line-fields .wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .line-fields .wide2 { grid-column: span 2; } }
.line-fields .price { font-weight: 700; color: var(--cream); font-size: 15px; min-height: 38px; display: flex; align-items: center; }
.line-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.size-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.size-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.size-cell input { width: 62px; text-align: center; padding: 0 6px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px 14px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-0); }
@media (max-width: 720px) { .add-row { grid-template-columns: 1fr; } }
/* Flex, not a fixed grid: a design charge has one field more than the others (days + amount),
   and a 7th cell in a 6-column grid wrapped underneath and collided with the labels. */
.charge { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 12px 0; border-top: 1px solid var(--line-0); }
.charge:first-of-type { border-top: 0; padding-top: 0; }
/* only the label grows; the rest keep their size so a wrapped field never stretches across the row */
.charge .field { flex: 0 1 148px; min-width: 128px; }
.charge .field.wide2 { flex: 1 1 200px; min-width: 160px; }
.charge .field.tight { flex: 0 1 116px; min-width: 104px; }
.charge .field.kind { flex: 0 1 136px; min-width: 132px; }
.charge .price .tiny { font-weight: 400; }
.charge .field.act { flex: 0 0 auto; min-width: 0; }
.charge .price { font-weight: 700; color: var(--cream); min-height: 38px; display: flex; align-items: center; justify-content: flex-end; }
@media (max-width: 720px) { .charge .field, .charge .field.wide2, .charge .field.tight { flex: 1 1 100%; } }
.page-builder input[disabled], .page-builder select[disabled], .page-builder textarea[disabled] { color: var(--text-2); background: rgba(0,0,0,.12); border-color: transparent; cursor: default; }
.page-builder .is-frozen .panel-head .tiny { color: var(--warn); }
.thumb.locked { cursor: default; border-style: solid; }
.terms-preview { margin-top: 10px; padding: 12px 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line-0); border-radius: var(--radius-xs); }
.terms-preview ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-1); line-height: 1.5; }
.terms-preview li { margin: 3px 0; }
.terms-preview li::marker { color: var(--text-3); }
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.track-step { padding: 10px 12px; border-radius: var(--radius-xs); background: rgba(255,255,255,.028); border: 1px solid var(--line-0); color: var(--text-3); }
.track-step b { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.track-step.done { color: var(--text-1); border-color: rgba(134,217,163,.28); background: rgba(134,217,163,.06); }
.track-step.done b { color: var(--good); }
.track-step.now { outline: 1px solid var(--line-2); }
@media (max-width: 860px) { .track { grid-template-columns: repeat(2, 1fr); } }
.totals h2 { margin-bottom: 12px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; font-size: 13.5px; color: var(--text-1); }
.trow b { font-weight: 600; color: var(--text-0); }
.trow.total b { font-size: 16px; }
.trow.due { padding: 10px 12px; margin: 4px -12px; border-radius: var(--radius-xs); background: rgba(216,200,167,.10); border: 1px solid var(--line-2); }
.trow.due b { font-size: 20px; line-height: 1.2; color: var(--cream); }
.trow b .tiny { font-size: 12px; font-weight: 500; color: var(--text-2); }   /* "of $884.50" / the paid amount next to Paid ✓ */
.trow.internal { color: var(--text-2); font-size: 12.5px; }
.trow.internal b { color: var(--text-1); font-weight: 500; }
.tsep { height: 1px; background: var(--line-0); margin: 8px 0; }
.warn { padding: 9px 11px; margin-top: 8px; border-radius: var(--radius-xs); font-size: 12.5px; line-height: 1.45; border: 1px solid var(--line-0); color: var(--text-1); background: var(--surface-1); }
.warn-bad { color: var(--bad); border-color: rgba(226,138,143,.3); background: rgba(226,138,143,.08); }
.warn-warn { color: var(--warn); border-color: rgba(225,191,114,.3); background: rgba(225,191,114,.08); }
.warn-good { color: var(--good); border-color: rgba(134,217,163,.3); background: rgba(134,217,163,.08); }
.warn-info { color: var(--text-2); }

/* ========= CATALOG ========= */
/* Grid view — the product showcase (built in Astra, wired in here).
   One native <button> per card, no nested interactive elements, so the whole
   card is clickable and keyboard-reachable. Tokens are the app's own. */
.viewswitch { display: inline-flex; padding: 3px; border: 1px solid var(--line-1); border-radius: var(--radius-pill); background: var(--surface-1); }
.viewswitch button {
  min-height: 32px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: transparent;
  color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.viewswitch button:hover { color: var(--text-0); }
.viewswitch button.on { background: var(--champagne); color: #100f16; }

.category + .category { margin-top: 26px; }
.category-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.category-heading h2 { margin: 0; font-size: 12px; font-weight: 550; line-height: 20px; color: var(--text-1); }
.category-count { min-width: 21px; text-align: center; font-size: 10px; line-height: 19px; border: 1px solid var(--line-0); border-radius: 6px; color: var(--text-2); }
.category-rule { flex: 1; height: 1px; background: var(--line-0); margin-left: 6px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; align-items: stretch; }
.product-card {
  position: relative; display: flex; flex-direction: column; flex: 1;
  width: 100%; min-width: 0; padding: 0; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line-0); border-radius: var(--radius-sm);
  background: var(--bg-1); color: var(--text-0); text-align: left;
  font: inherit; font-variant-numeric: tabular-nums;
  cursor: pointer; touch-action: manipulation;
  transition: transform 180ms ease, box-shadow 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.product-media { position: relative; display: block; aspect-ratio: 4/3; flex-shrink: 0; overflow: hidden; border-radius: 11px 11px 0 0; background: var(--bg-2); }
.product-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; width: 100%; height: 100%; background: var(--bg-2); }
.placeholder-art { width: 78px; height: 78px; color: var(--lavender); stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: .55; fill: none; }
.placeholder-orbit { stroke: var(--line-1); stroke-dasharray: 2 5; }
.placeholder-label { font-size: 10px; color: var(--text-2); }
.review-marker {
  position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1px solid rgba(225,191,114,.22);
  border-radius: var(--radius-pill); color: var(--warn); background: var(--bg-1);
  font-size: 9px; font-weight: 500; line-height: 12px; white-space: nowrap;
}
.review-dot { width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0; background: var(--warn); }
.edit-cue {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center;
  width: 28px; height: 28px; border: 1px solid var(--line-1); border-radius: var(--radius-xs);
  background: var(--bg-1); color: var(--champagne); opacity: 0; transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.edit-cue svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.product-content { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 15px 15px 14px; background: var(--surface-1); border-radius: 0 0 11px 11px; }
.product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; line-height: 19px; font-weight: 550; letter-spacing: -.02em; color: var(--text-0); }
.product-detail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-top: 6px; font-size: 11px; line-height: 16px; color: var(--text-2); }
.product-supplier { display: flex; align-items: center; gap: 5px; min-width: 0; margin: 13px 0 14px; font-size: 10px; line-height: 15px; color: var(--text-2); }
.product-supplier svg { width: 12px; height: 12px; flex: 0 0 12px; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.product-supplier > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.supplier-missing svg { opacity: .6; }
.product-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line-0); }
.price-block, .margin-block { display: flex; flex-direction: column; min-width: 0; }
.product-price { color: var(--cream); font-size: 20px; font-weight: 550; line-height: 25px; letter-spacing: -.055em; }
.price-missing { font-size: 13px; letter-spacing: -.01em; color: var(--text-2); font-weight: 400; }
.price-qualifier { font-size: 10px; line-height: 15px; color: var(--text-2); white-space: nowrap; }
.margin-block { align-items: flex-end; gap: 4px; flex-shrink: 0; }
.margin-badge { display: block; padding: 3px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 550; line-height: 16px; white-space: nowrap; border: 1px solid transparent; }
.margin-badge.m-good { color: var(--good); background: rgba(134,217,163,.09); border-color: rgba(134,217,163,.12); }
.margin-badge.m-warn { color: var(--warn); background: rgba(225,191,114,.09); border-color: rgba(225,191,114,.12); }
.margin-badge.m-bad  { color: var(--bad);  background: rgba(226,138,143,.09); border-color: rgba(226,138,143,.12); }
.margin-badge.m-none { color: var(--text-2); background: var(--surface-1); border-color: var(--line-0); font-weight: 400; }
.margin-label { font-size: 9px; line-height: 11px; color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (hover: hover) and (pointer: fine) {
  .product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(7,7,11,.64), 0 0 0 1px var(--line-2); }
  .product-card:hover .edit-cue { opacity: 1; transform: translateY(0); }
}
.product-card:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }
.product-card:focus-visible .edit-cue { opacity: 1; transform: translateY(0); }
.product-card:active { transform: translateY(0); }

/* Phones: one column, card on its side — 5 items a screen instead of 1.5. */
@media (max-width: 560px) {
  .category-heading { margin-bottom: 12px; }
  .category + .category { margin-top: 18px; }
  .product-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .product-card { flex-direction: row; align-items: stretch; }
  .product-media { width: 104px; height: 78px; aspect-ratio: 4/3; flex: 0 0 104px; border-radius: var(--radius-xs); margin: 10px 0 10px 10px; align-self: center; }
  .product-content { padding: 11px 12px; border-radius: 0 11px 11px 0; background: transparent; }
  .product-name { font-size: 12px; line-height: 16px; }
  .product-detail { font-size: 10px; line-height: 14px; margin-top: 3px; -webkit-line-clamp: 1; }
  .product-supplier { margin: 5px 0 7px; font-size: 9px; line-height: 12px; gap: 4px; }
  .product-supplier svg { width: 10px; height: 10px; flex-basis: 10px; }
  .product-footer { padding-top: 6px; gap: 6px; }
  .product-price { font-size: 16px; line-height: 19px; }
  .price-missing { font-size: 11px; }
  .price-qualifier { font-size: 8px; line-height: 12px; }
  .margin-badge { font-size: 10px; line-height: 14px; padding: 2px 6px; }
  .margin-block { gap: 2px; }
  .margin-label { font-size: 8px; line-height: 10px; }
  .review-marker { top: 5px; right: 5px; left: 5px; justify-content: center; padding: 3px 4px; font-size: 8px; gap: 4px; line-height: 10px; }
  .placeholder-art { width: 42px; height: 42px; }
  .photo-placeholder { gap: 3px; }
  .placeholder-label { font-size: 8px; }
  .edit-cue { width: 21px; height: 21px; right: 5px; bottom: 5px; border-radius: 5px; }
  .edit-cue svg { width: 12px; height: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-card, .product-card:hover, .product-card:active { transform: none; transition: none; }
  .edit-cue { transition: none; transform: none; }
}
@media (forced-colors: active) {
  .product-card { border-color: ButtonText; }
  .product-card:focus-visible { outline-color: Highlight; }
  .margin-badge, .review-marker { border-color: ButtonText; }
}


/* ========= LOGIN / STANDALONE PAGES ========= */
.page-login { display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 26px; }
.login-brand { text-align: center; font-weight: 700; letter-spacing: .14em; color: var(--champagne); }
.login-card { padding: 30px 28px; background: var(--surface-1); border-color: var(--line-1); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.login-card h1 { margin-bottom: 4px; }
.login-card .muted { margin-bottom: 20px; font-size: 14px; }
.login-card form { display: flex; flex-direction: column; }
.login-card .btn-block { margin-top: 6px; }
.login-card p.muted:last-child { margin: 16px 0 0; text-align: center; font-size: 13px; }

@media (max-width: 640px) {
  .topbar { gap: 12px; min-height: 64px; }
  .brand { min-width: 0; }
  .user-menu .btn { padding: 0 10px; }
  h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .nav-link { transition: none; }
  .btn:hover { transform: none; }
}

/* ========= PHONES (2026-10-09) =========
   Vero runs the business from her phone. Rules of the road at phone width:
   nothing is ever wider than the screen (grid/flex children get min-width: 0,
   wide tables scroll inside their card instead of dragging the page), button
   rows wrap, every tab stays reachable, and form fields get the full width. */
.layout > *, .builder-main, .builder-side, .panel, .card { min-width: 0; }
.panel-actions { flex-wrap: wrap; }
.um-short { display: none; }
.page-builder .qb-head > div:first-child { flex: 1 1 360px; min-width: 0; }   /* the title takes the room, the buttons wrap */
@media (max-width: 720px) {
  .panel { padding: 18px 16px; }
  .panel-head { flex-wrap: wrap; }
  .panel-actions { flex-shrink: 1; }
  /* a price sheet / any data table scrolls sideways inside its own card */
  .tiers, .card .table:not(.quotes-table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tiers td input { min-width: 84px; }
  .side { position: static; max-height: 46vh; }
  .builder-side { position: static; }
}
@media (max-width: 640px) {
  /* tabs get their own full-width row under the logo + account button, so all five are reachable */
  .topbar { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav-links { order: 3; flex: 1 1 100%; max-width: 100%; justify-content: space-between; }
  .nav-links { gap: 0; padding: 4px; }
  .nav-link { padding: 8px 9px; font-size: 12.5px; }
  .um-full { display: none; }
  .um-short { display: inline; }
}
@media (max-width: 560px) {
  .page-builder .title-input { width: 100%; font-size: 24px; }
  .page-builder .head.qb-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-builder .qb-head .head-actions { margin-left: 0; }
  .page-builder .qb-head .head-actions .btn { flex: 1 1 auto; }
  /* a quote line: photo on top as a small strip, every field full width under it */
  .line { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .line-img { flex-direction: row; align-items: center; gap: 12px; text-align: left; }
  .line .thumb { flex: 0 0 64px; width: 64px; height: 64px; min-height: 0; }
  .line-fields.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-fields.grid .wide2, .line-fields.grid .wide { grid-column: 1 / -1; }
  /* text fields get the full width; Size/Qty and Price/Total stay side by side */
  .line-fields.grid > .field:nth-child(1), .line-fields.grid > .field:nth-child(7),
  .line-fields.grid > .field:nth-child(9), .line-fields.grid > .field:nth-child(10) { grid-column: 1 / -1; }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .sheet { padding: 14px 12px; }
  .charge .field, .charge .field.wide2, .charge .field.tight, .charge .field.kind { flex: 1 1 140px; min-width: 0; }
}
