
  :root {
    --td-indigo: #4F46E5;
    --td-indigo-dark: #3730A3;
    --td-indigo-light: #5457E5;
    --td-slate: #0F172A;
    --td-canvas: #F8FAFC;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --td-radius: 12px;
  }
  [data-bs-theme="light"] {
    --td-bg-right: #FFFFFF;
    --td-bg-card: #F8FAFC;
    --td-text: #0F172A;
    --td-text-muted: #64748B;
    --td-border: #E2E8F0;
    --td-input-bg: #FFFFFF;
    --td-badge-bg: rgba(79, 70, 229, 0.1);
  }
  [data-bs-theme="dark"] {
    --td-bg-right: #0F172A;
    --td-bg-card: #1A2338;
    --td-text: #F1F5F9;
    --td-text-muted: #94A3B8;
    --td-border: #2B3752;
    --td-input-bg: #161F36;
    --td-badge-bg: rgba(79, 70, 229, 0.15);
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; overflow: hidden; } /* Prevent main window scroll */
  
  body {
    font-family: var(--font-body);
    color: var(--td-text);
    background: var(--td-bg-right);
  }

  /* Custom Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.6); }

  /* ---------- Layout ---------- */
  .onboard-shell { display: flex; height: 100vh; width: 100vw; }

  .left-panel {
    position: relative; width: 35%; min-width: 340px; flex-shrink: 0;
    background: linear-gradient(155deg, #3730A3, #5457E5); color: #fff;
    padding: 3rem 2.75rem; display: flex; flex-direction: column; justify-content: center; gap: 2rem; overflow: hidden;
  }
  .left-panel .orb {
    position: absolute; border-radius: 50%; filter: blur(50px); opacity: .45; background: radial-gradient(circle at 30% 30%, #818CF8, transparent 70%); animation: floatOrb 12s ease-in-out infinite; pointer-events: none;
  }
  .orb-1 { width: 280px; height: 280px; top: -60px; left: -80px; animation-delay: 0s; }
  .orb-2 { width: 220px; height: 220px; bottom: 5%; right: -60px; background: radial-gradient(circle at 60% 40%, #C7D2FE, transparent 70%); animation-delay: 3s; }
  .orb-3 { width: 160px; height: 160px; bottom: 35%; left: 10%; background: radial-gradient(circle at 50% 50%, #A5B4FC, transparent 70%); animation-delay: 6s; }
  @keyframes floatOrb {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.08); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
  }

  .brand { position: relative; z-index: 2; display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
  .brand img { height: 36px; width: 36px; background: #fff; border-radius: 10px; padding: 3px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

  .left-copy { position: relative; z-index: 2; }
  .left-copy h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; line-height: 1.3; margin-bottom: .6rem; }
  .left-copy p { color: rgba(255,255,255,.75); font-size: .95rem; margin-bottom: 0; }

  .tracker { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 1.6rem; }
  .tracker-item { display: flex; align-items: flex-start; gap: 1rem; }
  .tracker-dot { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; transition: all .35s ease; background: rgba(255,255,255,.06); }
  .tracker-item.active .tracker-dot { background: #fff; color: var(--td-indigo-dark); border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.2); }
  .tracker-item.done .tracker-dot { background: rgba(255,255,255,.95); color: var(--td-indigo-dark); border-color: #fff; }
  .tracker-text .tt-label { font-weight: 600; font-size: .95rem; color: rgba(255,255,255,.55); transition: color .3s ease; }
  .tracker-item.active .tt-label, .tracker-item.done .tt-label { color: #fff; }
  .tracker-text .tt-sub { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 2px; }

  .right-panel { width: 65%; flex-grow: 1; display: flex; flex-direction: column; height: 100vh; background: var(--td-bg-right); }
  .top-bar-wrap { 
        display: flex; 
        justify-content: flex-end; 
        align-items: center; 
        padding: 1.5rem 2.5rem; 
        position: sticky; 
        top: 0; 
        z-index: 50; 
        gap: 1rem; 
        background: var(--td-bg-right); /* Prevents scrolling text from overlapping */
    }
  .login-link { font-size: .88rem; color: var(--td-text-muted); font-weight: 500; }
  .login-link a { color: var(--td-indigo); font-weight: 700; text-decoration: none; margin-left: .35rem; }
  .login-link a:hover { text-decoration: underline; }
  .theme-btn { border: 1px solid var(--td-border); background: var(--td-bg-card); color: var(--td-text-muted); width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: .2s; cursor: pointer; }
  .theme-btn:hover { color: var(--td-indigo); border-color: var(--td-indigo); }

   .right-scroll { 
        flex: 1; 
        overflow-y: auto; 
        overflow-x: hidden; 
        padding: 1rem 2.5rem 2rem; /* Adjusted top padding for sticky header */
        display: flex; 
        flex-direction: column; 
    }
  .step-panel { width: 100%; max-width: 500px; margin: auto; }
  .step-panel.hidden-step { display: none; }

  .step-heading h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; margin-bottom: .4rem; letter-spacing: -0.01em; }
  .step-heading p { color: var(--td-text-muted); font-size: .95rem; margin-bottom: 2rem; }

  .step-anim-enter { opacity: 0; transform: translateX(24px); }
  .step-anim-enter-back { opacity: 0; transform: translateX(-24px); }
  .step-anim-active { opacity: 1; transform: translateX(0); transition: opacity .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1); }
  .step-anim-leave { opacity: 0; transform: translateX(-24px); transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1); }
  .step-anim-leave-forward { opacity: 0; transform: translateX(24px); transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1); }

  .mb-field { margin-bottom: 1.25rem; position: relative; }
  .form-floating > .form-control, .form-floating > .form-select { height: 58px !important; min-height: 56px !important; border-radius: 12px; border: 1.5px solid var(--td-border); background: var(--td-input-bg); color: var(--td-text); font-size: .95rem; padding-top: 1.625rem; padding-bottom: 0.625rem; box-shadow: none !important; transition: border-color .2s, box-shadow .2s, background-color .2s; }
  .form-floating > label { color: var(--td-text-muted); font-size: .9rem; padding: 0.9rem 1rem; font-weight: 500; }
  .form-floating > .form-control:focus, .form-floating > .form-select:focus { border-color: var(--td-indigo) !important; box-shadow: 0 0 0 4px rgba(79,70,229,.15) !important; background: var(--td-input-bg); }
  .form-control::placeholder { color: transparent !important; }

  .invite-row { margin-bottom: 1.5rem; }
  .invite-badge { width: 48px; height: 48px; border-radius: 50%; background: rgba(79, 70, 229, 0.1); color: var(--td-indigo); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
  .invite-hint { margin-left: 64px; margin-top: 6px; }
  .form-floating .field-icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 4; color: #94A3B8; font-size: 1.15rem; pointer-events: none; }
  .form-floating:focus-within .field-icon { color: var(--td-indigo); }
  .form-floating > .form-control, .form-floating > .form-select, .form-floating > label { padding-left: 2.8rem !important; }
  
    .form-floating > .form-control:focus ~ label::after,
    .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
    .form-floating > .form-select ~ label::after {
        background-color: #ffffff !important; /* જો ઇનપુટનો કલર સફેદ હોય તો */
        border-radius: 8px;
        left: 38px;
        right: 7px;
    }
    
    /* આઇકોન અને લેબલ વચ્ચે યોગ્ય જગ્યા રાખવા માટે (જો જરૂર હોય તો) */
    .form-floating > label {
        padding-left: 45px !important; /* આઇકોનની સાઈઝ પ્રમાણે વધ-ઘટ કરો */
        z-index: 2;
    }
    
    .form-floating > .form-control {
        padding-left: 45px !important; /* આઇકોન ટેક્સ્ટ પર ના ચડી જાય તે માટે */
    }


  .pw-strength-meter { display: flex; gap: 6px; height: 6px; width: 100%; border-radius: 999px; overflow: hidden; margin-top: 12px; }
  .pw-bar { height: 100%; width: 33.33%; transition: background-color 0.3s; }
  .bg-slate-200 { background-color: #E2E8F0; } .bg-rose-500 { background-color: #F43F5E; } .bg-amber-500 { background-color: #F59E0B; } .bg-emerald-500 { background-color: #10B981; }
  .text-slate-400 { color: var(--td-text-muted) !important; } .text-rose-500 { color: #F43F5E !important; } .text-amber-500 { color: #F59E0B !important; } .text-emerald-500 { color: #10B981 !important; }

  .td-pass-group { display: flex; border-radius: 12px; transition: box-shadow .2s; }
  .td-pass-group .form-floating { flex-grow: 1; }
  .td-pass-group .form-floating > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: none; }
  .td-eye-btn { border: 1.5px solid var(--td-border); border-left: none; background: var(--td-input-bg); color: var(--td-text-muted); border-top-right-radius: 12px; border-bottom-right-radius: 12px; padding: 0 1.25rem; display: flex; align-items: center; justify-content: center; }
  .td-eye-btn:hover { color: var(--td-indigo); }

  .form-hint { font-size: .8rem; color: var(--td-text-muted); margin-top: .4rem; }
   .invalid-msg { 
        font-size: .8rem; 
        color: #EF4444; 
        margin-top: .4rem; 
        display: none; 
        font-weight: 500; 
        margin-left: 0.5rem;
        position: relative; /* Forces it into document flow, fixes overlap */
        bottom: auto;
    }
  .mb-field.is-invalid .invalid-msg { display: block; }
  .mb-field.is-invalid .form-control { border-color: #DC2626 !important; }

  .field-status-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); z-index: 5; display: none; align-items: center; justify-content: center; }
  .field-status-icon.show { display: flex; }

  .team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 1.5rem; }
  .team-card { position: relative; border: 1.5px solid var(--td-border); background: var(--td-bg-card); border-radius: 14px; padding: 1.25rem 1.1rem; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; height: 100%; }
  .team-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.1); }
  .team-card .tc-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--td-badge-bg); color: var(--td-indigo); display: flex; align-items: center; justify-content: center; margin-bottom: .7rem; font-size: 1.1rem; }
  .team-card .tc-title { font-weight: 700; font-size: .95rem; margin-bottom: .15rem; color: var(--td-text); }
  .team-card .tc-sub { font-size: .8rem; color: var(--td-text-muted); }
  .team-card .tc-badge { position: absolute; top: .7rem; right: .7rem; width: 22px; height: 22px; border-radius: 50%; background: var(--td-indigo); color: #fff; display: none; align-items: center; justify-content: center; font-size: .7rem; }
  .team-card.selected { border-color: var(--td-indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
  .team-card.selected .tc-badge { display: flex; }

  .tier-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--td-badge-bg); color: var(--td-indigo); font-size: .8rem; font-weight: 700; padding: .5rem .85rem; border-radius: 999px; margin-bottom: 1.5rem; }

  .success-wrap { text-align: center; padding-top: 1rem; }
  .success-check { width: 88px; height: 88px; border-radius: 50%; background: rgba(22,163,74,.1); color: #16A34A; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 1.75rem; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); }
  @keyframes popIn { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
  .success-wrap h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; margin-bottom: .75rem; }
  .success-wrap p { color: var(--td-text-muted); font-size: 1rem; max-width: 420px; margin: 0 auto 2rem; line-height: 1.6; }

  .wizard-footer { border-top: 1px solid var(--td-border); padding: 1.25rem 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0; background: var(--td-bg-right); }
  .btn-td-primary { background: var(--td-indigo); border: 1px solid var(--td-indigo); color: #fff; font-weight: 600; border-radius: 12px; padding: .75rem 1.8rem; font-size: .95rem; display: inline-flex; align-items: center; gap: .5rem; transition: .2s; cursor: pointer; }
  .btn-td-primary:hover { background: #4338CA; border-color: #4338CA; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.3); }
  .btn-td-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
  .btn-td-ghost { background: transparent; border: none; color: var(--td-text-muted); font-weight: 600; font-size: .92rem; padding: .65rem .5rem; transition: .2s; }
  .btn-td-ghost:hover { color: var(--td-text); }
  .footer-left { display: flex; align-items: center; gap: .5rem; }
  .btn-spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: none; }
  .btn-spinner.show { display: inline-block; }

  /* Submission overlay shown while "Finish Setup" is processing */
  .submit-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center; z-index: 99998;
  }
  .submit-overlay.show { display: flex; }
  .submit-overlay-card {
    background: var(--td-bg-right); border-radius: 16px; padding: 2rem 2.5rem; text-align: center;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.25); max-width: 320px;
  }
  .submit-overlay-spinner {
    width: 36px; height: 36px; border: 3.5px solid rgba(79,70,229,.2); border-top-color: var(--td-indigo);
    border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1rem;
  }
  .submit-overlay-card p { font-weight: 600; font-size: .95rem; margin: 0; color: var(--td-text); }
  .submit-overlay-card span { font-size: .82rem; color: var(--td-text-muted); }

  @keyframes spin { to { transform: rotate(360deg); } }

  .mobile-progress { display: none; gap: 6px; align-items: center; }
  .mobile-progress .mp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--td-border); transition: all .25s ease; }
  .mobile-progress .mp-dot.active { background: var(--td-indigo); width: 20px; border-radius: 4px; }
  .mobile-progress .mp-dot.done { background: var(--td-indigo); opacity: .5; }

  .team-card:focus-visible {
    outline: none;
    border-color: var(--td-indigo);
    box-shadow: 0 0 0 3px rgba(79,70,229,.3);
  }

  @media (max-width: 991.98px) {
    .left-panel { display: none; }
    .right-panel { width: 100%; }
    .wizard-footer { padding: 1.25rem 1.5rem; }
    .top-bar-wrap { justify-content: space-between; }
    .mobile-progress { display: flex; }
  }

  @media (max-width: 767.98px) {
    .top-bar-wrap { padding: 1rem 1.25rem; }
    .right-scroll { padding: 0.75rem 1.25rem 1.5rem; }
    .step-heading h2 { font-size: 1.4rem; }
    .step-heading p { margin-bottom: 1.25rem; }
    .wizard-footer { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
    .form-floating > .form-control, .form-floating > .form-select {
      height: 54px !important; min-height: 52px !important; font-size: 16px; /* 16px avoids iOS Safari auto-zoom on focus */
    }
    .invite-hint { margin-left: 0; margin-top: 10px; }
    .invite-row { display: flex; flex-direction: column; }
    .success-check { width: 72px; height: 72px; font-size: 2rem; margin-bottom: 1.25rem; }
    .success-wrap h2 { font-size: 1.4rem; }
    .success-wrap p { font-size: 0.92rem; padding: 0 0.5rem; }
    .theme-btn { width: 38px; height: 38px; }
  }

  @media (max-width: 375px) {
    .top-bar-wrap { padding: 0.85rem 1rem; }
    .right-scroll { padding: 0.6rem 1rem 1.25rem; }
    .step-heading h2 { font-size: 1.25rem; }
  }