/* ==========================================================================
   Vaultline — "Daylight" design system
   A light, friendly theme for small-business owners and their staff:
   white and soft-silver surfaces, one familiar blue for actions,
   comfortable type sizes, sentence-case labels and generous hit areas.
   Light is the default regardless of OS setting; dark is opt-in only.
   Served statically and CSP-safe (no inline styles or scripts).
   ========================================================================== */

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
    font-weight: 500 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;

    --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

    /* Light surfaces */
    --page: #f5f6f8;
    --surface-1: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #eff1f4;
    --sidebar: #ffffff;
    --ink: #1f2430;
    --text-primary: #1f2430;
    --text-secondary: #4b5262;
    --text-muted: #646b78;

    --rule: #e4e7ec;
    --rule-strong: #ccd1d9;
    --rule-emphasis: #b3b9c3;
    --border: var(--rule);
    --border-strong: var(--rule-strong);
    --gridline: #eceef2;
    --baseline: #9aa1ac;

    /* One friendly blue for everything you can click */
    --primary: #2a63d4;
    --primary-hover: #1f51b5;
    --primary-soft: #edf3fd;
    --primary-ink: #ffffff;
    --link: #2a63d4;
    --signal: #2a63d4;
    --signal-soft: #edf3fd;

    /* Data: single series in soft slate, best day highlighted in blue */
    --series-1: #8a919c;
    --series-1-wash: rgba(42, 99, 212, 0.06);

    /* Status (always shown with a word, never colour alone) */
    --good: #2e9a5b;
    --good-ink: #1d6b3d;
    --good-soft: #e8f6ee;
    --warning: #d99a1e;
    --warning-ink: #7a5300;
    --warning-soft: #fdf4e1;
    --critical: #d1435b;
    --critical-ink: #a72a40;
    --critical-soft: #fdecef;
    --info: #2a63d4;
    --info-soft: #edf3fd;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 2px rgba(31, 36, 48, 0.05);
    --focus: 0 0 0 3px rgba(42, 99, 212, 0.35);

    --sidebar-width: 240px;
    --topbar-height: 60px;
}

/* Dark mode is opt-in only (theme toggle), never forced by the OS setting */
:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #15181e;
    --surface-1: #1c2028;
    --surface-2: #21252e;
    --surface-3: #292e38;
    --sidebar: #1c2028;
    --ink: #e8eaee;
    --text-primary: #e8eaee;
    --text-secondary: #b6bcc6;
    --text-muted: #98a0ac;
    --rule: #2e333d;
    --rule-strong: #3e4450;
    --rule-emphasis: #565d6a;
    --gridline: #282c35;
    --baseline: #5f6672;
    --primary: #6b9bf2;
    --primary-hover: #8cb2f6;
    --primary-soft: rgba(107, 155, 242, 0.14);
    --primary-ink: #10131a;
    --link: #8cb2f6;
    --signal: #6b9bf2;
    --signal-soft: rgba(107, 155, 242, 0.14);
    --series-1: #7d8490;
    --series-1-wash: rgba(107, 155, 242, 0.08);
    --good-ink: #74cf98;
    --good-soft: rgba(46, 154, 91, 0.16);
    --warning-ink: #e9bf62;
    --warning-soft: rgba(217, 154, 30, 0.14);
    --critical-ink: #f08a9c;
    --critical-soft: rgba(209, 67, 91, 0.16);
    --info-soft: rgba(107, 155, 242, 0.14);
    --shadow: none;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 28px; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
::selection { background: var(--primary-soft); }

/* Mono is reserved for codes (SKU, invoice, barcode, IP) */
.mono, code { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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;
}
.hidden { display: none !important; }
.narrow { max-width: 600px; }
.inline-form { display: inline; }
.flip { transform: scaleX(-1); }
code { word-break: break-all; color: var(--text-secondary); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
details > summary { cursor: pointer; }
kbd {
    font-family: var(--font-mono); font-size: 12px; padding: 0 6px;
    border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--surface-1); color: var(--text-secondary);
}

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    background: var(--primary); color: var(--primary-ink); padding: 8px 12px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- App shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar-width);
    background: var(--sidebar);
    border-right: 1px solid var(--rule);
    color: var(--text-secondary);
    display: flex; flex-direction: column;
    padding: 18px 12px 14px;
    overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 20px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 32px; height: 32px; border-radius: 8px; flex: none;
    display: grid; place-items: center;
    background: var(--primary); color: var(--primary-ink);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; line-height: 1; }

.nav-section { margin-top: 14px; }
.nav-label { padding: 0 12px 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; margin: 1px 0; border-radius: var(--radius);
    color: var(--text-secondary); text-decoration: none; font-weight: 500;
}
.nav-link svg { width: 19px; height: 19px; flex: none; color: var(--text-muted); }
.nav-link:hover { color: var(--ink); background: var(--surface-3); text-decoration: none; }
.nav-link.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-link.is-active svg { color: var(--primary); }

.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--rule); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary);
    font-size: 13px; font-weight: 600;
}
.user-chip-name { color: var(--ink); font-weight: 600; font-size: 14px; }
.user-chip-role { font-size: 12.5px; color: var(--text-muted); }
.sidebar-actions { display: flex; gap: 8px; padding: 12px 0 0; }
.sidebar-actions form { flex: 1; display: flex; }
.sidebar-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 10px;
    background: var(--surface-1); border: 1px solid var(--rule-strong); border-radius: var(--radius);
    color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.sidebar-btn svg { width: 15px; height: 15px; }
.sidebar-btn:hover { color: var(--ink); border-color: var(--rule-emphasis); text-decoration: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    height: var(--topbar-height); padding: 0 32px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--rule);
}
.topbar-title { font-weight: 600; display: none; }
.topbar-search { flex: 1; max-width: 460px; }
.topbar-search .input { height: 40px; background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
    border: 1px solid var(--rule-strong); background: var(--surface-1); color: var(--text-secondary);
    border-radius: var(--radius); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule-emphasis); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.theme-toggle .theme-icon { display: none; }
.theme-toggle[data-mode="light"] .theme-icon-dark,
.theme-toggle[data-mode="dark"] .theme-icon-light { display: block; }
.backdrop { display: none; }

.content { padding: 30px 32px 72px; width: 100%; max-width: 1400px; margin: 0 auto; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(31, 36, 48, 0.15); }
    .shell.nav-open .sidebar { transform: translateX(0); }
    .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(31, 36, 48, 0.35); }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: 0 16px; }
    .content { padding: 22px 16px 56px; }
}
@media (max-width: 640px) {
    .topbar-search { display: none; }
    .topbar-title { display: block; }
    .topbar-actions .btn-label { display: none; }
}

/* ---------- Page header ---------- */

.page-header {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; margin-bottom: 24px;
}
.page-header p { color: var(--text-secondary); margin-top: 6px; }
.eyebrow { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.eyebrow svg { width: 12px; height: 12px; }
.eyebrow a { color: var(--text-muted); }
.eyebrow a:hover { color: var(--link); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */

.card {
    background: var(--surface-1);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 22px; border-bottom: 1px solid var(--rule);
}
.card-header h2 { font-size: 16px; font-weight: 600; }
.card-header p { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 22px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 12px 22px; border-top: 1px solid var(--rule); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }

@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Key figures ---------- */

.stat { padding: 18px 22px 20px; position: relative; overflow: hidden; }
.stat-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-meta { font-size: 13px; color: var(--text-muted); margin-top: 8px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: baseline; gap: 3px; font-weight: 600; font-size: 13px; padding: 1px 7px; border-radius: 999px; }
.delta-up { color: var(--good-ink); background: var(--good-soft); }
.delta-up::before { content: "↑"; }
.delta-down { color: var(--critical-ink); background: var(--critical-soft); }
.delta-down::before { content: "↓"; }
/* The lead figure (today's sales) gets a blue top edge */
.stat-hero { border-top: 3px solid var(--primary); }
.stat-hero .stat-value { color: var(--ink); font-size: 32px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border-radius: var(--radius); border: 1px solid var(--rule-strong);
    background: var(--surface-1); color: var(--ink);
    font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none;
    cursor: pointer;
}
.btn:hover { border-color: var(--rule-emphasis); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.btn-danger { color: var(--critical-ink); }
.btn-danger:hover { background: var(--critical-soft); border-color: var(--critical); color: var(--critical-ink); }
.btn-danger-solid { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn-danger-solid:hover { background: var(--critical-ink); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--primary-soft); border-color: transparent; color: var(--link); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid .span-2 { grid-column: auto; } }

.field label, .label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.field .error, .error { font-size: 13.5px; color: var(--critical-ink); margin-top: 6px; }
.error:empty { display: none; }
.required::after { content: " *"; color: var(--critical); }

.input, .select, .textarea {
    width: 100%; height: 42px; padding: 0 12px;
    background: var(--surface-1); color: var(--text-primary);
    border: 1px solid var(--rule-strong); border-radius: var(--radius);
    font: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--rule-emphasis); }
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
.select {
    appearance: none; padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px;
    background-size: 5px 5px; background-repeat: no-repeat;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--critical); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-group .input { padding-left: 28px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; }
.input-icon .input { padding-left: 38px; }

.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.filters .input, .filters .select { width: auto; min-width: 160px; height: 40px; }
.filters .input-icon { flex: 1 1 240px; }
.filters .input-icon .input { width: 100%; }
@media (max-width: 720px) { .filters > * { flex: 1 1 100%; } .filters .input, .filters .select { width: 100%; } }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-weight: 600; font-size: 13px; color: var(--text-secondary);
    padding: 11px 22px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 13px 22px; border-bottom: 1px solid var(--gridline); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--rule-strong); border-bottom: 0; }
.table-compact td { padding: 9px 22px; }
.table a.row-link { color: var(--link); font-weight: 500; }
.table .mono { white-space: nowrap; }
.cell-title { font-weight: 500; }
.cell-sub { font-size: 13px; color: var(--text-muted); }
.sort-link { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover, .sort-link.is-active { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) {
    .table td, .table th { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
}

/* ---------- Status tags: soft pill with a dot and a word ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 500; white-space: nowrap;
    background: var(--surface-3); color: var(--text-secondary);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; }
.badge-success { background: var(--good-soft); color: var(--good-ink); }
.badge-warning { background: var(--warning-soft); color: var(--warning-ink); }
.badge-danger { background: var(--critical-soft); color: var(--critical-ink); }
.badge-info { background: var(--info-soft); color: var(--primary); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Alerts ---------- */

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 13px 16px; margin-bottom: 20px; border-radius: var(--radius);
    border: 1px solid transparent; font-weight: 500;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-success { background: var(--good-soft); color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.alert-danger { background: var(--critical-soft); color: var(--critical-ink); border-color: color-mix(in srgb, var(--critical) 30%, transparent); }
.alert ul { margin: 4px 0 0; padding-left: 18px; font-weight: 400; }
.alert .alert-close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: 0.7; }

/* ---------- Empty state ---------- */

.empty { padding: 40px 22px; color: var(--text-muted); text-align: center; }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 16px; }
.empty .btn { margin-top: 16px; }

/* ---------- Definition list / list ---------- */

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; }
.dl dt, .dl dd { padding: 10px 0; border-bottom: 1px solid var(--gridline); }
.dl dt { color: var(--text-secondary); }
.dl dd { margin: 0; font-weight: 600; text-align: right; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--gridline); }
.list li:last-child { border-bottom: 0; }

/* ---------- Pagination ---------- */

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 22px; border-top: 1px solid var(--rule); }
.pagination-info { color: var(--text-muted); font-size: 13px; }
.pagination-links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-grid; place-items: center; text-decoration: none;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-1);
    color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums;
}
.page-link:hover { border-color: var(--rule-emphasis); text-decoration: none; }
.page-link.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.page-link.is-disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Range selector & tabs ---------- */

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-3); }
.segmented a { padding: 6px 12px; border-radius: 7px; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; }
.segmented a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); text-decoration: none; }
.segmented a.is-active { background: var(--surface-1); color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(31, 36, 48, 0.12); }

.tabs { display: flex; gap: 24px; box-shadow: inset 0 -1px 0 var(--rule); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 0; color: var(--text-secondary); font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ---------- Charts ---------- */

.chart { position: relative; width: 100%; margin: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--gridline); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base-line { stroke: var(--rule-emphasis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis-label { fill: var(--text-muted); font-size: 11.5px; font-family: var(--font-sans); }
.chart .empty-label { fill: var(--text-muted); font-size: 14px; font-family: var(--font-sans); }
.chart .bar { fill: var(--series-1); }
.chart .bar-group.is-peak .bar { fill: var(--primary); }
.chart .bar-hit { fill: transparent; }
.chart .bar-group:hover .bar-hit { fill: var(--series-1-wash); }
.chart .bar-group:focus { outline: none; }
.chart .bar-group:focus .bar-hit { stroke: var(--primary); stroke-width: 2; }
.chart .peak-label { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--font-sans); }

.chart-tooltip {
    position: absolute; z-index: 5; pointer-events: none;
    background: var(--ink); color: var(--surface-1);
    border-radius: 6px; padding: 7px 10px; font-size: 13px; white-space: nowrap;
    transform: translate(-50%, calc(-100% - 10px));
}
.chart-tooltip span { opacity: 0.75; }
.chart-tooltip strong { display: block; font-weight: 600; font-size: 14px; }

.hbar-list { display: flex; flex-direction: column; gap: 16px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.hbar-row .hbar-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar-row .hbar-track { grid-column: span 2; }
.hbar-row svg { display: block; width: 100%; height: 8px; }
.hbar-row .hbar-bg { fill: var(--surface-3); }
.hbar-row .hbar-fill { fill: var(--primary); }

details.table-view { border-top: 1px solid var(--rule); }
details.table-view summary { padding: 11px 22px; font-size: 14px; color: var(--link); }

/* ---------- Sign-in ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface-1); }
.auth-aside {
    background: var(--page); border-right: 1px solid var(--rule);
    padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-aside .brand { padding: 0; }
.auth-statement { font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: var(--ink); max-width: 560px; }
.auth-statement span { color: var(--primary); }
.auth-aside .auth-lede { margin-top: 16px; max-width: 470px; font-size: 16px; color: var(--text-secondary); }
.auth-aside .small { color: var(--text-muted); font-size: 13px; }

/* Example of the stock history every product keeps */
.specimen { margin-top: 32px; max-width: 560px; background: var(--surface-1); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.specimen-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.specimen table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specimen td { padding: 9px 16px; border-bottom: 1px solid var(--gridline); white-space: nowrap; }
.specimen tr:last-child td { border-bottom: 0; }
.specimen td:nth-child(n + 3) { text-align: right; font-variant-numeric: tabular-nums; }
.specimen .in { color: var(--good-ink); font-weight: 600; }
.specimen .out { color: var(--critical-ink); font-weight: 600; }
.specimen-foot { display: flex; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--rule); background: var(--surface-2); font-size: 14px; font-weight: 600; }

.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 30px; }
.auth-card > p { color: var(--text-secondary); margin: 6px 0 26px; }
.auth-footnote { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--text-muted); }
@media (max-width: 960px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- POS ---------- */

.pos { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .pos { grid-template-columns: minmax(0, 1fr); } }

.pos-search { padding: 14px; border-bottom: 1px solid var(--rule); }
.pos-search .input { height: 48px; font-size: 16px; }
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px; padding: 14px; min-height: 260px; align-content: start;
}
.product-grid > p { grid-column: 1 / -1; padding: 8px 4px; }
.product-tile {
    display: flex; flex-direction: column; gap: 2px; text-align: left;
    padding: 14px; min-height: 120px;
    border: 1px solid var(--rule); border-radius: var(--radius-lg);
    background: var(--surface-1); color: var(--ink); font: inherit; cursor: pointer;
}
.product-tile:hover { border-color: var(--primary); background: var(--primary-soft); }
.product-tile:disabled { opacity: 0.45; cursor: not-allowed; background: var(--surface-1); border-color: var(--rule); }
.product-tile .tile-name { font-weight: 600; line-height: 1.3; }
.product-tile .tile-sku { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.product-tile .tile-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 12px; }
.product-tile .tile-price { font-size: 16px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }
.product-tile .tile-stock { font-size: 12.5px; color: var(--text-muted); }

.cart { position: sticky; top: calc(var(--topbar-height) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar-height) - 32px); overflow: hidden; }
.cart-items { flex: 1; overflow-y: auto; min-height: 110px; }
.cart-items .empty { padding: 24px 22px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 13px 22px; border-bottom: 1px solid var(--gridline); }
.cart-line-name { font-weight: 600; }
.cart-line-meta { font-size: 13px; color: var(--text-muted); }
.cart-line-total { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cart-line-controls { grid-column: span 2; display: flex; align-items: center; gap: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.qty button { width: 36px; height: 34px; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; font-size: 18px; }
.qty button:hover { background: var(--surface-3); }
.qty input { width: 50px; height: 34px; border: 0; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); text-align: center; font: inherit; font-weight: 600; background: var(--surface-1); color: var(--ink); }
.qty input:focus { outline: none; box-shadow: inset var(--focus); }
.cart-remove { margin-left: auto; }
.cart-summary { padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--surface-2); }
.summary-row { display: flex; justify-content: space-between; padding: 2px 0; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.summary-row.total { color: var(--ink); font-size: 24px; font-weight: 600; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--rule-strong); }
.cart-pay { padding: 16px 22px 22px; display: grid; gap: 14px; border-top: 1px solid var(--rule); overflow-y: auto; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pay-methods label { position: relative; }
.pay-methods input { position: absolute; opacity: 0; }
.pay-methods span {
    display: block; text-align: center; padding: 10px 8px; cursor: pointer; font-size: 14px; font-weight: 500;
    border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.pay-methods span:hover { border-color: var(--rule-emphasis); background: var(--surface-2); }
.pay-methods input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px var(--primary); }
.pay-methods input:focus-visible + span { box-shadow: var(--focus); }
.change-due { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: var(--radius); background: var(--good-soft); color: var(--good-ink); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 720px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 56vh; overflow-y: auto; padding: 10px; gap: 8px; }
    .cart { position: static; max-height: none; }
}

/* ---------- Dialog ---------- */

dialog.modal {
    border: 1px solid var(--rule); padding: 0; border-radius: var(--radius-lg);
    width: min(440px, calc(100vw - 32px)); background: var(--surface-1); color: var(--text-primary);
    box-shadow: 0 24px 48px -16px rgba(31, 36, 48, 0.3);
}
dialog.modal::backdrop { background: rgba(31, 36, 48, 0.4); }
.modal-body { padding: 26px; }
.modal-body h2 { font-size: 19px; margin-bottom: 6px; }
.modal-body > p { color: var(--text-secondary); margin-bottom: 18px; }
.modal-success { text-align: center; }
.modal-success h2 { color: var(--good-ink); }
.modal-success .big { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal-success .modal-actions { justify-content: center; }

/* ---------- Receipt ---------- */

.receipt-page { background: var(--page); min-height: 100vh; padding: 32px 16px; }
.receipt-toolbar { max-width: 360px; margin: 0 auto 16px; display: flex; gap: 8px; justify-content: space-between; }
.receipt {
    max-width: 360px; margin: 0 auto; background: #fff; color: #0b0b0b;
    padding: 26px 22px; border: 1px solid var(--rule); border-radius: 6px;
    font-family: var(--font-mono); font-size: 12px; line-height: 1.55;
}
.receipt h1 { font-family: var(--font-sans); font-size: 17px; text-align: center; }
.receipt .center { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 10px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 2px 0; vertical-align: top; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .grand td { font-size: 14px; font-weight: 700; padding-top: 4px; }
.receipt .void-stamp { text-align: center; font-weight: 700; color: #a32727; border: 2px solid #a32727; padding: 4px; margin: 8px 0; letter-spacing: 0.2em; }

@media print {
    @page { margin: 6mm; }
    body { background: #fff; }
    .receipt-page { padding: 0; background: #fff; }
    .receipt-toolbar { display: none; }
    .receipt { border: 0; padding: 0; max-width: none; }
}

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

/* ---------- System logs ---------- */

.log-message { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.log-json {
    margin: 0; padding: 14px 16px; max-height: 420px; overflow: auto;
    background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--text-primary);
    white-space: pre-wrap; overflow-wrap: anywhere;
}
.list li.is-current { background: var(--primary-soft); }

/* ---------- Error pages ---------- */

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--page); }
.error-card { width: 100%; max-width: 480px; background: var(--surface-1); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 32px; }
.error-card h1 { font-size: 24px; margin: 4px 0 10px; }
.error-card p { color: var(--text-secondary); }
.error-reference { margin: 20px 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); }
.error-reference .label { margin-bottom: 2px; }
.error-reference code { font-size: 14px; color: var(--ink); }

/* ---------- Billing notices ---------- */

.alert-warning { background: var(--warning-soft); color: var(--warning-ink); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.sidebar-business { padding: 0 14px 14px; margin-top: -6px; font-size: 13px; color: var(--text-muted); }
.sidebar-business strong { display: block; color: var(--ink); font-size: 14px; }

/* ---------- Store address field ---------- */

.address-field { display: flex; align-items: stretch; }
.address-field .input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.address-field .address-suffix {
    display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
    border: 1px solid var(--rule-strong); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--surface-2); color: var(--text-muted); font-size: 14px;
}
.address-preview { margin-top: 6px; font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
.address-preview strong { color: var(--ink); font-weight: 600; }

fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface-1); }
.plan-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.plan-option input { margin-top: 4px; }
.plan-option strong { display: block; }
.plan-option span { font-size: 13px; color: var(--text-muted); }
/* <progress> rather than a sized <span>: the CSP forbids inline style attributes. */
.usage-meter { display: block; width: 100%; height: 8px; margin-top: 10px; appearance: none; border: 0; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.usage-meter::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.usage-meter::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.usage-meter::-moz-progress-bar { background: var(--primary); border-radius: 999px; }
.usage-meter.is-full::-webkit-progress-value { background: var(--warning); }
.usage-meter.is-full::-moz-progress-bar { background: var(--warning); }
.hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Public marketing site (central domain): landing, sign-up, store sign-in.
   Everything is drawn with HTML and CSS: the CSP allows no inline styles,
   no remote images and no inline scripts.
   ========================================================================== */

.section-title { font-size: 24px; margin-bottom: 6px; }
.section-lede { color: var(--text-secondary); margin-bottom: 20px; }

/* Plan cards: shared by the landing page and the in-app subscription page */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 28px; }
.plan-card.is-featured { border: 2px solid var(--primary); box-shadow: 0 18px 40px -24px rgba(42, 99, 212, 0.45); }
.plan-name { font-size: 18px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plan-tagline { color: var(--text-secondary); margin-top: 6px; font-size: 15px; }
.plan-price { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin-top: 14px; font-variant-numeric: tabular-nums; color: var(--ink); }
.plan-price small { font-size: 15px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-features { list-style: none; margin: 20px 0 26px; padding: 20px 0 0; border-top: 1px solid var(--rule); display: grid; gap: 11px; flex: 1; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-secondary); }
.plan-features li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--good-ink); }
.plan-features li.is-missing { color: var(--text-muted); }
.plan-features li.is-missing svg { color: var(--text-muted); }

/* ---------- Layout shell ---------- */

.site { min-height: 100vh; background: var(--surface-1); display: flex; flex-direction: column; }
.site-header {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface-1) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--rule);
}
.site-header-inner, .container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.site-header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.site-header .brand { padding: 0; }
.site-links { display: flex; gap: 4px; margin-left: 12px; }
.site-links a { padding: 8px 12px; border-radius: var(--radius); color: var(--text-secondary); font-weight: 500; }
.site-links a:hover { color: var(--ink); background: var(--surface-3); }
.site-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.site-main { flex: 1; width: 100%; }
.site-main:focus { outline: none; }

.section { padding: 88px 0; }
.section-alt { background: var(--page); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--text-secondary); }
.kicker { display: inline-block; margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }

/* ---------- Hero ---------- */

.hero {
    position: relative; overflow: hidden; padding: 80px 0 96px;
    background:
        radial-gradient(60% 70% at 85% 10%, var(--primary-soft) 0%, transparent 70%),
        radial-gradient(40% 50% at 0% 100%, color-mix(in srgb, var(--good-soft) 70%, transparent) 0%, transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; margin-bottom: 22px;
    border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface-1);
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.hero-pill strong { padding: 2px 10px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 12px; font-weight: 600; }
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.hero h1 span { color: var(--primary); }
.hero-lede { margin-top: 22px; font-size: 19px; line-height: 1.6; color: var(--text-secondary); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-actions .btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--text-secondary); font-size: 15px; }
.hero-proof li { display: flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 18px; height: 18px; color: var(--good-ink); }

/* Product preview: a browser window showing the dashboard, plus a receipt */
.preview { position: relative; padding: 0 0 40px 0; }
.browser {
    border: 1px solid var(--rule-strong); border-radius: 14px; background: var(--surface-1); overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(31, 36, 48, 0.45), 0 2px 6px rgba(31, 36, 48, 0.06);
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-3); border-bottom: 1px solid var(--rule); }
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-emphasis); }
.browser-url {
    flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; min-width: 0;
    background: var(--surface-1); font-size: 12.5px; color: var(--text-muted); font-family: var(--font-mono); overflow: hidden; white-space: nowrap;
}
.browser-url svg { width: 12px; height: 12px; color: var(--good-ink); flex: none; }
.browser-url b { color: var(--ink); font-weight: 500; }
.browser-body { padding: 18px; display: grid; gap: 12px; background: var(--page); }
.mock-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mock-tile { padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-1); }
.mock-tile span { display: block; font-size: 11.5px; color: var(--text-muted); }
.mock-tile strong { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mock-tile em { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: var(--good-ink); font-weight: 600; }
.mock-tile em.is-warning { color: var(--warning-ink); }
.mock-tile.is-hero { border-top: 3px solid var(--primary); }
.mock-chart { padding: 14px 14px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface-1); }
.mock-chart-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.mock-chart-head b { color: var(--ink); }
.mock-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 112px; }
.mock-bars span { display: block; border-radius: 5px 5px 2px 2px; background: var(--series-1); opacity: 0.45; transform-origin: bottom; animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.mock-bars span:nth-child(1) { height: 42%; animation-delay: 0.05s; }
.mock-bars span:nth-child(2) { height: 58%; animation-delay: 0.1s; }
.mock-bars span:nth-child(3) { height: 50%; animation-delay: 0.15s; }
.mock-bars span:nth-child(4) { height: 71%; animation-delay: 0.2s; }
.mock-bars span:nth-child(5) { height: 64%; animation-delay: 0.25s; }
.mock-bars span:nth-child(6) { height: 100%; animation-delay: 0.3s; background: var(--primary); opacity: 1; }
.mock-bars span:nth-child(7) { height: 83%; animation-delay: 0.35s; }
.mock-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 6px; font-size: 11px; color: var(--text-muted); text-align: center; }
@keyframes grow { from { transform: scaleY(0.05); } to { transform: scaleY(1); } }

.mock-receipt {
    position: absolute; right: -18px; bottom: 0; width: 210px; padding: 16px 16px 18px;
    background: #fff; color: #1f2430; border: 1px solid #e4e7ec; border-radius: 10px;
    font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55;
    box-shadow: 0 24px 48px -20px rgba(31, 36, 48, 0.5); transform: rotate(2.5deg);
}
.mock-receipt .center { text-align: center; }
.mock-receipt strong { font-size: 12.5px; }
.mock-receipt hr { border: 0; border-top: 1px dashed #b3b9c3; margin: 8px 0; }
.mock-receipt .row { display: flex; justify-content: space-between; gap: 8px; }
.mock-receipt .total { font-weight: 700; font-size: 13px; }
.mock-receipt .paid { margin-top: 8px; text-align: center; color: #1d6b3d; font-weight: 700; letter-spacing: 0.12em; }

/* ---------- "Made for" strip ---------- */

.audience { padding: 36px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--page); }
.audience p { text-align: center; font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 16px; }
.audience ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.audience li {
    display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    background: var(--surface-1); border: 1px solid var(--rule); font-weight: 500; color: var(--text-secondary);
}
.audience li svg { width: 16px; height: 16px; color: var(--primary); }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
    padding: 28px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface-1);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover { border-color: var(--rule-strong); transform: translateY(-2px); box-shadow: 0 18px 36px -28px rgba(31, 36, 48, 0.5); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 18px; }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-secondary); }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 28px; border-radius: 16px; background: var(--surface-1); border: 1px solid var(--rule); }
.steps li::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px;
    border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--text-secondary); }

/* ---------- Spotlight ---------- */

.spotlight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.spotlight h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.025em; }
.spotlight-lede { margin-top: 16px; font-size: 18px; color: var(--text-secondary); }
.checklist { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li svg { width: 22px; height: 22px; flex: none; padding: 3px; border-radius: 50%; background: var(--good-soft); color: var(--good-ink); }
.checklist strong { display: block; color: var(--ink); }
.checklist span { color: var(--text-secondary); }
.spotlight .specimen { margin-top: 0; max-width: none; box-shadow: 0 30px 60px -36px rgba(31, 36, 48, 0.45); }

/* ---------- Pricing ---------- */

.pricing-wrap { max-width: 900px; margin: 0 auto; }
.plan-ribbon {
    position: absolute; top: -13px; left: 28px; padding: 4px 12px; border-radius: 999px;
    background: var(--primary); color: var(--primary-ink); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.pricing-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 28px; color: var(--text-muted); font-size: 14px; }
.pricing-note span { display: flex; align-items: center; gap: 6px; }
.pricing-note svg { width: 16px; height: 16px; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 4px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--text-muted); transition: transform 0.2s ease; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
.faq details p { padding: 0 4px 20px; color: var(--text-secondary); max-width: 680px; }

/* ---------- Closing call to action ---------- */

.cta-band {
    position: relative; overflow: hidden; padding: 56px; border-radius: 24px; text-align: center;
    background: linear-gradient(135deg, #1f2f57 0%, #2a63d4 100%); color: #fff;
}
.cta-band::after {
    content: ""; position: absolute; right: -80px; bottom: -220px; width: 420px; height: 420px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}
.cta-band h2 { position: relative; font-size: 36px; letter-spacing: -0.025em; color: #fff; }
.cta-band p { position: relative; margin: 14px auto 0; max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, 0.85); }
.cta-band .hero-actions { position: relative; z-index: 1; justify-content: center; }
.btn.btn-light { background: #fff; color: #1f2f57; border-color: #fff; }
.btn.btn-light:hover { background: #edf3fd; color: #1f2f57; }
.btn.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); background: var(--page); padding: 56px 0 32px; color: var(--text-secondary); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid .brand { padding: 0; margin-bottom: 12px; }
.footer-grid p { max-width: 360px; }
.footer-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-secondary); }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--text-muted); font-size: 13px; }

/* ---------- Sign-up and sign-in pages ---------- */

.page-hero { padding: 56px 0 8px; }
.page-hero h1 { font-size: 40px; letter-spacing: -0.03em; }
.page-hero p { margin-top: 12px; font-size: 18px; color: var(--text-secondary); max-width: 640px; }
.signup { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; padding: 32px 0 88px; }
.signup-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
.signup-aside h2 { font-size: 17px; margin-bottom: 14px; }
.signup-aside .checklist { margin-top: 0; gap: 12px; font-size: 15px; }
.signup-steps { margin: 0; padding: 0 0 0 20px; display: grid; gap: 10px; color: var(--text-secondary); }
.signup-steps strong { color: var(--ink); }
.form-section-title { font-size: 18px; margin-bottom: 2px; }
.narrow-page { max-width: 480px; margin: 0 auto; padding: 72px 0 96px; }
.narrow-page .card-body { padding: 32px; }
.narrow-page h1 { font-size: 30px; letter-spacing: -0.02em; }
.narrow-page .lede { margin: 8px 0 24px; color: var(--text-secondary); }
.narrow-page .aside-link { margin-top: 20px; text-align: center; color: var(--text-secondary); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .hero h1 { font-size: 46px; }
    .hero-grid, .spotlight { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .preview { max-width: 640px; }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .signup { grid-template-columns: minmax(0, 1fr); }
    .signup-aside { position: static; }
}
@media (max-width: 860px) {
    .site-links { display: none; }
    .section { padding: 64px 0; }
    .section-head h2, .spotlight h2, .cta-band h2 { font-size: 30px; }
    .steps, .pricing { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .mock-receipt { right: 8px; }
}
@media (max-width: 640px) {
    .site-header-inner, .container { padding: 0 16px; }
    .site-actions .btn-ghost { display: none; }
    .hero { padding: 48px 0 64px; }
    .hero h1 { font-size: 36px; }
    .hero-lede { font-size: 17px; }
    .features { grid-template-columns: minmax(0, 1fr); }
    .mock-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mock-tiles .mock-tile:last-child { display: none; }
    .mock-receipt { display: none; }
    .preview { padding-bottom: 0; }
    .cta-band { padding: 40px 22px; border-radius: 18px; }
    .page-hero h1 { font-size: 32px; }
    .narrow-page { padding: 40px 0 64px; }
    .narrow-page .card-body { padding: 22px; }
    .plan-options { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .mock-bars span { animation: none; }
    .feature:hover { transform: none; }
}

.section-cta { padding-top: 0; }

/* Branded app header inside the hero's product preview */
.mock-app-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--surface-1); border-bottom: 1px solid var(--rule); font-size: 13px; }
.mock-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.mock-brand .brand-mark { width: 24px; height: 24px; }
.mock-brand .brand-mark svg { width: 14px; height: 14px; }
.mock-store { color: var(--text-muted); }
.mock-avatar { display: grid; place-items: center; width: 26px; height: 26px; margin-left: auto; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; }
@media (max-width: 640px) { .mock-store { display: none; } }

/* Platform console: a business's sign-in link, ready to copy and send */
.sign-in-link { margin-bottom: 16px; border-left: 4px solid var(--primary); }
.sign-in-link .card-body { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.sign-in-link-text { flex: 1 1 280px; }
.sign-in-link-text h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.sign-in-link-text h2 svg { width: 18px; height: 18px; color: var(--primary); }
.sign-in-link-text p { margin-top: 4px; color: var(--text-secondary); font-size: 14px; }
.copy-field { display: flex; gap: 8px; flex: 1 1 420px; }
.copy-field .input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .copy-field { flex-wrap: wrap; } .copy-field .input { flex-basis: 100%; } }
