/* ─────────────────────────────────────────────────────────────
   Wet&Wild Dashboard — Styles
   Classic BI tool aesthetic (Power BI / Tableau)
   ───────────────────────────────────────────────────────────── */

:root {
  --ww-sans: 'Geist', 'Inter Tight', system-ui, sans-serif;
  --ww-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --ww-bg:        #F4F6F8;
  --ww-bg-deep:   #ECEFF3;
  --ww-card:      #FFFFFF;
  --ww-border:    #E4E7EB;
  --ww-border-strong: #CFD4DB;
  --ww-text:      #0F172A;
  --ww-text-2:    #475569;
  --ww-text-3:    #94A3B8;

  --ww-blue:      #1E6FB8;
  --ww-blue-bg:   #E7F0F9;
  --ww-cyan:      #0EA5E9;
  --ww-teal:      #22C5BC;
  --ww-amber:     #F59E0B;
  --ww-pos:       #15803D;
  --ww-pos-bg:    #E5F4EB;
  --ww-neg:       #B91C1C;
  --ww-neg-bg:    #FBEAEA;

  --ww-radius:    6px;
  --ww-shadow:    0 1px 2px rgba(15,23,42,0.04), 0 0 0 1px rgba(15,23,42,0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--ww-sans);
  font-feature-settings: 'cv11', 'ss03';
  color: var(--ww-text);
  background: var(--ww-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ww-mono { font-family: var(--ww-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--ww-mono); font-variant-numeric: tabular-nums; text-align: right; }
.strong { font-weight: 600; color: var(--ww-text); }

/* ────────────── shared chrome ────────────── */

.ww-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ww-bg);
}

.ww-header {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--ww-border);
  flex-shrink: 0;
}

.ww-brand { display: flex; align-items: center; gap: 10px; }
.ww-brand-mark {
  width: 32px; height: 32px;
  background: var(--ww-blue);
  color: white;
  border-radius: 8px;
  display: grid; place-items: center;
}
.ww-brand-name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.ww-brand-sub  { font-size: 11px; color: var(--ww-text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.ww-nav {
  display: flex;
  gap: 2px;
  align-self: stretch;
  align-items: center;
}
.ww-tab {
  height: 32px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ww-text-2);
  cursor: pointer;
  position: relative;
}
.ww-tab:hover { background: var(--ww-bg-deep); color: var(--ww-text); }
.ww-tab.active { color: var(--ww-blue); font-weight: 600; }
.ww-tab.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -16px;
  height: 2px;
  background: var(--ww-blue);
  border-radius: 1px;
}

.ww-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ww-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--ww-bg-deep);
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  color: var(--ww-text-3);
  font-size: 12px;
  width: 220px;
}
.ww-search kbd {
  margin-left: auto;
  font-family: var(--ww-mono);
  font-size: 10.5px;
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--ww-text-2);
}

.ww-icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ww-text-2);
  cursor: pointer;
}
.ww-icon-btn:hover { background: var(--ww-bg-deep); border-color: var(--ww-border); }

.ww-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E6FB8, #22C5BC);
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.ww-avatar.lg { width: 36px; height: 36px; font-size: 12px; }

/* ────────────── filter bar ────────────── */

.ww-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--ww-border);
  flex-shrink: 0;
}
.ww-grow { flex: 1; }

.ww-segment {
  display: inline-flex;
  background: var(--ww-bg-deep);
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  padding: 2px;
}
.ww-segment button {
  height: 24px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--ww-text-2);
  border-radius: 3px;
  cursor: pointer;
}
.ww-segment button.active {
  background: #fff;
  color: var(--ww-text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,0.08);
}

.ww-datepicker {
  display: flex; align-items: center; gap: 8px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  color: var(--ww-text-2);
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
}
.ww-datepicker svg { color: var(--ww-text-3); }

.ww-weather-strip {
  display: flex; align-items: center; gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  color: var(--ww-text-2);
}
.ww-weather-icon { color: var(--ww-amber); display: inline-flex; }
.ww-divider { width: 1px; height: 12px; background: var(--ww-border); }

/* ────────────── KPI tiles ────────────── */

.ww-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 12px 20px 0;
  flex-shrink: 0;
}
.ww-kpi {
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}
.ww-kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.ww-kpi-label { font-size: 11.5px; color: var(--ww-text-2); letter-spacing: 0.02em; }
.ww-kpi-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ww-kpi-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: auto;
  gap: 8px;
}
.ww-kpi-sub { font-size: 11px; color: var(--ww-text-3); font-family: var(--ww-mono); }

.ww-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--ww-mono);
}
.ww-delta.pos { color: var(--ww-pos); background: var(--ww-pos-bg); }
.ww-delta.neg { color: var(--ww-neg); background: var(--ww-neg-bg); }
.ww-delta-arrow { font-size: 8px; }

/* ────────────── grid + panels ────────────── */

.ww-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  padding: 12px 20px 20px;
  flex: 1;
  min-height: 0;
}

.ww-panel {
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ww-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ww-panel-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.ww-panel-head p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ww-text-3);
}
.ww-panel-body { flex: 1; min-height: 0; }

.ww-link-btn {
  background: transparent;
  border: 0;
  color: var(--ww-blue);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
}
.ww-link-btn:hover { text-decoration: underline; }

/* ────────────── legend ────────────── */

.ww-legend {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  color: var(--ww-text-2);
}
.ww-legend span {
  display: inline-flex; align-items: center; gap: 5px;
}
.ww-legend i {
  width: 10px; height: 3px;
  border-radius: 1px;
  display: inline-block;
}
.ww-legend i[style*="dashed"] { border-top: 2px dashed currentColor; background: transparent !important; }
.ww-legend-bottom {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.ww-mini-legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--ww-text-3);
}
.ww-mini-legend i {
  width: 14px; height: 10px; border-radius: 2px; display: inline-block;
}

/* ────────────── tooltip ────────────── */

.ww-tooltip {
  position: absolute;
  z-index: 50;
  background: #0F172A;
  color: #fff;
  font-size: 11.5px;
  border-radius: 5px;
  padding: 8px 10px;
  pointer-events: none;
  transform: translate(12px, -100%);
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.18);
}
.ww-tooltip-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 11px;
  color: #CBD5E0;
}
.ww-tooltip-row {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.ww-tooltip-key { color: #94A3B8; margin-right: 4px; }
.ww-tooltip-val { margin-left: auto; font-weight: 600; }
.ww-tooltip-sub { font-size: 10.5px; color: #94A3B8; margin-top: 4px; }
.ww-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ────────────── donut ────────────── */

.ww-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ww-donut-center {
  position: relative;
  flex-shrink: 0;
}
.ww-donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ww-donut-total { font-size: 18px; font-weight: 600; font-family: var(--ww-mono); letter-spacing: -0.01em; }
.ww-donut-sub { font-size: 10.5px; color: var(--ww-text-3); }

.ww-legend-list {
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 6px;
}
.ww-legend-list li {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.ww-legend-name { color: var(--ww-text-2); }
.ww-legend-val { font-family: var(--ww-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.ww-legend-pct { font-family: var(--ww-mono); color: var(--ww-text-3); font-size: 11px; min-width: 28px; text-align: right; }

/* ────────────── gauges ────────────── */

.ww-gauges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ww-gauge { text-align: center; }
.ww-gauge-meta {
  display: flex; flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--ww-text-3);
  margin-top: 2px;
  line-height: 1.3;
}
.ww-gauge-meta span:first-child { color: var(--ww-text); font-weight: 600; font-family: var(--ww-mono); }

/* ────────────── tables ────────────── */

.ww-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ww-table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  color: var(--ww-text-3);
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-bottom: 1px solid var(--ww-border);
  border-right: 1px solid var(--ww-border);
  background: #FAFBFC;
}
.ww-table thead th:last-child { border-right: 0; }
.ww-table thead th.num { text-align: right; padding-right: 16px; }
.ww-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--ww-border);
  border-right: 1px solid #F1F3F5;
  color: var(--ww-text-2);
}
.ww-table tbody td:last-child { border-right: 0; }
.ww-table tbody td.num { padding-right: 16px; }
.ww-table tbody td.num { color: var(--ww-text); }
.ww-table tbody td.strong { font-weight: 600; }
.ww-table-name {
  color: var(--ww-text) !important;
  font-weight: 500;
}
.ww-table tbody tr:hover { background: var(--ww-bg); }
.ww-table tbody tr:last-child td { border-bottom: 0; }
.ww-table-compact tbody td { padding: 6px 8px; }
.ww-row-active { background: var(--ww-blue-bg) !important; }
.ww-row-active td { color: var(--ww-text) !important; }

.ww-bar-cell {
  height: 6px;
  background: var(--ww-bg-deep);
  border-radius: 2px;
  overflow: hidden;
}
.ww-bar-cell-fill {
  height: 100%;
  background: var(--ww-blue);
  border-radius: 2px;
}

.ww-weather-cell { display: inline-flex; gap: 6px; align-items: center; }
.ww-weather-pill {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--ww-bg-deep);
}
.ww-weather-pill.sun { background: #FEF3C7; }
.ww-weather-pill.rain { background: #E0E7EB; }

/* ────────────── drill-down ────────────── */

.ww-drill {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--ww-blue-bg);
  border: 1px solid #C9DEEF;
  border-radius: 4px;
}
.ww-drill-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--ww-blue);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ww-drill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ww-drill-grid > div {
  display: flex; flex-direction: column;
}
.ww-drill-grid span { font-size: 11px; color: var(--ww-text-3); }
.ww-drill-grid b { font-size: 14px; font-family: var(--ww-mono); font-weight: 600; }

/* ────────────── footer ────────────── */

.ww-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  font-size: 11px;
  color: var(--ww-text-3);
  background: #fff;
  border-top: 1px solid var(--ww-border);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   VARIATION B  —  Executive Briefing
   ───────────────────────────────────────────────────────────── */

.ww-b { flex-direction: row; background: var(--ww-bg); }

.ww-side {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--ww-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.ww-side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 22px;
  border-bottom: 1px solid var(--ww-border);
}
.ww-side-logo {
  width: 32px; height: 32px;
  background: var(--ww-blue);
  color: #fff;
  border-radius: 8px;
  display: grid; place-items: center;
}
.ww-side-name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; }
.ww-side-sub { font-size: 11px; color: var(--ww-text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.ww-sidenav {
  flex: 1;
  padding: 14px 8px;
  overflow-y: auto;
}
.ww-sidenav-group {
  font-size: 10.5px;
  color: var(--ww-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 12px 6px;
}
.ww-sidenav-item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ww-text-2);
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
}
.ww-sidenav-item:hover { background: var(--ww-bg-deep); color: var(--ww-text); }
.ww-sidenav-item.active {
  background: var(--ww-blue-bg);
  color: var(--ww-blue);
  font-weight: 600;
}
.ww-sidenav-ic {
  width: 18px;
  text-align: center;
  color: var(--ww-text-3);
  font-family: var(--ww-mono);
}
.ww-sidenav-item.active .ww-sidenav-ic { color: var(--ww-blue); }

.ww-side-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--ww-border);
}
.ww-side-user { font-size: 13px; font-weight: 600; }
.ww-side-role { font-size: 11px; color: var(--ww-text-3); }

.ww-main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 32px;
  min-width: 0;
}

.ww-main-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.ww-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ww-text-3);
  letter-spacing: 0.08em;
  font-family: var(--ww-mono);
  margin-bottom: 6px;
}
.ww-main-head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
.ww-main-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ww-text-2);
}
.ww-main-head-right {
  display: flex; gap: 8px; align-items: center;
}

.ww-btn-primary, .ww-btn-secondary {
  height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ww-btn-primary {
  background: var(--ww-blue);
  border: 1px solid var(--ww-blue);
  color: #fff;
  font-weight: 600;
}
.ww-btn-primary:hover { background: #195F9F; }
.ww-btn-secondary {
  background: #fff;
  border: 1px solid var(--ww-border);
  color: var(--ww-text);
}
.ww-btn-secondary:hover { background: var(--ww-bg); }

/* hero */
.ww-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: 8px;
  padding: 28px 28px;
  margin-bottom: 14px;
}
.ww-hero-left { display: flex; flex-direction: column; }
.ww-hero-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ww-text-3);
  letter-spacing: 0.06em;
}
.ww-hero-value {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  margin: 8px 0 6px;
  line-height: 1;
}
.ww-hero-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--ww-text-2);
}
.ww-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ww-border);
}
.ww-hero-stats > div { display: flex; flex-direction: column; gap: 4px; }
.ww-stat-label { font-size: 11px; color: var(--ww-text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.ww-stat-value { font-size: 17px; font-weight: 600; font-family: var(--ww-mono); font-variant-numeric: tabular-nums; }
.ww-stat-delta { font-size: 11px; }

.ww-hero-right {
  border-left: 1px solid var(--ww-border);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}
.ww-hero-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ww-hero-chart-head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
}

/* insights */
.ww-insights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.ww-insight {
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: 6px;
  padding: 14px 16px;
}
.ww-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ww-insight-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
}
.ww-insight-tag.pos { color: var(--ww-pos); background: var(--ww-pos-bg); }
.ww-insight-tag.neg { color: var(--ww-neg); background: var(--ww-neg-bg); }
.ww-insight-tag.neutral { color: var(--ww-blue); background: var(--ww-blue-bg); }
.ww-insight-tag.warn { color: #92400E; background: #FEF3C7; }
.ww-insight-date {
  font-size: 11px;
  color: var(--ww-text-3);
  font-family: var(--ww-mono);
}
.ww-insight-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.ww-insight-meta {
  font-size: 12px;
  color: var(--ww-text-2);
  line-height: 1.45;
}

.ww-grid-b {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

/* channels */
.ww-channels { display: flex; flex-direction: column; gap: 14px; }
.ww-channel-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.ww-channel-list li {
  display: grid;
  grid-template-columns: 8px 1fr auto auto auto;
  align-items: center; gap: 8px;
  font-size: 12.5px;
  padding: 4px 0;
}
.ww-channel-name { color: var(--ww-text); }
.ww-channel-val  { font-family: var(--ww-mono); font-weight: 600; }
.ww-channel-share { font-family: var(--ww-mono); color: var(--ww-text-3); min-width: 30px; text-align: right; }

/* ranks */
.ww-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ww-col-title {
  font-size: 11px;
  color: var(--ww-text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.ww-rank-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ww-rank-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
}
.ww-rank-num {
  font-family: var(--ww-mono);
  font-size: 11px;
  color: var(--ww-text-3);
  text-align: center;
}
.ww-rank-body { min-width: 0; }
.ww-rank-name { font-size: 12.5px; color: var(--ww-text); margin-bottom: 4px; }
.ww-rank-bar { height: 5px; background: var(--ww-bg-deep); border-radius: 2px; overflow: hidden; }
.ww-rank-bar-fill { height: 100%; background: var(--ww-blue); border-radius: 2px; }
.ww-rank-bar-fill.orange { background: var(--ww-amber); }
.ww-rank-val { text-align: right; font-family: var(--ww-mono); }
.ww-rank-val > div:first-child { font-weight: 600; font-size: 12.5px; }
.ww-rank-sub { font-size: 11px; color: var(--ww-text-3); }

.ww-stacked { width: 100%; }

/* ─────────────────────────────────────────────────────────────
   Tagesverlauf · Pulse panel
   ───────────────────────────────────────────────────────────── */

.ww-pulse {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.ww-pulse-now {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ww-border);
}
.ww-pulse-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ww-text-3);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.ww-pulse-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.ww-pulse-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ww-text-2);
}
.ww-pulse-forecast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ww-pulse-forecast > div { display: flex; flex-direction: column; }
.ww-pulse-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ww-text-3);
  letter-spacing: 0.04em;
}
.ww-pulse-strong {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.ww-pulse-bar { display: flex; flex-direction: column; gap: 4px; }
.ww-pulse-bar-track {
  height: 8px;
  background: var(--ww-bg-deep);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.ww-pulse-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E6FB8, #0EA5E9);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ww-pulse-bar-labels {
  display: flex; justify-content: space-between;
  font-family: var(--ww-mono);
  font-size: 10px;
  color: var(--ww-text-3);
}
.ww-pulse-list {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--ww-border);
  padding-top: 10px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.ww-pulse-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--ww-text-2);
}
.ww-pulse-list li b {
  font-weight: 600;
  font-size: 13px;
  color: var(--ww-text);
}

/* ─────────────────────────────────────────────────────────────
   Wirtschaftlichkeit (econ row + waterfall)
   ───────────────────────────────────────────────────────────── */

.ww-econ-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.ww-econ {
  padding: 12px 14px;
  border-right: 1px solid var(--ww-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.ww-econ:last-child { border-right: 0; }
.ww-econ.good::before,
.ww-econ.bad::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.ww-econ.good::before { background: var(--ww-pos); }
.ww-econ.bad::before  { background: var(--ww-neg); }
.ww-econ-label {
  font-size: 11px;
  color: var(--ww-text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ww-econ-target {
  font-size: 10px;
  font-family: var(--ww-mono);
  color: var(--ww-text-3);
  background: var(--ww-bg-deep);
  border-radius: 2px;
  padding: 1px 5px;
}
.ww-econ-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ww-econ-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}
.ww-econ-sub {
  font-size: 11px;
  color: var(--ww-text-3);
  font-family: var(--ww-mono);
}

/* Waterfall */
.ww-econ-break {
  margin-top: 14px;
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  padding: 12px 14px;
  background: #FAFBFC;
}
.ww-econ-break-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  color: var(--ww-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.ww-econ-break-head .ww-mono { color: var(--ww-text); font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ww-waterfall {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
}
.ww-wf {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ww-wf-bar {
  height: 24px;
  border-radius: 3px;
  background: #94A3B8;
}
.ww-wf.base .ww-wf-bar { height: 42px; }
.ww-wf-label {
  font-size: 11px;
  color: var(--ww-text-2);
}
.ww-wf-value {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ww-mono);
}

/* ─────────────────────────────────────────────────────────────
   Section dividers & Variation-B additions
   ───────────────────────────────────────────────────────────── */

.ww-section-divider {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--ww-border);
  margin: 14px 0 14px;
}
.ww-section-divider h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 4px 0 0;
}
.ww-section-totals {
  display: flex;
  gap: 24px;
}
.ww-section-totals > div {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.ww-section-totals > div b {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ww-section-totals > div .ww-delta { margin-top: 2px; }
.ww-section-key {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--ww-text-3);
  letter-spacing: 0.06em;
}

/* B hero: today flavor */
.ww-hero-day .ww-hero-value { font-size: 42px; }
.ww-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #DC2626;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6);
  animation: ww-live-pulse 2.2s ease-out infinite;
  vertical-align: middle;
}
@keyframes ww-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.65); }
  60% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.ww-pace {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ww-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ww-pace-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ww-text-3);
}
.ww-pace-forecast {
  color: var(--ww-text);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

/* 3-col econ row */
.ww-econ-row-3 { grid-template-columns: repeat(3, 1fr); }

/* Ops grid (Variation B) */
.ww-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ww-ops-card {
  background: #FAFBFC;
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ww-ops-card.warn {
  background: #FEF8E7;
  border-color: #F8DD8C;
}
.ww-ops-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: flex; align-items: baseline; gap: 8px;
}
.ww-ops-of {
  font-size: 11px;
  font-weight: 400;
  color: var(--ww-text-3);
  font-family: var(--ww-sans);
  letter-spacing: 0;
}
.ww-ops-bar {
  height: 6px;
  background: #fff;
  border: 1px solid var(--ww-border);
  border-radius: 3px;
  overflow: hidden;
}
.ww-ops-bar-fill {
  height: 100%;
}
.ww-ops-meta {
  font-size: 11px;
  color: var(--ww-text-2);
  display: flex; align-items: center; flex-wrap: wrap;
}
.ww-ops-note {
  font-size: 12.5px;
  color: var(--ww-text);
  line-height: 1.45;
}

/* ─────────────────────────────────────────────────────────────
   BWA-Light Table
   ───────────────────────────────────────────────────────────── */

.ww-bwa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.ww-bwa-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid var(--ww-border);
  padding-left: 16px;
}
.ww-bwa-side .ww-econ {
  border: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--ww-border);
  border-radius: 0;
}
.ww-bwa-side .ww-econ::before { display: none; }
.ww-bwa-side .ww-econ:last-child { border-bottom: 0; }
.ww-bwa-side .ww-econ-value { font-size: 18px; }

.ww-bwa-totals {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ww-bwa-totals-num {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ww-bwa-totals-label {
  font-size: 11px;
  color: var(--ww-text-3);
}

table.ww-bwa {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.ww-bwa thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  color: var(--ww-text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ww-border-strong);
  background: #FAFBFC;
}
table.ww-bwa thead th.num { text-align: right; }
table.ww-bwa tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--ww-border);
  vertical-align: top;
}
table.ww-bwa tbody td.num {
  font-family: var(--ww-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ww-text);
}
table.ww-bwa tbody tr.is-indent td:first-child {
  padding-left: 28px;
  color: var(--ww-text-2);
}
table.ww-bwa tbody tr.is-indent td { color: var(--ww-text-2); font-size: 12.5px; padding-top: 6px; padding-bottom: 6px; }
table.ww-bwa tbody tr.is-subtotal { background: #F8FAFC; }
table.ww-bwa tbody tr.is-subtotal td { font-weight: 600; border-top: 1px solid var(--ww-border-strong); }
table.ww-bwa tbody tr.is-total td {
  font-weight: 700;
  font-size: 14px;
  border-top: 2px solid #0F172A;
  border-bottom: 2px solid #0F172A;
  background: #F0F4F8;
  padding-top: 12px;
  padding-bottom: 12px;
}
table.ww-bwa tbody tr.is-total + tr td {
  /* avoid double border below total */
}
table.ww-bwa tbody tr.is-expense td:first-child::before {
  content: '−';
  margin-right: 6px;
  color: var(--ww-text-3);
  font-family: var(--ww-mono);
}
table.ww-bwa tbody tr.is-total:last-child td { background: #E5F4EB; border-bottom: 0; }
table.ww-bwa .ww-bwa-label { display: block; font-weight: 500; }
table.ww-bwa .ww-bwa-sub {
  display: block;
  font-size: 11px;
  color: var(--ww-text-3);
  margin-top: 2px;
  font-family: var(--ww-mono);
}
table.ww-bwa tbody tr.is-indent .ww-bwa-label { font-weight: 400; }
table.ww-bwa .ww-bwa-prev { color: var(--ww-text-3); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Container Queries (von preview/mobile.css übernommen)
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   Wet&Wild Dashboard — Responsive (Container Queries)
   Each .ww-artboard is its own container. Queries adapt the
   dashboards to ≤ 720 (tablet) and ≤ 480 (phone).
   ───────────────────────────────────────────────────────────── */

.ww-artboard {
  container-type: inline-size;
  container-name: ww;
}

.ww-mobile-only { display: none; }

/* ───────── Tablet (≤ 900px) ───────── */
@container ww (max-width: 900px) {
  .ww-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .ww-grid,
  .ww-grid-b {
    grid-template-columns: repeat(6, 1fr);
  }
  .ww-grid > .ww-panel,
  .ww-grid-b > .ww-panel {
    grid-column: span 6 !important;
  }
  .ww-hero { grid-template-columns: 1fr; }
  .ww-hero-right {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--ww-border);
    padding-top: 20px;
    margin-top: 20px;
  }
  .ww-insights { grid-template-columns: repeat(2, 1fr); }
  .ww-side { width: 64px; }
  .ww-side-brand > div,
  .ww-side-footer > div,
  .ww-sidenav-group,
  .ww-sidenav-item > span:not(.ww-sidenav-ic) {
    display: none;
  }
  .ww-sidenav-item { justify-content: center; }
  .ww-side-brand,
  .ww-side-footer { justify-content: center; }
}

/* ───────── Phone (≤ 540px) ───────── */
@container ww (max-width: 540px) {

  /* ── A: header collapses to brand + menu button ── */
  .ww-header {
    height: 52px;
    padding: 0 12px;
    gap: 8px;
  }
  .ww-brand-sub { display: none; }
  .ww-nav { display: none; }
  .ww-search { display: none; }
  .ww-header-right > .ww-icon-btn:not(:last-of-type) { display: none; }
  .ww-header-right { gap: 6px; }

  .ww-mobile-only { display: inline-flex; }
  .ww-mobile-only.flex { display: flex; }

  /* ── filter bar wraps onto multiple lines ── */
  .ww-filterbar {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }
  .ww-filterbar .ww-segment { flex: 1 1 auto; }
  .ww-filterbar .ww-segment button { padding: 0 8px; font-size: 11.5px; }
  .ww-datepicker { width: 100%; order: 3; height: 26px; font-size: 11px; }
  .ww-weather-strip {
    order: 4;
    width: 100%;
    justify-content: space-between;
    height: 30px;
  }

  /* ── KPI: 2 columns, scrollable horizontally below ── */
  .ww-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 12px 0;
    gap: 8px;
  }
  .ww-kpi { padding: 10px 12px; min-height: 84px; gap: 4px; }
  .ww-kpi-value { font-size: 19px; }
  .ww-kpi-label { font-size: 10.5px; }
  .ww-kpi-sub { font-size: 10px; }
  .ww-kpi-foot { gap: 6px; }
  .ww-kpi-foot svg { width: 56px !important; }
  .ww-delta { font-size: 10px; padding: 1px 4px; }

  /* ── grid → single column ── */
  .ww-grid,
  .ww-grid-b {
    grid-template-columns: 1fr;
    padding: 10px 12px 16px;
    gap: 8px;
  }
  .ww-grid > .ww-panel,
  .ww-grid-b > .ww-panel {
    grid-column: 1 / -1 !important;
  }
  .ww-panel { padding: 12px 12px 10px; border-radius: 5px; }
  .ww-panel-head h3 { font-size: 12.5px; }
  .ww-panel-head p { font-size: 11px; }

  /* ── donut layout stacks ── */
  .ww-donut-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .ww-donut-center { align-self: center; }

  /* ── tables become cards ── */
  .ww-table { font-size: 11.5px; }
  .ww-table thead th { padding: 4px 6px; font-size: 10px; }
  .ww-table tbody td { padding: 6px; }
  /* hide the visual distribution column on smallest table */
  .ww-table thead th:nth-child(6),
  .ww-table tbody td:nth-child(6) { display: none; }

  .ww-drill-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .ww-drill-grid b { font-size: 13px; }

  /* ── B: sidebar becomes a top app-bar ── */
  .ww-b { flex-direction: column; }
  .ww-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    height: 56px;
    border-right: 0;
    border-bottom: 1px solid var(--ww-border);
    padding: 0 12px;
  }
  .ww-side-brand {
    border-bottom: 0;
    padding: 0;
    flex: 1;
  }
  .ww-side-brand > div { display: block; }
  .ww-side-sub { display: none; }
  .ww-sidenav { display: none; }
  .ww-side-footer {
    border-top: 0;
    padding: 0;
    margin-left: auto;
    gap: 6px;
  }
  .ww-side-footer > div { display: none; }

  /* main */
  .ww-main { padding: 18px 14px 24px; }
  .ww-main-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .ww-main-head h1 { font-size: 22px; }
  .ww-main-head p { font-size: 12px; }
  .ww-main-head-right {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ww-main-head-right .ww-segment { width: 100%; }
  .ww-main-head-right .ww-segment button { flex: 1; }
  .ww-btn-primary, .ww-btn-secondary { flex: 1; justify-content: center; height: 32px; }

  /* hero stacks */
  .ww-hero {
    padding: 18px 16px;
    border-radius: 6px;
  }
  .ww-hero-value { font-size: 32px; }
  .ww-hero-stats {
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
    padding-top: 14px;
    gap: 10px;
  }
  .ww-stat-value { font-size: 15px; }

  /* insights stack 1col */
  .ww-insights { grid-template-columns: 1fr; }
  .ww-insight { padding: 12px 14px; }
  .ww-insight-value { font-size: 18px; }

  /* twocol becomes one col */
  .ww-twocol { grid-template-columns: 1fr; gap: 16px; }

  /* channel list: hide pct column to save space */
  .ww-channel-list li {
    grid-template-columns: 8px 1fr auto auto;
    font-size: 12px;
  }
  .ww-channel-share { display: none; }

  /* legend lists in donut: single line */
  .ww-legend-list li { font-size: 11.5px; }

  /* gauges side by side */
  .ww-gauges {
    flex-direction: row;
    justify-content: space-around;
    gap: 12px;
  }

  /* footer wraps */
  .ww-footer {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 8px 12px;
    font-size: 10.5px;
  }
}

/* ───────── Tiny phone (≤ 380px) — Pixel/SE territory ───────── */
@container ww (max-width: 380px) {
  .ww-kpi-row { grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px 0; }
  .ww-grid, .ww-grid-b { padding: 8px 10px 14px; }
  .ww-hero-stats { grid-template-columns: 1fr; }
}

/* ─── Mobile menu button (only visible on mobile via .ww-mobile-only) ─── */
.ww-mobile-menu-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--ww-bg-deep);
  border: 1px solid var(--ww-border);
  border-radius: 5px;
  color: var(--ww-text);
  cursor: pointer;
}

/* ─── New components mobile overrides ─── */
@container ww (max-width: 540px) {
  .ww-pulse-forecast { grid-template-columns: 1fr 1fr; }
  .ww-pulse-value { font-size: 24px; }

  .ww-econ-row { grid-template-columns: repeat(2, 1fr); }
  .ww-econ-row > .ww-econ {
    border-right: 1px solid var(--ww-border);
    border-bottom: 1px solid var(--ww-border);
  }
  .ww-econ-row > .ww-econ:nth-child(2n) { border-right: 0; }
  .ww-econ-row > .ww-econ:nth-last-child(-n+2) { border-bottom: 0; }
  .ww-econ-value { font-size: 18px; }

  .ww-waterfall {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ww-wf {
    display: grid;
    grid-template-columns: 8px 1fr auto;
    gap: 10px;
    align-items: center;
  }
  .ww-wf-bar { height: 22px; width: 8px !important; border-radius: 2px; }
  .ww-wf.base .ww-wf-bar { height: 28px; }

  .ww-section-divider {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0 10px;
  }
  .ww-section-divider h2 { font-size: 16px; }
  .ww-section-totals {
    flex-wrap: wrap;
    gap: 12px;
  }
  .ww-section-totals > div { flex: 1 1 calc(50% - 12px); }

  .ww-ops-grid { grid-template-columns: 1fr; }
  .ww-ops-value { font-size: 18px; }

  .ww-hero-day .ww-hero-value { font-size: 32px; }
  .ww-pace { margin-top: 14px; padding-top: 12px; }
}

@container ww (max-width: 380px) {
  .ww-econ-row { grid-template-columns: 1fr; }
  .ww-econ-row > .ww-econ { border-right: 0 !important; }
  .ww-econ-row > .ww-econ:last-child { border-bottom: 0; }
}

/* ─── BWA table on mobile ─── */
@container ww (max-width: 540px) {
  .ww-bwa-layout {
    grid-template-columns: 1fr;
  }
  .ww-bwa-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--ww-border);
    padding-top: 12px;
  }
  table.ww-bwa { font-size: 12px; }
  table.ww-bwa thead th { padding: 6px 6px; font-size: 10px; }
  table.ww-bwa tbody td { padding: 8px 6px; }
  table.ww-bwa thead th:nth-child(4),
  table.ww-bwa tbody td.ww-bwa-prev { display: none; }
  table.ww-bwa tbody tr.is-indent td:first-child { padding-left: 18px; }
  .ww-bwa-totals-num { font-size: 14px; }
}

@container ww (max-width: 380px) {
  table.ww-bwa thead th:nth-child(3),
  table.ww-bwa tbody td:nth-child(3) { display: none; }
  table.ww-bwa { font-size: 11.5px; }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH-GATE (übernommen aus dashboard/index.html, leicht adaptiert)
   ═══════════════════════════════════════════════════════════════ */

#login-overlay {
  position: fixed; inset: 0; background: rgba(248, 250, 252, 0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; backdrop-filter: blur(4px);
  font-family: var(--ww-sans);
}
#login-overlay[hidden] { display: none; }
.login-card {
  background: white; padding: 32px; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1); width: min(360px, 92vw);
  border: 1px solid var(--ww-border);
}
.login-card h2 { margin: 0 0 4px 0; font-size: 18px; font-weight: 600; }
.login-card .sub { color: var(--ww-text-2); font-size: 13px; margin-bottom: 20px; }
.login-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.login-tabs button {
  flex: 1; padding: 8px; border: 1px solid var(--ww-border); background: var(--ww-bg-deep);
  color: var(--ww-text-2); font-size: 13px; font-weight: 500; border-radius: 8px;
  cursor: pointer; font-family: inherit;
}
.login-tabs button.active { background: var(--ww-blue); color: white; border-color: var(--ww-blue); }
#login-form, #reset-form { display: flex; flex-direction: column; gap: 10px; }
#login-form[hidden], #reset-form[hidden], .login-tabs[hidden] { display: none; }
#login-form input, #reset-form input {
  padding: 10px 12px; border: 1px solid #d4d4d8; border-radius: 8px;
  font-size: 14px; font-family: inherit;
}
#login-form input:focus, #reset-form input:focus { outline: none; border-color: var(--ww-blue); }
#login-form input[hidden] { display: none; }
#login-form button[type="submit"], #reset-form button[type="submit"] {
  padding: 10px; background: var(--ww-blue); color: white; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; margin-top: 4px;
}
#login-form button[type="submit"]:hover, #reset-form button[type="submit"]:hover { background: #195F9F; }
#login-form button[type="submit"]:disabled, #reset-form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }
#login-msg { margin-top: 12px; padding: 10px; border-radius: 6px; font-size: 13px; }
#login-msg.error { background: var(--ww-neg-bg); color: var(--ww-neg); border: 1px solid #fecaca; }
#login-msg.info  { background: var(--ww-blue-bg); color: #1e40af; border: 1px solid #bfdbfe; }
.login-link {
  display: block; margin-top: 12px; text-align: center; font-size: 12px;
  color: var(--ww-blue); text-decoration: none; cursor: pointer;
}
.login-link:hover { text-decoration: underline; }
.login-link[hidden] { display: none; }
.reset-intro { margin: 0 0 12px 0; font-size: 13px; color: var(--ww-text-2); }

/* Sales-v2: Refresh-Button rotiert während Daten-Lade (stale-while-revalidate UX) */
.sv2-spin svg { animation: sv2-spin 0.9s linear infinite; }
@keyframes sv2-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
