:root {
    --color-canvas: #f8fafc;
    --color-paper: #ffffff;
    --color-surface-alt: #f1f5f9;
    --color-ink: #0f172a;
    --color-ink-soft: #1e293b;
    --color-mid-gray: #64748b;
    --color-hairline: #e2e8f0;
    --color-ember: #ef4444;
    --color-brand: var(--bs-primary, #5D87FF);
    --color-brand-secondary: var(--bs-secondary, #49BEFF);
    --color-brand-rgb: var(--bs-primary-rgb, 93, 135, 255);
    --color-brand-secondary-rgb: var(--bs-secondary-rgb, 73, 190, 255);
    --font-geist: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

[data-color-theme="Black_Theme"] {
    --color-brand: #171717 !important;
    --color-brand-secondary: #404040 !important;
    --color-brand-rgb: 23, 23, 23 !important;
    --color-brand-secondary-rgb: 64, 64, 64 !important;
    --bs-primary: #171717 !important;
    --bs-primary-rgb: 23, 23, 23 !important;
    --bs-secondary: #404040 !important;
    --bs-secondary-rgb: 64, 64, 64 !important;
}

[data-bs-theme="dark"][data-color-theme="Black_Theme"],
[data-bs-theme="dark"] [data-color-theme="Black_Theme"] {
    --color-brand: #60a5fa !important;
    --color-brand-secondary: #93c5fd !important;
    --color-brand-rgb: 96, 165, 250 !important;
    --color-brand-secondary-rgb: 147, 197, 253 !important;
    --bs-primary: #60a5fa !important;
    --bs-primary-rgb: 96, 165, 250 !important;
    --bs-secondary: #93c5fd !important;
    --bs-secondary-rgb: 147, 197, 253 !important;
}

[data-color-theme="Aqua_Theme"] {
    --color-brand: #0074BA !important;
    --color-brand-secondary: #47D7BC !important;
    --color-brand-rgb: 0, 116, 186 !important;
    --color-brand-secondary-rgb: 71, 215, 188 !important;
    --bs-primary: #0074BA !important;
    --bs-primary-rgb: 0, 116, 186 !important;
    --bs-secondary: #47D7BC !important;
    --bs-secondary-rgb: 71, 215, 188 !important;
}

[data-color-theme="Purple_Theme"] {
    --color-brand: #763EBD !important;
    --color-brand-secondary: #95CFD5 !important;
    --color-brand-rgb: 118, 62, 189 !important;
    --color-brand-secondary-rgb: 149, 207, 213 !important;
    --bs-primary: #763EBD !important;
    --bs-primary-rgb: 118, 62, 189 !important;
    --bs-secondary: #95CFD5 !important;
    --bs-secondary-rgb: 149, 207, 213 !important;
}

[data-color-theme="Green_Theme"] {
    --color-brand: #0A7EA4 !important;
    --color-brand-secondary: #CCDA4E !important;
    --color-brand-rgb: 10, 126, 164 !important;
    --color-brand-secondary-rgb: 204, 218, 78 !important;
    --bs-primary: #0A7EA4 !important;
    --bs-primary-rgb: 10, 126, 164 !important;
    --bs-secondary: #CCDA4E !important;
    --bs-secondary-rgb: 204, 218, 78 !important;
}

[data-color-theme="Cyan_Theme"] {
    --color-brand: #01C0C8 !important;
    --color-brand-secondary: #FB9678 !important;
    --color-brand-rgb: 1, 192, 200 !important;
    --color-brand-secondary-rgb: 251, 150, 120 !important;
    --bs-primary: #01C0C8 !important;
    --bs-primary-rgb: 1, 192, 200 !important;
    --bs-secondary: #FB9678 !important;
    --bs-secondary-rgb: 251, 150, 120 !important;
}

[data-color-theme="Orange_Theme"] {
    --color-brand: #FA896B !important;
    --color-brand-secondary: #0074BA !important;
    --color-brand-rgb: 250, 137, 107 !important;
    --color-brand-secondary-rgb: 0, 116, 186 !important;
    --bs-primary: #FA896B !important;
    --bs-primary-rgb: 250, 137, 107 !important;
    --bs-secondary: #0074BA !important;
    --bs-secondary-rgb: 0, 116, 186 !important;
}

[data-bs-theme="dark"] {
    --color-canvas: #0b1120;
    --color-paper: #111c2d;
    --color-surface-alt: #1a2536;
    --color-ink: #f8fafc;
    --color-ink-soft: #cbd5e1;
    --color-mid-gray: #94a3b8;
    --color-hairline: #1e293b;
}

body {
    background-color: var(--color-canvas) !important;
    font-family: var(--font-geist) !important;
    color: var(--color-ink) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.auth-bg-wrapper {
    min-height: 100vh;
    background-color: var(--color-canvas);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    background: var(--color-paper);
    border: 1px solid var(--color-hairline);
    border-radius: 24px;
    box-shadow: 0px 10px 40px -10px rgba(var(--color-brand-rgb), 0.12),
                0px 2px 10px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    max-width: 940px;
    width: 100%;
}

.auth-card .row {
    align-items: stretch;
}

.auth-brand-col {
    display: flex;
    flex-direction: column;
}

.auth-brand-side {
    background: 
        radial-gradient(circle at 85% 15%, rgba(var(--color-brand-secondary-rgb, 73, 190, 255), 0.22) 0%, transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(var(--color-brand-rgb, 93, 135, 255), 0.26) 0%, transparent 55%),
        linear-gradient(155deg, #090e1a 0%, #0f172a 100%);
    color: #f8fafc;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 70%);
    pointer-events: none;
}

.auth-brand-side.tenant-theme {
    background: 
        radial-gradient(circle at 90% 12%, rgba(var(--color-brand-secondary-rgb), 0.40) 0%, transparent 60%),
        radial-gradient(circle at 10% 88%, rgba(var(--color-brand-rgb), 0.50) 0%, transparent 60%),
        linear-gradient(150deg, rgba(var(--color-brand-rgb), 0.90) 0%, #0b1120 92%);
    position: relative;
    overflow: hidden;
}

.auth-brand-side.tenant-theme::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-decoration: none;
}

.auth-brand-logo .logo-box {
    width: 38px;
    height: 38px;
    background: var(--color-brand);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.auth-brand-side.tenant-theme .logo-box,
.auth-brand-side.tenant-theme .brand-logo-mark {
    width: 38px;
    height: 38px;
    background: #ffffff;
    color: var(--color-brand);
    border-radius: 10px;
    font-weight: 800;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
    flex-shrink: 0;
}

.auth-brand-side.tenant-theme .badge-portal {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-brand-side h1,
.auth-brand-copy h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.25;
    color: #ffffff !important;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.auth-brand-side p,
.auth-brand-copy p {
    font-size: 14px;
    color: #94a3b8 !important;
    line-height: 1.6;
    margin: 0;
}

.auth-brand-side.tenant-theme h1 {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-brand-side.tenant-theme p,
.auth-brand-side.tenant-theme .auth-brand-copy p {
    color: rgba(255, 255, 255, 0.88) !important;
}

.auth-brand-side.tenant-theme .brand-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.70) !important;
}

.auth-form-side {
    padding: 48px 40px;
    background: var(--color-paper);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-header {
    margin-bottom: 24px;
}

.auth-form-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    color: var(--color-ink);
}

.auth-form-header p {
    font-size: 14px;
    color: var(--color-mid-gray);
    margin: 0;
}

/* Role Quick Tabs */
.auth-role-tabs {
    display: flex;
    background: var(--color-surface-alt);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid var(--color-hairline);
    gap: 4px;
}

.auth-role-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--color-mid-gray);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.auth-role-tab.active {
    background: var(--color-paper);
    color: var(--color-ink);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.form-label-custom {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: 6px;
    display: block;
}

.form-control-custom {
    width: 100%;
    height: 44px;
    padding: 8px 16px;
    background-color: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    border-radius: 14px;
    font-family: var(--font-geist);
    font-size: 14px;
    color: var(--color-ink);
    outline: none;
    transition: all 0.15s ease;
}

.form-control-custom:focus {
    background-color: var(--color-paper);
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb), 0.16);
}

.form-control-custom.is-invalid {
    border-color: var(--color-ember);
    background-color: #fef2f2;
}

.btn-pill-primary {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-secondary, var(--color-brand)) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-geist);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(var(--color-brand-rgb), 0.28);
    position: relative;
    overflow: hidden;
}

.btn-pill-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--color-brand-rgb), 0.38);
    color: #ffffff !important;
}

.btn-pill-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb), 0.35), 0 4px 14px rgba(var(--color-brand-rgb), 0.28);
    color: #ffffff !important;
}

.btn-pill-primary:active {
    transform: translateY(0);
    filter: brightness(0.98);
    color: #ffffff !important;
}

.btn-pill-outline {
    width: 100%;
    height: 42px;
    background: transparent;
    color: var(--color-ink);
    border: 1px solid var(--color-hairline);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-geist);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-pill-outline:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-mid-gray);
    color: var(--color-ink);
}

.divider-line {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.divider-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-hairline);
}

.divider-text {
    position: relative;
    background: var(--color-paper);
    padding: 0 12px;
    font-size: 12px;
    color: var(--color-mid-gray);
}

.custom-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-mid-gray);
    cursor: pointer;
}

.forgot-link {
    color: var(--color-brand);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: var(--color-brand-secondary, var(--color-brand));
    text-decoration: underline;
}

.form-control-custom::placeholder {
    color: var(--color-mid-gray);
    opacity: 0.75;
}

[data-bs-theme="dark"] .form-control-custom {
    background-color: #0b1120;
    color: #f8fafc;
    border-color: #1e293b;
}

[data-bs-theme="dark"] .form-control-custom:focus {
    background-color: #111c2d;
}

[data-bs-theme="dark"] .form-control-custom.is-invalid {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: var(--color-ember);
    color: #f8fafc;
}

[data-bs-theme="dark"] .btn-pill-outline {
    color: #f8fafc;
    border-color: #334155;
}

[data-bs-theme="dark"] .divider-text {
    background: #111c2d;
}

.badge-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-mid-gray);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.15s ease;
}

.back-to-login:hover {
    color: var(--color-brand);
    text-decoration: none;
    transform: translateX(-2px);
}

.alert-custom-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

[data-bs-theme="dark"] .alert-custom-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert-custom-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-bs-theme="dark"] .alert-custom-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* Strict Logo Visibility: Zero Double Logo Glitch */
html:not([data-bs-theme="dark"]) .dark-logo,
html[data-bs-theme="light"] .dark-logo {
    display: inline-block !important;
}
html:not([data-bs-theme="dark"]) .light-logo,
html[data-bs-theme="light"] .light-logo {
    display: none !important;
}

html[data-bs-theme="dark"] .dark-logo {
    display: none !important;
}
html[data-bs-theme="dark"] .light-logo {
    display: inline-block !important;
}

/* Floating Theme Switcher for Auth Screens */
.auth-theme-toggle-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.auth-theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-hairline);
    background: var(--color-paper);
    color: var(--color-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-theme-toggle-btn:hover {
    transform: scale(1.08);
    border-color: var(--color-brand);
    color: var(--color-brand);
}

html[data-bs-theme="dark"] .auth-theme-toggle-btn .dark-icon {
    display: none !important;
}
html[data-bs-theme="dark"] .auth-theme-toggle-btn .light-icon {
    display: inline-block !important;
}
html:not([data-bs-theme="dark"]) .auth-theme-toggle-btn .dark-icon,
html[data-bs-theme="light"] .auth-theme-toggle-btn .dark-icon {
    display: inline-block !important;
}
html:not([data-bs-theme="dark"]) .auth-theme-toggle-btn .light-icon,
html[data-bs-theme="light"] .auth-theme-toggle-btn .light-icon {
    display: none !important;
}

/* Mobile & Tablet Responsive Enhancements */
@media (max-width: 768px) {
    .auth-bg-wrapper {
        padding: 16px 12px;
    }
    .auth-card {
        border-radius: 20px;
    }
    .auth-form-side {
        padding: 36px 24px;
    }
}

@media (max-width: 480px) {
    .auth-bg-wrapper {
        padding: 12px 8px;
    }
    .auth-card {
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }
    .auth-form-side {
        padding: 28px 16px;
    }
    .auth-form-header h2 {
        font-size: 20px;
    }
    .auth-theme-toggle-wrap {
        top: 12px;
        right: 12px;
    }
}

/* ==========================================================================
   GroseraID v2 SaaS Auth Styling (Clean Minimalist White, Solid Ink & Brand Orange)
   ========================================================================== */
.saas-auth-portal {
    --color-brand: #FF783F;
    --color-brand-secondary: #F26732;
    --color-brand-rgb: 255, 120, 63;
    --color-brand-secondary-rgb: 242, 103, 50;
    --font-geist: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #F5F5F3 !important;
    background-image: none !important;
    position: relative;
    min-height: 100vh;
}

[data-bs-theme="dark"] .saas-auth-portal {
    background-color: #0E0F12 !important;
    background-image: none !important;
}

.saas-auth-card {
    background: #FFFFFF;
    border: 1px solid #E5E5E1;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 16px 36px -4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-width: 960px;
    width: 100%;
    margin-inline: auto;
}

[data-bs-theme="dark"] .saas-auth-card {
    background: #14161B;
    border-color: #22262F;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-card-saas-register {
    background: #FFFFFF;
    border: 1px solid #E5E5E1;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 20px 40px -8px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    max-width: 1180px;
    width: 100%;
    margin-inline: auto;
}

[data-bs-theme="dark"] .auth-card-saas-register {
    background: #14161B;
    border-color: #22262F;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45);
}

/* SaaS Left Brand Panel — Solid Deep Charcoal Ink (Clean & Authentic) */
.saas-brand-panel,
.saas-auth-brand-side {
    background: #111111;
    color: #F8FAFC;
    padding: clamp(2rem, 3.5vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .saas-brand-panel,
[data-bs-theme="dark"] .saas-auth-brand-side {
    background: #0D0E11;
}

/* Remove fake AI blueprint grid and glowing orbs */
.saas-brand-panel::before,
.saas-auth-brand-side::before {
    display: none;
    content: none;
}

/* Brand Identity Elements */
.brand-identity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.brand-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #FF783F;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.brand-info-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.brand-info-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.brand-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-ink, #0F172A);
    letter-spacing: -0.03em;
}

.text-brand-orange {
    color: #FF783F !important;
}

.badge-portal-saas {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: rgba(255, 120, 63, 0.12);
    border: 1px solid rgba(255, 120, 63, 0.25);
    color: #FF783F;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.badge-portal-saas::before {
    display: none;
    content: none;
}

.saas-brand-title {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.3;
    color: #FFFFFF !important;
    margin-bottom: 0.75rem;
}

.saas-brand-lead {
    font-size: 0.875rem;
    color: #94A3B8 !important;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.saas-feature-pill-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-bottom: 2rem;
}

.saas-feature-pill-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.saas-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FF783F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.saas-feature-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.15rem;
}

.saas-feature-desc {
    font-size: 0.8125rem;
    color: #94A3B8;
    line-height: 1.45;
    margin: 0;
}

.saas-trust-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    backdrop-filter: none;
}

.saas-trust-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #10B981;
    margin-bottom: 0.35rem;
}

.saas-trust-card-desc {
    font-size: 0.8125rem;
    color: #94A3B8;
    line-height: 1.5;
    margin: 0;
}

.saas-brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748B;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2rem;
}

/* SaaS Form Panel */
.saas-form-side,
.saas-form-panel {
    padding: clamp(1.75rem, 3.5vw, 3rem);
    background: #FFFFFF;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[data-bs-theme="dark"] .saas-form-side,
[data-bs-theme="dark"] .saas-form-panel {
    background: #111C2D;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    text-decoration: none;
    transition: all 0.15s ease;
    padding: 4px 10px;
    border-radius: 8px;
    background: #F1F5F9;
}

.auth-back-link:hover {
    color: #FF783F;
    background: #FFF3EB;
    transform: translateX(-2px);
    text-decoration: none;
}

[data-bs-theme="dark"] .auth-back-link {
    background: #1E293B;
    color: #94A3B8;
}

[data-bs-theme="dark"] .auth-back-link:hover {
    background: rgba(255, 120, 63, 0.15);
    color: #FFB380;
}

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

.saas-form-header h2 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0F172A;
    margin-bottom: 0.35rem;
}

[data-bs-theme="dark"] .saas-form-header h2 {
    color: #F8FAFC;
}

.saas-form-header p {
    font-size: 0.9rem;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}

[data-bs-theme="dark"] .saas-form-header p {
    color: #94A3B8;
}

/* Step Badge */
.form-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF3EB;
    color: #FF783F;
    border: 1px solid #FFE4D3;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

[data-bs-theme="dark"] .form-step-badge {
    background: rgba(255, 120, 63, 0.14);
    border-color: rgba(255, 120, 63, 0.3);
    color: #FFB380;
}

.field-group-label {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 6px;
    display: block;
}

[data-bs-theme="dark"] .field-group-label {
    color: #E2E8F0;
}

/* Form inputs scoped */
.saas-auth-portal .form-control-custom {
    width: 100%;
    height: 46px;
    padding: 0.65rem 1rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #0F172A;
    transition: all 0.15s ease;
}

.saas-auth-portal .form-control-custom:focus {
    outline: none;
    border-color: #FF783F;
    box-shadow: 0 0 0 3px rgba(255, 120, 63, 0.15);
    background: #FFFFFF;
}

[data-bs-theme="dark"] .saas-auth-portal .form-control-custom {
    background: #0B1120;
    border-color: #1E293B;
    color: #F8FAFC;
}

[data-bs-theme="dark"] .saas-auth-portal .form-control-custom:focus {
    background: #111C2D;
    border-color: #FF783F;
}

/* Subdomain Input Group */
.subdomain-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    transition: all 0.15s ease;
    background: #F8FAFC;
}

.subdomain-input-group:focus-within {
    border-color: #FF783F;
    box-shadow: 0 0 0 3px rgba(255, 120, 63, 0.15);
    background: #FFFFFF;
}

.subdomain-input-group.is-invalid {
    border-color: #EF4444;
    background: #FEF2F2;
}

.subdomain-input-group .subdomain-field {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    height: 46px;
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
    flex-grow: 1;
    min-width: 0;
    color: #0F172A;
    outline: none;
}

.subdomain-input-group .subdomain-suffix {
    background: #EDF2F7;
    color: #64748B;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0 12px;
    display: flex;
    align-items: center;
    border-left: 1px solid #E2E8F0;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .subdomain-input-group {
    background: #0B1120;
    border-color: #1E293B;
}

[data-bs-theme="dark"] .subdomain-input-group .subdomain-field {
    color: #F8FAFC;
}

[data-bs-theme="dark"] .subdomain-input-group .subdomain-suffix {
    background: #151F32;
    border-color: #1E293B;
    color: #94A3B8;
}

.subdomain-preview-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    color: #64748B;
    word-break: break-all;
}

.subdomain-preview-badge strong {
    color: #FF783F !important;
    font-weight: 700;
}

/* SaaS Plan Selection Cards */
.saas-plan-card {
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.15rem;
    background: #FFFFFF;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.saas-plan-card:hover {
    border-color: #FFB380;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255, 120, 63, 0.08);
}

.plan-radio-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-radio-input:checked + .saas-plan-card {
    border-color: #FF783F;
    background: #FFF9F5;
    box-shadow: 0 0 0 2px rgba(255, 120, 63, 0.2), 0 6px 18px rgba(255, 120, 63, 0.08);
}

[data-bs-theme="dark"] .saas-plan-card {
    background: #0B1120;
    border-color: #1E293B;
}

[data-bs-theme="dark"] .plan-radio-input:checked + .saas-plan-card {
    background: rgba(255, 120, 63, 0.08);
    border-color: #FF783F;
}

.plan-check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.15s ease;
}

.plan-radio-input:checked + .saas-plan-card .plan-check-icon {
    background: #FF783F;
    border-color: #FF783F;
    color: #FFFFFF;
}

.saas-plan-card .saas-plan-name {
    color: #0F172A;
    font-weight: 800;
}

[data-bs-theme="dark"] .saas-plan-card .saas-plan-name {
    color: #F8FAFC !important;
}

.saas-plan-card .saas-plan-price {
    color: #FF783F !important;
    font-size: 1.2rem;
    font-weight: 800;
}

.saas-plan-card .plan-period {
    color: #94A3B8 !important;
    font-size: 0.8125rem;
}

.saas-plan-card .plan-feature-list {
    color: #64748B;
    font-size: 0.8125rem;
}

[data-bs-theme="dark"] .saas-plan-card .plan-feature-list,
[data-bs-theme="dark"] .saas-plan-card .plan-feature-list li span {
    color: #CBD5E1 !important;
}

.saas-plan-card .saas-trial-badge {
    background: #FFF3EB !important;
    color: #FF783F !important;
    border: 1px solid #FFE4D3 !important;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
}

[data-bs-theme="dark"] .saas-plan-card .saas-trial-badge {
    background: rgba(255, 120, 63, 0.16) !important;
    border-color: rgba(255, 120, 63, 0.35) !important;
    color: #FFB380 !important;
}

.saas-plan-card .plan-active-instant {
    font-size: 11px;
    color: #94A3B8;
}

/* Primary SaaS CTA Button — Solid Authentic Brand Orange */
.saas-auth-portal .btn-pill-primary {
    width: 100%;
    height: 48px;
    background: #FF783F;
    color: #FFFFFF !important;
    border: none;
    border-radius: 9999px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(255, 120, 63, 0.2), 0 8px 16px -2px rgba(255, 120, 63, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-auth-portal .btn-pill-primary:hover {
    background: #F26732;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 120, 63, 0.3), 0 12px 24px -2px rgba(255, 120, 63, 0.35);
}

.saas-auth-portal .btn-pill-primary:active {
    transform: translateY(0);
}

.saas-auth-portal .forgot-link {
    color: #FF783F;
}

.saas-auth-portal .forgot-link:hover {
    color: #F26732;
}

/* Eye Toggle Password */
.password-toggle-btn {
    border: none;
    background: transparent;
    color: #94A3B8;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #0F172A;
}

[data-bs-theme="dark"] .password-toggle-btn:hover {
    color: #F8FAFC;
}

/* Mobile & Tablet Scoped Improvements */
@media (max-width: 991px) {
    .saas-auth-portal .auth-brand-col {
        display: none !important;
    }

    .saas-auth-card,
    .auth-card-saas-register {
        max-width: 540px;
        margin-inline: auto;
        border-radius: 20px;
    }

    .saas-form-side,
    .saas-form-panel {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .saas-plan-card {
        padding: 1rem;
    }

    .subdomain-input-group .subdomain-suffix {
        font-size: 0.75rem;
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .saas-auth-portal {
        padding: 12px 8px;
    }

    .saas-auth-card,
    .auth-card-saas-register {
        border-radius: 16px;
    }

    .saas-form-side,
    .saas-form-panel {
        padding: 1.5rem 1.15rem;
    }

    .saas-form-header h2 {
        font-size: 1.35rem;
    }

    .saas-auth-portal .btn-pill-primary {
        height: 46px;
        font-size: 14px;
    }
}

