  /* ---- RTL Support ---- */
  [dir="rtl"] .rtl-flip { transform: scaleX(-1); }
  [dir="rtl"] .rtl-ml-2 { margin-left: 0; margin-right: 0.5rem; }
  [dir="rtl"] .iti { direction: ltr; }
  [dir="rtl"] .iti input { text-align: right; padding-right: 52px !important; padding-left: 0.75rem !important; }
  [dir="rtl"] .iti__flag-container { left: auto; right: 0; }
  [dir="rtl"] .pw-toggle { right: auto; left: 0.75rem; }

  /* ---- intl-tel-input sizing ---- */
  .iti { width: 100% !important; }
  .iti input { width: 100% !important; box-sizing: border-box; }

  /* ---- Premium auth input ---- */
  .auth-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--rule, #e5e7eb);
    background: var(--paper-2, #ffffff);
    color: var(--ink, #111827);
    font-size: 0.9375rem;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }
  .auth-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  }
  .auth-input::placeholder { color: var(--ink-soft, #9ca3af); }

  .dark .auth-input {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #f9fafb;
  }
  .dark .auth-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
  }
  .dark .auth-input::placeholder { color: #6b7280; }

  /* phone input: make room for flag */
  #phone.auth-input { padding-left: 52px; }
  [dir="rtl"] #phone.auth-input { padding-left: 1rem; padding-right: 52px; }

  /* ---- Primary button ---- */
  .auth-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }
  .auth-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -4px rgba(59,130,246,0.35); }
  .auth-btn:active { transform: translateY(0); }

  /* ---- Social icon button ---- */
  .social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.625rem;
    border: 1px solid var(--rule, #e5e7eb);
    background: var(--paper-2, #ffffff);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
    cursor: pointer;
  }
  .social-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
  }
  .dark .social-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
  .dark .social-btn:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.22); }

  /* ---- Branding panel ---- */
  .brand-panel {
    background: var(--brand-gradient, linear-gradient(145deg, #0f0c29 0%, #302b63 45%, #24243e 100%));
    position: relative;
    overflow: hidden;
  }
  .brand-panel::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -15%;
    width: 65%;
    height: 65%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-glow-1, rgba(139,92,246,0.28)) 0%, transparent 70%);
    pointer-events: none;
  }
  .brand-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 55%;
    height: 55%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-glow-2, rgba(59,130,246,0.22)) 0%, transparent 70%);
    pointer-events: none;
  }

  /* ---- Alert slide-in ---- */
  @keyframes slideInDown {
    from { transform: translateY(-6px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .alert-in { animation: slideInDown 0.25s ease-out; }

  /* ---- intl-tel-input dropdown theming ---- */
  .iti__selected-flag {
    padding: 0 10px 0 12px;
    background: transparent;
    transition: background 0.15s;
    border-radius: 0.5rem 0 0 0.5rem;
  }
  .iti__selected-flag:hover,
  .iti__selected-flag:focus { background: rgba(0,0,0,0.04); }
  .dark .iti__selected-flag:hover,
  .dark .iti__selected-flag:focus { background: rgba(255,255,255,0.07); }

  .iti__country-list {
    border-radius: 0.875rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    background: #ffffff;
    max-height: 280px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    padding: 4px;
  }
  .dark .iti__country-list {
    background: #18181b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.55);
    scrollbar-color: rgba(255,255,255,0.15) transparent;
  }
  .iti__country {
    padding: 8px 12px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .iti__country:hover,
  .iti__country.iti__highlight { background: #f3f4f6; }
  .dark .iti__country:hover,
  .dark .iti__country.iti__highlight { background: rgba(255,255,255,0.07); }
  .iti__country-name { color: #374151; font-size: 0.875rem; }
  .dark .iti__country-name { color: #e5e7eb; }
  .iti__dial-code { color: #9ca3af; font-size: 0.8125rem; margin-left: auto; }
  .dark .iti__dial-code { color: #6b7280; }
  .iti__divider { border-bottom: 1px solid #f3f4f6; margin: 4px 0; }
  .dark .iti__divider { border-bottom-color: rgba(255,255,255,0.07); }

  /* search input inside dropdown */
  .iti__search-input {
    display: block;
    width: calc(100% - 16px);
    margin: 8px;
    padding: 8px 12px;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #111827;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .iti__search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    background: #fff;
  }
  .dark .iti__search-input {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #f9fafb;
  }
  .dark .iti__search-input::placeholder { color: #6b7280; }
  .dark .iti__search-input:focus {
    border-color: #3b82f6;
    background: rgba(255,255,255,0.09);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
  }

  /* phone/email toggle icons — white in dark mode */
  .dark #showMobileBtn img,
  .dark #showEmailBtn img {
    filter: brightness(0) invert(1);
    opacity: 0.8;
  }
