/* Santex admin web app. One stylesheet, no build step. Light and dark, phone to desktop. */
:root {
  --bg: #F5F7FA; --surface: #FFFFFF; --sunken: #F0F3F7; --line: #E5E9F0; --line-strong: #D3D9E3;
  --text: #0F172A; --muted: #5B6576; --faint: #8A93A3;
  --brand: #0E6B47; --brand-2: #2C7E5E; --brand-soft: #E8F3EE;
  --success: #0E7A4F; --success-soft: #E6F4EC; --warn: #9A5B0B; --warn-soft: #FDF3E3;
  --danger: #B42318; --danger-soft: #FDECEA; --info: #1D5FBF; --info-soft: #E8F0FC;
  --purple: #6B3FB5; --purple-soft: #F1EBFB; --teal: #0F766E; --teal-soft: #E3F4F2; --amber: #A15C07; --amber-soft: #FDF1DE;
  --on-brand: #FFFFFF; --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.18);
  --sidebar: 248px; --top: 64px;
  --hero-from: #0B5E3E; --hero-to: #18A06C; --brand-rgb: 14, 107, 71;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #0B0E14; --surface: #141922; --sunken: #10141B; --line: #232A35; --line-strong: #303846;
    --text: #EEF1F6; --muted: #A1AAB8; --faint: #6E7786;
    --brand: #34B37F; --brand-2: #52BE92; --brand-soft: #13291F; --brand-rgb: 52, 179, 127;
    --success: #43C28C; --success-soft: #11261D; --warn: #F0B062; --warn-soft: #2A2112;
    --danger: #F2837A; --danger-soft: #2C1715; --info: #7DB0F5; --info-soft: #14223A;
    --purple: #B596F0; --purple-soft: #221A33; --teal: #4FC7BB; --teal-soft: #102624; --amber: #F2B35E; --amber-soft: #2A2010;
    --on-brand: #0B0E14; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  }
}
:root[data-theme=dark] {
  --bg: #0B0E14; --surface: #141922; --sunken: #10141B; --line: #232A35; --line-strong: #303846;
    --text: #EEF1F6; --muted: #A1AAB8; --faint: #6E7786;
    --brand: #34B37F; --brand-2: #52BE92; --brand-soft: #13291F; --brand-rgb: 52, 179, 127;
    --success: #43C28C; --success-soft: #11261D; --warn: #F0B062; --warn-soft: #2A2112;
    --danger: #F2837A; --danger-soft: #2C1715; --info: #7DB0F5; --info-soft: #14223A;
    --purple: #B596F0; --purple-soft: #221A33; --teal: #4FC7BB; --teal-soft: #102624; --amber: #F2B35E; --amber-soft: #2A2010;
    --on-brand: #0B0E14; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}
:root { color-scheme: light dark; } :root[data-theme=light] { color-scheme: light; } :root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.danger-text { color: var(--danger); } .success-text { color: var(--success); }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--top); padding: 0 20px; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a, .nav .soon { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 550; }
.nav a:hover { background: var(--sunken); color: var(--text); }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.nav .soon { opacity: .55; cursor: default; user-select: none; }
.nav .soon em { margin-left: auto; font-style: normal; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 7px; }
.nav .count { margin-left: auto; background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.nav-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 14px 12px 6px; }
.side-foot { border-top: 1px solid var(--line); padding: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.me .avatar { display: grid; place-items: center; line-height: 1; font-size: 13px; color: var(--brand); }
.me b { display: block; font-size: 14px; } .me div > span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.main { margin-left: var(--sidebar); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .mobile-brand { display: none; }
.scope { display: flex; align-items: center; gap: 8px; }
.scope select, .ws select { appearance: none; -webkit-appearance: none; border: 1px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238A93A3' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text); border-radius: 10px; padding: 8px 32px 8px 12px; font: inherit; font-weight: 600; max-width: 260px; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--muted); border: 0; background: none; cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.content { max-width: 1180px; margin: 0 auto; padding: 28px 28px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.crumb:hover { color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bottom-nav { display: none; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.section-label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 8px 0 -4px; }

.hero { border-radius: 18px; padding: 24px; color: #fff; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero.danger { background: linear-gradient(135deg, #8F1D14, #C2412D); } .hero.blue { background: linear-gradient(135deg, #10407F, #2E73C9); }
.hero.green { background: linear-gradient(135deg, #0B5E3E, #13895A); } .hero.amber { background: linear-gradient(135deg, #7A4206, #B8700F); }
.hero .lbl { font-size: 13px; opacity: .78; }
.hero .big { font-size: 34px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0; }
.hero .sub { font-size: 13px; opacity: .78; }
.hero .bar { height: 6px; background: rgba(255,255,255,.22); border-radius: 99px; margin: 14px 0 12px; overflow: hidden; }
.hero .bar i { display: block; height: 100%; background: #fff; border-radius: inherit; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 13px; font-weight: 600; color: #fff; }
.hchip.alert { background: #fff; color: #B42318; }
a.hchip:hover { background: rgba(255,255,255,.26); } a.hchip.alert:hover { background: #fff; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stat { padding: 16px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); }
.stat b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }

/* Rows (lists) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.rows > :last-child, .rows > :last-child .row { border-bottom: 0; }
a.row:hover, button.row:hover { background: var(--sunken); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row .chev { color: var(--faint); }
.amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; background: var(--brand-soft); color: var(--brand); }
.avatar.sq { border-radius: 10px; }
.avatar.t1 { background: var(--purple-soft); color: var(--purple); } .avatar.t2 { background: var(--teal-soft); color: var(--teal); }
.avatar.t3 { background: var(--amber-soft); color: var(--amber); } .avatar.t4 { background: var(--info-soft); color: var(--info); }
.icon-tile { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.tone-brand { background: var(--brand-soft); color: var(--brand); } .tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-teal { background: var(--teal-soft); color: var(--teal); } .tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-info { background: var(--info-soft); color: var(--info); } .tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-success { background: var(--success-soft); color: var(--success); } .tone-danger { background: var(--danger-soft); color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge.success { background: var(--success-soft); color: var(--success); } .badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: var(--sunken); color: var(--muted); } .badge.accent { background: var(--brand-soft); color: var(--brand); }
.dotc { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* Accounts tiles */
.acct { padding: 16px 18px; }
.acct .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.acct b { display: block; font-size: 19px; margin-top: 4px; }

/* Tabs & pills */
.tabs { display: inline-flex; padding: 4px; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; overflow-x: auto; }
.tabs a, .tabs label { padding: 7px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.tabs a.on, .tabs input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs input { display: none; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pills a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pills a.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 38px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font: inherit;
  font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: var(--on-brand); } .btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); } .btn-ghost:hover { background: var(--sunken); }
.btn-danger { background: var(--surface); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); } .btn-danger:hover { background: var(--danger-soft); }
.btn-link { background: none; color: var(--brand); padding: 0 6px; height: auto; } .btn-link:hover { text-decoration: underline; }
.btn-block { width: 100%; } .btn-lg { height: 46px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); font-weight: 550; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; min-height: 42px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.has-err input, .has-err select, .has-err textarea { border-color: var(--danger); }
input[type=file] { font: inherit; font-size: 14px; width: 100%; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--sunken); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check b { display: block; font-weight: 600; } .check span { font-size: 13px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { font-size: 15px; margin-bottom: 14px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 var(--radius) var(--radius); }

/* Notices & flash */
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--info-soft); color: var(--info); }
.notice.danger { background: var(--danger-soft); color: var(--danger); } .notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.success { background: var(--success-soft); color: var(--success); }
.flash-wrap { position: fixed; top: 76px; right: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 550; font-size: 14px; animation: drop .25s ease; }
.flash.success { background: #0E7A4F; color: #fff; }
.flash.error { background: #B42318; color: #fff; }
.flash.warning { background: #9A5B0B; color: #fff; }
.flash .f-icon { flex: none; width: 20px; height: 20px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.18); }
.flash button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; font-size: 18px; line-height: 1; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon-tile { margin: 0 auto 12px; width: 48px; height: 48px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* Dialogs */
dialog { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--text); width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(10, 15, 25, .45); backdrop-filter: blur(2px); }
dialog .d-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
dialog .d-head h2 { font-size: 18px; }
dialog .d-body { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
dialog .d-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--sunken); }
dialog .d-foot > .btn-primary { order: 2; }
dialog .d-foot .left { order: -1; margin-right: auto; }
.btn-solid-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-solid-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .btn-solid-danger { color: #1a0b0a; } }
:root[data-theme=dark] .btn-solid-danger { color: #1a0b0a; }
dialog.confirm { width: min(420px, calc(100vw - 32px)); border-radius: 20px; text-align: center; }
dialog.confirm[open] { animation: confirm-in .16s ease-out; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.confirm .c-body { padding: 28px 28px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.confirm .c-icon { width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger-soft) 45%, transparent); margin-bottom: 10px; }
.confirm h2 { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.confirm p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 34ch; }
.confirm .c-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 24px 24px; }
.confirm .c-foot .btn { justify-content: center; height: 44px; }

/* Houses grid */
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.house { position: relative; border-radius: 12px; padding: 14px 10px; text-align: center; border: 1.5px dashed var(--line-strong); background: var(--surface); transition: transform .12s, box-shadow .12s; }
.house:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.house.occ { border: 1px solid transparent; background: var(--success-soft); }
.house b { display: block; font-size: 17px; letter-spacing: -.01em; }
.house span { display: block; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--warn); }
.house.occ b, .house.occ span { color: var(--success); }
.house .more { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.house .more:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

/* Lines */
.line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .grow { flex: 1; min-width: 0; } .line .dotc { margin-top: 7px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sms { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--sunken); border-radius: 10px; padding: 12px; white-space: pre-wrap; }

/* Sign in */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--hero-from), var(--hero-to)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { font-size: 34px; line-height: 1.15; max-width: 420px; }
.auth-side p { opacity: .8; max-width: 420px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 26px; margin-bottom: 6px; }
.mobile-auth-brand { display: none !important; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 72px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .mobile-brand { display: flex; align-items: center; }
  .topbar .mobile-brand img { width: 30px; height: 30px; border-radius: 8px; }
  .scope select { max-width: 52vw; padding-top: 7px; padding-bottom: 7px; }
  .content { padding: 18px 14px 40px; }
  .page-head h1 { font-size: 22px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--surface);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
  .bottom-nav a.on { color: var(--brand); }
  .bottom-nav .count { position: absolute; top: 0; left: calc(50% + 6px); background: var(--warn); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 0 5px; }
  .g3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; }
  .flash-wrap { top: 70px; right: 16px; left: 16px; max-width: none; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .mobile-auth-brand { display: flex !important; }
  .row { padding: 12px 16px; } .card-head { padding: 14px 16px; }
  .hero .big { font-size: 28px; }
  .stat { padding: 12px 14px; } .stat b { font-size: 17px; }
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92vh; }
  dialog.confirm { width: calc(100vw - 32px); margin: auto; border-radius: 20px; }
}
@media (max-width: 520px) { .g2 { grid-template-columns: 1fr; } .houses { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); } .hide-sm { display: none; } }

/* Tenant picker, credit card, button rows */
.picker .picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; }
.picker .picked .grow { flex: 1; min-width: 0; }
.picker-results { max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; }
.picker-results:empty { display: none; }
.picker-results .row { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.picker-results .row:hover { background: var(--sunken); }
.credit-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.credit-card .grow { flex: 1; min-width: 200px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.tone-amber { background: var(--amber-soft); color: var(--amber); } .tone-muted { background: var(--sunken); color: var(--muted); }
a.notice { text-decoration: none; color: inherit; }
.notice.info { background: var(--info-soft); color: var(--info); }

/* Money, move-outs, meter readings */
.hero.violet { background: linear-gradient(135deg, #3F2380, #6B3FB5); }
.count-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.sent-card { display: block; width: 100%; border: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; text-align: left; }
.sent-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); position: relative; }
.stepper li::before { content: ""; position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.on::before, .stepper li.done::before { background: var(--brand); }
.stepper li span { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--sunken); border: 2px solid var(--line); font-weight: 700; }
.stepper li.on { color: var(--text); font-weight: 650; } .stepper li.on span { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.stepper li.done { color: var(--text); } .stepper li.done span { background: var(--brand); border-color: var(--brand); color: #fff; }
.settle .sline { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.settle .sline > span { flex: 1; min-width: 0; } .settle .sline small { display: block; font-size: 12px; color: var(--muted); }
.settle .sline.muted b { color: var(--muted); }
.settle .shead { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.settle .shead .btn-link { display: inline-flex; gap: 4px; align-items: center; border: 0; background: none; font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; cursor: pointer; padding: 0; }
.settle .stotal { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--line-strong); font-weight: 650; font-size: 16px; }
.settle .stotal b { font-size: 20px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + i { background: var(--brand); } .switch input:checked + i::after { transform: translateX(18px); }
.done-panel { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px; }
.done-panel h2 { margin: 8px 0 0; font-size: 20px; } .done-panel p { margin: 0; }
.meter-head, .meter-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 120px 130px; grid-template-areas: "av info prev now"; column-gap: 14px; align-items: center; padding: 10px 20px; }
.meter-head { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.meter-head span:first-child { grid-column: 1 / 3; } .meter-head span:not(:first-child) { text-align: right; }
.meter-row { border-bottom: 1px solid var(--line); }
.meter-row:last-child { border-bottom: 0; }
.meter-row .m-av { grid-area: av; width: auto; min-width: 40px; max-width: 52px; height: 40px; padding: 0 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 40px; text-align: center; }
.meter-row .m-info { grid-area: info; min-width: 0; }
.meter-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-row .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.meter-row .m-prev { grid-area: prev; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }
.meter-row .m-now { grid-area: now; min-width: 0; display: block; }
.meter-row .m-badge { grid-area: prev / prev / now / now; justify-self: end; }
.meter-row .m-lbl { display: none; }
.meter-row input.meter-in { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.meter-prev { color: var(--muted); font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.meter-row input.meter-in.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.meter-row.posted { opacity: .75; }
@media (max-width: 640px) {
  .meter-head { display: none; }
  .meter-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "av info info" "prev prev now"; row-gap: 10px; column-gap: 12px; padding: 14px 16px; }
  .meter-row.posted { grid-template-areas: "av info badge"; grid-template-columns: 44px minmax(0, 1fr) auto; }
  .meter-row.posted .m-badge { grid-area: badge; }
  .meter-row .m-av { min-width: 44px; max-width: 64px; }
  .meter-row .m-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
  .meter-row .m-prev { align-items: stretch; }
  .meter-row .m-prev .meter-prev { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--sunken); color: var(--text); font-size: 15px; justify-content: flex-start; }
  .meter-row input.meter-in { text-align: left; height: 44px; font-size: 16px; }
}

/* Reports */
.report-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; align-items: start; }
.report-filters .full { grid-column: 1 / -1; }
.pills .pill { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; }
.pills .pill input { display: none; }
.pills .pill:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--bg); }
.custom-dates { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.custom-dates input { width: auto; }
.chart h3 { margin: 0 0 10px; font-size: 15px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ylab { font-size: 11px; fill: var(--muted); text-anchor: end; dominant-baseline: middle; }
.chart .xlab { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.legend.col { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; }
.legend.col span { justify-content: flex-start; } .legend.col b { margin-left: auto; padding-left: 12px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pie { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; }
.pie svg { width: 150px; transform: rotate(0deg); }
@media (max-width: 520px) { .pie { grid-template-columns: 1fr; justify-items: center; } .legend.col { width: 100%; } }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 10px 14px; background: var(--sunken); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 10px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.table .r { text-align: right; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }

/* Skeleton shown the moment a page is tapped, while it loads */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--sunken) 0%, var(--line) 50%, var(--sunken) 100%); background-size: 200% 100%; animation: sk-shimmer 1.3s ease-in-out infinite; }
@keyframes sk-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sk-line { height: 12px; margin: 6px 0; } .sk-big { height: 24px; margin-top: 12px; }
.sk-title { height: 28px; width: min(320px, 70%); margin-bottom: 10px; }
.sk-crumb { width: 90px; margin-bottom: 18px; }
.sk-head { margin-bottom: 22px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.sk-lines { flex: 1; min-width: 0; }
.sk-card { overflow: hidden; }
.sk-stats { margin-bottom: 16px; }
.sk-pills { display: flex; gap: 8px; margin-bottom: 16px; } .sk-pill { width: 84px; height: 34px; border-radius: 999px; }
.w15 { width: 15%; } .w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w60 { width: 60%; } .w70 { width: 70%; }
main[aria-busy] { pointer-events: none; }
.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1000; background: var(--brand); opacity: 0; pointer-events: none; }
.nav-progress.on { opacity: 1; animation: nav-progress 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes nav-progress { 0% { width: 0; } 10% { width: 35%; } 100% { width: 92%; } }
@media (max-width: 520px) { .sk-stats.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } .nav-progress.on { animation: none; width: 60%; } }

/* Property chooser (straight after sign-in), like the app's "Choose a property" */
.chooser { min-height: 100vh; }
.chooser-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; max-width: 980px; margin: 0 auto; padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px) 8px; }
.chooser-top .eyebrow { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.chooser-top h1 { font-size: clamp(26px, 3.6vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.chooser-main { max-width: 980px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 32px) 64px; display: flex; flex-direction: column; gap: 16px; }
.ws-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.ws-row .grow b { display: block; } .ws-row .grow span { font-size: 13px; color: var(--muted); }
.ws-row select { width: auto; }
.choose-all { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; padding: 20px; transition: transform .15s, box-shadow .15s; }
.choose-all:hover, .pcard:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(var(--brand-rgb), .16); }
.ca-head { display: flex; align-items: center; gap: 8px; } .ca-head b { flex: 1; font-size: 17px; font-weight: 600; }
.ca-sub { font-size: 13px; color: rgba(255, 255, 255, .8); }
.ca-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; max-width: 520px; }
.ca-stats small, .pcard-stats small { display: block; font-size: 12px; }
.ca-stats small { color: rgba(255, 255, 255, .8); }
.ca-stats b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chooser .section-label { margin: 8px 0 -4px; }
.chooser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pcard.on { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.pcard:focus-visible, .choose-all:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.pcard-top { display: flex; align-items: center; gap: 12px; padding: 18px 16px; color: #fff; }
.pcard-top .chip { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); font-weight: 700; flex: none; }
.pcard-name { flex: 1; min-width: 0; }
.pcard-name b { display: block; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-name span { display: flex; align-items: center; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, .8); overflow: hidden; white-space: nowrap; }
.i.xs { width: 14px; height: 14px; flex: none; }
.pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 16px; gap: 8px; }
.pcard-stats small { color: var(--muted); } .pcard-stats b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-brand { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); } .g-blue { background: linear-gradient(135deg, #1849A9, #2E90FA); }
.g-violet { background: linear-gradient(135deg, #53389E, #9E77ED); } .g-amber { background: linear-gradient(135deg, #8A4B0F, #D98A1F); }
.g-warm { background: linear-gradient(135deg, #B54708, #EF8A2E); } .g-slate { background: linear-gradient(135deg, #1D2939, #475467); }
.add-prop { align-self: flex-start; }
@media (max-width: 520px) { .chooser-grid { grid-template-columns: 1fr; } .add-prop { align-self: stretch; justify-content: center; } }

/* App colour (same presets as the app; green is the default); the theme picks the light or dark shade */
:root[data-color=green] { --brand: #0E6B47; --brand-2: #2B7D5D; --brand-soft: #E8F3EE; --hero-from: #0B5E3E; --hero-to: #18A06C; --brand-rgb: 14, 107, 71; }
:root[data-theme=dark][data-color=green] { --brand: #34B37F; --brand-2: #52BE92; --brand-soft: #13291F; --brand-rgb: 52, 179, 127; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=green] { --brand: #34B37F; --brand-2: #52BE92; --brand-soft: #13291F; --brand-rgb: 52, 179, 127; } }
:root[data-color=santex] { --brand: #0B2D7B; --brand-2: #28468B; --brand-soft: #E8EEFA; --hero-from: #0B2D7B; --hero-to: #2456C4; --brand-rgb: 11, 45, 123; }
:root[data-theme=dark][data-color=santex] { --brand: #6B95F0; --brand-2: #81A5F2; --brand-soft: #16213B; --brand-rgb: 107, 149, 240; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=santex] { --brand: #6B95F0; --brand-2: #81A5F2; --brand-soft: #16213B; --brand-rgb: 107, 149, 240; } }
:root[data-color=ocean] { --brand: #175CD3; --brand-2: #3370D8; --brand-soft: #EEF4FF; --hero-from: #1849A9; --hero-to: #2E90FA; --brand-rgb: 23, 92, 211; }
:root[data-theme=dark][data-color=ocean] { --brand: #6AA8FF; --brand-2: #80B5FF; --brand-soft: #13233D; --brand-rgb: 106, 168, 255; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=ocean] { --brand: #6AA8FF; --brand-2: #80B5FF; --brand-soft: #13233D; --brand-rgb: 106, 168, 255; } }
:root[data-color=teal] { --brand: #0E7490; --brand-2: #2B859D; --brand-soft: #E6F6FA; --hero-from: #0E6176; --hero-to: #14A3C7; --brand-rgb: 14, 116, 144; }
:root[data-theme=dark][data-color=teal] { --brand: #4FC6E0; --brand-2: #69CFE5; --brand-soft: #0F2930; --brand-rgb: 79, 198, 224; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=teal] { --brand: #4FC6E0; --brand-2: #69CFE5; --brand-soft: #0F2930; --brand-rgb: 79, 198, 224; } }
:root[data-color=purple] { --brand: #6941C6; --brand-2: #7B58CD; --brand-soft: #F4F1FD; --hero-from: #53389E; --hero-to: #9E77ED; --brand-rgb: 105, 65, 198; }
:root[data-theme=dark][data-color=purple] { --brand: #B79CF7; --brand-2: #C2ABF8; --brand-soft: #241C3B; --brand-rgb: 183, 156, 247; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=purple] { --brand: #B79CF7; --brand-2: #C2ABF8; --brand-soft: #241C3B; --brand-rgb: 183, 156, 247; } }
:root[data-color=orange] { --brand: #C4320A; --brand-2: #CB4B27; --brand-soft: #FEF3EE; --hero-from: #B93815; --hero-to: #F38744; --brand-rgb: 196, 50, 10; }
:root[data-theme=dark][data-color=orange] { --brand: #FF8A4C; --brand-2: #FF9C67; --brand-soft: #34190F; --brand-rgb: 255, 138, 76; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=orange] { --brand: #FF8A4C; --brand-2: #FF9C67; --brand-soft: #34190F; --brand-rgb: 255, 138, 76; } }
:root[data-color=rose] { --brand: #C01048; --brand-2: #C82D5E; --brand-soft: #FFF1F3; --hero-from: #A11043; --hero-to: #E31B54; --brand-rgb: 192, 16, 72; }
:root[data-theme=dark][data-color=rose] { --brand: #F77FA6; --brand-2: #F892B3; --brand-soft: #37121E; --brand-rgb: 247, 127, 166; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=rose] { --brand: #F77FA6; --brand-2: #F892B3; --brand-soft: #37121E; --brand-rgb: 247, 127, 166; } }
:root[data-color=slate] { --brand: #344054; --brand-2: #4C5769; --brand-soft: #F2F4F7; --hero-from: #1D2939; --hero-to: #475467; --brand-rgb: 52, 64, 84; }
:root[data-theme=dark][data-color=slate] { --brand: #AAB4C3; --brand-2: #B7BFCC; --brand-soft: #1F242C; --brand-rgb: 170, 180, 195; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=slate] { --brand: #AAB4C3; --brand-2: #B7BFCC; --brand-soft: #1F242C; --brand-rgb: 170, 180, 195; } }
:root[data-color=pink] { --brand: #C11574; --brand-2: #C83185; --brand-soft: #FDF2F8; --hero-from: #BE185D; --hero-to: #EC4899; --brand-rgb: 193, 21, 116; }
:root[data-theme=dark][data-color=pink] { --brand: #F59BCB; --brand-2: #F6AAD3; --brand-soft: #3A1428; --brand-rgb: 245, 155, 203; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=pink] { --brand: #F59BCB; --brand-2: #F6AAD3; --brand-soft: #3A1428; --brand-rgb: 245, 155, 203; } }
:root[data-color=brown] { --brand: #7C4A1E; --brand-2: #8C6039; --brand-soft: #F6EFE8; --hero-from: #6B3E17; --hero-to: #A26A3A; --brand-rgb: 124, 74, 30; }
:root[data-theme=dark][data-color=brown] { --brand: #D6A574; --brand-2: #DCB289; --brand-soft: #2B2017; --brand-rgb: 214, 165, 116; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=brown] { --brand: #D6A574; --brand-2: #DCB289; --brand-soft: #2B2017; --brand-rgb: 214, 165, 116; } }
:root[data-color=yellow] { --brand: #9A6700; --brand-2: #A6791F; --brand-soft: #FEF9E7; --hero-from: #A16207; --hero-to: #E0A800; --brand-rgb: 154, 103, 0; }
:root[data-theme=dark][data-color=yellow] { --brand: #FACC15; --brand-2: #FBD438; --brand-soft: #2E2508; --brand-rgb: 250, 204, 21; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=yellow] { --brand: #FACC15; --brand-2: #FBD438; --brand-soft: #2E2508; --brand-rgb: 250, 204, 21; } }
:root[data-color=indigo] { --brand: #4338CA; --brand-2: #5A50D0; --brand-soft: #EEF2FF; --hero-from: #3730A3; --hero-to: #6366F1; --brand-rgb: 67, 56, 202; }
:root[data-theme=dark][data-color=indigo] { --brand: #A5B4FC; --brand-2: #B2BFFC; --brand-soft: #1E1B4B; --brand-rgb: 165, 180, 252; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light])[data-color=indigo] { --brand: #A5B4FC; --brand-2: #B2BFFC; --brand-soft: #1E1B4B; --brand-rgb: 165, 180, 252; } }

/* Appearance settings */
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-seg label { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.theme-seg input { position: absolute; opacity: 0; pointer-events: none; }
.theme-seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.theme-seg label:has(input:focus-visible) { outline: 3px solid var(--brand-soft); }
.theme-prev { width: 100%; max-width: 72px; height: 40px; border-radius: 8px; border: 1px solid var(--line-strong); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.theme-prev.light { background: #F5F7FA; } .theme-prev.dark { background: #0B0E14; } .theme-prev.system { background: linear-gradient(90deg, #F5F7FA 50%, #0B0E14 50%); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 8px; }
.swatches label { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; text-align: center; color: var(--muted); }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches .sw { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 2.5px solid transparent; box-shadow: inset 0 0 0 2px var(--surface); transition: transform .12s; }
.swatches label:hover .sw { transform: scale(1.06); }
.swatches .sw svg { opacity: 0; }
.swatches label:has(input:checked) .sw { border-color: var(--text); }
.swatches label:has(input:checked) .sw svg { opacity: 1; }
.swatches label:has(input:checked) { color: var(--text); font-weight: 600; }
.swatches label:has(input:focus-visible) .sw { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

.confirm.neutral .c-icon { background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-soft) 50%, transparent); }

.soon-row { opacity: .55; cursor: default; }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; margin-bottom: 8px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-weight: 550; cursor: pointer; text-align: left; }
.side-link:hover { background: var(--sunken); color: var(--text); }
