/**
 * Estilos de login / registro / recuperación.
 * Se sirve con asset() para que funcione sin `npm run dev` ni build de Vite.
 */
:root {
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
}

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

.auth-root {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    background-color: #f1f5f9;
    background-image:
        radial-gradient(ellipse 90% 60% at 0% -30%, rgb(224 242 254), transparent),
        radial-gradient(ellipse 70% 50% at 100% 110%, rgb(204 251 241), transparent);
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .auth-shell {
        flex-direction: row;
    }
}

/* Franja marca en móvil */
.auth-mobile-strip {
    display: block;
    height: 5px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #0284c7, #14b8a6, #0d9488);
}

@media (min-width: 1024px) {
    .auth-mobile-strip {
        display: none;
    }
}

/* Panel lateral escritorio */
.auth-aside {
    display: none;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    min-height: 100vh;
    width: 42%;
    max-width: 28rem;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(155deg, #075985 0%, #0e7490 42%, #0f766e 100%);
}

@media (min-width: 1024px) {
    .auth-aside {
        display: flex;
    }
}

.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-aside-inner,
.auth-aside-foot {
    position: relative;
    z-index: 1;
}

.auth-kicker {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.92);
}

.auth-aside-title {
    margin: 1rem 0 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.auth-aside-lead {
    margin: 1.25rem 0 0;
    max-width: 22rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: rgba(224, 242, 254, 0.94);
}

.auth-aside-foot {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(186, 230, 253, 0.78);
}

/* Zona formulario */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 1rem 2.5rem;
}

@media (min-width: 640px) {
    .auth-main {
        padding: 2.5rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .auth-main {
        padding: 3rem;
    }
}

.auth-card {
    width: 100%;
    max-width: 26rem;
    padding: 1.75rem 1.5rem 2rem;
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 20px 50px -20px rgba(15, 23, 42, 0.14);
}

@media (min-width: 640px) {
    .auth-card {
        padding: 2.25rem 2rem 2.5rem;
        border-radius: 1.5rem;
        max-width: 28rem;
    }
}

.auth-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 1024px) {
    .auth-mobile-brand {
        display: none;
    }
}

.auth-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
    box-shadow: 0 12px 28px -8px rgba(14, 116, 144, 0.45);
}

.auth-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    color: var(--auth-text);
}

@media (min-width: 640px) {
    .auth-title {
        font-size: 1.625rem;
    }
}

.auth-lead {
    margin: 0.625rem 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: center;
    color: var(--auth-muted);
}

.auth-alert {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-alert--success {
    border: 1px solid #bbf7d0;
    background: #ecfdf5;
    color: #14532d;
}

.auth-form {
    margin-top: 1.75rem;
}

.auth-field-group {
    margin-bottom: 1.125rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.auth-field {
    display: block;
    width: 100%;
    padding: 0.8125rem 1rem;
    font-size: 1rem;
    line-height: 1.4;
    border-radius: 0.75rem;
    border: 1px solid var(--auth-border);
    background: #f8fafc;
    color: var(--auth-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-field::placeholder {
    color: #94a3b8;
}

.auth-field:hover {
    border-color: #cbd5e1;
}

.auth-field:focus {
    outline: none;
    border-color: #0ea5e9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.auth-field:-webkit-autofill,
.auth-field:-webkit-autofill:hover,
.auth-field:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a;
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
    box-shadow: 0 0 0 1000px #f8fafc inset;
    transition: background-color 99999s ease-out 0s;
}

.auth-error {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #dc2626;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.25rem 0 1.25rem;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #0284c7;
    border-radius: 0.25rem;
}

.auth-btn {
    display: block;
    width: 100%;
    padding: 0.9375rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    background: linear-gradient(95deg, #0284c7 0%, #0891b2 50%, #0d9488 100%);
    box-shadow: 0 10px 28px -8px rgba(14, 116, 144, 0.42);
    transition: filter 0.15s ease, transform 0.08s ease;
}

.auth-btn:hover {
    filter: brightness(1.06);
}

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

.auth-btn:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

.auth-links {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.auth-links a {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
    text-decoration: none;
}

.auth-links a:hover {
    color: #0ea5e9;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-links p {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--auth-muted);
}

.auth-links p a {
    font-weight: 700;
}

.auth-links--no-rule {
    margin-top: 1.5rem;
    padding-top: 0;
    border-top: none;
}

.auth-links--no-rule p {
    margin-top: 0;
}

.auth-page-foot {
    margin-top: 1.75rem;
    font-size: 0.75rem;
    text-align: center;
    color: #94a3b8;
}

.auth-text-center {
    text-align: center;
}

.auth-text-left {
    text-align: left;
}

.auth-link-back {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
    text-decoration: none;
}

.auth-link-back:hover {
    color: #0ea5e9;
}
