/* =========================================================================
   Heat pump metering — stylesheet
   A light, calm interface with a warm/cool data palette: amber for heat
   meter 1, cyan for heat meter 2, violet for electricity.
   ========================================================================= */

:root {
  --bg: #f2f5fa;
  --bg-accent: radial-gradient(1100px 520px at 12% -10%, #e0e9ff 0%, transparent 60%),
               radial-gradient(900px 460px at 100% 0%, #ffeede 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --border: #e2e8f2;
  --border-strong: #cbd5e6;
  --text: #101828;
  --text-soft: #475467;
  --muted: #7a8699;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-ink: #ffffff;
  --heat1: #f97316;
  --heat2: #06b6d4;
  --elec: #8b5cf6;
  --ok: #0f9d68;
  --ok-soft: #e6f7f0;
  --warn: #d97706;
  --warn-soft: #fef3e2;
  --danger: #dc2626;
  --danger-soft: #fdeceb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.07), 0 2px 4px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 24px 48px rgba(16, 24, 40, 0.16), 0 8px 16px rgba(16, 24, 40, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --topbar-h: 62px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #070b14;
  --bg-accent: radial-gradient(1100px 520px at 12% -10%, #16224a 0%, transparent 60%),
               radial-gradient(900px 460px at 100% 0%, #2a1a12 0%, transparent 55%);
  --surface: #0f1729;
  --surface-2: #131d33;
  --surface-3: #1a2540;
  --border: #22304d;
  --border-strong: #33456b;
  --text: #e9eefb;
  --text-soft: #b3c0d8;
  --muted: #8595b3;
  --accent: #6366f1;
  --accent-hover: #7c7ff5;
  --accent-soft: #1b2246;
  --accent-ink: #ffffff;
  --heat1: #fb923c;
  --heat2: #22d3ee;
  --elec: #a78bfa;
  --ok: #34d399;
  --ok-soft: #10291f;
  --warn: #fbbf24;
  --warn-soft: #2c2110;
  --danger: #f87171;
  --danger-soft: #2c1518;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-accent);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Inline SVG icons reference the sprite in index.html.
   The artwork is drawn on a 24x24 grid, so one user unit maps to 16/24 = 0.667px
   at the default 16px size. Stroke widths below are therefore stated in grid
   units and chosen so every size still renders at the intended ~1.8px weight:
   16px -> 2.7, 18px -> 2.4, 13px -> 3.3. */
.ico {
  width: 16px; height: 16px;
  flex: none;
  display: inline-block;
  vertical-align: -2.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark .ico { color: #fff; width: 18px; height: 18px; vertical-align: 0; stroke-width: 2.4; }
.badge .ico, .kpi-label .ico { width: 13px; height: 13px; vertical-align: -2px; stroke-width: 3.3; }

.num, .kpi-value, td.num, .chart-tick, .donut-value, .money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--heat1), var(--heat2));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--heat1) 35%, transparent);
  flex: none;
}
.brand-mark svg { width: 19px; height: 19px; display: block; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; }

.nav { display: flex; gap: 3px; margin-left: 8px; }

.nav-link {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 13px;
  font-weight: 550;
  color: var(--text-soft);
}
.avatar {
  width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--elec));
  color: #fff; font-size: 11px; font-weight: 700;
  flex: none;
}

/* ------------------------------------------------------------------ layout */

.container { max-width: 1280px; margin: 0 auto; padding: 26px 22px 72px; }

.page-head { margin-bottom: 22px; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.page-title { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 3px; }
.page-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); }
.chart-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.two-col { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14.5px; font-weight: 650; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.card-head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 10px 14px 14px; }
.card-body.flush { padding: 0; }

/* --------------------------------------------------------------- KPI tiles */

.kpi {
  position: relative;
  padding: 16px 17px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.kpi::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--kpi-color, var(--accent));
}
.kpi-label {
  font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 6px;
}
.kpi-value { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; margin-top: 8px; line-height: 1.1; }
.kpi-unit { font-size: 14px; font-weight: 550; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi-foot { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.dot-heat1 { background: var(--heat1); }
.dot-heat2 { background: var(--heat2); }
.dot-elec { background: var(--elec); }
.dot-accent { background: var(--accent); }

/* ----------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px;
  font-family: inherit; font-size: 14px; font-weight: 580;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn svg { width: 15px; height: 15px; flex: none; }

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px; font-weight: 620;
  border-radius: 999px;
  background: var(--surface-3); color: var(--text-soft);
  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-accent { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------------------------------------------ charts */

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-weight: 500; }
.chart-empty { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.chart-bar { transition: opacity 0.15s; }
.chart-hit { cursor: crosshair; }
.chart-dot { transition: r 0.15s; }
.chart-arc { transition: opacity 0.15s; }
.chart-arc:hover { opacity: 0.82; }
.donut-value { fill: var(--text); font-size: 24px; font-weight: 700; font-family: var(--font); letter-spacing: -0.03em; }
.donut-label { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font); letter-spacing: 0.04em; text-transform: uppercase; }

.chart-tip {
  position: fixed; top: 0; left: 0; z-index: 90;
  min-width: 140px; max-width: 260px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}
.chart-tip.is-visible { opacity: 1; }
.chart-tip-title { font-weight: 680; margin-bottom: 6px; font-size: 12.5px; }
.chart-tip-row { display: flex; align-items: center; gap: 7px; padding: 1.5px 0; color: var(--text-soft); }
.chart-tip-row strong { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chart-tip-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-soft); font-weight: 520; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  padding: 11px 13px;
  text-align: left;
  font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data th.num, table.data td.num { text-align: right; }
table.data td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tr.is-baseline td { color: var(--muted); }
table.data tr.is-baseline .primary-cell { color: var(--muted); font-weight: 500; }
.primary-cell { font-weight: 620; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.strong { font-weight: 650; }

.th-group {
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
}
.th-group th { background: var(--surface-3); border-bottom: none; padding-bottom: 6px; }

.row-actions { display: flex; gap: 5px; justify-content: flex-end; }

.att-dots { display: inline-flex; gap: 4px; }
.att-dot {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
}
.att-dot.is-on { background: var(--accent-soft); color: var(--accent); }
.att-dot svg { width: 12px; height: 12px; }

/* ------------------------------------------------------------------ forms */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 12.5px; font-weight: 620; color: var(--text-soft); }
.field .hint { font-size: 12px; color: var(--muted); }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="date"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit; font-size: 14.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}
textarea { resize: vertical; min-height: 74px; font-variant-numeric: normal; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
input:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); }
input.is-invalid { border-color: var(--danger); }

.input-affix { position: relative; display: flex; align-items: center; }
.input-affix input { padding-right: 52px; }
.input-affix .suffix {
  position: absolute; right: 11px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  pointer-events: none;
}

.calc-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-soft);
}
.calc-strip strong { color: var(--text); font-variant-numeric: tabular-nums; }
.calc-strip .sep { color: var(--border-strong); }

/* -------------------------------------------------------------- attachment */

.att-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.att-slot {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 13px;
  min-height: 148px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.att-slot.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.att-slot.has-file { border-style: solid; background: var(--surface); }
.att-slot-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 620; color: var(--text-soft); }
.att-slot-head .badge { margin-left: auto; }
.att-preview {
  flex: 1; min-height: 70px;
  display: grid; place-items: center;
  border-radius: var(--radius-xs);
  background: var(--surface-3);
  overflow: hidden;
}
.att-preview img { width: 100%; height: 100%; max-height: 130px; object-fit: cover; display: block; }
.att-preview .att-icon { color: var(--muted); }
.att-preview svg { width: 30px; height: 30px; }
.att-name { font-size: 11.5px; color: var(--muted); word-break: break-all; line-height: 1.4; }
.att-actions { display: flex; gap: 6px; }
.att-empty { font-size: 12px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 34px 16px;
  background: color-mix(in srgb, #0a1020 55%, transparent);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.modal {
  width: 100%; max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  margin: auto 0;
}
.modal.narrow { max-width: 430px; }
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 680; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.modal-body { padding: 20px; max-height: min(66vh, 640px); overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 9px;
  padding: 15px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.modal-foot .spacer { margin-left: auto; }

.section-label {
  font-size: 11px; font-weight: 680; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); margin: 4px 0 11px;
}
.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------ toasts */

.toast-root {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; max-width: 380px;
  padding: 12px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 520;
  animation: rise 0.2s ease;
  pointer-events: auto;
}
.toast.is-ok { border-left-color: var(--ok); }
.toast.is-error { border-left-color: var(--danger); }
.toast.is-warn { border-left-color: var(--warn); }

/* ------------------------------------------------------------- audit trail */

.audit-list { display: flex; flex-direction: column; }
.audit-item {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.audit-item:last-child { border-bottom: none; }
.audit-item:hover { background: var(--surface-2); }
.audit-when { font-size: 12px; color: var(--muted); line-height: 1.5; }
.audit-when strong { display: block; color: var(--text-soft); font-weight: 620; font-size: 12.5px; }
.audit-what { min-width: 0; }
.audit-summary { font-size: 13.5px; }
.audit-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.audit-diff {
  margin-top: 8px; padding: 9px 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  display: flex; flex-direction: column; gap: 3px;
  overflow-x: auto;
}
.audit-diff .k { color: var(--muted); }
.audit-diff .from { color: var(--danger); text-decoration: line-through; }
.audit-diff .to { color: var(--ok); }
@media (max-width: 700px) { .audit-item { grid-template-columns: 1fr; gap: 6px; } }

.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { width: auto; min-width: 140px; font-size: 13px; padding: 7px 10px; }

/* ------------------------------------------------------------- empty state */

.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg { width: 42px; height: 42px; margin-bottom: 12px; color: var(--border-strong); }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 5px; }
.empty p { font-size: 13.5px; max-width: 420px; margin: 0 auto 16px; }

/* ------------------------------------------------------------------- misc */

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-xs);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.divider { height: 1px; background: var(--border); margin: 18px 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.spacer { margin-left: auto; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.stat-line {
  display: flex; align-items: baseline; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.stat-line:last-child { border-bottom: none; }
.stat-line .label { color: var(--text-soft); }
.stat-line .value { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }

.callout {
  display: flex; gap: 11px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
}
.callout-info { background: var(--accent-soft); color: var(--text-soft); }
.callout-warn { background: var(--warn-soft); color: var(--text-soft); }
.callout svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

.upload-progress {
  height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 7px;
}
.upload-progress span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .container { padding: 18px 14px 60px; }
  .topbar { padding: 0 13px; gap: 10px; }
  .brand-sub { display: none; }
  .nav { margin-left: 0; }
  .nav-link { padding: 6px 9px; font-size: 13px; }
  .page-title { font-size: 21px; }
  .kpi-value { font-size: 23px; }
}
