/* --- FUNDAMENT: ABSOLUTE TIEFE --- */
/* --- FUNDAMENT: ABSOLUTE TIEFE --- */
:root {
    --deep-obsidian: #010403;
    --emerald-shadow: #040d0a;
    --gold-champagne: #c5a059;
    --gold-mute: #8c7345;
    --text-silver: #e2e8f0;
    --white: #ffffff;
    --shadow-heavy: 0 40px 100px rgba(0, 0, 0, 0.9);
    --danger-red: #ff4d4d;
    --success-green: #2ecc71;
}

* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at 50% -10%, #08201a 0%, var(--deep-obsidian) 80%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-silver);
}

/* --- CONTAINER-SYSTEM --- */
.login-container, .dashboard-container {
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.8s ease;
}

/* --- KARTEN-STIL (PREMIUM CARD) --- */
.premium-card {
    background: var(--emerald-shadow);
    border: 1px solid rgba(197, 160, 89, 0.12);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}
/* Hover Effekt für klickbare Karten */
.nav-button .premium-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-champagne);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.1);
}

.premium-card::after {
    content: "";
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-champagne), transparent);
}

h1, h2, h3 { color: var(--gold-champagne); font-weight: 400; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px; }
p { color: var(--gold-mute); font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; }

/* --- NAVIGATION GRID --- */
#navGrid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile First: 1 Spalte */
    gap: 15px;
    margin-top: 20px;
}
@media (min-width: 400px) {
    #navGrid { grid-template-columns: 1fr 1fr; } /* Tablet: 2 Spalten */
}

/* --- BUTTONS --- */
button {
    width: 100%;
    background: transparent;
    color: var(--gold-champagne);
    border: 1px solid var(--gold-champagne);
    padding: 15px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    outline: none;
}
button:hover {
    background: rgba(197, 160, 89, 0.1);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-cancel { border-color: #666 !important; color: #888 !important; }
.btn-cancel:hover { border-color: #fff !important; color: #fff !important; }

.btn-confirm { background: var(--gold-champagne) !important; color: #000 !important; border:none !important; }
.btn-confirm:hover { background: #fff !important; box-shadow: 0 0 15px rgba(255,255,255,0.5); }

/* --- INPUTS --- */
input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    padding: 12px;
    color: var(--white);
    font-size: 0.9rem;
    outline: none;
    border-radius: 4px;
    transition: 0.3s ease;
}
input:focus { border-color: var(--gold-champagne); background: #0a0a0a; }

/* --- MODAL SYSTEM (WICHTIG!) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.modal-box {
    background: #0a0a0a;
    border: 1px solid var(--gold-champagne);
    padding: 30px;
    border-radius: 12px;
    width: 90%; max-width: 450px;
    text-align: center;
    box-shadow: 0 0 60px rgba(197, 160, 89, 0.1);
    display: flex; flex-direction: column; gap: 20px;
    max-height: 90vh; overflow-y: auto;
}
.modal-box.large { max-width: 600px; }

/* --- LISTEN DESIGN (RÜST LISTE) --- */
.ruest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    text-align: left;
}
.ruest-item-info { flex-grow: 1; margin-right: 15px; } /* Platzhalter für Text */
.ruest-item-title { display: block; color: white; font-weight: bold; font-size: 1rem; margin-bottom: 5px; }
.ruest-item-meta { display: block; color: #888; font-size: 0.75rem; }
.ruest-highlight { color: var(--gold-champagne); }

.ruest-btn {
    width: auto;
    padding: 8px 15px;
    font-size: 0.7rem;
    background: var(--gold-champagne);
    color: black;
    border: none;
    font-weight: bold;
}
.ruest-btn:hover { background: white; transform: none; }

/* --- RÜST RECHNER (SPLIT VIEW) --- */
.master-input-container { border-bottom: 1px solid #333; padding-bottom: 20px; margin-bottom: 10px; }
.master-input { font-size: 3.5rem; text-align: center; background: transparent; border: none; font-weight: bold; }
.split-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; background: #111; padding: 15px; border-radius: 8px; border: 1px solid #333; }
.split-box label { font-size: 0.6rem; color: #888; display: block; margin-bottom: 5px; }
.split-box input { text-align: center; font-size: 1.2rem; font-weight: bold; color: var(--gold-champagne); border: 1px solid #444; }

/* --- UTILITIES --- */
.hidden { display: none !important; }
.status-bar { display: flex; justify-content: space-between; margin-bottom: 20px; font-size: 0.7rem; letter-spacing: 2px; color: #666; }
.user-highlight { color: var(--white); font-weight: bold; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* --- OVERLAY SYSTEM (MODAL) --- */
.overlay, .modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Dunklerer Hintergrund für Fokus */
    backdrop-filter: blur(8px);      /* Edler Weichzeichner */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

/* Die neue, edle Box */
.modal-box {
    background: linear-gradient(145deg, #111, #0a0a0a);
    border: 1px solid var(--gold-champagne);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(197, 160, 89, 0.15);
    position: relative;
}

/* Titel im Modal */
.modal-box h3 {
    color: var(--gold-champagne);
    font-weight: 200;
    letter-spacing: 4px;
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding-bottom: 15px;
}

/* Das Eingabefeld (Riesig & Zentral) */
.qty-display {
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: var(--white);
    font-size: 3.5rem; /* Sehr groß für gute Lesbarkeit */
    font-weight: 600;
    text-align: center;
    width: 100%;
    margin: 10px 0 30px 0;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
}

.qty-display:focus {
    border-bottom-color: var(--gold-champagne);
    transform: scale(1.05);
}

.qty-display::placeholder {
    color: #333;
    font-size: 1.5rem;
    vertical-align: middle;
}

/* Das Ergebnis (Berechnung) */
.calc-result {
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #888;
}

.calc-highlight {
    display: block;
    margin-top: 10px;
    color: var(--success-green); /* Grün für Bestätigung */
    font-size: 1.1rem;
    font-weight: bold;
}

/* Modal Buttons */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-cancel {
    border: 1px solid #444 !important;
    color: #888 !important;
}
.btn-cancel:hover {
    border-color: #666 !important;
    color: white !important;
}

.btn-confirm {
    background: var(--gold-champagne) !important;
    color: #000 !important;
    border: 1px solid var(--gold-champagne) !important;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}
.btn-confirm:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.6);
}

/* Rüst-Liste Scrollbar */
#ruestListContainer {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-mute) transparent;
}

/* --- USER STATISTIK MODAL --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-card h4 {
    color: #888;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-card .val {
    color: var(--gold-champagne);
    font-size: 1.5rem;
    font-weight: bold;
}

.history-list {
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid #333;
    margin-top: 15px;
    padding-top: 10px;
}

.history-entry {
    font-size: 0.75rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ccc;
}
.history-entry span { display: block; color: #666; font-size: 0.65rem; }

/* =========================================
   NEU: STYLES FÜR SPLIT-INPUT (RÜSTEN)
   ========================================= */
.split-input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
}

.input-row label {
    flex: 1;
    font-size: 0.8rem;
    color: #ccc;
    margin: 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-row input {
    width: 80px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gold-champagne);
    color: var(--white);
    font-size: 1.2rem;
    text-align: center;
    padding: 5px;
    outline: none;
}

.total-display {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #333;
    padding-top: 15px;
}

/* =========================================
   NEU: STYLES FÜR DETAILLIERTE STATISTIK
   ========================================= */
.stats-detail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-detail-item {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(197, 160, 89, 0.15);
    padding: 12px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-detail-item .label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-detail-item .value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold-champagne);
    margin-top: 5px;
}

/* --- BI-DIREKTIONALES RÜST-MODAL --- */

/* Das Hauptfeld oben (Gesamtmenge) */
.master-input-container {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding-bottom: 20px;
}

.master-input-label {
    font-size: 0.7rem;
    color: var(--gold-champagne);
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.master-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: white;
    font-size: 3rem; /* RIESIG */
    font-weight: bold;
    text-align: center;
    width: 60%;
    outline: none;
    transition: 0.3s;
}

.master-input:focus {
    border-color: var(--gold-champagne);
}

/* Der "Entspricht" Pfeil */
.convert-arrow {
    text-align: center;
    color: #666;
    font-size: 1.5rem;
    margin: -35px 0 15px 0; /* Schiebt es genau zwischen die Bereiche */
    background: #111; /* Verdeckt die Linie */
    width: 40px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
}

/* Die untere Sektion (Aufteilung) */
.split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

.split-box {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.split-box label {
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 5px;
}

.split-box input {
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    color: var(--gold-champagne);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
}

.split-box input:focus {
    border-color: var(--gold-champagne);
}

/* --- PREMIUM MODAL DESIGN (FIXED) --- */

/* Hintergrund */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
}

/* Die Box selbst */
.modal-box {
    background: linear-gradient(145deg, #111, #080808);
    border: 1px solid var(--gold-champagne);
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 60px rgba(197, 160, 89, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Abstand zwischen Elementen */
}

/* Titel & Info */
.modal-box h3 {
    margin: 0; color: var(--gold-champagne); font-weight: 200; letter-spacing: 3px;
    text-transform: uppercase; font-size: 1.1rem;
}
#packInfoText {
    margin: 0; color: #666; font-size: 0.7rem; border-bottom: 1px solid #222; padding-bottom: 15px;
}

/* OBERER BEREICH (TOTAL) */
.master-input-container {
    display: flex; flex-direction: column; align-items: center;
    margin-bottom: 5px;
}
.master-input-label {
    font-size: 0.6rem; color: var(--gold-mute); letter-spacing: 1.5px; margin-bottom: 5px;
}
.master-input {
    background: transparent; border: none; border-bottom: 2px solid #333;
    color: white; font-size: 3.5rem; font-weight: 700; text-align: center;
    width: 100%; outline: none; transition: 0.3s; padding: 5px 0;
}
.master-input:focus { border-color: var(--gold-champagne); }

/* PFEIL */
.convert-arrow {
    font-size: 1.2rem; color: #444; margin: -10px 0; 
}

/* UNTERER BEREICH (SPLIT) */
.split-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    background: rgba(255,255,255,0.02);
    border: 1px solid #222; border-radius: 8px; padding: 15px;
}

.split-box {
    display: flex; flex-direction: column; text-align: left;
}
.split-box label {
    font-size: 0.55rem; color: #888; margin-bottom: 8px; 
    display: flex; align-items: center; gap: 5px;
}
.split-box input {
    background: #0f0f0f; border: 1px solid #333; color: var(--gold-champagne);
    font-size: 1.3rem; font-weight: bold; text-align: center;
    padding: 10px; border-radius: 4px; outline: none;
    width: 100%; box-sizing: border-box;
}
.split-box input:focus { border-color: var(--gold-champagne); }

/* BUTTONS */
.modal-actions {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 10px;
}
.btn-cancel {
    background: transparent; border: 1px solid #333; color: #666; padding: 12px;
}
.btn-confirm {
    background: linear-gradient(135deg, #c5a059 0%, #9e7e40 100%); 
    border: none; color: #000; font-weight: bold; padding: 12px;
}
/* --- NEUE GRID LOGIK FÜR MITARBEITER --- */

/* Der Container für das Grid */
#navGrid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Immer 2 Spalten */
    gap: 15px;
    margin-top: 20px;
}

/* Die Klasse für den großen Button */
.span-full {
    grid-column: 1 / -1; /* Geht von der ersten bis zur letzten Linie (volle Breite) */
}

/* Spezielles Styling für den Hero-Button (Rüsten) */
.span-full .premium-card {
    background: linear-gradient(145deg, rgba(224, 224, 224, 0.08), #0a0a0a);
    padding: 40px; /* Mehr Platz */
    border-color: var(--gold-champagne);
}

.span-full h2 {
    font-size: 1.4rem; /* Größere Schrift */
    margin-bottom: 5px;
}

/* Damit die Icons/Emojis im Design nicht stören, machen wir sie optional größer */
.big-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
}