/* RESET E VARIÁVEIS GLOBAIS INDEPENDENTES */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-color: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --overlay-color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --glass-bg: rgba(20, 20, 20, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --overlay-color: rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* BACKGROUND TRANSLÚCIDO */
.background-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; z-index: -2;
}
.background-wrapper::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay-color); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: -1;
}

/* HEADER DO LOGIN */
.glass-header {
    width: 100%; position: fixed; top: 0; z-index: 100;
    background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border);
}
.header-content { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo h1 { font-size: 1.25rem; font-weight: 700; }
.logo span { font-weight: 400; color: var(--text-secondary); }
.header-actions { display: flex; align-items: center; gap: 16px; }

/* BOTÕES GERAIS */
.btn { padding: 10px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-primary { background: var(--primary-color); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-icon { background: transparent; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; }

/* SESSÃO CENTRAL DE LOGIN (COM AJUSTE DE CENTRALIZAÇÃO) */
.login-section { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding-top: 100px; 
    padding-bottom: 60px; 
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-panel { 
    width: 100%; 
    max-width: 480px; 
    margin: 0 auto; 
    padding: 48px; 
    background: var(--glass-bg); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); 
    border-radius: 16px; 
    box-shadow: 0 25px 50px var(--glass-shadow); 
}

.login-header { text-align: center; margin-bottom: 32px; }
.badge { color: var(--primary-color); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 16px; }
.login-title { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.login-subtitle { font-size: 0.95rem; color: var(--text-secondary); }

/* FORMULÁRIO */
.form-group { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.forgot-password-link { font-size: 0.85rem; color: var(--primary-color); font-weight: 500; }

.input-wrapper { position: relative; width: 100%; }
input[type="email"], input[type="password"] {
    width: 100%; padding: 14px 16px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border); border-radius: 8px; color: var(--text-primary);
    font-family: 'Inter', sans-serif; font-size: 0.95rem; outline: none;
}
input[type="email"]:focus, input[type="password"]:focus { border-color: var(--primary-color); }
[data-theme="light"] input[type="email"], [data-theme="light"] input[type="password"] { background: rgba(0, 0, 0, 0.02); }

.password-wrapper input { padding-right: 48px; }
.btn-toggle-password { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 12px; }

/* CHECKBOX */
.form-options { margin-bottom: 28px; }
.checkbox-container { display: block; position: relative; padding-left: 28px; cursor: pointer; font-size: 0.85rem; color: var(--text-secondary); user-select: none; }
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { position: absolute; top: 0; left: 0; height: 18px; width: 18px; background-color: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-radius: 4px; }
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary-color); border-color: var(--primary-color); }
.checkmark:after { content: ""; position: absolute; display: none; left: 5px; top: 2px; width: 5px; height: 9px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checkbox-container input:checked ~ .checkmark:after { display: block; }

/* ALERTAS E BOTÃO FULL */
.btn-full { width: 100%; padding: 14px; }
.alert-box { padding: 12px 16px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; margin-bottom: 20px; border: 1px solid transparent; }
.alert-box.error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #ef4444; }
.alert-box.success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #10b981; }
.hidden { display: none !important; }

/* SPINNER */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; margin-left: 10px; display: inline-block;}
@keyframes spin { to { transform: rotate(360deg); } }

/* FOOTER */
.main-footer { text-align: center; padding: 30px 20px; background: rgba(0, 0, 0, 0.8); color: #888; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.05); }
.main-footer strong { color: var(--primary-color); }

@media (max-width: 576px) {
    .login-panel { padding: 32px 24px; margin: 16px; }
    .login-title { font-size: 1.75rem; }
}