/* GoChatSolution - Premium Analytics Theme */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --surface-100: #ffffff;
  --surface-200: #f1f5f9;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Legacy variables for compatibility */
  --bg: #ffffff;
  --muted: #6b7280;
  --accent1: #6366f1;
  --accent2: #8b5cf6;
  --radius: 14px;
  --max: 1200px;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--surface-200);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
}

/* Header */
.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: transparent;
  padding: 18px 0;
  transition: all 0.18s ease;
  z-index: 80;
}

.site-header.sticky {
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  box-shadow: var(--shadow);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.brand-text {
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

.nav a {
  margin: 0 12px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

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

/* Buttons */
.btn-primary {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(236, 72, 153, 0.12);
}

.btn-outline {
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 10px 14px;
  border-radius: 10px;
  background: white;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  border: 1px dashed rgba(15, 23, 42, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 40px;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
}

.hero-left h1 {
  font-size: 44px;
  line-height: 1.02;
  margin: 0;
  color: #0f172a;
}

.accent {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  margin-top: 12px;
  max-width: 620px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.trust-logos {
  display: flex;
  gap: 10px;
  margin-left: 10px;
}

.trust-pill {
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #eef2f7;
  color: var(--muted);
  font-weight: 600;
}

/* Features */
.features {
  padding: 40px 0;
}

.features h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.features .sub {
  color: var(--muted);
  margin-bottom: 18px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}

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

.feature .icon {
  font-size: 28px;
  margin-bottom: 10px;
}

/* Pricing */
.pricing {
  padding: 40px 0;
}

.pricing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  margin-right: 12px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #eef2f7;
  border-radius: 999px;
  transition: 0.2s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked+.slider {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
}

.switch input:checked+.slider:before {
  transform: translateX(22px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan {
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.plan.featured {
  border: 2px solid rgba(236, 72, 153, 0.08);
  transform: scale(1.02);
}

/* Testimonials */
.testimonials {
  padding: 40px 0;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.testimonial {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--muted);
}

/* Final CTA */
.final-cta {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white;
  padding: 40px;
  border-radius: 12px;
  margin: 30px 0;
  text-align: center;
}

.final-cta h2 {
  margin: 0 0 8px;
}

/* Footer */
.site-footer {
  background: #f8fafc;
  padding: 40px 0;
  border-top: 1px solid #eef2f7;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
}

.brand-foot {
  display: flex;
  gap: 12px;
  align-items: center;
}

.muted {
  color: var(--muted);
}

/* Responsive */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .test-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 16px;
  }

  .hero-left h1 {
    font-size: 28px;
  }

  .container {
    padding: 18px;
  }
}

/* Mockup */
.mockup {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 100%;
  max-width: 450px;
  margin: auto;
  transition: transform 0.3s ease;
}

.mockup:hover {
  transform: translateY(-5px);
}

.mockup-top {
  background: linear-gradient(90deg, #ff9a9e, #fad0c4);
  color: #333;
  font-weight: 600;
  padding: 12px 18px;
  font-size: 1rem;
  border-bottom: 1px solid #eee;
}

.mockup-body {
  display: flex;
  gap: 15px;
  padding: 20px;
}

.mockup-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card.small {
  background: #f9f9f9;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #444;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.card.small:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card.small.muted {
  color: #888;
  font-style: italic;
}

.mockup-right {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.chart-placeholder {
  width: 100%;
  height: 150px;
  border: 2px dashed #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.9rem;
  background: #fafafa;
}

.chart-placeholder span {
  opacity: 0.7;
}

.avatars {
  margin-top: 12px;
}

.avatars img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-right: -10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Auth */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
}

.auth-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-form input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.error {
  color: red;
  margin: 0.5rem 0;
}

/* Dashboard Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface-100);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-left {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-right a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.header-right a:hover {
  color: var(--primary);
}

/* Profile */
.profile {
  position: relative;
  cursor: pointer;
}

.profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--surface-200);
  transition: box-shadow 0.2s;
}

.profile:hover img {
  box-shadow: 0 0 0 2px var(--primary-light);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  background: var(--surface-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1001;
  overflow: hidden;
  animation: slideDown 0.1s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.profile-dropdown a {
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: background 0.1s;
}

.profile-dropdown a:hover {
  background: var(--surface-200);
  color: var(--primary);
}

.profile.open .profile-dropdown {
  display: flex;
}

/* Main Layout */
.main {
  display: flex;
  flex: 1;
  margin-top: 64px;
  height: calc(100vh - 64px);
  background: var(--surface-200);
}

/* Sidebar - Premium Theme */
.sidebar {
  width: 260px;
  background-color: var(--surface-100);
  height: 100%;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Navigation wrapper fills available space */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Credits Widget – pinned to sidebar bottom */
.credits-widget {
  border-top: 1px solid var(--border);
  padding: 18px 16px 16px;
  margin: 8px 0 0;
  background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.03);
}

.credits-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.credits-widget-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary, #475569);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.credits-widget-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary, #0f172a);
}

.credits-widget-bar {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 10px;
}

.credits-widget-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.4s ease;
}

.credits-widget-expiry {
  font-size: 0.72rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 12px;
  line-height: 1.4;
  opacity: 0.85;
}

.credits-widget-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 0;
  border-radius: var(--radius-sm, 8px);
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.credits-widget-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
}


.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-weight: 500;
  font-size: 0.875rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.menu-item:hover {
  background-color: var(--surface-200);
  color: var(--text-primary);
}

.menu-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* Sidebar Dropdown Groups */
.menu-group {
  display: flex;
  flex-direction: column;
}

.dropdown-btn {
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text-secondary);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-btn::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  transition: transform 0.2s;
}

.menu-group.open .dropdown-btn::after {
  transform: rotate(90deg);
}

.dropdown-btn:hover,
.dropdown-btn.active {
  background-color: var(--surface-200);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

/* Submenu */
.submenu {
  display: none;
  flex-direction: column;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  margin-top: 2px;
  margin-bottom: 6px;
}

.menu-group.open .submenu {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.submenu .menu-item {
  font-size: 0.8125rem;
  padding: 8px 14px;
  color: var(--text-secondary);
}

.submenu .menu-item:hover {
  background-color: transparent;
  color: var(--primary);
}

.submenu .menu-item.active {
  color: var(--primary);
  background: transparent;
  font-weight: 500;
}

/* Content */
.content {
  flex: 1;
  padding: 32px 32px 32px 48px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

/* Dashboard Cards */
.card {
  background: var(--surface-100);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 24px;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.card input,
.card button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

.card .input-group input,
.card .input-group button {
  width: auto;
  margin: 0;
  padding: auto;
}
.card .input-group > .form-control {
  padding: 0.25rem 0.5rem; /* Match form-control-sm */
  border-radius: 0.25rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.card .input-group > .btn {
  padding: 0.25rem 0.5rem; /* Match btn-sm */
  border-radius: 0.25rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.card input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.card button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-weight: 600;
}

.card button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Profile Initials Avatar */
.profile-initials {
  width: 40px;
  height: 40px;
  background-color: #6366f1;
  /* Premium Indigo */
  color: white;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.profile-initials:hover {
  background-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Global Flexbox & Layout Utilities */
.flex {
  display: flex !important;
}
.flex-column {
  flex-direction: column !important;
}
.justify-between {
  justify-content: space-between !important;
}
.items-center {
  align-items: center !important;
}
.items-start {
  align-items: flex-start !important;
}
.mt-2 {
  margin-top: 8px !important;
}
.gap-2 {
  gap: 8px !important;
}

/* Custom Tooltip */
.info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.info-icon[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 150%;
  left: 50%; transform: translateX(-50%) translateY(10px);
  background: #1e293b;
  color: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  text-align: left;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.info-icon[data-tooltip]::after { content: ""; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(10px); transform: translateY(10px);
  border-width: 6px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.info-icon[data-tooltip]:hover::before,
.info-icon[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}




.info-icon.align-right[data-tooltip]::before {
    left: auto;
    right: -10px;
    transform: translateY(10px);
}
.info-icon.align-right[data-tooltip]::after {
    left: auto;
    right: 5px;
    transform: translateY(10px);
}
.info-icon.align-right[data-tooltip]:hover::before,
.info-icon.align-right[data-tooltip]:hover::after {
    transform: translateY(0);
}

.info-icon.align-left[data-tooltip]::before {
    left: -10px;
    right: auto;
    transform: translateY(10px);
}
.info-icon.align-left[data-tooltip]::after {
    left: 5px;
    right: auto;
    transform: translateY(10px);
}
.info-icon.align-left[data-tooltip]:hover::before,
.info-icon.align-left[data-tooltip]:hover::after {
    transform: translateY(0);
}

