@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================
   ENTERPRISE ERP DESIGN SYSTEM - MASTER CSS
   ========================================== */

:root {
  /* Brand Palette */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-active: #1E40AF;
  --primary-light: #EFF6FF;
  --primary-border: rgba(37, 99, 235, 0.2);
  --primary-glow: rgba(37, 99, 235, 0.15);

  --secondary-grad: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  --brand-grad: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #1D4ED8 100%);
  --accent-grad: linear-gradient(135deg, #10B981 0%, #059669 100%);

  /* Semantic Colors */
  --accent: #10B981;
  --accent-hover: #059669;
  --accent-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --info: #0EA5E9;
  --info-light: #F0F9FF;

  /* Neutral Surface System (Light Mode Default) */
  --bg-color: #F8FAFC;
  --surface-white: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-subtle: #F1F5F9;
  --surface-active: #E2E8F0;
  
  --text-dark: #0F172A;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --border-color: #E2E8F0;
  --border-subtle: rgba(226, 232, 240, 0.6);
  --border-focus: #2563EB;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 48px -8px rgba(15, 23, 42, 0.16);

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Layout */
  --container-width: 1320px;
  --font-title: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-color: #0B0F19;
  --surface-white: #111827;
  --surface-card: #1E293B;
  --surface-subtle: #1F2937;
  --surface-active: #374151;

  --text-dark: #F8FAFC;
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --glass-bg: rgba(17, 24, 39, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);

  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
}

h3 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
}

h4 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

p {
  color: var(--text-muted);
  font-size: 15px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* ==========================================
   ANNOUNCEMENT BAR & GLOBAL HEADER
   ========================================== */
.announcement-bar {
  background: var(--secondary-grad);
  color: #F8FAFC;
  text-align: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1001;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.announcement-bar .badge-announce {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.announcement-bar a {
  color: #60A5FA;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.announcement-bar a:hover {
  color: #93C5FD;
  text-decoration: underline;
}

.global-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-fast);
}

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

.logo {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-badge {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.has-dropdown:hover .dropdown-arrow,
.has-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition-fast);
  z-index: 1200;
}

.has-dropdown:hover > .nav-dropdown,
.has-dropdown.open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-dropdown li a:hover {
  background: var(--primary-light);
  color: var(--primary);
  padding-left: 16px;
}

/* Header Actions & Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-util-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.header-util-link:hover {
  color: var(--primary);
}

.header-divider {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--border-color);
  margin: 0 4px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  z-index: 1100;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Overlay Drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================
   BUTTON SYSTEM
   ========================================== */
.btn {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
  line-height: 1.25;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md), 0 0 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--primary-active);
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  border-color: var(--text-light);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--surface-subtle);
  color: var(--primary);
}

.btn-destructive {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-destructive:hover {
  background: #DC2626;
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* ==========================================
   SECTIONS & SECTIONS LAYOUTS
   ========================================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background-color: var(--surface-white);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-dark {
  background: var(--secondary-grad);
  color: #FFFFFF;
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: #FFFFFF;
}

.section-dark p {
  color: #94A3B8;
}

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

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 17px;
  line-height: 1.6;
}

/* ==========================================
   HERO SECTION LAYOUT
   ========================================== */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F0FDFA 0%, #EFF6FF 100%);
}

/* Background elements */
.hero-bg-left {
  position: absolute;
  top: 40px;
  left: 40px;
  pointer-events: none;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.hero-bg-right {
  position: absolute;
  top: 80px;
  right: 20px;
  pointer-events: none;
  opacity: 0.6;
}

/* 2-Column Responsive Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
  margin-bottom: 48px;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
  }
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #0F172A;
  font-family: var(--font-title);
}

@media (min-width: 576px) {
  .hero-title {
    font-size: 52px;
  }
}

@media (min-width: 992px) {
  .hero-title {
    font-size: 60px;
  }
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 600;
  color: #0D9488;
  margin-bottom: 24px;
  line-height: 1.35;
  font-family: var(--font-title);
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 24px;
  }
}

.hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: #64748B;
  margin-bottom: 32px;
  max-width: 520px;
}

@media (min-width: 768px) {
  .hero-desc {
    font-size: 16px;
  }
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Button customizations */
.btn-teal {
  background-color: #0D9488;
  color: white !important;
  border: 1px solid #0D9488;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-teal:hover {
  background-color: #0F766E;
  border-color: #0F766E;
  transform: translateY(-1px);
}

.btn-teal-outline {
  border: 1.5px solid #0D9488;
  color: #0D9488 !important;
  background: transparent;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-teal-outline:hover {
  background-color: rgba(13, 148, 136, 0.05);
  transform: translateY(-1px);
}

/* Feature Cards Grid */
.hero-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 48px;
  margin-bottom: 48px;
}

@media (min-width: 576px) {
  .hero-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hero-features-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.hero-feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-fast);
}

.hero-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
  background: rgba(255, 255, 255, 0.95);
}

.hero-feature-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-feature-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.hero-feature-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin: 0;
}

/* Stats Bar */
.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 24px;
  margin-top: 48px;
}

@media (min-width: 576px) {
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hero-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 575px) {
  .hero-stat-item {
    justify-content: flex-start;
  }
}

.hero-stat-icon-wrapper {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  color: #0D9488;
  flex-shrink: 0;
}

.hero-stat-number {
  font-size: 28px;
  font-weight: 800;
  color: #0D9488;
  line-height: 1;
  margin-bottom: 2px;
}

.hero-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
}

/* ==========================================
   CARDS & GRID SYSTEMS
   ========================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

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

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--primary-border);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================
   BADGES & STATUS PILLS
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-success { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-danger { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-info { background: var(--info-light); color: var(--info); border: 1px solid rgba(14, 165, 233, 0.2); }
.badge-neutral { background: var(--surface-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }

/* ==========================================
   INTERACTIVE DASHBOARD PREVIEW
   ========================================== */
.dashboard-preview-window {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-titlebar {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #FF5F56;
}
.control-dot:nth-child(2) { background: #FFBD2E; }
.control-dot:nth-child(3) { background: #27C93F; }

.preview-tab-selector {
  display: flex;
  gap: 4px;
  background: var(--surface-white);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.preview-tab-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: var(--transition-fast);
}

.preview-tab-btn.active {
  background: var(--primary);
  color: white;
}

.preview-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-color);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 6px 0;
}

.kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-trend.positive { color: var(--accent); }
.kpi-trend.negative { color: var(--danger); }

/* ==========================================
   TABLES & DATA DENSITY
   ========================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  background: var(--surface-subtle);
  color: var(--text-dark);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--primary-light);
}

/* ==========================================
   FORMS & INPUT CONTROLS
   ========================================== */
.form-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

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

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-light);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ==========================================
   INTERACTIVE WORKFLOW STEP SWAPPER
   ========================================== */
.workflow-box {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.wf-tabs-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.wf-nodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}

.wf-node-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: var(--transition);
}

.wf-node-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ==========================================
   ROI CALCULATOR COMPONENT
   ========================================== */
.roi-box {
  background: var(--secondary-grad);
  color: white;
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-xl);
}

.roi-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
}

.roi-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  border: 2px solid white;
}

.roi-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.roi-metric-val {
  font-size: 38px;
  font-weight: 800;
  color: #60A5FA;
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 840px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-trigger {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.25s ease;
}

.faq-content {
  padding: 0 24px 20px 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  display: none;
}

.faq-item.active {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--primary-light);
  color: var(--primary);
}

.faq-item.active .faq-content {
  display: block;
}

/* ==========================================
   GLOBAL FOOTER
   ========================================== */
.global-footer {
  background: var(--secondary-grad);
  color: #94A3B8;
  padding: 80px 0 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  color: white;
  margin-bottom: 12px;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  color: #94A3B8;
  font-size: 14px;
}

.footer-col ul li a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

/* ==========================================
   RESPONSIVE LAYOUTS
   ========================================== */
@media (max-width: 1024px) {
  .hero-layout, .grid-3, .grid-4, .footer-grid, .wf-nodes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-actions .btn-secondary, .header-util-link, .header-divider {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--surface-card);
    box-shadow: var(--shadow-xl);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 24px 40px 24px;
    transition: right 0.3s ease;
    z-index: 1090;
  }
  .main-nav.open {
    right: 0;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 8px;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
  }
  .has-dropdown {
    width: 100%;
  }
  .nav-dropdown {
    position: static;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--surface-subtle);
    padding: 0 12px;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    width: 100%;
    margin-top: 4px;
    border-radius: var(--radius-sm);
  }
  .has-dropdown.open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    max-height: 450px;
    padding: 8px 12px;
    overflow-y: auto;
  }
  .hero-layout, .grid-2, .grid-3, .grid-4, .kpi-row, .roi-metrics-grid, .wf-nodes-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
}
