/* ============================================================
   AUTH — Estilos para las páginas de autenticación
   ============================================================ */

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

/* ── Layout de dos paneles ── */
.auth-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Panel izquierdo: branding ── */
.auth-panel-brand {
    position: relative;
    flex: 1;
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    overflow: hidden;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 420px;
    text-align: center;
}

/* Solo wordmark: más ancho para que Nombre.png no quede encajonado */
.auth-brand-content--solo-wordmark {
    max-width: min(560px, 92vw);
}

/* Wordmark: Ne + X(PNG) + ys como una sola pieza */
.auth-brand-wordmark {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
    letter-spacing: -0.06em;
}

.auth-brand-wordmark__pre,
.auth-brand-wordmark__post {
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
}

/* X PNG al mismo peso visual que las letras; márgenes negativos para “cerrar” el espacio */
.auth-brand-title .auth-brand-inline-x,
.auth-mobile-logo-name .auth-brand-inline-x {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 1.34em;
    width: 1.18em;
    margin: 0 -0.12em;
    line-height: 0;
    transform: translateY(-0.02em);
}

.auth-brand-title .auth-brand-inline-x img,
.auth-mobile-logo-name .auth-brand-inline-x img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.2));
}

.auth-mobile-logo-name .auth-brand-inline-x {
    height: 1.3em;
    width: 1.14em;
    margin: 0 -0.1em;
    transform: translateY(-0.015em);
}

.auth-brand-title {
    font-size: clamp(1.75rem, 4vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
    margin-bottom: var(--space-3);
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Wordmark Nombre.png (panel oscuro) — sin icono Logo encima */
.auth-brand-title--nombre {
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: var(--space-4);
}

.auth-brand-title--nombre .auth-brand-nombre-img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(560px, 100%);
    max-height: clamp(104px, 26vw, 188px);
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 2px 10px rgb(0 0 0 / 0.28));
}

.auth-mobile-logo-name {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--font-size-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    line-height: 1.1;
}

/* Móvil: fondo oscuro para que el PNG (letras claras) contraste con el panel claro */
.auth-mobile-logo-name--nombre {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.auth-mobile-logo--solo-wordmark {
    justify-content: center;
}

.auth-mobile-logo-name--nombre .auth-brand-nombre-img--mobile {
    display: block;
    max-width: 100%;
    max-height: clamp(64px, 18vw, 104px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.auth-brand-subtitle {
    font-size: var(--font-size-base);
    color: rgb(255 255 255 / 0.75);
    line-height: 1.6;
    margin-bottom: var(--space-10);
}

.auth-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: rgb(255 255 255 / 0.85);
    font-weight: 500;
}

.feature-icon {
    font-size: 10px;
    color: rgb(255 255 255 / 0.6);
}

/* Decoración: varias X (Logo.png) muy transparentes y distintos ángulos */
.auth-brand-decoration {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.auth-brand-decoration .auth-deco-1 {
    width: 440px;
    height: 440px;
    top: -150px;
    right: -160px;
    transform: rotate(18deg);
    opacity: 0.05;
}

.auth-brand-decoration .auth-deco-2 {
    width: 340px;
    height: 340px;
    bottom: -100px;
    left: -120px;
    transform: rotate(-14deg);
    opacity: 0.038;
}

.auth-brand-decoration .auth-deco-3 {
    width: 200px;
    height: 200px;
    bottom: 18%;
    right: 8%;
    transform: rotate(31deg);
    opacity: 0.045;
}

.auth-brand-decoration .auth-deco-4 {
    width: 280px;
    height: 280px;
    top: 35%;
    left: -80px;
    transform: rotate(-22deg);
    opacity: 0.032;
}

.auth-brand-decoration .auth-deco-5 {
    width: 160px;
    height: 160px;
    top: 8%;
    left: 22%;
    transform: rotate(7deg);
    opacity: 0.04;
}

.auth-brand-decoration .auth-deco-6 {
    width: 120px;
    height: 120px;
    bottom: 38%;
    left: 45%;
    transform: rotate(-33deg);
    opacity: 0.048;
}

.auth-brand-decoration .auth-deco-7 {
    width: 220px;
    height: 220px;
    top: -40px;
    left: 35%;
    transform: rotate(41deg);
    opacity: 0.028;
}

/* Panel formulario: marcas muy sutiles */
.auth-panel-form {
    position: relative;
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-10);
    background: var(--color-surface);
    overflow: hidden;
}

.auth-form-deco {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-form-deco .auth-form-deco-1 {
    width: 320px;
    height: 320px;
    top: -120px;
    right: -100px;
    transform: rotate(24deg);
    opacity: 0.03;
}

.auth-form-deco .auth-form-deco-2 {
    width: 260px;
    height: 260px;
    bottom: -90px;
    left: -70px;
    transform: rotate(-18deg);
    opacity: 0.022;
}

.auth-form-deco .auth-form-deco-3 {
    width: 140px;
    height: 140px;
    top: 42%;
    right: 5%;
    transform: rotate(11deg);
    opacity: 0.028;
}

.auth-form-deco .auth-form-deco-4 {
    width: 100px;
    height: 100px;
    top: 12%;
    left: 12%;
    transform: rotate(-40deg);
    opacity: 0.018;
}

.auth-form-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
}

/* ── Cabecera del formulario ── */
.auth-form-header {
    margin-bottom: var(--space-8);
}

.auth-form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-3);
}

.auth-form-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2);
}

.auth-form-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ── Formulario ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.auth-form-footer {
    margin-top: var(--space-6);
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* ── Botón de login con estado loading ── */
.btn-login {
    position: relative;
    height: 44px;
}

.btn-login .btn-text { transition: opacity var(--transition-fast); }
.btn-login .spinner  { position: absolute; }

.btn-login.loading .btn-text { opacity: 0; }
.btn-login.loading .spinner  { display: inline-block; }

/* ── Separador ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

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

/* ── Logo móvil (oculto en desktop, visible en móvil) ── */
.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

/* ── Responsive: tablet → ocultar panel brand, mostrar logo móvil ── */
@media (max-width: 768px) {
    .auth-panel-brand  { display: none; }
    .auth-mobile-logo  { display: flex; }

    .auth-panel-form {
        width: 100%;
        padding: var(--space-8) var(--space-6);
    }
}

/* ── Responsive: móvil → ajustar padding y tipografía ── */
@media (max-width: 480px) {
    .auth-panel-form {
        padding: var(--space-6) var(--space-4);
        align-items: flex-start;
        padding-top: var(--space-10);
    }

    .auth-form-container {
        max-width: 100%;
    }

    .auth-form-title {
        font-size: var(--font-size-xl);
    }

    .auth-brand-title {
        font-size: var(--font-size-2xl);
    }
}
