:root { --fg: #14181c; --muted: #5d6670; --bg: #f5f7f9; --card: #ffffff; --line: #dde3e8; --brand: #0b5d8f; --warn: #a33a1d;
  color-scheme: light dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
@media (prefers-color-scheme: dark) { :root { --fg: #eef1f4; --muted: #a3adb7; --bg: #121518; --card: #1c2126; --line: #2e353c; --brand: #5ab4e8; --warn: #f08a6b; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: 17px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem;
  background: var(--card); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 1.1rem; margin: 0; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { font: inherit; color: var(--brand); background: none; border: 0; padding: .3rem .2rem; cursor: pointer; }
main { padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.card h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); font-size: .9rem; margin: 0; }
.warn { color: var(--warn); }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .95rem; color: var(--muted); }
input { font: inherit; font-size: 1.1rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .75rem; }
.btn { font: inherit; font-weight: 600; color: #fff; background: var(--brand); border: 0; border-radius: 10px; padding: .8rem 1rem; cursor: pointer; }
.btn:disabled { opacity: .6; }
.link { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.reports { display: flex; flex-direction: column; gap: .6rem; }
.report-btn { font: inherit; text-align: left; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; cursor: pointer;
  display: flex; flex-direction: column; gap: .2rem; }
.report-btn strong { font-size: 1.05rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.kpi { background: var(--bg); border-radius: 10px; padding: .55rem .7rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.kpi .v { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .l { font-size: .85rem; color: var(--muted); }
details summary { cursor: pointer; color: var(--brand); font-size: .95rem; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
td.r, th.r { text-align: right; }
ol.steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
