/**
 * Datei: css/styles.css
 * ----------------------------------------
 * Zweck:
 *   Hauptstyles für das Boni-System
 *   Beinhaltet Burger-Menü, Slide-Out-Navigation, Badges und allgemeine Layouts
 *   Responsive Design mit Overlay, Hover-Effekten und Benutzertyp-Badges
 * 
 * Abhängigkeiten:
 *   - partials/burger-menu.html (für HTML-Struktur der Navigation)
 *   - js/app.js (für JavaScript-Interaktionen)
 *   - Font Awesome 5.15.3 (für Icons in Navigation)
 * 
 * Verwendung:
 *   - Alle Frontend-Seiten (index.php, user-management.php, auftraege.php, etc.)
 * 
 * Datenbank-Tabellen:
 *   - Keine (reines Frontend-Styling)
 */

body {
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

/* Burger-Menü Button */
.burger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: #343a40;
  border: none;
  border-radius: 8px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.burger-menu:hover {
  background: #495057;
  transform: scale(1.05);
}

.burger-icon {
  display: flex;
  flex-direction: column;
  width: 20px;
  height: 15px;
  justify-content: space-between;
}

.burger-icon span {
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.burger-menu.active .burger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-icon span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Slide-Out Navigation */
.side-navigation {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #495057;
  z-index: 1500;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  border-right: 1px solid #dee2e6;
}

.side-navigation.open {
  left: 0;
}

/* Navigation Header */
.nav-header {
  padding: 30px 20px;
  background: rgba(52, 58, 64, 0.05);
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  gap: 16px;
}

.nav-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  flex: 1 1 auto;
  color: #343a40;
}

.nav-header i {
  color: #6c757d;
  margin-right: 10px;
  font-size: 1.2rem;
}

.close-btn {
  background: rgba(108, 117, 125, 0.1);
  border: none;
  color: #495057;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(108, 117, 125, 0.2);
  transform: scale(1.05);
}

/* Burger-Menü-Style für Close-Button */
.burger-menu-style .burger-icon {
  display: flex;
  flex-direction: column;
  width: 16px;
  height: 12px;
  justify-content: space-between;
}

.burger-menu-style .burger-icon span {
  width: 100%;
  height: 2px;
  background: #495057;
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* Navigation Content */
.nav-content {
  flex: 1;
  padding: 20px 0;
  background: rgba(248, 249, 250, 0.8);
  display: flex;
  flex-direction: column;
}

/* Navigation Menu */
.nav-menu {
  flex: 1;
  padding: 0 20px;
}

.nav-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu-item {
  margin-bottom: 8px;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #495057;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  gap: 12px;
}

.nav-menu-link:hover {
  background: rgba(108, 117, 125, 0.1);
  color: #343a40;
  text-decoration: none;
}

.nav-menu-link.active {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
  font-weight: 600;
}

.nav-menu-link.active i {
  color: #007bff;
}

.nav-menu-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Navigation Footer */
.nav-footer {
  padding: 20px;
  border-top: 1px solid #dee2e6;
  margin-top: auto;
}

.logout-btn {
  width: 100%;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: #dc3545;
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.logout-btn:hover {
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.4);
  transform: translateY(-1px);
}

/* Version Information */
.version-info {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.version-info small {
  color: #6c757d;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.welcome-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-card {
  text-align: center;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.welcome-card h1 {
  margin: 0 0 20px 0;
  color: #343a40;
  font-size: 2rem;
}

.badge {
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
}

.badge.admin {
  background-color: #dc3545;
  color: white;
}

.badge.gebietsleiter {
  background-color: #ffc107;
  color: #212529;
}

.badge.elektriker {
  background-color: #007bff;
  color: white;
}

.badge.loading {
  background-color: #6c757d;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .side-navigation {
    width: 280px;
    left: -280px;
  }
  
  .burger-menu {
    top: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
  }
  
  .welcome-card {
    padding: 30px 20px;
    margin: 0 15px;
  }
  
  .welcome-card h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .side-navigation {
    width: 100%;
    left: -100%;
  }
}
