/* CapPrint – design system */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --bg: #f4f4fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(17, 20, 45, 0.035);
  --surface-3: rgba(17, 20, 45, 0.07);
  --border: rgba(17, 20, 45, 0.08);
  --border-strong: rgba(17, 20, 45, 0.14);
  --text: #0d1024;
  --muted: #5b6083;
  --faint: #8d92ad;
  --primary: #c2410c;
  --on-primary: #ffffff;
  --primary-soft: rgba(234, 88, 12, 0.1);
  --ring: rgba(234, 88, 12, 0.22);
  --grad: linear-gradient(135deg, #5b3fd9 0%, #c43fc2 32%, #f2559a 58%, #ff8a5b 82%, #ffc46b 100%);
  /* top-to-bottom version for the logo tile, like a sunset */
  --grad-v: linear-gradient(180deg, #5b3fd9 0%, #c43fc2 34%, #f2559a 60%, #ff8a5b 84%, #ffc46b 100%);
  --grad-soft: linear-gradient(135deg, rgba(91, 63, 217, 0.1), rgba(255, 138, 91, 0.08));
  --grad-ok: linear-gradient(135deg, #16a34a, #22c55e);
  --ok: #0f8a4a;
  --ok-solid: #16a34a;
  --ok-soft: rgba(22, 163, 74, 0.12);
  --warn: #b45309;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --danger: #dc2626;
  --danger-soft: rgba(239, 68, 68, 0.11);
  --info: #2563eb;
  --info-soft: rgba(59, 130, 246, 0.11);
  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --shadow: 0 1px 1px rgba(13, 16, 36, 0.03), 0 14px 34px -14px rgba(13, 16, 36, 0.16);
  --shadow-lg: 0 30px 70px -24px rgba(50, 35, 140, 0.35);
  --glow: 0 12px 30px -10px rgba(242, 85, 154, 0.55);
  --topbar-bg: rgba(244, 244, 251, 0.7);
  --aurora-1: rgba(91, 63, 217, 0.26);
  --aurora-2: rgba(255, 128, 66, 0.2);
  --aurora-3: rgba(255, 176, 92, 0.2);
  --spot: rgba(255, 128, 66, 0.1);
  --grain: 0.05;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06070d;
    --surface: rgba(19, 21, 36, 0.62);
    --surface-solid: #11131f;
    --surface-2: rgba(255, 255, 255, 0.04);
    --surface-3: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --text: #eef0ff;
    --muted: #9ca1c2;
    --faint: #6c7193;
    --primary: #ff8a5b;
    --primary-soft: rgba(255, 138, 91, 0.15);
    --ring: rgba(255, 138, 91, 0.3);
    --grad-soft: linear-gradient(135deg, rgba(91, 63, 217, 0.16), rgba(255, 138, 91, 0.1));
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.12);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.12);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 50px -22px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
    --topbar-bg: rgba(6, 7, 13, 0.6);
    --aurora-1: rgba(91, 63, 217, 0.3);
    --aurora-2: rgba(255, 122, 61, 0.22);
    --aurora-3: rgba(255, 170, 80, 0.16);
    --spot: rgba(255, 128, 66, 0.12);
    --grain: 0.07;
    color-scheme: dark;
  }
}

/* ── base ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.55 var(--font);
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* four colour orbs, each drifting on its own path */
  background:
    radial-gradient(closest-side, var(--aurora-1), transparent) 10% 15% / 64vmax 64vmax no-repeat,
    radial-gradient(closest-side, var(--aurora-2), transparent) 90% 5% / 54vmax 54vmax no-repeat,
    radial-gradient(closest-side, var(--aurora-3), transparent) 75% 95% / 70vmax 70vmax no-repeat,
    radial-gradient(closest-side, var(--aurora-2), transparent) 25% 85% / 44vmax 44vmax no-repeat;
  animation: orbs 32s ease-in-out infinite;
}
@keyframes orbs {
  0%, 100% { background-position: 10% 15%, 90% 5%, 75% 95%, 25% 85%; }
  33% { background-position: 35% 35%, 65% 25%, 55% 70%, 5% 55%; }
  66% { background-position: 15% 60%, 95% 45%, 90% 75%, 45% 100%; }
}
/* fine film grain keeps the gradients from looking flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* soft glow that follows the mouse (landing + login pages, added by visual.js) */
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), var(--spot), transparent 70%);
}
.has-spot .spotlight { opacity: 1; }

a { color: var(--primary); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.4rem; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.5rem; letter-spacing: -0.02em; font-weight: 750; }
h3 { font-size: 1rem; margin: 0 0 0.8rem; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0 0 0.75rem; }
[hidden] { display: none !important; }
::selection { background: rgba(242, 85, 154, 0.3); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; }
.stack > * + * { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* headline accent: italic serif with the gradient slowly flowing through it */
.display .grad-text, .section-title .grad-text {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.22em; letter-spacing: -0.015em; line-height: 0.95;
  padding: 0 0.1em 0.05em 0; background-size: 140% 100%; animation: ink-flow 6s ease-in-out infinite alternate;
}
@keyframes ink-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.card {
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

/* ── brand ── */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; color: var(--text); font-size: 1.08rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--grad-v); color: #fff;
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: 1rem;
  box-shadow: var(--glow);
}
.brand-lg { font-size: 1.25rem; }
.brand-lg .logo { width: 40px; height: 40px; border-radius: 13px; font-size: 1.15rem; }

.kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.38rem 0.85rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 0.8rem; font-weight: 650; color: var(--muted);
}
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }
.display { font-size: clamp(2.2rem, 4.4vw, 3.7rem); line-height: 1.04; letter-spacing: -0.045em; font-weight: 800; margin: 1.1rem 0 1rem; }
.lead { font-size: 1.1rem; color: var(--text); opacity: 0.88; max-width: 46ch; line-height: 1.6; }

/* ── buttons ── */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 42px; padding: 0.55rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 650; letter-spacing: -0.005em; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, background-position 0.4s ease;
}
.btn:hover { background: var(--surface-3); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary, .btn-primary:hover {
  color: #fff; border-color: transparent;
  background: var(--grad); background-size: 130% 130%;
}
.btn-primary { background-position: 0% 50%; box-shadow: var(--glow); }
.btn-primary:hover { background-position: 100% 50%; box-shadow: 0 16px 38px -10px rgba(242, 85, 154, 0.75); }
/* paint gradients under the (transparent) border too, or the far end of the gradient repeats there as a thin line */
.btn, .filter { background-origin: border-box; }
.btn-ok, .btn-ok:hover { background: var(--grad-ok); border-color: transparent; color: #fff; }
.btn-ok { box-shadow: 0 10px 26px -10px rgba(34, 197, 94, 0.7); }
.btn-danger, .btn-danger:hover { background: linear-gradient(135deg, #dc2626, #f43f5e); border-color: transparent; color: #fff; }
.btn-danger { box-shadow: 0 10px 26px -10px rgba(244, 63, 94, 0.7); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger-text { color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0.32rem 0.75rem; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: 0.7rem 1.5rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1rem; flex: none;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.btn:focus-visible, .icon-btn:focus-visible, .filter:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── forms ── */
.field { display: block; }
.field > span { display: block; font-weight: 650; font-size: 0.88rem; margin-bottom: 0.4rem; }
.field small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }
.field small.ok { color: var(--ok); font-weight: 600; }
.field small.bad { color: var(--danger); font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 0.7rem 0.95rem; min-height: 50px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: rgba(255, 138, 91, 0.5); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); background: var(--surface-solid); }
select option { background: var(--surface-solid); color: var(--text); }
textarea { resize: vertical; min-height: 76px; }
.input-wrap { position: relative; display: block; }
.input-wrap input { padding-right: 3rem; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--faint);
  display: grid; place-items: center; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-3); }
.check { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 0.9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-error {
  background: var(--danger-soft); color: var(--danger); padding: 0.65rem 0.9rem;
  border-radius: 12px; font-size: 0.9rem; font-weight: 550; border: 1px solid rgba(239, 68, 68, 0.2);
  animation: shake 0.35s ease;
}
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── simple centered page (404) ── */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; padding: 2.25rem 2rem; }
.auth-card.wide { max-width: 600px; }
.auth-card .brand { display: flex; width: max-content; margin-bottom: 1.6rem; }
.auth-card h1 { font-size: 1.9rem; }
.auth-card .muted { font-size: 0.95rem; }
.step-label { display: inline-block; font-size: 0.74rem; font-weight: 750; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--primary-soft); }
.forgot summary { cursor: pointer; font-size: 0.88rem; color: var(--muted); width: max-content; margin-left: auto; }
.forgot summary:hover { color: var(--text); }
.forgot p { margin: 0.5rem 0 0; }
.auth-foot { margin-top: 1.5rem; text-align: center; font-size: 0.9rem; color: var(--muted); }

/* ── split-screen auth ── */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.auth-visual {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 40px clamp(24px, 4vw, 64px); overflow: hidden;
}
.auth-visual .display { font-size: clamp(2.1rem, 3.6vw, 3.3rem); }
.auth-main { display: grid; place-items: center; padding: 40px 16px; }
.auth-layout .auth-card { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
/* a streak of light that keeps circling the card's border */
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.auth-layout .auth-card { position: relative; }
.auth-layout .auth-card::before {
  content: ""; position: absolute; inset: -1px; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--spin), transparent 0 55%, #f2559a 66%, #ff7a3d 76%, #ff8a5b 85%, #ffc46b 92%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-border 4s linear infinite;
}
@keyframes spin-border { to { --spin: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: none; } }
@media (min-width: 961px) { .auth-layout .auth-card > .brand { display: none; } }
@media (max-width: 960px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-main { padding: 24px 16px; align-items: start; }
  .auth-layout .auth-card { margin-top: 4vh; }
}
@media (max-width: 480px) { .auth-card { padding: 1.75rem 1.25rem; } }

.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.trust li { display: flex; flex-direction: column; gap: 0.15rem; padding-left: 0.9rem; border-left: 2px solid var(--border-strong); }
.trust b { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust span { font-size: 0.82rem; color: var(--muted); }

/* ── animated product story ── */
.flow { position: relative; height: 330px; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-path { stroke-dasharray: 6 10; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.fcard {
  position: absolute; width: min(255px, 47%); padding: 14px;
  border-radius: 18px; background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  font-size: 0.85rem; animation: float 6s ease-in-out infinite;
  /* mouse parallax: each card moves by its own depth */
  translate: calc(var(--px, 0) * var(--d, 12px)) calc(var(--py, 0) * var(--d, 12px));
  transition: translate 0.4s ease-out;
}
.fcard b { display: block; font-weight: 750; letter-spacing: -0.01em; }
.fcard small { display: block; color: var(--muted); font-size: 0.75rem; }
.fc-phone { left: 0; top: 34%; --r: -5deg; --d: 16px; z-index: 1; }
.fc-queue { left: 50%; top: 0; --r: 2.5deg; --d: 26px; animation-delay: -2s; }
.fc-deleted { right: 0; bottom: 3%; width: min(235px, 45%); --r: -2deg; --d: 10px; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }
.fc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qr-mini {
  flex: none; width: 40px; height: 40px; border-radius: 9px; padding: 5px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.qr-mini::before {
  content: ""; display: block; width: 100%; height: 100%;
  background: conic-gradient(#111 25%, transparent 0 50%, #111 0 75%, transparent 0) 0 0 / 7.5px 7.5px;
  border-radius: 2px;
}
.fc-file { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 9px; font-weight: 600; }
.fc-progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.fc-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); animation: load 3.6s ease-in-out infinite; }
@keyframes load { 0% { width: 0; } 70%, 100% { width: 100%; } }
.fc-row { display: flex; align-items: center; gap: 10px; }
.fc-row > div { flex: 1; min-width: 0; }
.fc-num { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fc-new { font-size: 0.7rem; font-weight: 750; padding: 0.18rem 0.55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); animation: ping-violet 2s infinite; }
@keyframes ping-violet { 0% { box-shadow: 0 0 0 0 rgba(242, 85, 154, 0.5); } 100% { box-shadow: 0 0 0 8px rgba(242, 85, 154, 0); } }
.fc-btns { display: flex; gap: 6px; margin-top: 11px; }
.fc-btn { flex: 1; text-align: center; font-size: 0.75rem; font-weight: 700; padding: 0.4rem; border-radius: 9px; color: #fff; }
.fc-btn.primary { background: var(--grad); box-shadow: var(--glow); }
.fc-btn.ok { background: var(--grad-ok); }
.fc-deleted { display: flex; align-items: center; gap: 11px; }
.fc-shield { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad-ok); box-shadow: 0 10px 26px -8px rgba(34, 197, 94, 0.75); }

/* ── top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; /* equal side columns keep the logo centred */
  padding: 0.75rem 1.5rem;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.topbar-shop { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar-shop strong { max-width: 32ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.conn {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 650; color: var(--muted);
  padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap;
}
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.conn.ok { color: var(--ok); }
.conn.ok i { background: #22c55e; animation: ping 2s infinite; }
.profile { position: relative; min-width: 0; margin-left: -0.35rem; /* lines the avatar up with the page edge */ }
.profile-trigger {
  appearance: none; display: flex; align-items: center; gap: 0.7rem; max-width: 100%; min-width: 0;
  padding: 0.35rem 0.6rem 0.35rem 0.35rem; border: 1px solid transparent; border-radius: 14px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.profile-trigger:hover, .profile-trigger[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border-strong); }
.profile-trigger:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.profile-chevron { flex: none; color: var(--muted); transition: transform 0.2s; }
.profile-trigger[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }
.pw-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.pw-row-label { display: block; font-weight: 650; font-size: 0.88rem; margin-bottom: 0.1rem; }
.profile-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 200px; padding: 0.4rem;
  background: var(--surface-solid); box-shadow: var(--shadow-lg);
}
.profile-menu [role=menuitem] {
  appearance: none; display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; font-size: 0.9rem; padding: 0.55rem 0.7rem; border-radius: 9px; cursor: pointer;
}
.profile-menu [role=menuitem]:hover, .profile-menu [role=menuitem]:focus-visible { background: var(--surface-3); outline: none; }
.profile-menu .btn-danger-text { color: var(--danger); }
@media (max-width: 640px) {
  .topbar { padding: 0.6rem 16px; gap: 0.5rem; }
  .topbar .brand-text { display: none; }
}

.banner { margin: 1rem auto 0; max-width: calc(1320px - 3rem); padding: 0.8rem 1.1rem; border-radius: 14px; font-size: 0.93rem; border: 1px solid transparent; }
.banner-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.banner-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245, 158, 11, 0.22); }
.banner-info { background: var(--info-soft); color: var(--info); border-color: rgba(59, 130, 246, 0.2); }
#banner:not(:empty) { padding: 0 1.5rem; }
@media (max-width: 640px) { #banner:not(:empty) { padding: 0 16px; } }

/* ── client dashboard ── */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; padding: 1.5rem; max-width: 1320px; margin: 0 auto; align-items: start; }
@media (max-width: 980px) { .dash { grid-template-columns: 1fr; padding: 1rem 16px; } }
.side-col { display: grid; gap: 1rem; position: sticky; top: 84px; }
.privacy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 760px) { .privacy-row { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .side-col { position: static; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.count {
  display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; padding: 0 0.5em;
  border-radius: 999px; background: var(--grad); color: #fff; font-size: 0.8rem; font-weight: 750;
  margin-left: 0.35rem; vertical-align: middle; box-shadow: var(--glow);
}
#queue { display: grid; gap: 1rem; }
.empty { text-align: center; padding: 3.5rem 1.5rem; }
.empty-icon {
  position: relative; width: 84px; height: 84px; margin: 0 auto 1.25rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--primary); background: var(--grad-soft);
  border: 1px solid var(--border-strong);
}
.empty-icon::before, .empty-icon::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(196, 63, 194, 0.45); animation: ripple 2.8s ease-out infinite;
}
.empty-icon::after { animation-delay: 1.4s; }
@keyframes ripple { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.9); opacity: 0; } }

.job { position: relative; overflow: hidden; padding: 1.15rem 1.25rem 1.15rem 1.45rem; transition: transform 0.2s, box-shadow 0.2s; }
.job::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border-strong); }
.job.st-waiting::before { background: var(--grad); }
.job.st-waiting { box-shadow: var(--shadow), 0 0 0 1px rgba(242, 85, 154, 0.28), 0 18px 50px -24px rgba(242, 85, 154, 0.5); }
.job.st-printing::before { background: linear-gradient(#3b82f6, #22d3ee); }
.job.st-printed::before, .job.st-done::before { background: var(--grad-ok); }
.job.st-held::before { background: linear-gradient(#f59e0b, #f97316); }
.job.fresh { animation: fresh 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fresh { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
.job-head { display: flex; align-items: center; gap: 1rem; }
.job-num { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; min-width: 3.4rem; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.job-meta { min-width: 0; flex: 1; }
.job-name { font-weight: 750; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; font-weight: 750; padding: 0.28rem 0.7rem; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.st-waiting { background: var(--primary-soft); color: var(--primary); }
.status-badge.st-waiting::before { animation: ping-violet 2s infinite; }
.status-badge.st-printing { background: var(--info-soft); color: var(--info); }
.status-badge.st-printed, .status-badge.st-done { background: var(--ok-soft); color: var(--ok); }
.status-badge.st-held { background: var(--warn-soft); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0.4rem; }
.chip { font-size: 0.82rem; font-weight: 600; padding: 0.28rem 0.7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-color { background: linear-gradient(90deg, #fde68a, #f9a8d4, #a5b4fc, #67e8f9); color: #1f2937; border-color: transparent; font-weight: 750; }
.job-notes { background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, 0.2); padding: 0.55rem 0.8rem; border-radius: 12px; font-size: 0.9rem; margin: 0.55rem 0; overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: 0.7rem 0; display: grid; gap: 0.45rem; }
.file-row {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.6rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.file-row:hover { border-color: var(--border-strong); background: var(--surface-3); }
.file-badge { flex: none; font-size: 0.66rem; font-weight: 800; padding: 0.25rem 0.4rem; border-radius: 7px; letter-spacing: 0.04em; color: #fff; }
.file-badge.pdf { background: linear-gradient(135deg, #ef4444, #f97316); }
.file-badge.img { background: linear-gradient(135deg, #3b82f6, #22d3ee); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pill { font-size: 0.7rem; font-weight: 750; padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 560px) {
  .file-row { flex-wrap: wrap; }
}
.print-check { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.7rem 0; padding: 0.8rem 0.9rem; border-radius: 12px; background: var(--primary-soft); border: 1px solid var(--ring); }
.print-check p { margin: 0; display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.92rem; min-width: 0; }
.print-check b { overflow-wrap: anywhere; }
.countdown { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.7rem 0; font-size: 0.9rem; }
.countdown .bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.countdown .bar i { display: block; height: 100%; width: 100%; background: var(--grad-ok); border-radius: inherit; transition: width 0.25s linear; box-shadow: 0 0 12px rgba(34, 197, 94, 0.6); }
.countdown.done .bar i { background: linear-gradient(90deg, #f43f5e, #f97316); box-shadow: 0 0 12px rgba(244, 63, 94, 0.6); }
.job-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.spacer { flex: 1; }

.qr-card { text-align: center; position: relative; overflow: hidden; }
.qr-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; background: var(--grad-soft); pointer-events: none; }
.qr-card > * { position: relative; }
.qr-card img {
  width: 210px; height: 210px; max-width: 100%; border-radius: 20px; background: #fff; padding: 12px;
  box-shadow: 0 0 0 1px var(--border-strong), 0 24px 50px -22px rgba(196, 63, 194, 0.7);
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.8rem; text-align: left; margin: 1.1rem 0; font-size: 0.88rem; padding: 0.8rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.qr-card .btn-row { justify-content: center; }
.rules, .history { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; font-size: 0.88rem; }
.rules li { padding-left: 1.5rem; position: relative; }
.rules li::before {
  content: "✓"; position: absolute; left: 0; top: 0.1em; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--grad-ok); color: #fff; font-size: 0.65rem; font-weight: 800; display: grid; place-items: center;
}
.history li { padding-bottom: 0.6rem; border-bottom: 1px dashed var(--border-strong); }
.history li:last-child { border-bottom: 0; padding-bottom: 0; }
.history li.history-day { border-bottom: 0; padding-bottom: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.history li.history-day:not(:first-child) { margin-top: 0.4rem; }
/* about 5 tokens tall; older ones scroll inside the card so the page never grows */
#history { max-height: 25rem; overflow-y: auto; overscroll-behavior: contain; padding-right: 0.4rem; margin-right: -0.4rem; scrollbar-width: thin; }

/* Real A4 size, just off-screen: a 0×0 or hidden frame can leave print preview stuck on "Loading". */
.print-frame { position: fixed; left: -10000px; top: 0; width: 210mm; height: 297mm; border: 0; }

/* ── modal ── */
.modal {
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0;
  background: var(--surface-solid); color: var(--text);
  width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg);
}
.modal[open] { animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal::backdrop { background: rgba(6, 7, 13, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.modal-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.modal-body { padding: 1.2rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.9rem 1.2rem; border-top: 1px solid var(--border); }

/* ── toasts ── */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 0.5rem; z-index: 100; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  padding: 0.8rem 1.1rem; border-radius: 14px; font-size: 0.9rem; font-weight: 550; color: #fff;
  background: rgba(17, 19, 33, 0.88); border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: opacity 0.3s, transform 0.3s;
}
.toast-ok { background: linear-gradient(135deg, rgba(21, 128, 61, 0.95), rgba(22, 163, 74, 0.92)); }
.toast-error { background: linear-gradient(135deg, rgba(185, 28, 28, 0.95), rgba(225, 29, 72, 0.92)); }
.toast-warn { background: linear-gradient(135deg, rgba(180, 83, 9, 0.95), rgba(234, 88, 12, 0.92)); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ── customer upload page ── */
.customer { max-width: 580px; margin: 0 auto; padding: 18px 16px 32px; }
.shop-header { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0 1.2rem; }
.shop-avatar {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; flex: none;
  box-shadow: var(--glow);
}
.shop-header h1 { font-size: 1.35rem; margin: 0; overflow-wrap: anywhere; }
.privacy-note {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; margin-bottom: 1rem;
  border-radius: 16px; font-size: 0.9rem; line-height: 1.5;
  background: var(--ok-soft); border: 1px solid rgba(34, 197, 94, 0.22);
}
.privacy-note svg { color: var(--ok); flex: none; margin-top: 1px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0.4rem; padding: 2.2rem 1rem;
  border: 2px dashed rgba(196, 63, 194, 0.55); border-radius: var(--radius);
  background: var(--grad-soft), var(--surface); cursor: pointer;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 20px 50px -24px rgba(242, 85, 154, 0.6); }
/* upload illustration: two pages and a floating upload badge */
.drop-art { position: relative; width: 104px; height: 100px; margin-bottom: 0.5rem; }
.doc {
  position: absolute; top: 6px; width: 60px; height: 78px; border-radius: 11px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.doc-back { left: 10px; transform: rotate(-12deg); background: var(--surface); }
.doc-front { left: 30px; transform: rotate(5deg); padding: 20px 10px 0; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.doc-front::before { content: ""; position: absolute; top: 0; right: 0; width: 15px; height: 15px; background: linear-gradient(225deg, var(--bg) 50%, var(--surface-3) 50%); border-bottom-left-radius: 5px; }
.doc-front i { display: block; height: 5px; border-radius: 3px; background: var(--surface-3); }
.doc-front i:nth-child(1) { width: 75%; }
.doc-front i:nth-child(3) { width: 55%; }
.doc-front b { position: absolute; left: 8px; bottom: 8px; padding: 1px 5px; border-radius: 4px; font-size: 0.55rem; font-weight: 800; letter-spacing: 0.04em; color: #fff; background: linear-gradient(135deg, #ef4444, #f97316); }
.drop-badge {
  position: absolute; right: -12px; bottom: -2px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--grad); box-shadow: var(--glow), 0 0 0 4px var(--surface-solid); animation: bob 2.6s ease-in-out infinite;
}
.dropzone:hover .doc-front, .dropzone.drag .doc-front { transform: rotate(0deg) translateY(-6px); }
.dropzone:hover .doc-back, .dropzone.drag .doc-back { transform: rotate(-17deg) translateX(-4px); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.dropzone strong { font-size: 1.12rem; letter-spacing: -0.01em; }
.options { display: grid; gap: 1.1rem; margin-top: 1rem; }
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 13px; border: 1px solid var(--border-strong);
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.segmented span { display: block; text-align: center; padding: 0.62rem 0.5rem; border-radius: 10px; font-weight: 650; font-size: 0.92rem; cursor: pointer; color: var(--muted); transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.segmented input:checked + span { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 13px; overflow: hidden; background: var(--surface-2); }
.stepper button { width: 46px; height: 48px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--text); transition: background 0.15s; }
.stepper button:hover { background: var(--surface-3); }
.stepper input { width: 58px; text-align: center; border: 0; border-radius: 0; min-height: 48px; background: transparent; font-weight: 750; font-size: 1.05rem; -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus { box-shadow: none; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row-2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: end; }
.row-2 > *, .grid-2 > *, .options > * { min-width: 0; }
input, select, textarea { min-width: 0; }
@media (max-width: 380px) { .row-2 { grid-template-columns: 1fr; } }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 0.7rem; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.2s; box-shadow: 0 0 14px rgba(242, 85, 154, 0.7); }
.sticky-submit { position: sticky; bottom: 0; padding: 0.8rem 0 calc(0.8rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); margin-top: 0.5rem; }
.powered { margin-top: 1.5rem; }

.status-card { text-align: center; padding: 2rem 1.35rem; position: relative; overflow: hidden; }
.status-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: var(--grad-soft); pointer-events: none; }
.status-card > * { position: relative; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; font-weight: 750; color: var(--muted); margin: 0; }
.token { font-size: 5rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; margin: 0.2rem 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 24px rgba(242, 85, 154, 0.35)); }
.notice { display: flex; gap: 0.8rem; text-align: left; padding: 1rem 1.05rem; border-radius: 16px; align-items: flex-start; border: 1px solid transparent; }
.notice strong { font-size: 1rem; }
.notice p { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--muted); }
.notice p b { color: var(--text); }
.notice-info { background: var(--info-soft); border-color: rgba(59, 130, 246, 0.2); }
.notice-ok { background: var(--ok-soft); border-color: rgba(34, 197, 94, 0.22); }
.notice-warn { background: var(--warn-soft); border-color: rgba(245, 158, 11, 0.22); }
.notice-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.notice-info .notice-icon { background: linear-gradient(135deg, #3b82f6, #22d3ee); box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.8); }
.notice-ok .notice-icon { background: var(--grad-ok); box-shadow: 0 8px 20px -8px rgba(34, 197, 94, 0.8); }
.notice-warn .notice-icon { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.8); }
.status-actions { display: grid; gap: 0.5rem; margin-top: 1.3rem; }

/* ── admin ── */
.admin-main { width: 100%; max-width: 1400px; margin: 0 auto; padding: 1.75rem 2rem 3rem; }
@media (max-width: 640px) { .admin-main { padding: 1rem 16px; } }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-title h1 { margin: 0; font-size: 1.9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toolbar input[type="search"] { max-width: 320px; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 0.38rem 0.9rem; font: inherit; font-size: 0.84rem; font-weight: 650; cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background 0.15s, box-shadow 0.15s;
}
.filter:hover { background: var(--surface-3); }
.filter.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.filter .n { opacity: 0.7; margin-left: 0.35rem; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 750; background: var(--surface-2); white-space: nowrap; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.avatar { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 0.8rem; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.badges { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.plan-bar { height: 4px; border-radius: 999px; background: var(--surface-3); margin-top: 0.4rem; max-width: 11rem; overflow: hidden; }
.plan-bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.plan-bar.low i { background: var(--danger); }
td.empty-row { text-align: center; color: var(--muted); padding: 2.5rem; }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 750; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }

/* ── landing ── */
.landing { max-width: 1200px; margin: 0 auto; padding: 0 20px 56px; }
.landing-nav {
  position: sticky; top: 12px; z-index: 10; margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.7rem 0.6rem 1rem; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
}
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 4.5rem 0 3.5rem; }
.hero .display { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
.hero .btn-row { margin-top: 1.75rem; }
.hero-note { margin-top: 1.25rem; font-size: 0.86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.hero-note span::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 0.35rem; }
.hero .flow { height: 400px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 0 2rem; gap: 24px; }
  .hero .flow { height: 340px; }
}
@media (max-width: 520px) {
  .landing-nav .btn-ghost { display: none; }
  .fcard { width: 62%; }
  .fc-queue { left: auto; right: 0; }
  .fc-deleted { width: 58%; }
}
.section { padding: 3.5rem 0 1rem; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.section-title h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.04em; font-weight: 800; margin: 0.9rem 0 0.6rem; }
.section-title p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.how-card { position: relative; padding: 1.5rem; transition: transform 0.25s, box-shadow 0.25s; }
.how-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.how-card .step-no { position: absolute; top: 1.1rem; right: 1.3rem; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.05em; color: var(--surface-3); line-height: 1; }
.how-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: var(--glow); margin-bottom: 1.1rem; }
.how-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.how-card p { color: var(--muted); margin: 0; font-size: 0.93rem; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.time-card { padding: 1.4rem; }
.time-card .big { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.time-card .big.ok { background: var(--grad-ok); -webkit-background-clip: text; background-clip: text; }
.time-card p { color: var(--muted); margin: 0.35rem 0 0; font-size: 0.92rem; }
.cta-band {
  margin-top: 3.5rem; padding: 2.6rem 2rem; text-align: center; border-radius: 26px;
  border: 1px solid transparent;
  background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--grad) border-box;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -0.04em; font-weight: 800; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 1.5rem; }
.cta-band .btn-row { justify-content: center; }
.site-foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.86rem; }

/* ── poster (print) ── */
.poster-page { background: #e9ebf2; color: #111; min-height: 100vh; padding: 24px 16px; }
.poster-page::before, .poster-page::after { display: none; }
.poster-actions { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.poster-actions .btn:not(.btn-primary) { background: #fff; color: #111; border-color: #d8dbe6; }
.poster { background: #fff; color: #111; max-width: 148mm; margin: 0 auto; padding: 12mm 10mm; text-align: center; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); position: relative; overflow: hidden; }
.poster::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: linear-gradient(90deg, #5b3fd9, #f2559a, #ff8a5b); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-eyebrow { display: inline-block; background: linear-gradient(135deg, #5b3fd9, #f2559a, #ff8a5b); color: #fff; padding: 0.3rem 1rem; border-radius: 999px; font-weight: 750; font-size: 0.9rem; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster h1 { font-size: 2rem; margin: 0.9rem 0 1rem; color: #111; letter-spacing: -0.03em; }
.poster-qr { width: 72%; max-width: 360px; aspect-ratio: 1; display: block; margin: 0 auto; }
.poster h2 { font-size: 1.55rem; margin: 0.6rem 0 1rem; color: #111; }
.poster-steps { text-align: left; display: inline-block; margin: 0 auto 1rem; padding-left: 1.3rem; font-size: 1.05rem; }
.poster-privacy { background: #e5f6eb; color: #14532d; padding: 0.55rem 0.8rem; border-radius: 10px; font-weight: 650; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-foot { color: #555; font-size: 0.85rem; margin: 1rem 0 0; word-break: break-all; }
@media print {
  @page { size: A5; margin: 8mm; }
  .no-print { display: none !important; }
  .poster-page { background: #fff; padding: 0; min-height: 0; }
  .poster { box-shadow: none; border-radius: 0; max-width: none; padding: 0; }
}

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

/* ── "why" card + legal pages ── */
.why-card p { color: var(--muted); }
.warn-line { color: var(--text) !important; background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, 0.22); padding: 0.6rem 0.75rem; border-radius: 10px; margin: 0; }
.legal { max-width: 820px; margin: 1.5rem auto 3rem; padding: 2rem clamp(1.1rem, 4vw, 2.5rem); line-height: 1.7; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.15rem; margin-top: 2rem; }
.legal li { margin: 0.35rem 0; }
.legal .draft { background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, 0.25); color: var(--warn); padding: 0.75rem 1rem; border-radius: 12px; font-weight: 600; font-size: 0.9rem; }
.role-tag {
  display: inline-flex; align-items: center; gap: 0.35rem; position: relative; top: -0.25em; margin-left: 0.6rem;
  padding: 0.38rem 0.8rem; border-radius: 999px; background: var(--grad); color: #fff;
  font-size: 0.72rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; vertical-align: middle;
  box-shadow: var(--glow);
}
.role-tag svg { width: 12px; height: 12px; }


/* ── customer progress steps ── */
.steps { list-style: none; padding: 1.1rem 0.4rem 0.9rem; margin: 1.5rem 0 1.2rem; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; font-size: 0.76rem; font-weight: 650; color: var(--faint); text-align: center; line-height: 1.25; }
.steps li::before { content: ""; position: absolute; top: 21px; right: calc(50% + 26px); width: calc(100% - 52px); height: 4px; border-radius: 4px; background: var(--surface-3); }
.steps li:first-child::before { display: none; }
.steps .dot {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--faint);
  background: var(--surface-solid); border: 2px solid var(--border-strong);
  transition: background 0.4s, border-color 0.4s, color 0.4s, box-shadow 0.4s, transform 0.4s;
}
.steps .dot svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: opacity 0.3s, transform 0.3s; }
.steps .dot .tick { opacity: 0; transform: scale(0.4); }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--grad-ok); box-shadow: 0 0 10px rgba(34, 197, 94, 0.45); }
.steps li.done .dot { background: var(--grad-ok); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -6px rgba(34, 197, 94, 0.75); }
.steps li.done .dot .ico { opacity: 0; transform: scale(0.4); }
.steps li.done .dot .tick { opacity: 1; transform: none; }
.steps li.current { color: var(--primary); font-weight: 750; }
.steps li.current::before {
  background: linear-gradient(90deg, #22c55e, #f2559a, #22c55e); background-size: 200% 100%;
  animation: flow-line 1.6s linear infinite;
}
.steps li.current .dot { color: #fff; background: var(--grad); border-color: transparent; transform: scale(1.08); animation: ping-violet 1.6s infinite; }
@keyframes flow-line { to { background-position: -200% 0; } }
@media (max-width: 380px) { .steps .dot { width: 38px; height: 38px; } .steps li::before { top: 18px; right: calc(50% + 23px); width: calc(100% - 46px); } }
.status-card::before, .qr-card::before { -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.steps .dot .cross { opacity: 0; transform: scale(0.4); }
.steps li.failed { color: var(--danger); font-weight: 750; }
.steps li.failed .dot { background: linear-gradient(135deg, #dc2626, #f43f5e); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -6px rgba(244, 63, 94, 0.75); }
.steps li.failed .dot .ico { opacity: 0; transform: scale(0.4); }
.steps li.failed .dot .cross { opacity: 1; transform: none; }
.steps li.failed::before { background: linear-gradient(90deg, #22c55e, #f43f5e); }
.steps li.skipped { opacity: 0.45; }
.steps li.skipped::before, .steps li.skipped + li::before { background: var(--surface-3); box-shadow: none; }
.attempts { font-size: 0.82rem; color: var(--muted); margin: -0.4rem 0 1rem; }
.attempts b { color: var(--text); }

/* ── admin portal ── */
.admin-app {
  --s1: #c026a8; --s2: #5b3fd9;
  min-height: 100vh;
}
@media (prefers-color-scheme: dark) { .admin-app { --s1: #f472b6; --s2: #a78bfa; } }
.admin-app::before, .admin-app::after { display: none; }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 16; display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.4rem 1rem 1rem; background: var(--surface-solid); border-right: 1px solid var(--border);
}
.side > .brand { padding: 0 0.6rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; overflow-y: auto; }
.side-label { margin: 1rem 0.75rem 0.4rem; font-size: 0.7rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.side-label:first-child { margin-top: 0.25rem; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-radius: 11px;
  color: var(--muted); font-weight: 600; font-size: 0.92rem; transition: background 0.15s, color 0.15s;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); }
.side-nav a.active::before { content: ""; position: absolute; left: -1rem; top: 0.45rem; bottom: 0.45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.side-user { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 0.6rem 0.2rem; border-top: 1px solid var(--border); }
.side-user .avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; box-shadow: none; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; flex: 1; }
.side-user-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-shell { min-width: 0; margin-left: 250px; display: flex; flex-direction: column; }
.band {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 2rem; background: var(--grad); box-shadow: 0 10px 30px -18px rgba(196, 63, 194, 0.8);
}
.band-search {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 0.55rem; padding: 0 0.85rem;
  border-radius: 12px; background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22);
}
.band-search:focus-within { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.5); }
.band-search input { border: 0; background: transparent; color: #fff; box-shadow: none; padding: 0.6rem 0; min-height: 0; width: 100%; outline: none; }
.band-search input::placeholder { color: rgba(255, 255, 255, 0.75); }
.band .icon-btn { margin-left: auto; color: #fff; display: grid; place-items: center; }
.band .icon-btn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.side-user .icon-btn { display: grid; place-items: center; }

.admin-main section { scroll-margin-top: 80px; }
.admin-main section + section { margin-top: 2.25rem; }
.welcome { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.25rem; }
.welcome h1 { margin: 0 0 0.15rem; }
.welcome p { margin: 0; }
.period { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.9rem; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1.15rem 1.25rem; background: var(--surface-solid); }
.kpi-text { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.kpi-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.25; }
.kpi-sub { margin-top: 0.2rem; }
.delta { font-weight: 750; color: var(--muted); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.mini { flex: none; width: 108px; height: 46px; overflow: visible; }
.mini.ring { width: 52px; height: 52px; }
.mini-line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mini-area { fill: var(--s1); opacity: 0.12; }
.mini-dot { fill: var(--s1); stroke: var(--surface-solid); stroke-width: 2; }
.mini-bar { fill: var(--s1); opacity: 0.35; }
.mini-bar.last { opacity: 1; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--ok-solid); stroke-width: 5; stroke-linecap: round; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.chart-card, .list-card { background: var(--surface-solid); }
.admin-app .card { -webkit-backdrop-filter: none; backdrop-filter: none; }
.chart-head { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.chart-head h3 { margin: 0; }
.chart-head p { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--s1); }
.swatch.s2 { background: var(--s2); }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--s1); }
.chart .line.s2 { stroke: var(--s2); stroke-dasharray: 6 5; }
.chart .stop-a { stop-color: var(--s1); stop-opacity: 0.22; }
.chart .stop-b { stop-color: var(--s1); stop-opacity: 0; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; }
.chart .dot { stroke: var(--surface-solid); stroke-width: 2; }
.chart .dot.s1 { fill: var(--s1); }
.chart .dot.s2 { fill: var(--s2); }
.chart .hit { cursor: crosshair; }
.tip {
  position: absolute; top: 8px; pointer-events: none; min-width: 170px; padding: 0.6rem 0.75rem; border-radius: 12px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 0.82rem;
}
.tip strong { display: block; margin-bottom: 0.3rem; }
.tip div { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); }
.tip b { margin-left: auto; color: var(--text); padding-left: 0.75rem; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list li:first-child { padding-top: 0; }
.mini-icon { flex: none; width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; font-size: 0.9rem; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.mini-icon.danger { background: var(--danger-soft); color: var(--danger); }
.mini-icon.warn { background: var(--warn-soft); color: var(--warn); }
.mini-icon.ok { background: var(--ok-soft); color: var(--ok); }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.9rem; line-height: 1.4; }
.mini-list .amount { font-size: 0.95rem; }
#payments .list-card { max-width: 720px; }
#admins .card { max-width: 860px; }
.admins-card { margin-bottom: 1rem; }
.admins-card li { flex-wrap: wrap; }
.role-select { font: inherit; font-size: 0.85rem; font-weight: 650; padding: 0.35rem 0.6rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.roles { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1rem; margin: 0; align-items: center; font-size: 0.9rem; }
.roles dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .roles { grid-template-columns: 1fr; } .roles dd { margin-bottom: 0.4rem; } }

.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#payments .list-card { max-width: none; }

.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.tile {
  appearance: none; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; border-radius: var(--radius-md);
  background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tile:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.tile.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.tile-n { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.tile-l { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.82rem; font-weight: 650; white-space: nowrap; }
.tile-l i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.tile-all .tile-l i { background: var(--primary); }
.tile-active .tile-l i, .tile-paid .tile-l i { background: var(--ok-solid); }
.tile-trial .tile-l i { background: var(--info); }
.tile-overdue .tile-l i, .tile-suspended .tile-l i { background: var(--danger); }
.tile-setup .tile-l i { background: var(--warn); }

.empty-card { display: flex; flex-direction: column; gap: 0.2rem; align-items: center; padding: 2.5rem; grid-column: 1 / -1; background: var(--surface-solid); }

.shop-list-card { padding: 0.4rem; }
.shop-list { list-style: none; margin: 0; padding: 0; }
.shop-list li + li { border-top: 1px solid var(--border); }
.shop-list a { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.85rem; border-radius: 12px; color: var(--text); font-weight: 500; }
.shop-list a:hover { background: var(--surface-2); text-decoration: none; }
.shop-list a:hover .chev { color: var(--primary); transform: translateX(2px); }
.shop-list .avatar { width: 2.3rem; height: 2.3rem; box-shadow: none; }
.shop-list-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.shop-list-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-list .mini-empty { padding: 1.5rem; justify-content: center; }
.status-dot { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.status-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-dot.ok i { background: var(--ok-solid); }
.status-dot.info i { background: var(--info); }
.status-dot.warn i { background: var(--warn); }
.status-dot.danger i { background: var(--danger); }
.chev { flex: none; color: var(--faint); transition: transform 0.15s, color 0.15s; }

.back { display: inline-block; margin-bottom: 0.9rem; font-size: 0.9rem; }
.shop-hero { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.1rem; margin-bottom: 1rem; background: var(--surface-solid); }
.avatar-lg { width: 3.6rem; height: 3.6rem; border-radius: 1.1rem; font-size: 1.5rem; }
.shop-hero-text { flex: 1; min-width: 14rem; }
.shop-hero-text h1 { margin: 0; }
.shop-hero-text > p { margin: 0 0 0.6rem; }
.shop-hero-text .plan-bar { max-width: 16rem; }
.shop-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.warn-card { margin-bottom: 1rem; background: var(--warn-soft); border-color: transparent; font-size: 0.9rem; }
#shop .overview-grid + .overview-grid { margin-top: 1rem; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1rem; margin: 0; font-size: 0.9rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; margin: 0 -1.35rem; }
.jobs-table th:first-child, .jobs-table td:first-child { padding-left: 1.35rem; }
.jobs-table td { font-size: 0.86rem; }

@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { margin-left: 0; }
  .side { position: static; width: auto; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.8rem 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side > .brand { padding: 0; }
  .side-nav { flex-direction: row; flex: none; order: 3; width: 100%; overflow-x: auto; }
  .side-label { display: none; }
  .side-nav a { padding: 0.45rem 0.7rem; white-space: nowrap; }
  .side-nav a.active::before { display: none; }
  .side-user { margin-left: auto; border-top: 0; padding: 0; }
  .side-user-text { display: none; }
  .band { padding: 0.7rem 16px; }
  .admin-main { padding: 1.25rem 16px 2.5rem; }
}
@media (max-width: 560px) {
  .kpis, .kpis-3 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 7.5rem; overflow-x: auto; padding: 4px 4px 0.5rem; margin: -4px -4px 0.75rem; }
  .shop-list .status-dot { display: none; }
  .period { align-items: flex-start; }
}

/* ── UPI payments ── */
.upi-missing { margin: 0 0 1rem; padding: 0.75rem 0.9rem; border-radius: 12px; text-align: left; font-size: 0.86rem; background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, 0.25); }
.upi-missing p { margin: 0 0 0.55rem; }
.upi-terms { align-items: flex-start; font-weight: 500; font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.upi-terms input { flex: none; margin-top: 2px; }
.pay-box { display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 16px; text-align: left; background: var(--surface-2); border: 1px solid var(--border-strong); }
.pay-box > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.pay-box .btn { flex: none; }
.sheet .modal-head .icon-btn { display: grid; place-items: center; }
.sheet .modal-body { display: grid; gap: 0.6rem; }
.copy-steps { margin: 0; padding: 0.8rem 0.9rem 0.8rem 2rem; border-radius: 14px; font-size: 0.88rem; line-height: 1.45; background: var(--ok-soft); border: 1px solid rgba(34, 197, 94, 0.25); }
.copy-steps li + li { margin-top: 0.35rem; }
.sheet-label { margin: 0; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.app-opt {
  appearance: none; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.75rem 0.3rem;
  border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 0.8rem; font-weight: 650; line-height: 1.2; text-align: center; cursor: pointer;
}
.app-opt:hover, .app-opt:focus-visible { background: var(--surface-3); }
.app-ini { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: #fff; background: var(--grad); }
.app-opt.other .app-ini { background: var(--surface-3); color: var(--text); }
.app-ini img { filter: brightness(0) invert(1); } /* logos are single-colour shapes: draw them white on the brand colour */
.sheet-opt {
  appearance: none; display: flex; align-items: center; gap: 0.85rem; width: 100%; padding: 0.85rem 0.95rem; text-align: left;
  border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer;
}
.sheet-opt:hover { background: var(--surface-3); text-decoration: none; }
.sheet-opt b { display: block; font-weight: 700; }
#sheet-upi.pick { user-select: all; -webkit-user-select: all; color: var(--text); font-family: ui-monospace, Consolas, monospace; font-size: 0.95rem; padding: 0.3rem 0.5rem; margin-top: 0.3rem; border-radius: 8px; background: var(--surface-solid); border: 1px dashed var(--border-strong); }
.sheet-opt small { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 500; overflow-wrap: anywhere; }
.sheet-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad); }
#sheet-copy .sheet-ico { background: var(--surface-3); color: var(--text); }
/* the copy option is the reliable way to pay, so it leads the sheet */
.sheet-opt-main { border-color: var(--primary); background: var(--primary-soft); }
.sheet-opt-main .sheet-ico, #sheet-copy.sheet-opt-main .sheet-ico { background: var(--grad); color: #fff; }
.sheet-tag { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.7rem; font-style: normal; font-weight: 700; color: var(--ok); background: var(--ok-soft); vertical-align: 0.1em; }
@media (max-width: 560px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.pay-note { margin: 0.8rem 0 0; font-size: 0.75rem; line-height: 1.5; color: var(--muted); }

/* gradient text only as wide as the words, so short numbers show the whole sunset, not just its first colour */
.trust b, .time-card .big { width: fit-content; }
.token { width: fit-content; margin-inline: auto; }
/* the upload link stays plain blue so it reads clearly as a link */
#upload-url { color: var(--info); }
