:root {
  --sb-accent: #c9a86c;
  --sb-accent-strong: #b5935e;
  --sb-accent-glow: rgba(201, 168, 108, 0.35);
  /* Größerer Cap, damit breite Screens genutzt werden */
  --page-max: 1400px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --border: rgba(0, 0, 0, 0.18);
  --focus: #2b6cff;
  --focus-ring: 2px solid var(--focus);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --topbar-fg: #0b1220;
  --topbar-border: rgba(15, 23, 42, 0.12);
  --page-bg: #f4f6fb;
  --card-surface: #ffffff;

  /* Semantik (Toasts, Hinweise, Status) */
  --color-success: #059669;
  --color-success-border: rgba(16, 185, 129, 0.4);
  --color-success-bg: rgba(236, 253, 245, 0.94);
  --color-warn: #d97706;
  --color-warn-border: rgba(245, 158, 11, 0.4);
  --color-warn-bg: rgba(255, 251, 235, 0.94);
  --color-error: #dc2626;
  --color-error-border: rgba(239, 68, 68, 0.4);
  --color-error-bg: rgba(254, 242, 242, 0.94);
  --color-info: #2563eb;
  --color-info-border: rgba(43, 108, 255, 0.35);
  --color-info-bg: rgba(239, 246, 255, 0.94);

  /* Primäraktion (z. B. Speichern) */
  --primary-btn-bg: #1d4ed8;
  --primary-btn-bg-hover: #1e40af;
  --primary-btn-fg: #ffffff;
  --primary-btn-border: #1e3a8a;

  /* Abstandsskala */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --touch-min: 44px;

  /* Sidebar Tokens (modern) – Säule: Markenblau #002D8E */
  --sb-bg: #002d8e;
  --sb-bg-2: #001f66;
  --sb-border: rgba(255, 255, 255, 0.16);
  --sb-item-bg: rgba(15, 23, 42, 0.04);
  --sb-item-hover: rgba(15, 23, 42, 0.07);
  --sb-item-active: rgba(43, 108, 255, 0.1);
  --sb-item-active-border: rgba(43, 108, 255, 0.5);
  --sb-shadow: 12px 0 36px rgba(0, 0, 0, 0.22);
  /* Glass für Sidebar-Controls */
  --sb-glass-bg: rgba(255, 255, 255, 0.48);
  --sb-glass-bg-hover: rgba(255, 255, 255, 0.66);
  --sb-glass-bg-active: rgba(255, 255, 255, 0.58);
  --sb-glass-border: rgba(255, 255, 255, 0.62);
  --sb-glass-edge: rgba(15, 23, 42, 0.06);
  --sb-glass-shadow: 0 4px 22px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.05);
  --sb-glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  --sb-glass-blur: blur(14px) saturate(1.12);
  --sb-glass-border-hover: rgba(255, 255, 255, 0.78);
  --sb-glass-group-bg: rgba(255, 255, 255, 0.26);
  --sb-glass-section-bg: rgba(255, 255, 255, 0.32);
  --sb-glass-panel-bg: rgba(255, 255, 255, 0.22);
  --sb-glass-panel-border: rgba(255, 255, 255, 0.45);
  --sb-radius: 18px;
  --sb-item-radius: 14px;
  --sb-item-h: 42px;
  --sb-font: 12.5px;
  --ui-font: "Google Sans Flex", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--ui-font);
  color: var(--topbar-fg);
  background: var(--page-bg);
}

.print-frame {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #fff;
  overflow: auto;
}

.print-frame__actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.print-frame__title {
  font-weight: 700;
  font-size: 13px;
}

.print-frame__spacer {
  flex: 1;
}

.print-frame__pages {
  padding: 14px;
}

.footer {
  width: 100%;
  padding: 18px 16px 26px;
  font-size: 12px;
  opacity: 0.7;
  text-align: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  border-bottom: 1px solid var(--topbar-border);
  backdrop-filter: blur(10px);
}

.topbar__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 14px 22px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.topbar__brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 240px;
  flex-shrink: 0;
}

.topbar__logo {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.topbar__titles {
  display: grid;
  gap: 2px;
}

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.muted {
  margin: 4px 0 0;
  font-size: 12px;
  color: #475569;
  opacity: 1;
}

/* Inline-SVG Icons (ersetzt Emoji in Topbar) */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.ui-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.topbar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Sidebar Sections */
.sb-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--sb-radius);
  border: 1px solid var(--sb-glass-border);
  box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset), 0 0 0 1px rgba(15, 23, 42, 0.04);
  background: var(--sb-glass-section-bg);
  backdrop-filter: var(--sb-glass-blur);
  -webkit-backdrop-filter: var(--sb-glass-blur);
}

.sb-section__title {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.sb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid rgba(43, 108, 255, 0.35);
  background: rgba(43, 108, 255, 0.12);
  font-size: 11px;
  font-weight: 750;
}

.lang-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.topbar__notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 10px 12px;
  border-radius: 12px;
  box-sizing: border-box;
}

.sidebar-toggle {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar__notify-btn .sb-badge {
  margin-left: 0;
}

.topbar__notify-btn--fixed {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
  .topbar__notify-btn--fixed {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 900px) {
  /* Mobile: Toggle neben Glocke — bei offenem Drawer unter Overlay; eingeklappt ganz oben. */
  .sidebar-fab {
    top: 10px !important;
    right: 62px !important; /* Platz für Glocke rechts */
    left: auto !important;
    z-index: 160 !important;
  }

  body.sidebar-layout.sidebar-collapsed .sidebar-fab {
    z-index: 5030 !important;
  }
}

@media (max-width: 900px) {
  .sb-section__title {
    font-size: 10px;
  }
}

/* -------------------------
   Admin/Reports: Sidebar links
   ------------------------- */
:root {
  --sidebar-w: 300px;
  --sidebar-w-mobile: 0px;
}

/* Sidebar etwas kompakter — alle Seiten mit linker Säule: body.sidebar-layout */
:root {
  --sidebar-w-collapsed: 0px;
}

@media (max-width: 1200px) {
  :root {
    --sidebar-w: 260px;
  }
}

body.sidebar-layout .topbar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  /* Hoch genug für alle Formular-/Hilfe-Schichten; main liegt bewusst darunter (s. #main-content). */
  z-index: 5000;
  border-bottom: 0;
  border-right: 1px solid var(--topbar-border);
  overflow: hidden;
  transition: transform 200ms ease;
  background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
  --topbar-fg: rgba(255, 255, 255, 0.96);
  color: rgba(255, 255, 255, 0.96);
  --topbar-border: rgba(255, 255, 255, 0.14);
  /* Helles Glas & Akzente (gilt auch bei prefers-color-scheme: dark) */
  --sb-glass-bg: rgba(255, 255, 255, 0.22);
  --sb-glass-bg-hover: rgba(255, 255, 255, 0.34);
  --sb-glass-bg-active: rgba(255, 255, 255, 0.3);
  --sb-glass-border: rgba(255, 255, 255, 0.48);
  --sb-glass-border-hover: rgba(255, 255, 255, 0.78);
  --sb-glass-shadow: 0 4px 22px rgba(0, 0, 0, 0.2), 0 2px 10px rgba(0, 0, 0, 0.12);
  --sb-glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  --sb-glass-blur: blur(14px) saturate(1.12);
  --sb-glass-group-bg: rgba(255, 255, 255, 0.12);
  /* Logo-Bereich: deckende Platte (kein Glas), bessere Logo-Lesbarkeit */
  --sb-brand-plate-bg: #ffffff;
  --sb-brand-plate-border: rgba(15, 23, 42, 0.12);
  --sb-glass-section-bg: rgba(255, 255, 255, 0.14);
  --sb-glass-panel-bg: rgba(255, 255, 255, 0.1);
  --sb-glass-panel-border: rgba(255, 255, 255, 0.26);
  --sb-item-active: rgba(255, 255, 255, 0.22);
  --sb-item-active-border: rgba(255, 255, 255, 0.52);
  padding-top: max(10px, env(safe-area-inset-top));
}

body.sidebar-layout.sidebar-collapsed .topbar {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

body.sidebar-layout .topbar .muted {
  color: rgba(255, 255, 255, 0.72);
}

body.sidebar-layout .topbar .lang-switch__btn--flag.is-active {
  border-color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.99) 0%,
    rgba(225, 240, 255, 0.96) 42%,
    rgba(175, 210, 255, 0.92) 100%
  );
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.55),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -5px 10px rgba(0, 45, 120, 0.14);
}

/* Globaler Toggle (immer erreichbar, auch wenn Sidebar weg ist) */
/* Globaler FAB: bei geöffnetem Drawer unter dem Abdunkelungs-Overlay (sonst blockiert er „Schließen“). */
.sidebar-fab {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 160;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

body.sidebar-collapsed .sidebar-fab {
  display: inline-flex;
  z-index: 5030;
}

body.sidebar-layout .topbar__inner {
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 14px 14px;
  gap: 12px;
}

body.sidebar-layout .topbar__brand {
  min-width: 0;
  border-radius: var(--sb-radius);
  color: #0f172a;
}

body.sidebar-layout .topbar__brand .muted {
  color: #475569;
}

/* Sidebar Brand kompakter */
@media (min-width: 901px) {
  body.sidebar-layout .topbar {
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
    box-shadow: var(--sb-shadow);
    border-right-color: var(--sb-border);
  }

  body.sidebar-layout .topbar__brand {
    padding: 10px 10px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-brand-plate-border);
    background: var(--sb-brand-plate-bg);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.sidebar-layout .topbar__inner {
    padding: 14px 12px;
  }

  body.sidebar-layout .topbar__logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  body.sidebar-layout .topbar__titles h1 {
    font-size: 16px;
    letter-spacing: -0.01em;
  }

  body.sidebar-layout .topbar__titles .muted {
    font-size: 11px;
  }
}

body.sidebar-layout .topbar__actions {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow: auto;
  padding-bottom: 14px;
  padding-top: 2px;
}

@media (min-width: 901px) {
  body.sidebar-layout .topbar__actions {
    padding: 10px;
    border-radius: var(--sb-radius);
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(1.06);
    -webkit-backdrop-filter: blur(20px) saturate(1.06);
    box-shadow: var(--sb-glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  }

  body.sidebar-layout .topbar__actions::-webkit-scrollbar {
    width: 10px;
  }
  body.sidebar-layout .topbar__actions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    border: 3px solid rgba(0, 45, 142, 0.35);
  }

  body.sidebar-layout .topbar__status {
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
  }

  body.sidebar-layout .topbar__role {
    height: 30px;
    padding: 0 10px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
  }

  body.sidebar-layout .topbar__actions .admin__inline-hint {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
  }

  body.sidebar-layout .topbar__actions .admin__inline-hint > a,
  body.sidebar-layout .topbar__actions .admin__inline-hint > button:not(.admin-hint) {
    width: 100%;
  }
}

/* Sidebar: Info-"i" Buttons in der Sidebar ausblenden (nur dort) */
@media (min-width: 901px) {
  body.sidebar-layout .topbar__actions .admin-hint {
    display: none !important;
  }
}

body.sidebar-layout .topbar__actions > * {
  width: 100%;
}

body.sidebar-layout .topbar__status {
  flex-wrap: wrap;
}

body.sidebar-layout .topbar__link,
body.sidebar-layout .topbar__actions button {
  width: 100%;
  justify-content: flex-start;
}

body.sidebar-layout .wrap {
  /* Wichtig: nicht nur verschieben (margin-left), sondern auch Breite reduzieren,
     sonst kann Content rechts "überstehen" (wrap bleibt sonst 100% breit). */
  box-sizing: border-box;
  width: calc(100% - var(--sidebar-w) - 10px);
  margin-left: calc(var(--sidebar-w) + 10px);
}

body.sidebar-layout.sidebar-collapsed .wrap {
  width: 100%;
  margin-left: 0;
}

/* Klickbare Sidebar: #main-content kommt nach <header> im DOM — ohne eigenen Stacking
   kann der Formularbereich (position/overflow) die Topbar überdecken. */
body.sidebar-layout #main-content {
  position: relative;
  z-index: 0;
}

/* Sidebar toggle button (Desktop) */
@media (min-width: 901px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
  }

  body.sidebar-layout .topbar .sidebar-toggle {
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    color: var(--topbar-fg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  body.sidebar-layout .topbar .sidebar-toggle:hover {
    background: var(--sb-glass-bg-hover);
    border-color: var(--sb-glass-border-hover);
    box-shadow: 0 6px 26px rgba(15, 23, 42, 0.12), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar .sidebar-toggle:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: var(--sb-glass-shadow), 0 0 0 3px rgba(255, 255, 255, 0.22), var(--sb-glass-inset);
  }
}

/* Sidebar Link/Action Design (nur Desktop-Sidebar) */
@media (min-width: 901px) {
  body.sidebar-layout .topbar__actions {
    gap: 8px;
  }

  body.sidebar-layout .topbar__actions .topbar__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
    min-height: var(--sb-item-h);
    padding: 10px 14px;
    border-radius: var(--sb-item-radius);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    color: var(--topbar-fg);
    text-decoration: none;
    font-size: var(--sb-font);
    line-height: 1.25;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    font-weight: 650;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  body.sidebar-layout .topbar__actions button:not(.admin-hint):not(.lang-switch__btn--flag) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: var(--sb-item-h);
    padding: 10px 14px;
    border-radius: var(--sb-item-radius);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    font-size: var(--sb-font);
    font-weight: 650;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  body.sidebar-layout .topbar__actions button:not(.admin-hint):not(.lang-switch__btn--flag):hover {
    background: var(--sb-glass-bg-hover);
    border-color: var(--sb-glass-border-hover);
    box-shadow: 0 6px 26px rgba(15, 23, 42, 0.12), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions .topbar__link.is-active {
    border-color: rgba(255, 255, 255, 0.55);
    background: var(--sb-glass-bg-active);
    box-shadow: var(--sb-glass-shadow), 0 0 0 2px rgba(255, 255, 255, 0.22), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions .topbar__link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
  }

  body.sidebar-layout .topbar__actions .topbar__link:hover {
    background: var(--sb-glass-bg-hover);
    border-color: var(--sb-glass-border-hover);
    box-shadow: 0 6px 26px rgba(15, 23, 42, 0.12), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions .topbar__link:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: var(--sb-glass-shadow), 0 0 0 3px rgba(255, 255, 255, 0.22), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions button:not(.admin-hint):not(.lang-switch__btn--flag):focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: var(--sb-glass-shadow), 0 0 0 3px rgba(255, 255, 255, 0.2), var(--sb-glass-inset);
  }

  body.sidebar-layout .lang-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-group-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
  }

  body.sidebar-layout .lang-switch__btn:not(.lang-switch__btn--flag) {
    width: 100%;
    justify-content: flex-start;
    padding-left: 14px;
    padding-right: 12px;
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
  }

  body.sidebar-layout .lang-switch button.lang-switch__btn--flag {
    width: 100%;
    min-width: 0;
    min-height: 3.85rem;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    font-size: 2.15rem;
  }

  body.sidebar-layout .admin__table-density {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: var(--sb-item-radius);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    font-size: var(--sb-font);
    font-weight: 650;
    color: var(--topbar-fg);
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
  }

  body.sidebar-layout .lang-switch::after {
    content: "";
    display: block;
    grid-column: 1 / -1;
    height: 1px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.14);
  }
}

/* Mobile: zurück zur Topbar */
@media (max-width: 900px) {
  body.sidebar-layout .topbar {
    /* Mobile/PWA: echte linke Sidebar (Drawer) */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-w);
    border-right: 1px solid var(--topbar-border);
    border-bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(0);
    z-index: 5000;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.22);
    border-top-right-radius: var(--sb-radius);
    border-bottom-right-radius: var(--sb-radius);
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
  }

  /* Mobile/PWA: Sidebar versteckt – off-screen links */
  body.sidebar-layout.sidebar-collapsed .topbar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: none;
  }

  body.sidebar-layout .topbar__inner {
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 14px 14px;
    padding-top: max(14px, env(safe-area-inset-top));
  }

  body.sidebar-layout .topbar__actions {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    overflow: auto;
    padding: 10px;
    padding-bottom: 14px;
    gap: 8px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-glass-panel-border);
    background: var(--sb-glass-panel-bg);
    backdrop-filter: blur(18px) saturate(1.05);
    -webkit-backdrop-filter: blur(18px) saturate(1.05);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
  }

  /* Mobile/PWA: Info-"i" Icons in der Sidebar ausblenden */
  body.sidebar-layout .topbar__actions .admin-hint {
    display: none !important;
  }

  body.sidebar-layout .topbar__brand {
    padding: 10px 10px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-brand-plate-border);
    background: var(--sb-brand-plate-bg);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.sidebar-layout .topbar__actions .topbar__link {
    display: flex;
    align-items: center;
    text-align: left;
    border-radius: var(--sb-item-radius);
    min-height: 44px;
    padding: 10px 14px;
    justify-content: flex-start;
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    font-weight: 650;
    font-size: var(--sb-font);
  }

  body.sidebar-layout .topbar__actions button:not(.admin-hint):not(.lang-switch__btn--flag) {
    display: flex;
    align-items: center;
    text-align: left;
    justify-content: flex-start;
    border-radius: var(--sb-item-radius);
    min-height: 44px;
    padding: 10px 14px;
    font-weight: 650;
    font-size: var(--sb-font);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions .lang-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border-radius: var(--sb-radius);
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-group-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
  }

  body.sidebar-layout .topbar__actions .lang-switch__btn:not(.lang-switch__btn--flag) {
    justify-content: flex-start;
    padding-left: 14px;
    min-height: 44px;
  }

  body.sidebar-layout .topbar__actions .lang-switch button.lang-switch__btn--flag {
    justify-content: center;
    min-height: 3.75rem;
    padding: 0.6rem 0.45rem;
    font-size: 2.05rem;
  }

  body.sidebar-layout .topbar__actions .admin__table-density {
    margin-top: 0;
  }

  body.sidebar-layout .topbar__actions > * {
    width: 100%;
  }

  body.sidebar-layout .topbar__link,
  body.sidebar-layout .topbar__actions button {
    width: 100%;
  }

  body.sidebar-layout .wrap {
    margin-left: 0;
    width: 100%;
  }

  /* Mobile: Desktop-Toggle im Header ausblenden, FAB nutzen */
  .sidebar-toggle {
    display: none !important;
  }

  .sidebar-fab {
    display: inline-flex !important;
    left: auto !important;
    right: 12px !important;
  }

  body:not(.sidebar-collapsed) .sidebar-fab {
    /* Wenn Sidebar offen ist, bleibt der Toggle oben rechts */
    right: 12px !important;
    left: auto !important;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
  /* Muss hinter der Sidebar liegen, sonst "überdeckt" sie das Menü */
  z-index: 18;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    display: none;
  }

  body:not(.sidebar-collapsed) .sidebar-backdrop {
    display: block;
  }
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.topbar__role {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--topbar-fg);
  font-size: 12px;
  white-space: nowrap;
}

button {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
  color: var(--topbar-fg);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

button:hover {
  background: rgba(15, 23, 42, 0.1);
}

button.secondary {
  border-color: rgba(15, 23, 42, 0.14);
  opacity: 0.95;
}

/* Sprach-Flaggen: größer, glänzender 3D-Kachel-Look (überschreibt generische button-*-Regeln) */
button.lang-switch__btn--flag {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  min-height: 3.5rem;
  padding: 0.55rem 0.95rem;
  font-size: 2rem;
  line-height: 1;
  border-radius: 18px;
  opacity: 1;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.99) 0%,
    rgba(236, 243, 255, 0.9) 35%,
    rgba(200, 218, 248, 0.78) 72%,
    rgba(175, 198, 235, 0.72) 100%
  );
  box-shadow:
    0 10px 22px rgba(0, 20, 80, 0.24),
    0 4px 8px rgba(0, 0, 0, 0.12),
    inset 0 2px 2px rgba(255, 255, 255, 0.98),
    inset 0 -5px 10px rgba(0, 45, 120, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}

button.lang-switch__btn--flag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.12) 38%, transparent 52%);
  pointer-events: none;
  z-index: 1;
}

button.lang-switch__btn--flag::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 4px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.14), transparent);
  pointer-events: none;
  z-index: 1;
}

.lang-switch__flag {
  display: block;
  position: relative;
  z-index: 2;
  line-height: 1;
  font-size: 1.55em;
  font-family: "Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Mozilla",
    sans-serif;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.32)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

button.lang-switch__btn--flag:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.92);
  filter: saturate(1.08);
  box-shadow:
    0 14px 28px rgba(0, 20, 80, 0.3),
    0 6px 12px rgba(0, 0, 0, 0.14),
    inset 0 2px 2px rgba(255, 255, 255, 1),
    inset 0 -5px 10px rgba(0, 45, 120, 0.12);
}

button.lang-switch__btn--flag:active {
  transform: translateY(1px);
  filter: saturate(1.02);
  box-shadow:
    0 5px 12px rgba(0, 20, 80, 0.22),
    inset 0 4px 10px rgba(0, 45, 120, 0.12),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

button.lang-switch__btn--flag.is-active {
  border-color: rgba(43, 108, 255, 0.55);
  background: linear-gradient(
    158deg,
    rgba(230, 244, 255, 0.99) 0%,
    rgba(195, 220, 255, 0.94) 42%,
    rgba(130, 175, 245, 0.88) 100%
  );
  box-shadow:
    0 8px 20px rgba(43, 108, 255, 0.35),
    0 0 0 2px rgba(43, 108, 255, 0.28),
    inset 0 2px 2px rgba(255, 255, 255, 0.95),
    inset 0 -4px 10px rgba(29, 78, 180, 0.22);
}

button.btn-primary {
  background: var(--primary-btn-bg);
  color: var(--primary-btn-fg);
  border-color: var(--primary-btn-border);
  font-weight: 650;
}

button.btn-primary:hover {
  background: var(--primary-btn-bg-hover);
}

button.btn-primary:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

button.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.topbar__link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
  color: var(--topbar-fg);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.topbar__link:hover {
  background: rgba(15, 23, 42, 0.1);
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  border: 2px solid var(--focus);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

button:focus-visible,
.topbar__link:focus-visible,
.topbar__menu-btn:focus-visible,
summary:focus-visible,
.lang-switch__btn:focus-visible,
.topbar__notify-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

#main-content:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Cloudflare Turnstile (öffentliches Formular) */
.form-turnstile {
  margin: 1.25rem auto 0;
  max-width: 920px;
  padding: 0 1rem;
}
.form-turnstile__inner {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem 1.25rem;
}
.form-turnstile__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.form-turnstile__hint {
  font-size: 0.875rem;
  margin: 0 0 0.75rem;
}
.form-turnstile__widget {
  min-height: 65px;
}

/* Honeypot: für Nutzer unsichtbar, nicht display:none (manche Bots erkennen das) */
.form-hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.topbar__menu-state {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.topbar__head {
  display: contents;
}

.topbar__menu-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.06);
  color: var(--topbar-fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.topbar__menu-btn:hover {
  background: rgba(15, 23, 42, 0.11);
}

.topbar__menu-icon {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

.wrap {
  max-width: none;
  width: 100%;
  margin: 18px 0 48px;
  padding: 0 22px;
}

.admin-page .wrap {
  max-width: none;
  width: 100%;
  margin: 16px 0 48px;
  padding: 0 18px;
}

.admin-page .admin {
  width: 100%;
  margin: 0;
}

.form {
  display: grid;
  gap: 18px;
}

.form-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  background: var(--card-surface);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 8px;
  z-index: 4;
}

.form-progress__title {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
  margin: 0;
  width: 100%;
}

.form-progress__status {
  font-size: 14px;
  font-weight: 650;
  margin: 0;
  flex: 1 1 auto;
  min-width: 12rem;
}

.form-progress__dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.form-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.15);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.form-progress__dot:hover {
  background: rgba(43, 108, 255, 0.45);
  transform: scale(1.15);
}

.form-progress__dot.is-active {
  background: var(--primary-btn-bg);
  transform: scale(1.2);
}

.form-progress__dot:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.form-progress__jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-progress__jump {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.form-progress__jump:hover {
  background: rgba(43, 108, 255, 0.1);
  border-color: rgba(43, 108, 255, 0.35);
}

.form-progress__jump:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.form-job-banner {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(212, 175, 55, 0.08));
}

.form-job-banner__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--topbar-fg, #0f172a);
}

.form-job-banner__title strong {
  color: #b8860b;
}

.form-job-banner__meta {
  margin: 6px 0 0;
  font-size: 13px;
}

.form-trust-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 var(--space-4);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted, #64748b);
}

.form-trust-bar__icon {
  flex-shrink: 0;
  font-size: 16px;
}

.thank-you-page {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #334155 100%);
  font-family: "Google Sans Flex", system-ui, sans-serif;
  color: #f8fafc;
}

.thank-you-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

.thank-you-card {
  width: min(560px, 100%);
  padding: 36px 32px;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.thank-you-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
  line-height: 56px;
}

.thank-you-card h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.thank-you-lead {
  margin: 0 0 20px;
  line-height: 1.55;
  color: #475569;
}

.thank-you-steps {
  text-align: left;
  margin: 0 0 24px;
  padding-left: 1.25rem;
  color: #334155;
  line-height: 1.55;
  font-size: 14px;
}

.thank-you-steps li + li {
  margin-top: 8px;
}

.thank-you-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.thank-you-actions .sb-btn-primary,
.thank-you-actions .sb-btn-ghost {
  justify-content: center;
  text-decoration: none;
}

.thank-you-note {
  margin: 20px 0 0;
  font-size: 13px;
}

.thank-you-footer {
  margin-top: 24px;
  font-size: 13px;
  color: rgba(248, 250, 252, 0.75);
}

.thank-you-footer a {
  color: #f8fafc;
}

.form-validation-summary {
  display: none;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: 12px;
  border: 1px solid var(--color-error-border);
  background: var(--color-error-bg);
  color: var(--topbar-fg);
}

.form-validation-summary.is-visible {
  display: block;
}

.form-validation-summary h2 {
  font-size: 14px;
  font-weight: 750;
  margin: 0 0 var(--space-2);
  color: var(--color-error);
}

.form-validation-summary p {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  line-height: 1.4;
}

.form-validation-summary ul {
  margin: 0;
  padding-left: 1.25em;
  font-size: 13px;
  line-height: 1.45;
}

.form-validation-summary li {
  margin: 4px 0;
}

.form-validation-summary a {
  color: var(--color-info);
  font-weight: 650;
}

/* ── Kontakt (E-Mail / Telefon) ──────────────────────────── */
.form-contact {
  margin: 12px 0 4px;
}

.form-contact__inner {
  max-width: 38rem;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(212, 175, 55, 0.06));
}

.form-contact__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--topbar-fg, #0f172a);
}

.form-contact__intro {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted, #64748b);
}

.form-contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .form-contact__row {
    grid-template-columns: 1fr;
  }
}

.form-contact__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-contact__label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.88);
}

.form-contact__field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-contact__field input:focus {
  border-color: #b8860b;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.form-contact__field input:invalid:not(:placeholder-shown) {
  border-color: #dc2626;
}

/* ── Bewerbungsart & Branche Sektion ─────────────────────── */
.form-bewerbungsart {
  margin-top: 8px;
}
.form-bewerbungsart__inner {
  max-width: 38rem;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.04);
}
.form-bewerbungsart__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.form-bewerbungsart__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .form-bewerbungsart__row { grid-template-columns: 1fr; }
}
.form-bewerbungsart__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-bewerbungsart__label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.88);
}
.form-bewerbungsart__select,
.form-bewerbungsart__field input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s;
}
.form-bewerbungsart__select:focus,
.form-bewerbungsart__field input[type="text"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
html[data-theme="light"] .form-bewerbungsart__select,
html[data-theme="light"] .form-bewerbungsart__field input[type="text"] {
  background: #fff; border-color: rgba(15,23,42,.2);
}

/* ── Sprachzentrum ──────────────────────────────────────── */
.form-sprachzentrum {
  margin-top: 8px;
}

.form-sprachzentrum__inner {
  max-width: 38rem;
  padding: 16px 18px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
}

.form-sprachzentrum__title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.form-sprachzentrum__title-vi {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.form-sprachzentrum__intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
}

.form-sprachzentrum__field {
  display: grid;
  gap: 8px;
}

.form-sprachzentrum__label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.88);
}

.form-sprachzentrum__label-vi {
  font-weight: 500;
}

.form-sprachzentrum__hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.form-sprachzentrum__field input {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  font-size: 15px;
  background: #fff;
}

.form-sprachzentrum__field input:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}

.photo-preview {
  position: absolute;
  border-radius: 8px;
  object-fit: cover;
  display: none;
  z-index: 2;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dialog {
  width: min(1100px, calc(100% - 24px));
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.dialog--wide {
  width: min(1280px, calc(100% - 24px));
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.dialog__inner {
  margin: 0;
  padding: 14px;
}

.dialog__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(0, 0,  0, 0.08);
}

/* Admin Detail Dialog: moderner, besser nutzbar */
.dialog.dialog--wide .dialog__head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.dialog.dialog--wide .dialog__title {
  font-weight: 850;
  letter-spacing: -0.01em;
}

.dialog.dialog--wide .admin__section-head h3 {
  font-weight: 850;
  letter-spacing: -0.01em;
}

.dialog.dialog--wide .admin__meta {
  gap: 12px;
}

.dialog.dialog--wide input,
.dialog.dialog--wide select,
.dialog.dialog--wide textarea {
  border-radius: 14px;
}

.dialog__subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.75;
}

.dialog__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dialog button {
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

.dialog button:hover {
  background: rgba(15, 23, 42, 0.1);
}

.dialog button.admin-hint {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 999px;
}

.dialog__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.dialog__title-row .dialog__title {
  margin: 0;
}

.unlock-dialog .dialog__head {
  align-items: center;
}

.unlock-dialog__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.unlock-dialog__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.unlock-dialog__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.unlock-dialog__pwrow {
  display: flex;
  gap: 8px;
  align-items: center;
}

.unlock-dialog__pwrow input {
  flex: 1;
}

.unlock-dialog__pwbtn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.unlock-dialog__caps {
  margin-top: 6px;
  opacity: 0.9;
}

.unlock-dialog__error {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.06);
  color: rgba(127, 29, 29, 0.95);
  opacity: 1;
}

.unlock-dialog__hint {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.login-dialog__remember {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}

.login-dialog__remember input {
  margin-top: 3px;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .unlock-dialog__grid {
    grid-template-columns: 1fr;
  }
  .unlock-dialog__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

.preview {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  padding: 14px 4px 4px;
}

.preview > * {
  min-width: 0;
}

.preview__left,
.preview__right {
  display: grid;
  gap: 14px;
  align-content: start;
}

.preview__card {
  background: var(--card-surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px;
}

.preview__label {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 10px;
}

.preview__details {
  margin: 0;
}

.preview__details > summary.preview__label {
  cursor: pointer;
  list-style: none;
}

.preview__details > summary.preview__label::-webkit-details-marker {
  display: none;
}

.preview__details > summary.preview__label::after {
  content: "▸";
  display: inline-block;
  margin-left: 8px;
  opacity: 0.8;
  transform: translateY(-1px);
}

.preview__details[open] > summary.preview__label::after {
  content: "▾";
}

.preview__details[open] > summary.preview__label {
  margin-bottom: 10px;
}

.preview__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  background: rgba(15, 23, 42, 0.03);
  display: grid;
  place-items: center;
}

.preview__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.preview__profile {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.preview__json {
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: #0b1220;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.35;
  overflow: auto;
  max-height: 260px;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview__table {
  overflow: auto;
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-width: 100%;
}

.preview__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.preview__table th,
.preview__table td {
  padding: 8px 10px;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview__table th {
  width: 34%;
  text-align: left;
  background: #f8fafc;
  font-weight: 600;
}

.preview__section th {
  width: auto;
  background: #eef2ff;
  font-weight: 700;
  color: #1e293b;
}

.preview-form {
  margin-top: 14px;
}

.preview-form__pages {
  display: grid;
  gap: 14px;
}

.filled-page {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.filled-page__bg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.filled-page__overlay {
  position: absolute;
  inset: 0;
}

.filled-value {
  position: absolute;
  padding: 2px 3px;
  font-family: var(--ui-font);
  font-size: 22px;
  line-height: 1.25;
  color: #0f172a;
  white-space: pre-wrap;
  overflow: hidden;
}

.filled-value--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdf-page {
  width: min(100%, var(--page-max));
  margin: 0 auto;
  aspect-ratio: 1655 / 2340;
  position: relative;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background-image: var(--bg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.field {
  position: absolute;
  margin: 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.25);
  color: #0b1220;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 20px;
  line-height: 1.25;
  outline: none;
}

.field--textarea {
  padding: 6px 8px;
  resize: none;
}

.field--file {
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
}

.field--checkbox {
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
}

.field:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.25);
  background: rgba(255, 255, 255, 0.55);
}

/* Inline Feld-Hilfe (VI Übersetzungen) */
.field-hint {
  position: absolute;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.field-hint.is-on {
  display: inline-flex;
}

.field-hint__tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 180px;
  max-width: min(300px, 84vw);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 450;
  font-style: normal;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.35;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.field-hint:hover .field-hint__tip,
.field-hint:focus-visible .field-hint__tip {
  visibility: visible;
  opacity: 1;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff;
    margin: 0;
  }

  .topbar {
    display: none;
  }
  .dialog {
    display: none;
  }
  .wrap {
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .pdf-page {
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    border: none;
    page-break-after: always;
  }
  .field {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
  /* Schrift in den PDF-Formularfeldern (Overlay) */
  .filled-value {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.2;
  }
  .print-frame__actions {
    display: none !important;
  }
}

@media (max-width: 920px) {
  .preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px max(12px, env(safe-area-inset-left)) 12px
      max(12px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .topbar__head {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  .topbar__brand {
    min-width: 0;
    flex: 1;
  }

  .topbar__titles h1 {
    font-size: 16px;
    line-height: 1.25;
  }

  .topbar__titles .muted {
    font-size: 11px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .topbar__menu-btn {
    display: inline-flex;
  }

  .topbar__menu-state:checked ~ .topbar__actions {
    display: flex;
  }

  .topbar__actions {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--topbar-border);
    flex-wrap: nowrap;
  }

  .topbar__actions .topbar__link,
  .topbar__actions button:not(.admin-hint) {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    text-align: left;
    box-sizing: border-box;
    touch-action: manipulation;
  }

  body.sidebar-layout .topbar__actions .topbar__link,
  body.sidebar-layout .topbar__actions button:not(.admin-hint):not(.lang-switch__btn--flag) {
    justify-content: flex-start;
    padding: 10px 14px;
    border: 1px solid var(--sb-glass-border);
    background: var(--sb-glass-bg);
    backdrop-filter: var(--sb-glass-blur);
    -webkit-backdrop-filter: var(--sb-glass-blur);
    box-shadow: var(--sb-glass-shadow), var(--sb-glass-inset);
    border-radius: var(--sb-item-radius);
    font-weight: 650;
  }

  body.sidebar-layout .topbar__actions .lang-switch__btn:not(.lang-switch__btn--flag) {
    justify-content: flex-start;
    padding-left: 14px;
  }

  body.sidebar-layout .topbar__actions .lang-switch button.lang-switch__btn--flag {
    justify-content: center;
    min-height: 3.7rem;
    padding: 0.55rem 0.4rem;
    font-size: 2rem;
  }

  .topbar__actions button.admin-hint {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    height: 18px;
    align-self: center;
  }

  .topbar__actions .admin__inline-hint {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .topbar__actions .admin__inline-hint > .topbar__link,
  .topbar__actions .admin__inline-hint > button:not(.admin-hint) {
    flex: 1;
    min-height: 44px;
  }

  .topbar__actions .topbar__link {
    height: auto;
    padding: 10px 14px;
  }

  .wrap {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

.admin {
  width: min(100%, var(--page-max));
  margin: 0 auto;
}

.admin__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 12px;
  width: 100%;
}

.admin__tabs .admin__inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help {
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.help > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 650;
  user-select: none;
}

.help__body {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  line-height: 1.45;
}

.help__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help__card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: #fafbff;
}

.help__card--full {
  grid-column: 1 / -1;
}

.help__title {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 8px;
}

.help__text ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.help__text li {
  margin: 6px 0;
}

.help__text .help__kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: nowrap;
}

.help__text .help__pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(43, 108, 255, 0.22);
  background: rgba(43, 108, 255, 0.08);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.help__text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* Inline-Hilfe (kleines „i“, Tooltip bei Hover/Fokus) */
.admin__inline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin__head-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.admin__section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.admin__section-head h3 {
  margin: 0;
}

.admin__audit-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.admin__audit-wrap .admin__audit {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.admin__field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.admin__th-hint-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

button.admin-hint {
  position: relative;
  appearance: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  align-self: center;
}

.admin-hint:hover,
.admin-hint:focus-visible {
  border-color: rgba(43, 108, 255, 0.5);
  background: rgba(43, 108, 255, 0.12);
  color: #1d4ed8;
  outline: none;
}

.admin-hint__glyph {
  display: block;
  transform: translateY(-0.5px);
}

.admin-hint__tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 200px;
  max-width: min(320px, 85vw);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 450;
  font-style: normal;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  text-align: left;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.admin-hint:hover .admin-hint__tip,
.admin-hint:focus-visible .admin-hint__tip {
  visibility: visible;
  opacity: 1;
}

/* Tooltip nach oben, wenn unten wenig Platz (z. B. Tabellenkopf) */
.admin-hint--tip-up .admin-hint__tip {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
}

@media (max-width: 520px) {
  .admin-hint__tip {
    max-width: min(280px, 92vw);
  }
}

.admin__tab {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.admin__tab.is-active {
  border-color: rgba(43, 108, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.14);
  background: rgba(43, 108, 255, 0.08);
}

.admin__grid {
  display: grid;
  /* Liste links + Detail rechts */
  grid-template-columns: minmax(360px, 560px) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.admin__grid--single {
  grid-template-columns: 1fr !important;
}

.admin__grid > * {
  min-width: 0;
}

/* Detail-Spalte visuell und funktional klar getrennt */
@media (min-width: 861px) {
  .admin__grid > .admin__card:first-child {
    grid-column: 1;
  }
  .admin__grid > .admin__card:nth-child(2) {
    grid-column: 2;
    position: sticky;
    top: 14px;
  }
}

@media (min-width: 861px) {
  .admin__grid--single > .admin__card:first-child,
  .admin__grid--single > .admin__card:nth-child(2) {
    grid-column: 1 / -1;
    position: static;
  }
}

.admin__card {
  background: var(--card-surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.admin__stats {
  margin-bottom: 12px;
}

.stats__updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  font-size: 11px;
  opacity: 0.85;
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 10px 4px 4px;
}

.stats__item {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 10px 10px 9px;
  background: #fafbff;
}

.stats__item:hover {
  border-color: rgba(43, 108, 255, 0.28);
  background: rgba(43, 108, 255, 0.06);
}

.stats__item:focus-visible {
  outline: none;
  border-color: rgba(43, 108, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.14);
}

.stats__item--neu {
  background: linear-gradient(180deg, rgba(43, 108, 255, 0.07), rgba(250, 251, 255, 1));
}
.stats__item--inpruefung {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(250, 251, 255, 1));
}
.stats__item--vorgestellt {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08), rgba(250, 251, 255, 1));
}
.stats__item--interview {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(250, 251, 255, 1));
}
.stats__item--eingestellt {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(250, 251, 255, 1));
}
.stats__item--abgelehnt {
  background: linear-gradient(180deg, rgba(100, 116, 139, 0.08), rgba(250, 251, 255, 1));
}

.stats__label {
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.2;
}

.stats__value {
  font-size: 20px;
  font-weight: 750;
  margin-top: 5px;
  line-height: 1.05;
}

/* legacy .stats__split styles removed (replaced by .stats__details) */

.stats__kv {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.stats__details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 8px 4px 4px;
}

.stats__charts {
  display: flex;
  gap: 10px;
  padding: 6px 4px 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

/* Admin (intern): Diagramme größer, Raster statt Mini‑Karussell */
body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 14px 22px;
  overflow-x: visible;
  scroll-snap-type: none;
}

@media (max-width: 900px) {
  body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__charts {
    grid-template-columns: 1fr;
  }
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__chart {
  flex: unset;
  display: flex;
  flex-direction: column;
  min-height: clamp(320px, 38vw, 520px);
  scroll-snap-align: unset;
  border-radius: 18px;
  border-color: rgba(15, 23, 42, 0.09);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.99) 0%, rgba(236, 242, 252, 0.92) 52%, rgba(248, 250, 252, 0.96) 100%);
  box-shadow:
    0 22px 56px rgba(15, 23, 42, 0.075),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__chart-title {
  font-size: 15px;
  padding: 14px 16px;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__bars {
  flex: 1;
  padding: 14px 14px 18px;
  gap: 12px;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__donut-svg {
  width: clamp(160px, 22vw, 240px);
  height: clamp(160px, 22vw, 240px);
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__spark-svg {
  width: 100%;
  height: clamp(90px, 14vw, 130px);
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__bar-track {
  min-height: 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__bar-fill {
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__bar-label {
  font-size: 13px;
  font-weight: 550;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__donut-svg {
  width: 240px;
  height: 240px;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__donut-total {
  font-size: 26px;
  font-weight: 780;
}

body.admin-page:not(.dj4f-admin-partner) .admin__stats .stats__spark-svg {
  height: 118px;
}

.stats__head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin__health-badge {
  font-size: 11px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
}

.admin__health-badge--ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}

.admin__health-badge--warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
}

.pill--pinned {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
  font-weight: 650;
}

.pill--task-overdue {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #991b1b;
  font-weight: 650;
}

.admin__tasks-week {
  margin-top: 10px;
}

.admin__tasks-week details {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.65);
}

.admin__tasks-week summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
}

.admin__tasks-week .muted {
  margin: 6px 0 10px;
  font-size: 12px;
}

.admin__kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.admin__kanban-col {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.admin__kanban-col.is-drop {
  outline: 2px solid rgba(43, 108, 255, 0.35);
  outline-offset: 2px;
}

.admin__kanban-colhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.admin__kanban-colhead strong {
  font-size: 12px;
  letter-spacing: 0.2px;
}

.admin__kanban-count {
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
}

.admin__kanban-cards {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin__kanban-card {
  cursor: grab;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

.admin__kanban-card:active {
  cursor: grabbing;
}

.admin__kanban-card.is-dragging {
  opacity: 0.55;
}

.admin__kanban-name {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.admin__kanban-sub {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin__kanban-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .admin__kanban {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 680px) {
  .admin__kanban {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

.form-field-hint {
  display: none;
  margin: 4px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

@media print {
  .form-field-hint {
    display: block;
  }
}

.form-draft-banner {
  display: none;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(43, 108, 255, 0.28);
  background: rgba(43, 108, 255, 0.08);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.form-draft-banner.is-visible {
  display: flex;
}

.form-edit-mode-banner {
  display: flex;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.09);
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}
.form-edit-mode-banner code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.06);
}

/* Reports: 3×3 Grid, nutzt volle Breite (kein horizontal scroll) */
.reports-page .stats__charts {
  display: grid;
  gap: 12px;
  padding: 6px 4px 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
}

@media (max-width: 1100px) {
  .reports-page .stats__charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reports-page .stats__charts {
    grid-template-columns: 1fr;
  }
}

@media print {
  /* Reports: DIN A4 – Seite 1 KPIs+Charts, danach Tabellen */
  @page {
    size: A4;
    margin: 10mm;
  }

  .reports-page .topbar,
  .reports-page .admin__card:first-of-type,
  .reports-page #repPivot,
  .reports-page #repPivotCard,
  .reports-page #repPivot {
    display: none !important;
  }

  .reports-page .wrap {
    max-width: none;
    padding: 0;
  }

  .reports-page .rep-print-head {
    display: flex;
    gap: 12px;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0 0 8px 0;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }
  .reports-page .rep-print-head__logo {
    width: 34px;
    height: 34px;
    max-height: 34px;
    object-fit: contain;
  }
  .reports-page .rep-print-head__title {
    font-weight: 900;
    font-size: 16px;
  }
  .reports-page .rep-print-head__sub {
    font-size: 12px;
    opacity: 0.8;
  }

  /* Platz für fixed Header auf jeder Seite */
  .reports-page .wrap {
    padding-top: 74px;
  }

  .reports-page .admin__card {
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    page-break-inside: avoid;
  }

  /* Kompaktierung */
  .reports-page .admin__head {
    padding: 8px 10px;
  }

  /* KPI-Grid deutlich kompakter */
  .reports-page #repKpis {
    padding: 6px 2px 2px;
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .reports-page #repKpis .stats__item {
    padding: 6px 8px 6px;
    border-radius: 10px;
  }
  .reports-page #repKpis .stats__label {
    font-size: 10px;
    line-height: 1.1;
  }
  .reports-page #repKpis .stats__value {
    font-size: 16px;
    line-height: 1.05;
  }

  .reports-page .stats__charts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 6px 2px;
  }
  .reports-page .stats__chart-title {
    padding: 7px 8px;
    font-size: 11px;
  }
  .reports-page .stats__bars {
    padding: 8px;
    gap: 6px;
  }
  .reports-page .stats__chart {
    min-height: unset;
  }
  .reports-page .stats__donut-svg {
    width: 84px;
    height: 84px;
  }
  .reports-page .stats__spark-svg {
    height: 46px;
  }

  /* Tabelle ab Seite 2, darf auf weitere Seiten umbrechen */
  .reports-page #repTableCard {
    break-before: page;
    page-break-before: always;
    page-break-inside: auto;
  }
  .reports-page #repTableCard .admin__table,
  .reports-page #repTableCard table,
  .reports-page #repTableCard tbody,
  .reports-page #repTableCard tr {
    page-break-inside: auto;
    break-inside: auto;
  }

  .reports-page a[href]:after {
    content: "";
  }
}

/* Print-Header standardmäßig ausblenden */
.rep-print-head {
  display: none;
}

.rep-filters .admin__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-filters .admin__head-actions {
  margin-left: auto;
}

.rep-filters__body {
  margin-top: 8px;
}

.rep-filters--collapsed .rep-filters__body {
  display: none;
}

.rep-filters-persist-hint {
  margin: 10px 0 0;
  font-size: 13px;
}

.admin__today-quick-meta {
  margin: 0 0 12px;
  line-height: 1.45;
}

.admin__today-quick-actions {
  justify-content: flex-start;
}

.reports-page .stats__chart {
  /* größer als Admin-Stats-Karten */
  min-height: 220px;
}

.reports-page .stats__donut-svg {
  width: 130px;
  height: 130px;
}

.stats__chart {
  flex: 0 0 260px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.08);
  overflow: hidden;
  scroll-snap-align: start;
}

/* Admin: Charts als größere Kacheln (Dashboard-Feeling) */
body.admin-page .stats__chart {
  flex-basis: 380px;
  min-height: 300px;
}

body.admin-page .stats__donut-svg {
  width: 180px;
  height: 180px;
}

body.admin-page .stats__donut-total {
  font-size: 21px;
}

body.admin-page .stats__spark-svg {
  height: 100px;
}

@media (max-width: 640px) {
  body.admin-page .stats__chart {
    flex-basis: 320px;
    min-height: 260px;
  }
  body.admin-page .stats__donut-svg {
    width: 150px;
    height: 150px;
  }
}

.stats__chart-title {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.55);
}

.stats__bars {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.stats__donut {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
}

.stats__donut-svg {
  width: 110px;
  height: 110px;
  display: block;
  margin: 0 auto;
}

.stats__donut-slice {
  transition: transform 120ms ease, opacity 120ms ease;
  transform-origin: 50% 50%;
}

.stats__donut-svg .stats__donut-slice {
  animation: dj4f-pop-in 520ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: var(--dj4f-delay, 0ms);
  will-change: transform, opacity;
}

.stats__donut-svg:hover .stats__donut-slice {
  opacity: 0.88;
}

.stats__donut-svg:hover .stats__donut-slice:hover {
  opacity: 1;
  transform: scale(1.02);
}

.stats__donut-total {
  font-size: 16px;
  font-weight: 800;
  fill: rgba(11, 18, 32, 0.92);
}

.stats__donut-sub {
  font-size: 9px;
  font-weight: 600;
  fill: rgba(11, 18, 32, 0.55);
}

.stats__legend {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.stats__legend--compact {
  gap: 4px;
}

.stats__legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.stats__legend-row .stats__legend-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 16px rgba(2, 6, 23, 0.06);
  font-weight: 750;
  font-size: 11px;
  opacity: 1;
}

.stats__legend--compact .stats__legend-row {
  grid-template-columns: 1fr auto;
}

.stats__legend-row .stats__legend-pct {
  display: none;
}

.stats__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.stats__legend-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.9;
}

.stats__legend-value,
.stats__legend-pct {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

/* Moderner Look: kompakter, besser lesbar */
.stats__legend--compact .stats__legend-label {
  opacity: 0.92;
}

.stats__legend--compact .stats__legend-value {
  min-width: 30px;
  height: 19px;
  padding: 0 7px;
  font-size: 10.5px;
}

@media print {
  /* Print: keine Schatten/Gradients, klare Kontraste */
  .stats__chart,
  .stats__detail {
    box-shadow: none !important;
    background: #fff !important;
  }

  .stats__chart-title {
    background: #fff !important;
  }

  .stats__legend-row .stats__legend-value {
    box-shadow: none !important;
    background: #fff !important;
  }
}

.stats__spark {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.stats__spark-svg {
  width: 100%;
  height: 72px;
  display: block;
}

.stats__spark-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: dj4f-stroke-draw 780ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.stats__spark-area {
  opacity: 0;
  animation: dj4f-fade-in 520ms ease-out both;
  animation-delay: 120ms;
}

.stats__spark-dot {
  fill: #ffffff;
  stroke: rgba(37, 99, 235, 0.95);
  stroke-width: 2;
}

.stats__spark-svg:hover .stats__spark-dot {
  stroke: rgba(124, 58, 237, 0.95);
}

.stats__bar {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 3fr 56px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

@media (max-width: 520px) {
  .stats__bar {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }
  .stats__bar-value {
    text-align: left;
  }
  .stats__bar-track {
    height: 12px;
  }
}

.stats__bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.stats__bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.stats__bar-fill {
  height: 100%;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.10);
  transition: width 280ms ease;
  width: 0%;
}

.stats__bar-track .stats__bar-fill {
  width: var(--dj4f-bar, 0%);
  background: linear-gradient(90deg, var(--dj4f-color, #2563eb), rgba(255, 255, 255, 0.16));
  animation: dj4f-bar-in 700ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: var(--dj4f-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .stats__donut-svg .stats__donut-slice,
  .stats__spark-line,
  .stats__spark-area,
  .stats__bar-track .stats__bar-fill {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes dj4f-pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dj4f-stroke-draw {
  from {
    stroke-dashoffset: 1200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dj4f-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dj4f-bar-in {
  from {
    filter: saturate(0.92);
    transform: translateY(2px);
  }
  to {
    filter: saturate(1);
    transform: translateY(0);
  }
}

.stats__bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

.stats__detail {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stats__detail > summary {
  cursor: pointer;
  user-select: none;
  padding: 10px 10px;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
}

.stats__detail > summary::-webkit-details-marker {
  display: none;
}

.stats__detail > summary:after {
  content: "▾";
  float: right;
  opacity: 0.6;
}

.stats__detail[open] > summary:after {
  content: "▴";
}

.stats__detail-body {
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.stats__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stats__row .muted {
  opacity: 0.7;
}

.admin__detail {
  padding: 12px 6px 6px;
}

.admin__section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.admin__section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.admin__section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.2px;
  opacity: 0.9;
}

.admin__profile-preview.preview {
  grid-template-columns: 280px 1fr;
  padding: 0;
}

.admin__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin__field {
  display: grid;
  gap: 6px;
}

.admin__field-label {
  font-size: 12px;
  opacity: 0.75;
}

.admin__field input,
.admin__field select,
.admin__field textarea {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.admin__field textarea {
  resize: vertical;
}

.admin__field input:focus,
.admin__field select:focus,
.admin__field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43, 108, 255, 0.18);
}

.admin__field--full {
  grid-column: 1 / -1;
}

.admin__inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.admin__inline select {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.admin__attachments-list {
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.admin__attachments-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  align-items: center;
}

.admin__attachments-item:last-child {
  border-bottom: none;
}

.admin__attachments-name {
  font-size: 13px;
}

.admin__attachments-sub {
  font-size: 12px;
  opacity: 0.7;
}

.admin__attachments-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin__attachments-actions button {
  padding: 8px 10px;
  font-size: 12px;
}

/* Admin: zweispaltig so lange wie möglich (auch mit Sidebar).
   Erst auf sehr schmalen Screens stapeln. */
@media (max-width: 680px) {
  .admin__grid {
    grid-template-columns: 1fr;
  }
  .admin__profile-preview.preview {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats__chart {
    flex-basis: 240px;
  }
  .stats__split {
    grid-template-columns: 1fr;
  }
  .help__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .admin-page .wrap {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .admin__tabs {
    gap: 8px;
  }
  .admin__tabs .admin__inline-hint {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .admin__tabs .admin__inline-hint .admin__tab {
    flex: 1;
    text-align: center;
    min-width: 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 2px 2px;
  }
  .stats__split {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 2px 2px;
  }
  .stats__details {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 2px 2px;
  }
  .stats__item,
  .stats__sub {
    border-radius: 12px;
  }
  .stats__item {
    padding: 9px 10px 8px;
  }
  .stats__value {
    font-size: 18px;
  }
  body.sidebar-layout .topbar__logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .topbar__inner {
    padding: 12px max(14px, env(safe-area-inset-left)) 12px
      max(14px, env(safe-area-inset-right));
    padding-top: max(12px, env(safe-area-inset-top));
  }
}

.admin__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin__table {
  overflow: auto;
  padding-top: 12px;
}

.admin__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  max-width: 100%;
}

.admin__table th,
.admin__table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  vertical-align: middle;
}

.admin__table th {
  background: #f8fafc;
  font-weight: 650;
}

.admin__table tbody tr {
  transition: background 120ms ease;
}

.admin__table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.admin__table tbody tr:hover {
  background: rgba(43, 108, 255, 0.06);
}

body.dj4f-admin-table-compact .admin__table th,
body.dj4f-admin-table-compact .admin__table td {
  padding: 6px 8px;
  font-size: 12px;
}

.admin__table-density {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--topbar-fg);
}

.admin__table-density input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-btn-bg);
}

.admin__empty-state {
  text-align: center;
  padding: 28px 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px dashed rgba(15, 23, 42, 0.14);
  max-width: 520px;
  margin-inline: auto;
}

.admin__empty-state__title {
  font-weight: 750;
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--topbar-fg);
}

.admin__empty-state__hint {
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
  margin: 0;
}

.admin__row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin__row-actions button,
.admin__row-actions a {
  border-color: rgba(15, 23, 42, 0.14);
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  text-decoration: none;
}

.admin__cell-main {
  font-weight: 600;
}

.admin__cell-pills {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  white-space: nowrap;
}

.pill--status {
  border-color: rgba(43, 108, 255, 0.28);
  background: rgba(43, 108, 255, 0.08);
  color: #1d4ed8;
  text-transform: capitalize;
}

.pill--tag {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

.pill--more {
  opacity: 0.8;
}

.pill--docs-pending {
  border-color: rgba(217, 119, 6, 0.45);
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
  font-weight: 600;
}

.pill--notify {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(15, 23, 42, 0.04);
  color: rgba(15, 23, 42, 0.85);
}

.pill--notify-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.10);
  color: rgba(20, 83, 45, 0.95);
}
.pill--notify-warn {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
  color: rgba(146, 64, 14, 0.95);
}
.pill--notify-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.10);
  color: rgba(127, 29, 29, 0.95);
}

.admin__partner-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: rgba(254, 243, 199, 0.65);
  color: #78350f;
  font-size: 0.95rem;
  line-height: 1.45;
}

.admin__partner-banner--warn {
  border-color: rgba(217, 119, 6, 0.5);
  background: rgba(253, 230, 138, 0.55);
}

.admin__partner-sync {
  margin: -6px 0 14px;
  padding: 0 4px;
  font-size: 0.92rem;
}

.dj4f-meta-docs-pending textarea {
  margin-top: 8px;
}

.docs-checklist {
  margin: 10px 0 8px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.docs-checklist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.docs-checklist__title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.docs-checklist__body {
  display: grid;
  gap: 6px;
}

.docs-checklist__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.docs-checklist__name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 650;
}

.pill--ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.10);
  color: rgba(20, 83, 45, 0.95);
}

.pill--missing {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
  color: rgba(146, 64, 14, 0.95);
}

.admin__row-actions button:hover,
.admin__row-actions a:hover {
  background: rgba(15, 23, 42, 0.1);
}

.admin__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin__filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin__quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin__bulk {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  padding: 6px 10px;
}

.admin__bulk > summary {
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
}

.admin__bulk > summary::-webkit-details-marker {
  display: none;
}

.admin__bulk-body {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.admin__table.hide-col-role [data-col="role"],
.admin__table.hide-col-role th[data-col="role"],
.admin__table.hide-col-assignee [data-col="assignee"],
.admin__table.hide-col-assignee th[data-col="assignee"],
.admin__table.hide-col-updated [data-col="updated"],
.admin__table.hide-col-updated th[data-col="updated"] {
  display: none;
}

.admin__row.is-highlight {
  animation: rowFlash 1.6s ease-out;
  background: rgba(43, 108, 255, 0.08);
}

@keyframes rowFlash {
  0% { background: rgba(43, 108, 255, 0.18); }
  100% { background: rgba(43, 108, 255, 0.00); }
}

.admin__timeline {
  display: grid;
  gap: 8px;
  padding: 10px 0;
}
.admin__timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.admin__timeline-when {
  font-size: 12px;
  color: rgba(255,255,255,.75);
}
.admin__timeline-body {
  font-size: 13px;
}
@media (max-width: 720px) {
  .admin__timeline-item { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .admin__bulk-body {
    grid-template-columns: 1fr;
  }
}

.admin__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  color: #0f172a;
}

.admin__chip button {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
  line-height: 1;
}

.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 14px;
  margin: 0 auto;
  max-width: 720px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  padding: 10px 12px;
  z-index: 2000;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.toast__actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.toast button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.toast button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.notify-stack {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 2100;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 28px));
}

.notify {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  animation: notify-in 140ms ease-out;
}

.notify.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.notify__msg {
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.notify__close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
}

.notify--success {
  border-color: var(--color-success-border);
  background: var(--color-success-bg);
}
.notify--warn {
  border-color: var(--color-warn-border);
  background: var(--color-warn-bg);
}
.notify--error {
  border-color: var(--color-error-border);
  background: var(--color-error-bg);
}
.notify--info {
  border-color: var(--color-info-border);
  background: var(--color-info-bg);
}

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

@media (max-width: 560px) {
  .notify-stack {
    left: 12px;
    right: 12px;
    top: 10px;
    max-width: none;
  }
}

/* Mobile/PWA: Schrift insgesamt etwas kleiner */
@media (max-width: 900px) {
  body {
    font-size: 12px;
  }

  h1 {
    font-size: 15px;
  }

  h2 {
    font-size: 13px;
  }

  button,
  input,
  select,
  textarea {
    font-size: 11.5px;
  }

  .muted {
    font-size: 10px;
  }
}

/* ------------------------------------------------------------------
   Mobile/PWA Drawer Sidebar – FINAL overrides (muss am Ende stehen)
   Hintergrund: ältere Mobile-Topbar-Regeln (Checkbox-Menü) überschreiben sonst.
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  body.sidebar-layout .topbar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: var(--sidebar-w) !important;
    border-right: 1px solid var(--topbar-border) !important;
    border-bottom: 0 !important;
    overflow: auto !important;
    /* Über #main-content / Formular-Stack; unter Toasts (2000+). */
    z-index: 5000 !important;
  }

  body.sidebar-layout.sidebar-collapsed .topbar {
    transform: translateX(calc(-1 * var(--sidebar-w))) !important;
  }

  body.sidebar-layout .topbar__inner {
    height: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  /* Checkbox-Menü deaktivieren (Drawer ist immer die Navigation) */
  body.sidebar-layout .topbar__menu-btn {
    display: none !important;
  }

  body.sidebar-layout .topbar__actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 2px !important;
    border-top: 0 !important;
  }

  body.sidebar-layout .topbar__menu-state:checked ~ .topbar__actions {
    display: flex !important;
  }

  body.sidebar-layout .wrap {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

.admin__toolbar-search {
  flex: 1 1 220px;
}

.admin__toolbar-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-size: 14px;
}

.admin__toolbar-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin__toolbar-body {
  margin-top: 10px;
}

.admin__toolbar--collapsed .admin__toolbar-body {
  display: none;
}

.admin__audit {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
}

.admin__audit-body {
  margin-top: 10px;
  overflow: auto;
}

.admin__audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin__audit-table th,
.admin__audit-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  vertical-align: top;
}

.admin__audit-table th {
  background: #f8fafc;
  font-weight: 650;
}

.admin__audit-detail {
  max-width: 280px;
  word-break: break-word;
}

.notify-row--unread {
  font-weight: 750;
}

.ai-disclaimer {
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.privacy-note {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #b91c1c;
  color: #ffffff;
}

.privacy-note summary {
  cursor: pointer;
  font-weight: 750;
  color: #ffffff;
  list-style-position: outside;
}

.privacy-note summary::marker {
  color: #ffffff;
}

.privacy-note__body {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #ffffff;
}

.privacy-note__body strong {
  color: #ffffff;
  font-weight: 800;
}

.topbar__draft-status {
  font-size: 13px;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__applicant-id {
  font-size: 13px;
  max-width: min(22rem, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .topbar__draft-status {
    max-width: 100%;
    white-space: normal;
  }

  .topbar__applicant-id {
    max-width: 100%;
    white-space: normal;
  }
}


/* =========================================================================
 * Live-Übersicht (live-overview.php)
 * Layout, Charts, Feed, Toolbar, Vollbild & Wand-Modus.
 * ========================================================================= */

.dj4f-hide-reports-nav .topbar__link[href*="reports.php"] {
  display: none !important;
}

.dj4f-hide-live-nav .topbar__link[href*="live-overview.php"] {
  display: none !important;
}

.live-overview-page .live-overview__wrap {
  padding: 16px 18px 32px;
  max-width: 1640px;
  margin: 0 auto;
}

.live-overview__main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-overview__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 12px 16px;
}

.live-overview__toolbar-left,
.live-overview__toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.live-overview__toolbar-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 999px;
}

.live-overview__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
  animation: dj4fLivePulse 1.4s ease-out infinite;
}

@keyframes dj4fLivePulse {
  0%   { box-shadow: 0 0 0 0    rgba(220, 38, 38, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0.0);  }
  100% { box-shadow: 0 0 0 0    rgba(220, 38, 38, 0.0);  }
}

.live-overview__badge {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #b91c1c;
  text-transform: uppercase;
}

.live-overview__clock {
  display: inline-flex;
  align-items: center;
}

.live-overview__clock-row {
  display: inline-flex;
  align-items: stretch;
  gap: 14px;
}

.live-overview__clock-zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-overview__clock-zone-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  text-transform: uppercase;
}

.live-overview__clock-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.live-overview__clock-time {
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.live-overview__clock-date {
  font-size: 0.72rem;
}

.live-overview__clock-divider {
  width: 1px;
  background: rgba(15, 23, 42, 0.12);
}

.live-overview__hint {
  font-size: 0.78rem;
}

.live-overview__sync {
  font-size: 0.85rem;
}

.live-overview__sync--err strong {
  color: #b91c1c;
}

.live-overview__latency {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.05);
}

.live-overview__hbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
}

.live-overview__hbar-sep {
  width: 1px;
  height: 22px;
  background: rgba(15, 23, 42, 0.1);
  margin: 0 2px;
}

.live-overview__hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.live-overview__hbtn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.18);
}

.live-overview__hbtn.is-on {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

.live-overview__hbtn--accent {
  background: rgba(2, 6, 23, 0.04);
}

.live-overview__hbtn--accent[aria-pressed="true"] {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.32);
}

.live-overview__hbtn-icon {
  width: 20px;
  height: 20px;
}

.live-overview__hbtn-icon--on,
.live-overview__hbtn-icon--off {
  display: none;
}

.live-overview__hbtn.is-on .live-overview__hbtn-icon--on,
.live-overview__hbtn[aria-checked="true"] .live-overview__hbtn-icon--on,
.live-overview__hbtn[aria-pressed="true"] .live-overview__hbtn-icon--on {
  display: block;
}

.live-overview__hbtn:not(.is-on):not([aria-checked="true"]):not([aria-pressed="true"]) .live-overview__hbtn-icon--off {
  display: block;
}

/* Banners ------------------------------------------------------------------*/
.live-overview__signals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-overview__banner {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.92rem;
}

.live-overview__banner-livewarn {
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.08));
  border-color: rgba(239, 68, 68, 0.32);
  color: #92400e;
  font-weight: 600;
}

.live-overview__wall-strip {
  margin: 0 0 4px;
  font-size: 0.82rem;
  text-align: center;
}

/* Board / Grid -------------------------------------------------------------*/
.live-overview__board {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-overview__top {
  display: contents;
}

.live-overview__grid3 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1280px) {
  .live-overview__grid3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .live-overview__col--right {
    grid-column: span 2;
  }
}

@media (max-width: 880px) {
  .live-overview__grid3 {
    grid-template-columns: 1fr;
  }
  .live-overview__col--right {
    grid-column: auto;
  }
}

.live-overview__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.live-overview__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.live-overview__panel.is-dragging {
  opacity: 0.5;
}

.live-overview__panel.is-drop-target {
  outline: 2px dashed rgba(37, 99, 235, 0.5);
  outline-offset: 4px;
}

.live-overview__panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-overview__drag-handle {
  width: 22px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: grab;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.live-overview__drag-handle:active {
  cursor: grabbing;
}

.live-overview__drag-grip {
  width: 14px;
  height: 14px;
  background:
    radial-gradient(circle at 25% 25%, #94a3b8 1.5px, transparent 2px) 0 0/6px 6px,
    radial-gradient(circle at 25% 25%, #94a3b8 1.5px, transparent 2px) 3px 3px/6px 6px;
  display: inline-block;
}

/* KPIs ---------------------------------------------------------------------*/
.live-overview__panel--kpis {
  padding: 14px 16px;
}

.live-overview__panel--full {
  width: 100%;
}

.live-overview__kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.live-overview__kpi-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.live-overview__kpi {
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.01));
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.live-overview__kpi--primary { background: linear-gradient(140deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04)); border-color: rgba(37, 99, 235, 0.18); }
.live-overview__kpi--ok      { background: linear-gradient(140deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.04)); border-color: rgba(34, 197, 94, 0.22); }
.live-overview__kpi--warn    { background: linear-gradient(140deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.04)); border-color: rgba(245, 158, 11, 0.22); }
.live-overview__kpi--danger  { background: linear-gradient(140deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04)); border-color: rgba(239, 68, 68, 0.22); }
.live-overview__kpi--info    { background: linear-gradient(140deg, rgba(6, 182, 212, 0.14), rgba(6, 182, 212, 0.04)); border-color: rgba(6, 182, 212, 0.22); }
.live-overview__kpi--muted   { background: rgba(2, 6, 23, 0.04); border-color: rgba(2, 6, 23, 0.08); }

.live-overview__kpi-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.live-overview__kpi-label {
  font-size: 0.85rem;
  color: #475569;
}

/* Charts -------------------------------------------------------------------*/
.live-overview__charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 1100px) {
  .live-overview__charts {
    grid-template-columns: 1fr;
  }
}

.live-overview__panel--chart {
  padding: 14px 16px;
}

.live-overview__chart-mount,
.live-overview__quick-mount,
.live-overview__extra-mount,
.live-overview__new-donut-mount {
  min-height: 80px;
}

.live-overview__donut {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.live-overview__donut-svg {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
}

.live-overview__donut-total {
  font-size: 28px;
  font-weight: 700;
  fill: #0f172a;
}

.live-overview__donut-sub {
  font-size: 12px;
  fill: #64748b;
}

.live-overview__legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.live-overview__legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
}

.live-overview__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.live-overview__legend-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-overview__legend-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.live-overview__legend-pct {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.live-overview__bar {
  display: grid;
  grid-template-columns: minmax(60px, 110px) 1fr 40px;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.live-overview__bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}

.live-overview__bar-track {
  background: rgba(15, 23, 42, 0.07);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.live-overview__bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.live-overview__bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.live-overview__spark-svg {
  width: 100%;
  height: 80px;
}

/* Quick Stats --------------------------------------------------------------*/
.live-overview__quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
  font-size: 0.92rem;
}

.live-overview__quick-row:last-child {
  border-bottom: 0;
}

/* Feed ---------------------------------------------------------------------*/
.live-overview__feed-intro {
  margin: 0 0 6px;
  font-size: 0.85rem;
}

.live-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.live-feed__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.05);
  animation: dj4fFeedIn 0.4s ease;
}

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

.live-feed__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: #2563eb;
}

.live-feed__item--new      .live-feed__dot { background: #22c55e; }
.live-feed__item--status   .live-feed__dot { background: #2563eb; }
.live-feed__item--docs     .live-feed__dot { background: #ef4444; }
.live-feed__item--docsOk   .live-feed__dot { background: #22c55e; }
.live-feed__item--assignee .live-feed__dot { background: #7c3aed; }

.live-feed__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.live-feed__msg {
  font-size: 0.92rem;
  line-height: 1.35;
  word-wrap: break-word;
}

.live-feed__meta {
  font-size: 0.74rem;
}

/* Listen-Cards (Recent / Stale / Assignee) --------------------------------*/
.live-overview__list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.live-overview__list-row:last-child {
  border-bottom: 0;
}

.live-overview__list-main {
  min-width: 0;
}

.live-overview__list-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-overview__list-sub {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-overview__list-meta {
  font-size: 0.82rem;
  color: #475569;
}

.live-overview__stale-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.live-overview__stale-name {
  font-weight: 700;
  font-size: 1.02rem;
}

.live-overview__stale-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.86rem;
}

.live-overview__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 600;
}

.live-overview__pill--soft {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

/* Großdarstellung / Wand / Vollbild ---------------------------------------*/
.live-overview--large .live-overview__kpi-value { font-size: 2.4rem; }
.live-overview--large .live-overview__kpi-label { font-size: 0.95rem; }
.live-overview--large .live-overview__donut-svg { width: 220px; height: 220px; }
.live-overview--large .live-feed__msg            { font-size: 1.04rem; }

.dj4f-live-wall body,
.live-overview--wall {
  background: #0f172a;
}

.live-overview--wall .topbar,
.live-overview--wall .sidebar { display: none !important; }

.live-overview--wall .live-overview__wrap {
  max-width: none;
  padding: 12px 16px 20px;
}

.live-overview--wall .admin__card {
  background: rgba(255, 255, 255, 0.96);
}

.live-overview--fullscreen .live-overview__wrap {
  max-width: none;
  padding: 12px 14px;
}

@media print {
  .topbar,
  .sidebar,
  .live-overview__hbar,
  .live-overview__toolbar-right .live-overview__sync,
  .live-overview__toolbar-right .live-overview__latency {
    display: none !important;
  }
  .live-overview__grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .live-overview__panel {
    break-inside: avoid;
  }
}

/* =========================================================================
 * status.php – API/DB/Storage-Diagnose
 * ========================================================================= */
.status-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-page__intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-page__intro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.status-page__intro-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-page__banner {
  margin: 0;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.92rem;
}

.status-page__banner--ok    { background: rgba(34, 197, 94, 0.10); border-color: rgba(34, 197, 94, 0.32); color: #166534; }
.status-page__banner--warn  { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.32); color: #92400e; }
.status-page__banner--err   { background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.32); color: #b91c1c; }

.status-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.status-page__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.status-page__panel--wide {
  grid-column: 1 / -1;
}

.status-page__panel h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.status-page__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.status-page__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.status-page__row:last-child {
  border-bottom: 0;
}

.status-page__row dt {
  font-weight: 600;
  color: #334155;
  font-size: 0.88rem;
}

.status-page__row dd {
  margin: 0;
  font-size: 0.92rem;
  word-break: break-word;
  min-width: 0;
}

.status-page__row dd code {
  background: rgba(15, 23, 42, 0.05);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.85rem;
}

.status-page__row--err dd code {
  background: rgba(239, 68, 68, 0.10);
  color: #b91c1c;
}

.status-page__row--sep {
  border-bottom: 0;
  height: 4px;
  padding: 0;
}

.status-page__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(2, 6, 23, 0.06);
  color: #1f2937;
}

.status-page__pill--ok    { background: rgba(34, 197, 94, 0.15);  color: #166534; }
.status-page__pill--warn  { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.status-page__pill--err   { background: rgba(239, 68, 68, 0.15);  color: #b91c1c; }
.status-page__pill--info  { background: rgba(37, 99, 235, 0.15);  color: #1d4ed8; }
.status-page__pill--muted { background: rgba(2, 6, 23, 0.06);     color: #475569; }

.status-page__table-wrap {
  overflow-x: auto;
}

.status-page__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.status-page__table thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.status-page__table tbody td {
  padding: 8px 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.06);
  vertical-align: middle;
}

.status-page__table tbody tr:last-child td {
  border-bottom: 0;
}

.status-page__table code {
  background: rgba(15, 23, 42, 0.05);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.86rem;
}

.status-page__raw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.status-page__raw-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-page__raw {
  max-height: 420px;
  overflow: auto;
}

/* ── Feldhilfe: (i)-Icon + Hover-Tooltip ─────────────────────────────────── */
.field-help-icon {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(0, 45, 142, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  z-index: 30;
  padding: 0;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0, 33, 71, 0.28);
  pointer-events: all;
}

.field-help-icon span {
  margin-top: -0.05rem;
}

.field-help-icon:hover,
.field-help-icon:focus-visible {
  background: #1d4ed8;
  outline: none;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  filter: brightness(1.08);
}

.field-help-tooltip {
  position: fixed;
  z-index: 6000;
  max-width: min(22rem, calc(100vw - 20px));
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.field-help-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.field-help-tooltip__title {
  display: block;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.field-help-tooltip__body {
  color: #cbd5e1;
  font-size: 0.78rem;
}

.field-help-tooltip__pdf {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 0.72rem;
  font-style: italic;
}

/* Desktop: FAB sichtbar wenn Sidebar eingeklappt */
@media (min-width: 901px) {
  body.sidebar-layout.sidebar-collapsed .sidebar-fab {
    display: inline-flex;
    left: 12px;
    right: auto;
    top: 12px;
    z-index: 5030;
  }
}

/* Datenschutz-Hinweis: erweiterter Stil — rot, weiße Schrift */
.privacy-note {
  background: #b91c1c;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: .75rem;
  padding: .7rem 1rem;
  margin-bottom: 1rem;
  font-size: .83rem;
  color: #ffffff;
}
.privacy-note summary {
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.privacy-note summary::after {
  content: '▾';
  margin-left: auto;
  transition: transform 0.2s;
  font-size: .75rem;
  color: #ffffff;
}
.privacy-note[open] summary::after { transform: rotate(180deg); }
.privacy-note__body {
  margin-top: .65rem;
  line-height: 1.6;
  padding: .5rem .75rem;
  background: rgba(0,0,0,.2);
  border-radius: .5rem;
  color: #ffffff;
}
.privacy-note__body hr { border-color: rgba(255,255,255,.25); }
.privacy-note__body strong { color: #ffffff; font-weight: 800; }

/* Wenn Live-Hilfe-Bar sichtbar → Seiten-Padding unten */
body.help-bar-open .wrap { padding-bottom: 8rem; }

/* ── Sidebar Mobile Close-Button & Overlay ────────────────────────────────── */

/* Schließen-Button: nur auf Mobile sichtbar */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9);
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-close-btn:hover {
  background: rgba(255,255,255,.28);
}
.sidebar-close-btn .ui-icon svg {
  width: 18px; height: 18px;
}

/* Overlay hinter der Sidebar (Mobile) —
   Deckt nur den Bereich RECHTS neben der Sidebar ab (left: sidebar-w),
   damit iOS-PWA keine Touch-Events über den Sidebar-Bereich fängt. */
.sidebar-overlay-mobile {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  left: var(--sidebar-w);   /* ausdrücklich NICHT über die Sidebar legen */
  background: rgba(15, 23, 42, .5);
  z-index: 4800;             /* über Formular-Stack, unter Topbar (5000) */
  touch-action: none;       /* verhindert Scroll-Durchleitung auf iOS */
  -webkit-tap-highlight-color: transparent;
}
.sidebar-overlay-mobile.visible {
  display: block;
}

@media (max-width: 900px) {
  /* Close-Button in der Sidebar sichtbar machen */
  .sidebar-close-btn {
    display: inline-flex;
  }

  /* Topbar-Head: Toggle + Close nebeneinander */
  body.sidebar-layout .topbar__head {
    display: flex;
    align-items: center;
    gap: .5rem;
  }

  /* Sidebar standardmäßig per JS collapsed — hier sicherstellen
     dass brand/toggle noch sichtbar ist während Transition */
  body.sidebar-layout.sidebar-collapsed .topbar {
    box-shadow: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Login-Modal — Glassmorphismus (index.php)
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes lmd-in {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* ── Dialog-Element ── */
.login-modal-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100dvh;
  overflow: visible;
}
.login-modal-dialog[open] .lmd-card {
  animation: lmd-in .28s cubic-bezier(.16,1,.3,1) both;
}
.login-modal-dialog::backdrop {
  background: rgba(3, 7, 18, 0.65);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

/* ── Glass-Karte ── */
.lmd-card {
  position: relative;
  width: min(400px, calc(100vw - 2rem));
  padding: 2.4rem 2rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e2e8f0;

  /* Glas-Hintergrund */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(32px) saturate(1.6) brightness(1.08);
  -webkit-backdrop-filter: blur(32px) saturate(1.6) brightness(1.08);

  /* Abgerundete Ecken */
  border-radius: 1.75rem;

  /* Rand: feines Highlight oben, dünner Rahmen */
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 2px  0   rgba(255,255,255,.12) inset,   /* oberes Highlight */
    0 -1px 0   rgba(0,0,0,.2)        inset,   /* untere Kante */
    0 8px  32px rgba(0,0,0,.28),              /* weicher nah-Schatten */
    0 32px 64px rgba(0,0,0,.22),              /* großer Tiefen-Schatten */
    0 0   120px rgba(99,102,241,.12);          /* lila Glow */
}

/* Dekorativer Orb im Hintergrund der Karte */
.lmd-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 260px; height: 200px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.28) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  filter: blur(20px);
}

/* ── Schließen-Button ── */
.lmd-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
}
.lmd-close::before { width: 1rem; height: 1rem; }
.lmd-close:hover {
  background: rgba(239, 68, 68, .2);
  border-color: rgba(239, 68, 68, .35);
  color: #fecaca;
}

/* ── Header (Logo + Titel) ── */
.lmd-header {
  text-align: center;
  margin-bottom: 1.6rem;
}
.lmd-header-logo {
  margin-bottom: 1rem;
}
.lmd-header-logo img {
  width: 60px; height: 60px;
  object-fit: contain;
  border-radius: 1.1rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.15),
    0 8px 24px rgba(0,0,0,.4),
    0 0 32px rgba(99,102,241,.2);
}
.lmd-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 .2rem;
  letter-spacing: -.015em;
}
.lmd-subtitle {
  font-size: .8rem;
  color: rgba(148,163,184,.65);
  margin: 0;
}

/* ── Felder ── */
.lmd-field { margin-bottom: 0; }
.lmd-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(148,163,184,.8);
  margin: 1.1rem 0 .35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lmd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lmd-input-icon {
  position: absolute;
  left: .9rem;
  color: rgba(100,116,139,.7);
  pointer-events: none;
  flex-shrink: 0;
  transition: color .18s;
}
.lmd-input-wrap:focus-within .lmd-input-icon {
  color: rgba(165,180,252,.9);
}
.lmd-input {
  width: 100%;
  padding: .78rem 1rem .78rem 2.65rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .9rem;
  color: #f1f5f9;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  box-sizing: border-box;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lmd-input::placeholder { color: rgba(100,116,139,.5); }
.lmd-input:focus {
  border-color: rgba(99,102,241,.7);
  background: rgba(255,255,255,.1);
  box-shadow:
    0 0 0 3px rgba(99,102,241,.2),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.lmd-pw-row .lmd-input { padding-right: 3.2rem; }

/* Passwort-Toggle */
.lmd-pw-toggle {
  position: absolute;
  right: .65rem;
  background: transparent;
  border: none;
  color: rgba(100,116,139,.6);
  cursor: pointer;
  padding: .35rem;
  display: flex; align-items: center;
  border-radius: .45rem;
  transition: color .15s;
  line-height: 0;
}
.lmd-pw-toggle:hover { color: #a5b4fc; }

/* Caps-Lock */
.lmd-caps {
  font-size: .75rem;
  color: #fbbf24;
  margin-top: .35rem;
  display: flex; align-items: center; gap: .3rem;
}

/* ── Fehlermeldung ── */
.lmd-error {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: .75rem;
  color: #fca5a5;
  padding: .65rem .9rem;
  font-size: .83rem;
  margin-bottom: .5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Merken ── */
.lmd-bottom-row { margin-top: 1rem; }
.lmd-remember {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem;
  color: rgba(100,116,139,.8);
  cursor: pointer; user-select: none;
  width: fit-content;
}
.lmd-remember input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: #6366f1;
  cursor: pointer; flex-shrink: 0;
}

/* ── Anmelden-Button ── */
.lmd-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%;
  margin-top: 1.4rem;
  padding: .88rem 1.2rem;
  background: linear-gradient(135deg,
    rgba(99,102,241,.9)  0%,
    rgba(79,70,229,.95) 100%);
  border: 1px solid rgba(99,102,241,.5);
  border-radius: 1rem;
  color: #fff;
  font-size: .97rem; font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.18) inset,
    0 4px 18px rgba(99,102,241,.35),
    0 1px  4px rgba(0,0,0,.2);
  transition: background .2s, box-shadow .2s, transform .1s, opacity .15s;
}
.lmd-btn:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.22) inset,
    0 6px 28px rgba(99,102,241,.55),
    0 2px  6px rgba(0,0,0,.25);
}
.lmd-btn:active  { transform: scale(.98); }
.lmd-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ── Hinweis ── */
.lmd-hint {
  display: flex; align-items: center; justify-content: center; gap: .3rem;
  margin-top: 1.3rem;
  font-size: .75rem;
  color: rgba(71,85,105,.7);
  text-align: center;
}

/* ── Light-Theme ── */
html[data-theme="light"] .login-modal-dialog::backdrop {
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
html[data-theme="light"] .lmd-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.9);
  color: #1e293b;
  box-shadow:
    0 2px  0   rgba(255,255,255,.9) inset,
    0 8px  24px rgba(0,0,0,.1),
    0 24px 60px rgba(0,0,0,.14),
    0 0   80px rgba(99,102,241,.08);
}
html[data-theme="light"] .lmd-card::before {
  background: radial-gradient(ellipse at center, rgba(99,102,241,.12) 0%, transparent 70%);
}
html[data-theme="light"] .lmd-close {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.1);
  color: rgba(0,0,0,.4);
}
html[data-theme="light"] .lmd-close:hover {
  background: rgba(0,0,0,.1);
  color: #0f172a;
}
html[data-theme="light"] .lmd-title   { color: #0f172a; }
html[data-theme="light"] .lmd-subtitle { color: #6366f1; opacity: .8; }
html[data-theme="light"] .lmd-label   { color: #64748b; }
html[data-theme="light"] .lmd-input {
  background: rgba(255,255,255,.65);
  border-color: rgba(0,0,0,.1);
  color: #0f172a;
}
html[data-theme="light"] .lmd-input::placeholder { color: #94a3b8; }
html[data-theme="light"] .lmd-input:focus {
  background: rgba(255,255,255,.9);
  border-color: #6366f1;
}
html[data-theme="light"] .lmd-input-icon { color: #94a3b8; }
html[data-theme="light"] .lmd-remember  { color: #64748b; }
html[data-theme="light"] .lmd-hint      { color: #94a3b8; }

/* ── Sidebar-Buttons & Nutzerbereich (index.php) ────────────────────────── */

/* Primärer Absenden-Button */
.sb-btn-primary {
  display: flex; align-items: center; gap: .5rem;
  width: 100%;
  padding: .72rem 1rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none; border-radius: .75rem;
  color: #fff; font-size: .9rem; font-weight: 600;
  cursor: pointer; text-align: left;
  box-shadow: 0 3px 12px rgba(99,102,241,.35);
  transition: opacity .17s, box-shadow .17s, transform .1s;
}
.sb-btn-primary:hover   { opacity: .92; box-shadow: 0 4px 18px rgba(99,102,241,.5); }
.sb-btn-primary:active  { transform: scale(.98); }

/* Ghost-Button (Vorschau, Drucken, Abmelden) */
.sb-btn-ghost {
  display: flex; align-items: center; gap: .5rem;
  width: 100%;
  padding: .6rem .85rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .65rem;
  color: rgba(255,255,255,.78); font-size: .85rem;
  cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
  margin-top: .35rem;
}
.sb-btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Danger-Button (Löschen) */
.sb-btn-danger {
  display: flex; align-items: center; gap: .5rem;
  width: 100%;
  padding: .55rem .85rem;
  background: transparent;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: .65rem;
  color: rgba(248,113,113,.75); font-size: .82rem;
  cursor: pointer; text-align: left;
  transition: background .15s, color .15s, border-color .15s;
  margin-top: .4rem;
}
.sb-btn-danger:hover {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.45);
  color: #fca5a5;
}

/* Login-Button */
.sb-btn-login {
  display: flex; align-items: center; gap: .5rem;
  width: 100%;
  padding: .65rem 1rem;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: .75rem;
  color: #a5b4fc; font-size: .88rem; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .15s, border-color .15s, color .15s;
  margin-top: .3rem;
}
.sb-btn-login:hover {
  background: rgba(99,102,241,.25);
  border-color: rgba(99,102,241,.5);
  color: #c7d2fe;
}

/* Abmelden-Button */
.sb-btn-logout { margin-top: .4rem; font-size: .82rem; color: rgba(148,163,184,.65); }
.sb-btn-logout:hover { color: #fca5a5; background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.2); }

/* Gast-Hinweis */
.sb-guest-hint {
  font-size: .76rem;
  color: rgba(148,163,184,.5);
  margin: 0 0 .4rem;
  text-align: center;
  letter-spacing: .02em;
}

/* Nutzer-Karte */
.sb-user-card {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .75rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .75rem;
  margin-bottom: .2rem;
}
.sb-user-avatar {
  width: 34px; height: 34px;
  border-radius: .55rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.sb-user-name {
  font-size: .88rem; font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-user-role {
  font-size: .72rem;
  color: rgba(165,180,252,.65);
  margin-top: .1rem;
}
.sb-user-info { overflow: hidden; }

/* Nav-Links */
.sb-nav-link {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .75rem;
  border-radius: .6rem;
  color: rgba(255,255,255,.65); font-size: .85rem; text-decoration: none;
  transition: background .14s, color .14s;
  margin-bottom: .1rem;
}
.sb-nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Sprach-Buttons (Sidebar index.php) */
.sb-lang-group {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.sb-lang-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .52rem .75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: .6rem;
  color: rgba(255,255,255,.6);
  font-size: .86rem;
  cursor: pointer;
  text-align: left;
  transition: background .14s, color .14s, border-color .14s;
  line-height: 1.2;
}
.sb-lang-btn span:first-child { font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
.sb-lang-btn:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sb-lang-btn.is-active {
  background: rgba(99,102,241,.18);
  border-color: rgba(99,102,241,.35);
  color: #c7d2fe;
  font-weight: 600;
}

html[data-theme="light"] .sb-lang-btn { color: #475569; }
html[data-theme="light"] .sb-lang-btn:hover { background: rgba(0,0,0,.06); color: #1e293b; }
html[data-theme="light"] .sb-lang-btn.is-active {
  background: rgba(99,102,241,.08);
  border-color: rgba(99,102,241,.25);
  color: #4f46e5;
}

/* Draft-Status */
.sb-draft-status {
  display: block;
  font-size: .75rem;
  color: rgba(148,163,184,.55);
  min-height: 1.1em;
  padding: .1rem .2rem;
}

/* Trennlinie */
.sb-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: .5rem 0;
}

/* Light-Theme Anpassungen */
html[data-theme="light"] .sb-btn-primary { box-shadow: 0 3px 10px rgba(99,102,241,.3); }
html[data-theme="light"] .sb-btn-ghost {
  background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.09); color: #334155;
}
html[data-theme="light"] .sb-btn-ghost:hover { background: rgba(0,0,0,.08); color: #0f172a; }
html[data-theme="light"] .sb-btn-danger { border-color: rgba(220,38,38,.2); color: #dc2626; }
html[data-theme="light"] .sb-btn-danger:hover { background: rgba(220,38,38,.07); }
html[data-theme="light"] .sb-btn-login {
  background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.2); color: #6366f1;
}
html[data-theme="light"] .sb-user-card {
  background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08);
}
html[data-theme="light"] .sb-user-name { color: #1e293b; }
html[data-theme="light"] .sb-nav-link  { color: #475569; }
html[data-theme="light"] .sb-nav-link:hover { background: rgba(0,0,0,.06); color: #1e293b; }
html[data-theme="light"] .sb-divider   { background: rgba(0,0,0,.07); }
html[data-theme="light"] .lang-switch__name { color: rgba(0,0,0,.6); }

/* ── Ansprechpartner-Hinweis-Overlay ─────────────────────────────────────── */
.ansprechpartner-hint {
  display: inline-block;
  background: rgba(255, 248, 220, 0.92);
  border: 1.5px dashed #c8a400;
  border-radius: 8px;
  color: #7a6000;
  font-size: .78rem;
  font-style: italic;
  line-height: 1.4;
  padding: .45rem .8rem;
  text-align: center;
  max-width: 100%;
}

html[data-theme="dark"] .ansprechpartner-hint {
  background: rgba(60, 50, 0, 0.88);
  border-color: #a08000;
  color: #e8c840;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Modern Application Sidebar (bewerbung.php)
   ═══════════════════════════════════════════════════════════════════════════ */
body.sidebar-layout .app-sidebar.topbar {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(201, 168, 108, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #002147 0%, #001433 48%, #000d2b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 16px 0 48px rgba(0, 0, 0, 0.28);
}

body.sidebar-layout .app-sidebar .topbar__inner {
  display: flex;
  flex-direction: column;
  padding: 16px 14px 18px;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

body.sidebar-layout .app-sidebar .sb-brand-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body.sidebar-layout .app-sidebar .sb-brand {
  flex: 1;
  min-width: 0;
}

body.sidebar-layout .app-sidebar .topbar__logo {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
}

body.sidebar-layout .app-sidebar .topbar__titles h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #002147;
}

body.sidebar-layout .app-sidebar .sb-brand-tagline {
  margin: 2px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sb-accent-strong) !important;
  opacity: 1 !important;
}

body.sidebar-layout .app-sidebar .sb-collapse-btn {
  flex-shrink: 0;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(0, 33, 71, 0.12) !important;
  background: rgba(0, 33, 71, 0.05) !important;
  color: #002147 !important;
  box-shadow: none !important;
}

body.sidebar-layout .app-sidebar .sb-collapse-btn:hover {
  background: rgba(0, 33, 71, 0.1) !important;
  border-color: rgba(0, 33, 71, 0.2) !important;
}

body.sidebar-layout .app-sidebar .sb-collapse-icon {
  display: none;
}

body.sidebar-layout.sidebar-open .app-sidebar .sb-collapse-icon--open {
  display: inline-flex;
}

body.sidebar-layout .app-sidebar .topbar__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 2px 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

body.sidebar-layout .app-sidebar .topbar__actions::-webkit-scrollbar {
  width: 6px;
}

body.sidebar-layout .app-sidebar .topbar__actions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

@media (min-width: 901px) {
  body.sidebar-layout .app-sidebar .topbar__actions {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
}

body.sidebar-layout .app-sidebar .sb-applicant-tip {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 168, 108, 0.35);
  border-left: 3px solid var(--sb-accent);
}

body.sidebar-layout .app-sidebar .sb-applicant-tip p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

body.sidebar-layout .app-sidebar .sb-section {
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

body.sidebar-layout .app-sidebar .sb-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
  margin-bottom: 2px;
}

body.sidebar-layout .app-sidebar .sb-section__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--sb-accent);
  flex-shrink: 0;
}

body.sidebar-layout .app-sidebar .sb-btn-primary {
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4b87a 0%, var(--sb-accent-strong) 55%, #9a7a45 100%);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 6px 20px var(--sb-accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.sidebar-layout .app-sidebar .sb-btn-primary:hover {
  opacity: 1;
  filter: brightness(1.04);
  box-shadow: 0 8px 24px rgba(201, 168, 108, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.sidebar-layout .app-sidebar .sb-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 33, 71, 0.12);
  flex-shrink: 0;
}

body.sidebar-layout .app-sidebar .sb-btn-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.sidebar-layout .app-sidebar .sb-btn-label {
  line-height: 1.2;
}

body.sidebar-layout .app-sidebar .sb-btn-sub {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

body.sidebar-layout .app-sidebar .sb-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

body.sidebar-layout .app-sidebar .sb-btn-compact {
  margin-top: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.65rem 0.45rem;
  font-size: 0.72rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

body.sidebar-layout .app-sidebar .sb-btn-compact svg {
  opacity: 0.9;
}

body.sidebar-layout .app-sidebar .sb-btn-ghost {
  margin-top: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.sidebar-layout .app-sidebar .sb-btn-danger {
  margin-top: 6px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.06);
}

body.sidebar-layout .app-sidebar .sb-lang-group--tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.sidebar-layout .app-sidebar .sb-lang-group--tabs .sb-lang-btn {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.5rem 0.25rem;
  margin: 0;
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.65);
}

body.sidebar-layout .app-sidebar .sb-lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

body.sidebar-layout .app-sidebar .sb-lang-group--tabs .sb-lang-btn.is-active {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
  color: #002147;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.sidebar-layout .app-sidebar .sb-nav-link {
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
}

body.sidebar-layout .app-sidebar .sb-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

body.sidebar-layout .app-sidebar .sb-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.sidebar-layout .app-sidebar .sb-nav-link:hover .sb-nav-icon {
  background: rgba(201, 168, 108, 0.22);
}

body.sidebar-layout .app-sidebar .sb-user-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

body.sidebar-layout .app-sidebar .sb-user-avatar {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sb-accent), #8b6914);
  box-shadow: 0 4px 12px var(--sb-accent-glow);
}

body.sidebar-layout .app-sidebar .sb-btn-login {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(201, 168, 108, 0.35);
  color: #f8fafc;
}

body.sidebar-layout .app-sidebar .sb-btn-login:hover {
  background: rgba(201, 168, 108, 0.18);
  border-color: rgba(201, 168, 108, 0.55);
  color: #fff;
}

body.sidebar-layout .app-sidebar .sb-guest-hint {
  color: rgba(255, 255, 255, 0.45);
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.sidebar-layout .app-sidebar .sb-footer {
  margin-top: auto;
  padding: 14px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

body.sidebar-layout .app-sidebar .sb-footer-brand {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

body.sidebar-layout .app-sidebar .sb-footer-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: rgba(201, 168, 108, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.sidebar-layout .sidebar-fab {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, #002147, #001433);
  color: var(--sb-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.sidebar-layout .sidebar-fab:hover {
  filter: brightness(1.08);
  color: #e8d4a8;
}

body.sidebar-layout .sidebar-overlay-mobile.visible {
  backdrop-filter: blur(3px);
}
