:root {
    --primary-bg: #800a20;        /* Borgoña ESAN Fondo */
    --esan-red: #e3173e;          /* Rojo Vivo Principal */
    --esan-red-dark: #c40e31;     /* Rojo Hover Botón */
    --bg-gradient: linear-gradient(135deg, #4d0411 0%, #800a20 40%, #b80f32 75%, #e3173e 100%);
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 50px rgba(77, 4, 17, 0.4);
    border-top: 6px solid var(--esan-red);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon {
    width: 68px;
    height: 68px;
    background: rgba(227, 23, 62, 0.1);
    color: var(--esan-red);
    font-size: 2.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    border: 2px solid rgba(227, 23, 62, 0.2);
}

.login-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-bg);
    letter-spacing: 0.5px;
}

.login-header .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.alert-banner {
    background: #fff1f3;
    color: #990b23;
    border: 1px solid #fecdd3;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group label i { color: var(--esan-red); }

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: var(--esan-red);
    box-shadow: 0 0 0 3px rgba(227, 23, 62, 0.15);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 0.95rem;
}
.btn-toggle-pwd:hover { color: var(--esan-red); }

.btn-submit {
    background: var(--esan-red);
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 14px rgba(227, 23, 62, 0.35);
}

.btn-submit:hover:not(:disabled) {
    background: var(--esan-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(227, 23, 62, 0.45);
}

.btn-submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.login-footer p i { color: var(--esan-red); }

.login-footer small {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.hidden {
    display: none !important;
}
