/* Shared login and registration experience */
.animated-bg.auth-modern-page,
.animated-bg:has(.card-header .logo-auth),
.animated-bg:has(.auth-form-wrap) {
    --auth-navy: #102a43;
    --auth-green: #197149;
    --auth-green-dark: #12583a;
    --auth-muted: #718096;
    --auth-border: #dfe7ed;
}

.auth-modern-page {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 12% 15%, rgba(25,113,73,.11), transparent 28%),
        radial-gradient(circle at 92% 88%, rgba(23,105,170,.09), transparent 27%),
        #f3f7f5;
}
.auth-shell {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.03fr .97fr;
    overflow: hidden;
    border: 1px solid rgba(16,42,67,.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(16,42,67,.16);
}
.auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px;
    color: #fff;
    background: linear-gradient(145deg, #102a43 0%, #124156 52%, #197149 100%);
}
.auth-brand-panel::before,
.auth-brand-panel::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); }
.auth-brand-panel::before { width: 340px; height: 340px; right: -160px; top: -120px; }
.auth-brand-panel::after { width: 230px; height: 230px; left: -100px; bottom: -110px; }
.auth-brand-content, .auth-brand-panel > small { position: relative; z-index: 1; }
.auth-brand-logo { display: inline-flex; width: 98px; min-height: 58px; margin-bottom: 68px; padding: 9px 12px; align-items: center; border-radius: 12px; background: #fff; }
.auth-brand-logo img { width: 100%; max-height: 42px; object-fit: contain; }
.auth-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: #9de1bf; font-size: 12px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.auth-brand-panel h1 { margin: 0 0 18px; color: #fff; font-size: clamp(32px, 4vw, 45px); line-height: 1.12; letter-spacing: -.035em; }
.auth-brand-panel p { max-width: 430px; margin: 0; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.75; }
.auth-benefits { display: grid; gap: 13px; margin-top: 35px; }
.auth-benefits div { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.88); font-size: 13px; }
.auth-benefits i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #b4edcd; background: rgba(255,255,255,.1); }
.auth-brand-panel > small { color: rgba(255,255,255,.5); font-size: 11px; }
.auth-form-panel { display: grid; place-items: center; padding: 48px 52px; background: #fff; }
.auth-form-wrap { width: 100%; max-width: 390px; }
.auth-mobile-logo { display: none; }
.auth-heading { margin-bottom: 28px; }
.auth-heading > span { display: block; margin-bottom: 8px; color: var(--auth-green); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.auth-heading h2 { margin: 0 0 8px; color: var(--auth-navy); font-size: 30px; font-weight: 750; letter-spacing: -.025em; }
.auth-heading p { margin: 0; color: var(--auth-muted); font-size: 13px; }
.auth-form .form-group { margin-bottom: 19px; }
.auth-form .form-label { margin-bottom: 7px; color: #40566c; font-size: 12px; font-weight: 650; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i { position: absolute; z-index: 1; left: 15px; top: 50%; color: #95a3b2; transform: translateY(-50%); }
.auth-input-wrap .form-control { height: 48px; padding: 10px 45px 10px 43px; color: #344b61; border: 1px solid var(--auth-border); border-radius: 11px; background: #fbfcfd; font-size: 13px; transition: .2s ease; }
.auth-input-wrap .form-control:focus { border-color: #6eaa8b; background: #fff; box-shadow: 0 0 0 3px rgba(25,113,73,.11); }
.password-toggle { position: absolute; right: 8px; top: 50%; width: 34px; height: 34px; padding: 0; color: #8b98a7; border: 0; border-radius: 8px; background: transparent; transform: translateY(-50%); }
.password-toggle:hover { color: var(--auth-green); background: #edf7f2; }
.auth-options { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 3px 0 23px; }
.auth-options a, .auth-switch a { color: var(--auth-green); font-size: 12px; font-weight: 700; }
.auth-checkbox { display: flex; align-items: center; gap: 8px; margin: 0; color: #63758a; font-size: 12px; cursor: pointer; }
.auth-checkbox input { width: 16px; height: 16px; accent-color: var(--auth-green); }
.auth-submit { width: 100%; height: 48px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #fff; border: 0; border-radius: 11px; background: var(--auth-green); font-size: 13px; font-weight: 700; box-shadow: 0 10px 22px rgba(25,113,73,.2); transition: .2s ease; }
.auth-submit:hover { background: var(--auth-green-dark); transform: translateY(-1px); box-shadow: 0 13px 25px rgba(25,113,73,.26); }
.auth-switch { margin: 24px 0 0; color: #768598; text-align: center; font-size: 12px; }
.auth-security { margin: 24px 0 0; padding-top: 17px; color: #9aa6b4; border-top: 1px solid #edf1f4; text-align: center; font-size: 10px; }
.auth-security i { margin-right: 5px; }
.auth-alert { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border: 0; border-left: 3px solid #d9534f; border-radius: 9px; font-size: 12px; }

/* Multi-step registration pages using the existing markup */
.animated-bg:has(.card-header .logo-auth) {
    min-height: 100vh;
    padding: 28px 16px;
    background:
        radial-gradient(circle at 10% 10%, rgba(25,113,73,.11), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(23,105,170,.08), transparent 25%),
        #f3f7f5;
}
.animated-bg:has(.card-header .logo-auth) > .container { max-width: 900px; }
.animated-bg:has(.card-header .logo-auth) .card {
    overflow: hidden;
    border: 1px solid rgba(16,42,67,.08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(16,42,67,.14);
}
.animated-bg:has(.card-header .logo-auth) .card-header { position: relative; padding: 28px 34px 22px; border: 0; background: linear-gradient(120deg, #102a43, #16435b 62%, #197149); }
.animated-bg:has(.card-header .logo-auth) .card-header::after { content: ''; position: absolute; right: -45px; top: -75px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.07); }
.animated-bg:has(.card-header .logo-auth) .logo-auth { position: relative; z-index: 1; width: 95px; max-height: 50px; padding: 7px 10px; object-fit: contain; border-radius: 9px; background: #fff; }
.animated-bg:has(.card-header .logo-auth) .card-title { position: relative; z-index: 1; margin: 16px 0 0 !important; color: #fff; font-size: 21px; font-weight: 700; }
.animated-bg:has(.card-header .logo-auth) .card-body { padding: 30px 34px 34px; }
.animated-bg:has(.card-header .logo-auth) .form-group { margin-bottom: 18px !important; }
.animated-bg:has(.card-header .logo-auth) label { margin-bottom: 7px; color: #40566c; font-size: 12px; font-weight: 650; }
.animated-bg:has(.card-header .logo-auth) .form-control,
.animated-bg:has(.card-header .logo-auth) select { min-height: 46px; color: #344b61; border: 1px solid #dbe3e9; border-radius: 10px; background-color: #fbfcfd; font-size: 13px; box-shadow: none; }
.animated-bg:has(.card-header .logo-auth) .form-control:focus,
.animated-bg:has(.card-header .logo-auth) select:focus { border-color: #6eaa8b; background: #fff; box-shadow: 0 0 0 3px rgba(25,113,73,.11); }
.animated-bg:has(.card-header .logo-auth) .btn { min-width: 100px; min-height: 42px; padding: 10px 17px; border-radius: 9px; font-size: 12px; font-weight: 700; }
.animated-bg:has(.card-header .logo-auth) .btn-primary,
.animated-bg:has(.card-header .logo-auth) .btn-success { border-color: var(--auth-green); background: var(--auth-green); }
.animated-bg:has(.card-header .logo-auth) .btn-primary:hover,
.animated-bg:has(.card-header .logo-auth) .btn-success:hover { border-color: var(--auth-green-dark); background: var(--auth-green-dark); }
.animated-bg:has(.card-header .logo-auth) .new-account { padding-top: 18px; border-top: 1px solid #edf1f4; color: #778699; font-size: 12px; }
.animated-bg:has(.card-header .logo-auth) .new-account a { color: var(--auth-green) !important; font-weight: 700; }
.animated-bg:has(.card-header .logo-auth) .alert { border: 0; border-left: 4px solid currentColor; border-radius: 10px; font-size: 12px; }
.animated-bg:has(.card-header .logo-auth) #upline_group { width: 100%; margin-bottom: 16px; }
.animated-bg:has(.card-header .logo-auth) #upline_info,
.animated-bg:has(.card-header .logo-auth) #upline_error,
.animated-bg:has(.card-header .logo-auth) #sponsor_error { display: block; min-height: 0; padding: 6px 0 !important; border: 0 !important; line-height: 1.4 !important; font-size: 12px !important; }

@media (max-width: 850px) {
    .auth-shell { grid-template-columns: 1fr; min-height: auto; max-width: 540px; }
    .auth-brand-panel { display: none; }
    .auth-form-panel { padding: 34px 38px 40px; }
    .auth-mobile-logo { display: block; margin-bottom: 28px; text-align: center; }
    .auth-mobile-logo img { width: 105px; max-height: 58px; object-fit: contain; }
}
@media (max-width: 575px) {
    .auth-modern-page { padding: 0; background: #fff; }
    .auth-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .auth-form-panel { align-items: start; padding: 28px 22px; }
    .auth-heading h2 { font-size: 26px; }
    .animated-bg:has(.card-header .logo-auth) { padding: 0; background: #fff; }
    .animated-bg:has(.card-header .logo-auth) .container { padding: 0; }
    .animated-bg:has(.card-header .logo-auth) .card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .animated-bg:has(.card-header .logo-auth) .card-header { padding: 24px 20px; }
    .animated-bg:has(.card-header .logo-auth) .card-body { padding: 24px 20px 30px; }
    .animated-bg:has(.card-header .logo-auth) .row > [class*="col-6"] { width: 100%; }
}
