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

:root {
    --orange:       #F54927;
    --orange-deep:  #c73d1a;
    --orange-light: #ff6b4a;
    --orange-soft:  rgba(245, 73, 39, 0.12);
    --purple:       #352B7F;
    --purple-soft:  rgba(53, 43, 127, 0.1);
    --dark:         #1e1e1e;
    --surface:      #252526;
    --surface-alt:  #2d2d2d;
    --text:         #1a1a1c;
    --text-muted:   #6b7280;
    --text-soft:    #9ca3af;
    --border:       #ececf1;
    --white:        #ffffff;
    --page-bg:      #eff3f9;
    --input-bg:     #fafafa;
    --error-bg:     #fef2f2;
    --error-border: #fecaca;
    --error-text:   #dc2626;
    --radius:       10px;
    --radius-lg:    14px;
    --shadow:       0 8px 32px rgba(26, 26, 28, 0.08);
}

html, body {
    height: 100%;
}

body {
    background: var(--page-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

/* ── Wrapper ─────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 540px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* ── Panel izquierdo ─────────────────────────────────── */
.login-left {
    width: 44%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 40px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--orange);
    pointer-events: none;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(245, 73, 39, 0.08);
    pointer-events: none;
}

.brand-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--orange-light);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 52px;
    height: 52px;
    background: var(--orange);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(245, 73, 39, 0.28);
}

.brand-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-logo i {
    font-size: 22px;
    color: var(--white);
}

.brand-body {
    position: relative;
    z-index: 1;
    margin-top: 28px;
}

.brand-body h2 {
    color: #f3f3f3;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.brand-body p {
    color: #9d9d9d;
    font-size: 0.875rem;
    line-height: 1.65;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
    position: relative;
    z-index: 1;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cccccc;
    font-size: 0.8125rem;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(245, 73, 39, 0.18);
}

/* ── Panel derecho ───────────────────────────────────── */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    background: var(--white);
}

.login-form-box {
    width: 100%;
    max-width: 360px;
}

.login-form-eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    margin-bottom: 8px;
}

.login-form-box h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

.field-group {
    margin-bottom: 18px;
}

.field-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-soft);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.input-wrap input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 42px 0 40px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--input-bg);
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.input-wrap input:hover {
    border-color: #d8d8e0;
}

.input-wrap input:focus {
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--orange-soft);
}

.btn-eye {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 14px;
    padding: 6px;
    line-height: 1;
    transition: color 0.15s;
}

.btn-eye:hover {
    color: var(--orange);
}

.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 0.8125rem;
    color: var(--error-text);
    margin-bottom: 18px;
    line-height: 1.45;
}

.alert-error i {
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 1px;
}

.btn-login {
    width: 100%;
    height: 46px;
    background: var(--orange);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    font-family: inherit;
}

.btn-login:hover {
    background: var(--orange-deep);
    box-shadow: 0 6px 18px rgba(245, 73, 39, 0.28);
}

.btn-login:active {
    transform: scale(0.99);
}

.btn-login:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.biometric-optin {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 4px 0 14px;
    cursor: pointer;
    user-select: none;
}

.biometric-optin input {
    width: 16px;
    height: 16px;
    accent-color: var(--orange);
}

.biometric-section {
    margin-bottom: 8px;
}

.biometric-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--text-soft);
    font-size: 0.75rem;
}

.biometric-divider::before,
.biometric-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-login--outline {
    background: var(--white);
    color: var(--purple);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-login--outline:hover {
    background: var(--purple-soft);
    border-color: rgba(53, 43, 127, 0.22);
    color: var(--purple);
    box-shadow: none;
}

.biometric-btn-icon {
    font-size: 1.1rem;
}

.biometric-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--orange-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.biometric-icon {
    font-size: 34px;
    color: var(--orange);
}

.login-wrapper--compact {
    max-width: 480px;
    min-height: auto;
}

.login-wrapper--compact .login-right {
    width: 100%;
}

.login-right--full {
    width: 100%;
}

.register-status {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 20px 0;
}

/* ── Footer ──────────────────────────────────────────── */
.login-footer {
    font-size: 0.6875rem;
    color: var(--text-soft);
    text-align: center;
    margin-top: 28px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
    body {
        padding: 16px;
        align-items: flex-start;
    }

    .login-wrapper {
        flex-direction: column;
        min-height: auto;
        max-width: 100%;
    }

    .login-left {
        width: 100%;
        padding: 28px 24px;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .login-left::after {
        display: none;
    }

    .brand-body {
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .brand-features {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

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

    .login-form-box {
        max-width: 100%;
    }
}
