/* PROJECT: FILEMANAGER | V1.1.2 | MODULE: Styles | FILE: public/css/views/login.css */

:root {
    --bg-dark: #0f172a;
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --text-white: #ffffff;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --error: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; }

body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    color: var(--text-white);
}

/* Background Slideshow */
.bg-slideshow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; animation: kenburns 24s infinite; }
.slide-1 { background-image: radial-gradient(circle at top, #1e293b, #0f172a); animation-delay: 0s; }
.slide-2 { background-image: radial-gradient(circle at bottom right, #334155, #0f172a); animation-delay: 8s; }
.slide-3 { background-image: radial-gradient(circle at bottom left, #1e1b4b, #0f172a); animation-delay: 16s; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }

@keyframes kenburns {
    0% { opacity: 0; transform: scale(1); } 5% { opacity: 1; } 33% { opacity: 1; transform: scale(1.1); } 38% { opacity: 0; } 100% { opacity: 0; }
}

/* Auth Container */
.auth-container { width: 100%; max-width: 420px; padding: 20px; perspective: 1000px; z-index: 10; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    color: var(--text-white);
    
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; max-width: 420px;
    
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
    visibility: hidden; opacity: 0;
}

.glass-card.active { visibility: visible; opacity: 1; position: relative; top: auto; left: auto; transform: none; }
.glass-card.hidden { display: none; }

/* FASE 2: Shake Animatie (401 Error) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}
.shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

/* FASE 2: Pulse Animatie (Error Box) */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.pulse { animation: pulse-red 2s infinite; }

/* Branding */
.brand-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; }

.logo-shield {
    width: 70px; height: 80px;
    background: linear-gradient(135deg, rgba(37,99,235,0.9) 0%, rgba(15,23,42,0.95) 100%);
    clip-path: polygon(50% 0%, 100% 15%, 100% 75%, 50% 100%, 0% 75%, 0% 15%);
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 15px; position: relative;
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.5); 
    border-top: 1px solid rgba(255,255,255,0.3);
}

.logo-text {
    font-size: 2rem; font-weight: 900;
    background: linear-gradient(to bottom, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.brand-title {
    font-size: 2rem; font-weight: 800; margin-bottom: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #2563EB 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-align: center;
}

.brand-header p { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; }

/* Inputs */
.form-group { margin-bottom: 20px; position: relative; }
label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }

input {
    width: 100%; padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3); 
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white; font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.btn-peek { position: absolute; right: 12px; top: 42px; background: none; border: none; color: var(--text-muted); cursor: pointer; }
.btn-peek:hover { color: white; }

.caps-warning { font-size: 0.75rem; color: var(--warning); margin-top: 6px; display: none; }
.caps-warning.visible { display: block; }

/* Buttons */
.btn-primary {
    width: 100%; padding: 14px;
    background: var(--primary); color: white;
    border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
    padding: 10px 20px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border); color: var(--text-muted);
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: white; color: white; background: rgba(255,255,255,0.1); }

/* Avatar Upload */
.avatar-section { display: flex; flex-direction: column; align-items: center; margin-bottom: 25px; }
.avatar-preview {
    width: 110px; height: 110px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255,255,255,0.3);
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; overflow: hidden; transition: all 0.3s;
}
.avatar-preview:hover { border-color: var(--primary); background: rgba(37, 99, 235, 0.1); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-text { font-size: 0.8rem; color: var(--text-muted); }

/* Footer */
.card-footer { text-align: center; margin-top: 25px; font-size: 0.9rem; }
.card-footer a { color: #60a5fa; text-decoration: none; font-weight: 500; }
.card-footer a:hover { text-decoration: underline; }

/* Messages */
.msg-box { margin-top: 20px; padding: 12px; border-radius: 8px; text-align: center; font-size: 0.9rem; }
.msg-box.error { background: rgba(220, 38, 38, 0.25); color: #fca5a5; border: 1px solid rgba(220, 38, 38, 0.3); }
.msg-box.success { background: rgba(5, 150, 105, 0.25); color: #6ee7b7; border: 1px solid rgba(5, 150, 105, 0.3); }
.msg-box.hidden { display: none; }

/* Button Loader */
.btn-loader {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%; border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-text.hidden { opacity: 0; }
.hidden { display: none !important; }

/* --- CROPPER MODAL --- */
.cropper-modal {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2147483647; 
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.cropper-modal.hidden { display: none !important; }

.cropper-content {
    background: #1e293b; border: 1px solid rgba(255,255,255,0.2);
    width: auto; max-width: 90%; padding: 25px; border-radius: 16px;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.cropper-wrapper {
    position: relative; width: 300px; height: 300px;
    background-color: #333;
    background-image: 
        linear-gradient(45deg, #444 25%, transparent 25%), 
        linear-gradient(-45deg, #444 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #444 75%), 
        linear-gradient(-45deg, transparent 75%, #444 75%);
    background-size: 20px 20px;
    
    margin: 20px 0; border: 2px solid #555;
    border-radius: 8px; overflow: hidden; 
    touch-action: none; cursor: move;
}

.cropper-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 145px, rgba(0, 0, 0, 0.8) 146px);
    border: 1px solid rgba(255,255,255,0.2); pointer-events: none;
}

.cropper-controls { display: flex; width: 100%; align-items: center; gap: 15px; margin-bottom: 20px; }
.cropper-controls input { height: 6px; padding: 0; background: #475569; }
.cropper-actions { display: flex; gap: 15px; width: 100%; }
.cropper-actions button { flex: 1; }

/* --- FASE 2: Success Exit Animatie --- */
@keyframes exitSuccess {
    0% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: scale(1.05) translateY(-25px); filter: blur(10px); }
}
.exit-success {
    animation: exitSuccess 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards !important;
    pointer-events: none;
}