.auth-page,
.registration-page {
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-line: #dbe3ee;
    --auth-blue: #2563eb;
    --auth-blue-dark: #1d4ed8;
    --auth-panel: #07152d;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.13), transparent 30rem),
        #f4f7fb;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
}

.registration-page {
    padding: clamp(2rem, 6vw, 5rem) 1rem;
    background:
        radial-gradient(circle at 8% 20%, rgba(37, 99, 235, 0.12), transparent 24rem),
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

.auth-card {
    width: min(100%, 68rem);
    display: grid;
    grid-template-columns: minmax(19rem, 0.9fr) minmax(22rem, 1.1fr);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.auth-card-registration {
    width: min(100%, 76rem);
    grid-template-columns: minmax(18rem, 0.72fr) minmax(30rem, 1.28fr);
}

.auth-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 38rem;
    padding: clamp(2rem, 4vw, 3.5rem);
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(7, 21, 45, 0.98), rgba(11, 40, 82, 0.96)),
        var(--auth-panel);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.auth-brand-panel::before {
    width: 24rem;
    height: 24rem;
    top: -9rem;
    right: -12rem;
    box-shadow: 0 0 0 3rem rgba(59, 130, 246, 0.04), 0 0 0 7rem rgba(59, 130, 246, 0.025);
}

.auth-brand-panel::after {
    width: 14rem;
    height: 14rem;
    left: -7rem;
    bottom: -6rem;
    background: rgba(14, 165, 233, 0.08);
}

.auth-brand-link {
    display: inline-flex;
    width: fit-content;
}

.auth-brand-logo {
    width: 9.5rem;
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-brand-copy {
    margin: auto 0;
    padding: 3rem 0;
}

.auth-eyebrow {
    margin: 0 0 0.9rem;
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-brand-copy h1 {
    max-width: 13ch;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 650;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.auth-brand-copy > p:not(.auth-eyebrow) {
    max-width: 34rem;
    margin-bottom: 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.7;
}

.auth-benefits {
    display: grid;
    gap: 0.9rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.92rem;
}

.auth-benefits i {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 0.5rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
}

.auth-brand-footnote {
    margin: 0;
    color: #94a3b8;
    font-size: 0.78rem;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.auth-card-registration .auth-form-panel {
    padding: clamp(2rem, 4vw, 3.5rem);
}

.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-panel .auth-eyebrow {
    color: var(--auth-blue);
}

.auth-form-header h2 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 650;
    letter-spacing: -0.025em;
}

.auth-form-header p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.65;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-form .form-label,
.auth-field > label {
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 650;
}

.auth-form .form-control,
.auth-form .form-select {
    min-height: 3rem;
    border-color: var(--auth-line);
    border-radius: 0.75rem;
    color: var(--auth-ink);
    background-color: #fbfdff;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-form .form-control:hover,
.auth-form .form-select:hover {
    border-color: #b6c4d7;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: #60a5fa;
    background-color: #ffffff;
    box-shadow: 0 0 0 0.23rem rgba(37, 99, 235, 0.12);
}

.auth-form .auth-field > .row {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
    margin: 0;
}

.auth-form .auth-field > .row > .col-10 {
    width: auto;
    flex: 1 1 auto;
    padding: 0;
}

.auth-form .country-select-flag {
    width: auto;
    flex: 0 0 auto;
    padding: 0;
}

.auth-form .country-select-flag img {
    display: block;
    width: 1.6rem;
    height: auto;
    border-radius: 0.15rem;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.auth-form .form-text {
    margin-top: 0.45rem;
    color: #738198;
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-form .form-text ul {
    margin: 0.4rem 0 0;
    padding-left: 1.15rem;
}

.auth-form .errorlist {
    margin: 0 0 0.45rem;
    padding: 0;
    color: #b42318;
    font-size: 0.82rem;
    list-style: none;
}

.auth-form .invalid-feedback {
    font-size: 0.8rem;
}

.auth-form .form-check {
    padding-left: 1.8rem;
}

.auth-form .form-check-input {
    margin-left: -1.8rem;
    border-color: #aebdd0;
}

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

.auth-primary-button {
    min-height: 3rem;
    border: 0;
    border-radius: 0.75rem;
    font-weight: 650;
    background: linear-gradient(135deg, var(--auth-blue), var(--auth-blue-dark));
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.auth-primary-button:hover,
.auth-primary-button:focus {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(37, 99, 235, 0.26);
}

.auth-secondary-button {
    min-height: 3rem;
    border-color: #c9d5e5;
    border-radius: 0.75rem;
    color: #1e3a5f;
    font-weight: 650;
    background: #f8fbff;
}

.auth-secondary-button:hover,
.auth-secondary-button:focus {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
}

.auth-inline-link {
    color: var(--auth-blue-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-inline-link:hover,
.auth-inline-link:focus {
    color: #1e3a8a;
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.4rem 0;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.auth-switch {
    margin: 1.5rem 0 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-invitation {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #bae6fd;
    border-radius: 0.85rem;
    color: #0c4a6e;
    background: #f0f9ff;
}

.auth-invitation i {
    margin-top: 0.15rem;
    color: #0284c7;
}

.auth-form-grid {
    --bs-gutter-x: 1rem;
}

.auth-consent-block {
    padding-top: 0.35rem;
}

.auth-status {
    margin-top: 0.85rem;
    font-size: 0.86rem;
}

.auth-status-error {
    color: #b42318 !important;
}

.auth-status-success {
    color: #15803d !important;
}

@media (max-width: 899.98px) {
    .auth-card,
    .auth-card-registration {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 2rem;
    }

    .auth-brand-copy {
        padding: 2.5rem 0 1rem;
    }

    .auth-brand-copy h1 {
        max-width: 18ch;
    }

    .auth-benefits,
    .auth-brand-footnote {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-shell,
    .registration-page {
        padding: 0;
    }

    .auth-card {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-form-panel {
        padding: 2rem 1.25rem 2.5rem;
    }

    .auth-brand-panel {
        padding: 1.5rem 1.25rem;
    }

    .auth-brand-copy {
        padding-bottom: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-primary-button,
    .auth-form .form-control,
    .auth-form .form-select {
        transition: none;
    }
}
