/* Dateipfad: assets/css/style.css */

:root {
    --bg-color: #0f111a;      /* Sehr dunkler, technischer Hintergrund */
    --card-bg: #1a1d2d;       /* Etwas helleres Grau/Blau für Container */
    --text-main: #e2e8f0;     /* Helle, gut lesbare Schrift */
    --text-muted: #94a3b8;    /* Abgeschwächte Schrift für Labels/Notizen */
    --accent-color: #00d2ff;  /* Technisches Neon-Cyan (wie Anycubic-Blau) */
    --error-color: #ff4b4b;   /* Rot für Fehlermeldungen */
}
/* Generell keine ekligen Unterstriche mehr für Links! */
a {
    text-decoration: none !important;
}
/* Reset für alle Browser */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   LOGIN BEREICH (Zentriert & App-Like)
========================================= */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    padding: 20px;
}

.login-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); /* Schöner weicher Schatten */
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card h1 {
    margin-bottom: 5px;
    color: var(--accent-color);
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #2d334a;
    background-color: #0f111a;
    color: var(--text-main);
    outline: none;
    transition: border 0.3s ease;
}

/* Wenn man in das Feld klickt (leuchtet in Accent-Farbe auf) */
.form-group input:focus {
    border-color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-color);
    color: #000; /* Schwarzer Text auf Neon-Button = guter Kontrast */
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.8;
}

.error-msg {
    color: var(--error-color);
    font-size: 14px;
    margin-bottom: 15px;
    background-color: rgba(255, 75, 75, 0.1);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 75, 75, 0.3);
}

/* =========================================
   APP LAYOUT (Dashboard & Navigation)
========================================= */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR (Desktop) */
.sidebar {
    width: 250px;
    background-color: var(--card-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-logo {
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links {
    list-style: none;
    padding: 10px 0;
    flex-grow: 1;
}

.nav-links li {
    margin: 5px 15px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-links a i {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.nav-links li.active a, .nav-links a:hover {
    background-color: rgba(0, 210, 255, 0.1);
    color: var(--accent-color);
}

.logout-link {
    color: var(--error-color) !important;
}

/* MAIN CONTENT AREA */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-color);
}

.top-bar {
    padding: 20px 30px;
    background-color: var(--card-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-wrapper {
    padding: 30px;
}

/* DASHBOARD CARDS */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    font-size: 35px;
    color: var(--accent-color);
    margin-right: 20px;
}

.stat-info h3 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-info p {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
}

.widget-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-muted { color: var(--text-muted); }

/* =========================================
   DASHBOARD BUTTON-KARTEN (PC & Handy)
========================================= */
.stat-card.clickable {
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between; /* Schiebt den Pfeil nach ganz rechts */
    align-items: center;
}

/* Leucht-Effekt am PC */
.stat-card.clickable:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.1);
}

/* Das echte "Knopf-drück"-Gefühl fürs Handy! */
.stat-card.clickable:active {
    transform: scale(0.96);
    background-color: #1f2335;
}

/* =========================================
   MOBILE APP NAVIGATION (Echtes iOS/Android Feeling)
========================================= */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        height: 75px; 
        order: 2;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: row;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
        background-color: var(--card-bg);
        box-shadow: 0 -5px 15px rgba(0,0,0,0.5); 
        padding-bottom: env(safe-area-inset-bottom); 
    }
    
    .sidebar-logo { display: none; }
    
    .nav-links {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .nav-links li { margin: 0; flex: 1; }
    
    /* Hier ist die Magie: Icon OBEN, kleiner Text UNTEN */
    .nav-links a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 0;
        font-size: 11px;
        color: var(--text-muted);
        gap: 5px; /* Abstand zwischen Icon und Text */
    }
    
/* 🚨 PANZERKNACKER-FIX FÜR DIE ICONS 🚨 */
.nav-links a i {
    display: block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 24px !important;
    margin: 0 !important;
    visibility: visible !important;
}

.nav-links li.active a i {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}
    
    .main-content {
        order: 1;
        padding-bottom: 90px; 
        background-color: var(--bg-color);
    }
    .content-wrapper { padding: 15px; }
    /* Versteckt den Text in der Navbar auf dem Handy */
    .nav-links a span {
        display: none !important;
    }
    
    /* Macht die Icons dafür schön groß und zentriert sie */
    .nav-links a i {
        font-size: 26px !important;
        margin-bottom: 5px;
    }
}

/* =========================================
   MOBILE FIX: Scroll-Puffer & Adressleiste 
========================================= */
body {
    /* Schafft einen unsichtbaren Platzhalter am Ende der Seite, damit die Navigation nichts verdeckt */
    padding-bottom: 90px; 
}

@media (max-width: 768px) {
    body {
        /* Auf dem Handy etwas mehr Puffer, weil Daumen Platz brauchen */
        padding-bottom: 120px !important; 
    }
    
    /* Verhindert das nervige Springen, wenn die Handy-Adressleiste aufploppt */
    html {
        height: -webkit-fill-available;
    }
}