:root {
    --auth-brand-blue: #004283;
    --auth-brand-blue-strong: #00386f;
    --auth-brand-blue-soft: #dbe9f6;
    --auth-brand-green: #4ead33;
    --auth-brand-green-soft: #e8f6e2;
    --auth-brand-ink: #07244b;
    --auth-brand-copy: #49627d;
    --auth-brand-border: #d1e1ef;
    --auth-brand-surface: rgba(255, 255, 255, 0.94);
    --auth-brand-shadow: 0 30px 70px rgba(0, 66, 131, 0.14);
}

html,
body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body.auth-shell {
    margin: 0;
    position: relative;
    background:
        radial-gradient(circle at 16% 18%, rgba(0, 66, 131, 0.11), transparent 30%),
        radial-gradient(circle at 88% 14%, rgba(78, 173, 51, 0.11), transparent 22%),
        linear-gradient(180deg, #f4f8fc 0%, #edf4fa 62%, #f4f8fc 100%);
    color: var(--auth-brand-ink);
}

body.auth-shell::before,
body.auth-shell::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    filter: blur(18px);
    pointer-events: none;
}

body.auth-shell::before {
    top: -110px;
    left: -90px;
    background: radial-gradient(circle, rgba(0, 66, 131, 0.16), transparent 68%);
}

body.auth-shell::after {
    right: -80px;
    bottom: -110px;
    background: radial-gradient(circle, rgba(78, 173, 51, 0.16), transparent 64%);
}

.auth-shell__page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 26px;
}

.auth-shell__topbar {
    width: min(1240px, 100%);
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-shell__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 66, 131, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 38px rgba(0, 66, 131, 0.12);
}

.auth-shell__brand:hover,
.auth-shell__brand:focus {
    text-decoration: none;
    box-shadow: 0 20px 44px rgba(0, 66, 131, 0.18);
}

.auth-shell__brand-logo {
    display: block;
    width: auto;
    height: 46px;
}

.auth-shell__language {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.auth-language-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 66, 131, 0.08);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 16px 34px rgba(0, 66, 131, 0.11);
}

.auth-language-selector__option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: #5e7186;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.auth-language-selector__option:hover,
.auth-language-selector__option:focus {
    color: var(--auth-brand-blue);
    background: rgba(0, 66, 131, 0.06);
    text-decoration: none;
    transform: translateY(-1px);
}

.auth-language-selector__option.is-active {
    color: var(--auth-brand-blue);
    background: linear-gradient(135deg, rgba(0, 66, 131, 0.12), rgba(78, 173, 51, 0.13));
}

.auth-shell__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 116px);
}

.auth-shell__main.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.auth-shell .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.auth-shell .auth-flow-card {
    position: relative;
    width: 100%;
    border: 1px solid rgba(0, 66, 131, 0.08);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--auth-brand-shadow);
    background: var(--auth-brand-surface);
}

.auth-shell .auth-flow-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--auth-brand-blue) 0%, #0f71b8 52%, var(--auth-brand-green) 100%);
}

.auth-shell .login-card-body {
    padding: clamp(1.45rem, 2.4vw, 2.25rem);
}

.auth-shell .auth-flow-card__header {
    margin-bottom: 1.15rem;
}

.auth-shell .auth-flow-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 66, 131, 0.08);
    color: var(--auth-brand-blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-shell .auth-flow-card__title {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--auth-brand-ink);
}

.auth-shell .auth-flow-card__hint {
    margin: 0.7rem auto 0;
    max-width: 42rem;
    color: var(--auth-brand-copy);
    font-size: 1.05rem;
    line-height: 1.58;
}

.auth-shell .auth-flow-card__form--compact .gc-form-field-shell {
    margin-bottom: 0.9rem;
}

.auth-shell .auth-flow-card__primary-action {
    margin-top: 0.45rem;
}

.auth-shell .auth-flow-card__form .btn-primary,
.auth-shell .auth-flow-card__primary-action .btn-primary {
    min-height: 52px;
    border: 0;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, #0054ad 0%, #1976e3 70%);
    box-shadow: 0 18px 34px rgba(0, 84, 173, 0.2);
}

.auth-shell .auth-flow-card__form .btn-primary:hover,
.auth-shell .auth-flow-card__form .btn-primary:focus,
.auth-shell .auth-flow-card__primary-action .btn-primary:hover,
.auth-shell .auth-flow-card__primary-action .btn-primary:focus {
    background: linear-gradient(135deg, #004995 0%, #0f6ad0 70%);
    box-shadow: 0 20px 38px rgba(0, 84, 173, 0.26);
}

.auth-shell .auth-flow-card__secondary-action {
    margin-bottom: 0;
}

.auth-shell .auth-flow-card__secondary-action a,
.auth-shell .auth-flow-card__secondary-action button.btn-link {
    color: var(--auth-brand-blue);
    font-weight: 700;
    text-decoration: none;
}

.auth-shell .auth-flow-card__secondary-action a:hover,
.auth-shell .auth-flow-card__secondary-action a:focus,
.auth-shell .auth-flow-card__secondary-action button.btn-link:hover,
.auth-shell .auth-flow-card__secondary-action button.btn-link:focus {
    color: var(--auth-brand-blue-strong);
    text-decoration: underline;
}

.auth-shell .auth-links-stack {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.auth-shell .gc-ui-callout {
    margin-bottom: 1rem;
    border-radius: 20px;
}

.auth-shell .gc-form-field-shell {
    margin-bottom: 1rem;
}

.auth-shell .gc-form-field-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--auth-brand-ink);
}

.auth-shell .gc-form-field-label .badge {
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
}

.auth-shell .gc-form-field-label .text-danger {
    color: #e94d5c !important;
}

.auth-shell .icheck-primary label {
    color: var(--auth-brand-ink);
    font-weight: 600;
}

.auth-shell .input-group-text {
    min-width: 56px;
    justify-content: center;
    background: #f4f8fc;
    border-color: var(--auth-brand-border);
    color: #4e647b;
}

.auth-shell .form-control {
    min-height: 54px;
    border-color: var(--auth-brand-border);
    border-radius: 16px;
    color: var(--auth-brand-ink);
    background: #fff;
}

.auth-shell .form-control::placeholder {
    color: #6d8399;
}

.auth-shell .input-group > .form-control {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.auth-shell .input-group > .input-group-append > .input-group-text {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.auth-shell .form-control:focus {
    border-color: #0b6fb5;
    box-shadow: 0 0 0 0.22rem rgba(0, 66, 131, 0.14);
}

.auth-shell .auth-info-strip {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 66, 131, 0.08);
    background: linear-gradient(135deg, rgba(0, 66, 131, 0.08), rgba(78, 173, 51, 0.1));
    color: #16537a;
    line-height: 1.62;
}

.auth-shell .password-strength-progress {
    height: 0.58rem;
    margin: 0.3rem 0 1rem;
    border-radius: 999px;
    overflow: hidden;
    background: #deebf5;
}

.auth-shell .password-strength-bar {
    transition: width 0.18s ease, background-color 0.18s ease;
}

.auth-shell .password-strength-bar--1 {
    background-color: #c85a62;
}

.auth-shell .password-strength-bar--2 {
    background-color: #d98a41;
}

.auth-shell .password-strength-bar--3 {
    background-color: #2a83c4;
}

.auth-shell .password-strength-bar--4 {
    background-color: #0b6fb5;
}

.auth-shell .password-strength-bar--5 {
    background-color: var(--auth-brand-green);
}

.auth-shell .password-rule-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: grid;
    gap: 0.65rem;
}

.auth-shell .password-rule-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 46px;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    border: 1px solid #dae6f1;
    background: #fff;
    color: #556d86;
    font-weight: 600;
}

.auth-shell .password-rule-list li::before {
    content: "";
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    background: #c8d8e6;
    flex: 0 0 auto;
}

.auth-shell .password-rule-list--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-shell .password-rule-list--compact li:last-child {
    grid-column: span 2;
}

.auth-shell .password-rule-item--success {
    border-color: rgba(78, 173, 51, 0.24);
    background: rgba(78, 173, 51, 0.08);
    color: #2a6b1d;
}

.auth-shell .password-rule-item--success::before {
    background: var(--auth-brand-green);
}

.auth-shell .password-rule-item--error {
    border-color: rgba(214, 79, 91, 0.18);
    background: rgba(214, 79, 91, 0.06);
    color: #b24450;
}

.auth-shell .password-rule-item--error::before {
    background: #d64f5b;
}

.auth-shell .auth-flow-section {
    padding: 1.1rem 1.15rem;
    border-radius: 24px;
    border: 1px solid rgba(0, 66, 131, 0.08);
    background: #f7fbfe;
    height: 100%;
}

.auth-shell .auth-flow-section__title {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--auth-brand-ink);
}

.auth-shell .auth-flow-section__copy {
    margin-bottom: 0.85rem;
    color: var(--auth-brand-copy);
    line-height: 1.55;
}

.auth-shell .auth-flow-section--embedded {
    margin-top: 0.7rem;
}

.auth-shell .auth-register-layout {
    display: grid;
    gap: 1.35rem;
    align-items: start;
}

.auth-shell .auth-register-layout__aside {
    display: grid;
    gap: 1rem;
}

.auth-shell .auth-flow-card--register,
.auth-shell .auth-flow-card--password-reset.auth-flow-card--wide {
    max-width: 1160px;
    margin: 0 auto;
}

.auth-shell .verification-code-container {
    gap: 0.6rem;
    justify-content: center;
}

.auth-shell .verification-code-input {
    max-width: 60px;
}

@media (min-width: 992px) {
    .auth-shell__page {
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .auth-shell .auth-flow-card--register .login-card-body {
        padding: 1.5rem 1.6rem;
    }

    .auth-shell .auth-register-layout {
        grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    }
}

@media (max-width: 991.98px) {
    .auth-shell .password-rule-list--compact {
        grid-template-columns: 1fr;
    }

    .auth-shell .password-rule-list--compact li:last-child {
        grid-column: auto;
    }
}

@media (max-width: 767.98px) {
    .auth-shell__page {
        padding: 14px 10px 22px;
    }

    .auth-shell__topbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }

    .auth-shell__brand {
        width: 100%;
        padding: 0.8rem 1rem;
    }

    .auth-shell__brand-logo {
        height: 40px;
    }

    .auth-shell__language {
        justify-content: center;
    }

    .auth-language-selector {
        width: 100%;
        justify-content: center;
    }

    .auth-language-selector__option {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
    }

    .auth-shell__main {
        min-height: calc(100vh - 134px);
        align-items: flex-start;
    }

    .auth-shell .login-card-body {
        padding: 1.25rem;
    }

    .auth-shell .auth-flow-card {
        border-radius: 24px;
    }

    .auth-shell .auth-flow-card__title {
        font-size: 2rem;
    }

    .auth-shell .auth-flow-card__hint {
        font-size: 0.98rem;
    }

    .auth-shell .form-control,
    .auth-shell .auth-flow-card__form .btn-primary,
    .auth-shell .auth-flow-card__primary-action .btn-primary {
        min-height: 48px;
    }
}
