/* ==========================================================================
   Syarikat Sri Wang Engineering (Sabah) Sdn Bhd - Modern Design System
   ========================================================================== */

:root {
  --primary: #00874e;
  --primary-hover: #007040;
  --primary-light: #ecfdf5;
  --accent: #d97706;
  --navy-950: #0f172a;
  --navy-900: #0f172a;
  --navy-850: #1e293b;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --navy-600: #475569;
  --blue-600: #0284c7;
  --blue-500: #0369a1;
  --teal-600: #00874e;
  --teal-500: #059669;
  --teal-400: #00874e;
  --amber-500: #f59e0b;
  --amber-400: #d97706;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
}

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

html {
  font-family: var(--font-sans);
  color: var(--slate-800);
  background-color: var(--slate-50);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--teal-600);
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.25;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 135, 78, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 135, 78, 0.32);
}

.btn-accent {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 135, 78, 0.22);
}

.btn-accent:hover {
  background: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 135, 78, 0.32);
}

.btn-outline {
  background: var(--white);
  color: var(--slate-800);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-white {
  background: var(--white);
  color: var(--slate-800);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.btn-outline-white:hover {
  background: var(--slate-50);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background-color: #f1f5f9;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

.badge-teal {
  background-color: var(--primary-light);
  color: #065f46;
  border-color: #a7f3d0;
}

.badge-amber {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.badge-navy {
  background-color: var(--slate-100);
  color: var(--slate-800);
  border-color: var(--slate-200);
}

/* ==========================================================================
   Topbar & Header
   ========================================================================== */

.topbar {
  background: linear-gradient(90deg, #00874e 0%, #007338 50%, #005829 100%);
  color: #ffffff;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.95);
  transition: var(--transition);
}

.topbar-item:hover {
  color: #faa61a;
}

.topbar-item svg {
  width: 14px;
  height: 14px;
  color: #faa61a;
}

.topbar-link-concern {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(250, 166, 26, 0.22);
  color: #ffffff;
  border: 1px solid #faa61a;
  padding: 3px 12px;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
}

.topbar-link-concern:hover {
  background: #faa61a;
  color: #004d24;
}

.topbar-link-concern svg {
  color: #faa61a;
}

.topbar-link-concern:hover svg {
  color: #004d24;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

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

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--navy-900);
  background-color: var(--slate-100);
}

.nav-link svg.arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-link svg.arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1010;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
  pointer-events: auto;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate-700);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-link:hover, .dropdown-link.active {
  background-color: var(--slate-100);
  color: var(--navy-900);
  padding-left: 16px;
}

.dropdown-link svg {
  width: 14px;
  height: 14px;
  color: var(--teal-600);
  flex-shrink: 0;
}

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

.btn-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--navy-900);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--slate-200);
}

.mobile-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--slate-800);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background-color: var(--slate-100);
  color: var(--navy-900);
}

.mobile-submenu {
  display: flex;
  flex-direction: column;
  padding-left: 14px;
  margin-top: 4px;
  margin-bottom: 8px;
  border-left: 2px solid var(--slate-200);
  gap: 4px;
}

.mobile-sub-link {
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--slate-600);
}

.mobile-sub-link:hover, .mobile-sub-link.active {
  color: var(--blue-600);
  font-weight: 600;
}

/* ==========================================================================
   Hero Sections (SWE Green Gradient)
   ========================================================================== */

.hero-home {
  position: relative;
  background: linear-gradient(135deg, #00874e 0%, #007338 50%, #005829 100%);
  color: #ffffff;
  padding: 75px 0 65px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: 0.55;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}

.hero-badge svg {
  color: #faa61a;
}

.hero-title {
  font-size: clamp(2.3rem, 4.8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 22px;
  letter-spacing: -0.025em;
}

.hero-title .highlight {
  color: #faa61a;
  background: linear-gradient(135deg, #fde68a 0%, #faa61a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
  margin-bottom: 34px;
  max-width: 740px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-actions .btn-accent, .hero-actions .btn-primary {
  background: #faa61a;
  color: #004d24;
  border-color: #faa61a;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.hero-actions .btn-accent:hover, .hero-actions .btn-primary:hover {
  background: #f59e0b;
  color: #003619;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.hero-actions .btn-outline, .hero-actions .btn-outline-white {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

.hero-actions .btn-outline:hover, .hero-actions .btn-outline-white:hover {
  background: #ffffff;
  color: #007f3d;
  border-color: #ffffff;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-number span {
  color: #faa61a;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  line-height: 1.4;
}

/* Page Hero (Across All Subpages) */
.page-hero {
  background: linear-gradient(135deg, #00874e 0%, #007338 50%, #005829 100%);
  color: #ffffff;
  padding: 55px 0 50px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: #faa61a;
}

.breadcrumbs span.separator {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumbs > span:last-child {
  color: #ffffff;
  font-weight: 600;
}

.page-hero-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-hero-lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 780px;
  line-height: 1.6;
}

/* ==========================================================================
   Sections, Cards & Layouts
   ========================================================================== */

.section {
  padding: 70px 0;
}

.section-alt {
  background-color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.section-badge {
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--slate-600);
  line-height: 1.65;
}

/* Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37, 99, 235, 0.3);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0284c7);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 10px;
  transition: var(--transition);
}

.service-card:hover .service-icon-wrap {
  background: rgba(37, 99, 235, 0.1);
}

.service-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.service-card-desc {
  font-size: 0.92rem;
  color: var(--slate-600);
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.service-card-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--slate-700);
}

.service-card-feature svg {
  width: 16px;
  height: 16px;
  color: var(--teal-600);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Feature Grid (for detailed pages) */
.features-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-box {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--slate-300);
}

.feature-box-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.feature-box-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--slate-100);
  padding: 10px;
  flex-shrink: 0;
}

.feature-box-title {
  font-size: 1.15rem;
  color: var(--navy-900);
}

/* Projects Showcase */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  cursor: pointer;
  transition: var(--transition);
}

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

.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 135, 78, 0.25);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.project-thumb {
  position: relative;
  background: var(--slate-100);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-thumb:hover .project-overlay {
  opacity: 1;
}

.project-overlay-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: var(--transition);
}

.project-thumb:hover .project-overlay-icon {
  transform: scale(1);
}

.project-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal-600);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.project-action {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--slate-100);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.lightbox-image {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  background: #f8fafc;
}

.lightbox-bar {
  width: 100%;
  background: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-900);
}

.lightbox-caption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-900);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ffffff;
  border: 1px solid var(--slate-300);
  color: var(--slate-800);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lightbox-close:hover {
  background: var(--slate-100);
  color: var(--primary);
  border-color: var(--primary);
}

/* Licenses & Certifications Gallery */
.licenses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.license-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.license-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-500);
}

.license-thumb {
  background: var(--slate-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
  position: relative;
}

.license-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.license-thumb:hover .project-overlay {
  opacity: 1;
}

.license-authority {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-600);
  margin-bottom: 4px;
}

.license-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 6px;
  line-height: 1.35;
}

.license-validity {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-bottom: 14px;
}

/* Brands Table */
.brands-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.brands-search-bar {
  padding: 20px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 14px;
}

.brands-search-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.brands-search-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.table-responsive {
  overflow-x: auto;
}

.brands-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.brands-table th {
  background: var(--slate-100);
  color: var(--slate-900);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 14px 20px;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--slate-300);
}

.brands-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.95rem;
  vertical-align: top;
}

.brands-table tbody tr:hover {
  background-color: var(--slate-50);
}

.brands-category-cell {
  font-weight: 700;
  color: var(--navy-900);
  width: 38%;
}

.brands-list-cell {
  color: var(--slate-700);
  line-height: 1.5;
}

.brand-pill {
  display: inline-block;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  margin: 2px;
  color: var(--slate-800);
}

/* Contact & Branches */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
  margin-bottom: 50px;
}

.branch-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.branch-header {
  background: var(--slate-50);
  color: var(--slate-900);
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-200);
}

.branch-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.branch-badge {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.branch-map-wrap {
  width: 100%;
  height: 240px;
  background: var(--slate-100);
}

.branch-map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.branch-photo-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--slate-100);
}

.branch-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branch-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.branch-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--slate-700);
}

.branch-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--teal-600);
  flex-shrink: 0;
  margin-top: 3px;
}

.branch-actions {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Contact Form */
.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-lg);
  padding: 36px;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--slate-800);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: none;
}

.form-alert.alert-success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  display: block;
}

.form-alert.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  display: block;
}

/* ==========================================================================
   Footer (SWE Green Gradient)
   ========================================================================== */

.site-footer {
  background: linear-gradient(135deg, #00602e 0%, #004d25 50%, #003d1c 100%);
  color: rgba(255, 255, 255, 0.85);
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-top {
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.footer-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-reg-no {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #faa61a;
  padding-left: 4px;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
}

.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.footer-contact-row svg {
  width: 16px;
  height: 16px;
  color: #faa61a;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 22px 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .nav-desktop, .header-cta .btn {
    display: none;
  }
  .btn-mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar-left {
    display: none;
  }
  .topbar .container {
    justify-content: center;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: 24px;
  }
  .brands-category-cell {
    width: 100%;
    display: block;
  }
  .brands-list-cell {
    display: block;
  }

  .visitor-counter-pill {
    bottom: 20px;
    left: 16px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  .analytics-drawer {
    width: 100%;
    max-width: 100vw;
  }
}

/* ==========================================================================
   Back to Top Floating Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00874e 0%, #00602e 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, #00964b 0%, #007338 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 135, 78, 0.35);
  border-color: #faa61a;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ==========================================================================
   Visitor & Pageview Counter Floating Pill
   ========================================================================== */

.visitor-counter-pill {
  position: fixed;
  bottom: 28px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: var(--slate-800);
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 990;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.visitor-counter-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 135, 78, 0.22);
  border-color: #00874e;
  color: #00874e;
}

.visitor-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.visitor-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: visitorPulse 2s infinite ease-out;
}

@keyframes visitorPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.visitor-counter-number {
  font-weight: 800;
  color: #00874e;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.visitor-counter-label {
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ==========================================================================
   Analytics Drawer Panel (Sliding from Right Side)
   ========================================================================== */

.analytics-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 4000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.analytics-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.analytics-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: #ffffff;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2);
  z-index: 4001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.analytics-drawer.is-active {
  transform: translateX(0);
}

.analytics-header {
  background: linear-gradient(135deg, #00874e 0%, #007338 50%, #005829 100%);
  color: #ffffff;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.analytics-title-group h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-title-group p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-close-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
  line-height: 1;
}

.analytics-close-btn:hover {
  background: #ffffff;
  color: #007f3d;
  transform: rotate(90deg);
}

.analytics-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* KPI Cards Grid */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.analytics-kpi-card {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.analytics-kpi-card:hover {
  border-color: #00874e;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.analytics-kpi-label {
  font-size: 0.76rem;
  color: var(--slate-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.analytics-kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.analytics-kpi-value.highlight {
  color: #00874e;
}

.analytics-kpi-sub {
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 7-Day Trend Chart */
.analytics-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analytics-chart-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px 16px 12px;
}

.analytics-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate-200);
}

.analytics-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.analytics-bar {
  width: 100%;
  max-width: 26px;
  background: linear-gradient(180deg, #00874e 0%, #00602e 100%);
  border-radius: 4px 4px 0 0;
  transition: all 0.3s ease;
}

.analytics-bar-col:hover .analytics-bar {
  background: linear-gradient(180deg, #faa61a 0%, #d97706 100%);
  transform: scaleY(1.05);
  transform-origin: bottom;
}

.analytics-bar-tooltip {
  position: absolute;
  top: -32px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.analytics-bar-col:hover .analytics-bar-tooltip {
  opacity: 1;
}

.analytics-bar-label {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}

/* Top Pages Progress Bars */
.analytics-pages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analytics-page-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-page-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
}

.analytics-page-title {
  font-weight: 600;
  color: var(--slate-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 75%;
}

.analytics-page-count {
  font-weight: 700;
  color: #00874e;
}

.analytics-prog-track {
  height: 6px;
  background: var(--slate-200);
  border-radius: 9999px;
  overflow: hidden;
}

.analytics-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #00874e, #0284c7);
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* Device Breakdown */
.analytics-devices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.analytics-device-card {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.analytics-device-card svg {
  width: 20px;
  height: 20px;
  color: #00874e;
  margin-bottom: 4px;
}

.analytics-device-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-800);
}

.analytics-device-name {
  font-size: 0.74rem;
  color: var(--slate-500);
}

/* Platform & Browsers Row */
.analytics-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-pill {
  background: #f1f5f9;
  border: 1px solid var(--slate-200);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analytics-pill span {
  color: #00874e;
  font-weight: 700;
}

/* Drawer Footer */
.analytics-drawer-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--slate-500);
  flex-shrink: 0;
}

.analytics-refresh-btn {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.analytics-refresh-btn:hover {
  border-color: #00874e;
  color: #00874e;
}

.analytics-refresh-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.5s ease;
}

.analytics-refresh-btn.is-loading svg {
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   SWE AI Chatbot Widget (Powered by KKBOSS)
   ========================================================================== */

.swe-chat-launcher {
  position: fixed;
  bottom: 86px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00874e 0%, #00602e 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(0, 135, 78, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.swe-chat-launcher:hover {
  background: linear-gradient(135deg, #00964b 0%, #007338 100%);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 25px rgba(0, 135, 78, 0.45);
  border-color: #faa61a;
}

.swe-chat-launcher svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.swe-chat-launcher .swe-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #faa61a;
  color: #1e293b;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  letter-spacing: 0.5px;
}

.swe-chat-tooltip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.swe-chat-tooltip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid #1e293b;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.swe-chat-launcher:hover .swe-chat-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* Chat Window Modal / Drawer */
.swe-chat-window {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 995;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.swe-chat-window.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.swe-chat-header {
  background: linear-gradient(135deg, #00874e 0%, #007338 50%, #005829 100%);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #faa61a;
  flex-shrink: 0;
}

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

.swe-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.swe-chat-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.swe-chat-header-sub {
  font-size: 0.72rem;
  color: #ecfdf5;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.swe-chat-header-sub .dot {
  width: 7px;
  height: 7px;
  background: #34d399;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #34d399;
}

.swe-chat-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.swe-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages */
.swe-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.swe-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.swe-msg-row.user {
  align-self: flex-end;
  align-items: flex-end;
}

.swe-msg-row.bot {
  align-self: flex-start;
  align-items: flex-start;
}

.swe-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.swe-msg-row.user .swe-msg-bubble {
  background: linear-gradient(135deg, #00874e, #007338);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 135, 78, 0.2);
}

.swe-msg-row.bot .swe-msg-bubble {
  background: #ffffff;
  color: var(--slate-800);
  border: 1px solid var(--slate-200);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.swe-msg-bubble p {
  margin: 0 0 8px 0;
}
.swe-msg-bubble p:last-child {
  margin-bottom: 0;
}

.swe-msg-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}
.swe-msg-bubble li {
  margin-bottom: 4px;
}

.swe-msg-bubble a {
  color: #00874e;
  font-weight: 600;
  text-decoration: underline;
}

.swe-msg-time {
  font-size: 0.68rem;
  color: var(--slate-400);
  margin-top: 4px;
  padding: 0 4px;
}

/* Quick prompt chips */
.swe-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.swe-chip-btn {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.swe-chip-btn:hover {
  background: #ecfdf5;
  border-color: #00874e;
  color: #00874e;
  transform: translateY(-1px);
}

/* Typing indicator */
.swe-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.swe-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: sweTypingBounce 1.2s infinite ease-in-out;
}

.swe-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.swe-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sweTypingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; background: #00874e; }
}

/* Chat Input Bar */
.swe-chat-inputbar {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.swe-chat-input {
  flex: 1;
  border: 1px solid var(--slate-300);
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  color: var(--slate-800);
  transition: border-color 0.2s ease;
}

.swe-chat-input:focus {
  border-color: #00874e;
  box-shadow: 0 0 0 3px rgba(0, 135, 78, 0.12);
}

.swe-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00874e;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.swe-chat-send-btn:hover {
  background: #007338;
  transform: scale(1.05);
}

.swe-chat-send-btn svg {
  width: 17px;
  height: 17px;
  transform: translateX(1px);
}

.swe-chat-footer-brand {
  padding: 4px 14px 7px;
  background: #ffffff;
  font-size: 0.7rem;
  color: var(--slate-400);
  text-align: center;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.swe-chat-footer-brand a {
  color: #00874e;
  font-weight: 600;
  text-decoration: none;
}
.swe-chat-footer-brand a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .swe-chat-launcher {
    bottom: 74px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .swe-chat-window {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 78px;
    max-height: calc(100vh - 90px);
  }
}
