* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, #0a0e1a 0%, #050710 100%);
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.2s ease;
  font-size: 16px;
  line-height: 1.6;
}

header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10,14,26,0.7);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

header h1 {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

nav a.active {
  background: rgba(96,165,250,0.15);
  color: #93c5fd;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.hero {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(147,51,234,0.08) 100%);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.hero p {
  margin-bottom: 2rem;
  color: #d1d5db;
  line-height: 1.7;
  font-size: 1rem;
  max-width: 70ch;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  position: relative;
}

.card {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(96,165,250,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  background: rgba(15,23,42,0.7);
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex: 1;
}

.card a.btn {
  align-self: flex-start;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.4);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.btn:active {
  transform: translateY(0);
}

.section {
  margin-bottom: 4rem;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f9fafb;
}

.section p {
  font-size: 0.9375rem;
  color: #d1d5db;
  margin-bottom: 1.5rem;
  line-height: 1.7;
  max-width: 70ch;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 1.25rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

thead {
  background: rgba(59,130,246,0.08);
  transition: background 0.2s ease;
  border-bottom: 2px solid rgba(96,165,250,0.2);
}

th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e5e7eb;
}

td {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.875rem;
  color: #d1d5db;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(96,165,250,0.08);
}

tbody tr:last-child {
  border-bottom: none;
}

.empty-row {
  text-align: center;
  font-style: italic;
  color: #b3b3b3;
}

.file-list {
  list-style: none;
  margin-top: 0.4rem;
}

.file-list li {
  margin-bottom: 0.25rem;
}

.file-list a {
  color: #9ecbff;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.file-list a:hover {
  text-decoration: underline;
  color: #bcd2ff;
}

footer {
  padding: 1rem 1.5rem 1.2rem 1.5rem;
  font-size: 0.8rem;
  color: #9b9b9b;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

footer .footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.35rem;
}

footer a {
  color: #c9d6e6;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,214,230,0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

html[data-theme="light"] footer a {
  color: #334155;
  border-bottom-color: rgba(51,65,85,0.35);
}
html[data-theme="light"] footer a:hover {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: rgba(0,0,0,0.5);
  padding: 0.12rem 0.3rem;
  border-radius: 0.35rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 0.75rem;
  color: #c9e2ff;
  background: rgba(0,0,0,0.35);
  margin-bottom: 0.4rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* ---- Navigation Buttons (Theme + Logout) ---- */
header nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

header nav a {
  margin-left: 0.4rem;
}

.nav-spacer {
  flex: 1;
}

.nav-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(7,9,18,0.9);
  color: #f5f5f5;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, border-color 0.2s ease;
}

.nav-btn span {
  font-size: 0.9rem;
}

.nav-btn:hover {
  background: rgba(31,96,255,0.85);
}

/* ---- Pills / Labels ---- */
.pill {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.25rem 0.625rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  margin-right: 0.375rem !important;
  margin-bottom: 0.25rem !important;
  background: rgba(0,0,0,0.4) !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  vertical-align: middle !important;
}

.pill-day {
  border-color: rgba(251, 191, 36, 0.9) !important;
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
}

.pill-type-setup {
  border-color: rgba(59,130,246,0.9) !important;
  background: rgba(59,130,246,0.2) !important;
  color: #60a5fa !important;
}

.pill-type-teardown {
  border-color: rgba(249,115,22,0.9) !important;
  background: rgba(249,115,22,0.2) !important;
  color: #fb923c !important;
}

.pill-type-event {
  border-color: rgba(147,51,234,0.9) !important;
  background: rgba(147,51,234,0.2) !important;
  color: #a78bfa !important;
}

.pill-type-rehearsal {
  border-color: rgba(34,197,94,0.9) !important;
  background: rgba(34,197,94,0.2) !important;
  color: #4ade80 !important;
}

.pill-type-other {
  border-color: rgba(148,163,184,0.9) !important;
  background: rgba(148,163,184,0.2) !important;
  color: #cbd5e1 !important;
}

.pill-day {
  border-color: rgba(251, 191, 36, 0.9);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.pill-type-setup {
  border-color: rgba(59,130,246,0.9);
  background: rgba(59,130,246,0.12);
  color: #bfdbfe;
}

.pill-type-teardown {
  border-color: rgba(249,115,22,0.9);
  background: rgba(249,115,22,0.12);
  color: #fed7aa;
}

.pill-type-event {
  border-color: rgba(147,51,234,0.9);
  background: rgba(147,51,234,0.16);
  color: #e9d5ff;
}

.pill-type-rehearsal {
  border-color: rgba(34,197,94,0.9);
  background: rgba(34,197,94,0.12);
  color: #bbf7d0;
}

.pill-type-other {
  border-color: rgba(148,163,184,0.9);
  background: rgba(148,163,184,0.16);
  color: #e5e7eb;
}

/* ---- Events Toolbar ---- */
.events-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.events-toolbar input[type="search"],
.events-toolbar select {
  padding: 0.35rem 0.6rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(5,7,16,0.9);
  color: #f5f5f5;
  font-size: 0.8rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.events-toolbar input[type="search"] {
  flex: 1;
  min-width: 160px;
}

.events-toolbar select {
  min-width: 150px;
}

.events-toolbar input[type="search"]:focus,
.events-toolbar select:focus {
  outline: none;
  border-color: rgba(59,130,246,0.7);
}

/* ---- Past Events ---- */
tr.past-event {
  opacity: 0.55;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  header {
    padding: 1rem 1.25rem;
  }

  header h1 {
    font-size: 0.875rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  nav a {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  main {
    padding: 2rem 1.25rem;
  }

  .hero {
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9375rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .card {
    padding: 1.5rem;
  }

  .section {
    margin-bottom: 3rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  table {
    min-width: 500px;
  }

  th, td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.875rem 1rem;
  }

  header h1 {
    font-size: 0.8125rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding: 1.5rem 1.25rem;
  }

  .hero h2 {
    font-size: 1.25rem;
  }

  .card {
    padding: 1.25rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================
   LIGHT MODE (Unified & Complete)
   =========================== */

html[data-theme="light"] body {
  background: #f3f4ff;
  color: #0f172a;
}
/* Account-Icon im Header (SVG) */
.nav-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
}

.nav-account-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* leichte Hover-Optik */
.nav-account:hover .nav-account-icon-svg {
  filter: brightness(1.2);
}

/* Anpassung für Dark-Mode */
html[data-theme="dark"] .nav-account-icon-svg {
  filter: brightness(1.3);
}

/* Anpassung für Light-Mode */
html[data-theme="light"] .nav-account-icon-svg {
  filter: invert(0.05);
}

/* Header / Navigation */
html[data-theme="light"] header {
  background: linear-gradient(to right, #e5edff, #f5f7ff);
  border-bottom-color: rgba(15,23,42,0.08);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.4);
}

html[data-theme="light"] header h1 {
  color: #0f172a;
}

html[data-theme="light"] nav a {
  color: #1f2937;
}

html[data-theme="light"] nav a:hover,
html[data-theme="light"] nav a.active {
  color: #1d4ed8;
}

/* Hero Section */
html[data-theme="light"] .hero {
  background: radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 55%),
              radial-gradient(circle at bottom right, rgba(168,85,247,0.12), transparent 55%);
  border-color: rgba(148,163,184,0.6);
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.45);
}

html[data-theme="light"] .hero p {
  color: #475569;
}

/* Cards */
html[data-theme="light"] .card {
  background: #ffffff;
  border-color: rgba(148,163,184,0.7);
  color: #111827;
}

html[data-theme="light"] .card p {
  color: #475569;
}

html[data-theme="light"] .card:hover {
  border-color: rgba(59,130,246,0.9);
  box-shadow: 0 18px 38px rgba(148,163,184,0.5);
}

/* Buttons */
html[data-theme="light"] .btn {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: rgba(59,130,246,0.5);
  color: #ffffff;
}

html[data-theme="light"] .btn:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 10px 24px rgba(59,130,246,0.4);
}

/* Sections / Panels */
html[data-theme="light"] .section,
html[data-theme="light"] .panel,
html[data-theme="light"] .account-card,
html[data-theme="light"] .admin-panel,
html[data-theme="light"] .table-card,
html[data-theme="light"] main > section {
  background: #ffffff;
  color: #111827;
  border-color: rgba(148, 163, 184, 0.75);
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.45);
}

html[data-theme="light"] .section p,
html[data-theme="light"] .section h2,
html[data-theme="light"] .section h3 {
  color: #0f172a;
}

html[data-theme="light"] .section p {
  color: #475569;
}

/* Tables */
html[data-theme="light"] .table-wrapper {
  background: #ffffff;
  border-color: rgba(148,163,184,0.7);
}

html[data-theme="light"] table {
  background: #ffffff;
  color: #111827;
}

html[data-theme="light"] thead {
  background: #e5edff;
}

html[data-theme="light"] th {
  color: #111827;
}

html[data-theme="light"] tbody tr:nth-child(even) {
  background: #f9fafb;
}

html[data-theme="light"] tbody tr:hover {
  background: rgba(191,219,254,0.9);
}

html[data-theme="light"] .empty-row {
  color: #6b7280;
}

/* PDF Frame */
html[data-theme="light"] .pdf-frame {
  background: #ffffff;
  border-color: rgba(148,163,184,0.7);
}

.pdf-status {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  color: #9ca3af;
  font-size: 0.85rem;
}

.pdf-status.is-error {
  color: #fca5a5;
}

a[data-disabled="true"] {
  cursor: wait;
  opacity: 0.65;
  pointer-events: none;
}

/* Toolbars and Inputs */
html[data-theme="light"] .events-toolbar input[type="search"],
html[data-theme="light"] .events-toolbar select {
  background: #ffffff;
  border-color: rgba(148,163,184,0.9);
  color: #111827;
}

/* Navigation Buttons */
html[data-theme="light"] .nav-btn {
  background: #e5e7eb;
  color: #111827;
  border-color: rgba(148,163,184,0.9);
}

html[data-theme="light"] .nav-btn:hover {
  background: #d1d5db;
}

/* Footer */
html[data-theme="light"] footer {
  color: #4b5563;
  border-top-color: rgba(148, 163, 184, 0.6);
}

/* Code blocks */
html[data-theme="light"] code {
  background: rgba(148,163,184,0.15);
  color: #0f172a;
}

/* Badge */
html[data-theme="light"] .badge-soft {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.4);
  color: #1e40af;
}

/* Pills - maintain colors but adjust slightly for light mode */
html[data-theme="light"] .pill {
  background: rgba(255,255,255,0.8);
  border-color: rgba(148,163,184,0.5);
}

html[data-theme="light"] .pill-day {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(217, 119, 6, 0.5);
  color: #b45309;
}

html[data-theme="light"] .pill-type-setup {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.5);
  color: #1e40af;
}

html[data-theme="light"] .pill-type-teardown {
  background: rgba(249,115,22,0.15);
  border-color: rgba(249,115,22,0.5);
  color: #c2410c;
}

html[data-theme="light"] .pill-type-event {
  background: rgba(147,51,234,0.15);
  border-color: rgba(147,51,234,0.5);
  color: #7e22ce;
}

html[data-theme="light"] .pill-type-rehearsal {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.5);
  color: #15803d;
}

html[data-theme="light"] .pill-type-other {
  background: rgba(148,163,184,0.2);
  border-color: rgba(148,163,184,0.6);
  color: #475569;
}

/* File links */
html[data-theme="light"] .file-list a {
  color: #2563eb;
  background: rgba(59,130,246,0.05);
  border-color: rgba(59,130,246,0.2);
}

html[data-theme="light"] .file-list a:hover {
  background: rgba(59,130,246,0.1);
  color: #1d4ed8;
}

/* Account-Icon im Header */
.nav-account {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-account:hover {
  background: rgba(0, 0, 0, 0.45);
}

/* Grundlayout der Icons */
.account-icon {
  width: 22px;
  height: 22px;
  display: block;
}

/* Standard: Dark-Theme -> helle Icon-Version anzeigen */
.account-icon--light {
  display: block;
}
.account-icon--dark {
  display: none;
}

/* Light-Theme -> dunkle Icon-Version anzeigen */
html[data-theme="light"] .account-icon--light {
  display: none;
}
html[data-theme="light"] .account-icon--dark {
  display: block;
}

/* ===========================
   Barrierefreiheit (a11y)
   =========================== */

/* Nur für Screenreader sichtbar (z.B. Tabellen-Caption) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Deutlich sichtbarer Tastatur-Fokus auf interaktiven Elementen */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 4px;
}
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible,
html[data-theme="light"] input:focus-visible,
html[data-theme="light"] select:focus-visible,
html[data-theme="light"] textarea:focus-visible {
  outline-color: #2563eb;
}

/* Team-/Namen-Chips in der Terminliste */
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.team-chip {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}
html[data-theme="light"] .team-chip {
  background: rgba(15,23,42,0.06);
  border-color: rgba(15,23,42,0.12);
  color: #1f2937;
}

/* ===========================
   2026 UI Overhaul
   =========================== */

:root {
  --tt-bg: #080a0d;
  --tt-bg-elevated: #10141a;
  --tt-surface: rgba(18, 23, 30, 0.86);
  --tt-surface-strong: rgba(23, 29, 38, 0.94);
  --tt-border: rgba(196, 209, 224, 0.16);
  --tt-border-strong: rgba(196, 209, 224, 0.28);
  --tt-text: #f4f7fb;
  --tt-muted: #a9b4c4;
  --tt-subtle: #758195;
  --tt-accent: #38bdf8;
  --tt-accent-2: #f59e0b;
  --tt-radius: 0.65rem;
  --tt-shadow: 0 18px 48px rgba(0,0,0,0.36);
}

body {
  background:
    linear-gradient(135deg, rgba(56,189,248,0.06), transparent 32%),
    linear-gradient(180deg, #0d1117 0%, var(--tt-bg) 48%, #050608 100%);
  color: var(--tt-text);
}

header {
  background: rgba(9, 12, 17, 0.88);
  border-bottom-color: var(--tt-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

header h1 {
  background: none;
  color: var(--tt-text);
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0.08em;
}

nav a {
  border-radius: 0.55rem;
  color: #dbe4ef;
}

nav a:hover,
nav a.active {
  background: rgba(56,189,248,0.12);
  color: #f8fbff;
}

main {
  max-width: 1280px;
}

.hero,
.section,
.panel,
.account-card,
.card,
.table-wrapper {
  border-radius: var(--tt-radius);
  border-color: var(--tt-border);
  background: var(--tt-surface);
  box-shadow: var(--tt-shadow);
}

.hero {
  padding: 2.4rem;
}

.hero::before,
.card::before {
  display: none;
}

.section {
  padding: 1.2rem;
  border: 1px solid var(--tt-border);
}

.section h2,
.hero h2 {
  letter-spacing: -0.01em;
}

.section p,
.hero p,
.small-text {
  color: var(--tt-muted);
}

.card {
  background: rgba(18,23,30,0.66);
  border-radius: var(--tt-radius);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(56,189,248,0.28);
  box-shadow: 0 18px 36px rgba(0,0,0,0.32);
}

.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-export,
button {
  border-radius: 0.55rem;
}

.btn,
.btn-primary {
  background: #1f8dcc;
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 10px 24px rgba(14,165,233,0.2);
}

.btn:hover,
.btn-primary:hover {
  background: #1678af;
  box-shadow: 0 12px 26px rgba(14,165,233,0.24);
}

.btn-outline {
  border-color: var(--tt-border-strong);
  color: #dbe4ef;
}

.btn-export {
  border-color: rgba(245,158,11,0.48);
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
}

input,
select,
textarea {
  font: inherit;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.events-toolbar input[type="search"],
.events-toolbar select {
  border-radius: 0.55rem;
  border-color: var(--tt-border-strong);
  background: rgba(5,8,12,0.72);
}

thead {
  background: rgba(56,189,248,0.08);
  border-bottom-color: rgba(56,189,248,0.18);
}

th {
  color: #dce7f5;
  letter-spacing: 0.04em;
}

td {
  color: #cbd5e1;
}

.tag-pill,
.pill,
.team-chip {
  border-radius: 0.45rem !important;
}

html[data-theme="light"] body {
  background: #f6f8fb;
}

html[data-theme="light"] header {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 28px rgba(15,23,42,0.08);
}

html[data-theme="light"] .section,
html[data-theme="light"] .panel,
html[data-theme="light"] .account-card,
html[data-theme="light"] .card,
html[data-theme="light"] .table-wrapper,
html[data-theme="light"] .hero {
  background: #ffffff;
  border-color: rgba(15,23,42,0.1);
  box-shadow: 0 14px 34px rgba(15,23,42,0.08);
}

/* ===========================
   Mobile-Navigation (Hamburger)
   Button wird per ui.js eingehängt; hier nur die Optik.
   =========================== */

.nav-toggle {
  display: none; /* Desktop: ausgeblendet */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 0.6rem;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.1);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #e5e7eb;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* X-Animation, wenn offen */
header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

html[data-theme="light"] .nav-toggle {
  border-color: rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.04);
}
html[data-theme="light"] .nav-toggle span {
  background: #1f2937;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  /* Nav wird zum Dropdown-Panel unter dem Header */
  header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem 1rem;
    background: rgba(10,14,26,0.98);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.45);
  }

  header.nav-open nav {
    display: flex;
  }

  header nav a {
    margin-left: 0;
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
    width: 100%;
  }

  /* Account-/Admin-Icons im Dropdown linksbündig */
  header nav .nav-account {
    width: auto;
    align-self: flex-start;
  }

  html[data-theme="light"] header nav {
    background: rgba(255,255,255,0.98);
    border-bottom-color: rgba(15,23,42,0.1);
  }
}

/* ===========================
   Toast-Benachrichtigungen (ttToast in ui.js)
   =========================== */
#tt-toast-host {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: min(92vw, 420px);
}

.tt-toast {
  pointer-events: auto;
  width: 100%;
  background: rgba(15,23,42,0.97);
  color: #f1f5f9;
  border: 1px solid rgba(148,163,184,0.35);
  border-left: 3px solid #60a5fa;
  border-radius: 0.7rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.tt-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tt-toast--success { border-left-color: #4ade80; }
.tt-toast--error { border-left-color: #f87171; }

@media (prefers-reduced-motion: reduce) {
  .tt-toast { transition: none; transform: none; }
}

html[data-theme="light"] .tt-toast {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15,23,42,0.12);
  box-shadow: 0 12px 30px rgba(15,23,42,0.18);
}

/* ===========================
   PDF-Dokumentkarte (Öffnen/Download statt eingebettetem Viewer)
   =========================== */
.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--tt-radius, 0.65rem);
  border: 1px solid var(--tt-border, rgba(255,255,255,0.12));
  background: var(--tt-surface, rgba(18,23,30,0.66));
  box-shadow: var(--tt-shadow, 0 18px 48px rgba(0,0,0,0.36));
}
.doc-card-icon {
  font-size: 1.7rem;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: rgba(56,189,248,0.12);
  border: 1px solid rgba(56,189,248,0.25);
}
.doc-card-body { flex: 1; min-width: 0; }
.doc-card-title { font-weight: 600; font-size: 1rem; }
.doc-card .pdf-status { margin-top: 0.15rem; }

.pdf-status {
  font-size: 0.85rem;
  color: var(--tt-muted, #9ca3af);
}
.pdf-status.is-error { color: #f87171; }

@media (max-width: 480px) {
  .doc-card { flex-direction: column; align-items: stretch; text-align: center; }
  .doc-card-icon { align-self: center; }
  .doc-card .btn { width: 100%; justify-content: center; }
}

/* ===========================
   Start-Dashboard: Nächste Termine
   =========================== */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.dash-item {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: var(--tt-radius, 0.65rem);
  border: 1px solid var(--tt-border, rgba(255,255,255,0.1));
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.dash-item:hover {
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.3);
  transform: translateY(-1px);
}
.dash-date {
  flex: 0 0 auto;
  min-width: 5.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tt-accent, #38bdf8);
}
.dash-main { flex: 1; min-width: 0; }
.dash-title { font-weight: 600; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.dash-meta { font-size: 0.82rem; color: var(--tt-muted, #9ca3af); margin-top: 0.15rem; }
.dash-empty { color: var(--tt-muted, #9ca3af); font-style: italic; padding: 0.5rem 0; }

html[data-theme="light"] .dash-item {
  background: #ffffff;
  border-color: rgba(15,23,42,0.1);
}
html[data-theme="light"] .dash-item:hover {
  background: rgba(56,130,246,0.08);
}

@media (max-width: 480px) {
  .dash-item { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .dash-date { min-width: 0; }
}

/* ===========================
   Termin-Tabelle (Pläne) auf Mobil als Karten
   =========================== */
@media (max-width: 640px) {
  #list-view .table-wrapper {
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  #list-view table { min-width: 0; }
  #list-view thead { display: none; }
  #list-view table,
  #list-view tbody,
  #list-view tr,
  #list-view td { display: block; width: 100%; }

  #list-view tbody tr {
    border: 1px solid var(--tt-border, rgba(255,255,255,0.12));
    border-radius: var(--tt-radius, 0.65rem);
    background: var(--tt-surface, rgba(18,23,30,0.66));
    margin-bottom: 0.7rem;
    padding: 0.6rem 0.9rem;
  }
  #list-view tbody tr:hover { background: var(--tt-surface, rgba(18,23,30,0.66)); }

  #list-view td {
    border: none;
    padding: 0.3rem 0;
    text-align: left;
  }
  #list-view td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: var(--tt-muted, #9ca3af);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.1rem;
  }
  #list-view td:empty { display: none; }
  #list-view td.empty-row { text-align: center; }
  #list-view td.empty-row::before { content: none; }
}

/* ===========================
   Erst-Login-Zustimmung (ttConsent in ui.js)
   =========================== */
.tt-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 7, 16, 0.78);
  backdrop-filter: blur(6px);
}
.tt-consent-card {
  width: 100%;
  max-width: 460px;
  background: var(--tt-surface-strong, #11151c);
  border: 1px solid var(--tt-border, rgba(255,255,255,0.14));
  border-radius: 1rem;
  padding: 1.5rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  color: var(--tt-text, #f4f7fb);
}
.tt-consent-card h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.tt-consent-card p { color: var(--tt-muted, #a9b4c4); margin-bottom: 0.7rem; }
.tt-consent-list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.tt-consent-list li { font-size: 0.9rem; line-height: 1.45; }
.tt-consent-list a,
.tt-consent-links a { color: var(--tt-accent, #60a5fa); }
.tt-consent-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
  cursor: pointer;
}
.tt-consent-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--tt-accent, #3b82f6);
}
.tt-consent-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.tt-consent-actions button {
  border-radius: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.tt-consent-logout {
  background: transparent;
  border-color: var(--tt-border-strong, rgba(255,255,255,0.28));
  color: var(--tt-text, #e5e7eb);
}
.tt-consent-accept {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
}
.tt-consent-accept:disabled { opacity: 0.5; cursor: not-allowed; }
.tt-consent-links {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--tt-muted, #9ca3af);
  text-align: center;
}
html[data-theme="light"] .tt-consent-card {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15,23,42,0.12);
}
html[data-theme="light"] .tt-consent-card p { color: #475569; }

/* ===========================
   Onboarding-Tour (ttStartTour in ui.js)
   =========================== */
.nav-help {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--tt-border, rgba(255,255,255,0.2));
  background: rgba(255,255,255,0.05);
  color: var(--tt-text, #e5e7eb);
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
  margin-left: 0.2rem;
}
.nav-help:hover { background: rgba(56,189,248,0.15); }
html[data-theme="light"] .nav-help {
  border-color: rgba(15,23,42,0.18);
  background: rgba(15,23,42,0.04);
  color: #1f2937;
}

#tt-tour {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
}
#tt-tour.is-centered {
  background: rgba(3,7,16,0.7);
  pointer-events: auto;
}
.tt-tour-hole {
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(3,7,16,0.7);
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .tt-tour-hole { transition: none; }
}
.tt-tour-card {
  position: fixed;
  pointer-events: auto;
  width: min(320px, calc(100vw - 24px));
  background: var(--tt-surface-strong, #11151c);
  color: var(--tt-text, #f4f7fb);
  border: 1px solid var(--tt-border, rgba(255,255,255,0.16));
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
  z-index: 2;
}
#tt-tour.is-centered .tt-tour-card {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.tt-tour-step { font-size: 0.72rem; color: var(--tt-muted, #9ca3af); margin-bottom: 0.3rem; letter-spacing: 0.05em; }
.tt-tour-title { font-size: 1.05rem; margin-bottom: 0.35rem; }
.tt-tour-body { font-size: 0.9rem; color: var(--tt-muted, #cbd5e1); line-height: 1.5; margin-bottom: 0.9rem; }
.tt-tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.tt-tour-actions button { border-radius: 0.55rem; padding: 0.45rem 0.85rem; font-size: 0.85rem; cursor: pointer; border: 1px solid transparent; }
.tt-tour-skip { background: transparent; color: var(--tt-muted, #9ca3af); }
.tt-tour-nav { display: flex; gap: 0.4rem; }
.tt-tour-prev { background: transparent; border-color: var(--tt-border-strong, rgba(255,255,255,0.28)); color: var(--tt-text, #e5e7eb); }
.tt-tour-next { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; }
html[data-theme="light"] .tt-tour-card { background: #fff; color: #0f172a; border-color: rgba(15,23,42,0.12); }
html[data-theme="light"] .tt-tour-body { color: #475569; }
