:root {
    --auth-primary: #0d51b0;
    --auth-primary-light: #2790e1;
    --auth-ink: #10213d;
    --auth-muted: #68758a;
    --auth-border: #dfe6ef;
    --auth-surface: #ffffff;
    --auth-background: #f4f7fb;
    --auth-danger: #b42318;
}

* {
    box-sizing: border-box;
}

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

body.auth-body {
    margin: 0;
    background: var(--auth-background);
    color: var(--auth-ink);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

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

.auth-visual {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(
            circle at 84% 18%,
            rgba(39, 144, 225, 0.6),
            transparent 34%
        ),
        linear-gradient(145deg, #07316f 0%, #0d51b0 52%, #126dc8 100%);
}

.auth-visual::after {
    position: absolute;
    right: -130px;
    bottom: -180px;
    width: 480px;
    height: 480px;
    border: 70px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
}

.auth-visual-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.11;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.35) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.35) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom right, #000, transparent 75%);
}

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

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

.auth-brand-logo,
.auth-brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 12px 30px rgba(4, 29, 71, 0.3);
}

.auth-brand-mark {
    display: grid;
    place-items: center;
    color: var(--auth-primary);
    font-size: 25px;
    font-weight: 800;
}

.auth-brand div {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.auth-brand strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

.auth-brand span {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.auth-visual-content {
    max-width: 620px;
    margin: 74px 0;
}

.auth-eyebrow {
    display: inline-flex;
    margin-bottom: 22px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.auth-visual h1 {
    max-width: 610px;
    margin: 0;
    font-size: clamp(36px, 4vw, 58px);
    font-weight: 750;
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.auth-visual-content > p {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.65;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 44px;
}

.auth-feature {
    display: grid;
    grid-template-columns: 42px 1fr;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(5, 30, 74, 0.2);
    backdrop-filter: blur(8px);
}

.auth-feature > span {
    grid-row: span 2;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 700;
}

.auth-feature strong {
    font-size: 14px;
}

.auth-feature small {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    line-height: 1.45;
}

.auth-visual-footer {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.auth-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(39, 144, 225, 0.08),
            transparent 34%
        ),
        var(--auth-background);
}

.auth-form-card {
    width: min(100%, 460px);
    padding: 44px;
    border: 1px solid rgba(207, 217, 230, 0.8);
    border-radius: 24px;
    background: var(--auth-surface);
    box-shadow:
        0 24px 70px rgba(27, 55, 94, 0.1),
        0 4px 18px rgba(27, 55, 94, 0.05);
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 20px;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-form-heading h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: 31px;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.auth-form-heading p {
    margin: 10px 0 32px;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-alert {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #f3c7c3;
    border-radius: 12px;
    color: var(--auth-danger);
    background: #fff6f5;
    font-size: 13px;
}

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

.auth-field label,
.auth-label-row {
    color: #34445e;
    font-size: 13px;
    font-weight: 700;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.auth-label-row a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-field > label {
    display: block;
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 76px 0 45px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    color: var(--auth-ink);
    background: #fbfcfe;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.auth-input-wrap input:focus {
    border-color: var(--auth-primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(39, 144, 225, 0.12);
}

.auth-input-wrap input.is-invalid {
    border-color: #d92d20;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    z-index: 1;
    color: #8190a5;
    font-size: 16px;
    font-weight: 700;
}

.auth-password-toggle {
    position: absolute;
    right: 13px;
    padding: 5px;
    border: 0;
    color: var(--auth-primary);
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 26px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #53627a;
    font-size: 13px;
    cursor: pointer;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

.auth-submit {
    display: flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background:
        linear-gradient(
            100deg,
            var(--auth-primary),
            var(--auth-primary-light)
        );
    box-shadow: 0 14px 25px rgba(13, 81, 176, 0.22);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 30px rgba(13, 81, 176, 0.29);
}

.auth-submit span {
    font-size: 18px;
}

.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: #8a96a8;
    font-size: 11px;
}

.auth-security-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #17b26a;
    box-shadow: 0 0 0 4px rgba(23, 178, 106, 0.11);
}

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

    .auth-visual {
        display: none;
    }

    .auth-form-area {
        min-height: 100vh;
        padding: 28px;
    }

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

@media (max-width: 520px) {
    .auth-form-area {
        align-items: flex-start;
        padding: 20px 14px;
    }

    .auth-form-card {
        margin-top: 28px;
        padding: 30px 22px;
        border-radius: 18px;
    }

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