body.auth-page {
    overflow-x: hidden;
}

body.auth-page #page,
body.auth-page #main-wrapper.auth-main-wrapper {
    min-height: 100vh;
}

body.auth-page,
body.auth-page #page,
body.auth-page #main-wrapper.auth-main-wrapper,
body.auth-page .auth-scene,
body.auth-page .auth-shell,
body.auth-page .auth-form-pane,
body.auth-page .auth-form-wrap,
body.auth-page .auth-form-card {
    max-width: 100%;
}

body.auth-page .auth-scene *,
body.auth-page .auth-scene *::before,
body.auth-page .auth-scene *::after {
    box-sizing: border-box;
}

body.auth-dark {
    background:
        radial-gradient(circle at top left, rgba(217, 171, 97, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 24%),
        linear-gradient(180deg, #0d1524 0%, #09111d 100%) !important;
}

.auth-scene {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.auth-shell-centered {
    justify-content: center;
}

.auth-side-panel {
    position: relative;
    min-width: 0;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(16, 25, 42, 0.96) 0%, rgba(12, 20, 34, 0.98) 100%);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.3);
}

.auth-side-panel__inner {
    padding: 30px 28px;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-brand-mark img {
    display: block;
    width: auto;
    max-width: 148px;
    max-height: 56px;
    object-fit: contain;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #edf2f7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-side-copy h1,
.auth-side-copy h2 {
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-side-copy p {
    margin: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 14px;
    line-height: 1.65;
}

.auth-side-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.auth-side-list span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #edf2f7;
    font-size: 13px;
    font-weight: 600;
}

.auth-form-pane {
    display: flex;
    justify-content: center;
}

.auth-form-wrap {
    width: 100%;
}

.auth-form-wrap-login {
    max-width: 440px;
}

.auth-form-wrap-register {
    max-width: 700px;
}

.auth-form-card {
    width: 100%;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(207, 216, 229, 0.92);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
    padding: 24px;
}

.auth-form-top {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.auth-form-top-center {
    justify-content: center;
}

.auth-form-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-form-logo img {
    display: block;
    width: auto;
    max-width: 172px;
    max-height: 52px;
    object-fit: contain;
}

.auth-form-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f7ecdf;
    color: #8b5e28;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-form-heading {
    margin-bottom: 16px;
}

.auth-form-heading-center {
    text-align: center;
}

.auth-form-heading h3,
.auth-form-heading h4 {
    margin: 0 0 6px;
    color: #132235;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-form-heading p,
.auth-register-note {
    margin: 0;
    color: #66768a;
    font-size: 14px;
    line-height: 1.55;
}

.auth-input-grid {
    display: grid;
    gap: 14px;
}

.auth-input-grid-compact {
    gap: 12px;
}

.auth-register-layout {
    display: grid;
    gap: 14px;
}

.auth-form-section {
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
    border: 1px solid #e3eaf3;
}

.auth-section-head {
    margin-bottom: 12px;
}

.auth-section-head h4 {
    margin: 0 0 2px;
    color: #16304f;
    font-size: 15px;
    font-weight: 700;
}

.auth-section-head span {
    display: block;
    color: #738396;
    font-size: 12px;
    line-height: 1.45;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.auth-register-span {
    grid-column: 1 / -1;
}

.auth-form-card .form-group {
    margin-bottom: 0;
    min-width: 0;
}

.auth-form-card label {
    display: block;
    margin-bottom: 6px;
    color: #1d2d43;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.auth-form-card .form-control,
.auth-form-card select.form-control,
.auth-form-card .input-group-text {
    min-height: 44px;
    border-radius: 12px !important;
    border: 1px solid #d4dce7;
    box-shadow: none !important;
    font-size: 14px !important;
}

.auth-form-card .form-control,
.auth-form-card select.form-control {
    padding: 10px 12px !important;
    background: #fcfdff;
}

.auth-form-card .input-group {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.auth-form-card .input-group > .input-group-prepend {
    display: flex;
    flex: 0 0 auto;
}

.auth-form-card .input-group > .form-control {
    min-width: 0;
    flex: 1 1 auto;
}

.auth-form-card .input-group-text {
    min-width: 58px;
    justify-content: center;
    background: #f4f7fb;
    color: #43546b;
    font-weight: 700;
}

.auth-form-card .input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.auth-form-card .input-group .input-group-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.auth-form-card .form-control:focus,
.auth-form-card select.form-control:focus,
.auth-form-card .input-group:focus-within .input-group-text {
    border-color: #d2a25f !important;
    box-shadow: 0 0 0 4px rgba(210, 162, 95, 0.16) !important;
}

.auth-form-card .btn {
    min-height: 46px;
    border-radius: 12px !important;
    font-weight: 700;
}

.register-help {
    display: block;
    margin-top: 5px;
    color: #66768a;
    font-size: 12px;
    line-height: 1.5;
}

.username-preview-box,
.notification-box,
.auth-inline-tip {
    border-radius: 14px;
}

.username-preview-box {
    background: #f7fafc;
    border: 1px dashed #c8d3e1;
    padding: 12px 14px;
    font-size: 13px;
}

.notification-box {
    background: linear-gradient(180deg, #fbfdff 0%, #f1f6fb 100%);
    border: 1px solid #d8e3ef;
    padding: 12px 14px 4px;
}

.notification-box > label {
    margin-bottom: 10px;
}

.notification-box .crm-checkbox-inline label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 14px;
    margin-bottom: 10px;
    color: #304258;
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.notification-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.auth-register-actions {
    display: grid;
    gap: 12px;
}

.auth-inline-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #fffaf2 0%, #f7eee1 100%);
    border: 1px solid #ead9c0;
    color: #6d5124;
    font-size: 12px;
    line-height: 1.55;
}

.auth-submit {
    margin-top: 2px;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.auth-actions-compact {
    font-size: 12px;
}

.auth-actions a,
.auth-foot-link a {
    color: #163a71;
    font-weight: 700;
}

.auth-foot-link {
    margin-top: 14px;
    text-align: center;
    color: #66768a;
    font-size: 14px;
}

.auth-scene .alert {
    margin-bottom: 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
}

.auth-visual-trigger:focus-visible,
.auth-form-card .form-control:focus-visible,
.auth-form-card select.form-control:focus-visible,
.auth-form-card .btn:focus-visible,
.auth-actions a:focus-visible,
.auth-foot-link a:focus-visible {
    outline: 3px solid rgba(210, 162, 95, 0.45);
    outline-offset: 3px;
}

@media (max-width: 1200px) {
    .auth-shell {
        width: min(960px, 100%);
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    }

    .auth-form-wrap-register {
        max-width: 660px;
    }
}

@media (max-width: 1024px) {
    .auth-scene {
        min-height: auto;
        padding: 20px 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        gap: 0;
        width: min(700px, 100%);
    }

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

    .auth-form-wrap-login,
    .auth-form-wrap-register {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .auth-scene {
        padding: 12px;
    }

    .auth-form-card {
        padding: 18px 16px 16px;
        border-radius: 20px;
    }

    .auth-form-heading h3,
    .auth-form-heading h4 {
        font-size: 24px;
    }

    .auth-form-heading p,
    .auth-register-note {
        font-size: 13px;
    }

    .auth-register-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .auth-form-section {
        padding: 12px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .auth-form-logo {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-brand-mark {
        flex-wrap: wrap;
    }

    .notification-box .crm-checkbox-inline {
        display: grid;
        gap: 8px;
    }

    .notification-box .crm-checkbox-inline label {
        margin-right: 0;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .auth-scene {
        padding: 0;
    }

    .auth-shell {
        width: 100%;
    }

    .auth-form-pane {
        width: 100%;
    }

    .auth-form-card {
        border-radius: 0;
        padding: 16px 14px 14px;
    }

    .auth-scene-login .auth-form-card {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-form-logo img {
        max-width: 148px;
        max-height: 48px;
    }

    .auth-form-heading h3,
    .auth-form-heading h4 {
        font-size: 22px;
    }

    .auth-form-card .form-control,
    .auth-form-card select.form-control,
    .auth-form-card .input-group-text,
    .auth-form-card .btn {
        min-height: 42px;
    }
}
