* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f9;
    color: #1a1a1a;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: #1f4e8c;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(520px, 1.15fr);
}

.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 64px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.15),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            #163e6f 0%,
            #1f4e8c 55%,
            #102e55 100%
        );
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -160px;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.auth-eyebrow,
.auth-heading__eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.auth-brand h1 {
    max-width: 460px;
    margin: 0;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.auth-intro {
    max-width: 500px;
    margin: 28px 0 44px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.7;
}

.auth-features {
    display: grid;
    gap: 18px;
}

.auth-features div {
    display: grid;
    gap: 4px;
    padding-left: 18px;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-features strong {
    font-size: 15px;
}

.auth-features span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.5;
}

.auth-panel {
    display: flex;
    justify-content: center;
    padding: 60px 32px;
    overflow-y: auto;
}

.auth-panel__inner {
    width: 100%;
    max-width: 700px;
    margin: auto;
}

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

.auth-heading__eyebrow {
    color: #1f4e8c;
}

.auth-heading h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.auth-heading p:not(.auth-heading__eyebrow) {
    max-width: 600px;
    margin: 14px 0 0;
    color: #6b6b6b;
    font-size: 16px;
    line-height: 1.65;
}

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

.form-section {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid #d9dde3;
    border-radius: 16px;
    background: #ffffff;
}

.form-section h3 {
    margin: 0 0 2px;
    color: #163e6f;
    font-size: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label,
.label-row label {
    color: #2e2e2e;
    font-size: 14px;
    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cdd3dc;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

input:focus,
select:focus {
    border-color: #1f4e8c;
    box-shadow: 0 0 0 4px rgba(31, 78, 140, 0.11);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a4a4a;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-row input {
    width: 17px;
    min-height: auto;
    height: 17px;
    margin: 0;
}

.button {
    min-height: 50px;
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button-primary {
    color: #ffffff;
    background: #1f4e8c;
    box-shadow: 0 10px 24px rgba(31, 78, 140, 0.2);
}

.button-primary:hover {
    background: #163e6f;
}

.text-link {
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.auth-switch {
    margin-top: 28px;
    color: #6b6b6b;
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    margin-left: 4px;
    font-weight: 800;
    text-decoration: none;
}

.alert {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
}

.alert ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.alert-error {
    border: 1px solid #efb9b9;
    background: #fff2f2;
    color: #8a2020;
}

.alert-success {
    border: 1px solid #b8ddc2;
    background: #effaf2;
    color: #216a35;
}

.auth-footer {
    margin-top: 46px;
    color: #8a94a6;
    font-size: 12px;
    text-align: center;
}

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

    .auth-brand {
        min-height: auto;
        padding: 42px 28px;
    }

    .auth-logo {
        width: 58px;
        height: 58px;
        margin-bottom: 24px;
        border-radius: 14px;
        font-size: 20px;
    }

    .auth-brand h1 {
        font-size: 42px;
    }

    .auth-intro {
        margin-bottom: 0;
    }

    .auth-features {
        display: none;
    }

    .auth-panel {
        padding: 42px 22px;
    }
}

@media (max-width: 620px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 18px;
    }

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