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

body { font-family: 'Inter', sans-serif; }

/* ─── ROOT LAYOUT ──────────────────────────────────────────── */

.auth-root {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ─── LEFT PANEL ───────────────────────────────────────────── */

.auth-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background: #00224a url('../images/auth-bg-new.jpg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.05) 100%);
    z-index: 0;
}

.auth-left__noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px;
    z-index: 0;
}

/* ─── LEFT: TOP (logo) ─────────────────────────────────────── */

.auth-left__content {
    position: relative;
    z-index: 1;
}

.auth-left__logo img {
    height: 160px;
}

/* ─── RIGHT: FORM LOGO ─────────────────────────────────────── */

.auth-form-logo {
    margin-bottom: 32px;
    text-align: center;
}

.auth-form-logo img {
    height: 110px;
}

/* ─── LEFT: BODY (headline) ────────────────────────────────── */

.auth-left__body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 0 32px;
}

.auth-left__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c60b1e;
    background: rgba(198,11,30,0.12);
    border: 1px solid rgba(198,11,30,0.3);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.auth-left__headline {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}

.auth-left__headline span {
    color: #c60b1e;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}

.auth-left__sub {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    font-weight: 600;
    color: #fff !important;
    line-height: 1.65;
    max-width: 340px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}

/* ─── LEFT: FOOTER (stats + testimonial) ──────────────────── */

.auth-left__footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-right: 108px;
}

.auth-left__stats {
    display: flex;
    gap: clamp(16px, 2vw, 32px);
    flex-shrink: 0;
}

.auth-stat__number {
    display: block;
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-stat__label {
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── TESTIMONIAL (in-flow, inside footer) ─────────────────── */

.auth-testimonial {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 200px;
    flex-shrink: 1;
    min-width: 0;
}

.auth-testimonial__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.auth-testimonial__text {
    font-size: 0.75rem;
    color: #fff;
    line-height: 1.4;
}

.auth-testimonial__author {
    display: block;
    font-weight: 600;
    font-size: 0.7rem;
    margin-top: 3px;
    color: rgba(255,255,255,0.8);
}

/* ─── BADGES ───────────────────────────────────────────────── */


.auth-badge-marca {
    position: absolute;
    bottom: 48px;
    right: 48px;
    z-index: 50;
    width: 88px;
    display: block !important;
}

.auth-badge-marca img,
.auth-shield img {
    width: 100%;
    height: auto;
}

.auth-shield {
    position: absolute;
    bottom: 48px;
    left: 48px;
    z-index: 10;
    width: 100px;
}

/* ─── RIGHT PANEL ──────────────────────────────────────────── */

.auth-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f7f8fa;
    padding: 48px 40px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 360px;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 32px;
}

.auth-mobile-brand__inner {
    display: inline-block;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 6px 10px;
}

.auth-mobile-brand img {
    height: 80px;
    display: block;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00467d;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.15s;
}

.auth-back:hover { color: #003560; }

.auth-form-wrap__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00224a;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.auth-form-wrap__sub {
    font-size: 0.875rem;
    color: #8a8f9a;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* ─── FORM FIELDS ──────────────────────────────────────────── */

.auth-field { margin-bottom: 18px; }

.auth-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.auth-field__label-row label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d4350;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.auth-field__forgot-inline {
    font-size: 0.75rem;
    color: #8a8f9a;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.auth-field__forgot-inline:hover { color: #00467d; }

.auth-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d4350;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.auth-field__input-wrap {
    position: relative;
}

.auth-field__input-wrap input {
    padding-right: 44px;
}

.auth-field__toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #8a8f9a;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.auth-field__toggle:hover { color: #00467d; }
.auth-field__toggle svg { display: block; }

.auth-field input {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid #e2e5eb;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #00224a;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}

.auth-field input:focus {
    border-color: #00467d;
    box-shadow: 0 0 0 3px rgba(0,70,125,0.1);
}

.auth-field input.is-invalid { border-color: #c60b1e; }

/* ─── ALERTS ───────────────────────────────────────────────── */

.auth-alert,
.auth-alert-danger {
    font-size: 0.83rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fff1f2;
    color: #c60b1e;
    border: 1px solid rgba(198,11,30,0.2);
}

.auth-alert-success {
    font-size: 0.83rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #f0faf4;
    color: #007d36;
    border: 1px solid rgba(0,125,54,0.2);
}

/* ─── BUTTON ───────────────────────────────────────────────── */

.btn-signin {
    width: 100%;
    padding: 13px;
    background: #00467d;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 14px rgba(0,70,125,0.25);
    margin-top: 8px;
}

.btn-signin:hover {
    background: #003560;
    box-shadow: 0 6px 20px rgba(0,70,125,0.35);
    transform: translateY(-1px);
}

.btn-signin:active { transform: translateY(0); }

.auth-forgot { display: none; }
.auth-forgot:hover { color: #00467d; }

.auth-hint {
    font-size: 0.78rem;
    color: #8a8f9a;
    margin: 12px 0 16px;
    line-height: 1.5;
}

/* ─── DIVIDER & LANG ───────────────────────────────────────── */

.auth-divider {
    height: 1px;
    background: #e2e5eb;
    margin: 24px 0;
}

.auth-lang {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.lang-btn--active  { background: #00467d; color: #fff; }
.lang-btn--inactive { color: #b0b5c0; }
.lang-btn--inactive:hover { color: #00467d; }

.lang-btn + .lang-btn {
    border-left: 1px solid #d0d4db;
    border-radius: 0 6px 6px 0;
    padding-left: 12px;
}

.lang-btn:first-child { border-radius: 6px 0 0 6px; }

.lang-sep { display: none; }

.lang-btn img { vertical-align: middle; border-radius: 2px; margin-right: 2px; }

/* ─── MOBILE HERO (< 768px) ────────────────────────────────── */

.auth-mobile-hero {
    display: none;
    background: url('../images/auth-bg-new.jpg') no-repeat center center;
    background-size: cover;
    padding: 24px 24px 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    position: relative;
    color: #fff;
    overflow: hidden;
}

.auth-mobile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    border-radius: 16px;
}

.auth-mobile-hero .auth-badge-marca {
    top: 16px;
    right: 16px;
    left: auto;
    bottom: auto;
    width: 48px;
    position: absolute;
}

.auth-mobile-brand {
    display: none;
}

.auth-mobile-headline {
    position: relative;
    z-index: 1;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
    padding-top: 72px;
}

.auth-mobile-headline span { color: #c60b1e; }

.auth-mobile-sub {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    max-width: 100%;
    padding-right: 0;
}

.auth-mobile-badges {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 2;
}

/* ─── BREAKPOINTS ──────────────────────────────────────────── */

/* Tablet landscape / small desktop (900–1200px) */
@media (max-width: 1200px) {
    .auth-left { padding: 40px 36px; }
    .auth-badge-marca { width: 72px; bottom: 36px; right: 36px; }
    .auth-left__footer { padding-right: 92px; }
    .auth-testimonial { max-width: 180px; }
    .auth-testimonial__text { font-size: 0.72rem; }
}

/* Tablet portrait (768–900px) */
@media (max-width: 900px) {
    .auth-left { padding: 32px 28px; }
    .auth-badge-marca { width: 60px; bottom: 28px; right: 28px; }
    .auth-left__footer { padding-right: 78px; gap: 12px; }
    .auth-left__stats  { gap: 16px; }
    .auth-testimonial  { max-width: 150px; }
    .auth-testimonial__avatar { width: 32px; height: 32px; }
    .auth-testimonial__text   { font-size: 0.68rem; }
    .auth-left__sub { max-width: 260px; }
}

/* Mobile (< 768px) — panel izquierdo oculto, mobile hero visible */
@media (max-width: 768px) {
    .auth-root { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right {
        min-height: 100vh;
        padding: 40px 24px;
        justify-content: flex-start;
        padding-top: 48px;
    }
    .auth-form-wrap    { max-width: 100%; }
    .auth-mobile-hero  { display: block; }
    .auth-mobile-brand { display: block; margin-bottom: 24px; }
    .auth-form-logo    { display: none; }
}

/* Mobile small (< 480px) */
@media (max-width: 480px) {
    .auth-right { padding: 32px 20px; }
    .auth-form-wrap__title { font-size: 1.3rem; }
    .btn-signin { padding: 14px; }
    .auth-field input { font-size: 0.9rem; }
    .auth-mobile-hero { padding: 20px 20px 28px; }
    .auth-mobile-headline { font-size: 1.4rem; padding-top: 64px; }
}

/* ─── LEGAL FOOTER (login page) ──────────────────────────────── */
.auth-legal-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0 4px;
    font-size: 0.78rem;
    color: #9ca3af;
}
.auth-legal-footer a {
    color: #9ca3af;
    text-decoration: none;
}
.auth-legal-footer a:hover {
    color: #1a1a2e;
    text-decoration: underline;
}
.auth-legal-footer span {
    color: #d1d5db;
}
