/* ── Novecento Sans Wide ── */
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideBook.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideLight.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideMedium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideDemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideBold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Novecento Wide'; src: url('tipografias/Novecento%20Sans%20Wide/Novecento%20WideUltraBold.otf') format('opentype'); font-weight: 800; font-style: normal; font-display: swap; }

/* ── BC Novatica CYR ── */
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'BC Novatica'; src: url('tipografias/BC%20Novatica%20CYR/BC_Novatica_CYR_Bold_Italic.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }

/* Fallback Google Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* =============================================
   ECOS Escuela – Estilos
   Titulares: Novecento Sans Wide | Texto: BC Novatica CYR
   Brand: #1a24a0 azul | #e63329 rojo | #febc00 amarillo
   ============================================= */

/* ══════════════════════════════
   MODAL LOGIN
══════════════════════════════ */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,15,40,0.65);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.login-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.login-modal {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 520px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34,1.3,0.64,1), opacity 0.3s;
    position: relative;
}

.login-overlay.open .login-modal {
    transform: translateY(0) scale(1);
}

/* Botón cerrar */
.login-close {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, transform 0.2s;
}
.login-close:hover { background: #f0f0f0; transform: rotate(90deg); }
.login-close svg { width: 16px; height: 16px; stroke: #444; }

/* Panel izquierdo — branding */
.login-brand {
    background: linear-gradient(145deg, #262b6f 0%, #1a1e55 100%);
    color: #fff;
    width: 300px;
    flex-shrink: 0;
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(254,188,0,0.10);
    bottom: -80px; right: -80px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -60px; left: -40px;
}

.login-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    object-position: left;
    position: relative;
    z-index: 1;
}

.login-brand h2 {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 1;
}

.login-brand p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.75);
    margin: 0;
    position: relative;
    z-index: 1;
}

.login-brand-stats {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.login-brand-stats div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-brand-stats strong {
    font-size: 1.4rem;
    font-weight: 900;
    color: #febc00;
}

.login-brand-stats span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Panel derecho — formulario */
.login-form-panel {
    flex: 1;
    padding: 40px 44px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.login-tabs {
    display: flex;
    gap: 0;
    background: #f3f4f8;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.login-tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: none;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    color: #888;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.login-tab.active {
    background: #fff;
    color: #262b6f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* Formulario */
.login-form {
    display: none;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.login-form.active { display: flex; }

.login-form h3 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1a1e55;
    margin: 0 0 4px;
}

/* Grupos de campo */
.lf-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lf-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #444;
}

.lf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lf-input-wrap > svg:first-child {
    position: absolute;
    left: 12px;
    width: 16px; height: 16px;
    stroke: #aaa;
    pointer-events: none;
    flex-shrink: 0;
}

.lf-input-wrap input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    border: 1.5px solid #e2e4ed;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    color: #222;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fafafa;
}

.lf-input-wrap input:focus {
    border-color: #262b6f;
    box-shadow: 0 0 0 3px rgba(38,43,111,0.10);
    background: #fff;
}

.lf-input-wrap input.error { border-color: #e53e3e; }
.lf-input-wrap input.success { border-color: #38a169; }

/* Botón ojo */
.lf-eye {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.lf-eye svg { width: 16px; height: 16px; stroke: #aaa; transition: stroke 0.2s; }
.lf-eye:hover svg { stroke: #262b6f; }

/* Error */
.lf-error {
    font-size: 0.75rem;
    color: #e53e3e;
    display: none;
}

.lf-group.has-error .lf-error { display: block; }
.lf-group.has-error input { border-color: #e53e3e; }

/* Fila recuérdame + olvidé */
.lf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.lf-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
}

.lf-check input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #262b6f;
    cursor: pointer;
}

.lf-forgot {
    font-size: 0.82rem;
    color: #262b6f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.lf-forgot:hover { color: #febc00; }

/* Botón submit */
.lf-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #262b6f, #3b42a3);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 14px rgba(38,43,111,0.30);
    margin-top: 4px;
}
.lf-submit svg { width: 16px; height: 16px; }
.lf-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,43,111,0.40);
    background: linear-gradient(135deg, #1a1e55, #262b6f);
}
.lf-submit:active { transform: translateY(0); }

/* Divider */
.lf-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #bbb;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.lf-divider::before,
.lf-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7f0;
}

/* Social buttons */
.lf-socials {
    display: flex;
    gap: 10px;
}

.lf-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1.5px solid #e2e4ed;
    border-radius: 10px;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.lf-social svg { width: 18px; height: 18px; }
.lf-social:hover { border-color: #262b6f; background: #f7f8ff; transform: translateY(-1px); }

/* Dos columnas en signup */
.lf-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Barra de fortaleza de contraseña */
.lf-strength {
    height: 4px;
    background: #e5e7f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

#strengthFill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.lf-terms a { color: #262b6f; font-weight: 700; text-decoration: none; }
.lf-terms a:hover { color: #febc00; }

/* Responsive */
@media (max-width: 680px) {
    .login-brand { display: none; }
    .login-form-panel { padding: 32px 24px; }
    .lf-row-2 { grid-template-columns: 1fr; }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body, html {
    margin: 0;
    padding: 0;
    font-family: 'BC Novatica', 'Plus Jakarta Sans', Arial, sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Novecento Wide', 'Plus Jakarta Sans', Arial, sans-serif;
    letter-spacing: 0.03em;
}