/* Modernisierungs-Overlay für das Veranstalter-Portal (Nutzer-Vorgabe: "stylischer,
 * zu sehr 2000er") - bewusst eine EIGENSTÄNDIGE, zusätzliche Datei statt jede der
 * Portal-Seiten einzeln umzuschreiben: alle Seiten verwenden dieselben Bausteine
 * (Karten, Buttons, Tabellen, Formulare, Chips/Badges) mit denselben oder ähnlichen
 * Klassennamen (siehe Kommentar in index.ts/organizer*.html) - diese Datei wird in
 * jeder Seite NACH dem bestehenden <style>-Block eingebunden und gewinnt bei gleicher
 * Spezifität automatisch (CSS-Kaskade nach Quellreihenfolge), ohne die elf/zwölf
 * Seiten im Detail anfassen zu müssen. Attribut-Selektoren ([class*="..."]) statt
 * exakter Klassennamen, weil die Benennung zwischen den Seiten leicht variiert
 * (.card/.gallery-card/.stat-tile/... - alle sollen vom selben moderneren Look
 * profitieren, ohne dass hier jede einzelne Variante aufgezählt werden müsste).
 */

:root {
  --brand-navy: #383d5b;
  --brand-navy-deep: #2b2f47;
  --brand-gold: #fbb500;
  --brand-gold-deep: #e6a300;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --shadow-soft: 0 1px 2px rgba(32, 28, 46, 0.04), 0 8px 24px -8px rgba(56, 61, 91, 0.12);
  --shadow-lift: 0 4px 10px rgba(32, 28, 46, 0.06), 0 16px 32px -12px rgba(56, 61, 91, 0.18);
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: radial-gradient(1200px 520px at 50% -140px, rgba(251, 181, 0, 0.07), transparent 65%), var(--bg, #f6f5fb) !important;
  letter-spacing: 0.1px;
}

/* Kopfzeile: etwas mehr Tiefe statt der reinen Haarlinie darunter. */
header {
  box-shadow: 0 1px 0 rgba(32, 28, 46, 0.05), 0 6px 20px -14px rgba(32, 28, 46, 0.25) !important;
}
header .brand img {
  border-radius: 8px !important;
  box-shadow: 0 2px 8px -2px rgba(56, 61, 91, 0.35);
}

/* Karten/Kacheln jeder Benennung: weicherer, mehrstufiger Schatten statt der reinen
 * 1px-Kontur, größerer Radius, dezenter Hover-Lift auf interaktiven Exemplaren. */
[class*="card"],
[class*="tile"],
[class*="panel"],
.item,
.msg {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a[class*="card"]:hover,
button[class*="card"]:hover,
[class*="card"][onclick]:hover,
[class*="tile"]:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

/* Buttons: NUR die explizite .btn-Klasse (plus .fab) anfassen - bewusst NICHT der
 * bloße <button>-Tag oder ein [class*="btn"]-Jokerzeichen: diese Seiten verwenden
 * <button> auch für ganz andere, bereits fertig gestaltete Bausteine (Dashboard-
 * Statistik-Kacheln .stat-tile, Filter-Pillen .chip, Sidebar-Einträge .nav-btn) - ein
 * generisches button{background:...} hätte (und hat in einer Vorversion dieser Datei
 * tatsächlich) all diese anderen Bausteine ungewollt navy eingefärbt und unleserlich
 * gemacht. Nur echte .btn-Buttons bekommen hier Politur, ihre Grundfarbe (weiß/Rand
 * für normal, Gold-Gradient für .btn.primary) bleibt wie von den einzelnen Seiten
 * selbst definiert - wir fügen nur Tiefe/Bewegung hinzu. */
.btn,
.fab {
  border-radius: var(--radius-sm) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease !important;
}
.btn:not(:disabled):hover,
.fab:not(:disabled):hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn:not(:disabled):active,
.fab:not(:disabled):active {
  transform: translateY(0);
  filter: brightness(0.97);
}

/* Primäre Gold-Akzent-Buttons (z.B. "Veröffentlichen"/die runde Plus-Schaltfläche)
 * bekommen einen etwas kräftigeren Schein statt der reinen Volltonfarbe. */
.btn.primary,
.fab {
  box-shadow: 0 3px 10px -3px rgba(230, 163, 0, 0.55) !important;
}

/* Formularfelder: rundere Ecken, sichtbarerer Fokus-Ring statt des nackten
 * Browser-Outlines. */
input,
select,
textarea {
  border-radius: var(--radius-sm) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--brand-navy) !important;
  box-shadow: 0 0 0 3px rgba(56, 61, 91, 0.14) !important;
}

/* Tabellen: dezentes Zebra-Muster + Hover-Zeile statt reiner Haarlinien-Trennung. */
table {
  border-collapse: separate !important;
  border-spacing: 0;
}
table tr:not(thead tr):hover td {
  background: rgba(56, 61, 91, 0.035);
}
table tbody tr:nth-child(even) td {
  background: rgba(32, 28, 46, 0.012);
}
th {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem !important;
  color: var(--muted, #7a7488) !important;
}

/* Sidebar/Icon-Rail: aktiver Eintrag bekommt einen weichen Schein statt Volltonfarbe
 * ohne jede Tiefe. */
.sidebar .nav-btn.active {
  background: linear-gradient(155deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%) !important;
  box-shadow: 0 4px 12px -4px rgba(43, 47, 71, 0.55);
}

/* Chips/Badges/Tags: etwas weicher, mit dünner Kontur statt reiner Flächenfarbe. */
[class*="tag"],
[class*="badge"],
[class*="chip"],
[class*="pill"] {
  border-radius: 999px !important;
  border: 1px solid rgba(32, 28, 46, 0.06);
}

/* Fortschrittsbalken (Foto-Upload etc.): Gold-Gradient statt Volltonfarbe. */
[class*="progress-fill"] {
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold-deep) 100%) !important;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ------------------------------------------------------------------------------
 * Portal-Design v2 (Nutzer-Vorgabe: "noch schöner, professioneller").
 * Alles unter html.nav-v2 - die Klasse setzt erst organizer-common.js, nachdem es
 * die Sidebar-Emojis gegen Linien-Icons getauscht hat. Login-/Registrierungsseite
 * und Startseite laden das Skript nicht und bleiben dadurch unberührt; fehlt das
 * Skript einmal, fällt das Portal sauber auf die alte Icon-Leiste zurück.
 * Die Seiten-<style>-Blöcke stehen VOR dieser Datei, gleiche Spezifität gewinnt
 * also hier ohne !important (auch innerhalb gleicher Media-Queries).
 * ------------------------------------------------------------------------------ */
.nav-v2 {
  --text: #1d1b2c;
  --muted: #6e6a80;
  --border: #e7e5ef;
  --surface-sub: #f8f7fc;
}
.nav-v2 body {
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: #f6f5fa !important;
}

/* Kopfzeile: ruhiger, weiß, Produktname neben dem Logo, Konto rechts als Avatar. */
.nav-v2 header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 0.7rem 1.4rem;
  min-height: 62px;
  box-shadow: 0 1px 0 var(--border) !important;
  border-bottom: none;
}
.nav-v2 header .brand img { height: 28px; box-shadow: none; }
.nav-v2 header .brand::after {
  content: "Veranstalter-Portal";
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  padding-left: 0.7rem; margin-left: 0.1rem; border-left: 1px solid var(--border);
  line-height: 1.4;
}
.nav-v2 .who { display: flex; align-items: center; gap: 0.6rem; }
.nav-v2 .who-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.nav-v2 .who-text b { font-size: 0.84rem; font-weight: 600; }
.nav-v2 .who-text span { font-size: 0.74rem; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-v2 .who-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(145deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(251, 181, 0, 0.7);
}
.nav-v2 header button.ghost {
  border-radius: 9px; padding: 0.45rem 0.8rem; font-weight: 600; font-family: inherit;
  color: var(--text); background: #fff; transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-v2 header button.ghost:hover { background: var(--surface-sub); border-color: #d9d6e4; }
@media (max-width: 560px) {
  .nav-v2 header { padding: 0.6rem 1rem; }
  .nav-v2 header .brand::after, .nav-v2 .who-text { display: none; }
}

/* Sidebar: breite, ruhige Navigation mit Icon + Text in einer Zeile (wie in
 * gängigen Business-Tools) statt der schmalen Emoji-Leiste. */
.nav-v2 .sidebar {
  width: 236px; padding: 1.1rem 0.85rem;
  background: #fff; border-right: 1px solid var(--border);
}
.nav-v2 .sidebar .nav-btn {
  flex-direction: row; justify-content: flex-start; gap: 0.7rem;
  padding: 0.55rem 0.75rem; margin-bottom: 2px; border-radius: 9px;
  font-size: 0.875rem; font-weight: 500; color: #4a4760; text-align: left; line-height: 1.2;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-v2 .sidebar .nav-btn .nav-icon {
  display: inline-flex; width: 18px; height: 18px; flex: none; color: #8a86a0;
  transition: color 0.12s ease;
}
.nav-v2 .sidebar .nav-btn .nav-icon svg { display: block; }
.nav-v2 .sidebar .nav-btn:hover:not(.active):not(:disabled) { background: var(--surface-sub); color: var(--text); }
.nav-v2 .sidebar .nav-btn:hover:not(.active):not(:disabled) .nav-icon { color: var(--brand-navy); }
/* Aktiver Eintrag: helle Fläche mit Gold-Markierung statt Navy-Vollfläche - wirkt
 * ruhiger und lässt die Inhaltsfläche das Wichtigste bleiben. */
.nav-v2 .sidebar .nav-btn.active {
  position: relative; background: #f1f0f7 !important; color: var(--brand-navy);
  font-weight: 600; box-shadow: none;
}
.nav-v2 .sidebar .nav-btn.active .nav-icon { color: var(--brand-navy); }
.nav-v2 .sidebar .nav-btn.active::before {
  content: ""; position: absolute; left: -0.85rem; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand-gold);
}
.nav-v2 .sidebar-sep { margin: 0.8rem 0.6rem; }

/* Mittlere Breiten: kompakte Leiste (Icon über Text), damit für den Inhalt genug
 * Platz bleibt. */
@media (max-width: 1080px) and (min-width: 781px) {
  .nav-v2 .sidebar { width: 108px; padding: 1rem 0.45rem; }
  /* Kein hartes Umbrechen mitten im Wort ("Veranstaltun|gen") - lieber
   * Silbentrennung, falls ein Wort doch einmal nicht passt. */
  .nav-v2 .sidebar .nav-btn {
    flex-direction: column; justify-content: center; gap: 0.3rem; text-align: center;
    padding: 0.6rem 0.15rem; font-size: 0.66rem; font-weight: 600;
  }
  .nav-v2 .sidebar .nav-btn .nav-label { word-break: normal; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
  .nav-v2 .sidebar .nav-btn .nav-icon { width: 20px; height: 20px; }
  .nav-v2 .sidebar .nav-btn .nav-icon svg { width: 20px; height: 20px; }
  .nav-v2 .sidebar .nav-btn.active::before { left: -0.45rem; }
}

/* Schmal (Handy): waagerecht scrollbare Leiste wie bisher, nur ohne Emoji-Optik. */
@media (max-width: 780px) {
  .nav-v2 .sidebar {
    width: 100%; padding: 0.55rem 1rem; border-right: none; border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .nav-v2 .sidebar::-webkit-scrollbar { display: none; }
  .nav-v2 .sidebar .nav-btn { padding: 0.45rem 0.7rem; gap: 0.45rem; font-size: 0.82rem; flex: none; }
  .nav-v2 .sidebar .nav-btn .nav-icon, .nav-v2 .sidebar .nav-btn .nav-icon svg { width: 16px; height: 16px; }
  .nav-v2 .sidebar .nav-btn.active::before { display: none; }
  .nav-v2 .sidebar .nav-btn.active { box-shadow: inset 0 -2px 0 var(--brand-gold); border-radius: 9px 9px 4px 4px; }
  .nav-v2 .chip { white-space: nowrap; flex: none; }
}

/* Inhaltsfläche: mehr Luft, klare Seitentitel. */
.nav-v2 main { padding: 1.8rem 2rem 6rem; }
@media (max-width: 780px) { .nav-v2 main { padding: 1.1rem 1rem 6rem; } }
.nav-v2 main h2 {
  font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text);
  line-height: 1.25;
}
.nav-v2 main h3 { letter-spacing: -0.01em; }
.nav-v2 .sheet h2 { font-size: 1.15rem; }

/* Karten: feine Kontur + sehr weicher Schatten, Hover nur auf echten Klickflächen. */
.nav-v2 [class*="card"],
.nav-v2 [class*="panel"],
.nav-v2 .settings-section,
.nav-v2 .billing-bar {
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(29, 27, 44, 0.04), 0 4px 16px -8px rgba(56, 61, 91, 0.10);
}
.nav-v2 .ev-card:hover { box-shadow: 0 12px 28px -14px rgba(56, 61, 91, 0.32); transform: translateY(-2px); }

/* Statistik-Kacheln: dezenter, Akzent als Linie oben statt Balken links. */
.nav-v2 .stat-tile { border-radius: 14px !important; padding: 1rem 1.1rem; }
.nav-v2 .stat-tile::before { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 3px; }
.nav-v2 .stat-tile .n { font-variant-numeric: tabular-nums; }

/* Buttons: einheitliche Höhe, Schrift, sichtbarer Tastatur-Fokus. */
.nav-v2 .btn { font-family: inherit; font-weight: 600; border-color: #dedbe8; }
.nav-v2 .btn:not(.primary):not(.danger):not(:disabled):hover { background: var(--surface-sub); }
.nav-v2 .btn:focus-visible,
.nav-v2 .chip:focus-visible,
.nav-v2 .nav-btn:focus-visible,
.nav-v2 header button:focus-visible {
  outline: 2px solid var(--brand-gold) !important; outline-offset: 2px;
}

/* Filter-Chips: Segment-Optik statt dunkler Vollfläche. */
.nav-v2 .chip { font-family: inherit; font-weight: 500; color: #4a4760; transition: background 0.12s ease, border-color 0.12s ease; }
.nav-v2 .chip:hover:not(.active) { background: var(--surface-sub); border-color: #d9d6e4; }
.nav-v2 .chip.active { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; font-weight: 600; }

/* Formulare: hellerer Feldhintergrund, Gold-Fokusring passend zur Marke. */
.nav-v2 .field label { color: #3d3a52; }
.nav-v2 input:focus, .nav-v2 select:focus, .nav-v2 textarea:focus {
  border-color: var(--brand-gold-deep) !important;
  box-shadow: 0 0 0 3px rgba(251, 181, 0, 0.22) !important;
  background: #fff;
}

/* Dialoge: weicherer Hintergrund-Blur, Einblend-Animation. */
.nav-v2 .overlay { background: rgba(24, 21, 40, 0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.nav-v2 .overlay:not(.hidden) .sheet { animation: hppy-sheet-in 0.18s ease-out; }
.nav-v2 .sheet { box-shadow: 0 24px 60px -20px rgba(24, 21, 40, 0.45); }
@keyframes hppy-sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }

/* Toast: mit leichtem Schatten und Rundung wie die übrigen Bausteine. */
.nav-v2 .toast { border-radius: 11px; box-shadow: 0 10px 30px -10px rgba(24, 21, 40, 0.5); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .nav-v2 .overlay:not(.hidden) .sheet { animation: none; }
}

/* Stat-Kachel-Icons (SVG) in Akzentfarbe statt bunter Emojis. */
.nav-v2 .stat-tile .icon { color: var(--accent, var(--brand-navy)); }
.nav-v2 .stat-tile.next .icon { color: var(--brand-gold-deep); }
.nav-v2 .stat-tile .icon svg { display: block; }
/* Runder Plus-Button wieder rund-quadratisch statt der kleinen Ecken aus dem
 * allgemeinen .btn/.fab-Radius oben. */
.nav-v2 .fab { border-radius: 18px !important; }
/* Testzugang-Hinweis in den Eventkarten war ungestylt (Fließtextgröße). */
.nav-v2 .ev-actions .hint {
  width: 100%; font-size: 0.76rem; line-height: 1.4; color: #8a6400;
  background: #fff6de; border-radius: 8px; padding: 0.4rem 0.55rem;
}
