:root {
    --auth-bg: #15191e;
    --auth-bg-soft: #1b2128;
    --auth-surface: #171c22;
    --auth-input: #111418;
    --auth-border: rgba(255, 255, 255, 0.09);
    --auth-text: #f5f7fa;
    --auth-muted: #9aa4b2;
    --auth-soft: #c7d0db;
    --auth-primary: #ea6433;
    --auth-primary-hover: #f0774b;
    --auth-blue: #0d6efd;
    --auth-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--auth-text);
    font-family: "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(900px 540px at 12% 8%, rgba(13, 110, 253, 0.12), transparent 60%),
        radial-gradient(820px 500px at 92% 0%, rgba(234, 100, 51, 0.12), transparent 60%),
        linear-gradient(180deg, var(--auth-bg) 0%, #11151a 100%);
    background-attachment: fixed;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.auth-language-shell {
    position: fixed;
    z-index: 20;
    top: 18px;
    right: 18px;
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 136px;
    padding: 7px 8px 7px 12px;
    color: var(--auth-soft);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    backdrop-filter: blur(14px);
}

.language-selector i {
    color: #9ec5fe;
    font-size: 18px;
}

.language-select {
    min-height: 30px;
    padding: 2px 28px 2px 2px;
    color: var(--auth-text);
    font-size: 13px;
    font-weight: 800;
    background-color: transparent;
    border: 0;
    box-shadow: none !important;
}

.language-select option {
    color: #111827;
}

.auth-wrap {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    gap: 18px;
}

.auth-wrap-register {
    width: min(1180px, 100%);
    grid-template-columns: 0.84fr 1.16fr;
}

.brand-side,
.auth-card {
    border: 1px solid var(--auth-border);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
}

.brand-side {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 610px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(650px 300px at 15% 15%, rgba(13, 110, 253, 0.16), transparent 55%),
        radial-gradient(520px 260px at 90% 0%, rgba(234, 100, 51, 0.15), transparent 55%),
        linear-gradient(180deg, #1d242c 0%, var(--auth-surface) 100%);
}

.brand-side::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -110px;
    bottom: -130px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.02), 0 0 0 90px rgba(255, 255, 255, 0.015);
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 58px;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.brand-chip {
    padding: 9px 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 999px;
}

.brand-mid {
    margin: 48px 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: #f7926d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-title {
    max-width: 520px;
    margin: 0;
    color: #fff;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.06;
}

.brand-subtitle {
    max-width: 500px;
    margin: 18px 0 0;
    color: var(--auth-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
}

.brand-points {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.brand-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    color: var(--auth-soft);
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
}

.brand-point-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    color: #9ec5fe;
    font-size: 20px;
    background: rgba(13, 110, 253, 0.16);
    border-radius: 12px;
}

.brand-link {
    width: fit-content;
    color: var(--auth-soft);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.brand-link:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-card {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, var(--auth-bg-soft) 0%, var(--auth-surface) 100%);
}

.auth-title {
    margin: 0;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 8px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 600;
}

.auth-form {
    margin-top: 26px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
}

.form-label {
    margin-bottom: 8px;
    color: var(--auth-soft);
    font-size: 13px;
    font-weight: 700;
}

.optional {
    color: var(--auth-muted);
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 54px;
    padding: 12px 15px;
    color: #fff;
    background-color: var(--auth-input);
    border: 1px solid var(--auth-border);
    border-radius: 15px;
    box-shadow: none;
}

.form-control::placeholder {
    color: #778290;
}

.form-control:focus,
.form-select:focus {
    color: #fff;
    background-color: var(--auth-input);
    border-color: rgba(13, 110, 253, 0.62);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-select {
    color-scheme: dark;
}

.form-check-input {
    background-color: var(--auth-input);
    border-color: rgba(255, 255, 255, 0.18);
}

.form-check-input:checked {
    background-color: var(--auth-blue);
    border-color: var(--auth-blue);
}

.form-check-label {
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 600;
}

.btn-primary-auth {
    min-height: 56px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(180deg, var(--auth-primary-hover) 0%, var(--auth-primary) 100%);
    border: 0;
    border-radius: 17px;
    box-shadow: 0 14px 28px rgba(234, 100, 51, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-auth:hover,
.btn-primary-auth:focus {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 17px 32px rgba(234, 100, 51, 0.28);
}

.auth-footer {
    margin: 20px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.auth-footer a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-language {
    margin-top: 20px;
}

.language-selector {
    display: grid;
    gap: 8px;
}

.language-selector-label {
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.language-selector-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 13px;
    color: var(--auth-soft);
    background: var(--auth-input);
    border: 1px solid var(--auth-border);
    border-radius: 14px;
}

.language-selector-control i {
    font-size: 18px;
}

.language-selector-select {
    width: 100%;
    min-width: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    color-scheme: dark;
}

.validation-summary:empty {
    display: none;
}

.validation-summary,
.validation-summary-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    color: #ffb5bd;
    font-size: 13px;
    font-weight: 700;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.24);
    border-radius: 12px;
}

.validation-summary ul,
.validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.text-danger {
    display: block;
    margin-top: 6px;
    color: #ff8f9a !important;
    font-size: 12px;
    font-weight: 700;
}

.alert {
    border-radius: 13px;
}

.public-join-shell .auth-wrap-register {
    width: min(1120px, 100%);
}

.public-join-brand .brand-title {
    overflow-wrap: anywhere;
}

.academy-join-logo {
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    object-fit: contain;
}

.public-success-card {
    display: grid;
    gap: 0.55rem;
    margin-top: 1.5rem;
    padding: 1.1rem;
    color: #dff8ec;
    background: rgba(31, 157, 112, 0.13);
    border: 1px solid rgba(31, 157, 112, 0.28);
    border-radius: 16px;
}

.public-success-card i {
    color: #5ee0a7;
    font-size: 2rem;
}

.public-success-card strong {
    color: #fff;
    font-size: 1rem;
}

.empty-state {
    display: grid;
    gap: 0.6rem;
    place-items: center;
    padding: 1.2rem;
    color: var(--auth-muted);
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 16px;
}

.empty-state i {
    color: #9ec5fe;
    font-size: 1.8rem;
}

@media (max-width: 991.98px) {
    body {
        background-attachment: scroll;
    }

    .auth-wrap,
    .auth-wrap-register {
        width: min(620px, 100%);
        grid-template-columns: 1fr;
    }

    .brand-side {
        min-height: auto;
    }

    .brand-mid {
        margin: 42px 0;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        padding: 12px 10px;
    }

    .auth-language-shell {
        position: static;
        display: flex;
        justify-content: flex-end;
        padding: 12px 10px 0;
    }

    .brand-side,
    .auth-card {
        padding: 22px;
        border-radius: 22px;
    }

    .brand-logo {
        max-width: 150px;
        max-height: 48px;
    }

    .brand-chip {
        padding: 8px 10px;
        font-size: 11px;
    }

    .brand-mid {
        margin: 36px 0;
    }

    .brand-title {
        font-size: 2rem;
    }

    .auth-title {
        font-size: 26px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-spacer {
        display: none;
    }
}
