:root {
  --bg: #1E2A6E;
  --surface: #263480;
  --card: #2D3C8F;
  --border: rgba(255,255,255,0.10);
  --text: #F3F6FF;
  --muted: #A6B1E8;
  --accent: #4FC3F7;       /* cyan — primary accent, "good" status, links */
  --accent-warm: #FFA94D;  /* orange — secondary accent for contrast (add-on badges), NOT a status color */
  --accent-purple: #A78BFA; /* purple — third accent, used for "unlimited plans" gauges only */
  --accent-contrast: #04283A; /* dark text used on top of accent-colored buttons/badges */
  --warning: #FFD166;      /* amber — status only, kept distinct from accent-warm */
  --danger: #FF9142;       /* orange — status only, between warning and critical */
  --critical: #FF6B81;     /* coral — status only, the only tier that glows */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* --- Masthead --- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.masthead-left { display: flex; align-items: center; gap: 14px; }
.masthead-mark { display: flex; align-items: flex-end; gap: 3px; }
.masthead-mark .b { width: 6px; background: var(--accent); border-radius: 2px; }
.masthead h1 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.masthead .slash { color: var(--muted); font-weight: 500; }
.masthead-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.masthead-nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.masthead-user { color: var(--muted); font-family: var(--font-mono); }

/* --- Layout --- */
main { padding: 32px clamp(20px, 4vw, 48px) 64px; max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.empty-state { color: var(--muted); font-size: 14px; }
.empty-state.small { margin: 8px 0 20px; }

/* --- Provider card --- */
.provider-card { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 30px rgba(10,16,60,0.25); }
.provider-left { width: 220px; flex-shrink: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.provider-name-row { display: flex; align-items: center; gap: 10px; }
.provider-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 20%, transparent); flex-shrink: 0; }
.provider-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; }
.provider-details { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.provider-stat { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--border); gap: 8px; }
.provider-stat:first-of-type { border-top: none; }
.provider-stat .k { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.provider-stat .v { font-family: var(--font-mono); font-size: 12px; color: var(--text); text-align: right; }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.gauge-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; margin-top: -34px; }
.gauge-value .unit-inline { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.gauge-cap { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 15px; text-align: center; }
.gauge-label { font-size: 11px; color: var(--muted); margin-top: 2px; text-align: center; }
.gauge-wrap-small { margin-top: -6px; }
.provider-unlimited-note { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; padding-top: 4px; }
.provider-unlimited-note .k { color: var(--muted); }
.provider-unlimited-note .v { font-family: var(--font-mono); color: var(--accent-purple); font-weight: 600; }
.provider-sep { width: 1px; background: var(--border); flex-shrink: 0; }
.provider-right { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px; align-content: start; }

/* --- SIM card ---
   Glow is always on, colored per status tier — it's a consistent visual
   language, not an alarm reserved for one state. Critical additionally
   pulses (card top-border glow only) so the most urgent tier still reads
   as more urgent than "just red," without every other tier being static
   by comparison. */
@keyframes bd-critical-pulse {
  0%, 100% { box-shadow: 0 -16px 26px -14px color-mix(in srgb, var(--critical) 55%, transparent); }
  50% { box-shadow: 0 -18px 32px -10px color-mix(in srgb, var(--critical) 90%, transparent); }
}
@keyframes bd-danger-pulse {
  0%, 100% { box-shadow: 0 -16px 26px -14px color-mix(in srgb, var(--danger) 50%, transparent); }
  50% { box-shadow: 0 -18px 32px -10px color-mix(in srgb, var(--danger) 85%, transparent); }
}
.sim-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; border-top: 3px solid var(--border); min-width: 0;
  box-shadow: 0 -16px 26px -14px color-mix(in srgb, var(--border) 70%, transparent);
}
.sim-card.level-warning { border-top-color: var(--warning); box-shadow: 0 -16px 26px -14px color-mix(in srgb, var(--warning) 55%, transparent); }
.sim-card.level-danger { border-top-color: var(--danger); animation: bd-danger-pulse 1.8s ease-in-out infinite; }
.sim-card.level-critical { border-top-color: var(--critical); animation: bd-critical-pulse 1.8s ease-in-out infinite; }
.sim-card.level-missing { border-top-color: var(--critical); border-top-style: dashed; opacity: 0.85; box-shadow: 0 -16px 26px -14px color-mix(in srgb, var(--critical) 40%, transparent); }

.sim-title-row { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.sim-multisim-badge { font-size: 10px; color: var(--accent-warm); margin: 0 0 6px 21px; font-family: var(--font-mono); }
.sim-device-icon { color: var(--muted); display: flex; flex-shrink: 0; }
.sim-number { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0 0 10px; margin-left: 21px; }
.sim-label { font-weight: 600; font-size: 15px; margin: 0; }
.sim-plan { font-size: 12px; font-weight: 700; color: var(--text); margin: 0 0 8px; }

.sim-metric { margin-top: 10px; }
.sim-metric:first-of-type { margin-top: 0; }
.sim-metric-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.sim-metric-row .k { flex-shrink: 0; }
.sim-metric-row .val { font-family: var(--font-mono); font-size: 12px; color: var(--text); text-align: right; }
.sim-bar-track { height: 6px; background: var(--border); border-radius: 4px; }
.sim-bar-track-disabled {
  background: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--border) 90%, transparent),
    color-mix(in srgb, var(--border) 90%, transparent) 4px,
    color-mix(in srgb, var(--muted) 25%, transparent) 4px,
    color-mix(in srgb, var(--muted) 25%, transparent) 8px
  );
  opacity: 0.8;
}
.sim-bar-fill {
  height: 100%; border-radius: 4px; background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 75%, transparent);
}
.sim-bar-fill.level-warning { background: var(--warning); box-shadow: 0 0 8px color-mix(in srgb, var(--warning) 80%, transparent); }
.sim-bar-fill.level-danger { background: var(--danger); box-shadow: 0 0 8px color-mix(in srgb, var(--danger) 80%, transparent); }
.sim-bar-fill.level-critical { background: var(--critical); box-shadow: 0 0 9px color-mix(in srgb, var(--critical) 85%, transparent); }
.sim-bar-fill.unlimited { width: 100%; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 75%, transparent); }
.sim-projection { font-size: 10px; color: var(--muted); margin-top: 4px; text-align: right; }
.sim-projection.warning { color: var(--warning); }
.sim-projection.danger { color: var(--danger); }
.sim-projection.critical { color: var(--critical); }

.sim-lower { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.sim-lower .sim-stat:first-of-type { border-top: none; padding-top: 0; }

.sim-stat { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--border); gap: 8px; }
.sim-stat:first-of-type { border-top: none; }
.sim-stat .k { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.sim-stat .v { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.sim-stat .v.tight { color: var(--warning); }
.sim-stat .v.gone { color: var(--critical); }
.sim-addon-slot { min-height: 32px; margin-top: 10px; }
.sim-addon { background: color-mix(in srgb, var(--accent-warm) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent-warm) 40%, transparent); border-radius: 8px; padding: 6px 8px; font-size: 11px; color: var(--accent-warm); }
.sim-expiry { margin-top: 10px; font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }

@media (max-width: 720px) {
  .provider-card { flex-direction: column; }
  .provider-left { width: auto; }
  .provider-sep { width: auto; height: 1px; }
  .provider-right { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 900px) {
  .provider-right { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Login page --- */
.login-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px 28px; text-align: center; box-shadow: 0 12px 30px rgba(10,16,60,0.25); }
.login-card .masthead-mark { justify-content: center; margin-bottom: 14px; }
.login-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0; }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-form label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.login-form input { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); font-family: var(--font-body); font-size: 14px; }
.login-form input:focus { outline: none; border-color: var(--accent); }
.login-form button { margin-top: 6px; background: var(--accent); color: var(--accent-contrast); border: none; border-radius: 8px; padding: 11px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--font-body); }
.login-form button:hover { opacity: 0.9; }
.form-error { background: color-mix(in srgb, var(--critical) 15%, transparent); border: 1px solid color-mix(in srgb, var(--critical) 40%, transparent); color: var(--critical); font-size: 12px; padding: 8px 10px; border-radius: 6px; margin: 0 0 16px; }
.form-success { background: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); font-size: 12px; padding: 8px 10px; border-radius: 6px; margin: 0 0 16px; }

/* --- Admin panel --- */
.admin-nav { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a { font-size: 13px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); }
.admin-nav a.active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.admin-nav a:hover { text-decoration: none; border-color: var(--accent); }

.provider-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.provider-tabs a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border); color: var(--text); background: var(--card); }
.provider-tabs a .provider-dot { width: 8px; height: 8px; }
.provider-tabs a.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.provider-tabs a:hover { text-decoration: none; border-color: var(--accent); }

.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: 0 12px 30px rgba(10,16,60,0.25); }
.admin-panel h2 { font-family: var(--font-display); font-size: 16px; margin: 0 0 4px; }
.admin-panel .panel-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .mono { font-family: var(--font-mono); color: var(--muted); }

/* Lines table: each line is a data-row + actions-row (+ an edit-row when
   open), styled to read as one connected unit rather than three separate
   table rows. Actions-row cells sit in the SAME column positions as the
   data row (some left empty) so buttons land under their related column
   instead of floating in one long strip. */
.lines-table .line-row td { border-bottom: none; padding-bottom: 3px; }
.lines-table .line-actions-row td { border-bottom: 1px solid var(--border); padding-top: 2px; padding-bottom: 12px; }
.lines-table .line-actions-row.is-editing td { border-bottom: none; }
.lines-table .line-row.is-editing td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.lines-table .line-actions-row.is-editing td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.lines-table .line-actions-row form { display: inline-block; }
.lines-table .line-actions-row .btn { margin-right: 6px; }
.lines-table .line-edit-row td {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 18px;
}
.lines-table th.col-order, .lines-table td.col-order { width: 110px; }
.lines-table th.col-label, .lines-table td.col-label { width: 130px; }
.lines-table th.col-status, .lines-table td.col-status { width: 190px; text-align: right; }

.cell-sub-line { display: block; margin-top: 4px; }
.status-pulse-line { display: flex; align-items: center; gap: 6px; justify-content: flex-end; cursor: default; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--critical);
  flex-shrink: 0; animation: bd-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes bd-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--critical) 55%, transparent); opacity: 1; }
  50% { box-shadow: 0 0 0 5px transparent; opacity: 0.55; }
}

.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-family: var(--font-body); }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); font-weight: 600; }
.btn-danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 40%, transparent); }
.btn-danger:hover { border-color: var(--critical); }
.btn-sm { padding: 4px 9px; font-size: 11px; }

.role-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-family: var(--font-mono); }
.role-badge.admin { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.role-badge.viewer { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.status-missing-line { display: block; margin-top: 5px; }

.field-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; align-items: end; }
.field-form label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.field-form input, .field-form select { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; color: var(--text); font-family: var(--font-body); font-size: 13px; }
.field-form input:focus, .field-form select:focus { outline: none; border-color: var(--accent); }
.field-form .form-actions { display: flex; align-items: flex-end; }

.section-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

.app-footer { text-align: center; padding: 24px 0 12px; color: var(--muted); font-size: 11px; font-family: var(--font-mono); }
.app-footer p { margin: 0 0 4px; }
.app-footer p:last-child { margin-bottom: 0; }
.app-footer a { color: var(--accent); }
.app-footer a:hover { text-decoration: underline; }

/* --- Totals section: aggregate gauges + monthly chart, split evenly --- */
/* 2/3 + 1/3 grid: gauges | year card on top, daily | monthly chart below. */
.totals-section {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px 28px;
  grid-template-areas: "gauges year" "daily monthly";
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; box-shadow: 0 12px 30px rgba(10,16,60,0.25);
}
.totals-gauges-col { grid-area: gauges; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.totals-year-card { grid-area: year; min-width: 0; display: flex; flex-direction: column; gap: 16px; justify-content: flex-start; align-self: start;
  background: color-mix(in srgb, var(--card) 60%, transparent); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.totals-year-card h2 { margin: 0; }
.totals-year-card .totals-chart-sub { margin: -14px 0 0; }
.totals-daily { grid-area: daily; min-width: 0; padding-top: 18px; border-top: 1px solid var(--border); }
.totals-monthly { grid-area: monthly; min-width: 0; padding-top: 18px; border-top: 1px solid var(--border); }
.totals-section h2 { font-family: var(--font-display); font-size: 15px; margin: 0 0 2px; }

.year-stat { border-left: 3px solid var(--c); padding-left: 12px; }
.year-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.year-stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 26px; color: var(--c); line-height: 1.2; }
.year-stat-value .unit-inline { font-size: 0.5em; color: var(--muted); font-weight: 500; margin-left: 4px; }
.year-stat-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.year-split { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-family: var(--font-mono); font-size: 12px; margin: 6px 0 4px; }
.year-split .k { color: var(--muted); font-family: var(--font-body); }
.year-split .k i, .sub-chart-title i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.year-split .v { text-align: right; font-weight: 600; }
.year-split .pct { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 4px; }
.year-split-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; margin: 6px 0 2px; gap: 2px; }
.year-split-bar span { display: block; height: 100%; }
.sub-chart-title { font-size: 12px; font-weight: 600; margin: 10px 0 0; color: var(--text); }
/* Every row of the left column is the same 2-column grid (data | int'l
   minutes), so this month, last month and the year figures line up. */
/* Data area gets 2/3 of the row (gauge + badges side by side), int'l
   minutes the remaining 1/3. The gauge sits in a fixed 150px cell so the
   smaller last-month gauge centers exactly under this month's. */
.totals-gauges-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: center; justify-items: center; }
.totals-gauge-group { display: grid; grid-template-columns: 150px auto; align-items: center; justify-items: center; gap: 18px; }
.totals-unlimited-note { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.totals-unlimited-note:empty { display: none; }
.pill { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.pill .k { font-family: var(--font-body); font-weight: 500; opacity: 0.85; }
.pill-unlimited { color: color-mix(in srgb, var(--accent-purple) 70%, white); background: color-mix(in srgb, var(--accent-purple) 18%, transparent); border-color: color-mix(in srgb, var(--accent-purple) 55%, transparent); }
.pill-total { color: var(--text); background: color-mix(in srgb, var(--text) 10%, transparent); border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.totals-gauges-row-small { padding-top: 14px; border-top: 1px solid var(--border); }
.totals-gauges-row-small .totals-gauge { opacity: 0.85; }
.totals-gauges-row-small .pill { font-size: 12px; padding: 3px 11px; }
.totals-year-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.totals-year-group { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.totals-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; }
.totals-gauge-value { font-family: var(--font-mono); font-weight: 600; margin-top: -30px; }
.totals-gauge-value .unit-inline { font-size: 0.5em; color: var(--muted); font-weight: 500; margin-left: 3px; }
.totals-gauge-cap { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 15px; }
.totals-gauge-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Year totals are shown as plain value markers, not gauges — there's no
   meaningful "cap" to ring a year against (caps reset monthly). */
.year-marker { display: flex; flex-direction: column; align-items: center; text-align: center; }
.year-marker-value { font-family: var(--font-mono); font-weight: 700; font-size: 24px; }
.year-marker-value .unit-inline { font-size: 0.5em; color: var(--muted); font-weight: 500; margin-left: 3px; }
.year-marker-small .year-marker-value { font-size: 15px; font-weight: 600; opacity: 0.85; }
.year-marker-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

.totals-chart-col { flex: 1 1 320px; min-width: 0; }
.totals-chart-col h2 { font-family: var(--font-display); font-size: 15px; margin: 0 0 2px; }

.bar-group .bar-value-label { opacity: 1; transition: opacity 0.15s ease; pointer-events: none; }
.bar-group .bar-hover-target { cursor: default; }
/* Compact (daily) chart: only the tallest bar is labelled; others on hover. */
.bar-chart.compact .bar-group .bar-value-label { opacity: 0; }
.bar-chart.compact .bar-group.is-peak .bar-value-label { opacity: 1; }
.bar-chart.compact:hover .bar-group.is-peak:not(:hover) .bar-value-label { opacity: 0; }
.bar-chart.compact .bar-group:hover .bar-value-label { opacity: 1; }
.bar-group.is-empty .bar-rect { filter: none; }
.bar-rect { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--bar-color, var(--accent)) 55%, transparent)); transition: filter 0.15s ease; }
.bar-group:hover .bar-rect { filter: drop-shadow(0 0 9px color-mix(in srgb, var(--bar-color, var(--accent)) 85%, transparent)) brightness(1.12); }
.totals-chart-sub { font-size: 12px; color: var(--muted); margin: 0 0 14px; }

@media (max-width: 720px) {
  .totals-section { grid-template-columns: 1fr; grid-template-areas: "gauges" "year" "daily" "monthly"; }
  .totals-gauges-row { gap: 12px; grid-template-columns: 1fr; }
  .totals-gauge-group { grid-template-columns: 1fr; gap: 10px; }
}
