/* ===================================
   CENTRALIZED CSS
   =================================== */

/* ===================================
   1. ROOT VARIABLES & GLOBAL STYLES
   =================================== */
:root {
  /* App.html variables */
  --primary-color: #272C48;
  --primary-color-dark: #1a1f33;
  --primary-gradient: linear-gradient(45deg, #272C48, #667eea);
  --accent-color: #667eea;
  --secondary-color-light: #f8f9ff;
  --secondary-color-dark: #1a1f2e;
  
  --content-bg-light: #ffffff;
  --content-bg-dark: #2d3748;
  --sidebar-bg-light: #f8f9ff;
  --sidebar-bg-dark: #1f2937;
  --sidebar-text-light: #333;
  --sidebar-text-dark: #e2e8f0;
  --sidebar-hover-bg-light: #e8ecff;
  --sidebar-hover-bg-dark: #374151;
  
  --text-color-light: #333;
  --text-color-dark: #e2e8f0;
  --text-muted-light: #666;
  --text-muted-dark: #a0aec0;
  
  --border-color-light: #e0e7ff;
  --border-color-dark: #4a5568;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --box-shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.4);
  
  --header-height: 85px;
  --footer-height: 60px;
  --sidebar-width: 280px;
  --base-font-size: 16px;
  --border-radius: 10px;
  --transition-speed: 0.3s;

  --webchat-input-bg-light: #f8f9ff;
  --webchat-input-bg-dark: #3b475c;
  --webchat-input-text-light: var(--text-color-light);
  --webchat-input-text-dark: var(--text-color-dark);
  --webchat-input-border-light: #e0e7ff;
  --webchat-input-border-dark: #5a6981;

  --bg-color: #f5f7fa;
  --content-bg-color: var(--content-bg-light);
  --text-color: var(--text-color-light);
  --text-muted-color: var(--text-muted-light);
  --border-color: var(--border-color-light);
  --sidebar-bg: var(--sidebar-bg-light);
  --sidebar-text: var(--sidebar-text-light);
  --sidebar-hover-bg: var(--sidebar-hover-bg-light);
  --shadow-color: var(--box-shadow);
  --webchat-bot-bubble-bg: linear-gradient(145deg, #f8f9ff, #e8ecff);
  --webchat-bot-bubble-text: var(--text-color-light);
  --webchat-user-bubble-bg: linear-gradient(145deg, #f8f9ff, #e8ecff);
  --webchat-user-bubble-text: var(--text-color-light);
  --webchat-sendbox-bg: #f8f9ff;
  --webchat-input-bg: var(--webchat-input-bg-light);
  --webchat-input-text: var(--webchat-input-text-light);
  --webchat-input-border: var(--webchat-input-border-light);
}

.dark-mode {
  --bg-color: #0f1419;
  --content-bg-color: var(--content-bg-dark);
  --text-color: var(--text-color-dark);
  --text-muted-color: var(--text-muted-dark);
  --border-color: var(--border-color-dark);
  --sidebar-bg: var(--sidebar-bg-dark);
  --sidebar-text: var(--sidebar-text-dark);
  --sidebar-hover-bg: var(--sidebar-hover-bg-dark);
  --shadow-color: var(--box-shadow-dark);
  --webchat-bot-bubble-bg: #374151;
  --webchat-bot-bubble-text: var(--text-color-dark);
  --webchat-user-bubble-bg: #374151;
  --webchat-user-bubble-text: var(--text-color-dark);
  --webchat-sendbox-bg: var(--content-bg-dark);
  --webchat-input-bg: var(--webchat-input-bg-dark);
  --webchat-input-text: var(--webchat-input-text-dark);
  --webchat-input-border: var(--webchat-input-border-dark);
}

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

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

html { 
  font-size: var(--base-font-size); 
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #272C48;
}

/* ===================================
   2. LANDING PAGE STYLES (index.html)
   =================================== */
.landing-body {
 /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Landing Page Header */
.landing-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  height: 100px;
  display: flex;
  align-items: center;
}

.landing-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container img {
  height: 80px;
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
}

.logo-container span {
  font-size: 2rem;
  font-weight: 700;
  background: #272C48 /*linear-gradient(45deg, #667eea, #764ba2)*/;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #667eea;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #667eea;
}

.cta-button {
  background: #F89A3A /*linear-gradient(45deg, #667eea, #764ba2)*/;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s linear infinite;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  background: #272C48;
  color: white;
  padding: 12px 24px;
  border: 2px solid #F89A3A;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #F89A3A;
  color: #fff;
}

.hero-robot-icon {
  margin-top: 2rem;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
  animation: float-gentle 3s ease-in-out infinite;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Testimonials */
.hero-testimonials {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial-container {
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.testimonial {
  text-align: center;
  opacity: 0;
  position: absolute;
  transform: translateX(30px);
  transition: all 0.5s ease;
  width: 100%;
}

.testimonial.active {
  opacity: 0.9;
  transform: translateX(0);
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.testimonial-author {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.testimonial-arrow {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-size: 1rem;
}

.testimonial-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.testimonial-arrow:active {
  transform: scale(0.95);
}

/* Features Section */
.features {
  padding: 5rem 0;
  background: white;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 15px;
  background: /*linear-gradient(145deg, #f8f9ff, #e8ecff)*/;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  color: #F89A3A;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Pricing Section */
.pricing {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: white;
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(45deg, #667eea, #764ba2);
}


.pricing-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background:#F89A3A/*linear-gradient(45deg, #667eea, #764ba2)*/;
        }


        .pricing-card:nth-of-type(1):before {
            background:#cc3399/*linear-gradient(45deg, #667eea, #764ba2)*/;
        }

        .pricing-card:nth-of-type(2):before {
            background:#1495c8/*linear-gradient(45deg, #667eea, #764ba2)*/;
        }


        .pricing-card:nth-of-type(3):before {
            background:#F89A3A/*linear-gradient(45deg, #667eea, #764ba2)*/;
        }



       .pricing-card:nth-of-type(1) .pricing-cta {
            background: #cc3399 /*linear-gradient(45deg, #667eea, #764ba2)*/;
        }

        .pricing-card:nth-of-type(2) .pricing-cta {
            background: #1495c8 /*linear-gradient(45deg, #667eea, #764ba2)*/;
        }


        .pricing-card:nth-of-type(3) .pricing-cta {
            background: #F89A3A /*linear-gradient(45deg, #667eea, #764ba2)*/;
        }
        
        

.pricing-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #27ae60;
  color: white;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 15px;
  font-weight: 600;
  text-transform: uppercase;
}

.pricing-badge.save {
  background: #e74c3c;
}

.pricing-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #333;
}

.price {
  font-size: 3rem;
  font-weight: bold;
  color: #667eea;
  margin: 1rem 0;
}

.price-period {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.pricing-features {
  list-style: none;
  margin: 2rem 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: #666;
}

.pricing-features li::before {
  content: '✓';
  color: #4CAF50;
  font-weight: bold;
  margin-right: 10px;
}

.pricing-cta {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
  margin-top: 1rem;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.pricing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.pricing-cta.trial {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.pricing-cta.trial:hover {
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.pricing-note {
  color: #666;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Enhanced Footer */
footer {
  background: #050547;
  color: white;
  padding: 3rem 0 2rem 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  height: 90px;
  margin-bottom: 1.5rem;
}

.footer-description {
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-copyright {
  color: #ffffff;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #667eea;
}

.footer-social-title {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  color: #050547;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.footer-social-link:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.footer-contact {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact a {
  color: #667eea;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* ===================================
   3. APP STYLES (tia.html)
   =================================== */
.app-body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  background-color: var(--bg-color); 
  color: var(--text-color); 
  display: flex; 
  height: 100vh; 
  overflow: hidden; 
  transition: background-color var(--transition-speed), color var(--transition-speed); 
}

.sidebar { 
  width: var(--sidebar-width); 
  height: 100vh; 
  background: var(--sidebar-bg); 
  color: var(--sidebar-text); 
  display: flex; 
  flex-direction: column; 
  flex-shrink: 0; 
  position: fixed; 
  top: 0; 
  left: 0; 
  transform: translateX(calc(-1 * var(--sidebar-width))); 
  z-index: 1001; 
  transition: transform var(--transition-speed) ease-in-out, background-color var(--transition-speed), color var(--transition-speed); 
  overflow-y: auto; 
  padding-top: var(--header-height); 
  box-shadow: 3px 0 20px rgba(0, 0, 0, 0.1);
  border-right: 1px solid var(--border-color);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.sidebar.open { 
  transform: translateX(0); 
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 10px;
}

.sidebar-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

/* Dark mode sidebar header */
.dark-mode .sidebar-header h3 {
  color: #8b9fff;
  text-shadow: 0 0 10px rgba(139, 159, 255, 0.3);
}

.sidebar-no-chats-message { 
  padding: 30px 20px; 
  text-align: center; 
  color: var(--text-muted-color); 
  font-style: italic;
  font-size: 0.9rem;
}

.chat-tab { 
  position: relative; 
  display: flex; 
  align-items: center; 
  margin: 0 10px 5px 10px;
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-speed);
}

.chat-tab:hover {
  background-color: var(--sidebar-hover-bg);
}

.chat-tab button { 
  background: none; 
  color: var(--sidebar-text); 
  border: none; 
  padding: 14px 16px; 
  text-align: left; 
  font-size: 0.9rem; 
  font-weight: 400; 
  cursor: pointer; 
  width: 100%; 
  transition: all var(--transition-speed); 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.chat-tab button.active { 
  background: var(--primary-gradient);
  color: white;
  font-weight: 500;
  border-radius: 8px;
}

.chat-tab button:hover, .chat-tab button:focus { 
  outline: none; 
}

.delete-chat { 
  position: absolute; 
  right: 10px; 
  top: 50%; 
  transform: translateY(-50%); 
  cursor: pointer; 
  display: none; 
  font-size: 0.9rem; 
  color: var(--text-muted-color); 
  transition: color var(--transition-speed); 
  padding: 8px;
  background: var(--content-bg-color);
  border-radius: 6px;
}

.chat-tab:hover .delete-chat { 
  display: block; 
}

.delete-chat:hover { 
  color: #e74c3c; 
  background: #ffe0e0;
}

body.dark-mode .delete-chat:hover {
  background: rgba(231, 76, 60, 0.2);
}

.load-more-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 10px 10px 20px 10px;
  padding: 12px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  text-align: center;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.chat-container { 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column; 
  height: 100vh; 
  width: 100%; 
  position: relative; 
  transition: margin-left var(--transition-speed) ease-in-out, filter var(--transition-speed); 
  margin-left: 0; 
}

.chat-container.disabled { 
  filter: blur(5px); 
  pointer-events: none; 
  user-select: none; 
}

.sidebar.open ~ .chat-container { 
  margin-left: var(--sidebar-width); 
  width: calc(100% - var(--sidebar-width)); 
}

header.chat-header { 
  height: var(--header-height); 
  background: var(--content-bg-color); 
  display: grid; 
  grid-template-columns: auto auto 1fr auto; 
  align-items: center; 
  padding: 0 30px; 
  border-bottom: 1px solid var(--border-color); 
  flex-shrink: 0; 
  position: relative; 
  z-index: 10; 
  transition: background-color var(--transition-speed), border-color var(--transition-speed); 
  gap: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.toggle-sidebar-btn { 
  background: var(--primary-gradient);
  border: none; 
  color: white; 
  font-size: 1.3rem; 
  cursor: pointer; 
  padding: 10px;
  border-radius: 8px;
  z-index: 1002; 
  transition: all var(--transition-speed); 
  grid-column: 1 / 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-sidebar-btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chat-header a.header-logo-link { 
  display: flex; 
  align-items: center; 
  line-height: 0; 
  grid-column: 2 / 3; 
  height: 100%; 
}

.chat-header .logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header .logo-container img {
  height: 55px;
  width: auto;
}

.chat-header .logo-container i {
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chat-header .logo-container span {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(45deg, #272C48, #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dark mode specific header styles */
.dark-mode .chat-header .logo-container span {
  background: linear-gradient(45deg, #8b9fff, #b3c1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(139, 159, 255, 0.6));
  animation: glow-text 3s ease-in-out infinite alternate;
}

@keyframes glow-text {
  0% {
    filter: drop-shadow(0 0 10px rgba(139, 159, 255, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 20px rgba(139, 159, 255, 0.9));
  }
}

.dark-mode .chat-header .logo-container img {
  filter: drop-shadow(0 0 12px rgba(139, 159, 255, 0.5)) drop-shadow(0 0 25px rgba(179, 193, 255, 0.4));
  animation: glow-img 3s ease-in-out infinite alternate;
}

@keyframes glow-img {
  0% {
    filter: drop-shadow(0 0 12px rgba(139, 159, 255, 0.5)) drop-shadow(0 0 25px rgba(179, 193, 255, 0.4));
  }
  100% {
    filter: drop-shadow(0 0 20px rgba(139, 159, 255, 0.7)) drop-shadow(0 0 35px rgba(179, 193, 255, 0.6));
  }
}

.login-container { 
  display: flex; 
  align-items: center; 
  gap: 15px; 
  grid-column: 4 / 5; 
  justify-self: end; 
}

#dashboardBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
  background: #229954;
}

#user-status { 
  font-size: 0.9rem; 
  color: var(--text-muted-color); 
  transition: color var(--transition-speed); 
  text-align: right;
  line-height: 1.4;
}

#user-status small {
  font-size: 0.8rem;
  opacity: 0.8;
}

#authBtn { 
  padding: 10px 20px; 
  background: var(--primary-gradient); 
  color: white; 
  border: none; 
  border-radius: 25px; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 0.9rem; 
  transition: all var(--transition-speed); 
}

#authBtn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Dark mode auth button */
.dark-mode #authBtn {
  background: linear-gradient(45deg, #667eea, #8b9fff);
}

.dark-mode #authBtn:hover {
  box-shadow: 0 4px 12px rgba(139, 159, 255, 0.5);
}

main#webchat { 
  flex-grow: 1; 
  overflow-y: auto; 
  display: flex; 
  flex-direction: column; 
  position: relative; 
  background-color: var(--content-bg-color); 
  padding: 20px; 
  transition: background-color var(--transition-speed); 
}

#webchat > div { 
  min-height: 100%; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
}

/* Webchat Styles */
.webchat__bubble { 
  border-radius: 18px; 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); 
  max-width: 75%; 
  border: none;
  margin-bottom: 16px;
  transition: transform var(--transition-speed);
  animation: fadeInUp 0.3s ease-out;
}

.webchat__bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.webchat__bubble__content { 
  white-space: pre-wrap; 
  padding: 14px 18px !important; 
  font-size: 0.95rem; 
  line-height: 1.6; 
  background-color: transparent !important; 
  border: none !important; 
  margin: 0; 
}

.webchat__bubble__content p { 
  margin: 0 0 0.6em 0; 
  padding: 0; 
  background-color: transparent !important; 
  color: inherit; 
}

.webchat__bubble__content p:last-child { 
  margin-bottom: 0; 
}

.webchat__bubble__content a { 
  color: #667eea; 
  text-decoration: underline; 
  word-break: break-all; 
}

.webchat__bubble__content a:hover { 
  color: #764ba2; 
}

body.dark-mode .webchat__bubble__content a { 
  color: #a5b4fc; 
}

body.dark-mode .webchat__bubble__content a:hover { 
  color: #c7d2fe; 
}

.webchat__bubble:not(.webchat__bubble--from-user) { 
  background: var(--webchat-bot-bubble-bg) !important; 
  color: var(--webchat-bot-bubble-text) !important; 
  align-self: flex-start; 
  transition: background-color var(--transition-speed), color var(--transition-speed); 
  border: 1px solid var(--border-color);
}

.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content, 
.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content p { 
  color: var(--webchat-bot-bubble-text) !important; 
}

.webchat__bubble--from-user { 
  background: var(--webchat-user-bubble-bg) !important; 
  color: var(--webchat-user-bubble-text) !important; 
  align-self: flex-end; 
  transition: background-color var(--transition-speed), color var(--transition-speed); 
  border: 1px solid var(--border-color);
}

.webchat__bubble--from-user .webchat__bubble__content, 
.webchat__bubble--from-user .webchat__bubble__content p, 
.webchat__bubble--from-user .webchat__bubble__content span { 
  color: var(--webchat-user-bubble-text) !important; 
  background-color: transparent !important; 
}

.webchat__send-box { 
  border-top: 1px solid var(--border-color); 
  padding: 15px 20px !important; 
  min-height: 70px !important; 
  max-height: 150px !important; 
  background-color: var(--webchat-sendbox-bg); 
  transition: background-color var(--transition-speed), border-color var(--transition-speed); 
}

.webchat__send-box-text-box { 
  align-items: center; 
}

.webchat__send-box-text-box__textarea { 
  min-height: 44px !important; 
  max-height: 120px !important; 
  border-radius: 25px !important; 
  border: 2px solid var(--webchat-input-border) !important; 
  padding: 10px 20px !important; 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important; 
  font-size: 0.95rem !important; 
  line-height: 1.5 !important; 
  white-space: pre-wrap !important; 
  resize: none; 
  background-color: var(--webchat-input-bg); 
  color: var(--webchat-input-text); 
  transition: all var(--transition-speed); 
}

.webchat__send-box-text-box__textarea:focus { 
  border-color: var(--primary-color) !important; 
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important; 
  outline: none;
}

.webchat__send-box__send-button { 
  background: var(--primary-gradient) !important; 
  border-radius: 50% !important; 
  width: 44px !important; 
  height: 44px !important; 
  padding: 0 !important; 
  margin-left: 12px !important; 
  transition: all var(--transition-speed) !important; 
  flex-shrink: 0; 
  align-self: flex-end !important; 
  margin-bottom: 0 !important;
  border: none !important;
}

.webchat__send-box__send-button:hover { 
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.webchat__send-box__send-button svg { 
  fill: white !important; 
}

footer.chat-footer {
  height: var(--footer-height);
  background: var(--content-bg-color);
  border-top: 1px solid var(--border-color);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
  flex-shrink: 0;
  z-index: 10;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

footer.chat-footer.show {
  display: flex;
}

.footer-btn { 
  padding: 10px 20px; 
  font-size: 0.9rem; 
  font-weight: 500; 
  background: transparent; 
  color: var(--primary-color); 
  border: 2px solid var(--primary-color); 
  border-radius: 25px; 
  cursor: pointer; 
  transition: all var(--transition-speed); 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
}

.footer-btn:hover { 
  background: var(--primary-gradient); 
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.footer-btn:focus { 
  outline: 2px solid var(--primary-color); 
  outline-offset: 2px; 
}

/* Dark mode footer button styles */
.dark-mode .footer-btn {
  color: #8b9fff;
  border-color: rgba(139, 159, 255, 0.3);
}

.dark-mode .footer-btn:hover {
  background: linear-gradient(45deg, #667eea, #8b9fff);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 159, 255, 0.4);
}

.dark-mode-btn, .change-font-btn { 
  padding: 10px 12px; 
  font-size: 1.1rem; 
}

body.dark-mode .webchat__basic-transcript, 
body.dark-mode main#webchat > div[id^='webchat_'] { 
  background-color: var(--content-bg-color) !important; 
}

/* Overlays and Modals */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.show,
.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-content,
.loading-modal {
  background: var(--content-bg-color);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 300px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-color);
  font-weight: 500;
  margin: 0;
}

/* Account Status Overlay */
.account-status-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  z-index: 2001; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  opacity: 0; 
  visibility: hidden; 
  transition: opacity 0.3s ease, visibility 0s 0.3s; 
}

.account-status-overlay.visible { 
  opacity: 1; 
  visibility: visible; 
  transition: opacity 0.3s ease; 
}

.account-status-modal { 
  background: var(--content-bg-color); 
  color: var(--text-color); 
  border-radius: 20px; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); 
  width: 90%; 
  max-width: 500px; 
  padding: 40px; 
  text-align: center; 
  transform: scale(0.95); 
  transition: transform 0.3s ease, background-color var(--transition-speed), color var(--transition-speed); 
  position: relative;
  overflow: hidden;
}

.account-status-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.account-status-overlay.visible .account-status-modal { 
  transform: scale(1); 
}

.account-status-modal h2 { 
  font-size: 1.8rem; 
  font-weight: 700; 
  color: #e74c3c;
  margin-bottom: 20px; 
}

.account-status-modal .status-icon {
  font-size: 4rem;
  color: #e74c3c;
  margin-bottom: 20px;
}

.account-status-modal .status-message { 
  font-size: 1.1rem; 
  color: var(--text-color); 
  margin-bottom: 30px;
  line-height: 1.6;
}

.account-status-modal .contact-info {
  background: var(--secondary-color-light);
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}

body.dark-mode .account-status-modal .contact-info {
  background: var(--secondary-color-dark);
}

.contact-info h4 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.contact-info p {
  margin: 5px 0;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* Subscription Overlay */
.subscription-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  z-index: 2000; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  opacity: 0; 
  visibility: hidden; 
  transition: opacity 0.3s ease, visibility 0s 0.3s; 
}

.subscription-overlay.visible { 
  opacity: 1; 
  visibility: visible; 
  transition: opacity 0.3s ease; 
}

.subscription-modal { 
  background: var(--content-bg-color); 
  color: var(--text-color); 
  border-radius: 20px; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); 
  width: 90%; 
  max-width: 500px; 
  padding: 40px; 
  text-align: center; 
  transform: scale(0.95); 
  transition: transform 0.3s ease, background-color var(--transition-speed), color var(--transition-speed); 
  position: relative;
  overflow: hidden;
}

.subscription-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary-gradient);
}

.subscription-modal .sign-out-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: 1px solid var(--text-muted-color);
  color: var(--text-muted-color);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.subscription-modal .sign-out-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.subscription-overlay.visible .subscription-modal { 
  transform: scale(1); 
}

.subscription-modal h2 { 
  font-size: 2rem; 
  font-weight: 700; 
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px; 
}

.subscription-modal .price { 
  font-size: 3rem; 
  font-weight: 700; 
  color: var(--primary-color);
  margin-bottom: 5px; 
}

.subscription-modal .price-desc { 
  font-size: 1rem; 
  color: var(--text-muted-color); 
  margin-bottom: 30px; 
}

.subscription-modal .features-list { 
  list-style: none; 
  padding: 0; 
  margin: 0 0 35px 0; 
  text-align: left; 
}

.subscription-modal .features-list li { 
  font-size: 1rem; 
  margin-bottom: 15px; 
  display: flex; 
  align-items: center; 
}

.subscription-modal .features-list i { 
  color: #4CAF50; 
  margin-right: 12px; 
  font-size: 1.2rem; 
}

.subscription-modal .modal-button { 
  display: block; 
  width: 100%; 
  padding: 16px 24px; 
  font-size: 1rem; 
  font-weight: 600; 
  border-radius: 30px; 
  cursor: pointer; 
  text-decoration: none; 
  transition: all 0.3s ease; 
  margin-bottom: 12px; 
  border: none; 
}

.modal-button.primary { 
  background: var(--primary-gradient); 
  color: white; 
}

.modal-button.primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3); 
}

.modal-button.secondary { 
  background-color: transparent; 
  color: var(--primary-color); 
  border: 2px solid var(--primary-color); 
}

.modal-button.secondary:hover { 
  background: var(--primary-gradient); 
  color: white;
  border-color: transparent;
}

#subscription-status { 
  margin-top: 20px; 
  color: var(--text-muted-color); 
  font-size: 0.9rem; 
  min-height: 1.2em; 
}

/* Error Overlay */
.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2002;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.error-overlay.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.error-modal {
  background: var(--content-bg-color);
  color: var(--text-color);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease, background-color var(--transition-speed), color var(--transition-speed);
  max-width: 400px;
  width: 90%;
}

.error-overlay.visible .error-modal {
  transform: scale(1);
}

.error-modal h3 {
  color: #e74c3c;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.error-modal p {
  margin-bottom: 25px;
  color: var(--text-muted-color);
}

/* Delete Overlay */
.delete-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2003;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.delete-overlay.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.delete-modal {
  background: var(--content-bg-color);
  color: var(--text-color);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease, background-color var(--transition-speed), color var(--transition-speed);
  max-width: 400px;
  width: 90%;
}

.delete-overlay.visible .delete-modal {
  transform: scale(1);
}

.delete-modal h3 {
  color: #e74c3c;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.delete-modal p {
  margin-bottom: 25px;
  color: var(--text-muted-color);
}

.delete-modal .modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.delete-modal .modal-buttons button {
  flex: 1;
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.delete-modal .cancel-btn {
  background: transparent;
  color: var(--text-muted-color);
  border: 2px solid var(--border-color);
}

.delete-modal .cancel-btn:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.delete-modal .confirm-btn {
  background: #e74c3c;
  color: white;
}

.delete-modal .confirm-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Trial Banner */
.trial-banner {
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-weight: 500;
  position: relative;
  z-index: 1001;
  display: none;
}

.trial-banner.show {
  display: block;
}

.trial-banner .days-left {
  font-weight: 700;
  font-size: 1.1rem;
}

.trial-banner .upgrade-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  margin-left: 15px;
  text-decoration: none;
  display: inline-block;
}

.trial-banner .upgrade-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.trial-ending-banner {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.trial-converted-banner {
  background: linear-gradient(45deg, #27ae60, #20c997);
}

/* Scrollbar Styling */
.webchat__basic-transcript::-webkit-scrollbar {
  width: 8px;
}

.webchat__basic-transcript::-webkit-scrollbar-track {
  background: var(--secondary-color-light);
  border-radius: 4px;
}

.webchat__basic-transcript::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.webchat__basic-transcript::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color-dark);
}

body.dark-mode .webchat__basic-transcript::-webkit-scrollbar-track {
  background: var(--secondary-color-dark);
}

body.dark-mode .webchat__basic-transcript::-webkit-scrollbar-thumb {
  background: #667eea;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   4. DASHBOARD STYLES (tia-dashboard.html)
   =================================== */
   
   main.main-content {
    background: #ececee;
}


.dashboard-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  background: #272C48;
  color: white;
  padding: 2rem 0;
}

.logo-section {
  text-align: center;
  padding: 0 1rem 2rem 1rem;
  margin-bottom: 2rem;
}

.logo-section h2 {
  color: #3498db;
  margin-bottom: 0;
}

.org-name {
  font-size: 0.9rem;
  color: #bdc3c7;
}

.nav-menu {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #ecf0f1;
  text-decoration: none;
  transition: background 0.3s;
  cursor: pointer;
}

.nav-link:hover, .nav-link.Active {
  background: #F89A3A;
  border-right: 3px solid #3498db;
}

.nav-link i {
  margin-right: 0.75rem;
  width: 20px;
}

/* Main Content */
.main-content {
  padding: 2rem;
  overflow-y: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e8ed;
}

.page-title {
  font-size: 2rem;
  color: #2c3e50;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3498db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Page Content */
.page-content {
  display: none;
}

.page-content.Active {
  display: block;
}

/* License Card */
.license-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-left: 4px solid #3498db;
}

.license-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.license-usage {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.usage-bar {
  flex: 1;
  height: 8px;
  background: #e1e8ed;
  border-radius: 4px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(45deg, #3498db, #2980b9);
  transition: width 0.3s;
}

.upgrade-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#trialStatusBanner {
  display: none; 
  margin-top: 1rem; 
  padding: 1rem; 
  border-radius: 6px; 
  background: #e3f2fd; 
  color: #1565c0; 
  font-weight: 500;
  border: 1px solid #bbdefb;
}

/* Users Section */
.users-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.invite-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tables */
.users-table,
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.users-table th,
.users-table td,
.invoice-table th,
.invoice-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e1e8ed;
}

.users-table th,
.invoice-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Status and Role Badges */
.status-badge,
.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-Active {
  background: #d4edda;
  color: #155724;
}

.status-trialing {
  background: #e3f2fd;
  color: #1565c0;
}

.status-deactivated {
  background: #f8d7da;
  color: #721c24;
}

.role-badge {
  background: #e3f2fd;
  color: #1565c0;
}

.role-admin {
  background: #fff3e0;
  color: #ef6c00;
}

/* Action Buttons */
.user-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.action-btn:hover {
  background: #f8f9fa;
}

.action-btn.danger {
  color: #dc3545;
  border-color: #dc3545;
}

.action-btn.danger:hover {
  background: #dc3545;
  color: white;
}

.action-btn.success {
  color: #28a745;
  border-color: #28a745;
}

.action-btn.success:hover {
  background: #28a745;
  color: white;
}

.action-btn.primary {
  color: #007bff;
  border-color: #007bff;
}

.action-btn.primary:hover {
  background: #007bff;
  color: white;
}

.action-btn.secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.action-btn.secondary:hover {
  background: #6c757d;
  color: white;
}

.action-btn.disabled,
.action-btn:disabled {
  background: #e9ecef !important;
  color: #6c757d !important;
  border-color: #e9ecef !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.action-btn.disabled:hover,
.action-btn:disabled:hover {
  background: #e9ecef !important;
  color: #6c757d !important;
  transform: none !important;
}

/* Billing Section */
.billing-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.billing-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.plan-card {
  border-left: 4px solid #27ae60;
}

.payment-card {
  border-left: 4px solid #f39c12;
}

.billing-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.plan-features {
  list-style: none;
  margin-top: 1rem;
}

.plan-features li {
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plan-features i {
  color: #27ae60;
  width: 16px;
}

/* Loading and Messages */
.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.success {
  background: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Form Validation */
.form-group {
  position: relative;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input, 
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.validation-message {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.form-errors {
  background-color: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  display: none;
}

.form-errors.show {
  display: block;
}

.form-errors ul {
  margin: 0;
  padding-left: 1.5rem;
}

.form-errors li {
  margin: 0.25rem 0;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  color: #2c3e50;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

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

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-secondary {
  /*background: #95a5a6;*/
  color: white;
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-warning {
  background: #f39c12;
  color: white;
}

.sign-out-btn {
  background: transparent;
  color: #fff;
  border: 1px solid #ddd;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  margin: 1rem; 
}

.sign-out-btn:hover {
  background: #f8f9fa;
  border-color: #999;
}

/* ===================================
   5. JOIN PAGE STYLES (tia-join.html)
   =================================== */
.join-body {
  /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.join-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 500px;
  padding: 40px;
  text-align: center;
}

.join-container .logo-section {
  margin-bottom: 30px;
}

.join-container .logo-section h1 {
  color: #3498db;
  font-size: 2.5rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.join-container .logo-section img {
  height: 40px;
  width: auto;
}

.org-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border-left: 4px solid #3498db;
}

.org-info h3 {
  color: #2c3e50;
  margin-bottom: 10px;
}

.org-info p {
  color: #666;
  font-size: 0.9rem;
}

.join-container .form-group {
  margin-bottom: 20px;
  text-align: left;
  position: relative;
}

.join-container .form-group input.valid {
  border-color: #4CAF50;
  background-color: #f8fff8;
}

.join-container .form-group input.invalid {
  border-color: #f44336;
  background-color: #fff8f8;
}

.join-container .validation-message {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.join-container .validation-message.error {
  color: #f44336;
  display: block;
}

.join-container .validation-message.success {
  color: #4CAF50;
  display: block;
}

.join-container .validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.join-container .validation-icon.valid {
  color: #4CAF50;
}

.join-container .validation-icon.invalid {
  color: #f44336;
}

.join-container .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.join-container .form-group input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.join-container .form-group input:focus {
  outline: none;
  border-color: #3498db;
}

.join-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.join-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.message {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.back-link {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e1e8ed;
}

.back-link a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ===================================
   6. PRICING/SIGNUP STYLES (tia-pricing.html)
   =================================== */
.pricing-page-body {
  /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
  min-height: 100vh;
}

.pricing-main-content {
  margin-top: 120px;
  margin-bottom: 2rem;
}

.signup-container {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.signup-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.signup-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Plan Selection */
.plan-selection {
  background: linear-gradient(145deg, #f8f9ff, #e8ecff);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
}

.plan-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.toggle-switch {
  background: white;
  border-radius: 25px;
  padding: 4px;
  display: flex;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-option {
  padding: 12px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
  position: relative;
  min-width: 150px;
  text-align: center;
}

.toggle-option.active {
  background: #F89A3A /*linear-gradient(45deg, #667eea, #764ba2)*/;
  color: white;
}

.toggle-option:not(.active) {
  color: #666;
}

.toggle-option:not(.active):hover {
  color: #333;
}

.trial-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #27ae60;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.save-badge {
  background: #e74c3c;
}

/* Pricing Display */
.pricing-summary {
  text-align: center;
}

.price-display {
  font-size: 3rem;
  font-weight: bold;
  color: #272C48;
  margin-bottom: 0.5rem;
}

.price-details {
  color: #666;
  margin-bottom: 1rem;
}

.trial-info {
  background: #e8f5e8;
  border: 2px solid #27ae60;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  color: #27ae60;
  font-weight: 500;
  display: none;
}

.trial-info.show {
  display: block;
}

.trial-info i {
  margin-right: 8px;
  font-size: 1.2rem;
}

.license-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.license-input {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.license-input input {
  width: 80px;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
}

.license-input button {
  background: #F89A3A;
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s;
}

.license-input button:hover {
  background: #272C48;
}

/* Form Styles */
.signup-form {
  display: grid;
  gap: 1.5rem;
}

.signup-form .form-group {
  display: grid;
  gap: 0.5rem;
}

.signup-form label {
  font-weight: 600;
  color: #333;
}

.signup-form input[type="text"],
.signup-form input[type="email"],
.signup-form input[type="tel"] {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.signup-form input:focus {
  outline: none;
  border-color: #667eea;
}

.required {
  color: #e74c3c;
}

/* Order Summary */
.order-summary {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.summary-total {
  font-weight: bold;
  font-size: 1.2rem;
  border-top: 2px solid #e0e0e0;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.trial-summary {
  background: #e8f5e8;
  border: 1px solid #27ae60;
  color: #27ae60;
  font-weight: 500;
}

/* Submit Button */
.submit-btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
  margin-top: 1rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-btn.trial {
  background:linear-gradient(45deg, #27ae60, #20c997);
}

.submit-btn.trial:hover {
  box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

/* Alert Messages */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

/* Security Notice */
.security-notice {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.security-notice i {
  color: #4CAF50;
  margin-right: 5px;
}

/* Pricing Form Validation */
.pricing-form .form-group input.valid {
  border-color: #4CAF50;
  background-color: #f8fff8;
}

.pricing-form .form-group input.invalid {
  border-color: #f44336;
  background-color: #fff8f8;
}

.character-count {
  font-size: 0.75rem;
  color: #666;
  text-align: right;
  margin-top: 0.25rem;
}

.character-count.warning {
  color: #ff9800;
}

.character-count.error {
  color: #f44336;
}

.pricing-form .form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pricing-form .form-group input.invalid:focus {
  border-color: #f44336;
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.pricing-form .form-group input.valid:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Validation Progress */
.validation-progress {
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.validation-progress-bar {
  height: 100%;
  background-color: #4CAF50;
  width: 0%;
  transition: width 0.3s ease;
}

.validation-progress-bar.low {
  background-color: #f44336;
}

.validation-progress-bar.medium {
  background-color: #ff9800;
}

.validation-progress-bar.high {
  background-color: #4CAF50;
}

/* License Input Validation */
.license-input input.invalid {
  border-color: #f44336;
}

.license-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.license-warning .fas {
  margin-right: 0.5rem;
}

/* ===================================
   7. PAYMENT SUCCESS STYLES
   =================================== */
.pricing-page-body .main-content {
  padding-top: 120px;
  min-height: calc(100vh - 80px);
}

.success-container {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  text-align: center;
  margin: 0 auto;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #28a745, #20c997);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem auto;
  animation: bounce 1s ease-in-out;
}

.success-icon i {
  font-size: 2.5rem;
  color: white;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.success-title {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 1rem;
}

.success-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.subscription-details {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
}

.detail-row span:last-child {
  font-weight: 600;
}

.detail-row:last-child {
  margin-bottom: 0;
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
  margin-top: 1rem;
  font-weight: bold;
}

.next-steps {
  background: linear-gradient(145deg, #e8f4f8, #d4f4f8);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

.next-steps h3 {
  color: #0066cc;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-steps ul {
  list-style: none;
  padding: 0;
}

.next-steps li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.next-steps li i {
  color: #28a745;
  width: 20px;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.support-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 2rem;
}

.support-info h4 {
  color: #856404;
  margin-bottom: 0.5rem;
}

.support-info p {
  color: #856404;
  margin: 0;
}

/* ===================================
   8. MEDIA QUERIES
   =================================== */
@media (max-width: 768px) {
  /* Landing Page */
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .nav-links {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-testimonials {
    margin-top: 2rem;
    gap: 1rem;
  }

  .testimonial-quote {
    font-size: 1rem;
  }

  .testimonial-arrow {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-logo {
    height: 40px;
  }

  footer {
    padding: 2rem 0 1.5rem 0;
  }

  /* App Styles */
  :root { 
    --sidebar-width: 260px; 
    --header-height: 65px; 
    --footer-height: 55px; 
  }
  
  .sidebar { 
    padding-top: var(--header-height); 
    box-shadow: 5px 0 20px rgba(0,0,0,0.2); 
    z-index: 1010; 
  }
  
  .sidebar.open ~ .chat-container { 
    margin-left: 0; 
    width: 100%; 
  }
  
  header.chat-header { 
    padding: 0 15px; 
    grid-template-columns: auto 1fr auto; 
    gap: 15px; 
  }
  
  .chat-header a.header-logo-link {
    display: none;
  }

  #dashboardBtn {
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-right: 8px;
  }

  #dashboardBtn span {
    display: none;
  }
  
  .chat-header .logo-container {
    grid-column: 2 / 3;
    justify-self: center;
  }
  
  .chat-header .toggle-sidebar-btn { 
    padding: 8px; 
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
  }
  
  .login-container { 
    gap: 10px; 
  }
  
  #user-status { 
    font-size: 0.8rem; 
    max-width: 120px; 
  }
  
  #authBtn { 
    padding: 8px 16px; 
    font-size: 0.85rem; 
  }
  
  footer.chat-footer { 
    padding: 0 15px; 
    gap: 8px; 
  }
  
  .footer-btn { 
    padding: 8px 14px; 
    font-size: 0.85rem; 
    gap: 6px; 
  }
  
  .save-btn span, .new-convo-btn span { 
    display: none; 
  }
  
  .save-btn, .new-convo-btn { 
    padding: 8px 10px; 
  }
  
  .change-font-btn { 
    padding: 8px; 
    font-size: 1rem; 
  }
  
  .dark-mode-btn { 
    padding: 8px; 
    font-size: 1rem; 
  }
  
  main#webchat { 
    padding: 15px; 
  }
  
  .webchat__bubble { 
    max-width: 85%; 
  }
  
  .webchat__bubble__content { 
    font-size: 0.9rem; 
  }
  
  .subscription-modal { 
    padding: 30px 25px; 
    width: 95%; 
  }
  
  .subscription-modal h2 { 
    font-size: 1.6rem; 
  }
  
  .subscription-modal .price { 
    font-size: 2.5rem; 
  }
  
  .subscription-modal .features-list li { 
    font-size: 0.9rem; 
  }

  /* Dashboard */
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    display: none;
  }

  .billing-overview {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Join Page */
  .join-container {
    padding: 30px 20px;
  }
  
  .join-container .logo-section h1 {
    font-size: 2rem;
  }

  /* Pricing Page */
  .pricing-main-content .container { 
    padding: 1rem 10px; 
  }
  
  .signup-container { 
    padding: 2rem 1.5rem; 
  }
  
  .pricing-main-content .form-row { 
    grid-template-columns: 1fr; 
  }
  
  .license-selector { 
    flex-direction: column; 
    gap: 1rem; 
  }
  
  .toggle-switch { 
    flex-direction: column; 
    width: 100%; 
  }
  
  .toggle-option { 
    width: 100%; 
  }

  /* Payment Success */
  .success-container {
    padding: 2rem 1.5rem;
    margin: 10px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }
}