:root {
    --auth-navy: #101b35;
    --auth-navy-light: #19294b;
    --auth-blue: #3568e8;
    --auth-blue-hover: #2856cb;
    --auth-text: #172033;
    --auth-muted: #778197;
    --auth-border: #e2e7ef;
    --auth-surface: #ffffff;
    --auth-background: #f5f7fb;
    --auth-success: #16845b;
    --auth-danger: #c33d46;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body.auth-page {
    font-family: Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--auth-text);
    background: var(--auth-background);
    -webkit-font-smoothing: antialiased;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(480px, 1.05fr);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px clamp(36px, 6vw, 88px) 32px;
    color: #fff;
    background:
        radial-gradient(
            circle at 85% 70%,
            rgba(65, 116, 229, 0.28),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #101b35 0%,
            #15264a 58%,
            #1c3970 100%
        );
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    top: 24%;
    right: -280px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    bottom: -190px;
    left: -170px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.brand-content,
.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-logo,
.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.5px;
}

.brand-logo strong,
.auth-mobile-brand strong {
    font-weight: 400;
    opacity: 0.8;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    color: white;
    background: linear-gradient(145deg, #5e8cff, #3262d8);
    font-size: 22px;
    font-weight: 750;
    box-shadow: 0 8px 24px rgba(35, 86, 208, 0.3);
}

.brand-message {
    max-width: 470px;
    margin-top: clamp(75px, 12vh, 135px);
}

.eyebrow {
    display: block;
    margin-bottom: 16px;
    color: var(--auth-blue);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.8px;
}

.auth-brand-panel .eyebrow {
    color: #91b2ff;
}

.brand-message h1 {
    max-width: 440px;
    margin: 0;
    font-size: clamp(42px, 4.6vw, 64px);
    line-height: 1.08;
    letter-spacing: -2.8px;
    font-weight: 650;
}

.brand-message h1 span {
    display: block;
    color: #86aaff;
}

.brand-message p {
    max-width: 390px;
    margin-top: 22px;
    color: #bdc9df;
    font-size: 15px;
    line-height: 1.8;
}

.brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #aab8d2;
    font-size: 11px;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px clamp(28px, 7vw, 100px);
    background: #fff;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 430px;
}

.auth-heading {
    margin-bottom: 34px;
}

.auth-heading h2 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(27px, 3vw, 34px);
    letter-spacing: -1.1px;
    line-height: 1.2;
}

.auth-heading p,
.forgot-heading p {
    margin: 12px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

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

.form-field {
    display: grid;
    gap: 9px;
}

.form-field label {
    color: #354056;
    font-size: 13px;
    font-weight: 650;
}

.form-field input {
    width: 100%;
    height: 51px;
    padding: 0 15px;
    border: 1px solid var(--auth-border);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--auth-text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-field input::placeholder {
    color: #a4adbd;
}

.form-field input:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 3px rgba(53, 104, 232, 0.11);
}

.field-heading,
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.text-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--auth-blue);
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.text-button:hover {
    color: var(--auth-blue-hover);
    background: transparent;
}

.form-options {
    margin-top: -7px;
}

.secure-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--auth-muted);
    font-size: 11px;
}

.secure-dot,
.visual-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25b47b;
}

.primary-button,
.secondary-button {
    min-height: 51px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s;
}

.primary-button {
    padding: 0 18px;
    border: 0;
    color: #fff;
    background: var(--auth-blue);
    box-shadow: 0 7px 16px rgba(53, 104, 232, 0.18);
}

.primary-button:hover {
    background: var(--auth-blue-hover);
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.button-arrow {
    font-size: 19px;
    font-weight: 400;
}

.secondary-button {
    border: 1px solid var(--auth-border);
    color: #34415a;
    background: #fff;
}

.secondary-button:hover {
    border-color: #b9c8e7;
    background: #f8faff;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 30px 0 20px;
}

.auth-divider span {
    height: 1px;
    flex: 1;
    background: var(--auth-border);
}

.auth-divider small {
    color: #9aa3b3;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
    white-space: nowrap;
}

.auth-legal {
    margin: 24px 0 0;
    color: #9aa3b3;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.auth-message {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #d6e7df;
    border-radius: 8px;
    color: var(--auth-success);
    background: #f0faf5;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.auth-message.error {
    border-color: #f1d5d7;
    color: var(--auth-danger);
    background: #fff5f5;
}

.auth-mobile-brand {
    display: none;
    color: var(--auth-navy);
}

.forgot-panel {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: #fbfcff;
}

.forgot-heading h3 {
    margin: 0;
    font-size: 17px;
}

.forgot-heading p {
    margin-bottom: 20px;
    font-size: 13px;
}

.back-button {
    margin-top: 17px;
    padding: 0;
    border: 0;
    color: var(--auth-blue);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: minmax(320px, 0.85fr) minmax(390px, 1.15fr);
    }

    .auth-brand-panel {
        padding: 36px 32px 26px;
    }

    .auth-main {
        padding: 42px 34px;
    }

    .brand-message h1 {
        font-size: 44px;
    }
}

@media (max-width: 680px) {
    .auth-layout {
        min-height: 100vh;
        display: block;
    }

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

    .auth-main {
        min-height: 100vh;
        display: block;
        padding: 28px 23px 35px;
    }

    .auth-mobile-brand {
        display: inline-flex;
        margin-bottom: clamp(55px, 10vh, 90px);
    }

    .auth-form-wrapper {
        max-width: 460px;
        margin: 0 auto;
    }

    .auth-heading {
        margin-bottom: 29px;
    }

    .auth-heading h2 {
        font-size: 29px;
    }

    .auth-legal {
        margin-top: 28px;
    }
}

@media (max-width: 380px) {
    .auth-main {
        padding-right: 18px;
        padding-left: 18px;
    }

    .auth-mobile-brand {
        margin-bottom: 48px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
    }
}