/* ==========================================================================
   Design „Präsenzpilot“ (dunkel) – Navy + Gelb wie Logo und Flyer
   Greift nur bei <html data-theme="pilot"> (gesetzt von /js/theme.js).
   Die Seiten haben ihre Farben fest im eigenen <style> und in style="…"-Attributen;
   hier wird beides überschrieben (Attribut-Selektoren mit !important für Inline-Styles).
   ========================================================================== */

[data-theme="pilot"] {
  --pp-bg: #111a28;
  --pp-surface: #162132;
  --pp-card: #1d2a3e;
  --pp-card-2: #24344b;
  --pp-border: #2c3c55;
  --pp-text: #eef2f7;
  --pp-muted: #9aa6b8;
  --pp-faint: #6f7d92;
  --pp-accent: #f1b442;
  --pp-accent-hover: #f6c768;
  --pp-on-accent: #162132;
  --pp-danger: #f87171;
  --pp-success: #4ade80;
  --pp-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  /* Kalenderkacheln: Statusfarbe wird mit diesen Tönen gemischt (statt Weiß/Schwarz) */
  --tile-base: #1d2a3e;
  --tile-ink: #ffffff;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Grundlage */
[data-theme="pilot"] body {
  background: var(--pp-bg);
  color: var(--pp-text);
}
[data-theme="pilot"] a { color: var(--pp-accent); }
[data-theme="pilot"] h1,
[data-theme="pilot"] h2,
[data-theme="pilot"] .header h1,
[data-theme="pilot"] .calendar h2,
[data-theme="pilot"] .card h2,
[data-theme="pilot"] .modal-header,
[data-theme="pilot"] .modal-title { color: var(--pp-text); letter-spacing: -0.3px; }
[data-theme="pilot"] h3 { color: var(--pp-text); }
[data-theme="pilot"] hr { border-color: var(--pp-border) !important; }

/* Kleine Überschriften in Versalien und Monospace – wie „DU BRINGST MIT“ auf dem Flyer */
[data-theme="pilot"] .form-group label,
[data-theme="pilot"] .stat-label,
[data-theme="pilot"] .stat-title,
[data-theme="pilot"] th,
[data-theme="pilot"] .brand-tagline {
  font-family: var(--pp-mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11.5px;
  color: var(--pp-accent);
}

/* Felder innerhalb eines Labels behalten die normale Schrift */
[data-theme="pilot"] label input,
[data-theme="pilot"] label select,
[data-theme="pilot"] label textarea {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
}

/* ---------------------------------------------------------------- Flächen */
[data-theme="pilot"] .header,
[data-theme="pilot"] .calendar,
[data-theme="pilot"] .tab-content,
[data-theme="pilot"] .card,
[data-theme="pilot"] .back,
[data-theme="pilot"] .m-monthbar,
[data-theme="pilot"] .modal-content {
  background: var(--pp-surface);
  color: var(--pp-text);
  border-color: var(--pp-border);
  box-shadow: 0 0 0 1px var(--pp-border), 0 12px 30px rgba(0, 0, 0, 0.35);
}
[data-theme="pilot"] .modal { background: rgba(5, 10, 18, 0.72); }

/* Marke: heller Schriftzug, gelbes Icon wie auf dunklem Grund im Logo */
[data-theme="pilot"] .brand { border-bottom-color: var(--pp-border); }
[data-theme="pilot"] .brand-name { color: var(--pp-text); }
[data-theme="pilot"] .brand-name span { color: var(--pp-accent); }
[data-theme="pilot"] .brand-tagline { color: var(--pp-muted); }
/* Tabellenköpfe ohne Versalien und Monospace – sonst passt die Fahrtenliste nicht mehr in die Breite */
[data-theme="pilot"] th {
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
}
[data-theme="pilot"] .brand img { content: url('/img/logo-icon.svg'); }

/* ---------------------------------------------------------------- Formulare */
[data-theme="pilot"] input,
[data-theme="pilot"] select,
[data-theme="pilot"] textarea,
[data-theme="pilot"] .form-group input,
[data-theme="pilot"] .form-group select,
[data-theme="pilot"] .form-grid input,
[data-theme="pilot"] .form-grid select,
/* Seiten setzen z.B. input[type=number] { background: white } im eigenen <style> – das muss hier verlieren */
[data-theme="pilot"] input[type="number"],
[data-theme="pilot"] input[type="text"],
[data-theme="pilot"] input[type="email"],
[data-theme="pilot"] input[type="password"],
[data-theme="pilot"] input[type="search"],
[data-theme="pilot"] input[type="url"],
[data-theme="pilot"] input[type="date"],
[data-theme="pilot"] input[type="time"] {
  background: var(--pp-bg);
  color: var(--pp-text);
  border-color: var(--pp-border);
}
[data-theme="pilot"] input::placeholder,
[data-theme="pilot"] textarea::placeholder { color: var(--pp-faint); }
[data-theme="pilot"] input:focus,
[data-theme="pilot"] select:focus,
[data-theme="pilot"] textarea:focus {
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 3px rgba(241, 180, 66, 0.18);
}
[data-theme="pilot"] input[type="checkbox"],
[data-theme="pilot"] input[type="radio"] { accent-color: var(--pp-accent); }
[data-theme="pilot"] .unit-field { background: var(--pp-bg); border-color: var(--pp-border); }
[data-theme="pilot"] .unit-field:focus-within { border-color: var(--pp-accent); box-shadow: 0 0 0 3px rgba(241, 180, 66, 0.18); }
[data-theme="pilot"] .unit-field input { background: transparent; box-shadow: none; }
[data-theme="pilot"] .unit-field em { color: var(--pp-muted); }
[data-theme="pilot"] label { color: var(--pp-text); }

/* ---------------------------------------------------------------- Buttons */
[data-theme="pilot"] .btn-primary,
[data-theme="pilot"] .back-button,
[data-theme="pilot"] .btn.primary,
[data-theme="pilot"] .tab-button.active,
[data-theme="pilot"] .month-option.active,
[data-theme="pilot"] .status-btn.active,
[data-theme="pilot"] .years button.active,
[data-theme="pilot"] .view-toggle button.active {
  background: var(--pp-accent);
  color: var(--pp-on-accent);
  border-color: var(--pp-accent);
}
[data-theme="pilot"] .btn-primary:hover,
[data-theme="pilot"] .back-button:hover,
[data-theme="pilot"] .btn.primary:hover {
  background: var(--pp-accent-hover);
  box-shadow: 0 5px 15px rgba(241, 180, 66, 0.25);
}
[data-theme="pilot"] .btn-secondary,
[data-theme="pilot"] .btn,
[data-theme="pilot"] .tab-button,
[data-theme="pilot"] .month-option,
[data-theme="pilot"] .status-btn,
[data-theme="pilot"] .years button,
[data-theme="pilot"] .week-nav button,
[data-theme="pilot"] .back-button[style],
[data-theme="pilot"] .ticket-badge {
  background: var(--pp-card);
  color: var(--pp-text);
  border-color: var(--pp-border);
}
[data-theme="pilot"] .btn-secondary:hover,
[data-theme="pilot"] .btn:hover,
[data-theme="pilot"] .tab-button:hover,
[data-theme="pilot"] .month-option:hover,
[data-theme="pilot"] .status-btn:hover,
[data-theme="pilot"] .week-nav button:hover {
  background: var(--pp-card-2);
  border-color: var(--pp-accent);
}
[data-theme="pilot"] .status-btn.active:hover,
[data-theme="pilot"] .month-option.active:hover,
[data-theme="pilot"] .tab-button.active:hover,
[data-theme="pilot"] .years button.active:hover { background: var(--pp-accent-hover); color: var(--pp-on-accent); }
[data-theme="pilot"] .view-toggle { background: var(--pp-bg); }
[data-theme="pilot"] .view-toggle button { color: var(--pp-muted); }
[data-theme="pilot"] .icon-btn { color: var(--pp-faint); }
[data-theme="pilot"] .icon-btn:hover { background: rgba(248, 113, 113, 0.15); color: var(--pp-danger); }

/* ---------------------------------------------------------------- Übersicht: Kennzahlen */
[data-theme="pilot"] .stat-card,
[data-theme="pilot"] .stat-card.workdays,
[data-theme="pilot"] .stat-card.success,
[data-theme="pilot"] .stat-card.warning,
[data-theme="pilot"] .stat-card.quote {
  background: var(--pp-card);
  color: var(--pp-text);
  box-shadow: inset 0 0 0 1px var(--pp-border);
}
[data-theme="pilot"] .stat-subtext { color: var(--pp-muted); }
[data-theme="pilot"] .stat-card .stat-value { color: var(--pp-text); }
[data-theme="pilot"] .stat-card.quote { box-shadow: inset 0 0 0 1px var(--pp-accent); }
[data-theme="pilot"] .stat-card.quote .stat-value { color: var(--pp-accent); }
[data-theme="pilot"] .stat-card.success .stat-value { color: var(--pp-success); }
[data-theme="pilot"] .stat-card.warning .stat-value { color: var(--pp-danger); }

/* ---------------------------------------------------------------- Kalender */
[data-theme="pilot"] .day-card {
  background: var(--pp-card);
  border-color: var(--pp-border);
}
[data-theme="pilot"] .day-card:hover { border-color: var(--pp-accent); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35); }
[data-theme="pilot"] .day-card.weekend { background: var(--pp-surface); opacity: 0.75; }
[data-theme="pilot"] .day-card.today { border-color: var(--pp-accent); box-shadow: inset 0 0 0 1px var(--pp-accent); }
[data-theme="pilot"] .day-card.month-start { box-shadow: inset 4px 0 0 var(--pp-accent); }
[data-theme="pilot"] .day-card.holiday { background: #3a2f17; border-color: #b7862a; }
[data-theme="pilot"] .day-card.present { background: #1b3352 !important; border-color: #3b82f6 !important; }
[data-theme="pilot"] .day-card.absent { background: #3d2a18 !important; border-color: #ea580c !important; }
[data-theme="pilot"] .day-date,
[data-theme="pilot"] .month-badge,
[data-theme="pilot"] .status-code,
[data-theme="pilot"] .m-monthbar button,
[data-theme="pilot"] .m-tabbar .active { color: var(--pp-accent); }
[data-theme="pilot"] .day-weekday,
[data-theme="pilot"] .week-number,
[data-theme="pilot"] .m-weekdays,
[data-theme="pilot"] .m-monthbar .m-title::after,
[data-theme="pilot"] .hm-months,
[data-theme="pilot"] .hm-wd { color: var(--pp-muted); }
[data-theme="pilot"] .holiday-name { color: var(--pp-accent); }
[data-theme="pilot"] .week-range,
[data-theme="pilot"] .m-monthbar .m-title { color: var(--pp-text); }
[data-theme="pilot"] .week-quote { background: rgba(241, 180, 66, 0.14); color: var(--pp-accent); }
[data-theme="pilot"] .ticket-badge.has-logo { color: #ff5a6e; }

/* Hinweise rund um Tickets */
[data-theme="pilot"] .fgr-banner,
[data-theme="pilot"] .ticket-reminder,
[data-theme="pilot"] .claim {
  background: rgba(241, 180, 66, 0.1);
  border-color: rgba(241, 180, 66, 0.4);
  color: var(--pp-text);
}
[data-theme="pilot"] .ticket-missing { background: rgba(217, 119, 6, 0.12); color: #fbbf24; }
[data-theme="pilot"] .fgr-banner a { color: var(--pp-accent); }

/* Handy: Monatsleiste, Quote-Zeile, untere Leiste */
[data-theme="pilot"] .m-quote { background: var(--pp-card); color: var(--pp-muted); }
[data-theme="pilot"] .m-quote.ok { background: rgba(74, 222, 128, 0.14); color: var(--pp-success); }
[data-theme="pilot"] .m-quote.miss { background: rgba(248, 113, 113, 0.14); color: var(--pp-danger); }
[data-theme="pilot"] .m-tabbar {
  background: rgba(22, 33, 50, 0.97);
  border-top-color: var(--pp-border);
}
[data-theme="pilot"] .m-tabbar a,
[data-theme="pilot"] .m-tabbar button { color: var(--pp-muted); }
[data-theme="pilot"] .app-footer {
  background: var(--pp-surface) !important;
  border-top-color: var(--pp-border) !important;
  color: var(--pp-faint) !important;
}

/* ---------------------------------------------------------------- Einstellungen */
[data-theme="pilot"] .status-card { background: var(--pp-card); border-color: var(--pp-border); }
[data-theme="pilot"] .status-card.new { background: rgba(241, 180, 66, 0.08); border-color: var(--pp-accent); }
[data-theme="pilot"] .status-label,
[data-theme="pilot"] .version { color: var(--pp-muted); }
[data-theme="pilot"] .swatch { border-color: var(--pp-surface); box-shadow: 0 0 0 1px var(--pp-border); }
[data-theme="pilot"] .loading { border-color: var(--pp-border); border-top-color: var(--pp-accent); }

/* Meldungen */
[data-theme="pilot"] .alert-success,
[data-theme="pilot"] .msg.ok,
[data-theme="pilot"] .delay.ok,
[data-theme="pilot"] .res-ok { background: rgba(74, 222, 128, 0.12); color: #86efac; border-color: rgba(74, 222, 128, 0.35); }
[data-theme="pilot"] .alert-error,
[data-theme="pilot"] .msg.err,
[data-theme="pilot"] .delay.bad { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
[data-theme="pilot"] .alert-warning,
[data-theme="pilot"] .delay.warn,
[data-theme="pilot"] .warn { background: rgba(241, 180, 66, 0.12); color: #fcd34d; border-color: rgba(241, 180, 66, 0.35); }
[data-theme="pilot"] .alert-info,
[data-theme="pilot"] .msg.info,
[data-theme="pilot"] .tip { background: rgba(96, 165, 250, 0.12); color: #bfdbfe; border-color: rgba(96, 165, 250, 0.35); }
[data-theme="pilot"] .res-dup,
[data-theme="pilot"] .delay.none { background: var(--pp-card); color: var(--pp-muted); }
[data-theme="pilot"] .res-ok { background: none; }
[data-theme="pilot"] .toast { background: var(--pp-accent); color: var(--pp-on-accent); }
[data-theme="pilot"] .toast.error { background: #dc2626; color: #fff; }

/* ---------------------------------------------------------------- Tabellen, Bahnfahrten & Steuer, Rückblick */
[data-theme="pilot"] td,
[data-theme="pilot"] th,
[data-theme="pilot"] .stat-lines div,
[data-theme="pilot"] .divider,
[data-theme="pilot"] .at-box,
[data-theme="pilot"] .claim-data table td { border-color: var(--pp-border); }
[data-theme="pilot"] .sub,
[data-theme="pilot"] .hint,
[data-theme="pilot"] .note,
[data-theme="pilot"] .empty,
[data-theme="pilot"] .disclaimer,
[data-theme="pilot"] .stat-lines,
[data-theme="pilot"] .claim-sub,
[data-theme="pilot"] .fgr-state,
[data-theme="pilot"] .at-bar .m,
[data-theme="pilot"] .at-bar .b span,
[data-theme="pilot"] .claim-data ol,
[data-theme="pilot"] .claim-data table td:first-child,
[data-theme="pilot"] tr.cancelled td { color: var(--pp-muted); }
[data-theme="pilot"] th .sort-btn:hover,
[data-theme="pilot"] th[aria-sort] .sort-btn { color: var(--pp-text); }
[data-theme="pilot"] .claim-data,
[data-theme="pilot"] pre,
[data-theme="pilot"] .explain,
[data-theme="pilot"] .hm-detail,
[data-theme="pilot"] kbd { background: var(--pp-bg); color: var(--pp-text); border-color: var(--pp-border); }
[data-theme="pilot"] .claim.pruefen { background: rgba(96, 165, 250, 0.08); border-color: rgba(96, 165, 250, 0.3); }
[data-theme="pilot"] .drop { border-color: var(--pp-border); color: var(--pp-muted); }
[data-theme="pilot"] .drop.over { border-color: var(--pp-accent); background: rgba(241, 180, 66, 0.08); color: var(--pp-accent); }
[data-theme="pilot"] details.log summary { color: var(--pp-accent); }
[data-theme="pilot"] .pill.fhf { background: rgba(96, 165, 250, 0.16); color: #bfdbfe; }
[data-theme="pilot"] .pill.dr { background: rgba(241, 180, 66, 0.16); color: #fcd34d; }
[data-theme="pilot"] .pill.pr { background: var(--pp-card-2); color: var(--pp-muted); }
[data-theme="pilot"] .bc-table tr.best td { background: rgba(74, 222, 128, 0.1); }
[data-theme="pilot"] .bc-table tr.current td:first-child::after { background: rgba(241, 180, 66, 0.16); color: var(--pp-accent); }
[data-theme="pilot"] .bc-diff.pos { color: var(--pp-danger); }
[data-theme="pilot"] .bc-diff.neg { color: var(--pp-success); }
[data-theme="pilot"] .at-bar .b { background: var(--pp-accent); }
[data-theme="pilot"] .hm-cell { background: var(--pp-card-2); }
[data-theme="pilot"] .hm-cell.off { background: var(--pp-surface); }
[data-theme="pilot"] .hm-cell.hol { background: #6b5320; }
[data-theme="pilot"] .hm-legend { color: var(--pp-muted); }
[data-theme="pilot"] .toc a { color: var(--pp-accent); }

/* ---------------------------------------------------------------- Inline-Farben aus style="…" */
[data-theme="pilot"] [style*="color: #666"],
[data-theme="pilot"] [style*="color:#666"],
[data-theme="pilot"] [style*="color: #888"],
[data-theme="pilot"] [style*="color: #999"],
[data-theme="pilot"] [style*="color:#999"],
[data-theme="pilot"] [style*="color:#444"],
[data-theme="pilot"] [style*="color: #555"] { color: var(--pp-muted) !important; }
[data-theme="pilot"] [style*="color: #1d1d1d"],
[data-theme="pilot"] [style*="color:#1d1d1f"],
[data-theme="pilot"] [style*="color: #0d47a1"],
[data-theme="pilot"] [style*="color: #1976d2"] { color: var(--pp-text) !important; }
[data-theme="pilot"] [style*="background: white"],
[data-theme="pilot"] [style*="background: #fff"],
[data-theme="pilot"] [style*="background:#fff"],
[data-theme="pilot"] [style*="background: #f9f9f9"],
[data-theme="pilot"] [style*="background: #f9fafb"],
[data-theme="pilot"] [style*="background: #f5f5f7"],
[data-theme="pilot"] [style*="background: #f0f0f0"] { background: var(--pp-card) !important; color: var(--pp-text); }
/* aktiver Zeitraum der Statistik (per Skript blau gesetzt) */
[data-theme="pilot"] [style*="background: #0071e3"],
[data-theme="pilot"] [style*="background: rgb(0, 113, 227)"] { background: var(--pp-accent) !important; color: var(--pp-on-accent) !important; }
[data-theme="pilot"] [style*="background: #e8f4ff"],
[data-theme="pilot"] [style*="background: #e3f2fd"],
[data-theme="pilot"] [style*="background: #dbeafe"],
[data-theme="pilot"] [style*="background: #f0f9ff"] { background: rgba(96, 165, 250, 0.12) !important; color: var(--pp-text); }
[data-theme="pilot"] [style*="background: #fef3c7"],
[data-theme="pilot"] [style*="background:#fef3c7"] { background: rgba(241, 180, 66, 0.12) !important; color: var(--pp-text); }
[data-theme="pilot"] [style*="background: #fee2e2"] { background: rgba(248, 113, 113, 0.12) !important; color: var(--pp-text); }
[data-theme="pilot"] [style*="background: #ecfdf5"] { background: rgba(74, 222, 128, 0.1) !important; color: var(--pp-text); }
[data-theme="pilot"] [style*="border-top: 2px solid #eee"],
[data-theme="pilot"] [style*="border-bottom: 2px solid #eee"],
[data-theme="pilot"] [style*="border-bottom: 1px solid #eee"],
[data-theme="pilot"] [style*="border-top: 1px solid #eee"],
[data-theme="pilot"] [style*="border-top:1px solid #eee"],
[data-theme="pilot"] [style*="border-top:1px solid #f0f0f2"],
[data-theme="pilot"] [style*="solid #ccc"],
[data-theme="pilot"] [style*="solid #ddd"],
[data-theme="pilot"] [style*="solid #e5e7eb"],
[data-theme="pilot"] [style*="solid #e5e5ea"],
[data-theme="pilot"] [style*="solid #e0e0e0"] { border-color: var(--pp-border) !important; }
