/* ================================================================
   STOLIA · AUTH STYLES
   Login + forgot/reset/verify pages.
   Adaptado del mockup validado por Frederic (storage/audit/login-mockup.html)
   con tokens del DS (var(--stolia-teal), var(--color-text), etc.)
   ================================================================ */

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
}

.auth-layout {
    display: grid;
    grid-template-columns: 5fr 4fr;
    min-height: 100vh;
}

/* ──── PANEL IZQUIERDO · brand hero ──── */
.auth-brand {
    position: relative;
    background:
        radial-gradient(circle at 25% 35%, rgba(0, 194, 178, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 75% 75%, rgba(125, 233, 225, 0.10) 0%, transparent 50%),
        linear-gradient(135deg, #0A0E14 0%, #0D1117 40%, #131A24 100%);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
    pointer-events: none;
}
.auth-brand__bigS {
    position: absolute;
    bottom: -100px;
    right: -140px;
    width: 640px;
    height: 670px;
    opacity: 0.10;
    pointer-events: none;
    transform: rotate(-12deg);
}
.auth-brand__glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 194, 178, 0.18) 0%, transparent 60%);
    filter: blur(60px);
    pointer-events: none;
    top: -200px;
    left: -150px;
}

/* Header del brand panel · isotipo + texto */
.auth-brand__header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}
.auth-brand__logo {
    height: 42px;
    width: auto;
    display: block;
}

/* Body · eyebrow + título grande con gradient */
.auth-brand__body {
    position: relative;
    z-index: 2;
    max-width: 540px;
}
.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 194, 178, 0.10);
    border: 1px solid rgba(0, 194, 178, 0.22);
    border-radius: 9999px;
    color: var(--stolia-teal);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 36px;
}
.auth-brand__eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--stolia-teal);
    box-shadow: 0 0 12px var(--stolia-teal);
    animation: auth-pulse 2s ease-in-out infinite;
}
@keyframes auth-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.2); }
}

.auth-brand__title {
    font-size: 60px;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 28px;
    color: #FFFFFF !important;
}
.auth-brand__title-accent {
    background: linear-gradient(135deg, #FFFFFF 0%, #7DE9E1 50%, #00C2B2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-brand__subtitle {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    max-width: 480px;
    margin: 0;
}

/* Footer del brand panel · firma Build · Manage · Grow + version chip */
.auth-brand__footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-brand__signature {
    display: flex;
    align-items: center;
    gap: 16px;
}
.auth-brand__signature-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}
.auth-brand__version {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

/* ──── PANEL DERECHO · form ──── */
.auth-form-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    position: relative;
    background: var(--color-bg);
}
.auth-form { width: 100%; max-width: 400px; }

.auth-form__header { margin-bottom: 36px; }
.auth-form__title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text);
    margin: 0 0 8px;
}
.auth-form__subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Field generic · label uppercase + control + error */
.field { margin-bottom: 20px; }
.field__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.field__control { position: relative; }
.field__error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--stolia-red, #FF4D4F);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.field__error svg { flex-shrink: 0; }

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all 160ms ease;
}
.auth-input::placeholder { color: var(--color-text-subtle); }
.auth-input:hover { border-color: var(--color-border-strong); }
.auth-input:focus {
    outline: none;
    border-color: var(--stolia-teal);
    box-shadow: 0 0 0 3px rgba(0, 194, 178, 0.15);
}
.auth-input.is-invalid {
    border-color: var(--stolia-red, #FF4D4F);
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.10);
}

.field__icon-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--color-text-subtle);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 160ms ease;
}
.field__icon-toggle:hover { color: var(--color-text); }
.field__icon-toggle svg { display: block; }

/* Inline row · checkbox + link */
.auth-form__inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 28px;
}
.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
}
.auth-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-border-strong);
    border-radius: 5px;
    background: var(--color-surface);
    cursor: pointer;
    transition: all 160ms ease;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}
.auth-checkbox input:checked {
    background: var(--stolia-teal);
    border-color: var(--stolia-teal);
}
.auth-checkbox input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.auth-checkbox input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 194, 178, 0.15);
}

.auth-link {
    font-size: 13px;
    color: var(--stolia-teal);
    font-weight: 500;
    text-decoration: none;
}
.auth-link:hover { opacity: 0.75; color: var(--stolia-teal); }
.auth-link--block { display: block; text-align: center; margin-top: 18px; }

/* CTA principal · gradient teal */
.auth-btn {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    transition: all 200ms ease;
    text-decoration: none;
}
.auth-btn--primary {
    background: linear-gradient(135deg, #00C2B2 0%, #00A89A 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 194, 178, 0.30);
}
.auth-btn--primary:hover {
    box-shadow: 0 6px 22px rgba(0, 194, 178, 0.42);
    transform: translateY(-1px);
    color: #FFFFFF;
    text-decoration: none;
}
.auth-btn--primary:active { transform: translateY(0); }
.auth-btn--ghost {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}
.auth-btn--ghost:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
    text-decoration: none;
}

.auth-cta-card {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
    transition: all 160ms ease;
}
.auth-cta-card:hover {
    border-color: var(--stolia-teal);
    background: rgba(0, 194, 178, 0.03);
}
.auth-cta-card a {
    color: var(--stolia-teal);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}
.auth-cta-card a:hover { text-decoration: underline; }

/* Footer del form-wrap (© Stolia · idioma) */
.auth-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--color-text-subtle);
}
.auth-footer__divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-text-subtle);
    opacity: 0.4;
}
.auth-footer__lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
}
.auth-footer__lang:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
    text-decoration: none;
}
.auth-footer__lang svg { flex-shrink: 0; }

/* Theme toggle (top-right del form-wrap) */
.auth-theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 160ms ease;
}
.auth-theme-toggle:hover {
    background: var(--color-surface-alt);
    color: var(--color-text);
}
.auth-theme-toggle svg { display: block; }

/* Status callout (verify-email, password reset success) */
.auth-status {
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 194, 178, 0.08);
    border: 1px solid rgba(0, 194, 178, 0.22);
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.5;
}
.auth-status--success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}

/* Hero icon · usado en verify-email */
.auth-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 194, 178, 0.12) 0%, rgba(22, 119, 255, 0.08) 100%);
    border: 1px solid rgba(0, 194, 178, 0.22);
    color: var(--stolia-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.auth-hero-icon svg { width: 28px; height: 28px; }

/* ──── RESPONSIVE ──── */
@media (max-width: 1024px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand {
        min-height: 320px;
        padding: 40px 32px;
    }
    .auth-brand__title { font-size: 38px; }
    .auth-brand__subtitle { font-size: 15px; }
    .auth-brand__footer { display: none; }
    .auth-brand__bigS {
        bottom: -50px;
        right: -100px;
        width: 400px;
        height: 420px;
    }
}

@media (max-width: 640px) {
    .auth-brand {
        min-height: 200px;
        padding: 28px 24px;
        justify-content: center;
        /* separa logo y eyebrow — centrados sin hueco, el pill del lema
           se montaba sobre el logo (Frederic 2026-10-13) */
        gap: 20px;
    }
    .auth-brand__title { font-size: 28px; margin-bottom: 16px; }
    .auth-brand__subtitle { display: none; }
    .auth-brand__eyebrow { margin-bottom: 16px; }
    .auth-form-wrap { padding: 36px 24px; }
    .auth-form__title { font-size: 22px; }
    .auth-footer { position: static; margin-top: 32px; }
}
