/* ─────────────────────────────────────────────────────────
   Admin Design System — minimalistisch, modern
   Inspiriert von Vercel / Linear / Stripe Dashboard
   ───────────────────────────────────────────────────────── */

:root, html[data-theme="light"] {
  /* Neutrals — LIGHT (default) */
  --c-bg:        #fafafa;
  --c-surface:   #ffffff;
  --c-subtle:    #f5f5f5;
  --c-border:    #e5e5e5;
  --c-border-2:  #d4d4d4;
  --c-text:      #0a0a0a;
  --c-text-2:    #525252;
  --c-text-3:    #a3a3a3;
}

/* ── DARK MODE ─────────────────────────────────────────────
   Aktiviert über <html data-theme="dark"> (theme-client.js).
   Schaltet Backgrounds/Borders/Texts; Akzent-Farbe vom Preset/Override
   bleibt erhalten (von theme-client.js per CSS-Variable gesetzt). */
html[data-theme="dark"] {
  --c-bg:        #0a0a0a;
  --c-surface:   #171717;
  --c-subtle:    #1f1f1f;
  --c-border:    #262626;
  --c-border-2:  #404040;
  --c-text:      #fafafa;
  --c-text-2:    #a3a3a3;
  --c-text-3:    #737373;
  --c-accent-soft: #1e293b;
  --c-success-bg: #052e16;
  --c-success-text: #86efac;
  --c-error-bg:   #3f1212;
  --c-error-text: #fca5a5;
  --c-warning-bg: #422006;
  --c-warning-text:#fcd34d;
  --c-info-bg:    #082f49;
  --c-info-text:  #7dd3fc;
}

/* ── OUTDOOR MODE ─────────────────────────────────────────
   Hochkontrast für draußen (Sonnenlicht). Größere Schrift, stärkere
   Borders, schwarz auf weiß. */
html[data-theme="outdoor"] {
  --c-bg:        #ffffff;
  --c-surface:   #ffffff;
  --c-subtle:    #f0f0f0;
  --c-border:    #000000;
  --c-border-2:  #000000;
  --c-text:      #000000;
  --c-text-2:    #1a1a1a;
  --c-text-3:    #333333;
  font-size: 16px;  /* +2px gegenüber default 14px */
}
html[data-theme="outdoor"] .btn,
html[data-theme="outdoor"] .nav-item { border-width: 2px; font-weight: 600; }

:root {

  /* Accent — neutrales Slate, dezent statt pures Schwarz.
     Überschreibbar: <html style="--c-accent: #4f46e5"> für eigenes Branding */
  --c-accent:        #334155;
  --c-accent-hover:  #1e293b;
  --c-accent-text:   #ffffff;
  --c-accent-soft:   #f1f5f9;     /* helle Akzent-Variante für Hover/Backgrounds */
  --c-accent-bar:    #475569;     /* Charts */

  /* Semantik */
  --c-success:       #16a34a;
  --c-success-bg:    #dcfce7;
  --c-success-text:  #166534;
  --c-error:         #dc2626;
  --c-error-bg:      #fef2f2;
  --c-error-text:    #991b1b;
  --c-warning:       #d97706;
  --c-warning-bg:    #fffbeb;
  --c-warning-text:  #92400e;
  --c-info:          #0284c7;
  --c-info-bg:       #f0f9ff;
  --c-info-text:     #075985;

  /* Layout */
  --sidebar-w:   240px;
  --content-pad: 32px;

  /* Tokens */
  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;

  /* Shadows — sparsam einsetzen */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.10);

  /* Type scale */
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  14px;
  --fs-lg:  16px;
  --fs-xl:  20px;
  --fs-2xl: 24px;

  --transition: all 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ───────── Layout ───────── */

.admin-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ───────── Sidebar ───────── */

.sidebar {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  /* Block 25 v2.7.21 (e89): kein Sidebar-Scroll mehr — nur sidebar-scroll-wrap
   * scrollt; Brand/User oben + Footer unten bleiben sichtbar. */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sidebar-scroll-wrap {
  flex: 1 1 auto;
  min-height: 0;       /* wichtig damit overflow in flex-column greift */
  overflow-y: auto;
  margin: 0 -12px;     /* visuelle Bündigkeit mit Sidebar-Padding */
  padding: 0 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 24px;
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.sidebar-brand-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--c-accent);
  color: var(--c-accent-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

.sidebar-section { margin-top: 16px; }
.sidebar-section + .sidebar-section { margin-top: 24px; }

/* Block 10 — kollabierbare Sektionen */
.sidebar-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
button.sidebar-label:hover {
  color: var(--c-text-2);
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}
.sidebar-label.sticky { cursor: default; }
.sidebar-label.sticky:hover { background: transparent; }
.sidebar-chevron {
  display: inline-block;
  font-size: 10px;
  transition: transform 180ms ease;
  color: var(--c-text-3);
  margin-left: 6px;
}
.sidebar-section.collapsed .sidebar-chevron { transform: rotate(-90deg); }
.sidebar-section-body {
  overflow: hidden;
  max-height: 800px;             /* großzügig genug für alle Items */
  transition: max-height 220ms ease, opacity 180ms ease;
  opacity: 1;
}
.sidebar-section.collapsed .sidebar-section-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  color: var(--c-text-2);
  text-align: left;
  width: 100%;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--c-subtle); color: var(--c-text); }
.nav-item.active {
  background: var(--c-subtle);
  color: var(--c-text);
  font-weight: 500;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }

/* ── Sidebar User Info ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0 8px;
  border-radius: var(--border-r);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
}
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 500; }
.sidebar-user-role { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .04em; }

/* ── Nav Badge: round count chip in theme accent color ── */
.nav-badge {
  background: var(--c-accent, #5e6ad2);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
/* Two-digit/large counts: keep proportional */
.nav-badge:empty { display: none !important; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  padding-left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ───────── Content ───────── */

.content {
  padding: 40px var(--content-pad) 80px;
  max-width: 1100px;
  width: 100%;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 200ms ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-header p {
  color: var(--c-text-2);
  font-size: var(--fs-md);
  margin-top: 4px;
}

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  font-weight: 500;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  height: 34px;
}
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--c-accent);
  color: var(--c-accent-text);
  border-color: var(--c-accent);
}
.btn-primary:hover { background: var(--c-accent-hover); border-color: var(--c-accent-hover); }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-secondary:hover { background: var(--c-subtle); border-color: var(--c-border-2); }

.btn-ghost {
  background: transparent;
  color: var(--c-text-2);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--c-subtle); color: var(--c-text); }

.btn-danger {
  background: var(--c-surface);
  color: var(--c-error);
  border-color: var(--c-border);
}
.btn-danger:hover { background: var(--c-error-bg); border-color: #fecaca; }

.btn-danger-solid {
  background: var(--c-error);
  color: #fff;
  border-color: var(--c-error);
}
.btn-danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }

/* Confirm-Dialog Icon-Header */
.confirm-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.confirm-icon.danger  { background: var(--c-error-bg);   color: var(--c-error); }
.confirm-icon.warning { background: var(--c-warning-bg); color: var(--c-warning); }
.confirm-icon.info    { background: var(--c-info-bg);    color: var(--c-info); }
.confirm-icon svg { width: 22px; height: 22px; }

/* Aufklappbare Sektionen */
.collapsible-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.collapsible-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  margin-right: 6px;
  color: var(--c-text-3);
  transition: transform 200ms ease;
  flex-shrink: 0;
}
.collapsible-arrow svg { width: 14px; height: 14px; }
.collapsible-toggle.expanded .collapsible-arrow { transform: rotate(90deg); }
.collapsible-body { display: none; }
.collapsible-body.show { display: block; animation: collapseFade 200ms ease-out; }
@keyframes collapseFade {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.collapsible-summary {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  margin-left: 8px;
  font-weight: 400;
}

/* History-Audit Liste */
.history-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-entry {
  padding: 10px 12px;
  border-left: 3px solid var(--c-border);
  background: var(--c-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.history-entry-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  margin-bottom: 4px;
}
.history-entry-action {
  font-weight: 500;
  color: var(--c-text);
}
.history-entry-changes {
  font-size: var(--fs-xs);
  color: var(--c-text-2);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  white-space: pre-wrap;
}
.history-entry.create { border-left-color: var(--c-success); }
.history-entry.update { border-left-color: var(--c-info); }
.history-entry.delete { border-left-color: var(--c-error); }

.btn-icon {
  padding: 0;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
}

.btn-sm {
  height: 28px;
  padding: 4px 10px;
  font-size: var(--fs-sm);
}
.btn-sm svg { width: 13px; height: 13px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ───────── Cards & Sections ───────── */

.section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-head p {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  margin-top: 2px;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 20px 0;
}

/* ───────── Forms ───────── */

.field { margin-bottom: 16px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
}
.field-help {
  font-size: var(--fs-xs);
  color: var(--c-text-2);
  margin-top: 4px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"],
select, textarea {
  width: 100%;
  padding: 7px 12px;
  height: 34px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font-size: var(--fs-md);
  font-family: inherit;
  color: var(--c-text);
  transition: var(--transition);
}
textarea { height: auto; min-height: 80px; padding: 9px 12px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}

input::placeholder { color: var(--c-text-3); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Toggle (clean modern) */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: #d4d4d4;
  border-radius: 10px;
  transition: var(--transition);
}
.toggle-track::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-track { background: var(--c-accent); }
.toggle input:checked + .toggle-track::before { transform: translateX(16px); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--c-border); }
.toggle-row-text { flex: 1; }
.toggle-row-text label {
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  display: block;
}
.toggle-row-text .help-text {
  font-size: var(--fs-xs);
  color: var(--c-text-2);
  margin-top: 2px;
}

/* ───────── Chips (Abteilungen) ───────── */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 28px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: var(--fs-sm);
  color: var(--c-text);
  transition: var(--transition);
}
.chip:hover { border-color: var(--c-border-2); }
.chip-x {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--c-text-3);
  cursor: pointer;
  transition: var(--transition);
}
.chip-x:hover { background: var(--c-error-bg); color: var(--c-error); }

.chip-input-row {
  display: flex;
  gap: 8px;
}
.chip-input-row input { flex: 1; }

/* ───────── Location Cards ───────── */

.loc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}
.loc-card:hover { border-color: var(--c-border-2); }

.loc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-border);
}
.loc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.loc-title svg { color: var(--c-text-2); width: 18px; height: 18px; }

.loc-body { padding: 16px 20px 20px; }

.loc-subsection { margin-bottom: 20px; }
.loc-subsection:last-child { margin-bottom: 0; }

.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.subsection-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.subsection-count {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  margin-left: 6px;
}

.list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-md);
  transition: var(--transition);
}
.list-row:hover { background: var(--c-subtle); }
.list-row-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text);
}
.list-row-content svg { color: var(--c-text-3); width: 15px; height: 15px; flex-shrink: 0; }

/* Zimmer-Layout: Name+Meta links, Features mittig, Aktionen rechts */
.room-row .list-row-content { gap: 12px; }
.room-info { flex: 1; min-width: 0; }
.room-info > div:first-child { font-size: var(--fs-md); }
.room-note  { color: var(--c-text-2); font-weight: 400; font-size: var(--fs-sm); }
.room-features { display: inline-flex; gap: 4px; flex-shrink: 0; }
.feat {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--c-subtle);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  transition: var(--transition);
}
.feat svg { width: 14px; height: 14px; }
.feat:hover { color: var(--c-text); border-color: var(--c-border-2); }
.feat-on { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }

/* Hypercharger Pill */
.pill-hyper {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 600;
}
.pill-hyper svg { color: #ea580c; }
.pill { display: inline-flex; align-items: center; gap: 4px; }
.btn svg, .btn-icon svg { width: 14px; height: 14px; }
.subsection-head .btn svg { width: 13px; height: 13px; }
.loc-head .btn svg { width: 13px; height: 13px; }
.chip-x svg { width: 12px; height: 12px; }
.list-row-meta {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
}
.list-row-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: var(--transition);
}
.list-row:hover .list-row-actions { opacity: 1; }

.list-empty {
  padding: 12px;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  font-style: italic;
}

/* ───────── Table ───────── */

.table-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-group select, .filter-group input:not([type="checkbox"]):not([type="radio"]) {
  height: 30px;
  font-size: var(--fs-sm);
  width: auto;
  min-width: 130px;
  flex: 0 0 auto;
}
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  width: 16px; height: 16px; min-width: 0; flex: 0 0 auto; margin: 0;
}

.table-wrap { overflow-x: auto; }

table.modern {
  width: 100%;
  border-collapse: collapse;
}
table.modern th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-2);
  padding: 10px 16px;
  background: var(--c-subtle);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
table.modern td {
  padding: 12px 16px;
  font-size: var(--fs-md);
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
table.modern tr:last-child td { border-bottom: none; }
table.modern tr:hover td { background: #fafafa; }
.cell-meta { font-size: var(--fs-xs); color: var(--c-text-2); margin-top: 2px; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--c-text-2);
  font-size: var(--fs-md);
}

/* ───────── Pills ───────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--fs-xs);
  font-weight: 500;
  height: 20px;
}
.pill-success { background: var(--c-success-bg); color: var(--c-success-text); }
.pill-error   { background: var(--c-error-bg);   color: var(--c-error-text); }
.pill-warning { background: var(--c-warning-bg); color: var(--c-warning-text); }
.pill-info    { background: var(--c-info-bg);    color: var(--c-info-text); }
.pill-neutral { background: var(--c-subtle);     color: var(--c-text-2); }

/* ───────── Alerts (subtle) ───────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.5;
  border: 1px solid;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--c-success-bg); color: var(--c-success-text); border-color: #bbf7d0; }
.alert-error   { background: var(--c-error-bg);   color: var(--c-error-text);   border-color: #fecaca; }
.alert-warning { background: var(--c-warning-bg); color: var(--c-warning-text); border-color: #fde68a; }
.alert-info    { background: var(--c-info-bg);    color: var(--c-info-text);    border-color: #bae6fd; }
.alert a { text-decoration: underline; }
.alert code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ───────── Modal ───────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: overlayFade 200ms ease;
}
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  animation: modalIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  padding: 20px 24px 8px;
}
.modal-head h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.modal-head p {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  margin-top: 4px;
}

.modal-body { padding: 16px 24px; user-select: text; }
.modal-body td, .modal-body th { user-select: text; }

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--c-border);
  margin-top: 4px;
}

/* ───────── Misc ───────── */

.hidden { display: none !important; }

kbd {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11px;
  padding: 2px 6px;
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  border-radius: 4px;
}

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  background: var(--c-subtle);
  padding: 1px 5px;
  border-radius: 3px;
}

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Segmented Control (Tabs) ───────── */

.segmented {
  display: inline-flex;
  background: var(--c-subtle);
  padding: 3px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  gap: 0;
}
.segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
  transition: var(--transition);
  height: 30px;
}
.segmented-btn svg { width: 14px; height: 14px; }
.segmented-btn:hover { color: var(--c-text); }
.segmented-btn.active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

/* ───────── KPI Cards (Statistik) ───────── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: var(--transition);
}
.kpi-card:hover { border-color: var(--c-border-2); }
.kpi-label {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: 'tnum';
}
.kpi-meta {
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  margin-top: 6px;
}

/* ───────── Chart Cards ───────── */

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.chart-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-card h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

/* ───────── Voice UI ───────── */

.voice-panel { text-align: center; max-width: 560px; margin: 0 auto; }

.voice-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--c-subtle);
  border-radius: 14px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-text-3);
}
.status-dot.ready { background: var(--c-success); }
.status-dot.active { background: var(--c-error); animation: pulse 1.2s infinite; }
.status-dot.processing { background: var(--c-warning); animation: pulse 0.8s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}

.mic-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: var(--transition);
  border: none;
}
.mic-btn svg { width: 28px; height: 28px; }
.mic-btn:hover { transform: scale(1.05); }
.mic-btn.recording {
  background: var(--c-error);
  animation: micPulse 1.2s infinite;
}
.mic-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50%      { box-shadow: 0 0 0 16px rgba(220,38,38,0); }
}

.voice-hint {
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  margin-bottom: 24px;
}

.interim {
  min-height: 36px;
  padding: 8px 14px;
  background: var(--c-subtle);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  font-style: italic;
  margin-bottom: 16px;
}

.conversation {
  text-align: left;
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 20px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.bubble-assistant {
  align-self: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-bottom-left-radius: 4px;
}
.bubble-user {
  align-self: flex-end;
  background: var(--c-accent);
  color: var(--c-accent-text);
  border-bottom-right-radius: 4px;
}
.bubble-label {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.preview-grid {
  text-align: left;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-grid-head {
  background: var(--c-subtle);
  padding: 8px 14px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--c-border);
}
.preview-grid-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 14px;
  gap: 4px 16px;
}
.preview-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  padding: 4px 0;
}
.preview-field-label { color: var(--c-text-2); }
.preview-field-value { font-weight: 500; }
.preview-field-value.empty { color: var(--c-text-3); font-weight: 400; }

/* ───────── Action-Bar (Buttons unten an Forms) ───────── */

.action-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
}
.action-bar-spacer { flex: 1; }

/* ───────── Confirmation Modal ───────── */
.modal-success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  margin-bottom: 16px;
  color: var(--c-success-text);
}
.modal-success-banner svg { width: 20px; height: 20px; flex-shrink: 0; }
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-sm);
}
.summary-list dt { color: var(--c-text-2); font-size: var(--fs-xs); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.summary-list dd { font-weight: 500; margin: 0; }

/* ───────── Stats: Filter-Bar ───────── */

.filter-bar { padding: 16px 20px; }
.filter-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-bar-range {
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-bar-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.month-input {
  width: 150px;
  height: 32px;
  font-size: var(--fs-sm);
  padding: 4px 10px;
  font-family: inherit;
  font-feature-settings: 'tnum';
}
.range-sep { color: var(--c-text-3); font-size: var(--fs-sm); }
.filter-bar-actions { display: flex; gap: 4px; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  align-items: center;
  min-height: 38px;       /* feste Mindesthöhe — verhindert Layout-Spring beim Aktivieren von Filtern */
}
.active-filters-empty {
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  font-style: italic;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  background: var(--c-accent);
  color: var(--c-accent-text);
  border-radius: 14px;
  font-size: var(--fs-sm);
  font-weight: 500;
}
.filter-chip-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin-right: 2px;
}
.filter-chip-x {
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
  line-height: 1;
}
.filter-chip-x:hover { background: rgba(255,255,255,0.32); }
.filter-clear-all {
  margin-left: auto;
  font-size: var(--fs-sm);
  color: var(--c-text-2);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}
.filter-clear-all:hover { color: var(--c-text); }

/* Flag-Filter (3-State: Alle / Mit / Ohne) */
.flag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.flag-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-surface);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.flag-filter:hover { border-color: var(--c-border-2); color: var(--c-text); }
.flag-filter svg { width: 14px; height: 14px; }
.flag-filter.state-yes {
  background: var(--c-accent);
  color: var(--c-accent-text);
  border-color: var(--c-accent);
}
.flag-filter.state-no {
  background: var(--c-error-bg);
  color: var(--c-error-text);
  border-color: #fecaca;
}
.flag-filter.state-success {
  background: var(--c-success-bg);
  color: var(--c-success-text);
  border-color: #bbf7d0;
}
.flag-filter-state {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
}
.flag-filter.state-default .flag-filter-state {
  background: var(--c-subtle);
  color: var(--c-text-3);
}

/* Hint-Text in Chart-Headlines */
.chart-hint {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--c-text-3);
  margin-left: 8px;
}

/* Drill-Section */
.drill-section {
  border: 2px solid var(--c-text);
  animation: drillFadeIn 200ms ease-out;
}
.drill-count { color: var(--c-text-2); font-weight: 400; font-size: var(--fs-md); }
@keyframes drillFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mitarbeiter: Pflichtfeld-Konfiguration */
.emp-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.emp-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font-size: var(--fs-sm);
}
.emp-field-row select {
  width: auto;
  min-width: 110px;
  height: 28px;
  font-size: var(--fs-xs);
}
.emp-field-name { font-weight: 500; }

/* Mitarbeiter-Präferenz-Icons */
.pref-icons { display: inline-flex; gap: 4px; }
.pref-icon {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-subtle);
  color: var(--c-text-3);
  border: 1px solid transparent;
  font-size: 11px;
}
.pref-icon svg { width: 12px; height: 12px; }
.pref-icon.on { background: var(--c-info-bg); color: var(--c-info); border-color: #bae6fd; }

/* Heatmap (Spitzenzeiten) */
.heatmap-wrap { padding: 4px 0; }
.heatmap {
  display: grid;
  grid-template-columns: 110px repeat(12, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: 16px;
}
.heatmap-corner { /* leere Ecke oben-links */ }
.heatmap-mhead {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 4px 0;
}
.heatmap-rowhead {
  font-size: var(--fs-sm);
  font-weight: 500;
  display: flex; align-items: center;
  padding: 0 8px;
}
.heatmap-cell {
  height: 38px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  font-feature-settings: 'tnum';
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
}
.heatmap-cell:hover { transform: scale(1.08); border-color: var(--c-text); z-index: 1; }
.heatmap-cell.zero { color: var(--c-text-3); background: #fafafa; cursor: default; }
.heatmap-cell.zero:hover { transform: none; border-color: transparent; }
.heatmap-cell.outlier { box-shadow: 0 0 0 2px #f59e0b; }
.heatmap-legend {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: var(--c-text-2);
  margin-top: 4px;
}
.heatmap-legend-bar {
  width: 120px; height: 8px;
  background: linear-gradient(90deg, #fafafa, #0a0a0a);
  border-radius: 4px;
  border: 1px solid var(--c-border);
}
.heatmap-legend-label { font-size: var(--fs-xs); }

/* Auslastungs-Balken */
.bar-bg {
  flex: 1;
  background: var(--c-border);
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
  max-width: 200px;
}
.bar-fill {
  background: var(--c-text);
  height: 100%;
  transition: width 300ms ease;
}

/* ───────── Mobile ───────── */

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
  }
  .sidebar-section { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar-label { width: 100%; }
  .nav-item { width: auto; padding: 6px 12px; }
  .content { padding: 24px 16px 60px; }
  .field-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .charts-row { grid-template-columns: 1fr; }
  .preview-grid-body { grid-template-columns: 1fr; }
}

/* ── Theme Presets ── */
.preset-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.preset-card {
  border: 2px solid var(--c-border);
  border-radius: var(--border-r);
  padding: 8px;
  min-width: 80px;
  text-align: center;
  transition: border-color 150ms;
}
.preset-card.active { border-color: var(--c-accent); }
.preset-card:hover  { border-color: var(--c-accent); }
.preset-swatch {
  width: 56px; height: 32px;
  border-radius: 6px;
  margin: 0 auto 6px;
}
.preset-label { font-size: 12px; color: var(--c-text-2); }

/* ── Day-checkbox (backup scheduler) ── */
.day-cb {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  padding: 5px 10px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  user-select: none;
  transition: background 0.12s, border-color 0.12s;
}
.day-cb:has(input:checked) {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.day-cb input { display: none; }

/* ── Provider Drag List ── */
.providers-drag-list { display: flex; flex-direction: column; gap: 4px; }
.provider-row { border-radius: var(--border-r); cursor: default; }
.provider-row[draggable]:hover { background: var(--c-surface-2); }

/* ── Conversation Messages ── */
.conv-message {
  padding: 8px 12px;
  border-radius: var(--border-r);
  max-width: 80%;
}
.conv-admin  { background: var(--c-accent); color: #fff; align-self: flex-end; }
.conv-user   { background: var(--c-surface-2); align-self: flex-start; }
.conv-meta   { font-size: 11px; opacity: 0.7; margin-bottom: 2px; }

/* ── Pill extra variants ── */
.pill-success { background: rgba(34,197,94,.15); color: #16a34a; }
.pill-warning { background: rgba(234,179,8,.15);  color: #a16207; }
.pill-error   { background: rgba(239,68,68,.15);  color: #dc2626; }

/* ════════════ Language Switcher ════════════ */
.lang-flags {
  display: inline-flex;
  gap: 3px;
  flex-wrap: wrap;
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 3px;
}
.lang-flag-btn,
.lang-flag-compact {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--c-text-2);
  transition: background 120ms, color 120ms;
  font-family: inherit;
  min-width: 34px;
  text-align: center;
}
.lang-flag-btn:hover,
.lang-flag-compact:hover {
  background: var(--c-surface);
  color: var(--c-text);
}
.lang-flag-btn.active,
.lang-flag-compact.active {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
.lang-select {
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--border-r);
  background: var(--c-surface);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
/* Sidebar variant — compact, fits sidebar bottom */
.sidebar .lang-flags { gap: 2px; padding: 2px; }
.sidebar .lang-flag-btn,
.sidebar .lang-flag-compact { padding: 3px 7px; font-size: 10px; min-width: 30px; }

/* ════════════ Voice Bar (Booking Page) ════════════ */
.voice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--c-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--border-r);
  margin-bottom: 16px;
}

.btn-voice-mic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 150ms, border-color 150ms, box-shadow 150ms;
  color: var(--c-text);
}
.btn-voice-mic:hover:not(:disabled) {
  background: var(--c-surface-2);
  border-color: var(--c-accent);
}
.btn-voice-mic:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-voice-mic.recording {
  background: #fee2e2;
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.18);
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }
  50%       { box-shadow: 0 0 0 8px rgba(239,68,68,0.06); }
}

.voice-bar-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.voice-bar-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-border);
  flex-shrink: 0;
  transition: background 200ms;
}
.status-dot.ready      { background: #22c55e; }
.status-dot.active     { background: #ef4444; animation: micPulse 1.2s ease-in-out infinite; }
.status-dot.processing { background: #f59e0b; }

.voice-interim {
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 17px;
}

.voice-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.btn-voice-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--c-text-2);
  transition: var(--transition);
}
.btn-voice-icon:hover { background: var(--c-surface-2); color: var(--c-text); }

/* ── Voice History Panel ── */
.voice-history-panel {
  border: 1px solid var(--c-border);
  border-radius: var(--border-r);
  background: var(--c-surface);
  margin-bottom: 16px;
  overflow: hidden;
}
.voice-history-panel.hidden { display: none; }

#conversation {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  max-height: 240px;
  overflow-y: auto;
}
.bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  word-break: break-word;
}
.bubble-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.55;
  margin-bottom: 3px;
}
.bubble-user {
  align-self: flex-end;
  background: var(--c-accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.bubble-user .bubble-label { color: rgba(255,255,255,0.75); }
.bubble-assistant {
  align-self: flex-start;
  background: var(--c-subtle);
  color: var(--c-text);
  border-bottom-left-radius: 3px;
  border: 1px solid var(--c-border);
}

/* ════════════ Employee Typeahead ════════════ */
.typeahead-wrap {
  position: relative;
}
.typeahead-list {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--border-r);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.typeahead-list:not(:empty) { display: block; }
.typeahead-item {
  padding: 8px 12px;
  font-size: var(--fs-sm);
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
  transition: background 100ms;
  color: var(--c-text);
}
.typeahead-item:last-child { border-bottom: none; }
.typeahead-item:hover,
.typeahead-item.active { background: var(--c-subtle); }
.typeahead-item strong { color: var(--c-accent); font-weight: 600; }
.typeahead-name { font-weight: 500; }
.typeahead-meta {
  display: block;
  font-size: var(--fs-xs);
  color: var(--c-text-3);
  margin-top: 1px;
}
.typeahead-empty {
  padding: 10px 12px;
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  font-style: italic;
}

/* ── Sidebar footer compact mode (icons-only) — fixes overflow with long
   localized strings like "Se déconnecter" ────────────────────────── */
.sidebar-footer-compact {
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding: 10px 12px;
}
.sidebar-footer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.sidebar-version {
  flex: 1;
  font-size: 11px;
  color: var(--c-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-icon-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-text-2);
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
}
.sidebar-icon-btn:hover {
  background: var(--c-subtle);
  color: var(--c-accent);
  border-color: var(--c-border);
}
