:root {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-btn: #722fdc;
  --primary-shadow: rgba(109, 40, 217, 0.25);
  --primary-shadow-hover: rgba(109, 40, 217, 0.35);
  --primary-focus-ring: rgba(124, 58, 237, 0.08);
}

  body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: #f9fafb;
  }

  .auth-card {
    display: flex;
    max-width: 940px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 4px 50px rgba(0, 0, 0, 0.06);
    padding: 40px 45px;
  }

  /* ---- Left Image ---- */
  .auth-card-image {
    flex: 0 0 44%;
    max-width: 44%;
    min-height: 560px;
  }

  .auth-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
  }

  /* ---- Right Form Area ---- */
  .auth-card-body {
    flex: 1;
    padding: 30px 44px 30px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Logo */
  .auth-logo {
    text-align: center;
    margin-bottom: 28px;
  }

  .auth-logo img {
    height: 75px;
    object-fit: contain;
  }

  /* Title & Subtitle */
  .auth-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 4px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
  }

  .auth-subtitle {
    font-size: 15px;
    color: #a1a1aa;
    margin-bottom: 28px;
    font-weight: 400;
  }

  /* Form */
  .auth-form .form-group {
    margin-bottom: 18px;
  }

  .auth-form .form-group > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
  }

  .auth-form .form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
    background: #fff;
    box-sizing: border-box;
  }

  .auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus-ring);
  }

  .auth-form .form-control::placeholder {
    color: #c8c8d0;
  }

  .auth-form .form-control.is-invalid {
    border-color: #ef4444;
  }

  .auth-form .invalid-feedback {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: block;
  }

  /* Password Wrapper */
  .password-input-wrapper {
    position: relative;
  }

  .password-input-wrapper .form-control {
    padding-right: 46px;
  }

  .password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 5px !important;
    transition: color 0.2s;
  }

  .password-toggle-btn:hover {
    color: #6b7280;
  }

  /* Remember & Forgot Row */
  .form-inline-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
  }

  .custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
  }

  .custom-checkbox label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    user-select: none;
  }

  .forgot-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
  }

  .forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
  }

  /* Submit Button */
  .btn-auth-submit {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary-btn);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px var(--primary-shadow);
  }

  .btn-auth-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--primary-shadow-hover);
  }

  .btn-auth-submit:active {
    transform: translateY(0);
  }

  /* Footer */
  .auth-footer {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
  }

  .auth-footer a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
  }

  .auth-footer a:hover {
    color: var(--primary-dark);
  }

  /* ============ Responsive ============ */
  @media (max-width: 768px) {
    .auth-card {
      flex-direction: column;
      padding: 12px;
    }

    .auth-card-image {
      display: none;
    }

    .auth-card-body {
      padding: 24px 20px;
    }

    .auth-title {
      font-size: 24px;
      margin: 0;
    }
  }

  @media (max-width: 480px) {
    .auth-page-wrapper {
      padding: 10px;
    }

    .auth-card-body {
      padding: 20px 16px;
    }

    .form-inline-group {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
  }

  .step-progress-wrapper {
    margin-bottom: 24px;
  }

  .step-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
  }

  .step-progress-bar .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.4s ease;
  }

  .step-indicator {
    font-size: 13px;
    color: #a1a1aa;
    font-weight: 500;
    margin-top: 6px;
  }

  /* ---- Auth Header (Back + Logo) ---- */
  .auth-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }

  .step-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
  }

  .step-back-btn:hover {
    color: var(--primary);
  }

  /* ---- Names Row (3 cols) ---- */
  .form-row-3 {
    display: flex;
    gap: 12px;
  }

  .form-row-3 .form-group {
    flex: 1;
    min-width: 0;
  }

  /* ---- Form Hint ---- */
  .form-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
  }

  /* ---- Select Arrow ---- */
  .auth-form select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
  }

  /* ---- Steps Visibility ---- */
  .form-step {
    display: none;
  }

  .form-step.active {
    display: block;
  }

  /* ---- Acknowledge Checkbox ---- */
  .acknowledge-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 28px;
  }

  .acknowledge-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .acknowledge-checkbox label {
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
    user-select: none;
  }

  /* ---- Saudi Council Transition ---- */
  .saudi_council {
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
  }

  .saudi_council.is-hidden {
    opacity: 0;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ---- Success Modal ---- */
  .success-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
  }

  .success-modal-overlay.active {
    display: flex;
  }

  .success-modal {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.35s ease;
  }

  @keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .success-modal .success-icon {
    width: 64px;
    height: 64px;
    background: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
  }

  .success-modal .success-icon svg {
    color: #fff;
  }

  .success-modal h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
  }

  .success-modal p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.5;
  }

  .btn-get-started {
    display: inline-block;
    padding: 12px 40px;
    background: var(--primary-btn);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 20px var(--primary-shadow);
  }

  .btn-get-started:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #fff;
  }

  /* ---- Scrollable Body for Register ---- */
  .auth-card-body {
    overflow-y: auto;
  }

  .auth-card-body::-webkit-scrollbar {
    width: 4px;
  }

  .auth-card-body::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 50px;
  }

  /* ---- Responsive ---- */
  @media (max-width: 768px) {
    .form-row-3 {
      flex-direction: column;
      gap: 0;
    }

    .auth-header-row {
      flex-direction: row;
    }
  }