@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* --- VARIABLES LOCALES (Para asegurar consistencia) --- */
:root {
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.8);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;       /* Azul Cyan Neón */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    --error-color: #ef4444;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin: 0;
    overflow: hidden; /* Evita scrollbars innecesarios en login */
}

/* --- FONDO TECH --- */
.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    /* Patrón de Grid Sutil estilo "Plano Digital" */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    z-index: -1;
}

/* --- CONTENEDOR TIPO TARJETA --- */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    margin: 5vh auto 0; /* Un poco de aire arriba */
    padding: 2.5rem;
    
    /* Efecto Vidrio (Glassmorphism) */
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Borde superior brillante */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* TÍTULOS */
.login-wrapper h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    letter-spacing: -1px;
}

.brand-id {
    font-size: 0.4em;
    vertical-align: super;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* --- FORMULARIOS --- */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    color: var(--text-secondary); /* Color más suave para etiquetas */
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.cyber-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Bordes redondeados */
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cyber-input:focus {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.05); /* Sutil tinte azul al enfocar */
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1); /* Anillo de enfoque */
}

.cyber-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* --- BOTONES --- */
.cyber-btn {
    width: 100%;
    padding: 14px;
    margin-top: 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #020617; /* Texto oscuro para contraste */
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-btn:hover {
    background: #7dd3fc; /* Un tono más claro al pasar mouse */
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px); /* Efecto de elevación */
}

.cyber-btn:active {
    transform: translateY(0);
}

/* --- ALERTAS --- */
.error-msg {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- ENLACES --- */
.footer-link, .forgot-link {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-link a, .forgot-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.footer-link a:hover, .forgot-link a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ... (Mantén tus variables y estilos anteriores) ... */

/* --- TÍTULOS Y CABECERA (NUEVO) --- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    margin-top: 5px; /* Pequeño ajuste visual */
}

/* --- FOOTER DEL LOGIN (NUEVO) --- */
.login-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-text-muted {
    opacity: 0.7;
    margin-right: 5px;
}

/* --- PANTALLA DE VERIFICACIÓN (NUEVO) --- */
.verification-card {
    background: rgba(56, 189, 248, 0.05); /* Azul muy sutil */
    border: 1px solid var(--accent-glow);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1rem;
}

.verification-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.verification-title {
    color: #fff;
    margin-top: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.verification-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.verification-note {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* Botón de reenvío elegante */
.resend-btn {
    background: transparent;
    border: 1px solid var(--accent-color); /* Borde delgado Cyan */
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.resend-btn:hover {
    background: rgba(56, 189, 248, 0.1); /* Fondo suave al pasar mouse */
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Mensajes de Éxito (Flash Messages) */
.success-msg {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Contenedor del formulario de reenvío */
.resend-form {
    margin-bottom: 1.5rem;
    text-align: center;
}