/* ========================
   Ace Tutor - Main CSS
   ========================
   This file contains base styling for the landing page:
   - Resets and typography
   - Navbar + menu
   - Authentication forms
   - Hero section
   - Course cards
   - Footer
*/

/* ======================== RESET & BASE ======================== */
 :root {
      --primary: #4f46e5;
      --primary-dark: #4338ca;
      --accent: #06b6d4;
      --background: #f8fafc;
      --text: #1e293b;
      --text-light: #64748b;
      --card-bg: #ffffff;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
      --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
      --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: 'Poppins', sans-serif;
    }

    body {
      background-color: var(--background);
      color: var(--text);
      min-height: 100vh;
      margin-top:10px;
      
    } 

/* ======================== NAVBAR ======================== */
   .navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      background: var(--card-bg);
      padding: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: var(--shadow-sm);
      z-index: 1000;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--primary);
      font-size: 1.5rem;
      font-weight: 700;
      text-decoration: none;
    }

   .logo-img{
      width:40px;
    }

   .menu-toggle {
      background: none;
      border: 1px solid lightgrey;
      border-radius:4px;
      cursor: pointer;
      padding: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .menu-toggle svg {
      width: 1.5rem;
      height: 1.5rem;
      fill: var(--text);
    }


/* ======================== MENU (Side Drawer) ======================== */
    .menu {
          position: fixed;
          top: 0;
          right: -300px;
          width: 300px;
          height: 100vh;
          background: var(--card-bg);
          padding: 1.5rem;
          box-shadow: var(--shadow-lg);
          transition: right 0.3s ease;
          z-index: 1001;
          display: flex;
          flex-direction: column;
        }

        .menu.active {
          right: 0;
          display:block;
        }

    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
      z-index: 999;
    }

    .overlay.active {
      opacity: 1;
      visibility: visible;
    }


    .menu-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .close-menu svg {
      width: 20px;
      height: 20px;
      cursor: pointer;
    }

    /* ======================== AUTH FORMS ======================== */
    .auth-forms {
      margin-top: 1rem;
      margin-bottom: 2rem;
    }

    .auth-form {
      display: none; /* forms hidden until switched by JS */
      margin-bottom: 1rem;
      gap: 1rem;
    }

    .auth-form .form-group {
      margin-bottom: 1rem;
    }

    .auth-form label {
      display: block;
      font-weight: 500;
      margin-bottom: 0.25rem;
    }

    .auth-form input, 
    .auth-form select {
      width: 100%;
      padding: 0.5rem;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 0.9rem;
    }

    .auth-btn {
      width: 100%;
      padding: 0.7rem;
      background: #4f46e5;
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 1rem;
      cursor: pointer;
    }

    .auth-btn:hover {
      background: #4338ca;
    }

    .auth-message {
        padding: 0.8rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        display: none;
      }

    .auth-message.success {
      background-color: #dcfce7;
      color: #166534;
      border: 1px solid #86efac;
    }

    .auth-message.error {
      background-color: #fee2e2;
      color: #991b1b;
      border: 1px solid #fca5a5;
    }

    .form-switch {
      margin-top: 0.5rem;
      text-align: center;
    }

    .form-switch button {
      background: none;
      border: none;
      color: #4f46e5;
      font-weight: 500;
      cursor: pointer;
    }

    .whatsapp-input {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background-color: var(--background);
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      padding: 0 0.8rem;
    }

    .whatsapp-input span {
      color: var(--text-light);
      font-size: 0.95rem;
    }

    .whatsapp-input input {
      border: none;
      padding: 0.8rem 0;
      background: none;
      flex-grow: 1;
    }

    .whatsapp-input input:focus {
        outline: none;
        box-shadow: none;
      }

    .remember-me {
          display: flex;
          align-items: center;
          gap: 0.5rem;
          margin: 0.5rem 0;
        }

    .remember-me input[type="checkbox"] {
      width: 1rem;
      height: 1rem;
    }

    .forgot-password {
      text-align: right;
      margin-top: 0.5rem;
    }

    .forgot-password a {
      color: var(--primary);
      text-decoration: none;
      font-size: 0.9rem;
    }

    .forgot-password a:hover {
      text-decoration: underline;
    }

    .reset-password-form {
      display: none;
    }

    .password-strength {
    margin-top: 5px;
  }

    .password-strength-meter {
      height: 6px;
      width: 100%;
      background: #ddd;
      border-radius: 4px;
      overflow: hidden;
    }

    #passwordStrengthText {
    font-size: 0.85em;
    margin-top: 3px;
  }



/* ======================== HERO SECTION ======================== */
    .main-content {
          padding: 1rem;
          margin-top: 4rem;
          max-width: 1200px;
          margin-left: auto;
          margin-right: auto;
        }

    .hero-section {
      
      min-height: 200px;
      border-radius: 20px;
      overflow: hidden;
      margin-bottom: 2rem;
      box-shadow: var(--shadow-lg);
      display: flex;
      flex-direction: column;
    }

    .hero-image-container {
      flex: 1;
      position: relative;
      min-height: 200px;
    }

    .hero-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 1s ease;
      
    }

   .hero-overlay {
      position: absolute;
      inset: 0;
    
    }


   .hero-content {
      padding: 2.5rem 2.75rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 1rem;
      background: linear-gradient(
        135deg,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.85)
      );
      backdrop-filter: blur(8px);
    }


   .hero-title {
      font-size: clamp(1.9rem, 2.4vw, 2.6rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.15;
      color: var(--text);
      max-width: 520px;
    }


   .hero-description {
      font-size: 1.05rem;
      line-height: 1.6;
      color: var(--text-light);
      max-width: 480px;
    }


  .hero-cta {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: fit-content;
      margin-top: 0.5rem;
      padding: 0.9rem 1.75rem;
      border:1px dotted rgb(37, 3, 72);;
      border-radius: 14px;
      font-size: 1rem;
      font-weight: 600;
      background: white;
      color: #130548;
      text-decoration: none;
      box-shadow: 0 10px 24px rgba(0,0,0,0.15);
      transition: all 0.25s ease;
    }

  .hero-cta:hover {
      transform: translateY(-3px);
      box-shadow: 0 14px 32px rgba(0,0,0,0.2);
      background: rgb(37, 3, 72);
      color: #f6f5f9;
    }

  header {
      text-align: center;
      margin-bottom: 2rem;
    }

  header h1 {
      color: var(--primary);
      font-size: 2.2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

  header p {
      font-size: 1.1rem;
      color: var(--text-light);
      font-weight: 500;
    }

     @media (min-width: 768px) {
      .courses {
        grid-template-columns: repeat(2, 1fr);
      }

      .hero-section {
        flex-direction: row;
        min-height: 200px;
      }

      .hero-image-container {
        flex: 1.2;
        min-height: auto;
      }

      .hero-content {
        flex: 1;
        padding: 2rem;
      }

      .hero-title {
        font-size: 2rem;
      }
    }
 
  .hero-stats {
    margin-top: 1.25rem;
    display: flex;
    gap: 2rem;
  }

  .stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

    @media (min-width: 768px) {
      .hero-stats {
        grid-template-columns: repeat(5, 1fr);
      }
}


/* ======================== COURSE CARDS ======================== */
    .section-title {
      font-size: 1.3rem;
      font-weight: 600;
      margin: 1.5rem 0 1rem;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 0.5rem;
     }

    .courses-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 1.5rem;
      padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    }

    .course-card {
      background: var(--card-bg);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
      transition: all 0.3s ease;
      border: 1px solid #e2e8f0;
      display: flex;
      flex-direction: column;
    }

    .course-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow-lg);
    }


    .course-image {
      width: 100%;
      height: 160px;
      object-fit: cover;
      border-bottom: 1px solid #e2e8f0;
    }

    .course-content {
      padding: 1.2rem;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .course-title {
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: var(--text);
    }

    .course-description {
      color: var(--text-light);
      font-size: 0.9rem;
      margin-bottom: 1rem;
    }

    .course-meta {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--text-light);
      font-size: 0.85rem;
      margin-top: auto;
    }

    .course-price {
      font-size: 1.2rem;
      font-weight: 600;
      color: var(--primary);
      margin: 0.5rem 0;
    }

    .course-price .currency {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text-light);
    }

    .course-price .period {
      font-size: 0.8rem;
      color: var(--text-light);
      font-weight: normal;
    }

    .small-btn {
      margin-top: 0.8rem;
      padding: 0.6rem 1rem;
      font-size: 0.9rem;
      background-color: var(--primary);
      color: white;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      display: block;
      transition: all 0.3s ease;
      font-weight: 500;
      width: 100%;
      text-align: center;
    }

    .small-btn:hover {
      background-color: var(--primary-dark);
      transform: translateY(-1px);
    }

    .small-btn.coming-soon {
      background-color: var(--text-light);
      cursor: not-allowed;
      opacity: 0.8;
    }


    /* ======================== VIEW ALL COURSES ======================== */

    .course-card.hidden {
      display: none;
    }

    .view-all-wrapper {
      text-align: center;
      margin: 1rem 0 2.5rem;
    }

    .view-all-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 1rem auto;
      padding: 0.75rem 1rem;
      font-weight: 600;
      border: 1px dashed #4f46e5;
      color: #4f46e5;
      border-radius: 8px;
      background: #eef2ff;
      cursor: pointer;
      transition: background 0.2s;
    }

    .view-all-btn:hover {
      opacity: 0.75;
      transform: translateX(4px);
    }


  .payment-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border-left: 5px solid #e5e7eb;
}

.payment-card.pending {
  border-left-color: #f59e0b;
}

.payment-card.completed {
  border-left-color: #10b981;
}

.payment-card.rejected {
  border-left-color: #ef4444;
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.payment-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #111827;
}

.payment-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-completed {
  background: #dcfce7;
  color: #166534;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

.payment-details {
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.payment-actions {
  display: flex;
  gap: 0.5rem;
}

.payment-actions button {
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.verify-btn {
  background: #10b981;
  color: white;
}

.reject-btn {
  background: #ef4444;
  color: white;
}

.verify-btn:hover {
  background: #059669;
}

.reject-btn:hover {
  background: #dc2626;
}

 
    /* ======================== TEACHER CARD ======================== */

.teachers-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top:4rem;
}


.teacher-card {
   background: linear-gradient(
        135deg,
        rgba(255,255,255,0.95),
        rgba(255,255,255,0.85)
      );
      backdrop-filter: blur(8px);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  position: relative;
  padding-top: 120px;

}

.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.teacher-inner {
  padding: 1rem 1.5rem 2rem;

}

.teacher-inner img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--primary);
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.teacher-inner img:hover {
  transform: translateX(-50%) scale(1.05);
}

.teacher-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.teacher-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.teacher-socials {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.teacher-socials li a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  transition: all 0.25s ease;
}

.teacher-socials li a svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.teacher-socials li a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}


.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

.badge-success {
  background: #16a34a;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.payment-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.verified-info {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.7rem;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.pending {
  background: #fde68a;
  color: #92400e;
}

.badge.approved {
  background: #bfdbfe;
  color: #1e40af;
}

.badge.paid {
  background: #bbf7d0;
  color: #065f46;
}



/* ======================== EVENTS AND PROMOTIONS ======================== */

.events-grid, .promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
}

.event-card, .promotion-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.event-card:hover, .promotion-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.event-date, .promotion-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-title, .promotion-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.event-description, .promotion-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.event-link, .promotion-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background-color: var(--primary);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.event-link:hover, .promotion-link:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}



.library-btn {
  position: fixed;
  bottom: 90px; /* Stacked above chatbot */
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;

  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;

  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 2000;
}

.library-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(79, 70, 229, 0.45);
}

.library-btn .icon-wrap {
  background: rgba(255,255,255,0.2);
  padding: 6px;
  border-radius: 50%;
  display: flex;
}

.library-btn .label {
  white-space: nowrap;
}


/* ======================== CONTACT PAGE ======================== */

.contact-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.contact-info, .contact-form {
  margin-bottom: 2rem;
}

.contact-info h2, .contact-form h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: var(--text-light);
  margin: 0;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.contact-form input, .contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    }

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ======================== FOOTER ======================== */
   .footer {
      background-color: var(--card-bg);
      border-top: 1px solid #e2e8f0;
      padding: 2rem 1rem;
      margin-top: 4rem;
    }

    .footer-content {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 1.5rem;
    }

    @media (min-width: 768px) {
      .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        flex-wrap: wrap;
      }

      .footer-links {
        flex-direction: row;
        gap: 2rem;
      }

      .footer-bottom {
        width: 100%;
        text-align: center;
      }
    }

    .footer-logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: var(--primary);
      font-size: 1.5rem;
      font-weight: 700;
      text-decoration: none;
    }

    .footer-logo svg {
      width: 1.8rem;
      height: 1.8rem;
      fill: currentColor;
    }

    .footer-links {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin: 1rem 0;
    }

    .footer-links a {
      color: var(--text-light);
      text-decoration: none;
      font-size: 0.9rem;
      transition: color 0.3s ease;
    }

    .footer-links a:hover {
      color: var(--primary);
    }

    .footer-apps {
      display: flex;
      gap: 1rem;
      justify-content: center;
      margin: 0.5rem 0;
      flex-wrap: wrap;
    }

    .app-btn img {
      height: 45px;
      width: auto;
      border-radius: 8px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .app-btn:hover img {
      transform: translateY(-3px);
      box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    .footer-social {
      display: flex;
      gap: 1rem;
    }

    .social-link {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      border-radius: 50%;
      background-color: var(--background);
      color: var(--text);
      transition: all 0.3s ease;
    }

    .social-link:hover {
      background-color: var(--primary);
      color: white;
      transform: translateY(-2px);
    }

    .social-link svg {
      width: 1.2rem;
      height: 1.2rem;
      fill: currentColor;
    }

    .footer-bottom {
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid #e2e8f0;
      color: var(--text-light);
      font-size: 0.9rem;
    }

  /* === Modal Overlay === */
    .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 50;
    }

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* === Modal Box === */
.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.35s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #111827;
}
/* === Toast Notification === */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4f46e5;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.referrals-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.referrals-table th, .referrals-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.referrals-table th {
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
}

/* ================================
   Modern Chatbot Styles (Global)
   ================================ */

/* Chat Window */
.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 360px;
  max-width: 90vw;
  height: 480px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popup 0.25s ease;
  z-index: 2001;
}
@keyframes popup {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.chatbot-header {
  background: #4f46e5;
  color: white;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header small {
  font-size: 12px;
  opacity: 0.7;
}

.chatbot-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
}

/* Personality Selector */
.chatbot-personality {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px;
}

.persona-btn {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  color: #374151;
}

.persona-btn.active {
  background: #e0e7ff;
  color: #3730a3;
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f9f9fb;
}

/* Message Bubbles */
.chatbot-message {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}

.chatbot-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: bubbleIn 0.2s ease;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot-message.user .chatbot-bubble {
  background: #4f46e5;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.chatbot-message.ai .chatbot-bubble {
  background: #e9e8ff;
  color: #222;
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  background: #4f46e5;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}
.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* ChatGPT-style input bar */
.chatgpt-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* Text input */
.chatgpt-input-wrapper input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 999px;
  background: #f9fafb;
  color: #111827;
}

.chatgpt-input-wrapper input::placeholder {
  color: #9ca3af;
}

/* Icons */
.chatgpt-icon {
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.chatgpt-icon:hover {
  background: #f3f4f6;
}

/* Send button */
.chatgpt-send {
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chatgpt-send:hover {
  background: #4338ca;
}

.chatbot-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border: none;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2000; /* Increased to ensure it's on top */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.45);
}

.library-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.library-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

@media (max-width: 600px) {
  .chatbot-window {
    right: 8px;
    width: 85vw;
    height: 55vh;
    bottom: 60px;
  }

}


