:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --surface: #ffffff;
  --border: #d4dde3;
  --border-soft: #e8edf1;
  --text: #1c252c;
  --text-2: #4d6575;
  --text-3: #6b7f8c;
  --primary: #1c5ae5;
  --primary-dark: #0d3fb0;
  --primary-soft: #dbe8fb;
  --danger: #c92a2a;
  --danger-soft: #fde8e8;
  --success: #0b7a32;
  --success-soft: #dff5e6;
  --warning: #9a5b00;
  --warning-soft: #fff1d6;
  --topbar: #eef6fd;
  --qa-1: #e3f9ef; --qa-2: #dcf0fd; --qa-3: #f0e6fb; --qa-4: #fdeadb;
  --series-1: #008300; --series-2: #2a78d6; --series-3: #eb6834;
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100;
  --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #6250d6; --cat-8: #e34948;
  --grid: #e6eaee;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(16, 32, 48, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12171c; --bg-soft: #182027; --surface: #1a2229; --border: #33414c; --border-soft: #26313a;
    --text: #e9eef2; --text-2: #b4c3cd; --text-3: #8fa1ad;
    --primary: #6d9bf5; --primary-dark: #9dbcf8; --primary-soft: #1f3256;
    --danger: #f08080; --danger-soft: #3d1f22; --success: #6fd394; --success-soft: #173325;
    --warning: #f2bf5e; --warning-soft: #3a2c12; --topbar: #16202a;
    --qa-1: #173329; --qa-2: #172b3a; --qa-3: #2a2238; --qa-4: #3a2a1d;
    --series-1: #1f9a1f; --series-2: #3987e5; --series-3: #d95926;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
    --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767;
    --grid: #2b3640; --shadow: 0 8px 28px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12171c; --bg-soft: #182027; --surface: #1a2229; --border: #33414c; --border-soft: #26313a;
  --text: #e9eef2; --text-2: #b4c3cd; --text-3: #8fa1ad;
  --primary: #6d9bf5; --primary-dark: #9dbcf8; --primary-soft: #1f3256;
  --danger: #f08080; --danger-soft: #3d1f22; --success: #6fd394; --success-soft: #173325;
  --warning: #f2bf5e; --warning-soft: #3a2c12; --topbar: #16202a;
  --qa-1: #173329; --qa-2: #172b3a; --qa-3: #2a2238; --qa-4: #3a2a1d;
  --series-1: #1f9a1f; --series-2: #3987e5; --series-3: #d95926;
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500;
  --cat-5: #d55181; --cat-6: #008300; --cat-7: #9085e9; --cat-8: #e66767;
  --grid: #2b3640; --shadow: 0 8px 28px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1.page-title { font: 400 34px/1.2 var(--serif); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 58px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--topbar); border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.topbar .spacer { flex: 1; }
.biz { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; background: var(--primary-soft); font-weight: 600; font-size: 14px; }
.menu-toggle { display: none; }
.sidebar { border-right: 1px solid var(--border-soft); padding: 12px 8px; position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto; }
.sidebar a, .sidebar button.navgroup { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left; }
.sidebar a:hover, .sidebar button.navgroup:hover { background: var(--bg-soft); text-decoration: none; }
.sidebar a.active { background: var(--primary-soft); font-weight: 600; }
.sidebar .sub a { padding: 7px 12px 7px 42px; font-size: 14px; color: var(--text-2); }
.sidebar .sub a.active { color: var(--text); }
.sidebar svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.sidebar .create { color: var(--primary); font-weight: 600; }
.sidebar hr { border: 0; border-top: 1px solid var(--border-soft); margin: 10px 4px; }
main { padding: 28px 40px 60px; min-width: 0; max-width: 1400px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 58px; width: 260px; background: var(--bg); z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .shell.nav-open .sidebar { transform: none; }
  .menu-toggle { display: inline-flex; }
  main { padding: 20px 16px 60px; }
  .biz .plan { display: none; }
}

/* ---------- common ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--primary); background: var(--surface); color: var(--primary); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--primary-soft); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
:root[data-theme="dark"] .btn.primary { color: #0b1420; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0b1420; } }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: 22px; }
.card .sub-h { font-size: 12px; color: var(--text-3); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--border-soft); white-space: nowrap; }
.badge.paid { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.overdue { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.partial, .badge.unsent, .badge.saved { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.sent, .badge.accepted, .badge.converted, .badge.unpaid { background: var(--primary-soft); color: var(--primary-dark); border-color: transparent; }
.badge.void { text-decoration: line-through; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); white-space: nowrap; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--bg-soft); }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--border); background: var(--bg-soft); }
.empty { padding: 40px; text-align: center; color: var(--text-3); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); min-height: 40px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; }
.span-2 { grid-column: span 2; }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filters .field { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { font-weight: 400; color: var(--text-3); }

/* ---------- dashboard ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 22px; }
.quick a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; }
.quick a:nth-child(1) { background: var(--qa-1); } .quick a:nth-child(2) { background: var(--qa-2); }
.quick a:nth-child(3) { background: var(--qa-3); } .quick a:nth-child(4) { background: var(--qa-4); }
.quick svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .quick { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 22px; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; gap: 24px; } }
.list-box { border: 1px solid var(--border); border-radius: var(--radius); }
.list-box > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.list-box > *:last-child { border-bottom: 0; }
.list-box a:hover { background: var(--bg-soft); }
.list-box .amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.overdue-text { color: var(--danger); font-size: 14px; }
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; font-weight: 700; font-size: 17px; }
.chart-box { position: relative; height: 300px; }
.legend { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; }
.aging { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .aging { grid-template-columns: 1fr; } }
.aging table { width: 100%; border-collapse: collapse; font-size: 15px; }
.aging th { text-align: left; padding: 8px; border-bottom: 2px solid var(--border); font-weight: 700; }
.aging td { padding: 9px 8px; border-bottom: 1px solid var(--border); }
.aging td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); }
.stat .k { font-size: 13px; color: var(--text-2); }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .v.danger { color: var(--danger); }

/* ---------- document editor ---------- */
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.doc-card > section { padding: 22px 24px; border-bottom: 1px solid var(--border); }
.doc-card > section:last-child { border-bottom: 0; }
.items { width: 100%; border-collapse: collapse; }
.items th { text-align: left; font-size: 13px; color: var(--text-2); padding: 8px 6px; border-bottom: 1px solid var(--border); }
.items td { padding: 8px 6px; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
.items .c-qty { width: 90px; } .items .c-price { width: 130px; } .items .c-tax { width: 140px; } .items .c-acct { width: 200px; } .items .c-amt { width: 120px; text-align: right; } .items .c-del { width: 40px; }
.items td.c-amt { padding-top: 17px; font-variant-numeric: tabular-nums; }
.items textarea { min-height: 40px; height: 40px; margin-top: 6px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text-3); border-radius: 6px; }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.totals { margin-left: auto; width: 320px; max-width: 100%; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-weight: 700; font-size: 18px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
@media (max-width: 800px) {
  .items thead { display: none; }
  .items tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .items td { border: 0; padding: 0; }
  .items td.c-item { grid-column: 1 / -1; }
  .items .c-qty, .items .c-price, .items .c-tax, .items .c-acct, .items .c-amt, .items .c-del { width: auto; }
}

/* ---------- invoice preview (also print) ---------- */
.invoice-sheet { background: #fff; color: #1c252c; border: 1px solid var(--border); border-radius: var(--radius); padding: 48px; max-width: 860px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.invoice-sheet .top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.invoice-sheet h1 { font: 300 36px/1 var(--font); letter-spacing: .5px; text-transform: uppercase; }
.invoice-sheet .biz-name { font-weight: 700; font-size: 18px; }
.invoice-sheet .meta { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid #d4dde3; border-bottom: 1px solid #d4dde3; margin-bottom: 24px; }
.invoice-sheet .meta dl { display: grid; grid-template-columns: auto auto; gap: 4px 16px; margin: 0; }
.invoice-sheet .meta dt { font-weight: 700; text-align: right; }
.invoice-sheet .meta dd { margin: 0; }
.invoice-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.invoice-sheet th { background: var(--accent, #1c5ae5); color: #fff; padding: 9px 12px; text-align: left; font-size: 14px; }
.invoice-sheet td { padding: 12px; border-bottom: 1px solid #e8edf1; vertical-align: top; }
.invoice-sheet .num { text-align: right; white-space: nowrap; }
.invoice-sheet .item-desc { color: #4d6575; font-size: 13px; white-space: pre-wrap; }
.invoice-sheet .sum { margin-left: auto; width: 320px; max-width: 100%; }
.invoice-sheet .sum div { display: flex; justify-content: space-between; padding: 5px 0; }
.invoice-sheet .sum .due { font-weight: 700; font-size: 17px; border-top: 1px solid #d4dde3; padding-top: 10px; margin-top: 6px; }
.invoice-sheet .notes { margin-top: 32px; white-space: pre-wrap; font-size: 14px; }
.invoice-sheet .footer { margin-top: 32px; text-align: center; color: #4d6575; font-size: 13px; white-space: pre-wrap; }
.invoice-sheet .logo { max-height: 96px; max-width: 260px; }
.invoice-sheet .sum .due { border-top-color: var(--accent, #d4dde3); }
.invoice-sheet .top { border-bottom: 3px solid var(--accent, #1c5ae5); padding-bottom: 20px; }
.invoice-sheet .top + .meta { border-top: 0; }
.status-strip { display: flex; gap: 28px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; background: var(--surface); }
.status-strip .k { font-size: 13px; color: var(--text-2); }
.status-strip .v { font-weight: 700; font-size: 17px; }
@media (max-width: 700px) { .invoice-sheet { padding: 22px; } .invoice-sheet .top, .invoice-sheet .meta { flex-direction: column; } .invoice-sheet .meta dt { text-align: left; } }

/* ---------- reports ---------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.report-grid a { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); text-decoration: none; }
.report-grid a:hover { border-color: var(--primary); }
.report-grid a strong { display: block; color: var(--primary); margin-bottom: 4px; }
.report-grid h3 { grid-column: 1 / -1; font-size: 17px; margin-top: 12px; }
table.report { width: 100%; border-collapse: collapse; font-size: 15px; }
table.report td, table.report th { padding: 9px 14px; border-bottom: 1px solid var(--border-soft); }
table.report th { text-align: left; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
table.report .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.report tr.group td { font-weight: 700; background: var(--bg-soft); }
table.report tr.total td { font-weight: 700; border-top: 2px solid var(--border); }
table.report tr.grand td { font-weight: 700; font-size: 17px; border-top: 2px solid var(--text); background: var(--primary-soft); }
table.report td.indent { padding-left: 32px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 22, 32, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); width: 100%; max-width: 560px; }
.modal.wide { max-width: 860px; }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal header h2 { font-size: 19px; }
.modal .body { padding: 20px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; }
#toast div { background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 8px; margin-top: 8px; box-shadow: var(--shadow); font-weight: 600; }
#toast div.error { background: var(--danger); color: #fff; }
.dropdown { position: relative; display: inline-block; }
.dropdown .menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); min-width: 200px; padding: 6px; z-index: 50; display: none; }
.dropdown.open .menu { display: block; }
.dropdown .menu a, .dropdown .menu button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 6px; background: none; border: 0; cursor: pointer; color: var(--text); font-size: 14px; }
.dropdown .menu a:hover, .dropdown .menu button:hover { background: var(--bg-soft); text-decoration: none; }
.dropdown .menu .danger { color: var(--danger); }
.login { max-width: 360px; margin: 14vh auto; padding: 0 16px; }
.alert { padding: 12px 16px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); margin-bottom: 16px; font-size: 14px; }
.alert.info { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .topbar, .sidebar, .page-head, .no-print, #toast, .status-strip { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .invoice-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .invoice-sheet th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .table-wrap { border: 0; }
}

/* ---------- v0.1 additions ---------- */
.sidebar .navgroup .chev { margin-left: auto; font-size: 12px; color: var(--text-3); transition: transform .15s; }
.sidebar .navgroup[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.sidebar { display: flex; flex-direction: column; }
.nav-foot { margin-top: auto; padding: 16px 12px 4px; }
button.biz { border: 0; cursor: pointer; color: var(--text); }
.cust-panel { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--bg-soft); font-size: 14px; }
.cust-panel .row { gap: 6px 16px; }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.settings-nav a { padding: 9px 12px; border-radius: 8px; color: var(--text); }
.settings-nav a.active { background: var(--primary-soft); font-weight: 600; text-decoration: none; }
@media (max-width: 860px) { .settings-layout { grid-template-columns: 1fr; } .settings-nav { position: static; flex-direction: row; overflow-x: auto; } }
.copy-box { display: flex; gap: 8px; margin-top: 10px; }
.copy-box input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.match-hint { font-size: 12px; color: var(--success); font-weight: 600; }

/* ---------- v0.2: customer-facing pages, changelog ---------- */
body.public { background: var(--bg-soft); }
.public-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }
.public-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.public-bar .row { gap: 14px; }
.alert.success { background: var(--success-soft); color: var(--success); }
@media print { .public-bar, #banner { display: none !important; } body.public { background: #fff; } .public-wrap { padding: 0; max-width: none; } }
.changelog-entry li { line-height: 1.5; }
