:root {
    /* ── Paleta institucional SEVCD ── */
    --primary:     #750946;   /* guinda principal */
    --primary-dk:  #5b1237;   /* guinda oscuro */
    --primary-md:  #721e45;   /* guinda medio */
    --primary-lt:  #aa325a;   /* rosa/vino claro */
    --gray-dark:   #636569;   /* gris institucional */
    --gray-mid:    #666666;
    --gray-light:  #999999;
    --off-white:   #f5f5f5;
    --cream:       #ebe5d5;
    --navy:        #343254;   /* azul marino */
    --steel:       #4d6f8d;   /* azul acero */
    --sage:        #577d63;   /* verde salvia */

    /* ── UI (Modo Claro) ── */
    --bg-dark:     #fbf9fa;   /* fondo claro teñido de guinda */
    --bg-card:     #ffffff;   /* card blanca */
    --bg-surface:  #f5f0f2;
    --border:      rgba(117, 9, 70, 0.15);
    --text-main:   #343254;
    --text-muted:  #636569;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fondo animado con tonos institucionales */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 15% 55%, rgba(117, 9, 70, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 20%, rgba(90, 18, 55, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 90%, rgba(52, 50, 84, 0.1) 0%, transparent 40%);
    animation: drift 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes drift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, -20px) rotate(2deg); }
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* Brand */
.brand-section {
    text-align: center;
    margin-bottom: 32px;
}

.brand-logo {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-lt));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 28px rgba(117, 9, 70, 0.45);
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dk);
    letter-spacing: 1px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* Card */
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 16px 48px rgba(117,9,70,0.08);
    backdrop-filter: blur(12px);
}

.login-card h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dk);
    margin-bottom: 24px;
}

/* Inputs */
.form-group { margin-bottom: 16px; }

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

.input-icon { position: relative; }

.input-icon .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.form-control {
    background: rgba(117,9,70,0.02) !important;
    border: 1px solid rgba(117,9,70,0.2) !important;
    color: var(--text-main) !important;
    border-radius: 10px !important;
    padding: 11px 16px 11px 40px !important;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder { color: rgba(99, 101, 105, 0.6) !important; }

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(117, 9, 70, 0.2) !important;
    outline: none;
}

/* Checkbox */
.form-check-input {
    background-color: rgba(117,9,70,0.05) !important;
    border-color: rgba(117,9,70,0.25) !important;
}
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.form-check-label { color: var(--text-muted); font-size: 13px; }

/* Botón */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-lt));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(117, 9, 70, 0.4);
    color: #fff;
}
.btn-login:active { transform: translateY(0); }

/* Secure link */
.secure-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}
.secure-link span { color: var(--text-muted); }
.secure-link a { color: var(--primary-lt); text-decoration: none; }
.secure-link a:hover { text-decoration: underline; }

/* Divisor */
.divider {
    border-top: 1px solid var(--border);
    margin: 20px 0 0;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Acento guinda en selección */
::selection { background: rgba(117, 9, 70, 0.35); }
