/* Login — alineado con dashboard (sidebar, cards, tokens) */

.auth-body {
    min-height: 100vh;
    background: var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.05fr);
}

/* Panel izquierdo = mismo ADN que sidebar del dashboard */
.auth-aside {
    position: relative;
    background: var(--gradient-sidebar);
    color: var(--text-inverse);
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-aside-inner {
    position: relative;
    z-index: 2;
    max-width: 480px;
}

.auth-aside-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 249, 255, 0.18) 0%, transparent 70%);
    bottom: -120px;
    right: -80px;
    pointer-events: none;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.auth-headline {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.auth-lead {
    margin: 0 0 2rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 420px;
}

.auth-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-highlight {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    transition: background var(--transition), border-color var(--transition);
}

.auth-highlight:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-highlight .material-symbols-outlined {
    font-size: 1.35rem;
    color: var(--accent);
    background: rgba(0, 249, 255, 0.12);
    padding: 0.45rem;
    border-radius: var(--radius-sm);
}

.auth-highlight strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.auth-highlight small {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.4;
}

/* Panel derecho = mismo fondo y cards que app-content */
.auth-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
}

.auth-main-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(80, 91, 218, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(123, 201, 245, 0.08) 0%, transparent 40%),
        linear-gradient(var(--border-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
    background-size: auto, auto, 32px 32px, 32px 32px;
    opacity: 0.9;
    pointer-events: none;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    box-shadow: var(--shadow-lg);
}

.auth-card-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-soft);
}

.auth-form-intro {
    margin-bottom: 1.75rem;
}

.auth-form-intro h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.25;
}

.auth-form-intro p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 34ch;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-form .field {
    margin-bottom: 1.35rem;
}

.auth-form .field:last-of-type {
    margin-bottom: 1.5rem;
}

.auth-form .field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.input-icon svg {
    display: block;
    flex-shrink: 0;
}

.input-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 2.75rem 0 2.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.4;
}

.input-wrap input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

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

.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(80, 91, 218, 0.14);
}

.input-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color var(--transition), background var(--transition);
}

.input-toggle svg {
    display: block;
}

.input-toggle .icon-hide[hidden] {
    display: none;
}

.input-toggle:hover {
    color: var(--primary);
    background: rgba(80, 91, 218, 0.08);
}

.field-error {
    display: block;
    color: var(--danger);
    font-size: 0.78rem;
    margin-top: 0.35rem;
}

.auth-form .alert {
    margin-bottom: 1.25rem;
}

.auth-form .alert p {
    margin: 0;
}

.auth-form .alert p + p {
    margin-top: 0.25rem;
}

.auth-form .btn-lg {
    height: 48px;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
    margin-top: 0;
    gap: 0.5rem;
}

.auth-form .btn-lg svg {
    flex-shrink: 0;
}

.alert-icon,
.footer-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.auth-card-footer {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--border-soft);
}

.footer-icon {
    color: var(--text-muted);
    margin-top: 0.05rem;
}

.auth-card-footer p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Páginas de error */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
    background: var(--bg);
}

.error-page h1 {
    font-size: 3rem;
    color: var(--primary);
    margin: 0;
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        padding: 2rem 1.75rem 1.75rem;
    }

    .auth-headline {
        font-size: 1.4rem;
    }

    .auth-highlights {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .auth-highlight {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 1.25rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .auth-aside {
        padding: 1.5rem 1.25rem;
    }

    .auth-brand {
        margin-bottom: 1.5rem;
    }
}
