:root {
    --auth-navy: #0b2447;
    --auth-navy-deep: #071a35;
    --auth-blue: #315bef;
    --auth-indigo: #5146e5;
    --auth-mint: #55d9a3;
    --auth-ink: #0b2447;
    --auth-muted: #68758d;
    --auth-surface: #ffffff;
    --auth-background: #f5f7fc;
    --auth-border: #d9dfeb;
}

* {
    box-sizing: border-box;
}

body.auth-modern-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--auth-background);
    color: var(--auth-ink);
    font-family: "Nunito", Arial, sans-serif;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(390px, 44%) minmax(0, 1fr);
    min-height: 100vh;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: clamp(34px, 5vw, 74px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 95% 2%, rgba(81, 70, 229, .82) 0 13%, transparent 13.2%),
        radial-gradient(circle at 8% 102%, rgba(49, 91, 239, .92) 0 23%, transparent 23.2%),
        linear-gradient(145deg, var(--auth-navy-deep), var(--auth-navy));
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    width: 112px;
    height: 112px;
    content: "";
    border-radius: 50%;
    background: rgba(82, 101, 227, .22);
}

.auth-brand-panel::before {
    right: 8%;
    bottom: 27%;
}

.auth-brand-panel::after {
    left: 10%;
    bottom: 19%;
    width: 190px;
    height: 190px;
}

.auth-brand,
.auth-brand:hover {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 18px;
    color: #fff;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 70px;
    height: 70px;
    padding: 0;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .18);
}

.auth-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.auth-brand-name strong {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -.03em;
}

.auth-brand-name small {
    margin-top: 8px;
    color: #b9c9e8;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .18em;
}

.auth-brand-copy {
    position: relative;
    z-index: 2;
    margin-top: clamp(88px, 14vh, 155px);
}

.auth-mint-line {
    display: block;
    width: 116px;
    height: 10px;
    margin-bottom: 30px;
    border-radius: 999px;
    background: var(--auth-mint);
}

.auth-brand-copy h1 {
    max-width: 650px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.8rem, 4.4vw, 5rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -.05em;
}

.auth-brand-copy p {
    max-width: 590px;
    margin: 20px 0 0;
    color: #d9e3f6;
    font-size: clamp(1.15rem, 1.8vw, 1.65rem);
    line-height: 1.45;
}

.auth-learning-art {
    position: relative;
    z-index: 2;
    width: min(64%, 330px);
    aspect-ratio: 1.25;
    margin: auto auto 0;
}

.auth-art-book {
    position: absolute;
    right: 5%;
    bottom: 0;
    display: grid;
    width: 76%;
    height: 64%;
    place-items: center;
    border: 13px solid rgba(255, 255, 255, .88);
    border-radius: 22px;
    color: var(--auth-blue);
    background: linear-gradient(135deg, #fff, #e8edff);
    box-shadow: 0 28px 60px rgba(0, 0, 0, .28);
    transform: rotate(6deg);
}

.auth-art-book i {
    font-size: clamp(58px, 7vw, 94px);
}

.auth-art-orbit {
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 92, 224, .26);
}

.auth-art-orbit-one {
    left: 0;
    bottom: 14%;
    width: 48%;
    aspect-ratio: 1;
}

.auth-art-orbit-two {
    right: -8%;
    bottom: 12%;
    width: 19%;
    aspect-ratio: 1;
}

.auth-art-spark {
    position: absolute;
    z-index: 2;
    width: 9px;
    height: 38px;
    border-radius: 99px;
    background: var(--auth-mint);
}

.auth-art-spark-one { right: 1%; top: 13%; transform: rotate(12deg); }
.auth-art-spark-two { right: -7%; top: 23%; transform: rotate(55deg); }
.auth-art-spark-three { right: 12%; top: 21%; transform: rotate(-20deg); }

.auth-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 54px clamp(28px, 6vw, 110px) 34px;
    background:
        radial-gradient(circle at 100% 0%, rgba(49, 91, 239, .16) 0 15%, transparent 15.2%),
        radial-gradient(circle at 0 100%, rgba(81, 70, 229, .10) 0 13%, transparent 13.2%),
        var(--auth-background);
}

.auth-card {
    width: 100%;
    max-width: 730px;
    padding: clamp(34px, 4vw, 58px);
    border: 1px solid rgba(217, 223, 235, .75);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 24px 70px rgba(11, 36, 71, .11);
}

.auth-card-login {
    max-width: 690px;
}

.auth-card-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-card-header h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(2rem, 3vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -.045em;
}

.auth-card-header p {
    max-width: 600px;
    margin: 12px auto 0;
    color: var(--auth-muted);
    font-size: 1.08rem;
    line-height: 1.55;
}

.auth-card-icon {
    display: grid;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    color: var(--auth-blue);
    background: #eef1ff;
    font-size: 2.25rem;
}

.auth-field {
    margin-bottom: 22px;
}

.auth-field label,
.auth-label-row label {
    margin: 0 0 8px;
    color: var(--auth-ink);
    font-size: .93rem;
    font-weight: 800;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-label-row a,
.auth-inline-switch a,
.auth-switch-copy a,
.auth-registration-links a {
    color: var(--auth-blue);
    font-weight: 800;
    text-decoration: none;
}

.auth-label-row a:hover,
.auth-inline-switch a:hover,
.auth-switch-copy a:hover,
.auth-registration-links a:hover {
    color: var(--auth-indigo);
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 2;
    color: #7e899d;
    font-size: 1.05rem;
    transform: translateY(-50%);
}

.auth-input-wrap .form-control {
    height: 58px;
    padding: 12px 52px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-ink);
    background: #fff;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
}

.auth-input-wrap .form-control:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(49, 91, 239, .13);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #66758d;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    color: var(--auth-blue);
    background: #eef1ff;
    outline: none;
}

.auth-btn-primary,
.auth-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    margin-top: 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 900;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.auth-btn-primary,
.auth-btn-primary:hover,
.auth-btn-primary:focus {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, #1748eb, #244ff0);
    box-shadow: 0 12px 26px rgba(49, 91, 239, .2);
}

.auth-btn-primary:hover,
.auth-btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(49, 91, 239, .28);
}

.auth-btn-secondary,
.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
    border: 1px solid #bdc6d6;
    color: var(--auth-ink);
    background: #fff;
}

.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
    border-color: var(--auth-blue);
    color: var(--auth-blue);
    background: #f9faff;
}

.auth-switch-copy,
.auth-inline-switch {
    margin: 26px 0 0;
    color: var(--auth-muted);
    text-align: center;
}

.auth-security-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: 12px;
    color: #3c5572;
    background: #eafaf3;
    line-height: 1.35;
}

.auth-security-note i {
    flex: 0 0 auto;
    color: #3ac98d;
    font-size: 1.6rem;
}

.auth-security-note strong {
    display: block;
    color: var(--auth-ink);
}

.auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    color: #707c91;
    font-size: .9rem;
}

.auth-footer-links a {
    color: #5e6b82;
    text-decoration: none;
}

.auth-footer-links a:hover {
    color: var(--auth-blue);
}

.auth-content-registration {
    padding-top: 34px;
    padding-bottom: 22px;
}

.auth-card-registration {
    max-width: 790px;
    padding-top: 36px;
    padding-bottom: 36px;
}

.auth-card-registration .auth-card-header {
    margin-bottom: 22px;
}

.auth-card-registration .auth-card-header h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.7rem);
}

.auth-step-label {
    display: table;
    margin: 0 auto 18px;
    padding: 7px 13px;
    border-radius: 99px;
    color: var(--auth-blue);
    background: #eef1ff;
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-choice-card {
    position: relative;
    display: flex;
    gap: 16px;
    margin: 14px 0;
    padding: 20px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.auth-choice-card:hover {
    border-color: #9eb0ef;
    box-shadow: 0 8px 24px rgba(11, 36, 71, .08);
}

.auth-choice-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.auth-choice-control {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid #aeb8c9;
    border-radius: 50%;
    background: #fff;
}

.auth-choice-card input:checked + .auth-choice-control {
    border-color: var(--auth-blue);
    box-shadow: inset 0 0 0 5px #fff;
    background: var(--auth-blue);
}

.auth-choice-card:focus-within {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(49, 91, 239, .13);
}

.auth-choice-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
}

.auth-choice-content strong {
    margin-bottom: 4px;
    color: var(--auth-ink);
    font-size: 1rem;
}

.auth-choice-content strong em {
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 99px;
    color: #7a8495;
    background: #e9edf3;
    font-size: .68rem;
    font-style: normal;
    text-transform: uppercase;
}

.auth-choice-content small {
    color: #607087;
    font-size: .87rem;
}

.auth-choice-content small i {
    width: 18px;
    color: #3ac98d;
}

.auth-choice-card.is-disabled {
    opacity: .66;
    cursor: not-allowed;
    background: #f5f6f8;
}

.auth-choice-card.is-disabled:hover {
    border-color: var(--auth-border);
    box-shadow: none;
}

.auth-choice-card.is-disabled small i {
    color: #8d98aa;
}

.auth-action-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 14px;
    margin-top: 20px;
}

.auth-action-row .btn {
    margin-top: 0;
}

.auth-action-row i {
    margin-left: 9px;
}

.auth-registration-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin-top: 20px;
    font-size: .9rem;
}

/* Shared shell for registration steps 2-13. The existing form fields and
   submission logic stay intact while the presentation follows the new UI. */
.auth-registration-page {
    align-items: stretch;
}

.auth-registration-page .auth-brand-panel {
    position: sticky;
    top: 0;
    height: 100vh;
}

.auth-registration-content {
    justify-content: flex-start;
    min-width: 0;
    padding-top: 34px;
}

.auth-registration-progress {
    width: 100%;
    height: 7px;
    margin: -5px 0 28px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ecf5;
}

.auth-registration-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--auth-blue), var(--auth-indigo));
}

.auth-legacy-registration {
    max-width: 900px;
}

.auth-legacy-registration > .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.auth-legacy-registration > .container > .card {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
}

.auth-legacy-registration > .container > .card > .card-body {
    padding: 0;
}

.auth-legacy-registration > .container > .card > .card-body > .row {
    display: block;
    margin: 0;
}

.auth-legacy-registration > .container > .card > .card-body > .row > .bg-register-image {
    display: none !important;
}

.auth-legacy-registration > .container > .card > .card-body > .row > .col-lg-7 {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.auth-legacy-registration > .container > .card > .card-body > .row > .col-lg-7 > .p-5 {
    padding: 0 !important;
}

.auth-legacy-registration > .container > .card > .card-body > .row > .col-lg-7 > .p-5 > .text-center {
    display: none;
}

.auth-legacy-registration .alert-info {
    margin-bottom: 26px;
    padding: 15px 18px;
    border-left: 4px solid var(--auth-blue);
    color: #304867;
    background: #eef3ff;
    font-weight: 800;
}

.auth-legacy-registration .form-group {
    margin-bottom: 20px;
}

.auth-legacy-registration .form-group.row {
    align-items: center;
}

.auth-legacy-registration .form-group.row > div:first-child:not(.form-check) {
    color: var(--auth-ink);
    font-weight: 800;
}

.auth-legacy-registration .form-control,
.auth-legacy-registration .bootstrap-select > .dropdown-toggle,
.auth-legacy-registration select.selectpicker {
    min-height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-ink);
    background-color: #fff;
    box-shadow: none;
}

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

.auth-legacy-registration .form-control:focus,
.auth-legacy-registration .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--auth-blue);
    outline: 0 !important;
    box-shadow: 0 0 0 4px rgba(49, 91, 239, .13) !important;
}

.auth-legacy-registration .form-check {
    padding: 15px 18px 15px 42px;
    border: 1px solid #e0e5ef;
    border-radius: 10px;
    background: #fafbfe;
}

.auth-legacy-registration .form-check-input {
    margin-top: .25rem;
}

.auth-legacy-registration .card:not(.o-hidden) {
    border: 1px solid #e0e5ef;
    border-radius: 14px;
    box-shadow: none;
}

.auth-legacy-registration .card:not(.o-hidden) > .card-header,
.auth-legacy-registration .panel-xxx {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e5ef;
    border-radius: 14px 14px 0 0;
    background: #f7f9fd;
}

.auth-legacy-registration .card:not(.o-hidden) > .card-body,
.auth-legacy-registration .panel-body {
    padding: 22px;
}

.auth-legacy-registration hr {
    margin: 28px 0 20px;
    border-top-color: #e5e9f1;
}

.auth-legacy-registration form > .row:last-child,
.auth-legacy-registration form > hr + .row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-right: 0;
    margin-left: 0;
}

.auth-legacy-registration form > hr + .row > [class*="col-sm-"] {
    flex: 1 1 150px;
    max-width: 210px;
    padding: 0 !important;
}

.auth-legacy-registration .btn-primary {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(90deg, #1748eb, #244ff0);
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(49, 91, 239, .18);
}

.auth-legacy-registration .btn-primary:hover,
.auth-legacy-registration .btn-primary:focus {
    color: #fff;
    background: linear-gradient(90deg, #123ed3, #4238d3);
}

.auth-legacy-registration .btn-info {
    border-color: #cfd8ee;
    border-radius: 9px;
    color: var(--auth-blue);
    background: #eef3ff;
    font-weight: 800;
}

.auth-legacy-registration .btn-danger {
    border-radius: 9px;
}

.auth-legacy-registration .text-danger {
    color: #c53c54 !important;
}

.auth-legacy-registration .text-info {
    color: #56708e !important;
}

.auth-card .alert {
    border: 0;
    border-radius: 10px;
}

@media (max-width: 1000px) {
    .auth-page {
        grid-template-columns: 36% minmax(0, 1fr);
    }

    .auth-brand-panel {
        padding: 34px 28px;
    }

    .auth-brand-copy h1 {
        font-size: 2.8rem;
    }

    .auth-learning-art {
        width: 82%;
    }
}

@media (max-width: 760px) {
    .auth-page {
        display: block;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 24px;
        background: linear-gradient(135deg, var(--auth-navy-deep), var(--auth-navy));
    }

    .auth-brand-mark {
        width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 13px;
    }

    .auth-brand-name strong {
        font-size: 1.35rem;
    }

    .auth-brand-name small {
        margin-top: 5px;
        font-size: .75rem;
    }

    .auth-brand-copy {
        margin-top: 32px;
    }

    .auth-mint-line {
        width: 72px;
        height: 7px;
        margin-bottom: 15px;
    }

    .auth-brand-copy h1 {
        font-size: 2rem;
    }

    .auth-brand-copy p {
        margin-top: 10px;
        font-size: 1rem;
    }

    .auth-learning-art {
        display: none;
    }

    .auth-registration-page .auth-brand-panel {
        position: relative;
        height: auto;
    }

    .auth-content {
        min-height: calc(100vh - 220px);
        padding: 28px 16px 22px;
    }

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

    .auth-card-header h2 {
        font-size: 2rem;
    }

    .auth-card-header p {
        font-size: .98rem;
    }

    .auth-choice-card {
        padding: 16px 14px;
    }

    .auth-legacy-registration .form-group.row > div {
        margin-bottom: 8px;
    }

    .auth-legacy-registration form > hr + .row > [class*="col-sm-"] {
        flex: 1 1 100%;
        max-width: none;
    }
}

@media (max-width: 430px) {
    .auth-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .auth-action-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
