/* style.css */
:root {
  --primary-color: #2570A9; /* Angepasstes Blau für besseren Kontrast (5.05:1 auf Weiß) */
  --primary-color-rgb: 37, 112, 169; /* RGB-Werte für #2570A9 */
  --secondary-color: #2c3e50; /* Dunkelblau/Grau */
  --accent-color: #e74c3c; /* Akzentfarbe Rot */
  --light-gray: #ecf0f1;
  --dark-gray: #7f8c8d;
  --text-color: #34495e;
  --card-bg: #ffffff;
  --font-family: 'Open Sans', Arial, Verdana, sans-serif; /* Open Sans als primäre Wahl, Roboto ist auch gut */
  --base-font-size: 18px; /* Basis-Schriftgröße für bessere Lesbarkeit */
}

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap'); alter Import, kann entfernt oder auskommentiert werden */

body {
  font-family: var(--font-family);
  font-size: var(--base-font-size); /* Basis-Schriftgröße anwenden */
  margin: 0;
  line-height: 1.7; /* Etwas mehr Zeilenabstand */
  color: var(--text-color);
  background-color: var(--light-gray); /* Hellerer Hintergrund */
  overflow-x: hidden; /* Verhindert horizontales Scrollen/Verschieben */
}

/* Push-Benachrichtigungen Styling */
.push-notification-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.push-notification-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

#subscribeButton {
  padding: 12px 24px; /* Erhöhtes Padding für größere Klickfläche */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem; /* 1rem entspricht jetzt var(--base-font-size), also 18px */
  /* Mindesthöhe sicherstellen, falls Text sehr kurz ist */
  min-height: 44px;
  box-sizing: border-box; /* Padding und Border in die Höhe/Breite einrechnen */
  cursor: pointer;
  transition: background-color 0.3s;
}

#subscribeButton:hover:not(:disabled) {
  background-color: #1A4F8F;
}

#subscribeButton:disabled {
  background-color: var(--dark-gray);
  cursor: not-allowed;
}

#pushStatus {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--dark-gray);
  text-align: center;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  background: var(--secondary-color);
  color: #fff;
  padding: 15px 0; /* Mehr Padding */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtiler Schatten */
  position: relative; /* Wichtig für absolute Positionierung der mobilen Navigation */
}

/* Moderner Header für junge Zielgruppe */
header.header-modern {
  background: transparent;
  padding: 1rem 0;
  box-shadow: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

header.header-modern .container {
  /* Inherits from global .container */
}

header.header-modern .logo {
  height: 32px;
  filter: none;
}

header.header-modern .logo-link {
  display: flex;
  align-items: center;
}

header.header-modern nav ul {
  gap: 0.5rem;
}

header.header-modern nav a {
  background: transparent;
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: none;
  border: none;
}

header.header-modern nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--secondary-color);
  border: none;
  box-shadow: none;
  transform: none;
}

header.header-modern nav li:last-child a {
  background: var(--secondary-color);
  color: white;
}

header.header-modern nav li:last-child a:hover {
  background: #1a2a3a;
  color: white;
}

header.header-modern .mobile-menu-toggle {
  color: var(--secondary-color);
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

header.header-modern .mobile-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile Navigation für Modern Header - Kompaktes Dropdown-Menü */
@media (max-width: 767px) {
  header.header-modern .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--secondary-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
  }
  
  header.header-modern .mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  header.header-modern .mobile-menu-toggle i {
    font-size: 1.25rem;
  }
  
  /* Kompaktes Dropdown-Menü */
  header.header-modern nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 50vw;
    max-width: 200px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transform-origin: top right;
    transition: all 0.15s ease-out;
  }
  
  header.header-modern nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  
  /* Close Button verstecken */
  header.header-modern nav .mobile-menu-close {
    display: none;
  }
  
  /* Menü-Liste */
  header.header-modern nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    margin: 0;
    width: 100%;
    list-style: none;
  }
  
  header.header-modern nav li {
    width: 100%;
  }
  
  /* Alle Links gleich gestylt - schlicht */
  header.header-modern nav a,
  header.header-modern nav li:last-child a {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 14px;
    background: transparent;
    color: var(--secondary-color);
    border-radius: 6px;
    border: none;
    box-shadow: none;
    text-align: left;
    transition: background 0.15s ease;
    margin: 0;
  }
  
  header.header-modern nav a:hover,
  header.header-modern nav li:last-child a:hover {
    background: #f5f5f5;
    color: var(--secondary-color);
    transform: none;
    box-shadow: none;
  }
}

/* Close Button auf Desktop verstecken */
header.header-modern nav .mobile-menu-close {
  display: none;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  height: 45px; /* Etwas grösser */
  filter: brightness(0) invert(1); /* Macht das SVG Logo weiss, falls es schwarz ist */
  vertical-align: middle; /* Vertikale Ausrichtung */
}

/* Logo Link Styling */
header a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

header nav ul {
  padding: 0;
  list-style: none;
  display: flex;
  gap: 10px; /* Abstand zwischen Buttons */
}

header nav ul li {
  margin-left: 0; /* Entfernt, da gap verwendet wird */
}

header nav a {
  color: var(--secondary-color);
  text-decoration: none;
  text-transform: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  background-color: transparent;
  box-shadow: none;
}

header nav a:hover {
  background-color: rgba(44, 62, 80, 0.08);
  color: var(--secondary-color);
  /* Simuliert Bold ohne Layout-Shift */
  text-shadow: 0 0 1px var(--secondary-color);
  transform: none;
  box-shadow: none;
}

/* Hamburger-Menü Styles */
.mobile-menu-toggle {
  display: none !important; /* Standardmäßig versteckt (Desktop) - !important um JavaScript-Override zu verhindern */
  background: transparent;
  border: 1px solid #eee;
  color: var(--secondary-color);
  font-size: 1.2em;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.mobile-menu-toggle:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Mobile Navigation Styles */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: block !important; /* Nur auf mobilen Geräten anzeigen - !important um höhere Priorität zu haben */
  }
  
  /* Hamburger-Menü für eingeloggte Benutzer auch auf mobilen Geräten ausblenden */
  header.user-logged-in .mobile-menu-toggle {
    display: none !important;
  }
  
  /* Für Login/Register Links (nicht eingeloggt) */
  header nav {
    position: absolute;
    top: calc(100% + 10px);
    left: auto;
    right: 15px;
    width: 200px;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 8px;
  }
  
  /* User-Dropdown Navigation bleibt immer sichtbar */
  header.user-logged-in nav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background-color: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-left: auto;
    flex: 0 0 auto;
    width: auto;
  }
  
  header.user-logged-in .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  header nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  header nav ul {
    flex-direction: column;
    gap: 4px;
    padding: 0;
  }
  
  header nav ul li {
    width: 100%;
  }
  
  header nav a {
    display: flex;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background-color: transparent;
    box-shadow: none;
    border-bottom: none;
    justify-content: flex-start;
    min-width: auto;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
  }
  
  header nav a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
  }
  
  header nav ul li:last-child a {
    border-bottom: none;
  }
  
  /* Mobile User-Dropdown Anpassungen */
  header.user-logged-in nav ul {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    width: auto !important;
  }
  
  header.user-logged-in nav ul li.header-user-dropdown {
    width: auto !important;
  }

  /* User-Info auf Mobile kompakter machen */
  .user-info-trigger {
    padding: 0.4rem 0.6rem;
    gap: 0.5rem;
  }
  
  .user-info-trigger .user-welcome {
    display: none; /* Verstecke "Willkommen" Text auf Mobile */
  }
  
  .user-info-trigger .dropdown-arrow {
    margin-left: 0.2rem;
  }
  
  /* User-Dropdown Menu auf Mobile anpassen */
  .user-dropdown-menu {
    right: 0;
    left: auto;
    width: 280px;
    max-width: 90vw;
  }

  /* User-Icon rechtsbündig auf Mobile */
  header.user-logged-in .header-user-dropdown {
    margin-left: auto !important;
  }
}

main {
  padding: 40px 0; /* Mehr Abstand oben/unten */
}

h1, h2, h3 {
  color: var(--secondary-color); /* Dunklere Überschriften */
  font-weight: 500; /* Etwas leichter */
}

h1 {
  text-align: center;
  margin-bottom: 30px; /* Mehr Abstand */
  font-size: 2.2em; /* Grössere Hauptüberschrift */
}

.info-section {
  background: var(--card-bg);
  padding: 30px; /* Mehr Padding */
  margin-bottom: 30px;
  border-radius: 12px; /* Stärker abgerundete */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Weicherer, moderner Schatten */
}

.info-section h2 {
  margin-top: 0;
  color: var(--primary-color);
  border-bottom: none; /* Keine Linie unter H2 */
  padding-bottom: 0;
  margin-bottom: 20px; /* Mehr Abstand nach H2 */
  font-size: 1.8em;
}

.info-section p { /* Gezieltes Styling für Absätze in der Info-Sektion */
  font-size: 1em; /* Passt sich der Basis-Schriftgröße an (18px) */
  margin-bottom: 1.2em; /* Etwas mehr Abstand, relativ zur Schriftgröße */
}

.info-section ul {
  list-style: none; /* Keine Standard-Aufzählungszeichen */
  padding-left: 0;
}

.info-section ul li {
  margin-bottom: 12px; /* Mehr Abstand */
  padding-left: 25px; /* Platz für Icon */
  position: relative;
}

.info-section ul li::before { /* Modernes Aufzählungszeichen */
  content: "\f00c"; /* FontAwesome Check Icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary-color);
}

.admin-info { /* Nicht mehr verwendet, aber falls doch */
  border-left: 5px solid var(--accent-color);
}

.action-link {
  margin-top: 15px;
  font-weight: bold;
}

.action-link i {
  margin-right: 5px;
  color: var(--accent-color);
}

.small-info {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--dark-gray);
}

footer {
  background: var(--secondary-color);
  color: var(--light-gray); /* Hellerer Text im Footer */
  text-align: center;
  padding: 20px 0; /* Mehr Padding */
  margin-top: 40px; /* Mehr Abstand */
  font-size: 0.9em;
}

footer p {
  margin: 0;
}

/* ==========================================
   Protected Dashboard (VR-Igloo Modern)
   ========================================== */

.protected-body.modern {
  background: #fafafa;
  color: var(--secondary-color);
}

/* .protected-body.modern .container removed to use global max-width: 1200px */

header.header-dashboard {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

header.header-dashboard .container {
  /* Inherits from global .container */
}

header.header-dashboard a {
  flex-shrink: 0;
}

header.header-dashboard .logo {
  height: 32px;
  filter: none;
}

header.header-dashboard nav {
  margin-left: auto;
}

header.header-dashboard nav ul {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0;
  list-style: none;
  margin: 0;
}

header.header-dashboard nav .nav-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

header.header-dashboard nav .nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.protected-main {
  padding: 2rem 0 3rem;
}

.protected-body.modern .protected-main {
  padding: 1.75rem 0 3rem;
}

.dashboard-hero.modern {
  text-align: center;
  margin: 1rem 0 1.75rem;
}

.dashboard-hero.modern h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.5rem;
  color: var(--secondary-color);
}

.dashboard-hero.modern .subtitle {
  font-size: 1rem;
  color: var(--dark-gray);
  margin: 0;
  line-height: 1.5;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eee;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

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

.dashboard-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 300ms ease-in-out;
  overflow: hidden;
}

.dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dashboard-card .card-header {
  padding: 1.25rem;
}

.dashboard-card .card-header,
.dashboard-card .history-header,
.dashboard-card .rfid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-card .card-title h2,
.dashboard-card .card-title h3,
.dashboard-card .history-header h3,
.dashboard-card .rfid-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-card .history-header h3 i,
.dashboard-card .rfid-header h3 i {
  color: var(--primary-color);
  font-size: 1rem;
}

.dashboard-card .card-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--dark-gray);
  font-weight: 400;
  line-height: 1.4;
}

.dashboard-card .card-title-row {
  display: flex;
  flex-direction: column;
}

.dashboard-card .history-header,
.dashboard-card .rfid-header {
  cursor: pointer;
  padding: 1.25rem;
  min-height: 44px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  transition: all 300ms ease-in-out;
  user-select: none;
  position: relative;
}

.dashboard-card .history-header:hover,
.dashboard-card .rfid-header:hover {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.dashboard-card .history-header:active,
.dashboard-card .rfid-header:active {
  background: linear-gradient(135deg, #e8e8e8 0%, #e0e0e0 100%);
}

.dashboard-card .history-header:focus-visible,
.dashboard-card .rfid-header:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.dashboard-card .history-arrow,
.dashboard-card .rfid-arrow {
  color: var(--dark-gray);
  font-size: 1rem;
  transition: transform 300ms ease-in-out, color 300ms ease-in-out;
  flex-shrink: 0;
}

.dashboard-card .history-header:hover .history-arrow,
.dashboard-card .rfid-header:hover .rfid-arrow {
  color: var(--secondary-color);
}

.dashboard-card .history-header[aria-expanded="true"] .history-arrow,
.dashboard-card .rfid-header[aria-expanded="true"] .rfid-arrow {
  transform: rotate(180deg);
}

/* Status card: Override der "prominent" 50+ Optik (nur im Modern Dashboard) */
.protected-body.modern .key-status-container.prominent {
  border: 1px solid #eee;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  margin: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  --status-accent: var(--primary-color);
}

.protected-body.modern .key-status-container.prominent::before {
  display: none; /* Remove top border line */
}

/* Status Colors - Reset Container Background to White */
.protected-body.modern .key-status-container.prominent.status-available,
.protected-body.modern .key-status-container.prominent.status-unavailable,
.protected-body.modern .key-status-container.prominent.status-pending,
.protected-body.modern .key-status-container.prominent.status-stolen {
  background: #fff;
  border-color: #eee;
  color: var(--secondary-color);
}

/* Set Accent Colors for Inner Elements */
.protected-body.modern .key-status-container.prominent.status-available { --status-accent: #15803d; }
.protected-body.modern .key-status-container.prominent.status-unavailable { --status-accent: #b91c1c; }
.protected-body.modern .key-status-container.prominent.status-pending { --status-accent: #c2410c; }
.protected-body.modern .key-status-container.prominent.status-stolen { --status-accent: #991b1b; }

/* Text Color Overrides - Reset to Dark for Container */
.protected-body.modern .key-status-container.prominent.status-available .card-title h2,
.protected-body.modern .key-status-container.prominent.status-unavailable .card-title h2,
.protected-body.modern .key-status-container.prominent.status-pending .card-title h2,
.protected-body.modern .key-status-container.prominent.status-stolen .card-title h2 {
  color: var(--secondary-color);
}

.protected-body.modern .key-status-container.prominent.status-available .card-subtitle,
.protected-body.modern .key-status-container.prominent.status-unavailable .card-subtitle,
.protected-body.modern .key-status-container.prominent.status-pending .card-subtitle,
.protected-body.modern .key-status-container.prominent.status-stolen .card-subtitle {
  color: var(--dark-gray);
}

.protected-body.modern .key-status-container.prominent .key-status {
  margin: 0;
  width: 100%;
}

/* Inner Status Box - Centered Layout & Colored Background */
.protected-body.modern .key-status-container.prominent .key-available,
.protected-body.modern .key-status-container.prominent .key-unavailable,
.protected-body.modern .key-status-container.prominent .key-pending,
.protected-body.modern .key-status-container.prominent .key-stolen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  box-shadow: none;
  border: none;
  color: white;
}

.protected-body.modern .key-status-container.prominent .key-available {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.protected-body.modern .key-status-container.prominent .key-unavailable {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

.protected-body.modern .key-status-container.prominent .key-pending {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.2);
}

.protected-body.modern .key-status-container.prominent .key-stolen {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

/* Inner Text Colors (White on Gradient) */
.protected-body.modern .key-status-container.prominent .status-text h4,
.protected-body.modern .key-status-container.prominent .status-text p {
  color: white;
}

.protected-body.modern .key-status-container.prominent .status-text p {
  color: rgba(255, 255, 255, 0.95);
}

/* Icons - Bigger and Centered */
.protected-body.modern .key-status-container.prominent .key-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: white;
  color: var(--status-accent);
  margin-bottom: 0.5rem;
}

/* Specific Icon Colors (fallback) */
.protected-body.modern .key-status-container.prominent.status-available .key-icon { color: #15803d; }
.protected-body.modern .key-status-container.prominent.status-unavailable .key-icon { color: #b91c1c; }
.protected-body.modern .key-status-container.prominent.status-pending .key-icon { color: #c2410c; }
.protected-body.modern .key-status-container.prominent.status-stolen .key-icon { color: #991b1b; }

.protected-body.modern .key-status-container.prominent .key-icon i {
  font-size: 2.5rem;
  color: inherit;
}

.protected-body.modern .key-status-container.prominent .status-text h4 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.protected-body.modern .key-status-container.prominent .status-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.protected-body.modern .key-status-container.prominent .status-text p + p {
  margin-top: 0.4rem;
}

.protected-body.modern .key-status-container.prominent .status-text .warning {
  color: #7c2d12;
  background: rgba(255, 247, 237, 0.95);
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.protected-body.modern .key-status-container.prominent .countdown {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  color: white;
  background: rgba(0,0,0,0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.protected-body.modern .key-status-container.prominent .key-actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f2f2f2;
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.protected-body.modern .key-status-container.prominent[class*="status-"] .key-actions {
  border-top-color: #f2f2f2;
}

.protected-body.modern .key-status-container.prominent .action-btn {
  flex: 1 1 200px;
  min-height: 48px;
  border-radius: 12px;
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.protected-body.modern .key-status-container.prominent .take-btn {
  background: var(--secondary-color);
  color: white;
  box-shadow: none;
}

.protected-body.modern .key-status-container.prominent[class*="status-"] .take-btn {
  background: var(--status-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.protected-body.modern .key-status-container.prominent .take-btn:hover {
  background: #1a2a3a;
  transform: none;
}

.protected-body.modern .key-status-container.prominent[class*="status-"] .take-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.protected-body.modern .key-status-container.prominent .return-btn {
  background: transparent;
  color: var(--secondary-color);
  border: 1px solid #ddd;
  box-shadow: none;
}

.protected-body.modern .key-status-container.prominent[class*="status-"] .return-btn {
  border-color: #ddd;
  color: var(--secondary-color);
}

.protected-body.modern .key-status-container.prominent .action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.protected-body.modern .key-status-container.prominent .return-btn:hover {
  background: #f5f5f5;
  transform: none;
}

.protected-body.modern .key-status-container.prominent[class*="status-"] .return-btn:hover {
  background: #f5f5f5;
  border-color: #ddd;
}

/* Collapsible content - Modern */
.key-history.collapsed,
.rfid-content.collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 300ms ease-in-out, opacity 200ms ease-in-out;
}

.key-history.expanded,
.rfid-content.expanded {
  max-height: 3000px;
  opacity: 1;
  overflow: visible;
  transition: max-height 300ms ease-in-out, opacity 250ms ease-in-out;
}

.protected-body.modern .key-history {
  padding: 1.25rem;
  background: white;
  border-top: 1px solid #f0f0f0;
}

.protected-body.modern .rfid-content {
  padding: 1.25rem;
  background: white;
  border-top: 1px solid #f0f0f0;
}

/* Push card - Ultra Compact Horizontal Design */
.protected-body.modern .push-notification-container.compact {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  min-height: auto;
}

/* Header Area - Horizontal Layout */
.protected-body.modern .push-notification-container.compact .card-header {
  padding: 0;
  border: none;
  margin: 0;
  width: auto;
  background: transparent;
  flex: 1;
  display: block;
}

.protected-body.modern .push-notification-container.compact .card-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
}

/* Reset Icon to small inline */
.protected-body.modern .push-notification-container.compact .card-title h3 i {
  display: inline-block;
  width: auto;
  height: auto;
  background: none;
  color: var(--primary-color);
  border-radius: 0;
  font-size: 1rem;
  margin: 0 0.5rem 0 0;
  box-shadow: none;
}

/* Title Text - Small & Inline */
.protected-body.modern .push-notification-container.compact .card-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

/* Subtitle - Small & Grey */
.protected-body.modern .push-notification-container.compact .card-subtitle {
  font-size: 0.85rem;
  color: var(--dark-gray);
  margin: 0.2rem 0 0 0;
  max-width: none;
  line-height: 1.4;
}

/* Controls Area - Right Aligned */
.protected-body.modern .push-notification-controls {
  width: auto;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
  min-width: 200px;
}

/* Subscribe Button - Compact */
.protected-body.modern #subscribeButton {
  width: auto;
  max-width: none;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: none;
  min-height: 36px;
}

.protected-body.modern #subscribeButton:hover:not(:disabled) {
  background: #1a2a3a;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.protected-body.modern #subscribeButton:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Status Text - Tiny & Right Aligned */
.protected-body.modern #pushStatus {
  font-size: 0.75rem;
  color: #94a3b8;
  background: transparent;
  padding: 0;
  margin: 0;
  font-weight: 400;
  border: none;
  width: 100%;
  text-align: right;
}

/* Mobile Adjustment */
@media (max-width: 600px) {
  .protected-body.modern .push-notification-container.compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .protected-body.modern .push-notification-controls {
    width: 100%;
    align-items: stretch;
  }
  
  .protected-body.modern #subscribeButton {
    width: 100%;
  }

  .protected-body.modern #pushStatus {
    text-align: center;
  }
}

.footer-modern {
  background: transparent;
  color: var(--dark-gray);
  padding: 2rem 0;
  margin-top: 0;
}

.footer-modern p {
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 767px) {
  .protected-main {
    padding: 1.25rem 0 2.5rem;
  }
  .dashboard-hero.modern {
    margin: 0.75rem 0 1.25rem;
  }
  .dashboard-hero.modern h1 {
    font-size: 1.6rem;
  }
  .protected-body.modern .key-status-container.prominent .key-actions {
    flex-direction: column;
    max-width: 360px;
  }

  /* Mobile: Buttons nicht zu "hoch" wirken lassen (bleiben >=44px) */
  .protected-body.modern .key-status-container.prominent .action-btn {
    flex: 0 0 auto;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    gap: 0.4rem;
    line-height: 1.2;
  }

  .protected-body.modern .key-status-container.prominent .action-btn i {
    font-size: 1rem;
  }
}

/* Vorhandene Styles beibehalten und anpassen */

form > div {
  margin-bottom: 1em;
}

label {
  display: inline-block;
  width: 80px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
  width: 200px;
  padding: 8px; /* Angepasst */
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Hinzugefügt */
}

button {
  padding: 10px 20px; /* Angepasst */
  cursor: pointer;
  background-color: #0779e4; /* Angepasst */
  color: white; /* Angepasst */
  border: none; /* Angepasst */
  border-radius: 4px; /* Angepasst */
  transition: background-color 0.3s ease; /* Hinzugefügt */
}

button:hover {
  background-color: #055bb5; /* Hinzugefügt */
}

p {
  margin-top: 1em;
}

/* Hier wurden die spezifischen Styles für die Protected Page entfernt,
   da diese jetzt direkt in der protected.html-Datei enthalten sind */

/* Login Page Styles */
.login-body {
  position: relative; /* Für absolute Positionierung des back-link */
  display: flex;
  flex-direction: column; /* Elemente untereinander anordnen */
  justify-content: center;
  align-items: center; /* Elemente horizontal zentrieren */
  min-height: 100vh;
  padding: 20px;
  background-color: var(--light-gray); /* Hintergrundfarbe konsistent halten */
}

/* Modern Login Body */
.login-body.modern {
  background: #fafafa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  width: 100%;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  align-self: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.back-link-modern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dark-gray);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
  align-self: flex-start;
  transition: color 0.2s ease;
}

.back-link-modern:hover {
  color: var(--secondary-color);
}

.back-link-modern i {
  font-size: 0.8rem;
}

.login-container {
  background-color: var(--card-bg);
  padding: 2.5rem; /* Etwas mehr Padding */
  border-radius: 12px; /* Konsistent mit .info-section */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Konsistent mit .info-section */
  max-width: 450px; /* Etwas breiter für mehr Platz */
  width: 100%;
  text-align: center; /* Zentriert das Logo, falls es nicht block ist */
}

.login-container.modern {
  background: white;
  padding: 2.25rem 1.75rem;
  border-radius: 16px;
  border: 1px solid #eee;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.login-container.modern h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0 0 0.5rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin: 0;
}

.login-container.modern form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-container.modern .form-group {
  text-align: left;
}

.login-container.modern label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  width: auto;
}

.login-container.modern input[type="text"],
.login-container.modern input[type="password"],
.login-container.modern input[type="email"],
.login-container.modern input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  min-height: 44px;
}

.login-container.modern input[type="text"]::placeholder,
.login-container.modern input[type="password"]::placeholder,
.login-container.modern input[type="email"]::placeholder,
.login-container.modern input[type="tel"]::placeholder {
  color: #aaa;
}

.login-container.modern input[type="text"]:focus,
.login-container.modern input[type="password"]:focus,
.login-container.modern input[type="email"]:focus,
.login-container.modern input[type="tel"]:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
  outline: none;
}

.login-container.modern .button-primary {
  width: 100%;
  padding: 14px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.5rem;
  min-height: 44px;
}

.login-container.modern .button-primary:hover {
  background: #1a2a3a;
}

.login-container.modern .register-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.login-container.modern .register-link a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.login-container.modern .register-link a:hover {
  text-decoration: underline;
}

.login-logo {
  display: block; /* Sicherstellen, dass es block ist für margin auto */
  margin: 0 auto 2.5rem; /* Mehr Abstand nach unten */
  max-width: 200px; /* Maximale Breite für das Logo auf der Login-Seite */
}

.login-container h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8em; /* Angepasst an die Basisschriftgröße */
  color: var(--secondary-color);
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Abstand zwischen Formulargruppen */
}

.login-container label {
  display: block;
  margin-bottom: 0.75rem; /* Mehr Abstand zum Input */
  font-weight: 800;
  font-size: 1em; /* Relative Größe zur Basis (18px) */
  color: var(--text-color);
  text-align: left; /* Label linksbündig */
}

.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  padding: 14px 18px; /* Größeres Padding für bessere Klick-/Touchfläche und Lesbarkeit */
  border: 2px solid #d1d5db; /* Etwas dunklerer Rand für besseren Kontrast */
  border-radius: 8px; /* Etwas abgerundeter */
  font-size: 1em; /* Relative Größe zur Basis (18px) */
  line-height: 1.5; /* Stellt sicher, dass Text nicht abgeschnitten wird */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 48px; /* Mindesthöhe für Eingabefelder */
  box-sizing: border-box;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 37, 112, 169), 0.3); /* Fokus-Indikator, --primary-color-rgb muss ggf. definiert werden */
  outline: none;
}

.login-container .button-primary {
  padding: 14px 24px; /* Konsistentes Padding mit anderen Buttons */
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px; /* Konsistent mit Inputs */
  font-size: 1.1em; /* Etwas größer für Hauptaktion */
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-height: 48px; /* Mindesthöhe */
  box-sizing: border-box;
  width: 100%; /* Button über volle Breite */
}

.login-container .button-primary:hover {
  background-color: #1A4F8F; /* Dunklere Variante von --primary-color */
  transform: translateY(-1px);
}

.login-container .register-link {
  text-align: center;
  margin-top: 2rem; /* Mehr Abstand */
  font-size: 0.95em; /* Etwas größer für bessere Lesbarkeit */
}

.login-container .register-link a {
  color: var(--primary-color); /* Konsistente Linkfarbe */
  text-decoration: none;
  font-weight: 600;
}

.login-container .register-link a:hover,
.login-container .register-link a:focus {
  text-decoration: underline;
  outline: 2px solid transparent; /* Verhindert doppelten Fokusrahmen, wenn Browser eigenen setzt */
}

.back-link {
  position: absolute;
  top: 17%; /* Näher an die Box rücken */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95em;
  z-index: 10; /* Sicherstellen, dass es über anderen Elementen liegt */
}

.back-link a {
  color: var(--text-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link a i {
  margin-right: 8px;
  font-size: 1em;
  color: var(--primary-color);
}

.back-link a:hover,
.back-link a:focus {
  color: var(--primary-color);
  text-decoration: underline;
  outline: 2px solid transparent;
}

.back-link-register {
  position: absolute;
  top: -1%; /* Angepasster Wert für die Registrierungsseite */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95em;
  z-index: 10;
}

.back-link-register a {
  color: var(--text-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-link-register a i {
  margin-right: 8px;
  font-size: 1em;
  color: var(--primary-color);
}

.back-link-register a:hover,
.back-link-register a:focus {
  color: var(--primary-color);
  text-decoration: underline;
  outline: 2px solid transparent;
}

/* Register Page Styles */
.register-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--light-gray);
}

.register-container {
  background-color: var(--card-bg);
  padding: 2.25rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  max-width: 440px; /* Schlanker, damit es mobil nicht zu breit wirkt */
  width: 100%;
  text-align: center;
}

.register-logo {
  display: block;
  margin: 0 auto 2rem; /* Etwas weniger Abstand als Login, da mehr Felder folgen */
  max-width: 180px; /* Etwas kleiner als Login-Logo */
}

.register-container h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8em;
  color: var(--secondary-color);
}

.register-container form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* Etwas weniger Gap als Login, da mehr Felder */
}

.register-container label {
  display: block;
  margin-bottom: 0.6rem; /* Etwas weniger als Login */
  font-weight: 800;
  font-size: 0.9em; /* Angepasst von 1em, um Umbrüche zu vermeiden */
  color: var(--text-color);
  text-align: left;
  white-space: normal; /* Erlaubt Zeilenumbruch auf kleinen Screens */
}

.register-container input[type="text"],
.register-container input[type="password"],
.register-container input[type="email"],
.register-container input[type="tel"] {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1em;
  line-height: 1.5;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.register-container input[type="text"]:focus,
.register-container input[type="password"]:focus,
.register-container input[type="email"]:focus,
.register-container input[type="tel"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.3);
  outline: none;
}

.register-container .button-primary {
  padding: 14px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-height: 48px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.5rem; /* Kleiner Abstand nach oben zum letzten Feld */
}

.register-container .button-primary:hover {
  background-color: #1A4F8F;
  transform: translateY(-1px);
}

.register-container .login-link {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95em;
}

.register-container .login-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.register-container .login-link a:hover,
.register-container .login-link a:focus {
  text-decoration: underline;
  outline: 2px solid transparent;
}

/* Media Query für kleinere Bildschirme, falls nötig */
@media (max-width: 767px) {
  .login-body.modern {
    padding: 1rem;
  }
  .login-wrapper {
    max-width: 420px;
  }
  .login-container.modern {
    padding: 1.6rem 1.1rem;
  }
  .login-container.modern.register-container {
    padding: 1.4rem 1rem;
  }
}

@media (max-width: 520px) {
  .login-container.modern {
    padding: 1.3rem 0.95rem;
  }
  .login-container.modern h1 {
    font-size: 1.35rem;
  }
  .login-container.modern label {
    font-size: 0.83rem;
  }
  .login-container.modern input[type="text"],
  .login-container.modern input[type="password"],
  .login-container.modern input[type="email"],
  .login-container.modern input[type="tel"],
  .login-container.modern input[type="email"],
  .login-container.modern input[type="tel"] {
    padding: 11px 12px;
    font-size: 0.93rem;
  }
  .login-container.modern .form-group {
    margin-bottom: 0.25rem;
  }
  .login-wrapper {
    max-width: 380px;
  }
  .login-container.modern.register-container {
    max-width: 380px;
    padding: 1.25rem 0.95rem;
  }
}

@media (max-width: 480px) {
  .login-container.modern {
    padding: 1.1rem 0.85rem;
  }
  .login-container.modern h1 {
    font-size: 1.25rem;
  }
  .login-container.modern .login-subtitle {
    font-size: 0.85rem;
  }
  .login-container.modern .button-primary {
    padding: 12px;
    font-size: 0.95rem;
  }
  .login-wrapper {
    max-width: 360px;
  }
  .login-container.modern.register-container {
    max-width: 360px;
    padding: 1.1rem 0.85rem;
  }
}

/* Help Button Container */
.help-button-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 25px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  min-height: 48px; /* Barrierefreiheit */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.button-secondary i {
  margin-right: 10px;
  font-size: 1.2em;
}

.button-secondary:hover,
.button-secondary:focus {
  background-color: #a83232; /* Dunklere Variante */
  transform: translateY(-2px);
}

.button-secondary:focus {
  outline: 3px solid rgba(var(--secondary-color-rgb), 0.4);
  outline-offset: 2px;
}

/* Media Query für kleine Bildschirme */
@media (max-width: 768px) {
  .container:not(.landing-container) {
    padding: 0 15px;
  }

  header nav ul li {
    margin-left: 1rem;
  }
  
  .button-secondary {
    padding: 12px 20px;
    font-size: 1em;
    width: 100%;
  }
  
  /* Header Logo mobil anpassen */
  header .logo {
    height: 35px;
  }
}

/* Zusätzliche Mobile Optimierungen */
@media (max-width: 480px) {
  body:not(.landing-body) {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .container:not(.landing-container) {
    padding: 0 15px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  .info-section:not(.landing-info-section) {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .info-section:not(.landing-info-section) h2 {
    font-size: 1.5em;
    margin-bottom: 1.5rem;
  }
  
  .info-section:not(.landing-info-section) p {
    font-size: 0.95em;
    margin-bottom: 1.2em;
  }
  
  .info-section ul li {
    margin-bottom: 10px;
    padding-left: 20px;
  }
  
  footer:not(.landing-footer) {
    padding: 15px 0;
    margin-top: 30px;
  }
  
  footer:not(.landing-footer) p {
    font-size: 0.85em;
  }
  
  /* Header für kleine Bildschirme */
  header .logo {
    height: 30px;
  }
}

/* ==========================================
   Landing Page (index.html) Specific Styles 
   ========================================== */

/* Landing Page Body Styling */
.landing-body {
  font-size: 19px;
  line-height: 1.8;
  overflow-x: hidden; /* Verhindert horizontales Scrollen/Verschieben */
}

/* Modern Landing Page für junge Zielgruppe */
.landing-body:has(.landing-container.modern) {
  font-size: 16px;
  line-height: 1.6;
  background: #fafafa;
}

.landing-container {
  max-width: 800px;
  padding: 0 30px;
}

.landing-container.modern {
  max-width: 900px;
  padding: 2rem 1.5rem;
}

/* Hero-Bereich Styling */
.hero-section {
  text-align: center;
  padding: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1A4F8F 50%, var(--secondary-color) 100%);
  margin: 0 -30px;
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: white;
  position: relative;
}

.hero-section.modern {
  background: transparent;
  margin: 0;
  padding: 5rem 1rem 2rem;
  box-shadow: none;
  color: var(--secondary-color);
}

/* Enhanced Hero für VR-Igloo */
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.hero-section.modern h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--secondary-color);
  padding: 0;
  margin-bottom: 1rem;
  text-shadow: none;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-section.modern .subtitle {
  font-size: 1.15rem;
  color: var(--dark-gray);
  padding: 0;
  font-weight: 400;
  text-shadow: none;
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.hero-cta {
  margin-top: 0.5rem;
}

/* Steps Section */
.steps-section {
  margin: 4rem 0 3rem;
  text-align: center;
}

.steps-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.25rem;
  text-align: center;
  border: 1px solid #eee;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--secondary-color);
}

.step-card p {
  font-size: 0.875rem;
  color: var(--dark-gray);
  margin: 0;
  line-height: 1.5;
}

.steps-hint {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin-top: 1.5rem;
}

.steps-hint i {
  margin-right: 6px;
  color: var(--primary-color);
}

.steps-hint a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.steps-hint a:hover {
  text-decoration: underline;
}

/* Mobile für Steps */
@media (max-width: 767px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .step-card {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 1.25rem;
    gap: 1rem;
  }
  
  .step-number {
    margin: 0;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .step-card h3 {
    margin-bottom: 0.25rem;
  }
  
  .hero-section.modern h1 {
    font-size: 2rem;
  }
  
  .hero-section.modern .subtitle {
    font-size: 1rem;
  }
}

.hero-section > * {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 2.4em;
  color: white;
  margin: 0;
  padding: 3rem 2rem 1rem 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section.modern h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--secondary-color);
  padding: 0;
  margin-bottom: 0.5rem;
  text-shadow: none;
  letter-spacing: -0.02em;
}

.hero-section .subtitle {
  font-size: 1.3em;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  padding: 0 2rem 3rem 2rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-section.modern .subtitle {
  font-size: 1.25rem;
  color: var(--dark-gray);
  padding: 0;
  font-weight: 400;
  text-shadow: none;
}

/* Features Grid - Modern */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid #eee;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.feature-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--secondary-color);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--dark-gray);
  margin: 0;
  line-height: 1.5;
}

/* Landing Page Info-Sektion */
.landing-info-section {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  margin: 3rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.landing-info-section h2 {
  color: var(--secondary-color);
  font-size: 1.8em;
  margin-bottom: 2rem;
  font-weight: 600;
  text-align: center;
}

.landing-info-section p {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 1.8rem;
  text-align: left;
  color: var(--text-color);
}

/* Action-Buttons Container */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
  align-items: center;
}

.action-buttons.modern {
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0 4rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 30px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 600;
  transition: all 0.3s ease;
  min-height: 60px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-button.modern {
  min-height: auto;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  width: auto;
  max-width: none;
  box-shadow: none;
}

.action-button.primary {
  background-color: var(--primary-color);
  color: white;
}

.action-button.primary.modern {
  background: var(--secondary-color);
}

.action-button.primary.modern i {
  margin-left: 8px;
  margin-right: 0;
  transition: transform 0.2s ease;
}

.action-button.primary.modern:hover i {
  transform: translateX(4px);
}

.action-button.primary:hover {
  background-color: #1A4F8F;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 112, 169, 0.25);
  color: white;
}

.action-button.primary.modern:hover {
  background: #1a2a3a;
  transform: none;
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

.action-button.secondary {
  background-color: #f8fbff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-button.secondary.modern {
  background: transparent;
  color: var(--dark-gray);
  border: 1px solid #ddd;
}

.action-button.secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 112, 169, 0.25);
}

.action-button.secondary.modern:hover {
  background: #f5f5f5;
  color: var(--secondary-color);
  transform: none;
  box-shadow: none;
  border-color: #ccc;
}

.action-button i {
  margin-right: 12px;
  font-size: 1.2em;
}

/* Landing Page Footer */
.landing-footer {
  background: var(--secondary-color);
  color: #fff;
  padding: 2rem 0;
  margin-top: 4rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.landing-footer.modern {
  background: transparent;
  color: var(--dark-gray);
  padding: 1.5rem 0;
  margin-top: 0;
  box-shadow: none;
  border-top: 1px solid #eee;
}

.landing-footer .container {
  text-align: center;
}

.landing-footer p {
  margin: 0;
  font-size: 1em;
  opacity: 0.9;
}

.landing-footer.modern p {
  font-size: 0.85rem;
  opacity: 1;
}

/* Landing Page Responsive Design */
@media (min-width: 768px) {
  .action-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .action-button {
    width: auto;
    min-width: 280px;
  }
}

/* Landing Page Mobile Optimierungen */
@media (max-width: 767px) {
  .landing-body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .landing-container {
    max-width: 100%;
    padding: 0 20px;
  }
  
  .landing-container.modern {
    padding: 1rem;
  }
  
  .hero-section {
    padding: 0;
    margin: 0 -20px;
  }
  
  .hero-section.modern {
    padding: 2.5rem 1rem 1rem;
    margin: 0;
  }
  
  .hero-section h1 {
    font-size: 2em;
    padding: 2.5rem 1.5rem 1rem 1.5rem;
  }
  
  .hero-section.modern h1 {
    font-size: 2.25rem;
    padding: 0;
  }
  
  .hero-section .subtitle {
    font-size: 1.1em;
    padding: 0 1.5rem 2.5rem 1.5rem;
  }
  
  .hero-section.modern .subtitle {
    font-size: 1rem;
    padding: 0;
  }
  
  .landing-info-section {
    padding: 1rem 0;
    margin: 1.5rem 0;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  
  .landing-info-section h2 {
    font-size: 1.5em;
  }
  
  .landing-info-section p {
    font-size: 1em;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .feature-card {
    padding: 1.5rem 1rem;
  }
  
  .action-button {
    padding: 14px 20px;
    font-size: 1em;
    min-height: 48px;
    width: calc(100% - 2rem);
    max-width: 320px;
  }
  
  .action-buttons.modern {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .action-button.modern {
    width: 100%;
    max-width: 280px;
  }
  
  .action-button i {
    font-size: 1.1em;
  }
}

/* ==========================================
   Protected Page Specific Styles 
   ========================================== */

/* Benutzerinformationen */
.user-info {
  margin-bottom: 2em;
  padding: 1em;
  background-color: #f5f5f5;
  border-radius: 5px;
  border-left: 4px solid #4CAF50;
}

/* Container für Schlüsselstatus und -historie */
.key-status-container,
.key-history-container {
  margin-top: 2em;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* Einklappbare Schlüsselhistorie */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2em 1.5em;
  min-height: 44px;
  background: linear-gradient(135deg, var(--primary-color), #1565C0);
  color: white;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.history-header:hover {
  background: linear-gradient(135deg, #1565C0, #0D47A1);
}

.history-header:active {
  transform: scale(0.995);
  background: linear-gradient(135deg, #0D47A1, #0a3d91);
}

.history-header:focus-visible {
  outline: 3px solid rgba(37, 112, 169, 0.5);
  outline-offset: 2px;
}

.history-header h3 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: white;
}

.history-arrow {
  color: white;
  font-size: 1.1em;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.key-history {
  transform-origin: top;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  will-change: transform, opacity;
}

.key-history.collapsed {
  transform: scaleY(0);
  opacity: 0;
  height: 0;
  overflow: hidden;
  margin-top: 0;
}

.key-history.expanded {
  transform: scaleY(1);
  opacity: 1;
  height: auto;
  overflow: visible;
  margin-top: 1em;
}

/* Historie-Hinweis - Modern */
.history-info {
  margin-top: 1.75rem;
  padding-top: 0;
}

.history-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 112, 169, 0.08);
}

.history-notice i {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.notice-content p {
  margin: 0 0 0.5rem 0;
  line-height: 1.6;
  font-size: 0.9rem;
}

.notice-content p:last-child {
  margin-bottom: 0;
}

.notice-content strong {
  font-weight: 700;
  color: #1e3a8a;
}

.key-status-container h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

/* Schlüsselstatus-Stile */
.key-status {
  margin-bottom: 1.5em;
}

.key-available,
.key-unavailable,
.key-pending,
.key-stolen {
  display: flex;
  align-items: center;
  padding: 1em;
  border-radius: 5px;
}

.key-available {
  background-color: #e8f5e9;
  border: 1px solid #a5d6a7;
}

.key-unavailable {
  background-color: #ffebee;
  border: 1px solid #ef9a9a;
}

.key-stolen {
  background-color: #fdeaeb;
  border: 1px solid #e53935;
  border-width: 2px;
}

.key-pending {
  background-color: #fff8e1;
  border: 1px solid #ffcc80;
}

.key-icon {
  width: 60px;
  height: 60px;
  margin-right: 1em;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.key-icon.available {
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.key-icon.unavailable {
  background: linear-gradient(135deg, #F44336, #E53935);
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.key-icon.pending {
  background: linear-gradient(135deg, #FFC107, #FF9800);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.key-icon.stolen {
  background: linear-gradient(135deg, #E53935, #C62828);
  box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}

.key-icon i {
  color: white;
  font-size: 1.8em;
  font-weight: 900;
}

.status-text {
  flex: 1;
}

.status-text h4 {
  margin: 0 0 0.5em 0;
  font-size: 1.2em;
}

.status-text p {
  margin: 0;
  line-height: 1.4;
}

.user-action {
  margin-top: 0.5em !important;
  font-weight: bold;
}

.warning {
  color: #e65100;
  font-weight: bold;
  margin-top: 0.5em !important;
}

.countdown {
  font-family: monospace;
  font-weight: bold;
  background-color: #fff3e0;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid #ffcc80;
}

/* Schlüsselaktionen */
.key-actions {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}

.action-btn {
  padding: 0.8em 1.5em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  flex: 1;
  max-width: 200px;
  text-align: center;
  line-height: 1.3;
}

.take-btn {
  background-color: #4CAF50;
  color: white;
}

.take-btn:hover:not(:disabled) {
  background-color: #388E3C;
}

.return-btn {
  background-color: #F44336;
  color: white;
}

.return-btn:hover:not(:disabled) {
  background-color: #D32F2F;
}

.action-btn:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}

/* Button-Text Styling für mehrzeilige Darstellung */
.btn-text {
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
}

/* Timeline für die Schlüsselhistorie - Modern */
.timeline {
  position: relative;
  margin: 1.5rem 0;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-color) 0%, rgba(37, 112, 169, 0.2) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.4s ease-out;
}

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

.timeline-item.latest .timeline-take {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 112, 169, 0.12);
}

.timeline-take,
.timeline-return,
.timeline-pending {
  position: relative;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
  background: white;
  transition: all 0.2s ease;
}

.timeline-take:hover,
.timeline-return:hover,
.timeline-pending:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.timeline-take {
  background: #fafafa;
  border-left: 3px solid #ef4444;
}

.timeline-return {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  margin-left: 2rem;
  border-left: 3px solid #22c55e;
}

.timeline-pending {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  margin-left: 2rem;
  border-left: 3px solid #f59e0b;
}

.timeline-icon {
  position: absolute;
  left: -2.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: white;
  border: 3px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.timeline-icon.take {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ef4444"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>');
  border-color: #ef4444;
  background-color: #fef2f2;
}

.timeline-icon.return {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2322c55e"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
  border-color: #22c55e;
  background-color: #f0fdf4;
}

.timeline-icon.pending {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f59e0b"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"/></svg>');
  border-color: #f59e0b;
  background-color: #fffbeb;
}

.timeline-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary-color);
  letter-spacing: -0.01em;
}

.timeline-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.5;
}

.timeline-content p:not(:last-child) {
  margin-bottom: 0.35rem;
}

/* Fehlermeldungen */
.error-message {
  color: #721c24;
  padding: 0.75em;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 0.5em 0;
  font-size: 0.9em;
}

/* Info Messages */
.info-message {
  color: #1e3a8a;
  padding: 0.75em;
  background-color: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  margin: 0.5em 0;
  font-size: 0.9em;
}

/* Modern Auth Forms (VR-Igloo): Inline Field Errors statt "Alert-Box" */
.login-container.modern .error-message {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0.4rem 0 0;
  color: #d92d20;
  font-size: 0.85rem;
  line-height: 1.35;
}

.login-container.modern input.error,
.login-container.modern select.error,
.login-container.modern textarea.error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

/* Modern Auth: Status-Banner oberhalb des Formulars */
.login-container.modern #form-messages {
  margin: 0 0 1rem;
  text-align: left;
  border-radius: 12px;
}

.login-container.modern #form-messages.error-message {
  background-color: #fef3f2;
  border: 1px solid #fee4e2;
  color: #b42318;
  padding: 0.75rem 0.9rem;
}

.login-container.modern #form-messages.success-message {
  background-color: #ecfdf3;
  border: 1px solid #d1fadf;
  color: #027a48;
  padding: 0.75rem 0.9rem;
}

.login-container.modern #form-messages.info-message {
  background-color: #eff8ff;
  border: 1px solid #d1e9ff;
  color: #175cd3;
  padding: 0.75rem 0.9rem;
}

.error-message button {
  margin-top: 0.8em;
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.error-message button:hover {
  background-color: #c82333;
}

/* Retry Button Specifics */
.retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.2s ease;
}

.retry-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Accessibility: Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Field Help Text */
.field-help {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25em;
  font-style: italic;
}

/* Success Messages */
.success-message {
  color: #155724;
  padding: 0.75em;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  margin: 0.5em 0;
  font-size: 0.9em;
}

/* Form Input Error State */
input.error,
select.error,
textarea.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Form Input Success State */
input.success,
select.success,
textarea.success {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* RFID/NFC-Verwaltung - Modern Design */
.protected-body.modern .rfid-management-container {
  border: 1px solid #f0f0f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  margin-top: 0;
  background: white;
}

/* Header styles are handled in the main modern block (.dashboard-card .rfid-header) */

.protected-body.modern .rfid-content {
  padding: 1.5rem;
  background: #fff;
}

/* Status Box */
.protected-body.modern .rfid-status {
  margin: 0 0 1.5rem 0;
}

.protected-body.modern .rfid-assigned,
.protected-body.modern .rfid-not-assigned {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.protected-body.modern .rfid-assigned {
  background: #f0fdf4; /* Light green */
  border-color: #bbf7d0;
  color: #166534;
}

.protected-body.modern .rfid-not-assigned {
  background: #fff7ed; /* Light orange */
  border-color: #ffedd5;
  color: #9a3412;
}

.protected-body.modern .rfid-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.protected-body.modern .rfid-icon.assigned::before {
  content: "\f2c2"; /* fa-id-card */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.protected-body.modern .rfid-icon.not-assigned::before {
  content: "\f071"; /* fa-exclamation-triangle */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.protected-body.modern .rfid-assigned .status-text h4,
.protected-body.modern .rfid-not-assigned .status-text h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
}

.protected-body.modern .rfid-assigned .status-text p,
.protected-body.modern .rfid-not-assigned .status-text p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  color: inherit;
}

.protected-body.modern .rfid-assigned code {
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(0,0,0,0.05);
  color: inherit;
  font-family: ui-monospace, monospace;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Form Section */
.protected-body.modern .rfid-form-section {
  margin: 0 0 1.5rem 0;
  padding: 0;
  background: transparent;
}

.protected-body.modern .rfid-form-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.protected-body.modern .rfid-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.protected-body.modern .rfid-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: ui-monospace, monospace;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.protected-body.modern .rfid-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
  outline: none;
}

.protected-body.modern .button-group {
  display: flex;
  gap: 0.75rem;
}

.protected-body.modern .rfid-btn,
.protected-body.modern .rfid-remove-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  border: none;
}

.protected-body.modern .rfid-btn {
  background: var(--secondary-color);
  color: white;
}

.protected-body.modern .rfid-btn:hover {
  background: #1a2a3a;
  transform: translateY(-1px);
}

.protected-body.modern .rfid-remove-btn {
  background: white;
  border: 1px solid #fee2e2;
  color: #dc2626;
}

.protected-body.modern .rfid-remove-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.protected-body.modern .rfid-remove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
  border-color: #f3f4f6;
  color: #9ca3af;
}

/* Instructions */
.protected-body.modern .rfid-instructions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0;
}

.protected-body.modern .rfid-instructions h4 {
  color: var(--secondary-color);
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.protected-body.modern .rfid-instructions h4 i {
  color: var(--primary-color);
}

.protected-body.modern .instruction-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.protected-body.modern .instruction-steps li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.protected-body.modern .instruction-steps li:last-child {
  margin-bottom: 0;
}

/* Last Scanned Card (New Feature) */
.protected-body.modern .last-scanned-rfid {
  margin-bottom: 1.5rem;
}

.protected-body.modern .scanned-card-info {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1.25rem;
  animation: slideIn 0.3s ease-out;
}

.protected-body.modern .scanned-card-info h4 {
  color: #166534;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.protected-body.modern .scanned-card-info p {
  color: #166534;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.protected-body.modern .use-card-btn {
  background: #166534;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.protected-body.modern .use-card-btn:hover {
  background: #14532d;
}

/* Responsive */
@media (max-width: 768px) {
  .protected-body.modern .button-group {
    flex-direction: column;
  }
  
  .protected-body.modern .rfid-btn,
  .protected-body.modern .rfid-remove-btn {
    width: 100%;
  }
}

.alert h4 {
  margin: 0 0 0.5em 0;
  font-size: 1.1em;
}

.alert p {
  margin: 0 0 0.8em 0;
}

.alert code {
  background-color: #ffffff;
  padding: 0.3em 0.6em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 1em;
  border: 1px solid #bbdefb;
}

code {
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

/* Info Box für Admin-Registrierung */
.info-box {
  margin: 1em 0 2em;
  padding: 1em;
  background-color: #e3f2fd;
  border-left: 4px solid #2196F3;
  border-radius: 4px;
}

.info-box p {
  margin: 0.5em 0;
  font-size: 0.95em;
}

.info-box strong {
  color: #0d47a1;
}

/* Admin-Container Stile */
.admin-container {
  margin-top: 2em;
  border: 1px solid #ddd;
  padding: 1.5em;
  border-radius: 5px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-container h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #9C27B0;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.admin-links {
  margin-top: 1em;
}

.admin-link {
  display: inline-block;
  padding: 10px 15px;
  background-color: #9C27B0;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: background-color 0.3s;
}

.admin-link:hover {
  background-color: #7B1FA2;
}

/* Push-Benachrichtigungen Styling für Protected Page */
.push-notification-container.protected {
  margin-top: 2em;
  border: 1px solid #ddd;
  padding: 1.5em;
  border-radius: 5px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.push-notification-container.protected h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

.push-notification-controls.protected {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5em;
}

.push-notification-controls.protected #subscribeButton {
  padding: 10px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.push-notification-controls.protected #subscribeButton:hover:not(:disabled) {
  background-color: #2980b9;
}

.push-notification-controls.protected #subscribeButton:disabled {
  background-color: #7f8c8d;
  cursor: not-allowed;
}

.push-notification-controls.protected #pushStatus {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #7f8c8d;
  text-align: center;
}

/* Kompakter Push-Notification-Container */
.push-notification-container.compact {
  margin-top: 3rem;
  padding: 1rem;

}

.push-notification-container.compact h3 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.push-notification-container.compact h3 i {
  color: var(--primary-color);
}

.push-notification-container.compact .push-notification-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.push-notification-container.compact #subscribeButton {
  padding: 0.75rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.push-notification-container.compact #subscribeButton:hover:not(:disabled) {
  background-color: #1A4F8F;
}

.push-notification-container.compact #subscribeButton:disabled {
  background-color: var(--dark-gray);
  cursor: not-allowed;
}

.push-notification-container.compact #pushStatus {
  margin: 0;
  font-size: 0.8rem;
  color: var(--dark-gray);
  text-align: center;
}

.header-user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* User Dropdown Modern Redesign */
.user-info-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 99px; /* Pill shape */
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
  background: transparent;
}

.user-info-trigger:hover,
.user-info-trigger.active {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
}

.user-info-trigger .user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 5px rgba(37, 112, 169, 0.2);
  transition: transform 0.2s ease;
}

.user-info-trigger:hover .user-avatar {
  transform: scale(1.05);
}

.user-welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 0.25rem;
}

.welcome-text {
  color: var(--dark-gray);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 3px;
}

.user-name {
  color: var(--secondary-color);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.dropdown-arrow {
  color: var(--dark-gray);
  font-size: 0.8rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 4px;
}

.user-info-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu Overlay */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(to right, #f8f9fa, #fff);
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(37, 112, 169, 0.2);
}

.dropdown-user-info {
  flex: 1;
  overflow: hidden;
}

.dropdown-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  font-size: 0.85rem;
  color: var(--dark-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background-color: #f0f0f0;
  margin: 0;
}

/* User Details Section */
.dropdown-user-details {
  padding: 1rem 1.5rem;
  background: #fff;
}

.user-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.user-detail-item:hover {
  background: #f8f9fa;
}

.user-detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dark-gray);
  font-size: 0.9rem;
  font-weight: 500;
}

.detail-label i {
  width: 16px;
  text-align: center;
  color: var(--primary-color);
  opacity: 0.8;
}

.detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
  background-color: #f0f2f5;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif; /* No monospace for cleaner look */
}

.dropdown-links {
  padding: 0.5rem;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 0 0.5rem;
  border-radius: 8px;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: auto; /* Reset width */
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-link:hover {
  background-color: #f0f2f5;
  color: var(--primary-color);
  transform: translateX(2px);
}

.dropdown-link i {
  width: 20px;
  text-align: center;
  color: var(--dark-gray);
  font-size: 1rem;
  transition: color 0.2s;
}

.dropdown-link:hover i {
  color: var(--primary-color);
}

.dropdown-link.logout-link {
  margin-top: 0.5rem;
  color: #dc3545; /* Red for logout */
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 8px 8px; /* Rounded bottom */
  margin: 0.5rem 0 0 0;
  padding: 1rem 1.5rem;
}

.dropdown-link.logout-link:hover {
  background-color: #fff5f5;
  color: #c82333;
  transform: none;
}

.dropdown-link.logout-link i {
  color: #dc3545;
}

.dropdown-link.logout-link:hover i {
  color: #c82333;
}

.dropdown-link.logout-link:hover {
  background-color: #c0392b;
  color: white;
}

.dropdown-link.logout-link i {
  color: white;
}

/* Responsive Design für Header Dropdown */
@media (max-width: 768px) {
  .user-dropdown-menu {
    min-width: 260px;
    right: -10px;
  }
  
  .user-welcome {
    display: none;
  }
  
  .user-info-trigger {
    padding: 0.5rem;
  }
  
  .dropdown-header {
    padding: 1rem;
  }
  
  .dropdown-link {
    padding: 0.875rem 1rem;
  }
  
  .dropdown-link.logout-link {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    background-color: var(--accent-color);
    color: white;
    border-radius: 0 0 8px 8px;
  }
  
  .dropdown-link.logout-link:hover {
    background-color: #c0392b;
    color: white;
  }
}

/* Header navigation für protected page */
header nav ul li.header-user-dropdown {
  margin-left: 0;
}

/* Dashboard Welcome Section */
.dashboard-welcome {
  margin-bottom: 2em;
  text-align: center;
}

.welcome-message h2 {
  color: #2C3E50;
  font-size: 2.2em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.welcome-subtitle {
  color: #7F8C8D;
  font-size: 1.1em;
  margin: 0;
  line-height: 1.4;
}

/* Prominente Schlüsselstatus-Container */
.key-status-container.prominent {
  margin: 2em 0;
  border: 2px solid #4CAF50;
  padding: 2em;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fffe 0%, #e8f5e9 100%);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
  position: relative;
  overflow: hidden;
}

.key-status-container.prominent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4CAF50, #66BB6A, #4CAF50);
  animation: statusGlow 3s ease-in-out infinite;
}

@keyframes statusGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.status-header {
  text-align: center;
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

.status-title h2 {
  margin: 0 0 0.3em 0;
  color: #2C3E50;
  font-size: 1.8em;
  font-weight: 600;
}

.status-subtitle {
  margin: 0;
  color: #7F8C8D;
  font-size: 1em;
}

/* Enhanced Key Status Display */
.key-status-container.prominent .key-status {
  margin-bottom: 2em;
}

.key-status-container.prominent .key-available,
.key-status-container.prominent .key-unavailable,
.key-status-container.prominent .key-pending,
.key-status-container.prominent .key-stolen {
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-width: 2px;
}

.key-status-container.prominent .key-icon {
  width: 80px;
  height: 80px;
  margin-right: 1.5em;
}

.key-status-container.prominent .key-icon i {
  font-size: 2.2em;
}

.key-status-container.prominent .status-text h4 {
  font-size: 1.4em;
  margin-bottom: 0.7em;
}

.key-status-container.prominent .status-text p {
  font-size: 1.1em;
  line-height: 1.5;
}

/* Enhanced Action Buttons */
.key-status-container.prominent .key-actions {
  display: flex;
  gap: 1.5em;
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(76, 175, 80, 0.2);
  justify-content: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.key-status-container.prominent .action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1em 1.5em;
  font-size: 1.1em;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
}

.key-status-container.prominent .take-btn {
  background: linear-gradient(135deg, #ff0000, #f50000);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.key-status-container.prominent .take-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.key-status-container.prominent .return-btn {
  background: linear-gradient(135deg, #4CAF50, #388E3C);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.key-status-container.prominent .return-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Status-basierte Container-Styles für bessere Sichtbarkeit (50+ Zielgruppe) */
.key-status-container.prominent.status-available {
  border-color: #4CAF50;
  background: linear-gradient(135deg, #f8fffe 0%, #e8f5e9 100%);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

.key-status-container.prominent.status-available::before {
  background: linear-gradient(90deg, #4CAF50, #66BB6A, #4CAF50);
}

.key-status-container.prominent.status-unavailable {
  border-color: #F44336;
  background: linear-gradient(135deg, #fffdfd 0%, #ffebee 100%);
  box-shadow: 0 8px 25px rgba(244, 67, 54, 0.15);
}

.key-status-container.prominent.status-unavailable::before {
  background: linear-gradient(90deg, #F44336, #EF5350, #F44336);
}

.key-status-container.prominent.status-unavailable .status-header .status-title h2,
.key-status-container.prominent.status-unavailable .key-actions {
  border-top-color: rgba(244, 67, 54, 0.2);
}

.key-status-container.prominent.status-pending {
  border-color: #FF9800;
  background: linear-gradient(135deg, #fffef8 0%, #fff8e1 100%);
 
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.15);
}

.key-status-container.prominent.status-pending::before {
  background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
}

.key-status-container.prominent.status-pending .status-header .status-title h2,
.key-status-container.prominent.status-pending .key-actions {
  border-top-color: rgba(255, 152, 0, 0.2);
}

.key-status-container.prominent.status-stolen {
  border-color: #E53935;
  background: linear-gradient(135deg, #fffbfb 0%, #fdeaeb 100%);
  box-shadow: 0 8px 25px rgba(229, 57, 53, 0.2);
  animation: alertPulse 2s ease-in-out infinite;
}

.key-status-container.prominent.status-stolen::before {
  background: linear-gradient(90deg, #E53935, #F44336, #E53935);
}

.key-status-container.prominent.status-stolen .status-header .status-title h2,
.key-status-container.prominent.status-stolen .key-actions {
  border-top-color: rgba(229, 57, 53, 0.2);
}

@keyframes alertPulse {
  0%, 100% { 
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.2);
  }
  50% { 
    box-shadow: 0 8px 35px rgba(229, 57, 53, 0.35);
  }
}

/* Responsive Design für prominente Statusanzeige */
@media (max-width: 768px) {
  .welcome-message h2 {
    font-size: 1.8em;
  }
  
  .welcome-subtitle {
    font-size: 1em;
  }
  
  .key-status-container.prominent {
    padding: 1.5em;
    margin: 1.5em 0;
  }
  
  .status-header {
    text-align: center;
    margin-bottom: 1em;
  }
  
  .status-title h2 {
    font-size: 1.5em;
  }
  
  .key-status-container.prominent .key-actions {
    flex-direction: row;
    gap: 0.75em;
    max-width: none;
  }
  
   
  .key-status-container.prominent .action-btn {
    padding: 1em;
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .welcome-message h2 {
    font-size: 1.5em;
  }
  

  
  .key-status-container.prominent {
    padding: 1em;
  }
  

  
  .key-status-container.prominent .key-available,
  .key-status-container.prominent .key-unavailable,
  .key-status-container.prominent .key-pending,
  .key-status-container.prominent .key-stolen {
    padding: 1em;
       flex-direction: column;
    text-align: center;
  }
  
  .key-status-container.prominent .key-icon {
    width: 60px;
    height: 60px;
    margin-right: 0;
    margin-bottom: 1em;
  }
  
  .key-status-container.prominent .status-text h4 {
    font-size: 1.2em;
  }
  
  .key-status-container.prominent .status-text p {
    font-size: 1em;
  }
}

/* ========================================
   RESPONSIVE DESIGN - EINRICHTUNGSANLEITUNG
   ======================================== */

/* Tablet und kleine Desktop (768px und kleiner) */
@media (max-width: 768px) {
  /* Container-Anpassungen für Einrichtungsanleitung */
  .einrichtungsanleitung .container {
    max-width: 95%;
    padding: 0 15px;
  }
  
  /* Schritt-Boxen anpassen */
  .einrichtungsanleitung .step {
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
    border-radius: 12px !important;
  }
  
  /* Schritt-Nummern kleiner machen */
  .einrichtungsanleitung .step-number {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.4em !important;
    top: -25px !important;
    left: 1rem !important;
  }
  
  /* Überschriften anpassen */
  .einrichtungsanleitung .step h3 {
    font-size: 1.4em !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Text und Listen anpassen */
  .einrichtungsanleitung .step p,
  .einrichtungsanleitung .step li {
    font-size: 1.05em !important;
    line-height: 1.6 !important;
    margin-bottom: 0.8rem !important;
  }
  
  /* Inhaltsverzeichnis anpassen */
  .einrichtungsanleitung .toc {
    padding: 1.5rem !important;
    margin: 2rem 0 !important;
  }
  
  .einrichtungsanleitung .toc-link {
    padding: 15px 18px !important;
    font-size: 1.05em !important;
    min-height: 50px !important;
  }
  
  .einrichtungsanleitung .toc-number {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.1em !important;
    margin-right: 15px !important;
  }
  
  /* Tip-Box anpassen */
  .einrichtungsanleitung .tip-box {
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
  }
  
  .einrichtungsanleitung .tip-box h4 {
    font-size: 1.2em !important;
  }
  
  .einrichtungsanleitung .tip-box p {
    font-size: 1em !important;
  }
  
  /* Back-to-home Button für Tablets */
  .einrichtungsanleitung .back-to-home {
    padding: 12px 18px !important;
    font-size: 1em !important;
    max-width: 250px !important;
    display: inline-block !important;
  }
  
  /* Listen kompakter für Tablets */
  .einrichtungsanleitung .step ul {
    padding-left: 1rem !important;
  }
  
  .einrichtungsanleitung .step li {
    margin-bottom: 0.6rem !important;
  }
  
  .einrichtungsanleitung .step-icon {
    margin-right: 12px !important;
  }
}

/* Smartphone (480px und kleiner) */
@media (max-width: 480px) {
  /* Basis-Schriftgröße für sehr kleine Bildschirme reduzieren */
  .einrichtungsanleitung body {
    font-size: 17px !important;
  }
  
  /* Container noch enger */
  .einrichtungsanleitung .container {
    padding: 0 10px !important;
  }
  
  /* Hauptüberschrift anpassen */
  .einrichtungsanleitung h1 {
    font-size: 1.8em !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Schritt-Boxen für sehr kleine Bildschirme */
  .einrichtungsanleitung .step {
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 10px !important;
  }
  
  /* Schritt-Nummern noch kleiner */
  .einrichtungsanleitung .step-number {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2em !important;
    top: -20px !important;
    left: 0.5rem !important;
  }
  
  /* Überschriften kleiner */
  .einrichtungsanleitung .step h3 {
    font-size: 1.3em !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Text und Listen kompakter */
  .einrichtungsanleitung .step p,
  .einrichtungsanleitung .step li {
    font-size: 1em !important;
    line-height: 1.5 !important;
    margin-bottom: 0.6rem !important;
  }
  
  /* Listen-Einrückung reduzieren */
  .einrichtungsanleitung .step ul {
    padding-left: 0.8rem !important;
  }
  
  /* Icons in Listen kleiner */
  .einrichtungsanleitung .step-icon {
    margin-right: 8px !important;
    font-size: 0.9em !important;
  }
  
  /* Listenelemente kompakter */
  .einrichtungsanleitung .step li {
    margin-bottom: 0.4rem !important;
    padding-left: 0 !important;
  }
  
  /* Inhaltsverzeichnis kompakter */
  .einrichtungsanleitung .toc {
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
  }
  
  .einrichtungsanleitung .toc h2 {
    font-size: 1.5em !important;
    margin-bottom: 1.5rem !important;
  }
  
  .einrichtungsanleitung .toc-item {
    margin-bottom: 1rem !important;
  }
  
  .einrichtungsanleitung .toc-link {
    padding: 12px 15px !important;
    font-size: 1em !important;
    min-height: 45px !important;
  }
  
  .einrichtungsanleitung .toc-number {
    width: 30px !important;
    height: 30px !important;
    font-size: 1em !important;
    margin-right: 12px !important;
  }
  
  /* Tip-Box kompakter */
  .einrichtungsanleitung .tip-box {
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border-left-width: 4px !important;
  }
  
  .einrichtungsanleitung .tip-box h4 {
    font-size: 1.1em !important;
    margin-bottom: 0.8rem !important;
  }
  
  .einrichtungsanleitung .tip-box p {
    font-size: 0.95em !important;
    line-height: 1.5 !important;
  }
  
  /* Back-to-home Button anpassen */
  .einrichtungsanleitung .back-to-home {
    padding: 10px 15px !important;
    font-size: 0.95em !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    display: inline-block !important;
    text-align: center !important;
    max-width: 200px !important;
  }
  
  /* Akkordeon für Touch optimieren */
  .einrichtungsanleitung .accordion-header {
    padding: 15px 10px !important;
    margin: -15px -10px 0 -10px !important;
  }
  
  .einrichtungsanleitung .accordion-icon {
    font-size: 1.2em !important;
    padding: 10px !important;
  }
}

/* Sehr kleine Bildschirme (360px und kleiner) */
@media (max-width: 360px) {
  .einrichtungsanleitung .step {
    padding: 0.8rem !important;
  }
  
  .einrichtungsanleitung .step-number {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.1em !important;
    top: -17px !important;
    left: 0.3rem !important;
  }
  
  .einrichtungsanleitung .container {
    padding: 0 8px !important;
  }
  
  .einrichtungsanleitung .toc-link {
    padding: 10px 12px !important;
    flex-direction: column !important;
    text-align: center !important;
    min-height: auto !important;
  }
  
  .einrichtungsanleitung .toc-number {
    margin-right: 0 !important;
    margin-bottom: 8px !important;
  }
}

/* Bilder responsive machen */
@media (max-width: 768px) {
  .einrichtungsanleitung img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 1rem 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Zentriert den .back-to-home Button */
.einrichtungsanleitung .back-to-home {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Optional: Für flex-Layouts, falls nötig */
.einrichtungsanleitung .back-to-home-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

@media (max-width: 768px) {
  /* ...existing code... */

  .einrichtungsanleitung .back-to-home {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    float: none !important;
  }
}
/* ==========================================
   Custom Modal Styles (Modern VR-Igloo)
   ========================================== */

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.custom-modal-overlay.active .custom-modal {
  transform: scale(1);
  opacity: 1;
}

.custom-modal-header {
  padding: 1.5rem 1.5rem 0.5rem;
  text-align: center;
}

.custom-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.custom-modal-icon.info {
  background-color: #e0f2fe;
  color: var(--primary-color);
}

.custom-modal-icon.success {
  background-color: #dcfce7;
  color: #16a34a;
}

.custom-modal-icon.warning {
  background-color: #fef3c7;
  color: #d97706;
}

.custom-modal-icon.danger {
  background-color: #fee2e2;
  color: #dc2626;
}

.custom-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.custom-modal-body {
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
  color: var(--dark-gray);
  font-size: 1rem;
  line-height: 1.5;
}

.custom-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.custom-modal-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.custom-modal-btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.custom-modal-btn.primary:hover {
  background-color: #1A4F8F;
  transform: translateY(-1px);
}

.custom-modal-btn.secondary {
  background-color: #f1f5f9;
  color: var(--secondary-color);
}

.custom-modal-btn.secondary:hover {
  background-color: #e2e8f0;
}

.custom-modal-btn.danger {
  background-color: #dc2626;
  color: white;
}

.custom-modal-btn.danger:hover {
  background-color: #b91c1c;
}
