/**
 * assets/css/login.css
 *
 * PROPÓSITO: Hoja de estilos exclusiva de la pantalla de inicio de sesión.
 * Comparte los tokens de diseño (variables CSS) del Design System v2
 * pero se mantiene separada para no cargar estilos innecesarios del dashboard.
 */

/* --- TOKENS (mismo sistema de variables que el dashboard) --- */
:root {
    --gold:         #C9A227;
    --gold-dim:     #a07d18;
    --gold-glow:    rgba(201, 162, 39, 0.15);
    --bg:           #0a0a0a;
    --surface:      #141414;
    --surface-2:    #1c1c1c;
    --border:       #262626;
    --text:         #ededed;
    --text-secondary: #a0a0a0;
    --muted:        #6b6b6b;
    --red:          #ef4444;
    --red-dim:      rgba(239, 68, 68, 0.12);
    --radius:       10px;
}

/* --- RESET --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- BODY: Fondo oscuro con patrón sutil --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Efecto de resplandor dorado de fondo */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,162,39,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* --- CONTENEDOR DE LOGIN --- */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px 36px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 80px rgba(201,162,39,0.04);
}

/* --- LOGO --- */
.login-logo {
    width: 140px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 2px 8px rgba(201,162,39,0.15));
}

/* --- TÍTULOS --- */
.login-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 28px;
}

/* --- FORMULARIO --- */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: var(--muted);
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

/* Contenedor para el campo de contraseña + icono ojo */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.password-toggle:hover {
    color: var(--gold);
}

/* --- BOTÓN PRINCIPAL --- */
.btn-login {
    width: 100%;
    padding: 11px 16px;
    background: var(--gold);
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    margin-top: 8px;
}

.btn-login:hover {
    opacity: 0.88;
}

.btn-login:active {
    transform: scale(0.97);
}

/* --- ALERTA DE ERROR --- */
.login-error {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

/* --- SEPARADOR --- */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- PIE DEL LOGIN --- */
.login-footer {
    font-size: 11px;
    color: var(--muted);
    margin-top: 20px;
}

.login-footer strong {
    color: var(--gold);
}
