/* Prevent system theme from affecting inputs */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* Global input color scheme override */
    input, textarea, select {
      color-scheme: light;
    }

    /* Force explicit colors for all form elements */
    input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select {
      background-color: #ffffff !important;
      color: #212529 !important;
    }

    body,
    html[dir="ltr"] body,
    html[dir="rtl"] body {
      font-family: var(--font-sans, "Inter", system-ui, sans-serif);
      background-color: #f1f5f9;
      background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
      background-size: 40px 40px;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      position: relative;
      overflow: hidden;
      overflow-x: hidden;
      overflow-y: auto;
      width: 100%;
      max-width: 100vw;
    }

    /* Subtle motion (respect reduced-motion) */
    body::before {
      content: '';
      position: absolute;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
      background-size: 48px 48px;
      animation: backgroundMove 28s linear infinite;
      pointer-events: none;
    }

    @media (prefers-reduced-motion: reduce) {
      body::before {
        animation: none;
      }
    }

    @keyframes backgroundMove {
      0% { transform: translate(0, 0); }
      100% { transform: translate(50px, 50px); }
    }

    .auth-container {
      width: 100%;
      max-width: 450px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border-radius: 24px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      overflow: hidden;
      position: relative;
      z-index: 1;
      animation: slideUp 0.6s ease-out;
    }

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

    .auth-header {
      background: #0f172a;
      border-bottom: 3px solid #25d366;
      padding: 40px 30px;
      text-align: center;
      color: white;
    }

    .auth-header .brand-icon {
      width: 80px;
      height: 80px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
      font-size: 2.5rem;
      backdrop-filter: blur(10px);
      border: 3px solid rgba(255, 255, 255, 0.3);
    }

    .auth-header h1 {
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .auth-header p {
      font-size: 0.95rem;
      opacity: 0.9;
      margin: 0;
    }

    .auth-body {
      padding: 40px 30px;
    }

    .tab-switcher {
      display: flex;
      background: #f8f9fa;
      border-radius: 12px;
      padding: 4px;
      margin-bottom: 30px;
      position: relative;
    }

    .tab-switcher::before {
      content: '';
      position: absolute;
      width: 50%;
      height: calc(100% - 8px);
      background: white;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      transition: transform 0.3s ease;
      transform: translateX(0);
    }

    .tab-switcher.active-register::before {
      transform: translateX(100%);
    }

    .tab-switcher button {
      flex: 1;
      background: transparent;
      border: none;
      padding: 12px;
      font-weight: 600;
      font-size: 0.95rem;
      color: #6c757d;
      cursor: pointer;
      position: relative;
      z-index: 2;
      transition: color 0.3s ease;
    }

    .tab-switcher button.active {
      color: #25d366;
    }

    .form-group {
      margin-bottom: 24px;
      position: relative;
    }

    .form-group label {
      display: block;
      font-weight: 600;
      font-size: 0.9rem;
      color: #495057;
      margin-bottom: 8px;
    }

    .form-group .input-wrapper {
      position: relative;
    }

    .form-group .input-wrapper i {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: #6c757d;
      font-size: 1rem;
    }

    .form-group input {
      width: 100%;
      padding: 14px 16px 14px 48px;
      border: 2px solid #e9ecef;
      border-radius: 12px;
      font-size: 1rem;
      transition: all 0.3s ease;
      background: #ffffff !important;
      color: #212529 !important;
      color-scheme: light;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
    }

    .form-group input:focus {
      outline: none;
      border-color: #25d366;
      box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
      background: #ffffff !important;
      color: #212529 !important;
    }

    .form-group input::placeholder {
      color: #adb5bd !important;
      opacity: 1;
    }

    .form-group input::-webkit-input-placeholder {
      color: #adb5bd !important;
      opacity: 1;
    }

    .form-group input::-moz-placeholder {
      color: #adb5bd !important;
      opacity: 1;
    }

    .form-group input:-ms-input-placeholder {
      color: #adb5bd !important;
      opacity: 1;
    }

    .btn-submit {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
      border: none;
      border-radius: 12px;
      color: white;
      font-weight: 600;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
      position: relative;
      overflow: hidden;
    }

    .btn-submit:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    }

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

    .btn-submit::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }

    .btn-submit:hover::before {
      width: 300px;
      height: 300px;
    }

    .btn-submit i {
      margin-right: 8px;
    }

    .error-message {
      color: #dc3545;
      font-size: 0.85rem;
      margin-top: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .error-message i {
      font-size: 0.9rem;
    }

    .loading-spinner {
      display: none;
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin-right: 8px;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .btn-submit.loading .loading-spinner {
      display: inline-block;
    }

    .auth-footer {
      text-align: center;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid #e9ecef;
    }

    .auth-footer p {
      color: #6c757d;
      font-size: 0.9rem;
      margin: 0;
    }

    .auth-footer a {
      color: #25d366;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.3s ease;
    }

    .auth-footer a:hover {
      color: #128c7e;
      text-decoration: underline;
    }

    /* ==================== LTR RESPONSIVE ==================== */
    /* LTR Base Rules - Explicit */
    html[dir="ltr"],
    html[dir="ltr"] body,
    html:not([dir="rtl"]) body:not(.rtl) {
      direction: ltr !important;
      text-align: left !important;
      overflow-x: hidden !important;
      max-width: 100vw !important;
      width: 100% !important;
    }

    /* LTR Auth Container */
    html[dir="ltr"] .auth-container,
    html:not([dir="rtl"]) body:not(.rtl) .auth-container {
      direction: ltr !important;
      text-align: left !important;
    }

    /* LTR Form Groups */
    html[dir="ltr"] .form-group label,
    html[dir="ltr"] .form-group input,
    html[dir="ltr"] .form-group select,
    html:not([dir="rtl"]) body:not(.rtl) .form-group label,
    html:not([dir="rtl"]) body:not(.rtl) .form-group input,
    html:not([dir="rtl"]) body:not(.rtl) .form-group select {
      text-align: left !important;
      direction: ltr !important;
    }

    /* LTR Input Icons - on left side */
    html[dir="ltr"] .input-wrapper i,
    html:not([dir="rtl"]) body:not(.rtl) .input-wrapper i {
      left: 16px !important;
      right: auto !important;
    }

    /* LTR Input Padding - icon on left */
    html[dir="ltr"] .form-group input,
    html:not([dir="rtl"]) body:not(.rtl) .form-group input {
      padding-left: 48px !important;
      padding-right: 16px !important;
      text-align: left !important;
      direction: ltr !important;
      background: #ffffff !important;
      color: #212529 !important;
      color-scheme: light;
    }

    /* LTR Input Placeholder */
    html[dir="ltr"] .form-group input::placeholder,
    html:not([dir="rtl"]) body:not(.rtl) .form-group input::placeholder {
      text-align: left !important;
      direction: ltr !important;
    }

    /* LTR Button Icons */
    html[dir="ltr"] .btn-submit i,
    html[dir="ltr"] .btn-submit .loading-spinner,
    html[dir="ltr"] .btn-submit .success-check,
    html:not([dir="rtl"]) body:not(.rtl) .btn-submit i,
    html:not([dir="rtl"]) body:not(.rtl) .btn-submit .loading-spinner,
    html:not([dir="rtl"]) body:not(.rtl) .btn-submit .success-check {
      margin-left: 0 !important;
      margin-right: 8px !important;
    }

    /* LTR Password Requirements */
    html[dir="ltr"] .password-requirements,
    html:not([dir="rtl"]) body:not(.rtl) .password-requirements {
      border-right: none !important;
      border-left: 3px solid #25d366 !important;
      text-align: left !important;
      direction: ltr !important;
    }

    html[dir="ltr"] .password-requirements ul,
    html:not([dir="rtl"]) body:not(.rtl) .password-requirements ul {
      margin: 4px 0 0 20px !important;
      padding: 0 !important;
      direction: ltr !important;
    }

    /* LTR Error Messages */
    html[dir="ltr"] .error-message,
    html:not([dir="rtl"]) body:not(.rtl) .error-message {
      text-align: left !important;
      direction: ltr !important;
      justify-content: flex-start !important;
    }

    html[dir="ltr"] .error-message i,
    html:not([dir="rtl"]) body:not(.rtl) .error-message i {
      margin-left: 0 !important;
      margin-right: 6px !important;
    }

    /* LTR Language Selector */
    html[dir="ltr"] .language-selector,
    html:not([dir="rtl"]) body:not(.rtl) .language-selector {
      right: 20px !important;
      left: auto !important;
    }

    html[dir="ltr"] .lang-dropdown,
    html:not([dir="rtl"]) body:not(.rtl) .lang-dropdown {
      right: 0 !important;
      left: auto !important;
      text-align: left !important;
      direction: ltr !important;
    }

    html[dir="ltr"] .lang-option,
    html:not([dir="rtl"]) body:not(.rtl) .lang-option {
      text-align: left !important;
      direction: ltr !important;
      flex-direction: row !important;
    }

    /* LTR Alert Box */
    html[dir="ltr"] .alert,
    html:not([dir="rtl"]) body:not(.rtl) .alert {
      text-align: left !important;
      direction: ltr !important;
      border-right: none !important;
      border-left: 3px solid #25d366 !important;
    }

    html[dir="ltr"] .alert i,
    html:not([dir="rtl"]) body:not(.rtl) .alert i {
      margin-left: 0 !important;
      margin-right: 8px !important;
    }

    /* Tablet (max-width: 992px) */
    @media (max-width: 992px) {
      .auth-container,
      html[dir="ltr"] .auth-container,
      html:not([dir="rtl"]) body:not(.rtl) .auth-container {
        max-width: 500px;
      }

      .auth-header,
      html[dir="ltr"] .auth-header,
      html:not([dir="rtl"]) body:not(.rtl) .auth-header {
        padding: 35px 25px;
      }

      .auth-body,
      html[dir="ltr"] .auth-body,
      html:not([dir="rtl"]) body:not(.rtl) .auth-body {
        padding: 35px 25px;
      }

      .auth-header h1,
      html[dir="ltr"] .auth-header h1,
      html:not([dir="rtl"]) body:not(.rtl) .auth-header h1 {
        font-size: 1.65rem;
      }

      .form-group,
      html[dir="ltr"] .form-group,
      html:not([dir="rtl"]) body:not(.rtl) .form-group {
        margin-bottom: 20px;
      }

      .form-group input,
      html[dir="ltr"] .form-group input,
      html:not([dir="rtl"]) body:not(.rtl) .form-group input {
        padding: 12px 16px 12px 48px;
        font-size: 0.95rem;
      }

      html[dir="ltr"] .form-group input,
      html:not([dir="rtl"]) body:not(.rtl) .form-group input {
        padding-left: 48px !important;
        padding-right: 16px !important;
      }

      html[dir="ltr"] .input-wrapper i,
      html:not([dir="rtl"]) body:not(.rtl) .input-wrapper i {
        left: 16px !important;
        right: auto !important;
      }

      .btn-submit,
      html[dir="ltr"] .btn-submit,
      html:not([dir="rtl"]) body:not(.rtl) .btn-submit {
        padding: 12px;
        font-size: 0.95rem;
      }
    }

    /* Mobile (max-width: 768px) */
    @media (max-width: 768px) {
      body,
      html[dir="rtl"] body,
      html[dir="ltr"] body,
      html:not([dir="rtl"]) body:not(.rtl),
      body.rtl {
        padding: 15px !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative !important;
      }

      html[dir="ltr"] .auth-container,
      html:not([dir="rtl"]) body:not(.rtl) .auth-container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        direction: ltr !important;
        text-align: left !important;
      }

      html[dir="ltr"] .auth-header,
      html:not([dir="rtl"]) body:not(.rtl) .auth-header {
        text-align: center !important;
        direction: ltr !important;
      }

      html[dir="ltr"] .auth-body,
      html:not([dir="rtl"]) body:not(.rtl) .auth-body {
        text-align: left !important;
        direction: ltr !important;
      }

      .auth-container {
        max-width: 100%;
        width: 100%;
        border-radius: 20px;
        margin: 0 auto;
      }

      .auth-header {
        padding: 30px 20px;
      }

      .auth-body {
        padding: 30px 20px;
      }

      .auth-header .brand-icon {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
      }

      .auth-header h1 {
        font-size: 1.5rem;
      }

      .auth-header p {
        font-size: 0.9rem;
      }

      .form-group {
        margin-bottom: 20px;
      }

      .form-group label {
        font-size: 0.85rem;
      }

      .form-group input {
        padding: 12px 16px 12px 44px;
        font-size: 0.95rem;
      }

      html[dir="ltr"] .form-group input,
      html:not([dir="rtl"]) body:not(.rtl) .form-group input {
        padding-left: 44px !important;
        padding-right: 16px !important;
      }

      .input-wrapper i {
        font-size: 0.95rem;
        left: 14px;
      }

      html[dir="ltr"] .input-wrapper i,
      html:not([dir="rtl"]) body:not(.rtl) .input-wrapper i {
        left: 14px !important;
        right: auto !important;
      }

      .btn-submit {
        padding: 12px;
        font-size: 0.95rem;
      }

      .tab-switcher {
        padding: 3px;
        margin-bottom: 25px;
      }

      .tab-switcher button {
        padding: 10px;
        font-size: 0.9rem;
      }

      .language-selector,
      html[dir="ltr"] .language-selector,
      html:not([dir="rtl"]) body:not(.rtl) .language-selector {
        top: 15px !important;
        right: 15px !important;
        left: auto !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        right: auto !important;
        left: 15px !important;
      }

      html[dir="ltr"] .lang-dropdown,
      html:not([dir="rtl"]) body:not(.rtl) .lang-dropdown {
        right: 0 !important;
        left: auto !important;
      }

      .lang-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
      }

      .lang-dropdown {
        min-width: 160px !important;
      }

      .password-requirements {
        padding: 10px;
        font-size: 0.85rem;
      }

      .auth-footer {
        margin-top: 20px;
        padding-top: 20px;
        font-size: 0.85rem;
      }
    }

    /* Small Mobile (max-width: 576px) */
    @media (max-width: 576px) {
      body,
      html[dir="rtl"] body,
      html[dir="ltr"] body,
      html:not([dir="rtl"]) body:not(.rtl),
      body.rtl {
        padding: 10px !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative !important;
      }

      html[dir="ltr"] .auth-container,
      html:not([dir="rtl"]) body:not(.rtl) .auth-container {
        max-width: 100% !important;
        width: calc(100% - 20px) !important;
        margin: 0 auto !important;
        direction: ltr !important;
        text-align: left !important;
      }

      html[dir="ltr"] .auth-header h1,
      html[dir="ltr"] .auth-header p,
      html[dir="ltr"] .auth-body,
      html:not([dir="rtl"]) body:not(.rtl) .auth-header h1,
      html:not([dir="rtl"]) body:not(.rtl) .auth-header p,
      html:not([dir="rtl"]) body:not(.rtl) .auth-body {
        text-align: center !important;
        direction: ltr !important;
      }

      html[dir="ltr"] .form-group,
      html[dir="ltr"] .form-group label,
      html:not([dir="rtl"]) body:not(.rtl) .form-group,
      html:not([dir="rtl"]) body:not(.rtl) .form-group label {
        text-align: left !important;
        direction: ltr !important;
      }

      html[dir="ltr"] .btn-submit,
      html:not([dir="rtl"]) body:not(.rtl) .btn-submit {
        text-align: center !important;
      }

      html[dir="ltr"] .error-message,
      html:not([dir="rtl"]) body:not(.rtl) .error-message {
        text-align: left !important;
        direction: ltr !important;
      }

      html[dir="ltr"] .password-requirements,
      html[dir="ltr"] .alert,
      html:not([dir="rtl"]) body:not(.rtl) .password-requirements,
      html:not([dir="rtl"]) body:not(.rtl) .alert {
        text-align: left !important;
        direction: ltr !important;
        border-left: 3px solid #25d366 !important;
        border-right: none !important;
      }

      .auth-container {
        max-width: 100%;
        width: calc(100% - 20px);
        border-radius: 16px;
        margin: 0 auto;
      }

      .auth-header {
        padding: 25px 15px;
      }

      .auth-body {
        padding: 25px 15px;
      }

      .auth-header .brand-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 15px;
      }

      .auth-header h1 {
        font-size: 1.35rem;
        margin-bottom: 6px;
      }

      .auth-header p {
        font-size: 0.85rem;
      }

      .form-group {
        margin-bottom: 18px;
      }

      .form-group label {
        font-size: 0.8rem;
        margin-bottom: 6px;
      }

      .form-group input {
        padding: 11px 14px 11px 40px;
        font-size: 0.9rem;
        border-radius: 10px;
      }

      html[dir="ltr"] .form-group input,
      html:not([dir="rtl"]) body:not(.rtl) .form-group input {
        padding-left: 40px !important;
        padding-right: 14px !important;
      }

      .input-wrapper i {
        font-size: 0.9rem;
        left: 12px;
      }

      html[dir="ltr"] .input-wrapper i,
      html:not([dir="rtl"]) body:not(.rtl) .input-wrapper i {
        left: 12px !important;
        right: auto !important;
      }

      .btn-submit {
        padding: 11px;
        font-size: 0.9rem;
        border-radius: 10px;
      }

      .tab-switcher {
        padding: 2px;
        margin-bottom: 20px;
        border-radius: 10px;
      }

      .tab-switcher button {
        padding: 9px 8px;
        font-size: 0.85rem;
      }

      .language-selector,
      html[dir="ltr"] .language-selector,
      html:not([dir="rtl"]) body:not(.rtl) .language-selector {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        right: auto !important;
        left: 10px !important;
      }

      html[dir="ltr"] .lang-dropdown,
      html:not([dir="rtl"]) body:not(.rtl) .lang-dropdown {
        right: 0 !important;
        left: auto !important;
      }

      .lang-btn {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.8rem !important;
      }

      .lang-dropdown {
        min-width: 160px !important;
        margin-top: 5px !important;
      }

      .password-requirements {
        padding: 8px;
        font-size: 0.8rem;
        margin-top: 6px;
      }

      .password-requirements ul {
        margin: 4px 0 0 18px;
        font-size: 0.8rem;
      }

      .error-message {
        font-size: 0.75rem;
        margin-top: 6px;
      }

      .auth-footer {
        margin-top: 18px;
        padding-top: 18px;
        font-size: 0.8rem;
      }

      .auth-footer a {
        font-size: 0.8rem;
      }
    }

    /* Extra Small Mobile (max-width: 375px) */
    @media (max-width: 375px) {
      body,
      html[dir="rtl"] body,
      html[dir="ltr"] body,
      html:not([dir="rtl"]) body:not(.rtl),
      body.rtl {
        padding: 8px !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
        position: relative !important;
      }

      html[dir="ltr"] .auth-container,
      html:not([dir="rtl"]) body:not(.rtl) .auth-container {
        width: calc(100% - 16px) !important;
        border-radius: 14px !important;
        margin: 0 auto !important;
        direction: ltr !important;
        text-align: left !important;
      }

      .auth-container {
        width: calc(100% - 16px);
        border-radius: 14px;
      }

      .auth-header {
        padding: 20px 12px;
      }

      .auth-body {
        padding: 20px 12px;
      }

      .auth-header .brand-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
      }

      .auth-header h1 {
        font-size: 1.2rem;
      }

      .auth-header p {
        font-size: 0.8rem;
      }

      .form-group input {
        padding: 10px 12px 10px 38px;
        font-size: 0.85rem;
      }

      html[dir="ltr"] .form-group input,
      html:not([dir="rtl"]) body:not(.rtl) .form-group input {
        padding-left: 38px !important;
        padding-right: 12px !important;
      }

      html[dir="ltr"] .input-wrapper i,
      html:not([dir="rtl"]) body:not(.rtl) .input-wrapper i {
        left: 12px !important;
        right: auto !important;
      }

      .btn-submit {
        padding: 10px;
        font-size: 0.85rem;
      }

      .tab-switcher button {
        padding: 8px 6px;
        font-size: 0.8rem;
      }

      .language-selector,
      html[dir="ltr"] .language-selector,
      html:not([dir="rtl"]) body:not(.rtl) .language-selector {
        top: 8px !important;
        right: 8px !important;
        left: auto !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        right: auto !important;
        left: 8px !important;
      }

      html[dir="ltr"] .lang-dropdown,
      html:not([dir="rtl"]) body:not(.rtl) .lang-dropdown {
        right: 0 !important;
        left: auto !important;
      }
    }

    /* =========================================================
       Login-only dark theme overrides
       Scoped to avoid changing register.html visual behavior
       ========================================================= */
    body.login-page-dark,
    html[dir="ltr"] body.login-page-dark,
    html[dir="rtl"] body.login-page-dark {
      background-color: #020617;
      background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    }

    body.login-page-dark::before {
      background: radial-gradient(circle, rgba(37, 211, 102, 0.12) 1px, transparent 1px);
      opacity: 0.45;
    }

    body.login-page-dark .auth-container {
      background: rgba(15, 23, 42, 0.92);
      border: 1px solid rgba(148, 163, 184, 0.25);
      box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55);
    }

    body.login-page-dark .auth-header {
      background: linear-gradient(150deg, #0f172a 0%, #111827 100%);
      border-bottom-color: #25d366;
    }

    body.login-page-dark .auth-body {
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.9));
    }

    body.login-page-dark .tab-switcher {
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(148, 163, 184, 0.2);
    }

    body.login-page-dark .tab-switcher::before {
      background: rgba(30, 41, 59, 0.95);
      box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
    }

    body.login-page-dark .tab-switcher button {
      color: #94a3b8;
    }

    body.login-page-dark .tab-switcher button.active {
      color: #25d366;
    }

    body.login-page-dark .form-group label {
      color: #cbd5e1;
    }

    body.login-page-dark .form-group .input-wrapper i {
      color: #94a3b8;
    }

    body.login-page-dark .form-group input,
    body.login-page-dark .form-group input:focus,
    html[dir="rtl"] body.login-page-dark .form-group input,
    html[dir="ltr"] body.login-page-dark .form-group input {
      background-color: #0f172a !important;
      border-color: rgba(100, 116, 139, 0.55);
      color: #e2e8f0 !important;
      color-scheme: dark;
    }

    body.login-page-dark .form-group input::placeholder {
      color: #64748b !important;
    }

    body.login-page-dark .form-group input:focus {
      border-color: #25d366;
      box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.22);
    }

    body.login-page-dark .auth-footer {
      border-top-color: rgba(100, 116, 139, 0.35);
    }

    body.login-page-dark .auth-footer p {
      color: #94a3b8;
    }

    body.login-page-dark .password-requirements {
      background: rgba(15, 23, 42, 0.8);
      border-left-color: #25d366;
      color: #94a3b8;
    }

    body.login-page-dark .password-requirements ul {
      color: #94a3b8;
    }

    body.login-page-dark .auth-trial-alert,
    body.login-page-dark .alert.auth-trial-alert {
      background: rgba(15, 23, 42, 0.88) !important;
      border: 1px solid rgba(100, 116, 139, 0.35) !important;
      border-left: 3px solid #25d366 !important;
      color: #d1d5db !important;
    }

    body.login-page-dark .lang-btn {
      background: rgba(15, 23, 42, 0.92) !important;
      border-color: rgba(100, 116, 139, 0.5) !important;
      color: #e2e8f0 !important;
    }

    body.login-page-dark .lang-btn:hover {
      background: rgba(30, 41, 59, 0.92) !important;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    }

    body.login-page-dark .lang-dropdown {
      background: #111827 !important;
      border: 1px solid rgba(100, 116, 139, 0.4) !important;
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important;
    }

    body.login-page-dark .lang-option {
      color: #e2e8f0 !important;
    }

    body.login-page-dark .lang-option:hover {
      background: #1e293b !important;
    }

    body.login-page-dark .lang-option.active {
      background: rgba(37, 211, 102, 0.14) !important;
      color: #86efac !important;
    }

    /* Success animation */
    .success-check {
      display: none;
      color: #28a745;
      font-size: 1.2rem;
      margin-right: 8px;
    }

    .btn-submit.success .success-check {
      display: inline-block;
    }

    .btn-submit.success .loading-spinner {
      display: none;
    }

    .password-requirements {
      margin-top: 8px;
      padding: 12px;
      background: #f8f9fa;
      border-radius: 8px;
      border-left: 3px solid #25d366;
    }

    .password-requirements ul {
      margin: 4px 0 0 20px;
      padding: 0;
      font-size: 0.85rem;
      color: #6c757d;
    }

    .password-requirements li {
      margin: 4px 0;
    }

    .password-requirements li.valid {
      color: #28a745;
    }

    .password-requirements li.invalid {
      color: #dc3545;
    }

    /* ==================== RTL SUPPORT ==================== */
    /* Base RTL - High specificity to override defaults */
    html[dir="rtl"],
    html[dir="rtl"] body,
    html[dir="rtl"] body.rtl,
    body.rtl {
      direction: rtl !important;
      text-align: right !important;
      overflow-x: hidden !important;
      max-width: 100vw !important;
      width: 100% !important;
    }

    /* Prevent horizontal scroll in RTL */
    html[dir="rtl"] body,
    body.rtl {
      position: relative;
      left: 0;
      right: 0;
      overflow-y: auto;
      overflow-x: hidden;
      width: 100%;
      max-width: 100vw;
    }

    /* Prevent body scroll issues in RTL */
    html[dir="rtl"] html,
    html[dir="rtl"] {
      overflow-x: hidden !important;
      max-width: 100vw !important;
    }

    /* RTL Auth Container */
    html[dir="rtl"] .auth-container,
    body.rtl .auth-container,
    [dir="rtl"] .auth-container {
      direction: rtl !important;
      text-align: right !important;
    }

    /* RTL Auth Header */
    html[dir="rtl"] .auth-header,
    body.rtl .auth-header,
    [dir="rtl"] .auth-header {
      direction: rtl !important;
      text-align: center !important;
    }

    /* RTL Auth Body */
    html[dir="rtl"] .auth-body,
    body.rtl .auth-body,
    [dir="rtl"] .auth-body {
      direction: rtl !important;
      text-align: right !important;
    }

    /* RTL Tab Switcher */
    html[dir="rtl"] .tab-switcher::before,
    body.rtl .tab-switcher::before,
    [dir="rtl"] .tab-switcher::before {
      transform: translateX(0);
    }

    html[dir="rtl"] .tab-switcher.active-register::before,
    body.rtl .tab-switcher.active-register::before,
    [dir="rtl"] .tab-switcher.active-register::before {
      transform: translateX(-100%);
    }

    /* RTL Form Groups */
    html[dir="rtl"] .form-group label,
    html[dir="rtl"] .form-group input,
    html[dir="rtl"] .form-group select,
    body.rtl .form-group label,
    body.rtl .form-group input,
    body.rtl .form-group select,
    [dir="rtl"] .form-group label,
    [dir="rtl"] .form-group input,
    [dir="rtl"] .form-group select {
      text-align: right !important;
      direction: rtl !important;
    }

    /* RTL Input Icons - move to right side */
    html[dir="rtl"] .input-wrapper i,
    body.rtl .input-wrapper i,
    [dir="rtl"] .input-wrapper i {
      left: auto !important;
      right: 16px !important;
    }

    /* RTL Input Padding - adjust for icon on right */
    html[dir="rtl"] .form-group input,
    body.rtl .form-group input,
    [dir="rtl"] .form-group input {
      padding-left: 16px !important;
      padding-right: 48px !important;
      text-align: right !important;
      direction: rtl !important;
      background: #ffffff !important;
      color: #212529 !important;
      color-scheme: light;
    }

    /* RTL Input Placeholder */
    html[dir="rtl"] .form-group input::placeholder,
    body.rtl .form-group input::placeholder,
    [dir="rtl"] .form-group input::placeholder {
      text-align: right !important;
      direction: rtl !important;
    }

    /* RTL Button Icons */
    html[dir="rtl"] .btn-submit i,
    html[dir="rtl"] .btn-submit .loading-spinner,
    html[dir="rtl"] .btn-submit .success-check,
    body.rtl .btn-submit i,
    body.rtl .btn-submit .loading-spinner,
    body.rtl .btn-submit .success-check,
    [dir="rtl"] .btn-submit i,
    [dir="rtl"] .btn-submit .loading-spinner,
    [dir="rtl"] .btn-submit .success-check {
      margin-right: 0 !important;
      margin-left: 8px !important;
    }

    /* RTL Password Requirements */
    html[dir="rtl"] .password-requirements,
    body.rtl .password-requirements,
    [dir="rtl"] .password-requirements {
      border-left: none !important;
      border-right: 3px solid #25d366 !important;
      text-align: right !important;
      direction: rtl !important;
    }

    html[dir="rtl"] .password-requirements ul,
    body.rtl .password-requirements ul,
    [dir="rtl"] .password-requirements ul {
      margin: 4px 20px 0 0 !important;
      padding: 0 !important;
      direction: rtl !important;
    }

    /* RTL Error Messages */
    html[dir="rtl"] .error-message,
    body.rtl .error-message,
    [dir="rtl"] .error-message {
      text-align: right !important;
      direction: rtl !important;
      justify-content: flex-start !important;
    }

    html[dir="rtl"] .error-message i,
    body.rtl .error-message i,
    [dir="rtl"] .error-message i {
      margin-right: 0 !important;
      margin-left: 6px !important;
    }

    /* RTL Auth Footer */
    html[dir="rtl"] .auth-footer,
    body.rtl .auth-footer,
    [dir="rtl"] .auth-footer {
      text-align: center !important;
      direction: rtl !important;
    }

    html[dir="rtl"] .auth-footer a,
    body.rtl .auth-footer a,
    [dir="rtl"] .auth-footer a {
      direction: rtl !important;
    }

    /* Language Selector Base Styles */
    .language-selector {
      position: fixed !important;
      top: 20px !important;
      right: 20px !important;
      z-index: 1000 !important;
    }

    .lang-btn {
      display: flex !important;
      align-items: center !important;
      gap: 0.5rem !important;
      padding: 0.5rem 1rem !important;
      background: rgba(255,255,255,0.95) !important;
      border: 1px solid #e9ecef !important;
      border-radius: 8px !important;
      cursor: pointer !important;
      font-size: 0.9rem !important;
      transition: all 0.3s ease !important;
    }

    .lang-btn:hover {
      background: rgba(255,255,255,1) !important;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }

    .lang-dropdown {
      position: absolute !important;
      top: calc(100% + 0.5rem) !important;
      right: 0 !important;
      background: white !important;
      border-radius: 12px !important;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
      min-width: 180px !important;
      padding: 0.5rem !important;
      opacity: 0 !important;
      visibility: hidden !important;
      transform: translateY(-10px) !important;
      transition: all 0.3s ease !important;
      z-index: 1001 !important;
      display: block !important;
    }

    .lang-dropdown.show {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateY(0) !important;
    }

    .lang-option {
      display: flex !important;
      align-items: center !important;
      gap: 0.75rem !important;
      width: 100% !important;
      padding: 0.75rem 1rem !important;
      border: none !important;
      background: transparent !important;
      text-align: left !important;
      cursor: pointer !important;
      border-radius: 8px !important;
      transition: background 0.2s ease !important;
      font-size: 0.9rem !important;
    }

    .lang-option:hover {
      background: #f8f9fa !important;
    }

    .lang-option.active {
      background: #e7f3ff !important;
      color: #25d366 !important;
      font-weight: 600 !important;
    }

    /* RTL Language Selector */
    html[dir="rtl"] .language-selector,
    body.rtl .language-selector,
    [dir="rtl"] .language-selector {
      right: auto !important;
      left: 20px !important;
    }

    html[dir="rtl"] .lang-dropdown,
    body.rtl .lang-dropdown,
    [dir="rtl"] .lang-dropdown {
      right: auto !important;
      left: 0 !important;
      text-align: right !important;
      direction: rtl !important;
    }

    html[dir="rtl"] .lang-option,
    body.rtl .lang-option,
    [dir="rtl"] .lang-option {
      text-align: right !important;
      direction: rtl !important;
      flex-direction: row-reverse !important;
    }

    /* RTL Alert Box */
    html[dir="rtl"] .alert,
    body.rtl .alert,
    [dir="rtl"] .alert {
      text-align: right !important;
      direction: rtl !important;
      border-left: none !important;
      border-right: 3px solid #25d366 !important;
    }

    html[dir="rtl"] .alert i,
    body.rtl .alert i,
    [dir="rtl"] .alert i {
      margin-right: 0 !important;
      margin-left: 8px !important;
    }

    /* RTL Responsive - Tablet (max-width: 992px) */
    @media (max-width: 992px) {
      html[dir="rtl"] .auth-container,
      body.rtl .auth-container,
      [dir="rtl"] .auth-container {
        max-width: 500px !important;
        width: 100% !important;
        margin: 0 auto !important;
        direction: rtl !important;
        text-align: right !important;
      }

      html[dir="rtl"] .form-group input,
      body.rtl .form-group input,
      [dir="rtl"] .form-group input {
        padding-left: 16px !important;
        padding-right: 48px !important;
        direction: rtl !important;
        text-align: right !important;
      }

      html[dir="rtl"] .input-wrapper i,
      body.rtl .input-wrapper i,
      [dir="rtl"] .input-wrapper i {
        right: 16px !important;
        left: auto !important;
      }
    }

    /* RTL Responsive - Mobile (max-width: 768px) */
    @media (max-width: 768px) {
      html[dir="rtl"] body,
      body.rtl {
        overflow-x: hidden !important;
        position: relative !important;
        max-width: 100vw !important;
        width: 100% !important;
      }

      html[dir="rtl"] .auth-container,
      body.rtl .auth-container,
      [dir="rtl"] .auth-container {
        text-align: right !important;
        direction: rtl !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
      }

      html[dir="rtl"] .auth-header,
      html[dir="rtl"] .auth-header h1,
      html[dir="rtl"] .auth-header p,
      body.rtl .auth-header,
      body.rtl .auth-header h1,
      body.rtl .auth-header p,
      [dir="rtl"] .auth-header,
      [dir="rtl"] .auth-header h1,
      [dir="rtl"] .auth-header p {
        text-align: center !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .auth-body,
      body.rtl .auth-body,
      [dir="rtl"] .auth-body {
        text-align: right !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .form-group,
      html[dir="rtl"] .form-group label,
      html[dir="rtl"] .form-group input,
      body.rtl .form-group,
      body.rtl .form-group label,
      body.rtl .form-group input,
      [dir="rtl"] .form-group,
      [dir="rtl"] .form-group label,
      [dir="rtl"] .form-group input {
        text-align: right !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .input-wrapper i,
      body.rtl .input-wrapper i,
      [dir="rtl"] .input-wrapper i {
        right: 12px !important;
        left: auto !important;
      }

      html[dir="rtl"] .form-group input,
      body.rtl .form-group input,
      [dir="rtl"] .form-group input {
        padding-right: 44px !important;
        padding-left: 12px !important;
      }

      html[dir="rtl"] .btn-submit,
      body.rtl .btn-submit,
      [dir="rtl"] .btn-submit {
        text-align: center !important;
      }

      html[dir="rtl"] .btn-submit i,
      html[dir="rtl"] .btn-submit .loading-spinner,
      html[dir="rtl"] .btn-submit .success-check,
      body.rtl .btn-submit i,
      body.rtl .btn-submit .loading-spinner,
      body.rtl .btn-submit .success-check,
      [dir="rtl"] .btn-submit i,
      [dir="rtl"] .btn-submit .loading-spinner,
      [dir="rtl"] .btn-submit .success-check {
        margin-right: 0 !important;
        margin-left: 8px !important;
      }

      html[dir="rtl"] .tab-switcher,
      body.rtl .tab-switcher,
      [dir="rtl"] .tab-switcher {
        direction: rtl !important;
      }

      html[dir="rtl"] .password-requirements,
      html[dir="rtl"] .alert,
      body.rtl .password-requirements,
      body.rtl .alert,
      [dir="rtl"] .password-requirements,
      [dir="rtl"] .alert {
        text-align: right !important;
        direction: rtl !important;
        border-right: 3px solid #25d366 !important;
        border-left: none !important;
      }
    }

    /* RTL Responsive - Small Mobile (max-width: 576px) */
    @media (max-width: 576px) {
      html[dir="rtl"] body,
      body.rtl {
        overflow-x: hidden !important;
        position: relative !important;
        max-width: 100vw !important;
        width: 100% !important;
        padding: 10px !important;
      }

      html[dir="rtl"] .auth-container,
      body.rtl .auth-container,
      [dir="rtl"] .auth-container {
        max-width: 100% !important;
        width: calc(100% - 20px) !important;
        margin: 0 auto !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        left: 10px !important;
        right: auto !important;
        top: 10px !important;
      }

      html[dir="rtl"] .auth-header h1,
      html[dir="rtl"] .auth-header p,
      html[dir="rtl"] .auth-body,
      body.rtl .auth-header h1,
      body.rtl .auth-header p,
      body.rtl .auth-body,
      [dir="rtl"] .auth-header h1,
      [dir="rtl"] .auth-header p,
      [dir="rtl"] .auth-body {
        text-align: center !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .form-group,
      html[dir="rtl"] .form-group label,
      body.rtl .form-group,
      body.rtl .form-group label,
      [dir="rtl"] .form-group,
      [dir="rtl"] .form-group label {
        text-align: right !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .form-group input,
      html[dir="rtl"] .form-group input::placeholder,
      body.rtl .form-group input,
      body.rtl .form-group input::placeholder,
      [dir="rtl"] .form-group input,
      [dir="rtl"] .form-group input::placeholder {
        text-align: right !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .btn-submit,
      body.rtl .btn-submit,
      [dir="rtl"] .btn-submit {
        text-align: center !important;
      }

      html[dir="rtl"] .error-message,
      body.rtl .error-message,
      [dir="rtl"] .error-message {
        text-align: right !important;
        direction: rtl !important;
      }

      html[dir="rtl"] .password-requirements,
      html[dir="rtl"] .alert,
      body.rtl .password-requirements,
      body.rtl .alert,
      [dir="rtl"] .password-requirements,
      [dir="rtl"] .alert {
        text-align: right !important;
        direction: rtl !important;
        border-right: 3px solid #25d366 !important;
        border-left: none !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        left: 15px !important;
        right: auto !important;
        top: 15px !important;
      }
    }

    /* RTL Responsive - Extra Small Mobile (max-width: 375px) */
    @media (max-width: 375px) {
      html[dir="rtl"] body,
      body.rtl {
        overflow-x: hidden !important;
        position: relative !important;
        max-width: 100vw !important;
        width: 100% !important;
        padding: 8px !important;
      }

      html[dir="rtl"] .auth-container,
      body.rtl .auth-container,
      [dir="rtl"] .auth-container {
        width: calc(100% - 16px) !important;
        border-radius: 14px !important;
        margin: 0 auto !important;
      }

      html[dir="rtl"] .language-selector,
      body.rtl .language-selector,
      [dir="rtl"] .language-selector {
        left: 8px !important;
        right: auto !important;
        top: 8px !important;
      }

      html[dir="rtl"] .form-group input,
      body.rtl .form-group input,
      [dir="rtl"] .form-group input {
        padding-left: 12px !important;
        padding-right: 38px !important;
      }

      html[dir="rtl"] .input-wrapper i,
      body.rtl .input-wrapper i,
      [dir="rtl"] .input-wrapper i {
        right: 12px !important;
        left: auto !important;
      }
    }
