/* Filialmonitor: Dunkelmodus v1, ausschließlich visuelle Überschreibungen.
   Nach app.css und allen weiteren Layout-Stylesheets geladen; JS setzt data-theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7f0f2;
  --green: #8cdce7;
  --muted: #aec0c7;
  --line: #35515b;
  --bg: #0c1b23;
  --lime: #b7ebf3;
  --white: #172c35;
  --orange: #efbd73;
  --brand: #22afc0;
  --brand-accessible: #087d92;
  --fm-surface: #152a34;
  --fm-input: #0f242d;
  --fm-raised: #1b3640;
  --fm-border-soft: #2b414b;
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .filters,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .metric:not(.featured),
:root[data-theme="dark"] .branch-card,
:root[data-theme="dark"] .branch-list > *,
:root[data-theme="dark"] .branch-list-summary,
:root[data-theme="dark"] .branch-detail,
:root[data-theme="dark"] .login-form-area,
:root[data-theme="dark"] .mobile-nav {
  background: var(--fm-surface);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] .filter-section + .filter-section { border-top-color: var(--line); }
:root[data-theme="dark"] .filter-section-title { color: var(--ink); }
:root[data-theme="dark"] .filter-step,
:root[data-theme="dark"] .tag,
:root[data-theme="dark"] .branch-card-sub,
:root[data-theme="dark"] .branch-list-tools,
:root[data-theme="dark"] .branch-detail-metrics,
:root[data-theme="dark"] .branch-card-footer {
  background: var(--fm-raised);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] button:not(.primary):not(.branch-card-title):not(.branch-link),
:root[data-theme="dark"] .theme-toggle {
  background: var(--fm-input);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #9bb0b9; opacity: 1; }
:root[data-theme="dark"] select option { background: var(--fm-input); color: var(--ink); }
:root[data-theme="dark"] input[type="checkbox"],
:root[data-theme="dark"] input[type="radio"] { accent-color: #2bbacd; }
:root[data-theme="dark"] button:focus-visible,
:root[data-theme="dark"] input:focus-visible,
:root[data-theme="dark"] select:focus-visible,
:root[data-theme="dark"] a:focus-visible { outline-color: #5cddf0; }
:root[data-theme="dark"] .primary,
:root[data-theme="dark"] button.primary {
  color: #fff;
  background: #087d92;
  border-color: #20a5ba;
}
:root[data-theme="dark"] .primary:hover,
:root[data-theme="dark"] button.primary:hover { background: #0a92a8; }
:root[data-theme="dark"] .quiet:hover { background: var(--fm-raised) !important; }
:root[data-theme="dark"] .metric.featured {
  background: #064652;
  border-color: #116a79;
  color: #f3fbfc;
}
:root[data-theme="dark"] .metric.featured strong { color: #b7edf4; }
:root[data-theme="dark"] .metric.featured small { color: #c1dee4; }
:root[data-theme="dark"] table th { background: #1a3540; color: var(--muted); }
:root[data-theme="dark"] table td,
:root[data-theme="dark"] table th { border-bottom-color: var(--fm-border-soft); }
:root[data-theme="dark"] .group-branch-list,
:root[data-theme="dark"] .admin-branches,
:root[data-theme="dark"] .group-branch-options,
:root[data-theme="dark"] .group-branch-option { border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .notice { background: #123d49; color: #d3f1f5; border-color: #2d6f7d; }
:root[data-theme="dark"] .notice.warning,
:root[data-theme="dark"] .branch-card-warning { background: #40321b; color: #f6d797; border-color: #8c6a37; }
:root[data-theme="dark"] .notice.error,
:root[data-theme="dark"] .group-error { background: #462528; color: #ffc8c4; border-color: #99545a; }
:root[data-theme="dark"] .branch-link,
:root[data-theme="dark"] .branch-card-title { color: #8bdde9; }
:root[data-theme="dark"] .chart text,
:root[data-theme="dark"] .combo-svg text { fill: #c1d6dc !important; }
:root[data-theme="dark"] .chart .grid,
:root[data-theme="dark"] .combo-svg line[stroke="#dce5e7"] { stroke: #365661 !important; }
:root[data-theme="dark"] .chart .bar { fill: #30bfd1; }
:root[data-theme="dark"] .chart .baseline { stroke: #90aeb6; }
:root[data-theme="dark"] .login-intro { background: #062e36; color: #fff; }
:root[data-theme="dark"] .login-intro .eyebrow,
:root[data-theme="dark"] .login-intro .login-foot { color: #c1e3e8; }
:root[data-theme="dark"] .login-intro p:not(.eyebrow) { color: #d1e3e8; }

/* Umschalter – sowohl in der Login-Karte als auch in der Kopfzeile. */
.theme-toggle {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  line-height: 1.35;
  min-height: 35px;
}
.login-card > .theme-toggle { display: block; margin: 0 0 16px auto; }
.topbar .theme-toggle { flex-shrink: 0; }
@media(max-width:650px) {
  .topbar .account { gap: 7px; }
  .topbar .theme-toggle { font-size: 11px; padding: 6px 8px; }
}
