:root {
    --bg: #0a0a0a;
    --panel: #121212;
    --border: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --text-dim: #666;
    --accent: #ffffff;
    --danger: #ff4d4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body { background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; }

.login-page { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background: radial-gradient(circle at center, #111 0%, #050505 100%); 
}

.login-card { 
    background: var(--panel); 
    border: 1px solid var(--border); 
    padding: 60px 50px; 
    border-radius: 32px; 
    width: 440px; 
    text-align: center; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.8); 
    animation: loginReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 5px; }
.login-header p { color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 40px; }
.login-body { display: flex; flex-direction: column; }

.password-wrapper {
    position: relative;
    width: 100%;
}

/* FIX: Eye Button Korrektur */
.eye-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-75%); /* Zentriert es vertikal im Input (abzüglich margin-bottom) */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 24px !important;
    height: 24px !important;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: none !important; /* Verhindert das Hüpfen */
}

.eye-btn:hover {
    transform: translateY(-75%) !important; /* Verhindert das globale translateY(-1px) */
    opacity: 1 !important;
}

.eye-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-dim);
    transition: stroke 0.2s;
}

.eye-btn:hover svg {
    stroke: var(--text);
}

input { 
    background: #1a1a1a; 
    border: 1px solid var(--border); 
    color: white; 
    padding: 15px; 
    border-radius: 12px; 
    width: 100%; 
    margin-bottom: 15px; 
    outline: none; 
    transition: 0.2s; 
}

input:focus { border-color: rgba(255,255,255,0.2); background: #222; }

.login-submit-btn { 
    background: var(--accent); 
    color: black; 
    border: none; 
    padding: 16px; 
    border-radius: 14px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s; 
    font-size: 0.9rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-page { width: 100%; display: flex; flex-direction: row; height: 100vh; }

.sidebar { width: 260px; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 30px; flex-shrink: 0; }
.sidebar-brand h2 { font-weight: 800; letter-spacing: -1px; }
.sidebar-brand span { color: var(--text-dim); font-size: 0.7rem; font-weight: 700; }

.nav-item { padding: 12px 15px; border-radius: 10px; color: var(--text-dim); cursor: pointer; margin-top: 10px; transition: 0.2s; font-weight: 500; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,0.05); color: white; }

.admin-separator { font-size: 0.6rem; color: #333; margin: 30px 0 10px 15px; text-transform: uppercase; letter-spacing: 2px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.03); padding-bottom: 5px; }

.content { flex-grow: 1; padding: 40px; display: flex; justify-content: center; align-items: center; overflow: hidden; height: 100%; }

.glass-panel { width: 100%; max-width: 1000px; height: 85vh; background: var(--panel); border: 1px solid var(--border); border-radius: 24px; display: flex; flex-direction: column; }
.panel-header { padding: 30px 40px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 30px; }

.header-left { display: flex; align-items: center; gap: 25px; flex-grow: 1; }
.search-container { position: relative; display: flex; align-items: center; background: #1a1a1a; border: 1px solid var(--border); border-radius: 14px; padding: 0 12px; width: 320px; transition: 0.2s; }
.search-container:focus-within { border-color: rgba(255,255,255,0.2); }
.search-container input { background: transparent; border: none; margin-bottom: 0; padding: 14px 10px; width: 100%; color: white; outline: none; font-size: 0.9rem; }

.filter-btn { color: var(--text-dim); padding: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.filter-btn:hover { color: white; transform: scale(1.1); }

button { background: var(--accent); color: black; border: none; padding: 16px 32px; border-radius: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; font-size: 0.9rem; }
button:hover:not(:disabled) { opacity: 0.8; transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spezifischere Regeln um Eye-Button von globalen Button-Styles zu schützen */
.eye-btn:hover:not(:disabled) { transform: translateY(-75%) !important; opacity: 1; }

.btn-secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--border); }
.btn-danger { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; border: 1px solid rgba(255, 77, 77, 0.2); }

.btn-icon { background: transparent; color: var(--text-dim); padding: 5px; font-size: 1.1rem; }
.btn-icon:hover { color: white; background: rgba(255,255,255,0.05); }

.dropdown-menu {
    position: absolute; top: calc(100% + 12px); right: 0; background: #1a1a1a; border: 1px solid var(--border); border-radius: 14px;
    width: 240px; display: none; flex-direction: column; z-index: 100; box-shadow: 0 20px 40px rgba(0,0,0,0.6); padding: 10px;
}
.dropdown-menu.show { display: flex; animation: fadeIn 0.2s ease-out; }
.dropdown-item { padding: 12px 16px; border-radius: 10px; font-size: 0.85rem; cursor: pointer; color: var(--text-dim); transition: 0.2s; }
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: white; }
.dropdown-divider { height: 1px; background: var(--border); margin: 8px 0; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(12px); display: none; justify-content: center; align-items: center; z-index: 1000; opacity: 0; transition: 0.3s; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { background: #1a1a1a; padding: 40px; border-radius: 32px; width: 440px; border: 1px solid var(--border); }
.modal-label { display: block; font-size: 0.7rem; font-weight: 700; color: var(--text-dim); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.modal-footer { display: flex; gap: 12px; margin-top: 30px; }

.toast { position: fixed; bottom: 30px; right: 30px; background: white; color: black; padding: 16px 32px; border-radius: 16px; font-weight: 700; opacity: 0; transform: translateY(20px); transition: 0.4s; z-index: 2000; }
.toast.show { opacity: 1; transform: translateY(0); }

.drop-zone { border: 2px dashed #333; padding: 50px 20px; border-radius: 24px; margin-bottom: 25px; text-align: center; color: var(--text-dim); cursor: pointer; transition: 0.2s; }
.drop-zone.drag-active { border-color: #fff; background: rgba(255,255,255,0.05); color: #fff; transform: scale(1.02); }

#progress-container { width: 100%; background: #000; border-radius: 14px; height: 50px; margin: 25px 0; display: none; position: relative; overflow: hidden; border: 1px solid #222; }
.progress-text-base { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; letter-spacing: 1px; z-index: 1; pointer-events: none; }
#progress-text-bg { color: #444; }
#progress-text-fg { color: #000; z-index: 3; clip-path: inset(0 100% 0 0); }
#progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: #e0e0e0; z-index: 2; transition: width 0.1s linear; }

#main-display { flex-grow: 1; overflow-y: auto; padding: 20px 40px; transition: opacity 0.3s ease; }
.list-item { display:flex; justify-content:space-between; align-items:center; padding:22px 0; border-bottom:1px solid var(--border); transition: 0.2s; }
.list-item:hover { background: rgba(255,255,255,0.01); }
.item-title { font-weight:600; font-size:0.95rem; }
.item-sub { color:var(--text-dim); font-size:0.75rem; opacity:0.6; }

.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn-spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.1); border-top-color: #000; border-radius: 50%; animation: spin 0.6s linear infinite; }

.storage-card { background:rgba(255,255,255,0.03); padding:24px; border-radius:20px; border:1px solid var(--border); display:flex; align-items:center; gap:25px; margin-bottom:30px; }
.pie-chart { --p: 0; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,0.1) 0); display: flex; align-items: center; justify-content: center; transition: 0.5s; }
.pie-inner { width: 52px; height: 52px; background: #121212; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loginReveal { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* --- MOBILE FIXES --- */
@media (max-width: 768px) {
    body { height: 100vh; overflow: hidden; position: fixed; width: 100%; }

    .login-card { 
        width: 94% !important; 
        padding: 40px 20px !important; 
        margin: auto;
    }

    .dashboard-page { flex-direction: column; height: 100vh; }

    .sidebar { 
        width: 100%; 
        height: 65px; 
        flex-direction: row; 
        padding: 0; 
        order: 2; 
        border-right: none;
        border-top: 1px solid var(--border);
        background: #111;
    }
    
    .sidebar-brand, .admin-separator { display: none; }
    
    .nav-item { 
        margin: 0; 
        flex: 1; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        border-radius: 0;
        font-size: 0.8rem;
    }

    .content { 
        height: calc(100vh - 65px); 
        padding: 10px; 
        order: 1;
        display: block; 
        overflow-y: auto;
    }

    .glass-panel { 
        height: auto; 
        min-height: 100%;
        max-width: 100%;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .panel-header { 
        padding: 20px 15px; 
        flex-direction: column; 
        align-items: stretch;
        gap: 15px;
    }

    .header-left { flex-direction: column; gap: 10px; }
    .search-container { width: 100% !important; }
    
    #main-display { 
        padding: 0 15px 20px 15px; 
        height: auto;
        overflow: visible; 
    }

    .list-item { 
        flex-direction: column; 
        align-items: flex-start; 
        padding: 20px 0; 
        gap: 12px;
    }

    .list-item > div:last-child { 
        width: 100%; 
        display: flex; 
        gap: 8px; 
    }

    .list-item button { flex: 1; }

    .storage-card { 
        flex-direction: column; 
        padding: 20px; 
        gap: 15px;
        text-align: center;
    }

    .modal-content { 
        width: 95% !important; 
        padding: 25px 15px; 
    }
}