:root {
    /* PRIMARY */
    --primary-color: #0073b3;
    --primary-color2: #005f94;
    --primary-color-dark: #0b3f67;
    --primary-color-light: #5bc0de;
    --primary-color-light2: #a7e1f5;

    /* SECONDARY */
    --secondary-color: #E36159;
    --secondary-color-light: #f28b84;
    --secondary-color-light2: #f7c4c1;

    /* AUX */
    --cadet-gray: #3195b5;
    --vanilla: #ecedf0;
    --burgundy: #d2322d;

    /* BASE */
    --bg-color: #ecedf0;
    --text-color: #777777;
    --title-color: #333333;
    --title-color-light: #ffffff;

    /* AUTH */
    --auth-bg: #ecedf0;
    --auth-card-bg: #ffffff;

    --auth-border: rgba(0, 0, 0, 0.08);
    --auth-border-strong: rgba(0, 0, 0, 0.15);

    --auth-text: #444444;
    --auth-muted: #999999;

    --auth-primary: #0073b3;
    --auth-primary-hover: #005f94;

    /* STATES */
    --auth-success-bg: rgba(71, 164, 71, 0.15);
    --auth-danger-bg: rgba(210, 50, 45, 0.15);
    --auth-warning-bg: rgba(237, 156, 40, 0.18);
    --auth-info-bg: rgba(91, 192, 222, 0.18);

    /* SHADOWS */
    --auth-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    --auth-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.08);
}

html,
body {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(4, 30, 66, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(107, 153, 195, 0.12), transparent 30%),
        var(--auth-bg);
}

body {
    margin: 0;
    font-family: "Manrope", Arial, sans-serif;
    color: var(--auth-text);
}

/* page layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-shell {
    width: 100%;
    max-width: 1240px;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    background: var(--auth-card-bg);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--auth-shadow);
}

.auth-shell-wide {
    max-width: 1240px;
    grid-template-columns: 1.02fr 0.98fr;
}

.auth-shell-signup {
    max-width: 1280px;
    grid-template-columns: 0.84fr 1.16fr;
}

/* left side */
.auth-brand-side {
    position: relative;
    background:
        linear-gradient(135deg,
            #0a4f7d 0%,
            var(--primary-color2) 40%,
            var(--primary-color) 100%
        );
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
}

.auth-brand-side.auth-brand-side-tall,
.auth-brand-side-signup {
    min-height: 760px;
}

.auth-brand-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08), transparent 28%);
    pointer-events: none;
}

.auth-brand-top,
.auth-brand-bottom {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.auth-consent-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-consent-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;

    width: 18px;
    height: 18px;
    min-width: 18px;

    border: 1.5px solid #bdbdbd;
    border-radius: 4px;
    background-color: #fff;

    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover */
.auth-consent-check input[type="checkbox"]:hover {
    border-color: var(--secondary-color);
}

/* checked фон */
.auth-consent-check input[type="checkbox"]:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* 🔥 нормальная галка */
.auth-consent-check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    inset: 0;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8L6.5 11.5L13 5' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

/* label */
.auth-consent-check label {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--auth-text);
    cursor: pointer;
}

/* ссылка внутри */
.auth-consent-check .auth-link {
    font-weight: 500;
    color: var(--secondary-color);
    text-decoration: none;
}

.auth-consent-check .auth-link:hover {
    color: var(--secondary-color-light);
    text-decoration: underline;
}

.auth-submit-wrap {
    margin-top: 18px;
}

.auth-submit-wrap .btn-auth-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


.auth-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}

.auth-logo-wrap:hover {
    color: #fff;
    text-decoration: none;
}

.auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
}

.auth-brand-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 10px;
}

.auth-brand-subtitle {
    color: rgba(255, 255, 255, 0.85);
    max-width: 480px;
    line-height: 1.6;
    margin: 0;
}

.auth-feature-list {
    margin-top: 30px;
    display: grid;
    gap: 12px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}

.auth-feature-item i {
    width: 18px;
    margin-top: 5px;
    text-align: center;
}

/* right side */
.auth-form-side {
    padding: 48px 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-card-bg);
}

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

.auth-form-wrap-wide {
    max-width: 620px;
}

.auth-form-wrap-narrow {
    max-width: 430px;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-kicker {
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.auth-form-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--title-color);
    margin: 0 0 6px;
}

.auth-form-subtitle {
    color: var(--auth-text);
    opacity: 0.72;
    margin: 0;
    line-height: 1.6;
}

.auth-card {
    padding: 0;
}

/* registration grid restore */
.auth-card .row {
    --bs-gutter-x: 20px;
    --bs-gutter-y: 20px;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.auth-card .row > * {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

.auth-card .col-md-6,
.auth-card .col-12 {
    display: flex;
    flex-direction: column;
}

.auth-card .col-12 {
    flex: 0 0 auto;
    width: 100%;
}

.auth-card form > button {
    margin-top: 20px;
}

@media (min-width: 768px) {
    .auth-card .col-md-6 {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* forms */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--title-color);
    font-size: 14px;
    line-height: 1.25;
}

.auth-input-group {
    position: relative;
    /*margin-top: 10px;*/
    width: 100%;
}

.auth-input-group .auth-input-icon,
.auth-input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cadet-gray);
    z-index: 2;
}

.form-control,
.form-select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
    background-color: #fff;
    font-size: 15px;
}

.form-control::placeholder,
.form-select::placeholder {
    color: rgba(68, 68, 68, 0.45);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color-light);
    box-shadow: 0 0 0 3px rgba(107, 153, 195, 0.2);
}

textarea.form-control {
    min-height: 110px;
}

.auth-input-group .form-control,
.auth-input-group .form-select {
    padding-left: 40px;
}

.auth-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.form-check-input {
    margin-top: 0;
    border-color: var(--auth-border-strong);
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(107, 153, 195, 0.2);
}

.form-check-label {
    color: var(--auth-text);
    font-size: 14px;
}

/* buttons */
.btn-auth-primary {
    width: 100%;
    min-height: 56px;
    border-radius: 12px;

    background: linear-gradient(75deg,
        #0a4f7d 0%,
        var(--primary-color2) 50%,
        var(--primary-color) 100%
    );

    border: none;
    color: #fff;

    font-weight: 700;
    font-size: 18px;
    line-height: 1;

    transition: all .2s ease;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    box-shadow: 0 6px 18px rgba(10, 79, 125, 0.25);
}

.btn-auth-primary i {
    font-size: 17px;
    line-height: 1;
}

.btn-auth-primary:hover,
.btn-auth-primary:focus {
    background: linear-gradient(135deg,
        var(--primary-color2) 0%,
        var(--primary-color) 100%
    );

    color: #fff;

    transform: translateY(-2px);

    box-shadow: 0 10px 28px rgba(10, 79, 125, 0.35);
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(10, 79, 125, 0.2);
}

.auth-link {
    color: var(--secondary-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--secondary-color-light);
    text-decoration: underline;
}

.auth-back-link {
    font-size: 13px;
}

.back-link {
    color: #9a9a9a;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-footer-text {
    text-align: center;
    margin: 16px 0 0;
    color: var(--auth-text);
    opacity: 0.72;
}

/* divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-muted);
    font-size: 13px;
    margin: 22px 0 18px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--auth-border);
}

/* alerts and validation */
.alert {
    border-radius: 12px;
}

.alert-success {
    background-color: var(--auth-success-bg);
    border-color: rgba(25, 135, 84, 0.15);
}

.alert-danger {
    background-color: var(--auth-danger-bg);
    border-color: rgba(220, 53, 69, 0.12);
}

.alert-warning {
    background-color: var(--auth-warning-bg);
}

.alert-info {
    background-color: var(--auth-info-bg);
}

.invalid-feedback,
.text-danger.small {
    display: block;
}

.text-muted {
    color: var(--auth-muted) !important;
}

/* done / complete pages */
.auth-state-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-state-card {
    width: 100%;
    max-width: 660px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    padding: 42px 36px;
    text-align: center;
}

.auth-state-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(107, 153, 195, 0.16);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 22px;
}

.auth-state-icon.is-success {
    background: rgba(25, 135, 84, 0.12);
    color: #166534;
}

.auth-state-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--title-color);
    margin: 0 0 12px;
}

.auth-state-subtitle {
    color: var(--auth-text);
    opacity: 0.72;
    line-height: 1.7;
    margin: 0 auto 28px;
    max-width: 520px;
}

.auth-state-hint {
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 24px;
}

.auth-state-hint-title {
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 8px;
}

.auth-state-hint ul {
    margin: 0;
    padding-left: 18px;
    color: var(--auth-muted);
}

.auth-state-btn {
    min-height: 50px;
    min-width: 220px;
    border-radius: 14px;
    font-weight: 700;
}

/* helpers */
.auth-text-white-82 {
    color: rgba(255,255,255,0.82);
}

.auth-text-white-80 {
    color: rgba(255,255,255,0.8);
}

.auth-brand-company {
    font-weight: 800;
    font-size: 20px;
    line-height: 1.1;
}

.auth-brand-caption {
    font-size: 13px;
}

.auth-mt-56 {
    margin-top: 56px;
}

/* responsive */
@media (max-width: 991.98px) {
    .auth-shell,
    .auth-shell-wide,
    .auth-shell-signup {
        grid-template-columns: 1fr;
    }

    .auth-brand-side,
    .auth-brand-side.auth-brand-side-tall,
    .auth-brand-side-signup {
        min-height: auto;
        padding: 30px 28px;
    }

    .auth-form-side {
        padding: 30px 20px 32px;
    }

    .auth-brand-title {
        font-size: 24px;
    }

    .auth-form-title,
    .auth-state-title {
        font-size: 26px;
    }

    .auth-row-between {
        flex-wrap: nowrap;
        gap: 8px;
    }
}

@media (max-width: 575.98px) {
    .auth-page,
    .auth-state-page {
        padding: 16px 12px;
    }

    .auth-brand-side {
        padding: 24px 20px;
    }

    .auth-form-side {
        padding: 20px 16px 24px;
    }

    .auth-card,
    .auth-state-card {
        padding: 20px 18px;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-form-title,
    .auth-state-title {
        font-size: 24px;
    }
    .auth-row-between {
        flex-wrap: wrap;
        gap: 8px;
    }

    .auth-row-between .auth-link {
        width: 100%;
        text-align: right;
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .auth-card .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}