/* /assets/css/style.css */

:root {
    --bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: #00d4ff; 
    --accent-hover: #00b8e6;
    --card-bg: #fdfdfd;
    --border-color: #eeeeee;
    --roundness: 24px;
}

* { 
    box-sizing: border-box; 
    overflow-wrap: break-word;
    word-wrap: break-word;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: -1px;
    font-weight: 800;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* --- Globale Elemente --- */
.brand-logo {
    border-left: 5px solid var(--accent);
    padding-left: 15px;
}

.brand-logo span.text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.brand-logo span.accent {
    color: var(--accent);
}

.btn-black { 
    background: #1a1a1a; 
    color: #fff; 
    border: none; 
    padding: 15px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 700; 
    text-transform: uppercase; 
    width: 100%; 
    transition: background 0.3s;
}

.btn-black:hover { background: #333; }

/* --- Modern Header & Navigation (Desktop) --- */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    
    /* NEU: Sticky Positionierung und weicher Übergang */
    position: sticky; 
    top: 0;
    background-color: var(--bg);
    z-index: 1000;
    transition: all 0.3s ease; 
}

/* NEU: Das Design, sobald gescrollt wird */
.main-header.scrolled {
    padding: 15px 25px; /* Verkleinert die Höhe und rückt es leicht ein */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Leichter Schatten */
    border-radius: 0 0 20px 20px; /* Abgerundete Ecken unten */
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-links .btn-outline {
    color: #999;
}

.nav-links .btn-outline:hover {
    color: var(--text-main);
}

.nav-links .btn-solid {
    background: var(--text-main);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid var(--text-main);
    letter-spacing: 0.5px;
}

.nav-links .btn-solid:hover {
    background: transparent;
    color: var(--text-main);
}

/* Hamburger Menu Button (Desktop versteckt) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000; /* Immer im Vordergrund */
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* --- Admin Header & User Pill --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    border: 1px solid #eee;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a1a1a;
}

.user-role {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.btn-logout:hover { background: #fff0f0; }

/* --- Admin Layout & Boxen --- */
.admin-nav { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 30px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px; 
}

.admin-nav a { 
    text-decoration: none; 
    color: #666; 
    font-weight: 600; 
    font-size: 0.9rem; 
    font-family: 'Montserrat', sans-serif; 
    text-transform: uppercase;
}

.admin-nav a.active { color: var(--accent); position: relative; }
.admin-nav a.active::after { 
    content: ''; 
    position: absolute; 
    bottom: -16px; 
    left: 0; 
    width: 100%; 
    height: 3px; 
    background: var(--accent); 
}

.content-box { 
    background: #fff; 
    padding: 40px; 
    border-radius: 20px; 
    border: 1px solid #eee; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
}

.login-box { max-width: 400px; margin: 100px auto; text-align: center; }

input, select { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border-radius: 8px; 
    border: 1px solid #ddd; 
    font-family: 'Open Sans', sans-serif; 
}

/* --- Admin Tabellen --- */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th { 
    background: #1a1a1a; 
    color: #fff; 
    padding: 15px; 
    text-align: left; 
    font-size: 0.75rem; 
    font-family: 'Montserrat', sans-serif; 
}
.admin-table td { padding: 15px; border-bottom: 1px solid #eee; vertical-align: middle; }

/* --- Badges & Alerts --- */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; color: #fff; font-weight: 600; }
.btn-action { text-decoration: none; font-weight: 700; font-size: 0.75rem; padding: 6px 12px; border-radius: 6px; margin-right: 10px; display: inline-block; }
.alert-success { background: #e8fdf0; color: #27ae60; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.85rem; font-weight: 600; }
.alert-error { background: #fff0f0; color: #e74c3c; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 0.85rem; font-weight: 600; }

/* --- Footer --- */
footer { padding: 40px 0; border-top: 1px solid var(--border-color); color: #ccc; font-size: 0.75rem; text-align: center; margin-top: 50px; }

/* --- Mobile Responsive: Fullscreen Overlay --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    /* Fixiert das "X" oben rechts, wenn das Menü offen ist */
    .menu-toggle.active {
        position: fixed;
        top: 35px;
        right: 25px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg); /* Nimmt die weiße Hintergrundfarbe */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Zentriert die Links vertikal */
        align-items: center;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 30px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    /* Größere Schrift für das Overlay-Menü */
    .nav-links a {
        font-size: 1.5rem; 
        display: inline-block;
    }

    .nav-links .btn-solid, .nav-links .btn-outline {
        width: auto;
        padding: 15px 40px;
    }
    
    /* Hamburger wird zum flüssig animierten "X" */
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}