/* =====================================================
   eQuis ERP - LOGIN & RECOVERY (ESTILO CORPORATIVO)
   ===================================================== */

:root {
    --navy: #1a3a5c;
    --navy-light: #2c5282;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --white: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --border: #e2e8f0;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.03);
}

body.login {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 20px;
}

/* El antiguo header ahora es invisible o se puede quitar del PHP */
.cabecera {
    display: none !important;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.formulario-login {
    padding: 40px 35px;
}

/* Logo refinado */
.escudo-login {
    height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 25px auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease;
}

.escudo-login:hover {
    transform: scale(1.05);
}

.titulo-principal {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitulo {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Estilo de los campos */
.formulario-login .form-control {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background-color: #fcfcfc;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.formulario-login .form-control:focus {
    border-color: var(--navy);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.1);
    outline: none;
}

/* Opciones extras */
.opciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 0.85rem;
}

.opciones label {
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recuperar {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.recuperar:hover {
    color: var(--navy);
    text-decoration: underline;
}

/* Botones principales */
.btn-primary {
    background: var(--navy);
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.2);
}

.btn-primary:hover {
    background: var(--navy-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 58, 92, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mensajes de error/éxito */
.mensaje-login {
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: left;
}

.mensaje-login.error,
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.mensaje-login.exito,
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Ajuste específico para el link volver */
.link-volver {
    display: inline-block;
    margin-top: 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.link-volver:hover {
    color: var(--navy);
}

/* Spinner animado */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* =====================================================
   REGLAS DE VALIDACIÓN DE CONTRASEÑA (Checklist)
   ===================================================== */
#passRules li {
    margin-bottom: 2px;
}

#passRules li.ok {
    color: #198754;
}

#passRules li.bad {
    color: #dc3545;
}