@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

    * { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --primary:    #2D8653;
      --primary-dk: #1F6B3E;
      --dark:       #1E1F21;
      --gray:       #6B6F76;
      --light:      #F5F5F5;
      --white:      #FFFFFF;
      --border:     #E8E8E8;
      --error:      #C0392B;
      --error-bg:   #FDECEA;
      --success:    #1D7A4A;
      --success-bg: #E8F5EE;
    }

    body {
      font-family: 'Tajawal', sans-serif;
      background: var(--light);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .page-wrapper {
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 100vh;
      width: 100%;
    }

    .form-side {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 60px 48px;
      background: white;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      margin-bottom: 48px;
    }

    .logo-icon {
      width: 36px;
      height: 36px;
      background: var(--primary);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 18px;
      font-weight: 800;
    }

    .logo-text {
      font-size: 20px;
      font-weight: 800;
      color: var(--dark);
    }

    h1 {
      font-size: 28px;
      font-weight: 800;
      color: var(--dark);
      margin-bottom: 6px;
    }

    .subtitle {
      color: var(--gray);
      font-size: 15px;
      margin-bottom: 32px;
    }

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

    .form-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--dark);
      margin-bottom: 7px;
    }

    .required-label::after {
      content: " *";
      color: var(--error);
      font-weight: 800;
      margin-inline-start: 3px;
    }

    .form-group input {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      font-size: 14px;
      font-family: 'Tajawal', sans-serif;
      outline: none;
      transition: border 0.2s;
      color: var(--dark);
    }

    .form-group input:focus { border-color: var(--primary); }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .btn-submit {
      width: 100%;
      padding: 13px;
      background: var(--primary);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Tajawal', sans-serif;
      transition: background 0.2s;
      margin-top: 8px;
    }

    .btn-submit:hover { background: var(--primary-dk); }

    .error-msg {
      background: var(--error-bg);
      color: var(--error);
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13px;
      margin-bottom: 16px;
      display: none;
      border-right: 3px solid var(--error);
    }

    .success-msg {
      background: var(--success-bg);
      color: var(--success);
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 13px;
      margin-bottom: 16px;
      display: none;
      border-right: 3px solid var(--success);
    }

    html[dir="ltr"] .error-msg {
      border-right: none;
      border-left: 3px solid var(--error);
    }

    html[dir="ltr"] .success-msg {
      border-right: none;
      border-left: 3px solid var(--success);
    }

    .login-link {
      text-align: center;
      margin-top: 20px;
      font-size: 14px;
      color: var(--gray);
    }

    .login-link a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
    }

    .otp-section {
      animation: fadeIn 0.3s ease;
    }

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

    .otp-description {
      color: var(--dark);
      font-size: 15px;
      margin-bottom: 4px;
      line-height: 1.6;
    }

    .otp-email {
      color: var(--primary);
      font-weight: 700;
      font-size: 15px;
      margin-bottom: 24px;
      word-break: break-all;
    }

    .otp-input {
      text-align: center;
      font-size: 22px !important;
      font-weight: 800;
      letter-spacing: 8px;
    }

    .otp-actions {
      text-align: center;
      margin-top: 16px;
      font-size: 13px;
      color: var(--gray);
    }

    .otp-actions a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 700;
      margin-inline-start: 4px;
      cursor: pointer;
    }

    .otp-actions a.is-disabled { opacity: .55; pointer-events: none; text-decoration: none; }
    .otp-actions a:hover {
      text-decoration: underline;
    }

    #otpBackLink a {
      color: var(--gray);
      font-weight: 600;
      font-size: 13px;
      text-decoration: none;
      cursor: pointer;
    }

    #otpBackLink a:hover {
      color: var(--primary);
      text-decoration: underline;
    }

    .info-side {
      background: var(--dark);
      padding: 60px 48px;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
    }

    .info-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(45,134,83,0.2);
      color: #4ECBC4;
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 28px;
      width: fit-content;
    }

    .info-side h2 {
      font-size: 32px;
      font-weight: 800;
      color: white;
      line-height: 1.3;
      margin-bottom: 16px;
    }

    .info-side h2 span { color: var(--primary); }

    .info-side p {
      color: #999;
      font-size: 15px;
      line-height: 1.7;
      margin-bottom: 40px;
    }

    .info-features { list-style: none; }

    .info-features li {
      display: flex;
      align-items: center;
      gap: 12px;
      color: #ccc;
      font-size: 14px;
      margin-bottom: 16px;
    }

    .info-features li .icon {
      width: 32px;
      height: 32px;
      background: rgba(45,134,83,0.15);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      flex-shrink: 0;
    }

    .divider {
      height: 1px;
      background: #333;
      margin: 32px 0;
    }

    .testimonial {
      background: #2C2E30;
      border-radius: 12px;
      padding: 20px;
    }

    .testimonial p {
      color: #ccc;
      font-size: 14px;
      margin-bottom: 12px;
      font-style: italic;
    }

    .testimonial-author {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .author-avatar {
      width: 36px;
      height: 36px;
      background: var(--primary);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 700;
      font-size: 14px;
    }

    .author-info .name  { color: white; font-size: 13px; font-weight: 600; }
    .author-info .role  { color: #666; font-size: 12px; }

    .lang-btn {
      position: fixed;
      bottom: 24px;
      left: 24px;
      background: white;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Tajawal', sans-serif;
      color: var(--dark);
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      transition: all 0.2s;
      z-index: 999;
      line-height: 1.2;
    }

    .lang-btn:hover {
      border-color: var(--primary);
      color: var(--primary);
    }

    .support-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      background: var(--primary);
      color: white;
      border: none;
      border-radius: 50px;
      padding: 10px 18px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      font-family: 'Tajawal', sans-serif;
      box-shadow: 0 4px 14px rgba(45,134,83,0.35);
      transition: all 0.2s;
      z-index: 999;
      display: flex;
      align-items: center;
      gap: 6px;
      text-decoration: none;
      line-height: 1.2;
    }

    .support-btn:hover {
      background: var(--primary-dk);
      transform: translateY(-2px);
    }

    /* Payment Section */
    .payment-divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 20px 0 16px;
      color: var(--gray);
      font-size: 13px;
      font-weight: 600;
    }
    .payment-divider::before,
    .payment-divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    .payment-card-preview {
      background: linear-gradient(135deg, #1E1F21 0%, #2D8653 100%);
      border-radius: 14px;
      padding: 20px;
      margin-bottom: 18px;
      color: white;
      position: relative;
      overflow: hidden;
      min-height: 120px;
    }
    .payment-card-preview::before {
      content: "";
      position: absolute;
      top: -30px; right: -30px;
      width: 120px; height: 120px;
      border-radius: 50%;
      background: rgba(255,255,255,0.06);
    }
    .card-chip {
      width: 32px; height: 24px;
      background: linear-gradient(135deg, #f0c040, #d4a017);
      border-radius: 5px;
      margin-bottom: 16px;
    }
    .card-number-preview {
      font-size: 16px;
      letter-spacing: 3px;
      font-weight: 600;
      margin-bottom: 14px;
      font-family: monospace;
    }
    .card-bottom-row {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }
    .card-label-small {
      font-size: 10px;
      opacity: 0.6;
      margin-bottom: 2px;
      text-transform: uppercase;
    }
    .card-holder-preview {
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 1px;
    }

    .card-input-wrapper {
      position: relative;
    }
    .card-input-wrapper input {
      padding-left: 40px !important;
    }
    html[dir="rtl"] .card-input-wrapper input {
      padding-left: 14px !important;
      padding-right: 40px !important;
    }
    .card-icon {
      position: absolute;
      top: 50%; left: 12px;
      transform: translateY(-50%);
      font-size: 16px;
    }
    html[dir="rtl"] .card-icon {
      left: auto; right: 12px;
    }

    .payment-security-note {
      background: #F0FAF4;
      border: 1px solid #C3E6CB;
      border-radius: 8px;
      padding: 9px 13px;
      font-size: 12px;
      color: var(--success);
      margin-bottom: 16px;
      text-align: center;
    }

    #selectedPlanBadge { display: none; }
    #selectedPlanBadge.visible { display: flex !important; }

    .field-hint {
      display: block;
      font-size: 12px;
      color: var(--gray);
      margin-top: 5px;
    }

    .username-status {
      font-size: 12px;
      margin-top: 5px;
      display: none;
    }

    .username-status.available { color: var(--success); display: block; }
    .username-status.taken     { color: var(--error);   display: block; }

    @media (max-width: 900px) {
      .page-wrapper {
        grid-template-columns: 1fr;
      }

      .info-side {
        display: none;
      }

      .form-side {
        padding: 40px 24px;
      }
    }
