/* fel-login.css — Login enterprise split 68/32 (Sprint IX) */

* { box-sizing: border-box; margin: 0; padding: 0; }

.login-page {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: #FFFFFF;
    color: #111827;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-split {
    display: grid;
    grid-template-columns: 65% 35%;
    min-height: 100vh;
}

@media (min-width: 1280px) {
    .login-split {
        grid-template-columns: 68% 32%;
    }
}

/* ── Panel izquierdo (imagen + textos) ─────────────────────────── */
.login-aside {
    position: relative;
    background-color: #0F172A;
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
    overflow: hidden;
    min-height: 100vh;
}

.login-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10,25,41,.92) 0%, rgba(16,42,67,.85) 35%, rgba(26,58,84,.75) 60%, rgba(13,33,55,.92) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Si hay imagen cargada, el gradiente se suaviza para dejarla ver */
.login-aside.has-image::before {
    background: linear-gradient(160deg, rgba(10,25,41,.55) 0%, rgba(33,85,163,.35) 50%, rgba(13,33,55,.65) 100%);
}

.login-aside-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100vh;
    padding: 60px 60px 32px;
}

@media (min-width: 1280px) {
    .login-aside-inner { padding: 80px 96px 40px; }
}

.login-aside-content {
    margin-top: auto;
    margin-bottom: auto;
    max-width: 520px;
}

.login-aside-title {
    font-family: 'DM Serif Display', serif;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: -.5px;
}

@media (min-width: 1280px) {
    .login-aside-title { font-size: 56px; }
}

.login-aside-sub {
    font-size: 17px;
    line-height: 1.6;
    opacity: .88;
    font-weight: 300;
    max-width: 460px;
}

.login-aside-footer {
    font-size: 13px;
    opacity: .65;
}

/* ── Panel derecho (form) ──────────────────────────────────────── */
.login-main {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.login-spacer { flex: 1; min-height: 32px; }

.login-form-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (min-width: 640px) { .login-form-box { padding: 0 40px; } }
@media (min-width: 1024px) { .login-form-box { padding: 0 48px; } }

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 72px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.login-title-block {
    text-align: center;
    margin-bottom: 32px;
}

.login-welcome-title {
    font-family: 'DM Serif Display', serif;
    font-size: 30px;
    font-weight: 400;
    color: #0F172A;
    letter-spacing: -.5px;
    margin-bottom: 6px;
}

.login-welcome-sub {
    color: #94A3B8;
    font-size: 14px;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field { display: flex; flex-direction: column; }

.login-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.login-label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.forgot-link {
    color: #2155A3;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

.login-input {
    padding: 13px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #F8FAFC;
    color: #0F172A;
    transition: all .15s ease;
    width: 100%;
}

.login-input::placeholder { color: #CBD5E1; }

.login-input:focus {
    outline: none;
    border-color: #94A3B8;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(148,163,184,.15);
}

.login-input[readonly] { background: #F1F5F9; cursor: not-allowed; }

/* Password wrapper con toggle */
.login-password-wrap { position: relative; }
.login-password-wrap .login-input { padding-right: 44px; }

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.toggle-pass:hover { color: #475569; }
.toggle-pass svg { width: 18px; height: 18px; }

.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748B;
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    accent-color: #2155A3;
}

.login-btn {
    background: #2155A3;
    color: #FFFFFF;
    padding: 13px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    margin-top: 4px;
}

.login-btn:hover { background: #1a4485; box-shadow: 0 4px 8px rgba(33,85,163,.2); }
.login-btn:active { transform: scale(.98); }

.login-links { text-align: center; font-size: 13px; margin-top: 8px; }
.login-links a { color: #2155A3; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

.login-error {
    color: #DC2626;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-alert.ok {
    background: #ECFDF5;
    color: #065F46;
    border-left: 3px solid #10B981;
}

/* Powered by abajo del form */
.login-powered {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
    text-align: center;
}

.login-powered-text {
    color: #CBD5E1;
    font-size: 11px;
    letter-spacing: .3px;
}

.login-powered-text strong {
    color: #94A3B8;
    font-weight: 600;
}

/* Footer mobile (powered by repetido abajo cuando no hay panel izq) */
.login-mobile-footer {
    display: none;
    text-align: center;
    padding: 16px;
    color: #CBD5E1;
    font-size: 11px;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .login-split { grid-template-columns: 1fr; grid-template-rows: 1fr; }
    .login-aside { display: none !important; }
    .login-main { min-height: 100vh; padding: 32px 20px; }
    .login-logo img { height: 56px; }
    .login-welcome-title { font-size: 24px; }
    .login-mobile-footer { display: none !important; }
}
    .login-aside { min-height: 240px; }
    .login-aside-inner { padding: 28px 32px 20px; min-height: 240px; }
    .login-aside-title { font-size: 26px; margin-bottom: 8px; }
    .login-aside-sub { font-size: 14px; }
    .login-aside-footer { display: none; }
    .login-main { min-height: calc(100vh - 240px); }
    .login-logo img { height: 56px; }
    .login-welcome-title { font-size: 24px; }
    .login-mobile-footer { display: block; }
}

/* ═════════════════════════════════════════════════════════════════
   Sprint XII post-fix — Reposicionar título del login
   Grilla imaginaria 3×3, textos centrados en el cuadrante [0,0]
   (superior izquierda, 1/9 del panel).
   Ambos textos agrupados y sus tamaños subidos ~2 pts.
   ═════════════════════════════════════════════════════════════════ */

.login-aside-inner {
    display: block !important;
    padding: 0 !important;
    position: relative;
    height: 100%;
    width: 100%;
}

.login-aside-content {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 33.333%;   /* 1 de 3 columnas */
    height: 33.333%;  /* 1 de 3 filas */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 16px !important;
    gap: 8px;
}

.login-aside-title {
    font-size: 34px !important;   /* +2 pts */
    font-weight: 700 !important;
    color: #FFFFFF !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.login-aside-sub {
    font-size: 15px !important;   /* +2 pts */
    color: rgba(255,255,255,.92) !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    text-shadow: 0 1px 8px rgba(0,0,0,.45);
    font-weight: 400;
}

/* En mobile se vuelve a ocultar el aside completo (ya estaba) */
@media (max-width: 1023px) {
    .login-aside-content { display: none !important; }
}

/* Micro-ajuste — letter-spacing para que "Sorteos FEL" respire */
.login-aside-title {
    letter-spacing: 0.8px !important;
    font-weight: 400 !important;  /* DM Serif Display solo tiene 400 */
}
.login-aside-sub {
    letter-spacing: 0.2px !important;
}
