:root {
    --auth-primary: #0a2a87;
    --auth-primary-strong: #031552;
    --auth-text: #0f1f4d;
    --auth-muted: #6b7390;
    --auth-border: #dfe4f2;
    --auth-bg: #f5f7fd;
    --auth-success: #1b9a5f;
    --auth-warning: #b37b00;
    --auth-danger: #c2404e;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.auth-saas-body {
    min-height: 100vh;
    font-family: "Sora", "Segoe UI", sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
}

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

.auth-saas-visual {
    position: relative;
    overflow: hidden;
    background: #001044 url("../images/FondoLogin.jpg") center center / cover no-repeat;
}

.auth-saas-visual-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 10, 45, 0.72), rgba(2, 10, 45, 0.72)),
        radial-gradient(circle at 20% 25%, rgba(41, 100, 255, 0.28), transparent 50%);
}

.auth-saas-visual-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 48px 56px 40px;
    color: #f3f5ff;
}

.auth-saas-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-saas-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 6px;
}

.auth-saas-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.auth-saas-brand strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.auth-saas-brand small {
    display: block;
    margin-top: 4px;
    max-width: 360px;
    font-size: 0.83rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    font-weight: 500;
    color: rgba(235, 239, 255, 0.82);
}

.auth-saas-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    line-height: 1.05;
    max-width: 580px;
}

.auth-saas-copy p {
    margin: 0;
    max-width: 560px;
    color: rgba(235, 239, 255, 0.9);
    font-size: 1.08rem;
    line-height: 1.6;
}

.auth-saas-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-saas-pill-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(245, 247, 255, 0.95);
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-saas-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background: linear-gradient(180deg, #f8f9ff 0%, #f1f4fc 100%);
}

.auth-saas-card {
    width: min(560px, 100%);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: 0 20px 55px rgba(18, 36, 97, 0.13);
    padding: 36px 34px 24px;
}

.auth-saas-card h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
    color: #111f5d;
}

.auth-saas-subtitle {
    margin: 10px 0 24px;
    color: var(--auth-muted);
    line-height: 1.5;
}

.auth-alert {
    border-radius: 12px;
    font-size: 0.92rem;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.auth-alert.is-error {
    background: #fff2f5;
    border: 1px solid #f7ced6;
    color: var(--auth-danger);
}

.auth-alert.is-warning {
    background: #fff8eb;
    border: 1px solid #f8e0aa;
    color: var(--auth-warning);
}

.auth-alert.is-info {
    background: #edf4ff;
    border: 1px solid #cfe0ff;
    color: #2d62b7;
}

.auth-saas-form {
    display: grid;
    gap: 10px;
}

.auth-saas-form label {
    margin-top: 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5f6783;
    font-weight: 700;
}

.auth-saas-form input[type="text"],
.auth-saas-form input[type="email"],
.auth-saas-form input[type="password"] {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    background: #f8faff;
    color: #17224e;
    min-height: 50px;
    font-size: 0.98rem;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-layout-card {
    width: min(560px, 100%);
}

.auth-input-error {
    margin-top: 4px;
    margin-bottom: 2px;
    color: var(--auth-danger);
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-layout-card .block,
.auth-layout-card .mt-4,
.auth-layout-card .mt-2 {
    margin-top: 10px;
}

.auth-layout-card .text-sm {
    font-size: 0.9rem;
}

.auth-saas-form input:focus {
    outline: none;
    border-color: #6e8de6;
    box-shadow: 0 0 0 3px rgba(71, 112, 227, 0.18);
}

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

.auth-password-wrap input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #6b7390;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
    background: #e9eefb;
    color: #304287;
}

.password-toggle svg {
    width: 22px;
    height: 22px;
}

.auth-saas-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 8px 0 4px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: #43507e;
}

.auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2f4fc7;
}

.auth-saas-form-row a {
    color: #2f4fc7;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
}

.auth-saas-form-row a:hover {
    text-decoration: underline;
}

.auth-saas-submit {
    margin-top: 6px;
    min-height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--auth-primary-strong), var(--auth-primary));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(10, 37, 120, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-saas-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(10, 37, 120, 0.32);
}

.auth-saas-cta {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--auth-border);
}

.auth-saas-cta p {
    margin: 0 0 10px;
    color: #384472;
    font-size: 0.95rem;
}

.auth-saas-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-saas-cta-actions a {
    text-decoration: none;
    font-weight: 700;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #d5def7;
    background: #f3f7ff;
    color: #17388f;
}

.btn-secondary:hover {
    background: #e8efff;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    color: #3857c6;
}

.btn-link:hover {
    background: #edf1ff;
}

.auth-saas-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #dde2f2;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.auth-saas-footer a {
    color: #6a7290;
    text-decoration: none;
    font-size: 0.82rem;
}

.auth-saas-footer a:hover {
    color: #2f4fc7;
}

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

    .auth-saas-visual {
        min-height: 360px;
    }

    .auth-saas-copy h1 {
        font-size: clamp(1.8rem, 4.2vw, 2.8rem);
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .auth-saas-visual-content {
        padding: 28px 22px;
    }

    .auth-saas-panel {
        padding: 18px;
    }

    .auth-saas-card {
        padding: 24px 18px 18px;
        border-radius: 16px;
    }

    .auth-saas-card h2 {
        font-size: 1.65rem;
    }

    .auth-saas-form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-saas-copy p {
        font-size: 0.97rem;
    }
}

/* ============================================================
   Mobile app-like login/register (RentarCar)
   ============================================================ */

/* Mobile brand header — only shown on small screens */
.auth-saas-mobile-brand {
    display: none;
}

@media (max-width: 760px) {
    body.auth-saas-body {
        background: #fff;
    }

    .auth-saas-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-saas-visual {
        display: none !important;
    }

    .auth-saas-panel {
        background: #fff;
        min-height: 100vh;
        padding: 24px 22px 28px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: calc(48px + env(safe-area-inset-top, 0px));
    }

    .auth-saas-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 40px;
    }
    .auth-mobile-logo-img {
        width: auto;
        height: 72px;
        max-width: 80%;
        object-fit: contain;
        display: block;
    }

    .auth-saas-card,
    .auth-saas-card.auth-layout-card {
        background: transparent;
        box-shadow: none;
        border: 0;
        padding: 0;
        border-radius: 0;
    }

    .auth-saas-card h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #0a1a5c;
        margin-bottom: 8px;
    }

    .auth-saas-subtitle {
        color: #6a7391;
        margin-bottom: 24px;
    }

    .auth-saas-form {
        gap: 14px;
    }

    .auth-saas-form label {
        display: none;
    }

    .auth-saas-form input[type="email"],
    .auth-saas-form input[type="text"],
    .auth-saas-form input[type="password"],
    .auth-password-wrap input {
        height: 54px;
        border-radius: 12px;
        border: 1px solid #e4e7f1;
        background: #fff;
        padding: 0 16px;
        font-size: 1rem;
        box-shadow: 0 2px 6px rgba(10, 26, 92, 0.04);
    }

    .auth-saas-form input:focus,
    .auth-password-wrap input:focus {
        border-color: #0a1a5c;
        outline: none;
        box-shadow: 0 0 0 3px rgba(10, 26, 92, 0.12);
    }

    .auth-password-wrap {
        position: relative;
    }
    .auth-password-wrap .password-toggle {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: 0;
        color: #6a7391;
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .auth-password-wrap .password-toggle svg {
        width: 22px;
        height: 22px;
    }

    .auth-saas-form-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        font-size: 0.86rem;
        margin-top: 4px;
    }

    .auth-saas-submit {
        height: 54px;
        border-radius: 14px;
        background: #0a1a5c;
        color: #fff;
        font-weight: 700;
        font-size: 1.02rem;
        border: 0;
        width: 100%;
        margin-top: 12px;
        box-shadow: 0 10px 24px rgba(10, 26, 92, 0.25);
    }
    .auth-saas-submit:hover,
    .auth-saas-submit:active {
        background: #0e2278;
    }

    /* Hide desktop-only CTA + footer in mobile */
    .auth-saas-cta,
    .auth-saas-footer {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .auth-mobile-brand-text strong { font-size: 1.35rem; }
    .auth-mobile-logo { width: 54px; height: 54px; }
}
