/* Minhas Notas — design system enxuto, sem framework. Claro/escuro via prefers-color-scheme. */
:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #16181d;
  --ink-2: #3a3e46;
  --muted: #6c7079;
  --line: #e7e4dc;
  --line-strong: #d6d2c7;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ef;
  --ok: #15803d;
  --ok-soft: #e7f5ec;
  --warn: #b45309;
  --warn-soft: #fdf2e2;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;
  --info: #2563eb;
  --info-soft: #e8effd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04), 0 4px 16px rgba(22, 24, 29, .05);
  --shadow-lg: 0 10px 40px rgba(22, 24, 29, .14);
  --sidebar: 248px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214; --surface: #171a1d; --surface-2: #1c2024; --ink: #eceae4; --ink-2: #c9c7c0;
    --muted: #8d9199; --line: #262a2f; --line-strong: #343941; --accent: #2dd4bf; --accent-ink: #062b27;
    --accent-soft: #10302c; --ok: #4ade80; --ok-soft: #12291b; --warn: #fbbf24; --warn-soft: #2d2410;
    --danger: #f87171; --danger-soft: #2f1716; --info: #60a5fa; --info-soft: #14233b;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101214; --surface: #171a1d; --surface-2: #1c2024; --ink: #eceae4; --ink-2: #c9c7c0;
  --muted: #8d9199; --line: #262a2f; --line-strong: #343941; --accent: #2dd4bf; --accent-ink: #062b27;
  --accent-soft: #10302c; --ok: #4ade80; --ok-soft: #12291b; --warn: #fbbf24; --warn-soft: #2d2410;
  --danger: #f87171; --danger-soft: #2f1716; --info: #60a5fa; --info-soft: #14233b;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 10px 40px rgba(0,0,0,.5); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.08rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
p { margin: 0; }
[x-cloak] { display: none !important; }
.num, td.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .86em; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.xsmall { font-size: .76rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.up { color: var(--danger); }   /* gasto subiu */
.down { color: var(--ok); }     /* gasto caiu */

/* ---------------------------------------------------------------- layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 520; }
.nav-link svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 620; }
.nav-link .count { margin-left: auto; font-size: .72rem; background: var(--warn-soft); color: var(--warn); padding: 1px 7px; border-radius: 99px; font-weight: 650; }
.nav-section { margin: 14px 12px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }

.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.topbar, .tabbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30;
    padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .main { padding: 18px 16px 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; text-decoration: none; color: var(--muted); padding: 4px 0; }
  .tab svg { width: 22px; height: 22px; }
  .tab.active { color: var(--accent); font-weight: 600; }
  .tab-scan { margin-top: -26px; }
  .tab-scan span.fab { width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
  h1 { font-size: 1.3rem; }
  .kpi { padding: 14px 15px; }
  .kpi-value { font-size: 1.25rem; }
}

/* ---------------------------------------------------------------- componentes */
.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); flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: .84rem; }
.card-body { padding: 18px 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-lg { margin-top: 24px; }

.kpi { padding: 18px 20px; }
.kpi-label { color: var(--muted); font-size: .8rem; font-weight: 550; }
.kpi-value { font-size: 1.6rem; font-weight: 720; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: .8rem; margin-top: 6px; color: var(--muted); display: flex; gap: 4px 6px; align-items: center; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; padding: 1px 7px; border-radius: 99px; font-size: .76rem; }
.delta.up { background: var(--danger-soft); }
.delta.down { background: var(--ok-soft); }
.delta.flat { background: var(--surface-2); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 580; font-size: .9rem;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.06); background: var(--accent); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 30px; padding: 0 10px; font-size: .8rem; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.htmx-request { opacity: .6; pointer-events: none; }
.icon-btn { width: 34px; padding: 0; }

/* formulários */
label, .label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.field .help { font-size: .76rem; color: var(--muted); margin-top: 5px; }
.field .error, .errorlist { color: var(--danger); font-size: .8rem; margin: 6px 0 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=url], input[type=number], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: .8rem; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7079' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=color] { width: 44px; height: 40px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.select-sm { height: 32px; font-size: .82rem; border-radius: 8px; padding-left: 10px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: .86rem; margin: 0; cursor: pointer; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.filters .field { margin: 0; }
@media (max-width: 1000px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters .grow { grid-column: 1 / -1; } }

/* segmented / tabs */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button, .segmented a { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font: inherit; font-size: .84rem; font-weight: 560;
  color: var(--muted); cursor: pointer; text-decoration: none; }
.segmented .on, .segmented [aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; }
.table a.row-link { text-decoration: none; font-weight: 600; }
.table a.row-link:hover { color: var(--accent); }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
tr.htmx-swapping { opacity: 0; transition: opacity .3s; }
tr.flash td { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* tabela vira cartões no celular */
@media (max-width: 760px) {
  table.table.responsive thead { display: none; }
  table.table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.responsive td { border: 0; padding: 3px 0; text-align: left !important; }
  .table.responsive td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 92px; color: var(--muted); font-size: .76rem; }
  .table.responsive td.cell-main { font-size: .95rem; }
  .table.responsive tfoot { display: block; }
}

/* chips, badges */
.chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: .78rem; font-weight: 580;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--ink)); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip--empty { background: var(--warn-soft); color: var(--warn); padding-left: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.src { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* barras simples */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: .86rem; }
.bar-track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--c, var(--accent)); }

/* gráficos */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.chart-box.lg { height: 340px; }

/* alertas e toasts */
.alert { padding: 12px 14px; border-radius: 11px; font-size: .87rem; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.toasts { position: fixed; right: 18px; top: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 14px 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .88rem;
  display: flex; gap: 12px; align-items: flex-start; }
.toast button { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0; }
.toast.error { background: var(--danger); color: #fff; }
@media (max-width: 900px) { .toasts { top: auto; bottom: 96px; left: 16px; right: 16px; } }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; opacity: .5; margin-bottom: 10px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* bulk bar */
.bulk-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 14px; box-shadow: var(--shadow-lg); }
.bulk-bar select { background-color: var(--surface); width: auto; min-width: 200px; }
@media (max-width: 900px) { .bulk-bar { bottom: 86px; } }

/* paginação */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }

/* ---------------------------------------------------------------- telas específicas */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-card .card-pad { padding: 30px 28px; }
.auth h1 { font-size: 1.4rem; margin-bottom: 6px; }
.auth .lead { color: var(--muted); margin-bottom: 22px; font-size: .92rem; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.auth-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* scanner */
.scanner { position: relative; aspect-ratio: 1 / 1; max-height: 62vh; width: 100%; border-radius: 18px; overflow: hidden; background: #0b0c0e; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 14%; border-radius: 20px; box-shadow: 0 0 0 999px rgba(0,0,0,.42); }
.scanner .frame::before, .scanner .frame::after { content: ""; position: absolute; inset: -2px; border-radius: 20px; border: 3px solid transparent;
  border-top-color: #fff; border-bottom-color: #fff; mask: linear-gradient(90deg, #000 18%, transparent 18% 82%, #000 82%); }
.scanner .laser { position: absolute; left: 16%; right: 16%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); top: 50%; animation: laser 2.2s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 18%; } 50% { top: 82%; } }
.scanner .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd2d6; text-align: center; padding: 24px; }
.scanner .placeholder svg { width: 54px; height: 54px; opacity: .7; margin-bottom: 10px; }
.scan-ok { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 75%, transparent); color: #fff; font-weight: 700; }

/* nota fiscal: visual de cupom */
.receipt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; position: relative; box-shadow: var(--shadow); }
.receipt::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 8px -2px, transparent 8px, var(--surface) 8.5px) repeat-x; background-size: 16px 10px; }
.receipt-head { padding: 22px 22px 16px; border-bottom: 1px dashed var(--line-strong); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 22px; border-top: 1px dashed var(--line-strong); }
.receipt-total strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.key-box { font-family: var(--mono); font-size: .8rem; word-spacing: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; word-break: break-all; }

.cat-tree { list-style: none; margin: 0; padding: 0; }
.cat-item { border-bottom: 1px solid var(--line); }
.cat-item:last-child { border-bottom: 0; }
.cat-line { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.cat-line.child { padding-left: 46px; background: var(--surface-2); }
.swatch { width: 14px; height: 14px; border-radius: 5px; background: var(--c); flex: none; }
.rules { padding: 10px 18px 16px 46px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rule-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: .74rem; padding: 2px 4px 2px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.rule-tag button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: .9rem; line-height: 1; }
.rule-tag button:hover { color: var(--danger); }
.inactive { opacity: .5; }

.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-veil.htmx-request { opacity: .5; pointer-events: none; transition: opacity .2s; }

dialog.modal { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); width: min(720px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 12, 14, .5); backdrop-filter: blur(2px); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
#import-results:has(> .card, > .alert) #import-empty { display: none; }
