body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f4f7fb;
    font-family: 'Open Sans', sans-serif;
}

/* ── NAVBAR ── */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: white;
    border-bottom: 1px solid rgba(0, 51, 102, 0.1);
    box-shadow: 0 1px 4px rgba(0, 51, 102, 0.06);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8a9bb0;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-back:hover {
    color: #003366;
}

/* ── LAYOUT SPLIT ── */
.auth-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── PANEL IZQUIERDO (branding) ── */
.auth-aside {
    background: var(--header-grad);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

@media (min-width: 900px) {
    .auth-aside {
        padding: 4rem 3rem 3.5rem;
    }
}

.auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.07) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.aside-content {
    position: relative;
    z-index: 1;
}

.aside-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

@media (min-width: 900px) {
    .aside-badge {
        margin-bottom: 2rem;
    }
}

.aside-badge em {
    font-style: normal;
    color: var(--accent-color);
}

.aside-title {
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    line-height: 1.15;
    margin-bottom: 1rem;
}

@media (min-width: 900px) {
    .aside-title {
        font-size: 2.8rem;
    }
}

.aside-title em {
    font-style: normal;
    color: var(--accent-color);
}

.aside-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
    .aside-desc {
        margin-bottom: 2.5rem;
    }
}

.aside-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.aside-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
}

.feat-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.aside-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 1.5rem 0;
}

@media (min-width: 900px) {
    .aside-divider {
        margin: 2.5rem 0;
    }
}

.aside-switch {
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.55);
}

.aside-switch a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.aside-switch a:hover {
    text-decoration: underline;
}

/* ── PANEL DERECHO (formulario) ── */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.auth-box {
    width: 100%;
    max-width: 440px;
}

.auth-box-header {
    margin-bottom: 2rem;
}

.auth-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(33, 161, 216, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(33, 161, 216, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: none;
    /* Oculto por solicitud */
}

.auth-box-title {
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 2.2rem;
    color: #003366;
    margin: 0 0 0.3rem;
    line-height: 1.1;
}

.auth-box-sub {
    font-size: 0.88rem;
    color: #8a9bb0;
}

/* ── FORM ── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: #1a2d42;
    letter-spacing: 0.02em;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.93rem;
    box-sizing: border-box;
    background: white;
    color: #1a2d42;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(33, 161, 216, 0.15);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    color: #8a9bb0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--accent-color);
}

.btn-submit {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 9999px;
    background: var(--btn-grad);
    color: white;
    font-weight: 700;
    font-size: 0.97rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--btn-shadow);
    transition: filter 0.2s, transform 0.2s;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: #cbd5e1;
    font-size: 0.78rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.switch-mode {
    text-align: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #8a9bb0;
    margin-top: 1.5rem;
}

.switch-mode a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
}

.switch-mode a:hover {
    text-decoration: underline;
}

.alert-error {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.84rem;
    margin-bottom: 1.25rem;
    display: none;
    border: 1px solid #fecaca;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-error-inner {
    display: none;
}

.alert-success {
    padding: 1rem;
    border-radius: 12px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.two-col {
    display: flex;
    gap: 1rem;
}

.two-col .form-group {
    flex: 1;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── SPINNER ── */
.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ── PASSWORD STRENGTH METER ── */
.pw-strength-wrap {
    margin-top: 0.6rem;
}

.pw-strength-bar {
    height: 5px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width 0.35s ease, background 0.35s ease;
}

.pw-strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    transition: color 0.3s;
}

.pw-rules {
    margin-top: 0.5rem;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 0.75rem;
}

.pw-rules li {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.pw-rules li.pass {
    color: #10b981;
}

.pw-rules li .icon {
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
