
:root {
    --primary: #123f67;
    --primary-dark: #0b2d4d;
    --secondary: #168b88;
    --accent: #e5a93d;

    --text: #243447;
    --muted: #7b8794;

    --border: #e2e8f0;
    --surface: #ffffff;
    --background: #f4f7fb;

    --success: #159b69;
    --danger: #dc4c4c;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--background);
    color: var(--text);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
}

/* VISUAL PANEL */

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 7%;
    overflow: hidden;
    color: #fff;

    background:
        radial-gradient(circle at 10% 90%, rgba(22,139,136,.35), transparent 35%),
        linear-gradient(145deg, #123f67, #092b49);
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}

.auth-visual::before {
    width: 450px;
    height: 450px;
    right: -200px;
    top: 12%;
}

.auth-visual::after {
    width: 300px;
    height: 300px;
    right: -120px;
    top: 25%;
}

.brand,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.brand-mark {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand strong,
.mobile-brand strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand small,
.mobile-brand small {
    display: block;
    font-size: 10px;
    opacity: .8;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 510px;
    margin: 70px 0;
}

.eyebrow,
.form-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.eyebrow {
    color: #8bd4cf;
}

.visual-content h1 {
    margin: 22px 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.2;
    font-weight: 800;
}

.visual-content p {
    max-width: 450px;
    color: rgba(255,255,255,.78);
    font-size: 14px;
    line-height: 1.9;
}

.visual-points {
    display: grid;
    gap: 20px;
    margin-top: 35px;
}

.visual-points div {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: rgba(255,255,255,.9);
}

.visual-points i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    color: #9ce2dc;
    border-radius: 10px;
    font-size: 17px;
}

.visual-footer {
    position: relative;
    z-index: 2;
    font-size: 11px;
    color: rgba(255,255,255,.65);
}


/* FORM PANEL */

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
}

.form-card {
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    padding: 42px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(21,49,76,.07);
}

.mobile-brand {
    display: none;
    color: var(--primary);
    margin-bottom: 25px;
}

.form-icon {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    background: #eaf3f9;
    color: var(--primary);
    border-radius: 15px;
    font-size: 25px;
    margin-bottom: 20px;
}

.form-kicker {
    color: var(--secondary);
}

.form-card h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 10px 0;
    color: var(--primary-dark);
}

.form-description {
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 30px;
}

.form-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #34475b;
}

.required {
    color: var(--danger);
}

.input-group-custom {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    transition: .2s ease;
    overflow: hidden;
}

.input-group-custom:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(22,139,136,.10);
}

.input-group-custom > i {
    width: 45px;
    flex-shrink: 0;
    text-align: center;
    color: #8795a4;
    font-size: 16px;
}

.input-group-custom .form-control {
    height: 48px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
    padding: 10px 8px;
    min-width: 0;
}

.input-group-custom .form-control::placeholder {
    color: #adb7c2;
}

.input-group-custom:has(.form-control.is-invalid) {
    border-color: var(--danger);
}

.field-error {
    font-size: 11px;
    color: var(--danger);
    margin-top: 5px;
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 10px;
    color: var(--muted);
}

.captcha-wrapper {
    overflow-x: auto;
    max-width: 100%;
}


/* BUTTON */

.btn-submit {
    width: 100%;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(110deg, var(--primary), var(--secondary));
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(18,63,103,.2);
}

.btn-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

.back-login {
    margin-top: 25px;
    text-align: center;
    font-size: 11px;
}

.back-login a {
    color: var(--secondary);
    font-weight: 800;
    text-decoration: none;
}

.back-login a:hover {
    text-decoration: underline;
}

.security-note {
    text-align: center;
    font-size: 10px;
    color: #9aa5b1;
    margin-top: 25px;
}


/* LOADING */

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    background: rgba(9,35,58,.72);
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay[aria-hidden="true"] {
    display: none !important;
}

.loading-box {
    width: min(90%, 350px);
    padding: 35px 28px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.loading-box strong {
    display: block;
    font-size: 15px;
    color: var(--primary);
    margin-top: 18px;
}

.loading-box p {
    font-size: 11px;
    line-height: 1.8;
    color: var(--muted);
    margin: 9px 0 0;
}

.loader {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 4px solid #e6edf2;
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* RESPONSIVE */

@media (max-width: 991px) {

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-form-wrap {
        padding: 35px 20px;
    }

    .form-card {
        max-width: 460px;
    }

    .mobile-brand {
        display: flex;
    }

}

@media (max-width: 480px) {

    .auth-form-wrap {
        padding: 15px 12px;
    }

    .form-card {
        padding: 28px 21px;
        border-radius: 15px;
    }

    .form-card h2 {
        font-size: 24px;
    }

}
