/* CurbLeads — app styles. Two themes: dark (black) and light (white). */
:root {
  --accent: #3fae5a;
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px; --r-sm: 9px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
[data-theme="dark"] {
  --bg: #0a0a0a; --bg-2: #111111; --card: #141414; --card-2: #1a1a1a;
  --line: #242424; --line-2: #2f2f2f;
  --text: #f4f4f2; --text-2: #a3a3a0; --text-3: #6d6d6a;
  --input: #0f0f0f; --shadow: 0 1px 0 rgba(255,255,255,.03), 0 12px 32px -12px rgba(0,0,0,.6);
  --on-accent: #06110a; color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f7f7f5; --card: #ffffff; --card-2: #f6f6f4;
  --line: #e8e8e4; --line-2: #dcdcd6;
  --text: #0c0c0c; --text-2: #55554f; --text-3: #8b8b84;
  --input: #ffffff; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -16px rgba(0,0,0,.18);
  --on-accent: #ffffff; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: -.01em; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 18px; padding: 4px 10px 22px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); }
.brand img { height: 30px; width: auto; border-radius: 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 550; }
.nav a:hover { background: var(--card-2); color: var(--text); }
.nav a.on { background: var(--card-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav svg { width: 19px; height: 19px; flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1480px; width: 100%; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; font-weight: 750; line-height: 1.05; }
.topbar .sub { color: var(--text-2); margin-top: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }

/* Mobile bottom nav */
.bnav { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 14px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); z-index: 40; }
  .bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-3); font-size: 11px; font-weight: 600; }
  .bnav a.on { color: var(--text); }
  .bnav a.on svg { color: var(--accent); }
  .bnav svg { width: 22px; height: 22px; }
}

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s; }
.btn:hover { border-color: var(--text-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--card-2); color: var(--text); }
.btn.danger { color: #e5484d; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.icon { width: 40px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.input, select.input, textarea.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg svg { width: 16px; height: 16px; display: block; }
.seg button { display: inline-flex; align-items: center; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
[data-theme="dark"] .seg svg { width: 16px; height: 16px; display: block; }
.seg button { display: inline-flex; align-items: center; }
.seg button.on { background: #262626; }

/* Search */
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 42px; }
.search.big .input { height: 64px; font-size: 20px; border-radius: 18px; padding-left: 54px; font-weight: 550; letter-spacing: -.01em; }
.search.big svg { left: 20px; width: 22px; height: 22px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card h3 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 18px 20px; }
.kpi .v { font-size: 34px; font-weight: 750; letter-spacing: -.04em; line-height: 1; margin-top: 10px; }
.kpi .l { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi .d { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }

/* Pipeline bar */
.pipe { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--card-2); }
.pipe i { display: block; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); }
.legend b { color: var(--text); font-weight: 650; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* bars */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars div { flex: 1; background: color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 5px 5px 2px 2px; position: relative; min-height: 2px; }
.bars div:hover { background: var(--accent); }
.bars div span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--text-2); font-weight: 600; opacity: 0; transition: opacity .15s; }
.bars div:hover span { opacity: 1; }
.bars-x { display: flex; gap: 6px; margin-top: 8px; font-size: 10.5px; color: var(--text-3); }
.bars-x span { flex: 1; text-align: center; }
.hlist { display: flex; flex-direction: column; gap: 9px; }
.hlist .r { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.hlist .track { grid-column: 1 / -1; height: 5px; background: var(--card-2); border-radius: 9px; overflow: hidden; }
.hlist .track i { display: block; height: 100%; background: var(--text); opacity: .75; border-radius: 9px; }

/* Status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text-2); }
.chip .dot { width: 6px; height: 6px; }
.tag { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.tag.warn { color: #d8890b; border-color: color-mix(in srgb, #d8890b 35%, transparent); }

/* ---------- Filters ---------- */
.filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
.more-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 1100px) { .filters { grid-template-columns: 1fr 1fr; } .filters > :first-child { grid-column: 1 / -1; } }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 12px; flex-wrap: wrap; }
.bulk { position: sticky; top: 10px; z-index: 30; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--text); color: var(--bg); margin-bottom: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.45); }
.bulk .btn { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); }
.bulk .btn:hover { border-color: var(--bg); }
.bulk select.input { width: auto; height: 32px; background-color: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 25%, transparent); font-size: 13px; }
.bulk select.input option { color: #000; }
@media (max-width: 860px) { .bulk { top: auto; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); position: fixed; left: 10px; right: 10px; } }

/* Lead cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.lc { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform .2s var(--ease), border-color .2s; position: relative; }
.lc:hover { transform: translateY(-2px); border-color: var(--line-2); }
.lc .ph { aspect-ratio: 16 / 9; background: var(--card-2); position: relative; overflow: hidden; }
.lc .ph img { width: 100%; height: 100%; object-fit: cover; }
.lc .ph .chip { position: absolute; left: 10px; top: 10px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(8px); }
.lc .sel { position: absolute; right: 10px; top: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 80%, transparent); display: grid; place-items: center; backdrop-filter: blur(8px); }
.lc .sel input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.lc .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.lc .addr { font-weight: 700; font-size: 16px; letter-spacing: -.015em; line-height: 1.2; }
.lc .city { color: var(--text-2); font-size: 13px; }
.lc .owner { margin-top: 6px; font-size: 13.5px; font-weight: 550; }
.lc .facts { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.lc .facts b { color: var(--text); font-weight: 650; display: block; font-size: 13.5px; }

/* placeholder house */
.house { width: 100%; height: 100%; display: grid; place-items: center; background:
  radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--card-2); color: var(--text-3); }
.house svg { width: 26%; max-width: 96px; opacity: .32; }

/* Table */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--card); }
.t th.sorted { color: var(--text); }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: var(--card-2); }
.t td.addr { font-weight: 650; }
.t input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--text-2); font-size: 13.5px; gap: 10px; flex-wrap: wrap; }

/* ---------- Lead detail ---------- */
.ld { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ld { grid-template-columns: 1fr; } }
.hero { overflow: hidden; }
.hero .media { aspect-ratio: 16 / 8; background: var(--card-2); position: relative; }
.hero .media img, .hero .media .house { width: 100%; height: 100%; object-fit: cover; }
.hero .media .seg { position: absolute; left: 14px; bottom: 14px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); }
.hero .media .upl { position: absolute; right: 14px; bottom: 14px; }
.hero .info { padding: 20px 22px 22px; }
.hero h2 { margin: 0; font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -.035em; line-height: 1.08; }
.hero .loc { color: var(--text-2); margin-top: 6px; font-size: 15px; }
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 18px; }
.actions .btn { height: 46px; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.facts-grid div { background: var(--card); padding: 13px 15px; }
.facts-grid span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.facts-grid b { display: block; margin-top: 4px; font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.statusbar { display: flex; flex-wrap: wrap; gap: 6px; }
.statusbar button { border: 1px solid var(--line-2); background: var(--card); height: 34px; padding: 0 12px; border-radius: 99px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.statusbar button.on { color: var(--text); border-color: currentColor; background: var(--card-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* Services quote builder */
.svc { display: grid; grid-template-columns: 22px 1fr 110px 120px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.svc:last-of-type { border-bottom: 0; }
.svc .n { font-weight: 600; }
.svc .u { font-size: 12px; color: var(--text-3); }
.svc .input { height: 34px; font-size: 13.5px; }
.svc input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 560px) { .svc { grid-template-columns: 22px 1fr 90px; } .svc .freq { grid-column: 2 / -1; } }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 6px; border-top: 1px dashed var(--line-2); }
.total b { font-size: 24px; letter-spacing: -.03em; }

/* Timeline */
.compose { display: flex; flex-direction: column; gap: 10px; }
.tl { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.tl li::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-2); }
.tl .ic svg { width: 14px; height: 14px; }
.tl .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.tl .b { white-space: pre-wrap; margin-top: 3px; word-break: break-word; }
.tl .x { opacity: 0; border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 0 4px; }
.tl li:hover .x { opacity: 1; }

/* ---------- Field mode ---------- */
.field-wrap { max-width: 760px; margin: 0 auto; }
.field-hero { padding: 14px 0 20px; }
.field-hero h1 { font-size: clamp(30px, 6vw, 44px); letter-spacing: -.045em; line-height: 1; margin: 0 0 8px; }
.fr { display: grid; grid-template-columns: 116px 1fr auto; gap: 14px; padding: 12px; align-items: center; text-decoration: none; margin-bottom: 10px; }
.fr .ph { width: 116px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--card-2); }
.fr .ph img { width: 100%; height: 100%; object-fit: cover; }
.fr .addr { font-weight: 700; font-size: 17px; letter-spacing: -.02em; line-height: 1.2; }
.fr .sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.fr .call { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
@media (max-width: 520px) { .fr { grid-template-columns: 84px 1fr auto; } .fr .ph { width: 84px; height: 70px; } }
mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Settings ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 650; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } }
.set-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.imgslot { display: flex; gap: 14px; align-items: center; }
.imgslot .pv { width: 84px; height: 84px; border-radius: 12px; background: var(--card-2); border: 1px dashed var(--line-2); display: grid; place-items: center; overflow: hidden; color: var(--text-3); font-size: 12px; }
.imgslot .pv img { width: 100%; height: 100%; object-fit: contain; }
.list-edit .item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 28px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over, .drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--bg); }
.auth .card { width: 100%; max-width: 400px; padding: 30px; }
.auth h1 { margin: 18px 0 4px; font-size: 26px; letter-spacing: -.03em; }
.auth form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal h2 { margin: 0 0 18px; font-size: 20px; letter-spacing: -.02em; }
@keyframes fade { from { opacity: 0; } }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 99; transition: all .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: #e5484d; color: #fff; }
@media (max-width: 860px) { #toast { bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); } }

.boot { height: 100vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border: 2.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; color: var(--text-2); }
.empty svg { width: 42px; height: 42px; color: var(--text-3); margin-bottom: 10px; }
.skel { background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.fade-in { animation: up .35s var(--ease) both; }
@keyframes up { from { opacity: 0; transform: translateY(6px); } }
.theme-toggle { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); }
.theme-toggle button { flex: 1; border: 0; background: none; height: 30px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.theme-toggle button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.theme-toggle i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-block; }

.bnav-only { display: none !important; }
@media (max-width: 860px) { .bnav-only { display: flex !important; } }
@media (max-width: 760px) {
  .list-edit .item { grid-template-columns: 1fr; }
  .list-edit .form-grid { grid-template-columns: 1fr 1fr !important; }
  .list-edit .form-grid > :first-child { grid-column: 1 / -1; }
}

input[type=search]::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; cursor: pointer; }
