/* Simutrain Registration – CI Design System */

:root {
  color-scheme: light;
  --navy: #CC0000;
  --green: #3BBB81;
  --green-light: rgba(59, 187, 129, 0.1);
  --light-blue: #EFF7FF;
  --white: #FFFFFF;
  --light: #F2F2F2;
  --border: #E0E9F1;
  --text: #1a1a1a;
  --text-secondary: #54657A;
  --red: #E31E24;
  --shadow: 0 2px 8px rgba(4, 52, 96, 0.08);
  --shadow-lg: 0 8px 32px rgba(4, 52, 96, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --transition: 0.2s ease;
}

/* Dozenten-App (Kiosk, nach Login): --navy wieder auf das alte, sanfte CI-Blau
   statt des aggressiven Rots. Wirkt nur innerhalb #app (gesamte Dozenten-Oberfläche);
   der Admin hat kein #app und bleibt CI-Rot. Fehler bleiben --red (rot). */
#app { --navy: #043460; }

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

body {
  font-family: var(--font);
  background: var(--light-blue);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Layout --- */
.app { min-height: 100vh; min-height: 100dvh; }

.screen { display: none; height: 100vh; height: 100dvh; overflow-y: auto; }
.screen.active { display: flex; flex-direction: column; }

/* --- Header --- */
.header {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  height: 40px;
  object-fit: contain;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--light); }

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
}

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

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-light);
}

.form-input.error {
  border-color: var(--red);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23043460' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* --- PIN Screen --- */
.pin-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Exakt das alte CI-Blau (vor 54b3fbc), NUR die Dozenten-Login-Seite (Rest bleibt CI-Rot). */
  background: linear-gradient(135deg, #043460 0%, #065A9E 100%);
}
/* Login-spezifische Blau-Akzente (überschreiben das rote --navy nur hier) */
.pin-screen .pin-title { color: #043460; }
.pin-screen .btn-primary { background: #043460; }
.pin-screen .btn-primary:hover { background: #065A9E; }

.pin-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.pin-logo {
  height: 48px;
  margin-bottom: 24px;
}

.pin-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.pin-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.pin-dot.filled {
  background: var(--green);
  border-color: var(--green);
}

.pin-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  font-family: var(--font);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.pin-key:hover { background: var(--light-blue); }
.pin-key:active { background: var(--green-light); transform: scale(0.95); }
.pin-key.empty { border: none; cursor: default; }
.pin-key.backspace { font-size: 20px; }

.pin-error {
  color: var(--red);
  font-size: 14px;
  margin-top: 16px;
  min-height: 20px;
}

/* --- Seminar List --- */
.seminar-list {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.seminar-date-group {
  margin-bottom: 24px;
}

.seminar-date-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.seminar-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 4px solid var(--green);
}

.seminar-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.seminar-card.closed {
  border-left-color: var(--text-secondary);
  opacity: 0.6;
}

.seminar-info { flex: 1; }

.seminar-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.seminar-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.seminar-badge {
  background: var(--green-light);
  color: var(--green);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.seminar-badge.full {
  background: rgba(227, 30, 36, 0.1);
  color: var(--red);
}

/* --- Kiosk Mode (Participant Form) --- */
.kiosk-screen {
  background:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(59, 187, 129, 0.18), transparent 65%),
    radial-gradient(ellipse 700px 500px at 110% 110%, rgba(4, 52, 96, 0.12), transparent 60%),
    linear-gradient(180deg, #F5FAFF 0%, #EFF7FF 100%);
}

.kiosk-header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(4, 52, 96, 0.15);
}

.kiosk-header-title {
  font-size: 16px;
  font-weight: 600;
}

.kiosk-header-count {
  font-size: 13px;
  opacity: 0.85;
  background: rgba(255,255,255,0.12);
  padding: 4px 12px;
  border-radius: 20px;
}

.kiosk-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 100px;
}

.kiosk-welcome {
  text-align: center;
  padding: 32px 24px;
  max-width: 560px;
  margin: 0 auto;
  animation: kioskFadeIn 0.5s ease;
}

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

.kiosk-welcome h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.kiosk-welcome p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.55;
}

.kiosk-hero-logo {
  height: 56px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(4, 52, 96, 0.15));
}

.kiosk-welcome-card {
  background: var(--white);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 10px 40px rgba(4, 52, 96, 0.08), 0 2px 6px rgba(4, 52, 96, 0.04);
  margin-bottom: 20px;
  text-align: left;
}

.kiosk-seminar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 8px;
}

.kiosk-seminar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.kiosk-seminar-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kiosk-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 24px;
}

.kiosk-step {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(4, 52, 96, 0.05);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.kiosk-step-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.kiosk-cta {
  width: 100%;
  font-size: 22px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #43cc8e 0%, #2a9d6a 100%);
  color: var(--white);
  border: none;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 187, 129, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: kiosk-cta-pulse 2s ease-in-out infinite;
}

@keyframes kiosk-cta-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(59, 187, 129, 0.45); }
  50% { box-shadow: 0 8px 34px rgba(59, 187, 129, 0.85); }
}

.kiosk-cta:hover, .kiosk-cta:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 38px rgba(59, 187, 129, 0.6);
}

.kiosk-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(59, 187, 129, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .kiosk-cta { animation: none; }
}

.kiosk-cta svg { width: 22px; height: 22px; }

.kiosk-form {
  max-width: 640px;
  margin: 0 auto;
  animation: kioskFadeIn 0.4s ease;
}

.kiosk-form-title {
  text-align: center;
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.kiosk-form-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}

.kiosk-form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow: 0 10px 40px rgba(4, 52, 96, 0.08), 0 2px 6px rgba(4, 52, 96, 0.04);
  margin-bottom: 16px;
}

.kiosk-form-card .form-group {
  margin-bottom: 18px;
}

.kiosk-form-card .form-group:last-child {
  margin-bottom: 0;
}

.kiosk-form-card .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.kiosk-form-card .form-input {
  font-size: 17px;
  padding: 14px 16px;
  border-radius: 12px;
  border-width: 1.5px;
  background: #FAFCFF;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.kiosk-form-card .form-input:hover:not(:focus):not([readonly]) {
  border-color: #c8d5e3;
}

.kiosk-form-card .form-input:focus {
  background: var(--white);
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-light);
}

.kiosk-form-card .form-input[readonly] {
  background: #F2F6FB;
  color: var(--text-secondary);
}

.kiosk-form-card select.form-input {
  cursor: pointer;
}

/* Zwei-Spalten-Paare im Teilnehmerdatenblatt — NUR Optik, gleiche Felder/Logik.
   Texte/Hinweis-Boxen bleiben unverändert (über renderField). */
.kiosk-grid2 { display: flex; gap: 12px; align-items: flex-start; }
.kiosk-grid2 > .form-group { flex: 1; min-width: 0; }
.kiosk-grid-31 > .form-group:first-child { flex: 3; }
.kiosk-grid-31 > .form-group:last-child  { flex: 1; }
.kiosk-grid-12 > .form-group:first-child { flex: 1; }
.kiosk-grid-12 > .form-group:last-child  { flex: 2; }
@media (max-width: 360px) { .kiosk-grid2 { flex-direction: column; gap: 0; } }

.kiosk-signature-card {
  background: var(--white);
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 10px 40px rgba(4, 52, 96, 0.08), 0 2px 6px rgba(4, 52, 96, 0.04);
  margin-bottom: 20px;
}

.kiosk-signature-card .form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.kiosk-signature-card .signature-area {
  background: linear-gradient(180deg, #FAFCFF 0%, #F2F6FB 100%);
  border: 1.5px dashed #c8d5e3;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kiosk-signature-card .signature-area.has-signature {
  border-style: solid;
  border-color: var(--green);
  background: var(--white);
}

.kiosk-signature-card .signature-canvas {
  background: transparent;
  border: none;
  height: 180px;
}

.kiosk-signature-card .signature-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.kiosk-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.kiosk-form-actions .btn-cancel {
  flex: 0 0 auto;
  padding: 16px 22px;
  font-size: 15px;
  background: var(--white);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kiosk-form-actions .btn-cancel:hover {
  border-color: #c8d5e3;
  color: var(--text);
}

.kiosk-form-actions .btn-submit {
  flex: 1;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--green) 0%, #2fa06f 100%);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(59, 187, 129, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.kiosk-form-actions .btn-submit:hover:not(:disabled),
.kiosk-form-actions .btn-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(59, 187, 129, 0.4);
}

.kiosk-form-actions .btn-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(59, 187, 129, 0.3);
}

.kiosk-form-actions .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.kiosk-form-actions .btn-submit svg { width: 18px; height: 18px; }

.kiosk-form .field-error {
  font-size: 13px;
  color: var(--red);
  margin-top: 6px;
  font-weight: 500;
}

.kiosk-form .form-input {
  font-size: 17px;
  padding: 14px 16px;
}

/* --- Signature --- */
.signature-area {
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.signature-canvas {
  width: 100%;
  height: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  touch-action: none;
  cursor: crosshair;
  background: var(--white);
}

.signature-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

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

/* --- Kiosk Footer --- */
.kiosk-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
}

.kiosk-footer .btn {
  width: 100%;
  max-width: 400px;
  justify-content: center;
}

/* --- Exit PIN overlay --- */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 52, 96, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* --- Admin --- */
.admin-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  color: var(--text);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.admin-header-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.admin-header-title span { color: var(--text-secondary) !important; opacity: 1 !important; }

.admin-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.admin-menu-btn:hover { background: rgba(0,0,0,0.05); }

.admin-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
}
.admin-menu-overlay.open { display: block; }

.admin-menu {
  position: fixed;
  top: 0; left: 0;
  width: 240px;
  height: 100%;
  background: var(--white);
  z-index: 300;
  padding: 0 0 16px;
  transition: left 0.25s ease;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 4px rgba(0,0,0,0.04);
}

.admin-sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  text-align: left;
}
.admin-sidebar-logo h2 {
  color: var(--red);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.admin-sidebar-logo .sidebar-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-nav-item {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
}
.admin-nav-item svg { flex-shrink: 0; opacity: 0.5; color: var(--text-secondary); }

.admin-nav-item:hover { color: var(--red); background: #fef0f0; }
.admin-nav-item:hover svg { opacity: 1; color: var(--red); }
.admin-nav-item.active { color: var(--red); background: #fce4e4; border-left: 3px solid var(--red); font-weight: 600; }
.admin-nav-item.active svg { opacity: 1; color: var(--red); }

.nav-group { margin-top: 4px; }
.nav-group-toggle {
  padding: 12px 20px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  user-select: none;
  opacity: 0.6;
}
.nav-group-toggle:hover { opacity: 1; }
.nav-group-toggle svg { flex-shrink: 0; opacity: 0.5; }
.nav-chevron {
  margin-left: auto;
  font-size: 16px;
  transition: transform 0.2s;
  opacity: 0.5;
}
.nav-group.open .nav-chevron { transform: rotate(90deg); }
.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav-group.open .nav-group-items { max-height: 800px; }
.nav-group-items .admin-nav-item { padding-left: 36px; font-size: 13px; }

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.admin-main-wrap {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.admin-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

.admin-header a { color: var(--text-secondary) !important; }
.admin-header button { color: var(--text-secondary) !important; border-color: var(--border) !important; }

/* --- Tables --- */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--light);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

tr:hover td { background: var(--light-blue); }

/* --- Sync Status --- */
.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.sync-dot.offline { background: var(--red); }
.sync-dot.pending { background: #FFB800; }

/* --- Success animation --- */
.success-check {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 12px 40px rgba(59, 187, 129, 0.35);
}

.success-check::before,
.success-check::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  animation: successRing 1.4s ease-out forwards;
}
.success-check::after { animation-delay: 0.25s; }

@keyframes successRing {
  0%   { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.5); }
}

.success-check svg { width: 52px; height: 52px; color: var(--white); stroke-width: 3.5; }

@keyframes pop {
  0% { transform: scale(0) rotate(-20deg); }
  60% { transform: scale(1.12) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  animation: fadeUp 0.3s ease;
  transition: bottom 0.25s ease;
  max-width: calc(100vw - 32px);
}

.toast.error { background: var(--red); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .header { padding: 12px 16px; }
  .header-logo { height: 32px; }
  .header-title { font-size: 15px; }
  .seminar-list { padding: 16px; }
  .seminar-meta { flex-direction: column; gap: 4px; }
  .kiosk-body { padding: 16px; padding-bottom: 100px; }
  .kiosk-welcome { padding: 16px 8px; }
  .kiosk-welcome h2 { font-size: 26px; }
  .kiosk-hero-logo { height: 44px; margin-bottom: 16px; }
  .kiosk-welcome-card { padding: 20px 18px; }
  .kiosk-step { padding: 10px 6px; font-size: 13px; }
  .kiosk-step-icon { font-size: 20px; }
  .kiosk-cta { font-size: 19px; padding: 18px 22px; }
  .kiosk-form .form-input { font-size: 16px; }

  /* Sidebar auf Mobile: wieder Slide-Out */
  .admin-menu { left: -280px; }
  .admin-menu.open { left: 0; }
  .admin-menu-btn { display: block; }
  .admin-menu-overlay.open { display: block; }
  .admin-main-wrap { margin-left: 0; }

  .admin-content { padding: 12px; overflow: visible; width: -webkit-fit-content; width: fit-content; min-width: 100%; }
  .admin-main-wrap { flex: 0 0 auto; width: -webkit-fit-content; width: fit-content; min-width: 100%; } /* Seite zusammenhängend so breit wie die breiteste Tabelle; flex:1 hätte Basis 0 */
  .admin-title { font-size: 20px; margin-bottom: 16px; }

  /* Tabellen auf Mobile (Daniel 21.10.2026, wie HiOrg): nicht der Kasten scrollt, die ganze Seite wird breiter und
     schiebt seitlich. Kästen wachsen mit ihrer breitesten Tabelle (fit-content), sonst bleiben sie schirmbreit. */
  .table-wrap { margin: 0 -12px; border-radius: 0; overflow-x: visible; width: -webkit-fit-content; width: fit-content; min-width: 100%; }
  .admin-content div:has(> table), .admin-content div[style*="overflow-x:auto"]:has(table), .admin-content div[style*="overflow-x: auto"]:has(table) { overflow-x: visible !important; width: -webkit-fit-content; width: fit-content; min-width: 100%; } /* !important: Inline-Wrapper style="overflow-x:auto" */
  table { min-width: 600px; }
  th, td { padding: 10px 12px; font-size: 13px; white-space: nowrap; }

  /* Buttons kompakter */
  .admin-content .btn { font-size: 13px; padding: 8px 14px; }

  /* Formulare */
  .admin-content .card { padding: 16px; }

  /* === MOBILE-FIX v33: alles passt aufs Geraet, nichts wird abgeschnitten === */
  /* 1) ALLE mehrspaltigen Inline-Grids -> eine Spalte (nicht nur 1fr 1fr) */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* 2) Feste/Max-Pixelbreiten (Modals, Boxen, Bilder) nie breiter als der Schirm */
  [style*="px"][style*="width"] { max-width: 100% !important; }
  img, canvas, video, svg { max-width: 100%; height: auto; }
  /* 3) Flex-Reihen umbrechen statt rauszuragen (ausser explizite Spalten) */
  .admin-content [style*="display:flex"]:not([style*="column"]),
  .admin-content [style*="display: flex"]:not([style*="column"]) { flex-wrap: wrap; }
  /* 4) Karten mit sehr breitem Inhalt wachsen mit (die Seite schiebt seitlich, siehe .table-wrap oben) */
  .admin-content .card { overflow-x: visible; width: -webkit-fit-content; width: fit-content; min-width: 100%; }
  /* 5) Modal-Boxen: passen in Breite UND Hoehe, innen scrollbar */
  [style*="position:fixed"] > div, [style*="position: fixed"] > div { max-width: 96vw !important; }
  [style*="position:fixed"] [style*="max-height"], [style*="position: fixed"] [style*="max-height"] { max-height: 88vh !important; }

  /* Seminar-Detail scrollbar */
  .admin-content table { min-width: auto; }
  .admin-content table td input { min-width: 200px; }

}

/* === Seminarliste (Daniel 20.09.2026: größere Tipp-/Klick-Flächen GENERELL, nicht nur auf dem
   Handy — die Basiswerte in admin.html tragen die großen Maße direkt, hier nur noch der
   Zeilenabstand, unabhängig von der Bildschirmbreite). === */
.seminar-liste td { padding: 10px 8px; }

/* === iPad / Tablet: 3-4-Spalten-Grids auf 2 Spalten === */
@media (min-width: 769px) and (max-width: 1024px) {
  [style*="grid-template-columns: repeat(3"], [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(4"], [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(5"], [style*="grid-template-columns:repeat(5"] { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 375px) {
  .pin-card { padding: 32px 24px; }
  .pin-key { width: 60px; height: 60px; font-size: 24px; }
}

/* --- Certificate Template Editor (Canva-like) --- */
.ce-wrap { position: relative; }
.ce-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 8px; margin-bottom: 6px; gap: 6px; flex-wrap: wrap;
}
.ce-topbar-left, .ce-topbar-right { display: flex; align-items: center; gap: 6px; }
.ce-topbar-center { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ce-toolbar-group { display: flex; align-items: center; gap: 2px; }
.ce-toolbar-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; flex-shrink: 0; }
.ce-name-input {
  border: 1px solid #e2e8f0; border-radius: 6px; padding: 5px 8px;
  font-size: 13px; font-weight: 600; width: 160px;
}
.ce-name-input:focus { border-color: #454549; outline: none; }

/* Settings bar */
.ce-settings-bar {
  display: flex; gap: 10px; align-items: center; padding: 4px 10px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  margin-bottom: 6px; flex-wrap: wrap; font-size: 12px;
}
.ce-setting { display: flex; align-items: center; gap: 4px; color: #64748b; }
.ce-setting label { font-weight: 500; white-space: nowrap; }

/* Main area: Canvas center, panels as overlays/drawers */
.ce-main {
  position: relative;
  border: 1px solid #e2e8f0; border-radius: 8px;
  overflow: hidden; background: #f1f5f9;
}
/* Canvas */
.ce-canvas-wrap {
  width: 100%; height: 100%; overflow: auto;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: #e8ecf1;
}
.ce-canvas-wrap .konvajs-content {
  box-shadow: 0 2px 20px rgba(0,0,0,0.15); border-radius: 2px;
}

/* Left panel (drawer) */
.ce-panel-left {
  position: absolute; top: 0; left: 0; bottom: 0; width: 250px;
  background: #fff; border-right: 1px solid #e2e8f0;
  overflow-y: auto; z-index: 10; transform: translateX(-100%);
  transition: transform 0.2s ease;
}
.ce-panel-left.open { transform: translateX(0); }

/* Right panel (drawer) */
.ce-panel-right {
  position: absolute; top: 0; right: 0; bottom: 0; width: 260px;
  background: #fff; border-left: 1px solid #e2e8f0;
  overflow-y: auto; z-index: 10; transform: translateX(100%);
  transition: transform 0.2s ease;
}
.ce-panel-right.open { transform: translateX(0); }

/* Panel toggle buttons */
.ce-panel-toggle {
  position: absolute; top: 8px; z-index: 11;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600;
  color: #475569; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.15s;
}
.ce-panel-toggle:hover { background: #f1f5f9; }
.ce-panel-toggle.active { background: #eff6ff; color: #454549; border-color: #93c5fd; }
.ce-toggle-left { left: 8px; }
.ce-toggle-right { right: 8px; }

/* Sidebar sections */
.ce-sidebar-section { border-bottom: 1px solid #f1f5f9; }
.ce-sidebar-section.collapsed .ce-section-body { display: none; }
.ce-sidebar-section.collapsed .ce-chevron { transform: rotate(-90deg); }
.ce-section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; cursor: pointer; font-size: 12px; font-weight: 600;
  color: #475569; user-select: none;
}
.ce-section-header:hover { background: #f8fafc; }
.ce-section-header span { display: flex; align-items: center; gap: 5px; }
.ce-chevron { font-size: 9px; transition: transform 0.2s; color: #94a3b8; }
.ce-section-body { padding: 6px 10px 10px; }

.ce-add-btn {
  display: flex; align-items: center; gap: 5px; width: 100%;
  padding: 6px 8px; border: 1px dashed #cbd5e1; border-radius: 5px;
  background: #f8fafc; color: #475569; font-size: 12px; cursor: pointer;
  transition: all 0.15s; text-align: left;
}
.ce-add-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #454549; }

.ce-field-chip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px; font-size: 12px; cursor: pointer; border-radius: 4px;
  transition: background 0.15s; color: #334155;
}
.ce-field-chip:hover { background: #eff6ff; color: #454549; }
.ce-chip-add { color: #94a3b8; font-weight: 600; font-size: 14px; }
.ce-field-chip:hover .ce-chip-add { color: #454549; }

.ce-divider { height: 1px; background: #f1f5f9; margin: 6px 0; }

.ce-shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ce-shape-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border: 1px solid #e2e8f0; border-radius: 5px;
  background: #fff; cursor: pointer; color: #475569; transition: all 0.15s;
}
.ce-shape-btn:hover { background: #eff6ff; border-color: #93c5fd; color: #454549; }

.ce-gallery-item {
  display: inline-block; width: 48px; height: 48px; margin: 2px;
  border: 1px solid #e2e8f0; border-radius: 5px; overflow: hidden;
  cursor: pointer;
}
.ce-gallery-item:hover { border-color: #454549; }

/* Properties panel */
.ce-props-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 150px; text-align: center; padding: 16px;
}
.ce-props-section { padding: 10px; border-bottom: 1px solid #f1f5f9; }
.ce-props-section h4 { margin: 0; font-size: 13px; color: #1e293b; font-weight: 600; }
.ce-props-section h5 { margin: 0 0 6px; font-size: 10px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ce-props-header { display: flex; justify-content: space-between; align-items: center; }
.ce-props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ce-prop-field { display: flex; flex-direction: column; gap: 2px; }
.ce-prop-field label { font-size: 10px; color: #64748b; font-weight: 500; }
.ce-prop-field input, .ce-prop-field select, .ce-prop-input {
  border: 1px solid #e2e8f0; border-radius: 4px; padding: 4px 6px;
  font-size: 12px; background: #fff; width: 100%; box-sizing: border-box;
}
.ce-prop-field input:focus, .ce-prop-field select:focus, .ce-prop-input:focus { border-color: #454549; outline: none; }
.ce-prop-field textarea { border: 1px solid #e2e8f0; border-radius: 4px; padding: 4px 6px; font-size: 12px; resize: vertical; width: 100%; box-sizing: border-box; }

/* Buttons */
.ce-btn-primary {
  background: #454549; color: #fff; border: none; padding: 6px 14px;
  border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ce-btn-primary:hover { background: #454549; }
.ce-btn-secondary {
  background: #fff; color: #475569; border: 1px solid #e2e8f0;
  padding: 6px 12px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.ce-btn-secondary:hover { background: #f8fafc; }
.ce-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: none; border-radius: 5px;
  background: transparent; cursor: pointer; color: #64748b;
}
.ce-icon-btn:hover { background: #f1f5f9; color: #334155; }
.ce-icon-btn.active { background: #eff6ff; color: #454549; }
.ce-icon-btn.ce-btn-danger:hover { background: #fef2f2; color: #ef4444; }
.ce-btn-sm {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border: 1px solid #e2e8f0; border-radius: 4px;
  background: #fff; font-size: 11px; cursor: pointer; color: #475569;
}
.ce-btn-sm.ce-btn-danger { border-color: #fecaca; color: #ef4444; }

.ce-btn-row { display: flex; gap: 2px; flex-wrap: wrap; }
.ce-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 1px solid #e2e8f0; border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 12px; color: #475569;
}
.ce-toggle-btn:hover { background: #f1f5f9; }
.ce-toggle-btn.active { background: #eff6ff; border-color: #93c5fd; color: #454549; }

/* Layer items */
.ce-layer-item {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 6px; font-size: 12px; cursor: pointer; border-radius: 4px;
}
.ce-layer-item:hover { background: #f1f5f9; }
.ce-layer-item.selected { background: #dbeafe; color: #454549; }
.ce-layer-icon { font-size: 11px; color: #94a3b8; width: 14px; text-align: center; }
.ce-layer-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========================================================================
   Admin Modernization Layer  —  E (alle Optionen)
   • mehr Whitespace + größere Typo
   • Card-Layout statt nackte Tabellen
   • moderne Buttons / Inputs (Kiosk-Niveau)
   • Sidebar + Dashboard-Karten aufgewertet
   ======================================================================== */

:root {
  --admin-bg: #F5F8FC;
  --admin-surface: #FFFFFF;
  --admin-border-soft: #E6EDF4;
  --admin-shadow-card: 0 1px 2px rgba(4,52,96,0.04), 0 8px 24px rgba(4,52,96,0.06);
  --admin-shadow-hover: 0 2px 4px rgba(4,52,96,0.05), 0 14px 36px rgba(4,52,96,0.10);
  --admin-radius: 16px;
  --admin-radius-sm: 10px;
}

/* Layout-Background */
body.admin-body { background: var(--admin-bg); }

/* --- Header --- */
.admin-layout .admin-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  padding: 16px 32px;
  border-bottom: 1px solid var(--admin-border-soft);
  box-shadow: 0 1px 0 rgba(4,52,96,0.02);
}
.admin-layout .admin-header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --- Sidebar --- */
.admin-layout .admin-menu {
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border-soft);
  box-shadow: 1px 0 0 rgba(4,52,96,0.02);
  width: 256px;
  padding: 12px 0 24px;
}
.admin-layout .admin-sidebar-logo {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--admin-border-soft);
  margin-bottom: 12px;
  text-align: left;
}
.admin-layout .admin-sidebar-logo h2 {
  font-size: 18px;
  letter-spacing: -0.01em;
}
.admin-layout .admin-sidebar-logo .sidebar-sub {
  font-size: 12px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.admin-layout .admin-nav-item {
  position: relative;
  margin: 2px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: none !important;
  font-size: 14px;
  font-weight: 500;
  color: #4A5568;
  transition: all 0.18s ease;
}
.admin-layout .admin-nav-item svg { color: #94a3b8 !important; opacity: 0.9 !important; }
.admin-layout .admin-nav-item:hover {
  background: #FEF2F2;
  color: var(--red);
  transform: translateX(2px);
}
.admin-layout .admin-nav-item:hover svg { color: var(--red) !important; opacity: 1 !important; }
.admin-layout .admin-nav-item.active {
  background: linear-gradient(135deg, var(--red) 0%, #c91a1f 100%);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(227,30,36,0.25);
  border-left: none !important;
  transform: none;
}
.admin-layout .admin-nav-item.active svg { color: var(--white) !important; opacity: 1 !important; }
.admin-layout .admin-nav-item.active:hover { transform: none; background: linear-gradient(135deg, #d91920 0%, #b81519 100%); }

.admin-layout .nav-group-toggle {
  padding: 18px 24px 6px;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #94a3b8;
  opacity: 1;
  font-weight: 700;
}

/* --- Cards --- */
.admin-layout .card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 24px;
  box-shadow: var(--admin-shadow-card);
  border: 1px solid var(--admin-border-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.admin-layout .card:hover { box-shadow: var(--admin-shadow-hover); }

/* --- Tables: Card-Container + Hover-Highlight --- */
.admin-layout .table-wrap {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 8px;
  box-shadow: var(--admin-shadow-card);
  border: 1px solid var(--admin-border-soft);
  overflow-x: auto;
}
.admin-layout .table-wrap > table,
.admin-layout table.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.admin-layout .table-wrap th, .admin-layout table.admin-table th {
  background: #F8FAFC;
  color: #64748b;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border-soft);
  position: sticky;
  top: 0;
}
.admin-layout .table-wrap th:first-child, .admin-layout table.admin-table th:first-child { border-top-left-radius: 10px; }
.admin-layout .table-wrap th:last-child, .admin-layout table.admin-table th:last-child { border-top-right-radius: 10px; }
.admin-layout .table-wrap td, .admin-layout table.admin-table td {
  padding: 14px 14px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: middle;
}
.admin-layout .table-wrap tr:last-child td, .admin-layout table.admin-table tr:last-child td { border-bottom: none; }
.admin-layout .table-wrap tbody tr:hover, .admin-layout table.admin-table tbody tr:hover { background: #F8FAFC; }

/* --- Buttons: Kiosk-Niveau --- */
.admin-layout .btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-layout .btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, #0a4e8f 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(4,52,96,0.18);
}
.admin-layout .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(4,52,96,0.28);
  opacity: 1;
}
.admin-layout .btn-primary:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(4,52,96,0.18); }

.admin-layout .btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--admin-border-soft);
  box-shadow: 0 1px 2px rgba(4,52,96,0.04);
}
.admin-layout .btn-secondary:hover {
  background: #F8FAFC;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(4,52,96,0.08);
}

.admin-layout .btn-danger {
  background: linear-gradient(135deg, var(--red) 0%, #c91a1f 100%);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(227,30,36,0.22);
}
.admin-layout .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(227,30,36,0.32);
}

.admin-layout .btn:disabled, .admin-layout .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* --- Form Inputs --- */
.admin-layout .form-input {
  background: var(--white);
  border: 1px solid var(--admin-border-soft);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.admin-layout .form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(4,52,96,0.10);
}
.admin-layout .form-input::placeholder { color: #94a3b8; }
.admin-layout .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.01em;
}

/* --- Tab-Navigation in Seminar-Detail --- */
.admin-layout .sem-tab-btn {
  font-family: var(--font);
  border-radius: 10px 10px 0 0 !important;
  padding: 12px 20px !important;
  font-size: 14px !important;
}
.admin-layout .sem-tab-btn:hover { background: #F8FAFC !important; }

/* --- Dashboard-Karten (Stat-Cards) --- */
.admin-layout .stat-card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 22px 24px;
  box-shadow: var(--admin-shadow-card);
  border: 1px solid var(--admin-border-soft);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-layout .stat-card:hover { transform: translateY(-2px); box-shadow: var(--admin-shadow-hover); }
.admin-layout .stat-card-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.admin-layout .stat-card-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.1;
}
.admin-layout .stat-card-sub { font-size: 13px; color: #64748b; }

/* --- Banners & States --- */
.admin-layout #banner-area .banner {
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* --- Modal-Dialoge (siehe overlay-Patterns) --- */
.admin-layout [style*="position:fixed"][style*="background:rgba(0,0,0,0.5"] > div {
  border-radius: var(--admin-radius) !important;
  box-shadow: 0 24px 64px rgba(4,52,96,0.20), 0 0 0 1px rgba(4,52,96,0.04) !important;
}

/* --- Filter-Pills / Inline-Selects (Cert-Menü) --- */
.admin-layout select.form-input { padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%2364748b' stroke-width='2' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }

/* --- Allgemeine Spacing-Anhebung im Admin-Content --- */
.admin-layout #admin-content { padding: 28px 32px; }
.admin-layout #admin-content > .card,
.admin-layout #admin-content > div > .card { margin-bottom: 20px; }

/* Mobile: Sidebar als Drawer wie gehabt — nur Spacing leicht anpassen */
@media (max-width: 900px) {
  .admin-layout #admin-content { padding: 16px; }
  .admin-layout .admin-header { padding: 12px 16px; }
  .admin-layout .admin-header-title { font-size: 16px; }
}

/* ========================================================================
   Admin Modernization v2 — globale Aufwertung für ALLE Views
   ======================================================================== */

/* Page-Title / Section-Headers */
.admin-layout #admin-content h1, .admin-layout .admin-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
  margin: 0 0 24px;
}
.admin-layout #admin-content h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 28px 0 14px;
}
.admin-layout #admin-content h3 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 14px;
}
/* H3 INSIDE einer card → eher Section-Label */
.admin-layout .card h3:first-child { margin-top: 0; }

/* Inputs/Selects/Textareas die KEINE form-input Klasse haben → schick */
.admin-layout #admin-content input:not([type="checkbox"]):not([type="radio"]):not(.form-input),
.admin-layout #admin-content select:not(.form-input),
.admin-layout #admin-content textarea:not(.form-input) {
  background: var(--white);
  border: 1px solid var(--admin-border-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-layout #admin-content input:not([type="checkbox"]):not([type="radio"]):not(.form-input):focus,
.admin-layout #admin-content select:not(.form-input):focus,
.admin-layout #admin-content textarea:not(.form-input):focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(4,52,96,0.10);
}
.admin-layout #admin-content select:not(.form-input) {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%2364748b' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Tabellen ohne .table-wrap Wrapper → trotzdem schick */
.admin-layout #admin-content table:not(.no-style) {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--admin-shadow-card);
  border: 1px solid var(--admin-border-soft);
  margin-bottom: 16px;
}
.admin-layout #admin-content table:not(.no-style) th {
  background: #F8FAFC;
  color: #64748b;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border-soft);
}
.admin-layout #admin-content table:not(.no-style) td {
  padding: 14px 14px;
  border-bottom: 1px solid #F0F4F8;
  vertical-align: middle;
}
.admin-layout #admin-content table:not(.no-style) tr:last-child td { border-bottom: none; }
.admin-layout #admin-content table:not(.no-style) tbody tr:hover { background: #F8FAFC; }

/* Wenn Tabelle SCHON in .table-wrap drin ist, doppelte Card-Wrapper vermeiden */
.admin-layout .table-wrap table {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  margin-bottom: 0 !important;
}

/* Inline-Filter-Bars (display:flex mit gap, ohne Card-Wrapper) → automatisch in Card hüllen */
.admin-layout .filter-bar, .admin-layout .toolbar {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border-soft);
  border-radius: var(--admin-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--admin-shadow-card);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Folder-Cards (Archiv-Übersicht, Jahres-Drill-down) — größer, runder */
.admin-layout .folder-card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 24px;
  box-shadow: var(--admin-shadow-card);
  border: 1px solid var(--admin-border-soft);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.admin-layout .folder-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow-hover);
}

/* Empty-States — prominenter */
.admin-layout .empty-state, .admin-layout p.empty {
  text-align: center;
  padding: 32px 24px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

/* Form-Group — etwas mehr Luft */
.admin-layout .form-group { margin-bottom: 16px; }
.admin-layout .form-group label, .admin-layout .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: 6px;
}

/* Modal-Dialoge: konsistente Headlines */
.admin-layout [style*="position:fixed"][style*="background:rgba(0,0,0,0.5"] h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 0 0 16px;
  text-transform: none;
}

/* Banner-Bereich */
.admin-layout #banner-area {
  position: sticky;
  top: 60px;
  z-index: 50;
}

/* Section-Trenner zwischen 2 Inhaltsblöcken */
.admin-layout .section-divider {
  height: 1px;
  background: var(--admin-border-soft);
  margin: 28px 0;
}

/* Sidebar-Trennlinie zwischen Gruppen optisch sauber */
.admin-layout .nav-group {
  border-top: 1px solid var(--admin-border-soft);
  padding-top: 6px;
  margin-top: 12px;
}
.admin-layout .nav-group:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }

/* Action-Bar unten unter Tabellen (z.B. „Genehmigen / Ablehnen"-Button-Reihe) */
.admin-layout .action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border-soft);
}

/* --------------------------------------------------------------
 * Dozent-PWA Lesbarkeit: ehrliche Basis-Schriftgroesse statt zoom-Hack.
 * Frueher stand hier `zoom: 1.06`, was alles ~6 % hochskalierte, aber die
 * Signatur-Canvas-Mathematik (getBoundingClientRect x dpr) verkomplizierte.
 * Jetzt: Basis 17px statt Browser-Default 16px + gezielt angehobene
 * Komponenten-Schriftgroessen kompensieren die 6 % ehrlich.
 * Wirkt nur in der Dozent-Oberflaeche (#app), Admin (admin.html) bleibt
 * unveraendert da dort #app nicht existiert.
 * -------------------------------------------------------------- */
#app {
  font-size: 17px;
}

/* Ehrliche 6%-Kompensation NUR fuer die Dozent-Oberflaeche (#app-scoped,
 * damit die mit admin.html geteilten Basisklassen unveraendert bleiben).
 * Ersetzt das frueher per zoom:1.06 erzeugte Hochskalieren der wichtigsten
 * Lese- und Bedienflaechen. */
#app .btn { font-size: 16px; }
#app .form-input { font-size: 17px; }
#app .seminar-meta { font-size: 14px; }
#app .form-label { font-size: 14px; }

/* Dozenten-Übersicht: Reiter "Seminar" / "Infos" */
.dozent-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dozent-tab.active {
  background: var(--white, #fff);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* iPad-Touch: unsichtbare Hit-Area für kleine Bedienelemente (min. 44x44px) */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* --- Audit-Fix 06/2026: Admin-Header auf Mobile umbrechen (sonst Suche/Buttons aus dem Bild),
   und horizontalen Seiten-Overflow generell verhindern (breite Karten-Reihen scrollbar statt abgeschnitten). --- */
@media (max-width: 900px) {
  /* WURZEL-FIX: .admin-main-wrap ist Flex-Item in .admin-layout (display:flex). Ohne min-width:0
     schrumpft es nicht unter die Inhalts-Mindestbreite (breite Tabellen) -> 709px statt 390.
     Mit min-width:0 fließt der Inhalt korrekt; breite Tabellen ragen sichtbar heraus und die Seite schiebt (21.10.2026). */
  .admin-main-wrap { min-width: 100%; }
  /* !important nötig, weil die Header-Kinder Inline-Styles (flex:1;max-width:520px) tragen.
     Jede Header-<div> (Suche, Aktionen) bekommt eine eigene volle Zeile, Buttons brechen um. */
  .admin-layout .admin-header { flex-wrap: wrap !important; gap: 8px 10px; }
  .admin-layout .admin-header > div { flex: 1 1 100% !important; max-width: 100% !important; min-width: 0 !important; }
  .admin-layout .admin-header > div[style*="gap:8px"] { flex-wrap: wrap; justify-content: flex-start; }
  .admin-layout .admin-header input { width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
}

/* --- WhatsApp-Chats im Admin: seit 18.10.2026 in css/wa-chat.css (WhatsApp-Web-Optik) --- */
