/* Design tokens — light by default, dark via prefers-color-scheme */
.dashboard {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e6e8f0;
  --border-strong: #d4d8e3;
  --text: #111827;
  --text-2: #4b5367;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --primary-text: #4338ca;
  --ring: rgb(79 70 229 / .25);
  --success-soft: #e8f7ee; --success: #15803d;
  --danger-soft: #fff1f2; --danger: #be123c; --danger-border: #fecdd6;
  --warning-soft: #fff7e6; --warning: #b45309;
  --info-soft: #e8f2ff; --info: #1d4ed8;
  --neutral-soft: #f1f2f6; --neutral: #4b5367;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow: 0 1px 3px rgb(16 24 40 / .06), 0 1px 2px rgb(16 24 40 / .04);
  --shadow-lg: 0 12px 24px -6px rgb(16 24 40 / .10), 0 4px 8px -4px rgb(16 24 40 / .05);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 248px;

  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
@media (prefers-color-scheme: dark) {
  .dashboard {
    --bg: #0b0d14; --surface: #131722; --surface-2: #181d2a; --border: #242a3a; --border-strong: #323a4e;
    --text: #eef0f6; --text-2: #b7bdcc; --muted: #8a92a6;
    --primary: #6d64f5; --primary-hover: #7f77ff; --primary-soft: #1f1d3d; --primary-text: #a9a3ff; --ring: rgb(109 100 245 / .35);
    --success-soft: #0f2a1c; --success: #4ade80; --danger-soft: #2d1219; --danger: #fb7185; --danger-border: #4c1d2a;
    --warning-soft: #2c1f0b; --warning: #fbbf24; --info-soft: #0f1d38; --info: #7aa7ff; --neutral-soft: #1d2230; --neutral: #b7bdcc;
    --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / .02); --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
.dashboard * { box-sizing: border-box; }
.dashboard a { color: var(--primary-text); text-decoration: none; }
.dashboard a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dashboard .icon { flex-shrink: 0; }

/* Sidebar */
.dashboard-sidebar { width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 22px 14px; background: var(--surface); border-right: 1px solid var(--border); z-index: 10; }
.dashboard-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-size: 17px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.dashboard-sidebar .brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #fff; font-size: 15px; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 4px 10px -2px rgb(99 102 241 / .5); }
.dashboard-sidebar nav { display: grid; gap: 2px; }
.dashboard-sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.dashboard-sidebar nav a .icon { color: var(--muted); transition: color .15s; }
.dashboard-sidebar nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dashboard-sidebar nav a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.dashboard-sidebar nav a.active .icon, .dashboard-sidebar nav a:hover .icon { color: var(--primary-text); }
.sidebar-vendor { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.sidebar-vendor div { display: grid; min-width: 0; }
.sidebar-vendor strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-vendor span:not(.avatar) { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; font-weight: 600; font-size: 14px; color: var(--primary-text); background: var(--primary-soft); }
.avatar.small { width: 30px; height: 30px; font-size: 13px; }

/* Header */
.dashboard-main { margin-left: var(--sidebar-w); min-width: 0; }
.dashboard-header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 36px; min-height: 64px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.header-title { color: var(--muted); font-size: 14px; font-weight: 500; }
.header-user { display: flex; align-items: center; gap: 10px; }
.header-email { color: var(--text-2); font-size: 14px; }
.dashboard-content { padding: 32px 36px 48px; max-width: 1400px; margin: 0 auto; }

/* Typography */
.dashboard h1 { font-size: 26px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; margin: 0 0 4px; }
.dashboard h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; margin: 0 0 16px; }
.dashboard p { margin: 0 0 16px; }
.dashboard .muted { color: var(--muted); }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-header p { margin: 0; }
.page-header h1 + .badge { margin-top: 6px; }

/* Surfaces */
.panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.panel.table-wrap { padding: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-header h2 { margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.dashboard .link-arrow:hover { text-decoration: none; gap: 9px; }

/* Buttons */
.dashboard .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dashboard td .actions { gap: 14px; flex-wrap: nowrap; white-space: nowrap; }
.dashboard form .actions > a, .dashboard .filters > a { padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; }
.dashboard form .actions > a:hover, .dashboard .filters > a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dashboard .table-wrap + .button { margin-top: 14px; }
.dashboard .button, .dashboard input[type=submit], .dashboard .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; background: var(--primary); color: #fff; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / .12); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.dashboard .button:hover, .dashboard input[type=submit]:hover { background: var(--primary-hover); text-decoration: none; }
.dashboard .button:active, .dashboard input[type=submit]:active { transform: translateY(1px); }
.dashboard .button.secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.dashboard .button.secondary:hover { background: var(--surface-2); }
.dashboard .button.ghost { background: transparent; border-color: transparent; color: var(--text-2); box-shadow: none; padding: 7px 10px; }
.dashboard .button.ghost:hover { background: var(--surface-2); color: var(--text); }
.dashboard .button.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); box-shadow: none; }
.dashboard .button.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.dashboard td .button.danger { padding: 5px 11px; font-size: 13px; }
.dashboard .button_to { margin: 0; display: inline; }
.dashboard :focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

/* Forms */
.dashboard .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px 20px; margin-bottom: 22px; }
.dashboard label { display: block; margin: 0 0 6px; font-weight: 500; font-size: 13px; color: var(--text-2); }
.dashboard input:not([type=checkbox]):not([type=submit]):not([type=hidden]):not([type=file]), .dashboard select, .dashboard textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); padding: 9px 12px; color: var(--text); font: inherit; font-size: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.dashboard select[multiple] { padding: 6px; }
.dashboard input:focus, .dashboard select:focus, .dashboard textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.dashboard input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: -3px; margin-right: 6px; }
.dashboard input[type=file] { font: inherit; font-size: 14px; color: var(--text-2); }
.dashboard input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.dashboard .field { margin-bottom: 20px; }
.dashboard .filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.dashboard .filters > div { flex: 1; min-width: 180px; }
.dashboard form.panel .filters { margin-bottom: 16px; }
.dashboard .nested-form-wrapper { border: 1px dashed var(--border-strong); background: var(--surface-2); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.dashboard tr.nested-form-wrapper { border: 0; padding: 0; background: none; }

/* Tables */
.dashboard .table-wrap { overflow-x: auto; }
.dashboard table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 14px; }
.dashboard th { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); white-space: nowrap; }
.dashboard td, .dashboard th { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dashboard tbody tr:last-child td { border-bottom: 0; }
.dashboard tbody tr { transition: background .12s; }
.dashboard tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.dashboard .panel.table-wrap th:first-child { border-top-left-radius: var(--radius); }
.dashboard .panel.table-wrap th:last-child { border-top-right-radius: var(--radius); }
.dashboard td.number, .dashboard th.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard td:first-child > a:first-child { white-space: nowrap; }
.dashboard td .muted { font-size: 12.5px; margin-top: 2px; }
.dashboard td > a:first-child { font-weight: 500; }
.dashboard .empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.dashboard tbody tr:hover td.empty { background: none; }
.dashboard .panel:not(.table-wrap) > .table-wrap { margin: 0 -24px; }
.dashboard .panel:not(.table-wrap) > .table-wrap:last-child { margin-bottom: -24px; }
.dashboard .panel:not(.table-wrap) > .table-wrap th:first-child, .dashboard .panel:not(.table-wrap) > .table-wrap td:first-child { padding-left: 24px; }
.dashboard .panel:not(.table-wrap) > .table-wrap th:last-child, .dashboard .panel:not(.table-wrap) > .table-wrap td:last-child { padding-right: 24px; }

/* Alerts & badges */
.dashboard .flash, .dashboard .errors { display: block; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; font-weight: 500; background: var(--success-soft); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 20%, transparent); }
.dashboard .alert, .dashboard .errors { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.dashboard .errors ul { margin: 8px 0 0; padding-left: 20px; font-weight: 400; }
.dashboard .badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dashboard .badge[class*=status-]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dashboard .badge.status-draft { background: var(--neutral-soft); color: var(--neutral); }
.dashboard .badge.status-issued { background: var(--info-soft); color: var(--info); }
.dashboard .badge.status-paid { background: var(--success-soft); color: var(--success); }
.dashboard .badge.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.dashboard .badge.status-pending { background: var(--warning-soft); color: var(--warning); }
.dashboard .badge.status-confirmed, .dashboard .badge.status-shipped { background: var(--info-soft); color: var(--info); }
.dashboard .badge.status-completed { background: var(--success-soft); color: var(--success); }
.dashboard .badge.status-active { background: var(--success-soft); color: var(--success); }
.dashboard .badge.status-failing { background: var(--warning-soft); color: var(--warning); }
.dashboard .badge.status-overdue { background: var(--warning-soft); color: var(--warning); }
.dashboard .badge.status-rejected, .dashboard .badge.status-suspended { background: var(--danger-soft); color: var(--danger); }
.dashboard-sidebar nav a .badge { margin-left: auto; }
.dashboard .badge.status-failed { background: var(--danger-soft); color: var(--danger); }

/* Dashboard overview */
.dashboard .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dashboard .stat-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon label" "value value"; align-items: center; gap: 14px 12px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.dashboard .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); text-decoration: none; }
.dashboard .stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--tone-soft); opacity: .6; }
.dashboard .stat-card > * { position: relative; z-index: 1; }
.stat-icon { grid-area: icon; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--tone, var(--primary-text)); background: var(--tone-soft, var(--primary-soft)); position: relative; z-index: 1; }
.stat-label { grid-area: label; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.dashboard .stat { grid-area: value; font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.tone-indigo { --tone: #4f46e5; --tone-soft: #eef0ff; }
.tone-sky { --tone: #0284c7; --tone-soft: #e6f5fd; }
.tone-emerald { --tone: #059669; --tone-soft: #e6f8f1; }
.tone-amber { --tone: #d97706; --tone-soft: #fff5e1; }
@media (prefers-color-scheme: dark) {
  .tone-indigo { --tone: #a5a0ff; --tone-soft: #1f1d3d; }
  .tone-sky { --tone: #7dd3fc; --tone-soft: #0c2533; }
  .tone-emerald { --tone: #6ee7b7; --tone-soft: #0b2a20; }
  .tone-amber { --tone: #fcd34d; --tone-soft: #2e2208; }
}
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.dashboard-grid .panel { margin-bottom: 0; }
.quick-actions { display: grid; gap: 8px; }
.dashboard .quick-action { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: 14px; transition: border-color .15s, background .15s; }
.dashboard .quick-action:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.quick-action .stat-icon { width: 32px; height: 32px; border-radius: 8px; }
.quick-action .chevron { margin-left: auto; color: var(--muted); }

/* Store editor */
.dashboard .panel-header p { margin: 4px 0 0; font-size: 14px; }
.dashboard .panel-header + .block-list, .dashboard .panel-header + .block-empty { margin-top: 16px; }
.block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.block-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.block-item.inactive { opacity: .6; }
.block-thumb { display: grid; place-items: center; width: 56px; height: 42px; flex-shrink: 0; overflow: hidden; border-radius: 7px; background: var(--surface-2); color: var(--muted); }
.block-thumb img { width: 100%; height: 100%; object-fit: cover; }
.block-text { display: grid; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.block-text strong, .block-text span.muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-text .badge { justify-self: start; }
.dashboard .block-item .actions { flex-wrap: nowrap; gap: 6px; }
.dashboard .button.icon-only { padding: 6px; }
.dashboard .button.icon-only:disabled { opacity: .3; cursor: default; }
.rotate-up, .rotate-down { display: inline-flex; }
.rotate-up { transform: rotate(-90deg); }
.rotate-down { transform: rotate(90deg); }
.block-empty { margin: 0; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; text-align: center; }
.block-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.block-preview img { width: 120px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.block-preview label { margin: 0; font-weight: 400; }
.dashboard .hint { margin: 6px 0 0; font-size: 13px; }
.dashboard label > input[type=checkbox] { margin-right: 8px; }

/* Documents */
.dashboard .dns-records code { font-size: 13px; word-break: break-all; }
.dashboard .invoice-lines .autocomplete { position: relative; min-width: 220px; }
.dashboard .autocomplete-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.dashboard .autocomplete-results:empty { display: none; }
.dashboard .autocomplete-results [role=option] { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.dashboard .autocomplete-results [role=option]:hover, .dashboard .autocomplete-results [role=option].active { background: var(--primary-soft); color: var(--primary-text); }
/* Let the product dropdown escape the table; narrow screens keep the horizontal scroll. */
@media (min-width: 801px) { .dashboard .table-wrap:has(.invoice-lines) { overflow: visible; } }
.dashboard .invoice-lines input[type=number] { min-width: 100px; }
.dashboard .totals { margin: 24px 0 24px auto; max-width: 340px; font-variant-numeric: tabular-nums; }
.dashboard .totals div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.dashboard .totals div span:first-child { color: var(--muted); }
.dashboard .totals .grand-total { border-bottom: 0; font-weight: 700; font-size: 20px; letter-spacing: -.3px; }
.dashboard .totals .grand-total span:first-child { color: var(--text); }
.dashboard .product-image { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 16px; }

/* Auth */
.dashboard.auth-page main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, var(--primary-soft), transparent 70%), var(--bg); }
.dashboard .auth-panel { width: 100%; max-width: 420px; padding: 36px; box-shadow: var(--shadow-lg); }
.dashboard .auth-panel h1 { margin-bottom: 6px; }
.dashboard .auth-panel input[type=submit] { width: 100%; }
.dashboard .auth-panel .actions { flex-direction: column; align-items: stretch; text-align: center; font-size: 14px; }

/* Onboarding */
.onboarding-page { background: radial-gradient(1200px 600px at 50% -10%, var(--primary-soft), transparent 70%), var(--bg); }
.onboarding-main { max-width: 560px; margin: 0 auto; padding: 40px 16px 64px; }
.onboarding-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 28px; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.onboarding-steps { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 0 0 20px; padding: 0; flex-wrap: wrap; }
.onboarding-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); }
.onboarding-steps li.current { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.onboarding-steps li.done { color: var(--success); }
.step-dot { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--muted); }
.current > .step-dot { background: var(--primary); color: #fff; }
.done > .step-dot { background: var(--success-soft); color: var(--success); }
.dashboard .onboarding-panel { padding: 32px; box-shadow: var(--shadow-lg); }
.dashboard .onboarding-panel h1 { margin-bottom: 6px; }
.dashboard .onboarding-panel > p.muted:first-of-type, .dashboard .onboarding-panel h1 + p.muted { margin-bottom: 24px; }
.dashboard .button.block, .dashboard input[type=submit].block { width: 100%; margin-top: 8px; padding: 11px 16px; }
.onboarding-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.input-suffix { display: flex; align-items: stretch; }
.dashboard .input-suffix input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-suffix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-size: 14px; white-space: nowrap; }
.terms-box { max-height: 320px; overflow-y: auto; margin-bottom: 20px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.dashboard .terms-box h2 { font-size: 16px; margin: 0 0 8px; }
.dashboard .terms-box h3 { font-size: 14px; margin: 16px 0 4px; color: var(--text); }
.dashboard .terms-box p { margin: 0 0 8px; }
.dashboard .checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text); }
.dashboard .checkbox-row input[type=checkbox] { margin: 2px 0 0; }
.logo-preview { width: auto !important; max-width: 160px; height: 64px !important; object-fit: contain !important; padding: 6px; background: #fff; }
.sidebar-vendor .avatar.logo { object-fit: contain; background: #fff; padding: 3px; border: 1px solid var(--border); }
.sidebar-settings { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; flex-shrink: 0; border-radius: 8px; color: var(--muted); }
.dashboard .sidebar-settings:hover { background: var(--surface); color: var(--text); }

/* Unlock checklist */
.checklist-header { display: flex; align-items: center; gap: 14px; }
.checklist-header > div { flex: 1; min-width: 0; }
.dashboard .checklist-header h2 { margin: 0; }
.dashboard .checklist-header p { margin: 2px 0 0; font-size: 14px; }
.checklist .stat-icon { width: 42px; height: 42px; }
.progress { height: 6px; margin: 20px 0 8px; border-radius: 999px; background: var(--neutral-soft); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8b5cf6); transition: width .4s; }
.checklist-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.checklist-steps li { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-sm); }
.checklist-steps li.current { background: var(--primary-soft); }
.checklist-steps li.done .step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.step-body { flex: 1; min-width: 0; }
.dashboard .step-body p { margin: 0; font-size: 14px; }
.dashboard .step-title { font-weight: 600; color: var(--text); }
.step-title .badge { margin-left: 6px; vertical-align: 1px; }
.dashboard .step-progress { margin-top: 4px !important; color: var(--text-2); }
.storefront-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 14px; font-weight: 500; border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent); }
.dashboard .storefront-banner a { margin-left: auto; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 800px) { .checklist-steps li { flex-wrap: wrap; } .checklist-steps li .button { margin-left: 38px; } .checklist-header { flex-wrap: wrap; } }

/* Utilities */
.dashboard [hidden] { display: none !important; }
.dashboard .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; }

/* Responsive */
@media (max-width: 1100px) { .dashboard-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .dashboard-sidebar { position: sticky; top: 0; width: auto; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .dashboard-sidebar .brand { padding: 0 6px 0 2px; }
  .dashboard-sidebar .brand span:last-child, .sidebar-vendor { display: none; }
  .dashboard-sidebar nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .dashboard-sidebar nav a { padding: 7px 10px; white-space: nowrap; }
  .dashboard-main { margin-left: 0; }
  .dashboard-header { position: static; padding: 10px 16px; min-height: 0; }
  .header-email { display: none; }
  .dashboard-content { padding: 20px 16px 36px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .panel, .card { padding: 18px; }
  .dashboard .panel:not(.table-wrap) > .table-wrap { margin: 0 -18px; }
  .dashboard .panel:not(.table-wrap) > .table-wrap:last-child { margin-bottom: -18px; }
}

/* Print */
@media print {
  .dashboard { --bg: #fff; --surface: #fff; background: #fff; color: #000; }
  .dashboard-sidebar, .dashboard-header, .no-print, .flash { display: none !important; }
  .dashboard-main { margin: 0; }
  .dashboard-content { padding: 0; }
  .panel { border: 0; box-shadow: none; }
}
