/* =================================== */
/* Grundlegende Seitenstruktur & Design (Inspiriert von EDV2000) */
/* =================================== */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a2e;
    background-image: url('../../Hintergrund Logo.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #d1d5db;
    overflow-x: hidden;
}

/* HINWEIS: Das <main> Tag wird jetzt vom neuen Layout gesteuert */
/* main { ... } (alter Stil wird nicht mehr benötigt) */

a { color: #60a5fa; text-decoration: none; }
a:hover { color: #38bdf8; }

/* =================================== */
/* Header / Hauptnavigation           */
/* =================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    color: #e5e7eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 81px; /* Feste Höhe für genaue Positionierung */
    box-sizing: border-box; /* Stellt sicher, dass Padding in Höhe eingerechnet wird */
}

header .logo { height: 50px; filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6)); }
.user-actions { display: flex; align-items: center; gap: 20px; }
.user-actions span { font-weight: 500; }
.nav-link { font-weight: 600; padding: 10px 20px; border: 2px solid transparent; border-radius: 30px; transition: all 0.3s ease; }
.nav-link:hover { border-color: #60a5fa; color: #60a5fa; transform: translateY(-2px); }
.dropdown-btn { background: none; border: none; color: #d1d5db; font-size: 1.5em; cursor: pointer; }
.dropdown { position: relative; display: inline-block; }
.dropdown-content { display: none; position: absolute; right: 0; background-color: #374151; min-width: 200px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); z-index: 1; border-radius: 8px; overflow: hidden; }
.dropdown-content a { color: #d1d5db; padding: 12px 16px; display: block; }
.dropdown-content a:hover { background-color: #4b5563; }
.dropdown:hover .dropdown-content { display: block; }

/* =================================== */
/* Design für Modul-Karten & Sektionen */
/* =================================== */
.content-box, .module-card, .module-info-card {
    display: block;
    text-decoration: none;
    color: #d1d5db;
    padding: 30px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.6s ease;
    border: 1px solid rgba(96, 165, 250, 0.2);
    overflow-wrap: break-word; 
}
.module-card:hover, .module-info-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(96, 165, 250, 0.3); }

.content-box h2, .content-box h3, .module-card h3, .module-info-card h3 { 
    margin-top: 0; 
    color: #e5e7eb; 
    font-size: 1.5em; 
    padding-bottom: 15px; 
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
    white-space: nowrap;
}

/* =================================== */
/* Stile für Login & Registrierung    */
/* =================================== */
.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.auth-container { 
    width: 100%; 
    max-width: 400px; 
    border: 1px solid rgba(96, 165, 250, 0.2); 
    backdrop-filter: blur(10px); 
    background: rgba(30, 41, 59, 0.75); 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6); 
}
.auth-form h2 { text-align: center; margin-top: 0; margin-bottom: 30px; color: #e5e7eb; font-size: 1.8em; }
.auth-form .form-links { display: flex; justify-content: space-between; margin-top: 20px; }
.error-message { color: #ff8a8a; background-color: rgba(255,0,0,0.15); padding: 10px; border-radius: 5px; text-align: center; margin-bottom: 20px; border: 1px solid #dc3545; }

/* ======================================================= */
/* Globale Stile für Formularelemente (sicher hinzugefügt) */
/* ======================================================= */
.input-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.input-group label { color: #cbd5e1; font-weight: 500; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    background-color: #111827;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 1em;
    font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }

.button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5); }

/* =================================== */
/* Footer                             */
/* =================================== */
footer { text-align: center; padding: 20px; margin-top: 40px; background: #364855; color: #94a3b8; box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4); }
footer a { color: #60a5fa; margin: 0 15px; }

/* =================================== */
/* ADMIN & CONTENT BOXES */
/* =================================== */
.admin-content-box {
    color: #e5e7eb;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(30, 41, 59, 0.75);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}
.module-list-table th { background-color: rgba(55, 65, 81, 0.5); color: #f3f4f6; padding: 10px; text-align: left; }
.module-list-table td { background-color: rgba(75, 85, 99, 0.5); color: #e5e7eb; padding: 10px; border-bottom: 1px solid #1f2937; }
.module-list-table tr:nth-child(even) td { background-color: rgba(55, 65, 81, 0.5); }


/* =================================== */
/* NEUES APP-LAYOUT (Dashboard)       */
/* =================================== */
.app-layout {
    display: flex;
    /* Wir starten das Layout direkt nach dem sticky Header */
}

.app-sidebar {
    width: 260px; /* Breite der linken Leiste */
    background-color: #1f2937; /* Dunklerer Hintergrund für die Leiste */
    height: calc(100vh - 81px); /* Volle Höhe minus feste Header-Höhe */
    position: sticky;
    top: 81px; /* Muss exakt die Höhe des Headers sein */
    flex-shrink: 0; /* Verhindert, dass die Leiste schrumpft */
    overflow-y: auto; /* Scrollbar, falls Menü lang wird */
    padding: 20px;
    border-right: 1px solid rgba(96, 165, 250, 0.2);
    box-sizing: border-box;
}

.app-content {
    flex-grow: 1; /* Nimmt den restlichen Platz ein */
    padding: 40px; /* Innen-Padding für den Inhalt */
    max-width: 1400px; /* Maximale Breite für Lesbarkeit */
    margin: 0 auto; /* Zentriert den Inhaltsbereich */
}

/* Stil für das neue Sidebar-Menü */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Kleinerer Abstand zwischen Links */
}

.sidebar-nav h4 {
    color: #9ca3af;
    margin: 15px 0 5px 10px;
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: 600;
}

.sidebar-nav a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 0.95em;
}

.sidebar-nav a:hover {
    background-color: #374151;
}

.sidebar-nav a.active { /* Hebt den aktiven Link hervor */
    background-color: #2563eb;
    color: white;
    font-weight: 600;
}