/* ============================================================
   LOGIN — Variante A1 Núcleo (NESZ)
   Split: identidad (paper) + formulario (ink)
   ============================================================ */

@import 'tokens.css';

html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }

/* ─── SPLIT LAYOUT ─── */
.login-split {
    display: grid;
    grid-template-columns: 1fr 560px;
    height: 100vh;
    overflow: hidden;
}

/* ─── LEFT — IDENTIDAD ─── */
.login-left {
    background: var(--paper);
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.login-left-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.login-mark {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.04em;
    color: var(--ink);
    line-height: 1;
}

.login-mark-dot { color: var(--ink-60); }

.login-ver {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-60);
    letter-spacing: 0.08em;
}

.login-left-mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
}

.login-heading {
    font-size: 56px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.02;
    margin: 0 0 0;
    max-width: 540px;
}

.login-heading-sub { color: var(--ink-44); }

.login-stats {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 560px;
    border-top: 1px solid var(--ink-16);
}

.login-stat {
    padding: 14px 16px 16px;
    border-right: 1px solid var(--ink-08);
}

.login-stat:last-child { border-right: none; }

.login-stat-val {
    font-size: 22px;
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.login-stat-sub { font-size: 11px; color: var(--ink-60); }

.login-left-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--ink-44);
    margin-top: 40px;
}

/* ─── RIGHT — FORMULARIO ─── */
.login-right {
    background: var(--ink);
    color: var(--paper);
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
}

.login-right-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-session-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--paper-44);
    letter-spacing: 0.12em;
}

.login-session-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--paper-60);
    letter-spacing: 0.08em;
}

.login-dot {
    width: 6px;
    height: 6px;
    background: var(--signal);
    border-radius: 50%;
}

.login-form-header { margin-top: 56px; }

.login-form-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.015em;
    margin: 0;
}

.login-form-sub {
    font-size: 12.5px;
    color: var(--paper-60);
    margin-top: 6px;
    line-height: 1.5;
}

.login-form {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.login-field { }

.login-input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--paper-30);
    outline: none;
    padding: 0 2px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--paper);
    letter-spacing: 0.04em;
}

.login-input::placeholder { color: var(--paper-30); }
.login-input:focus { border-bottom-color: var(--paper); }

.login-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.login-select-faux {
    height: 40px;
    border-bottom: 1px solid var(--paper-30);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    cursor: pointer;
}

.login-totp {
    display: flex;
    gap: 6px;
}

.login-totp-digit {
    width: 32px;
    height: 40px;
    border-bottom: 1px solid var(--paper-30);
    font-family: var(--font-mono);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paper-44);
}

.login-totp-digit.filled {
    border-bottom-color: var(--paper);
    color: var(--paper);
}

/* ─── BUTTON ─── */
.login-btn {
    margin-top: 36px;
    height: 48px;
    background: var(--paper);
    color: var(--ink);
    border: none;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.login-btn:hover { opacity: 0.92; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── FOOTER ─── */
.login-right-foot {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid var(--paper-08);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

/* ─── MESSAGES ─── */
.login-mensaje {
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    display: none;
}

.login-mensaje-error {
    display: block;
    background: var(--alert-soft);
    color: var(--alert);
}

.login-mensaje-success {
    display: block;
    background: var(--signal-soft);
    color: var(--signal-deep);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .login-split {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .login-left {
        padding: 28px 24px;
        gap: 24px;
    }

    .login-heading { font-size: 28px; max-width: 100%; }

    .login-stats {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 24px;
    }

    .login-left-foot {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .login-right { padding: 28px 24px; }

    .login-form-header { margin-top: 28px; }

    .login-form-title { font-size: 18px; }

    .login-field-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 480px) {
    .login-left { padding: 20px 16px; }
    .login-right { padding: 20px 16px; }
    .login-stats { grid-template-columns: 1fr; }
    .login-stat { border-right: none; border-bottom: 1px solid var(--ink-08); padding: 10px 0; }
    .login-stat:last-child { border-bottom: none; }
    .login-heading { font-size: 22px; }
}
