/* =========================================================================
   AirLST Messeportal — Prototyp V2
   Farb-/Typo-Tokens per Pixel-Sampling aus den bereitgestellten CI-Screenshots
   (Cockpit, Gästeliste, Meine Events, Event-Informationen, Tickets & Add-ons)
   extrahiert. Siehe DESIGN-DECISIONS-V2.md für die Zuordnung im Detail.
   ========================================================================= */

:root {
  /* --- AirLST CI: Kernfarben (aus Screenshots gesampelt) --- */
  --ci-purple: #7b5acc;        /* Primärbuttons, Links, aktive Zustände */
  --ci-purple-dark: #6647b3;   /* Hover auf Primärbutton */
  --ci-purple-light: #efeaff;  /* helle Flächen / aktive Icon-BG */
  --ci-topbar-1: #2c1a45;
  --ci-topbar-2: #3b2255;
  --ci-badge-bg: #4f347e;      /* z.B. "Free Trial"-Badge auf dunklem Topbar */

  /* --- Neutrale Flächen --- */
  --bg: #f4f5fb;
  --bg-gradient: linear-gradient(120deg, #f8f7fd 0%, #eceafb 40%, #eef4fb 68%, #ffffff 100%);
  --card: #ffffff;
  --border: #ece9f5;
  --border-strong: #d6d0e8; /* sichtbarer als --border, für kleine Elemente auf hellem Grund (z.B. Stepper-Verbindungslinie) */
  --sidebar-active-bg: #f3f4f6;
  --text: #201a2c;
  --muted: #6b7280;

  /* --- Status-/Signalfarben (aus Screenshots: grüne Kennzahl, Orange-Progressbar) --- */
  --green-bg: #eaf7ef;
  --green-text: #3c8154;
  --amber-bg: #fdf1de;
  --amber-text: #b6791c;
  --red-bg: #fdeaea;
  --red-text: #c93f3f;
  --purple-bg: #efeaff;
  --purple-text: var(--ci-purple);

  /* --- Kräftige Fill-Farben für Diagramme (z.B. NDA-Donut) ---
     Die --*-text-Varianten oben sind bewusst gedeckt/dunkel, damit Text auf hellen
     Pill-Hintergründen lesbar bleibt — als Flächenfarbe in einem Donut wirken sie dadurch
     stumpf/"wie mit Overlay". Für Chart-Flächen daher separate, klare Farben. */
  --chart-green: #2fb673;
  --chart-amber: #f5a623;
  --chart-red: #ef5253;
  --chart-gray: #b9b9c6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(43, 24, 74, 0.04), 0 2px 10px rgba(43, 24, 74, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, select, textarea { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* ---------- App shell (Topbar oben, Sidebar + Content darunter — wie im echten AirLST-Portal) ---------- */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar-brand {
  height: 64px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--ci-topbar-1), var(--ci-topbar-2) 55%, var(--ci-topbar-1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
}

.logo-full {
  /* Das volle Logo (Icon + "AIRLST" + "GUEST SOLUTIONS") braucht etwas mehr Höhe als nur der
     Schriftzug, damit die kleine Unterzeile in der 64px-Topbar noch lesbar bleibt. */
  height: 34px;
  width: auto;
  display: block;
}

.topbar-brand .tb-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-brand .bell {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #cfc4e6;
}

.topbar-brand .user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
}

.topbar-brand .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
}

.shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #55506b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.sidebar nav a .ic {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sidebar nav a:hover { background: #faf9fd; color: var(--text); }
.sidebar nav a.active { background: var(--sidebar-active-bg); color: var(--ci-purple); font-weight: 700; }

.sidebar .spacer { flex: 1; }

.sidebar .exit-link {
  font-size: 12px;
  color: #a7a2b8;
  padding: 10px 12px;
  cursor: pointer;
}

.main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-gradient);
}

.content {
  flex: 1;
  padding: 28px 32px 60px;
  max-width: 1080px;
  width: 100%;
}

.content.centered {
  max-width: 480px;
  margin: 40px auto;
}

/* ---------- Auth screens (kein App-Shell) ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-gradient);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

/* Auf der hellen Auth-Karte kommt die farbige SVG-Logovariante (dunkler Schriftzug) zum
   Einsatz statt des weißen PNGs aus der Topbar — daher hier kein dunkler Hintergrund-Chip
   mehr nötig, nur Abstand nach unten. */
.auth-logo {
  display: block;
  height: 28px;
  width: auto;
  margin-bottom: 28px;
}

/* ---------- Typografie ---------- */

h1 { font-size: 22px; margin: 0 0 6px; font-weight: 800; }
h2 { font-size: 18px; margin: 0 0 4px; font-weight: 700; }
h3 { font-size: 15px; margin: 0 0 2px; font-weight: 700; }
.page-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.section-label { font-size: 12.5px; font-weight: 700; color: var(--ci-purple); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.5px; }
p.hint { color: var(--muted); font-size: 13px; }

/* ---------- Formularfelder ---------- */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type=text],
.field input[type=email],
.field input[type=date],
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  line-height: 40px;
}
/* Native Select-Chrome (Pfeil/Innenabstand) unterscheidet sich je nach Betriebssystem/Browser
   von Text-Inputs und macht das Feld sonst höher/niedriger — appearance:none + eigener Pfeil
   sorgt dafür, dass Select und Input exakt gleich hoch sind. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  line-height: 1.4;
  min-height: 84px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ci-purple);
  box-shadow: 0 0 0 3px rgba(123,90,204,0.14);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 13.5px;
  background: #fff;
}
.radio-option.selected { border-color: var(--ci-purple); background: var(--ci-purple-light); }
.radio-option input { margin-top: 2px; }
.radio-option .opt-title { font-weight: 600; }
.radio-option .opt-sub { color: var(--muted); font-size: 12.5px; }
.radio-option.disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--ci-purple); color: #fff; }
.btn-primary:hover { background: var(--ci-purple-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #faf9fd; }
.btn-success { background: var(--green-text); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-link { background: none; border: none; color: var(--ci-purple); cursor: pointer; font-size: 13px; padding: 0; font-weight: 700; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 10px; }
.btn-row.end { justify-content: flex-end; }

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 16px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 800px) { .card-grid { grid-template-columns: 1fr; } }

.action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  box-shadow: var(--shadow-card);
}
.action-card:hover { border-color: var(--ci-purple); box-shadow: 0 2px 12px rgba(123,90,204,0.14); }
.action-card .ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ci-purple-light); color: var(--ci-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin: 0 auto 12px;
}
.action-card .title { font-weight: 700; font-size: 14px; }
.action-card .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
/* .card + .card ist für vertikal gestapelte Cards gedacht (z.B. Profil-/Tour-Screens) — innerhalb
   von .two-col stehen zwei Cards nebeneinander, sind im DOM aber trotzdem Geschwister und würden
   sonst denselben Abstand nach unten verschoben bekommen, was die Karten ungleich hoch wirken lässt. */
.two-col > .card + .card { margin-top: 0; }
.two-col > .card { display: flex; flex-direction: column; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.list-item:last-child { border-bottom: none; }
.list-item .li-title { font-weight: 600; }
.list-item .li-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Badges / Pills ---------- */

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.pill-green { background: var(--green-bg); color: var(--green-text); }
.pill-amber { background: var(--amber-bg); color: var(--amber-text); }
.pill-red { background: var(--red-bg); color: var(--red-text); }
.pill-purple { background: var(--purple-bg); color: var(--purple-text); }
.pill-gray { background: #f7f7f7; color: #666; }

/* ---------- Stepper ---------- */

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 12.5px;
  color: var(--muted);
}
.stepper .dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #f0eefa; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
}
.stepper .dot.done { background: var(--ci-purple); color: #fff; }
.stepper .dot.current { background: var(--ci-topbar-2); color: #fff; }
.stepper .seg { width: 28px; height: 2px; background: var(--border-strong); }
.stepper .seg.done { background: var(--ci-purple); }
.stepper .label.current { color: var(--text); font-weight: 700; }

/* ---------- Raumbelegungsplan ---------- */

.occ-table-wrap { overflow-x: auto; }
table.occ {
  border-collapse: collapse;
  width: 100%;
  font-size: 12.5px;
}
table.occ th, table.occ td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}
table.occ th { background: #faf9fd; color: var(--muted); font-weight: 600; }
table.occ td.room-name { text-align: left; font-weight: 600; background: #faf9fd; }
table.occ td.room-name .cap { color: var(--muted); font-weight: 400; font-size: 11px; display: block; }
.occ-slot { border-radius: 6px; padding: 4px 6px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.occ-free { color: var(--muted); background: #fbfbfe; }
.occ-mine { background: var(--purple-bg); color: var(--purple-text); }
.occ-other-edit { background: var(--amber-bg); color: var(--amber-text); }
.occ-other-view { background: #eeecf7; color: var(--muted); }
.occ-selected { outline: 2px solid var(--ci-purple); }

.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }
.legend .sw { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw span.box { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Kapazitätsbalken ---------- */

.capacity-bar {
  height: 8px;
  border-radius: 4px;
  background: #f0eefa;
  overflow: hidden;
  margin: 6px 0;
}
.capacity-bar .fill { height: 100%; background: var(--ci-purple); }
.capacity-bar .fill.full { background: var(--red-text); }

/* ---------- Gast-Zeilen ---------- */

.guest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.guest-row:last-child { border-bottom: none; }
.guest-row .g-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f0eefa; color: var(--ci-topbar-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.guest-row .g-info { flex: 1; min-width: 0; }
.guest-row .g-name { font-weight: 600; font-size: 13.5px; }
.guest-row .g-sub { color: var(--muted); font-size: 12px; }
.guest-row .g-remove { color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px; }

/* ---------- Toggle ---------- */

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle {
  width: 40px; height: 22px; border-radius: 999px; background: #d9d5e8;
  position: relative; cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.toggle.on { background: var(--ci-purple); }
.toggle .knob {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  position: absolute; top: 2px; left: 2px; transition: left 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle.on .knob { left: 20px; }

/* ---------- Bestätigung ---------- */

.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-bg); color: var(--green-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 16px;
}
.confirm-center { text-align: center; }

.kv-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--muted); }
.kv-row .v { font-weight: 600; text-align: right; }

/* ---------- Donut ---------- */

.donut {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

/* ---------- Hinweis / Design-Entscheidung ---------- */

.notice {
  background: #fdf6e6;
  border: 1px solid #f0ddac;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: #8a6a1a;
  margin-top: 16px;
  margin-bottom: 16px;
}

.decision-note {
  border-left: 3px solid var(--ci-purple);
  background: #f8f6fe;
  padding: 8px 12px;
  font-size: 12px;
  color: #4a3d70;
  margin-top: 10px;
  border-radius: 0 6px 6px 0;
}

.empty-state { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 12.5px; cursor: pointer; background: #fff;
}
.chip.active { background: var(--ci-topbar-2); color: #fff; border-color: var(--ci-topbar-2); }
