@font-face { font-family: Inter; font-weight: 400; src: url(/fonts/inter-400.woff) format('woff'); font-display: swap; }
@font-face { font-family: Inter; font-weight: 500; src: url(/fonts/inter-500.woff) format('woff'); font-display: swap; }
@font-face { font-family: Inter; font-weight: 600; src: url(/fonts/inter-600.woff) format('woff'); font-display: swap; }
@font-face { font-family: Inter; font-weight: 700; src: url(/fonts/inter-700.woff) format('woff'); font-display: swap; }
@font-face { font-family: Archivo; font-weight: 400; src: url(/fonts/archivo-400.woff) format('woff'); font-display: swap; }
@font-face { font-family: Archivo; font-weight: 500; src: url(/fonts/archivo-500.woff) format('woff'); font-display: swap; }
@font-face { font-family: Archivo; font-weight: 600; src: url(/fonts/archivo-600.woff) format('woff'); font-display: swap; }
@font-face { font-family: Archivo; font-weight: 800; src: url(/fonts/archivo-800.woff) format('woff'); font-display: swap; }

:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-2: #f8f9f7;
  --surface-3: #eff1ee;
  --ink: #111816;
  --ink-2: #39423f;
  --muted: #69736f;
  --faint: #9ca5a1;
  --line: #e6e8e4;
  --line-strong: #d3d7d2;
  --accent: #0f766e;
  --accent-ink: #0a5a54;
  --accent-soft: #e4f2ef;
  --accent-soft-2: #f1f8f6;
  --warn: #b45309;
  --warn-soft: #fdf2e2;
  --danger: #b42318;
  --danger-soft: #fdebe9;
  --ok: #15803d;
  --ok-soft: #e6f4ea;
  --info: #3656c4;
  --info-soft: #eaeffc;
  --side-bg: #0f201d;
  --side-ink: #c7d3cf;
  --side-muted: #7c8e89;
  --side-hover: rgba(255, 255, 255, 0.05);
  --side-active: rgba(255, 255, 255, 0.09);
  --radius: 4px;
  --radius-sm: 3px;
  --rule: #0c1311;
  --signal: #eb6834;
  --signal-ink: #b8441a;
  --signal-soft: #fdeee6;
  --shadow: 0 1px 2px rgba(16, 24, 22, 0.04), 0 2px 6px -2px rgba(16, 24, 22, 0.04);
  --shadow-md: 0 6px 20px -8px rgba(16, 24, 22, 0.14), 0 1px 3px rgba(16, 24, 22, 0.05);
  --shadow-lg: 0 24px 60px -16px rgba(16, 24, 22, 0.3), 0 2px 8px rgba(16, 24, 22, 0.06);
  --ring: 0 0 0 3px rgba(15, 118, 110, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Archivo, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum';
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.018em; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 15.5px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.hidden { display: none !important; }
::selection { background: rgba(15, 118, 110, 0.18); }

/* ---------- Kest ja külgriba ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.shell > * { min-width: 0; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px 16px;
  background: var(--side-bg);
  color: var(--side-ink);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: #1f9c8f; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand strong { display: block; font-size: 15px; letter-spacing: -0.01em; color: #fff; }
.brand small { display: block; color: var(--side-muted); font-size: 12px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-new {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; margin: 0 2px 14px; border-radius: 10px; border: 0;
  background: #1f9c8f; color: #fff; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 14px -6px rgba(31, 156, 143, 0.7);
  transition: background 0.12s, transform 0.05s;
}
.side-new:hover { background: #24ae9f; }
.side-new:active { transform: translateY(1px); }
.side-new svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.side-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--side-muted); padding: 8px 10px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--side-ink); font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav a:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.nav a { position: relative; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #2fc0ae; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; flex: none; }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav .badge.alert { background: #e5484d; }
.nav .badge:empty { display: none; }
.sidebar-foot { margin-top: auto; }
.gcard { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px; background: rgba(255, 255, 255, 0.05); color: var(--side-ink); font-size: 12.5px; line-height: 1.35; }
a.gcard:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.gcard .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--side-muted); flex: none; }
.gcard .dot.on { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.gcard .dot.off { background: #f5a524; box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.18); }
.gcard strong { display: block; color: #fff; font-weight: 600; }
.gcard span.sub { display: block; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

.main { padding: 34px 44px 90px; min-width: 0; outline: none; }
.page { max-width: 1200px; margin: 0 auto; animation: fade 0.2s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--ink); text-decoration: none; }

/* ---------- Kaardid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); min-height: 58px; }
.card-head .hint { color: var(--muted); font-size: 12.5px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.card-body { padding: 20px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-foot .grow + .btn, .card-foot .btn:first-child { margin-left: auto; }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-title .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.card-title .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.kpis { grid-template-columns: repeat(4, 1fr); margin-bottom: 22px; }
.kpi { padding: 18px 20px 17px; position: relative; overflow: hidden; }
.kpi .top { display: flex; align-items: center; gap: 10px; }
.kpi .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex: none; }
.kpi .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; margin-top: 14px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi.accent .ic { background: var(--accent-soft); color: var(--accent); }
.kpi.info .ic { background: var(--info-soft); color: var(--info); }
.kpi.warn .ic { background: var(--warn-soft); color: var(--warn); }
.kpi.warn .value { color: var(--warn); }
.kpi.danger .ic { background: var(--danger-soft); color: var(--danger); }
.kpi.danger .value { color: var(--danger); }
.two-col { grid-template-columns: 1.4fr 1fr; align-items: start; }

/* Töölaua esiletõstetud kaart */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px;
  padding: 22px 26px; margin-bottom: 22px;
  border-radius: 18px; color: #eafaf6;
  background: radial-gradient(120% 140% at 100% 0%, #1b8a7e 0%, #0f5f57 45%, #0d3f3a 100%);
  box-shadow: 0 18px 40px -22px rgba(13, 63, 58, 0.8);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); pointer-events: none; }
.hero .when { width: 64px; height: 70px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; backdrop-filter: blur(4px); }
.hero .when b { font-size: 24px; line-height: 1; color: #fff; }
.hero .when span { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 5px; opacity: 0.85; }
.hero .txt { flex: 1; min-width: 0; }
.hero .k { font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; opacity: 0.75; }
.hero .t { font-size: 19px; font-weight: 650; color: #fff; letter-spacing: -0.015em; margin-top: 3px; }
.hero .s { opacity: 0.8; margin-top: 2px; font-size: 13.5px; }
.hero .amt { font-size: 26px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.hero .btn { background: #fff; border-color: #fff; color: #0d3f3a; position: relative; z-index: 1; }
.hero .btn:hover { background: #ecfdf8; }

/* ---------- Nupud ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 550; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 1px rgba(16, 24, 22, 0.04);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.05s;
}
.btn:hover { background: var(--surface-2); border-color: #c3c8c2; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .side-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #f0c0ba; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(16, 24, 22, 0.05); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn.disabled, .btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pillid ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.draft { background: #f1f1ee; color: #6b6a63; }
.pill.issued { background: var(--info-soft); color: var(--info); }
.pill.sent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.paid { background: var(--ok-soft); color: var(--ok); }
.pill.credited { background: #f3effa; color: #6d4bb3; }
.pill.overdue { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.accent { color: var(--accent-ink); background: var(--accent-soft); border-color: #cfe7e2; }

/* ---------- Tabelid ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr.click { cursor: pointer; transition: background 0.1s; }
.table tbody tr.click:hover td { background: var(--accent-soft-2); }
.table .num, .table th.num { text-align: right; }
.table .strong { font-weight: 600; }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who .avatar { width: 32px; height: 32px; font-size: 12px; }
.who .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { padding: 52px 24px; text-align: center; color: var(--muted); }
.empty .icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; box-shadow: 0 0 0 8px var(--accent-soft-2); }
.empty .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.empty p { max-width: 380px; margin: 0 auto; }
.empty .btn { margin-top: 18px; }

/* ---------- Vormid ---------- */
.form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: span 12; min-width: 0; }
.field.c6 { grid-column: span 6; } .field.c4 { grid-column: span 4; } .field.c3 { grid-column: span 3; } .field.c8 { grid-column: span 8; } .field.c9 { grid-column: span 9; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12px; color: var(--muted); line-height: 1.45; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=month], input[type=password], input[type=url], select, textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 13.5px;
  box-shadow: inset 0 1px 1px rgba(16, 24, 22, 0.03);
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: #bfc5bf; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[readonly], input:disabled { background: var(--surface-2); color: var(--ink-2); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2369736f'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 16px; }
.input-group { display: flex; }
.input-group input, .input-group select { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { height: 38px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { padding-left: 34px; width: 280px; }

.switch { display: inline-flex; align-items: flex-start; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: #d5d9d4; position: relative; transition: background 0.15s; flex: none; margin-top: 1px; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .txt { font-weight: 550; }
.switch .txt small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 1px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 22, 0.1); }
.seg .count { font-size: 11px; color: var(--muted); font-weight: 600; background: var(--surface-3); border-radius: 99px; padding: 0 6px; min-width: 18px; text-align: center; }
.seg button.on .count { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Arve redaktor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 22px; align-items: start; }
.preview { position: sticky; top: 24px; }
.preview-bar { display: flex; align-items: center; gap: 8px; padding: 0 4px 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.preview-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.preview-frame { width: 100%; height: calc(100vh - 130px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #e7e9e5; box-shadow: var(--shadow-md); }
.rows-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.rows-table th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; text-align: left; padding: 0 6px 8px; }
.rows-table td { padding: 4px 3px; vertical-align: top; }
.rows-table input, .rows-table select { height: 36px; }
.rows-table .c-desc { width: auto; }
.rows-table .c-qty { width: 72px; } .rows-table .c-unit { width: 72px; } .rows-table .c-price { width: 104px; } .rows-table .c-vat { width: 124px; } .rows-table .c-sum { width: 96px; } .rows-table .c-x { width: 34px; }
.rows-table .sum { padding: 10px 6px 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rows-table input.num { text-align: right; }
.totals { margin-left: auto; width: 320px; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.totals .line { display: flex; justify-content: space-between; padding: 4px 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 18px; color: var(--ink); }
.totals .grand span:last-child { color: var(--accent-ink); }
.totals .grand:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 11px 16px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline li::after { content: ''; position: absolute; left: 6px; top: 17px; bottom: 1px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; color: var(--faint); font-size: 12px; }

/* Arveread (redaktor): kitsas konteineris kirjeldus eraldi real */
.items { container-type: inline-size; }
.li { display: grid; grid-template-columns: 64px 64px minmax(0, 1fr) 96px 88px 32px; gap: 8px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li.novat { grid-template-columns: 70px 70px minmax(0, 1fr) 100px 32px; }
.li > .li-f:first-child { grid-column: 1 / -1; }
.li-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.li-f > span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.li input.num { text-align: right; }
.li .sum { height: 38px; display: flex; align-items: center; justify-content: flex-end; font-weight: 600; font-variant-numeric: tabular-nums; }
.li-x { align-self: end; margin-bottom: 4px; color: var(--faint); }
.li-x:hover { color: var(--danger); }
.li-head { display: none; }
@container (min-width: 700px) {
  .li { grid-template-columns: minmax(0, 1fr) 64px 64px 96px 100px 92px 32px; padding: 4px 0; border-bottom: 0; }
  .li.novat { grid-template-columns: minmax(0, 1fr) 70px 70px 100px 100px 32px; }
  .li > .li-f:first-child { grid-column: auto; }
  .li-f > span { display: none; }
  .li-head { display: grid; padding: 0 0 6px; }
  .li-head span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
  .li-head .r { text-align: right; }
}
.save-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.save-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* Malli muutujad */
.vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.vars .muted { margin-right: 2px; }
.var { height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid #cfe7e2; background: var(--accent-soft-2); color: var(--accent-ink); font: 500 12px ui-monospace, 'SF Mono', Menlo, monospace; cursor: pointer; transition: background 0.1s, border-color 0.1s; }
.var:hover { background: var(--accent-soft); border-color: var(--accent); }
.var-preview:empty { display: none; }
.var-preview { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: 13px; }
.var-preview .k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.var-preview ul { margin: 0; padding-left: 18px; }
.var-preview li { margin: 2px 0; }
.var-preview .n { margin-top: 6px; color: var(--muted); }

/* ---------- Perioodilised ---------- */
.month-nav { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.month-nav strong { min-width: 150px; text-align: center; font-weight: 600; text-transform: capitalize; }
.plan-item { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); transition: background 0.1s; }
.plan-item:hover { background: var(--accent-soft-2); }
.plan-item:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.plan-date { width: 48px; height: 52px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.plan-date::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--accent); opacity: 0.75; }
.plan-date b { font-size: 18px; line-height: 1; margin-top: 3px; }
.plan-date span { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; margin-top: 4px; font-weight: 600; }
.plan-main { flex: 1; min-width: 0; }
.plan-main .t { font-weight: 600; }
.plan-main .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-amount { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }

.tpl-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tpl { padding: 20px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: border-color 0.12s, box-shadow 0.15s, transform 0.15s; }
.tpl:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tpl.off { opacity: 0.6; }
.tpl .amount { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.tpl .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-new { border: 1.5px dashed var(--line-strong); background: transparent; box-shadow: none; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; min-height: 150px; }
.tpl-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft-2); }
.tpl-new svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- Statistika ---------- */
.stats-kpis { grid-template-columns: repeat(5, 1fr); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 11px; fill: var(--muted); font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit.on { fill: rgba(16, 24, 22, 0.035); }
.chart .tip { position: absolute; transform: translate(-50%, calc(-100% - 8px)); pointer-events: none; opacity: 0; transition: opacity 0.1s; background: #16211f; color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; min-width: 170px; box-shadow: var(--shadow-lg); z-index: 2; }
.chart .tip.on { opacity: 1; }
.chart .tip .tt { font-weight: 600; margin-bottom: 6px; text-transform: capitalize; }
.chart .tip div { display: flex; align-items: center; gap: 7px; }
.chart .tip b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.chart .tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart .tip .tot { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 6px; padding-top: 6px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: grid; grid-template-columns: minmax(180px, 280px) 1fr 120px; gap: 16px; align-items: center; }
.hb-track { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; }
.hb-val b { display: block; }
.hb-val span { color: var(--muted); font-size: 12px; }

/* ---------- Seaded ---------- */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 24px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; border: 1px solid transparent; }
.subnav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); flex: none; }
.subnav a:hover { background: rgba(16, 24, 22, 0.04); text-decoration: none; }
.subnav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border-color: var(--line); }
.subnav a.active svg { color: var(--accent); }
.section-title { margin-bottom: 4px; font-size: 16px; }
.section-desc { color: var(--muted); margin-bottom: 20px; max-width: 640px; }
.divider { height: 1px; background: var(--line); margin: 26px 0 22px; border: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 38px; color: var(--ink-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.steps li.done::before { content: '✓'; background: var(--accent); color: #fff; }
code, .code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12px; background: var(--surface-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; background: var(--info-soft); color: #243c8f; font-size: 13px; border: 1px solid #d8e1fa; }
.callout.warn { background: var(--warn-soft); color: #7c3d06; border-color: #f6dfbb; }
.callout.danger { background: var(--danger-soft); color: #8a1c13; border-color: #f6cdc8; }
.callout.ok { background: var(--ok-soft); color: #11632f; border-color: #c9e7d2; }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.connected { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; letter-spacing: 0.02em; }
.avatar.solid { background: var(--accent); color: #fff; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; transition: transform 0.1s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.bank-row { display: grid; grid-template-columns: 1fr 1.6fr 0.9fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: none; }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; font-size: 12px; color: #fff; }
.checklist li.done .ck { background: var(--accent); border-color: var(--accent); }
.checklist li.done .t { color: var(--muted); text-decoration: line-through; }
.checklist .t { flex: 1; font-weight: 500; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; width: 120px; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.log { font-size: 12.5px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.log time { color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.log .error { color: var(--danger); }

/* ---------- Modaal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 22, 20, 0.42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; z-index: 50; animation: fadein 0.12s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.modal.wide { width: min(880px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(0.985); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 22px 26px 0; }
.modal-head h2 { font-size: 17px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 18px 26px 10px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 26px 22px; }
.modal-foot .left { margin-right: auto; }
.folder-list { border: 1px solid var(--line); border-radius: 12px; max-height: 320px; overflow: auto; }
.folder-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; }
.folder-list button:hover { background: var(--surface-2); }
.folder-list button:last-child { border-bottom: 0; }
.folder-list svg { width: 18px; height: 18px; color: #d4a017; flex: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.crumbs button { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 2px 4px; border-radius: 5px; }
.crumbs button:hover { background: var(--accent-soft); }

/* ---------- Teated ---------- */
#toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 440px; padding: 12px 16px; border-radius: 12px; background: #16211f; color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop 0.18s ease-out; white-space: pre-line; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: #9ca5a1; }
.toast.ok::before { background: #34d399; }
.toast.error { background: #3b1512; }
.toast.error::before { background: #f87171; }

@media (max-width: 1200px) {
  .editor { grid-template-columns: 1fr; }
  .preview { position: static; }
  .preview-frame { height: 760px; }
  .kpis, .stats-kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; }
  .brand { padding: 4px; }
  .side-new { margin: 0 0 0 auto; padding: 0 14px; height: 34px; }
  .side-label, .sidebar-foot { display: none; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; min-width: 0; scrollbar-width: none; }
  .hero .txt { flex-basis: calc(100% - 90px); }
  .hero .amt { margin-left: 86px; }
  .nav a { white-space: nowrap; }
  .nav a.active::before { display: none; }
  .main { padding: 22px 16px 60px; }
  h1 { font-size: 22px; }
  .hero { flex-wrap: wrap; padding: 18px; }
  .hero .amt { font-size: 22px; }
  .settings { grid-template-columns: 1fr; }
  .subnav { flex-direction: row; overflow-x: auto; position: static; }
  .subnav a { white-space: nowrap; }
  .field.c6, .field.c4, .field.c3, .field.c8, .field.c9 { grid-column: span 12; }
  .kpis, .stats-kpis { grid-template-columns: 1fr 1fr; }
  .hbar { grid-template-columns: 1fr 100px; }
  .hb-track { display: none; }
  .kpi .value { font-size: 21px; }
  .plan-item { flex-wrap: wrap; padding: 14px 16px; }
  .plan-item > .row { min-width: 0 !important; width: 100%; justify-content: flex-start !important; padding-left: 64px; }
  .page-head .actions { margin-left: 0; }
  .detail-list { grid-template-columns: 120px 1fr; }
  .search input { width: 100%; }
}


/* ======================================================================
   Šveitsi kiht: range ruudustik, teravad nurgad, jooned varjude asemel,
   suured paksud numbrid ja üks signaalvärv (oranž) tähelepanu jaoks.
   ====================================================================== */

h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-weight: 800; }

/* lehe päis: paks joon all */
.page-head { border-bottom: 3px solid var(--rule); padding-bottom: 16px; margin-bottom: 28px; align-items: flex-end; }
.page-head .sub { font-size: 13.5px; }
.eyebrow { color: var(--ink-2); letter-spacing: 0.02em; text-transform: none; font-weight: 500; font-size: 13px; }

/* kaardid: ilma varjuta, peenike raam, teravad nurgad */
.card { box-shadow: none; border-color: var(--line-strong); }
.card-head { border-bottom: 1px solid var(--line-strong); min-height: 54px; }
.card-foot { border-top-color: var(--line-strong); }
.card-title .ic, .kpi .ic { display: none; }

/* KPI: suur number, väike silt, joon peal */
.kpi { padding: 16px 18px 18px; border-top: 3px solid var(--rule); }
.kpi .label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -0.04em; margin-top: 18px; }
.kpi.accent { border-top-color: var(--accent); }
.kpi.danger { border-top-color: var(--signal); }
.kpi.danger .value, .kpi.warn .value { color: var(--signal-ink); }
.kpi.warn { border-top-color: var(--signal); }
.kpi.info { border-top-color: var(--rule); }

/* esiletõst: tasane tume plokk, suur number, signaalvärviga tähtaeg */
.hero { background: var(--side-bg); border-radius: var(--radius); box-shadow: none; padding: 24px 28px; gap: 28px; }
.hero::after { display: none; }
.hero .when { background: none; backdrop-filter: none; width: auto; height: auto; align-items: flex-start; border-right: 1px solid rgba(255, 255, 255, 0.18); padding-right: 26px; border-radius: 0; }
.hero .when b { font-size: 56px; font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; }
.hero .when span { letter-spacing: 0.02em; text-transform: none; font-size: 12.5px; opacity: 0.7; margin-top: 8px; }
.hero .k { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; opacity: 1; }
.hero .k::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--signal); margin-right: 8px; vertical-align: 1px; }
.hero .t { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.hero .amt { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.hero .btn { border-radius: var(--radius-sm); }

/* nupud */
.btn { border-radius: var(--radius-sm); box-shadow: none; font-weight: 600; border-color: var(--line-strong); }
.btn.primary { box-shadow: none; }
.btn.sm { border-radius: 3px; }
.side-new { border-radius: var(--radius-sm); box-shadow: none; font-weight: 600; }

/* olekusildid: tasased, ruudukujulise märgiga */
.pill { border-radius: 2px; height: 22px; padding: 0 8px; font-weight: 600; }
.pill::before { border-radius: 1px; width: 7px; height: 7px; }
.pill.overdue { background: var(--signal-soft); color: var(--signal-ink); }
.pill.warn { background: var(--signal-soft); color: var(--signal-ink); }
.tag { border-radius: 2px; }

/* tabelid: tume joon päise all, ilma taustata */
.table th { background: none; border-bottom: 1.5px solid var(--rule); color: var(--ink-2); font-size: 11.5px; letter-spacing: 0.02em; text-transform: none; font-weight: 600; }
.table td { border-bottom-color: var(--line); }
.table tbody tr.click:hover td { background: var(--surface-2); }
.who .avatar { border-radius: 3px; background: var(--surface-3); color: var(--ink); font-weight: 800; font-size: 11.5px; }
.avatar { border-radius: 3px; }

/* vormid */
input[type=text], input[type=email], input[type=number], input[type=date], input[type=month], input[type=password], input[type=url], select, textarea { border-radius: var(--radius-sm); box-shadow: none; }
.field > label, .label { font-weight: 600; color: var(--ink); }
.seg { border-radius: var(--radius-sm); padding: 2px; }
.seg button { border-radius: 2px; }
.seg .count { border-radius: 2px; }
.switch .track { border-radius: 2px; }
.switch .track::after { border-radius: 1px; }

/* külgriba */
.brand strong { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.nav a { border-radius: var(--radius-sm); }
.nav .badge { border-radius: 2px; }
.nav .badge.alert { background: var(--signal); }
.gcard { border-radius: var(--radius-sm); }
.gcard .dot { border-radius: 1px; }
.gcard .dot.off { background: var(--signal); box-shadow: none; }
.gcard .dot.on { box-shadow: none; }
.side-label { letter-spacing: 0.02em; text-transform: none; font-size: 12px; font-weight: 500; }

/* arveldusplaan: kuupäev suure numbrina */
.plan-date { border: 0; box-shadow: none; background: none; width: 44px; height: auto; align-items: flex-start; border-radius: 0; }
.plan-date::before { display: none; }
.plan-date b { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; margin: 0; }
.plan-date span { margin-top: 2px; text-transform: none; letter-spacing: 0; }
.plan-item:hover { background: var(--surface-2); }
.plan-amount { font-weight: 800; font-size: 15px; }

/* mallid */
.tpl:hover { transform: none; box-shadow: none; border-color: var(--rule); }
.tpl .amount { font-weight: 800; font-size: 30px; letter-spacing: -0.04em; }
.tpl-new { border-style: dashed; border-width: 1px; }

/* arve redaktor */
.preview-frame { box-shadow: none; border-color: var(--line-strong); }
.totals { border-radius: var(--radius-sm); background: none; border: 0; border-top: 3px solid var(--rule); padding: 12px 0 0; }
.totals .grand { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.totals .grand span:last-child { color: var(--ink); }
.var, .code, code { border-radius: 2px; }
.var-preview { border-radius: var(--radius-sm); }
.callout { border-radius: var(--radius-sm); }

/* seaded */
.subnav a { border-radius: var(--radius-sm); }
.subnav a.active { box-shadow: none; border-color: var(--rule); }
.connected { border-radius: var(--radius-sm); }
.steps li::before { border-radius: 2px; }
.checklist .ck { border-radius: 2px; }
.progress { border-radius: 0; height: 4px; }
.progress > i { border-radius: 0; }

/* statistika */
.legend i { border-radius: 1px; }
.hb-track, .hb-fill { border-radius: 0; height: 8px; }
.hb-val b { font-weight: 800; }

/* modaalid ja teated */
.modal { border-radius: 6px; }
.modal-head h2 { font-size: 20px; letter-spacing: -0.025em; }
.toast { border-radius: var(--radius-sm); }
.toast::before { border-radius: 1px; }
.empty .icon { border-radius: 4px; box-shadow: none; }

/* ---------- Sisselogimine ---------- */
.side-logout { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--side-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.side-logout:hover { background: var(--side-hover); color: #fff; }
.side-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login { width: min(380px, 100%); }
.login-brand { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; margin-bottom: 36px; }
.login h1 { border-bottom: 3px solid var(--rule); padding-bottom: 14px; margin-bottom: 24px; }
.login .btn { width: 100%; height: 42px; }
.login-error { color: var(--signal-ink); font-size: 13px; min-height: 18px; }
.login-setup { color: var(--ink-2); }
/* esiletõst kitsamal ekraanil: summa ja nupp liiguvad järgmisele reale, tekst ei muutu kitsaks tulbaks */
.hero { flex-wrap: wrap; }
.hero .txt { min-width: 260px; }
