/* ============================================================
   风行通 (Fengxing Tong) — 全球展会与企业大数据平台
   全局样式系统 — 深圳市和风行科技有限公司
   设计语言: Peacock Blue · 科技感 · 专业企业数据平台
   ============================================================ */

/* ============================================================
   1. CSS RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  font-size: 16px; 
  scroll-behavior: smooth; 
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   2. CSS DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Colors */
  --primary:          #0056B2;
  --primary-dark:     #004090;
  --primary-light:    #3b84d6;
  --secondary:        #0671E4;
  --accent:           #00E9CF;
  --accent-dark:      #00c4ae;
  --highlight:        #FFF390;
  --highlight-dark:   #f5e800;

  /* Status Colors */
  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --info:      #3b82f6;

  /* Backgrounds */
  --bg-page:     #f4f7fb;
  --bg-sidebar:  #0a1628;
  --bg-card:     #ffffff;
  --bg-subtle:   #f8fafc;
  --bg-overlay:  rgba(10, 22, 40, 0.55);

  /* Text */
  --text-primary:   #1e2937;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;
  --text-link:      #0671E4;

  /* Borders */
  --border:       #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: rgba(0, 86, 178, 0.4);

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --shadow-primary: 0 4px 16px rgba(0,86,178,0.25);
  --shadow-accent:  0 4px 16px rgba(0,233,207,0.3);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl:24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Transitions */
  --transition:     all 0.2s ease;
  --transition-slow: all 0.35s cubic-bezier(0.4,0,0.2,1);

  /* Layout */
  --sidebar-width: 248px;
  --sidebar-collapsed-width: 64px;
  --navbar-height: 60px;
  --content-max: 1440px;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'PingFang SC', sans-serif;
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.25rem; font-weight: 900; }
h2 { font-size: 1.75rem; font-weight: 800; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { line-height: 1.7; }

.text-sm   { font-size: 0.875rem; }
.text-xs   { font-size: 0.75rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary   { color: var(--primary); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black     { font-weight: 900; }

/* ============================================================
   4. LAYOUT SYSTEM
   ============================================================ */

/* App shell */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
}

/* Main content area pushed by sidebar - FULL WIDTH */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding-top: var(--navbar-height);
  transition: margin-left 0.3s ease;
}
.main-content.sidebar-collapsed { margin-left: var(--sidebar-collapsed-width); }

/* Inner content wrapper - FULL WIDTH ADAPTIVE */
.content-area {
  padding: 24px 32px;
  max-width: none; /* 移除最大宽度限制 */
  width: 100%;
}

/* Content wrapper variant for special cases */
.content-wrapper {
  width: 100%;
  max-width: none;
}

/* Grid Systems */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 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: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.grid-charts { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-charts-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* Full-width adaptive grids for KPI cards and data displays */
.kpi-grid, .data-grid, .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

/* Full-width KPI row — always fills available space */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  margin-bottom: 28px;
}

/* Page header row */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 0.82rem; color: var(--text-secondary); margin-top: 3px; }

/* Section title */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ============================================================
   5. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width 0.3s ease;
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-item-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-user-info { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .nav-item-icon { margin: 0; }

/* Logo area */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--navbar-height);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
}

.sidebar-logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.875rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,233,207,0.3);
}

.sidebar-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.sidebar-logo-sub {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  display: block;
  margin-top: -2px;
  white-space: nowrap;
}

.sidebar-toggle {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.12); color: white; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

/* Nav scroll area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section { margin-bottom: 4px; }
.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  padding: 8px 20px 4px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.95);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0,86,178,0.5), rgba(0,86,178,0.15));
  color: white;
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item-icon {
  width: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: inherit;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.nav-badge.green { background: var(--accent); color: var(--text-primary); }
.nav-badge.red   { background: var(--danger); }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: 0.82rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.7rem; color: rgba(255,255,255,0.4); white-space: nowrap; }

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 199;
  backdrop-filter: blur(2px);
}

/* ============================================================
   6. TOP NAVBAR
   ============================================================ */
.top-navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--navbar-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  z-index: 100;
  transition: left 0.3s ease;
}
.top-navbar.sidebar-collapsed { left: var(--sidebar-collapsed-width); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  padding: 6px;
}
.mobile-menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 38px;
  transition: var(--transition);
}
.navbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,86,178,0.08);
  background: white;
}
.navbar-search input {
  border: none; background: none; outline: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  flex: 1;
}
.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--primary); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid white;
}

.navbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.navbar-avatar:hover { border-color: var(--primary); }

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn i { font-size: 0.82rem; }

/* Primary */
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0,86,178,0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(6,113,228,0.25);
}
.btn-secondary:hover { background: #0560c0; transform: translateY(-1px); }

/* Accent */
.btn-accent {
  background: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-accent);
  font-weight: 700;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text-primary); border-color: var(--border-focus); }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: rgba(0,86,178,0.06); }

/* Danger */
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

/* Sizes */
.btn-xs  { padding: 5px 12px; font-size: 0.75rem; border-radius: var(--radius-xs); }
.btn-sm  { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg  { padding: 13px 28px; font-size: 1rem; }
.btn-xl  { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Icon only */
.btn-icon {
  padding: 9px;
  min-width: unset;
}
.btn-icon.btn-sm { padding: 7px; }

/* ============================================================
   8. CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.card-body { padding: 24px; }
/* Card body with table - enable horizontal scroll */
.card-body:has(table),
.card-body:has(.data-table),
.card-body:has(.table) {
  padding: 0;
  overflow-x: auto;
}
.card-body:has(table) table,
.card-body:has(.data-table) .data-table,
.card-body:has(.table) .table {
  margin: 0;
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.card:hover { box-shadow: var(--shadow-md); }

/* KPI Card — full-width adaptive */
.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition-slow);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.25s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.kpi-card:hover::after { opacity: 1; }

.kpi-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.kpi-change.positive { background: rgba(16,185,129,0.1); color: #059669; }
.kpi-change.negative { background: rgba(239,68,68,0.1); color: var(--danger); }
.kpi-change.neutral  { background: var(--bg-subtle); color: var(--text-secondary); }

/* Chart Card */
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.chart-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.chart-subtitle { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.chart-container { position: relative; height: 220px; width: 100%; }
.chart-container-sm { position: relative; height: 160px; width: 100%; }
.chart-container-lg { position: relative; height: 280px; width: 100%; }

.chart-actions { display: flex; gap: 4px; flex-shrink: 0; }
.chart-filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.chart-filter-btn:hover, .chart-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================================
   9. BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-primary   { background: rgba(0,86,178,0.12);   color: var(--primary); }
.badge-secondary { background: #f1f5f9;                color: var(--text-secondary); }
.badge-success   { background: rgba(16,185,129,0.12);  color: #059669; }
.badge-warning   { background: rgba(245,158,11,0.15);  color: #b45309; }
.badge-danger    { background: rgba(239,68,68,0.12);   color: #dc2626; }
.badge-accent    { background: rgba(0,233,207,0.15);   color: var(--accent-dark); }
.badge-info      { background: rgba(59,130,246,0.12);  color: #2563eb; }
.badge-purple    { background: rgba(124,58,237,0.12);  color: #7c3aed; }
.badge-orange    { background: rgba(249,115,22,0.12);  color: #ea580c; }
.badge-pink      { background: rgba(236,72,153,0.12);  color: #db2777; }
.badge-dark      { background: rgba(30,41,55,0.08);    color: var(--text-primary); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: default;
  transition: var(--transition);
}
.tag.active, .tag:hover {
  background: rgba(0,86,178,0.06);
  border-color: var(--primary);
  color: var(--primary);
}
.tag .remove-tag {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 2px;
  transition: var(--transition);
}
.tag .remove-tag:hover { color: var(--danger); }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
  min-width: fit-content;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================================
   10. FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 3px; }

.form-input, .form-control, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: var(--transition);
  line-height: 1.5;
}
.form-input:focus, .form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,86,178,0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-input.error, .form-control.error, .form-select.error { border-color: var(--danger); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 5px; display: none; }
.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-input { border-color: var(--danger); }

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,86,178,0.08);
}
.search-box input {
  border: none; background: none; outline: none;
  font-size: 0.875rem; flex: 1;
  color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-muted); }

/* Input group */
.input-group { position: relative; }
.input-group .form-input { padding-left: 38px; }
.input-group .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

/* Checkbox & Radio */
.form-checkbox, .form-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.form-checkbox input, .form-radio input {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle input { display: none; }
.toggle-track {
  width: 40px; height: 22px;
  background: #d1d5db;
  border-radius: var(--radius-full);
  transition: background 0.25s;
  position: relative;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: var(--shadow-xs);
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle-label { font-size: 0.875rem; color: var(--text-primary); }

/* ============================================================
   11. TABLES
   ============================================================ */
.table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow-sm);
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.table-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.table-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.data-table,
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
  min-width: 800px; /* 表格最小宽度，允许横向滚动 */
}
.data-table thead tr,
.table thead tr {
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
}
.data-table th,
.table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.data-table th:hover,
.table th:hover { color: var(--primary); }
.data-table th .sort-icon,
.table th .sort-icon { margin-left: 5px; opacity: 0.4; font-size: 0.65rem; }
.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon,
.table th.sort-asc .sort-icon,
.table th.sort-desc .sort-icon { opacity: 1; color: var(--primary); }

.data-table td,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:last-child td,
.table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td,
.table tbody tr:hover td { background: rgba(0,86,178,0.02); }
.data-table tbody tr.selected td,
.table tbody tr.selected td { background: rgba(0,86,178,0.04); }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   12. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,86,178,0.04); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); font-weight: 700; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.page-info { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }

/* ============================================================
   13. MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s cubic-bezier(0.4,0,0.2,1);
}
.modal-lg  { max-width: 720px; }
.modal-xl  { max-width: 960px; }
.modal-full { max-width: 1100px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: #fee2e2; color: var(--danger); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  flex-shrink: 0;
}

/* ============================================================
   14. DROPDOWNS
   ============================================================ */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  animation: slideDown 0.18s ease;
}
.dropdown-menu.open { display: block; }
.dropdown-menu.align-left { right: auto; left: 0; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.855rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #fef2f2; }
.dropdown-item .item-icon { width: 16px; text-align: center; color: var(--text-muted); }

.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

/* ============================================================
   15. TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  border-left: 4px solid var(--primary);
  pointer-events: all;
  animation: toast-in 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.error   { border-left-color: var(--danger); }
.toast .toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.info    .toast-icon { color: var(--primary); }
.toast .toast-close {
  margin-left: auto;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px;
}
.toast.removing { animation: toast-out 0.25s ease forwards; }

/* ============================================================
   16. AI COMPONENTS
   ============================================================ */

/* AI prompt area */
.ai-query-box {
  background: linear-gradient(135deg, #f0f7ff, #f8fbff);
  border: 1.5px solid rgba(0,86,178,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.ai-query-textarea {
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: var(--transition);
  line-height: 1.6;
}
.ai-query-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,86,178,0.08);
}
.ai-query-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

/* AI insight card */
.ai-insight-card {
  background: linear-gradient(135deg, #f0f7ff, #f8fbff);
  border: 1px solid rgba(0,86,178,0.12);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  transition: var(--transition-slow);
}
.ai-insight-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 10px;
}
.ai-highlight { color: var(--primary); font-weight: 700; }

/* ============================================================
   17. EMAIL TEMPLATES (邮件模板) — Enhanced Visual Separation
   ============================================================ */

/* Template List Item */
.template-list-item {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.template-list-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateX(2px);
}
.template-list-item.active {
  background: linear-gradient(135deg, rgba(0,86,178,0.08), rgba(0,233,207,0.05));
  border-color: var(--primary);
  border-width: 2px;
  padding: 13px;
  box-shadow: 0 3px 8px rgba(0,86,178,0.15);
}

.template-list-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.template-list-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.template-list-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.template-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 500;
}
.template-tag.ai {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(251,191,36,0.12));
  border-color: var(--warning);
  color: var(--warning);
}

.template-score-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-subtle), var(--bg-primary));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
}
.template-score-badge.high {
  background: linear-gradient(135deg, rgba(0,86,178,0.15), rgba(0,233,207,0.15));
  border-color: var(--primary);
  color: var(--primary);
}

/* Editor Toolbar Buttons */
.editor-btn {
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-size: 0.85rem;
}
.editor-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-primary);
}
.editor-btn:active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ============================================================
   18. KEYWORD LIBRARY (词条库) — AI Leads Page
   ============================================================ */
.keyword-library {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.kw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  gap: 10px;
  flex-wrap: wrap;
}

.kw-group-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kw-group {
  border-bottom: 1px solid var(--border-light);
}
.kw-group:last-child { border-bottom: none; }

.kw-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.kw-group-header:hover { background: var(--bg-subtle); }

.kw-group-toggle {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.kw-group-header.expanded .kw-group-toggle { transform: rotate(90deg); }

.kw-group-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kw-group-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kw-group-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.kw-group-header:hover .kw-group-actions { opacity: 1; }

.kw-group-body {
  display: none;
  padding: 0 20px 16px;
}
.kw-group-body.open { display: block; }

/* Individual keyword item */
.kw-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.kw-item:hover { background: var(--bg-subtle); }
.kw-item:hover .kw-item-actions { opacity: 1; }

.kw-item-index {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

.kw-item-content { flex: 1; min-width: 0; }
.kw-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.kw-item-desc {
  font-size: 0.775rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.kw-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

/* Type tabs for keyword library */
.kw-type-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}
.kw-type-tab {
  flex: 1;
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.kw-type-tab.active {
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

/* Match results */
.match-result-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition-slow);
}
.match-result-card:hover { box-shadow: var(--shadow-md); border-color: rgba(0,86,178,0.2); }

.match-score-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 1rem;
  font-weight: 900;
  position: relative;
}
.match-score-ring::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--border-light);
}
.match-score-ring.high { background: rgba(16,185,129,0.08); color: #059669; }
.match-score-ring.high::before { border-color: #059669; }
.match-score-ring.medium { background: rgba(245,158,11,0.08); color: #b45309; }
.match-score-ring.medium::before { border-color: var(--warning); }

.match-dimensions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.match-dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}
.match-dim-label { color: var(--text-secondary); width: 80px; flex-shrink: 0; }
.match-dim-bar {
  flex: 1;
  height: 5px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.match-dim-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.6s ease;
}
.match-dim-score { width: 30px; text-align: right; font-weight: 700; color: var(--text-primary); }

/* ============================================================
   18. INFO LIST
   ============================================================ */
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.875rem;
  gap: 16px;
}
.info-label { color: var(--text-secondary); flex-shrink: 0; font-size: 0.82rem; }
.info-value { font-weight: 600; color: var(--text-primary); text-align: right; }

/* ============================================================
   19. STATUS DOTS & INDICATORS
   ============================================================ */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.online  { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.status-dot.warning { background: var(--warning); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.active  { background: var(--accent); box-shadow: 0 0 0 3px rgba(0,233,207,0.2); }

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  font-weight: 500;
}

/* ============================================================
   20. PROGRESS BARS
   ============================================================ */
.progress-track {
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s ease;
}
.progress-fill.accent { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--danger); }

.progress-sm .progress-track { height: 4px; }
.progress-lg .progress-track { height: 10px; }

/* ============================================================
   21. TOOLTIPS
   ============================================================ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e2937;
  color: white;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 1000;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   22. LOADING STATES
   ============================================================ */
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loading-spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.loading-spinner.lg { width: 52px; height: 52px; border-width: 4px; }

.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e8edf2 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

.loading-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}
.loading-overlay.active { display: flex; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-desc { font-size: 0.875rem; color: var(--text-secondary); max-width: 320px; }

/* ============================================================
   23. LANDING PAGE COMPONENTS
   ============================================================ */

/* Landing navbar */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  z-index: 300;
  transition: var(--transition-slow);
}
.landing-nav.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: white;
  text-decoration: none;
}
.landing-nav.scrolled .landing-nav-logo { color: var(--text-primary); }
.landing-nav.scrolled .landing-nav-link { color: var(--text-secondary); }
.landing-nav.scrolled .landing-nav-link:hover { color: var(--primary); }

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
.landing-nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
}
.landing-nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}
.landing-nav.scrolled .landing-nav-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.landing-nav-actions { display: flex; align-items: center; gap: 10px; }

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #050f2e 0%, #0a1a3f 40%, #0d2457 70%, #0a2060 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,86,178,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,233,207,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,233,207,0.15);
  border: 1px solid rgba(0,233,207,0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent), #00b4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat { }
.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: white;
  line-height: 1;
}
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* Dashboard preview mockup */
.hero-visual {
  position: relative;
}
.hero-mockup {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 20px;
  backdrop-filter: blur(10px);
}
.mockup-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup-screen {
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Stats bar */
.stats-marquee-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
}
.stats-marquee-track {
  display: inline-flex;
  gap: 60px;
  animation: marquee 28s linear infinite;
}
.stats-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
}
.stats-marquee-item i { color: var(--accent); }

/* Feature cards */
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; }

/* How it works steps */
.step-card {
  text-align: center;
  padding: 32px 20px;
}
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-primary);
}

/* Pricing */
.pricing-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  border: 2px solid var(--border-light);
  position: relative;
  transition: var(--transition-slow);
}
.pricing-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0f7ff, #f8fbff);
  box-shadow: var(--shadow-primary);
}
.pricing-popular-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin: 16px 0;
}
.pricing-price .price-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.pricing-features { list-style: none; margin: 20px 0; }
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.pricing-features li .check { color: var(--success); font-size: 0.8rem; margin-top: 2px; flex-shrink: 0; }

/* Testimonial */
.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.testimonial-quote {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-light);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  gap: 16px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.15s;
}
.faq-question:hover { color: var(--primary); }
.faq-toggle {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-item.open .faq-toggle { background: var(--primary); color: white; transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-2xl);
  padding: 52px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

/* Partner logos */
.partner-logo {
  height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 20px;
  transition: var(--transition);
}
.partner-logo:hover { border-color: var(--primary); color: var(--primary); }

/* News card */
.news-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.news-card-img {
  height: 160px;
  background: linear-gradient(135deg, #0a1628, #0056B2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.news-card-body { padding: 18px; }
.news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.75rem; color: var(--text-muted); }
.news-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); line-height: 1.45; margin-bottom: 8px; }
.news-card-title:hover { color: var(--primary); cursor: pointer; }
.news-card-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }

/* Footer */
.landing-footer {
  background: #050f2e;
  color: rgba(255,255,255,0.6);
  padding: 60px 0 0;
}
.footer-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { }
.footer-brand-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem; font-weight: 800;
  color: white;
  margin-bottom: 12px;
}
.footer-brand-desc {
  font-size: 0.82rem;
  line-height: 1.7;
  max-width: 280px;
}
.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-link {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-link:hover { color: white; }
.footer-bottom {
  margin-top: 48px;
  padding: 16px 60px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   24. COMPANY DATABASE PAGE
   ============================================================ */
.company-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.company-card:hover { box-shadow: var(--shadow-md); border-color: rgba(0,86,178,0.2); transform: translateY(-2px); }

.company-logo-placeholder {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.company-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.company-industry { font-size: 0.75rem; color: var(--text-muted); }
.company-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.company-stat { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ============================================================
   25. REPORTS PAGE
   ============================================================ */
.report-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition-slow);
}
.report-card:hover { box-shadow: var(--shadow-md); }

.report-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================================
   26. SETTINGS PAGE
   ============================================================ */
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.settings-nav-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.settings-nav-item.active { background: rgba(0,86,178,0.08); color: var(--primary); font-weight: 600; }

.settings-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.settings-section-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.settings-section-body { padding: 24px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 20px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info { }
.settings-row-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.settings-row-desc  { font-size: 0.775rem; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   27. TABS
   ============================================================ */
.tabs-bar {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}
.tab-item {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Pill tabs */
.tabs-pill {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.tab-pill {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-pill.active {
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   28. DIVIDERS & MISC
   ============================================================ */
.divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.divider-text::before,
.divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.section-wrap { padding: 72px 0; }
.section-wrap.bg-alt { background: var(--bg-subtle); }
.section-wrap.bg-dark { background: #050f2e; }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 60px; }
.section-heading { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.section-label::before { content: ''; width: 20px; height: 2px; background: var(--primary); border-radius: 1px; }
.section-label::after  { content: ''; width: 20px; height: 2px; background: var(--primary); border-radius: 1px; }
.section-main-title { font-size: 2rem; font-weight: 900; margin-bottom: 12px; }
.section-desc { font-size: 1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* Highlight box */
.highlight-box {
  background: var(--highlight);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.875rem;
}

/* ============================================================
   29. SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   30. ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes count-up { from { opacity: 0; } to { opacity: 1; } }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* ============================================================
   31. RESPONSIVE DESIGN
   ============================================================ */

/* 1200px — collapse some grids */
@media (max-width: 1200px) {
  .hero-title { font-size: 2.4rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-charts { grid-template-columns: 1fr; }
  .grid-charts-3 { grid-template-columns: 1fr 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .hero-content { grid-template-columns: 1fr; gap: 40px; padding: 100px 40px 60px; }
  .hero-visual { display: none; }
}

/* 960px */
@media (max-width: 960px) {
  .content-area { padding: 20px; }
  .container { padding: 0 24px; }
  .landing-nav { padding: 0 24px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-charts-3 { grid-template-columns: 1fr; }
  .landing-nav-links { display: none; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .cta-banner { padding: 40px 28px; }
  .kpi-grid, .data-grid, .card-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* 768px — mobile layout */
@media (max-width: 768px) {
  :root { --sidebar-width: 248px; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; width: var(--sidebar-width) !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay { display: none; }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0 !important; }
  .top-navbar { left: 0 !important; }
  .mobile-menu-btn { display: flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-grid, .data-grid, .card-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.9rem; }
  .hero-content { padding: 80px 20px 40px; }
  .footer-content { grid-template-columns: 1fr; padding: 0 24px; }
  .footer-bottom { padding: 16px 24px; }
  .landing-nav { padding: 0 20px; }
  .table-toolbar { flex-direction: column; align-items: flex-start; }
  .page-header-row { flex-direction: column; }
}

/* 480px */
@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .hero-cta { flex-direction: column; }
  .btn-xl { width: 100%; }
  .pricing-price { font-size: 2rem; }
  .modal { margin: 10px; max-height: calc(100vh - 20px); }
  .content-area { padding: 14px; }
}

/* ============================================================
   32. MISSING / SUPPLEMENTAL CLASSES
   ============================================================ */

/* Toggle switch (alternate naming: toggle-switch / toggle-slider) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #d1d5db;
  border-radius: 24px;
  transition: background 0.25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Small form controls */
.form-input-sm  { height: 32px !important; padding: 0 10px !important; font-size: 0.8rem !important; }
.form-select-sm { height: 32px !important; padding: 0 28px 0 10px !important; font-size: 0.8rem !important; }

/* Progress bar wrapper (alternate naming for .progress-track) */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

/* Settings row value — right-side content column */
.settings-row-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
}

/* Settings section header flex layout */
.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Info row (alternate naming for .info-item) */
.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.875rem;
  gap: 16px;
}
.info-row .info-label { color: var(--text-secondary); flex-shrink: 0; font-size: 0.82rem; }
.info-row .info-value { font-weight: 600; color: var(--text-primary); text-align: right; }

/* News card image (alternate naming for .news-card-img) */
.news-card-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

/* Report card sub-elements */
.report-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}
.report-card-body { flex: 1; min-width: 0; }
.report-card-type { margin-bottom: 4px; }
.report-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.report-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.775rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.report-card-meta i { margin-right: 3px; }
.report-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================================
   32. CRM — LEADS LIST & FOLLOW-UP SYSTEM
   ============================================================ */

/* CRM Layout: left nav + main content */
.crm-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}

/* CRM Left Nav */
.crm-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px;
  position: sticky;
  top: calc(var(--navbar-height) + 20px);
}
.crm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.crm-nav-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.crm-nav-item.active { background: rgba(0,86,178,0.08); color: var(--primary); font-weight: 700; }
.crm-nav-item i { width: 16px; text-align: center; }
.crm-nav-count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}
.crm-nav-item.active .crm-nav-count {
  background: rgba(0,86,178,0.12);
  color: var(--primary);
}

/* ============================================================
   PROJECT TODO REVIEW BOARD
   ============================================================ */
.project-todo-nav {
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.todo-board-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.todo-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.todo-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.todo-summary-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.todo-summary-label {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.todo-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-filter {
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.todo-filter:hover,
.todo-filter.active {
  background: rgba(0,86,178,0.08);
  border-color: rgba(0,86,178,0.22);
  color: var(--primary);
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.todo-card.done {
  opacity: 0.76;
  background: linear-gradient(135deg, rgba(16,185,129,0.05), rgba(255,255,255,1));
}

.todo-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.todo-type,
.todo-state {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.todo-type {
  color: var(--primary);
  background: rgba(0,86,178,0.08);
}

.todo-state {
  color: var(--success);
  background: rgba(16,185,129,0.1);
}

.todo-card:not(.done) .todo-state {
  color: #b45309;
  background: rgba(245,158,11,0.12);
}

.todo-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.todo-summary {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.todo-meta i {
  color: var(--primary);
  margin-right: 5px;
}

.todo-note {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.65;
}

.todo-note strong {
  color: var(--text-primary);
}

.todo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 136px;
}

.todo-highlight-target {
  position: relative;
  outline: 3px solid rgba(245,158,11,0.78);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(245,158,11,0.12), var(--shadow-lg);
  z-index: 3;
}

.todo-highlight-label {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(360px, calc(100% - 24px));
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #111827;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

/* ============================================================
   DASHBOARD SEARCH ENTRY
   ============================================================ */
.dashboard-search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.dashboard-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dashboard-search-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1.35;
}

.dashboard-search-desc {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dashboard-search-source {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  flex-shrink: 0;
}

.dashboard-search-source button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-search-source button.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.dashboard-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-search-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0,86,178,0.04), rgba(0,233,207,0.04));
}

.dashboard-search-main:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,86,178,0.08);
}

.dashboard-search-main i {
  color: var(--primary);
}

.dashboard-search-main input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-search-main input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-search-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.dashboard-search-submit {
  height: 38px;
  white-space: nowrap;
}

.dashboard-search-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dashboard-search-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
}

.dashboard-search-shortcuts a:hover {
  color: var(--primary);
  border-color: rgba(0,86,178,0.28);
  background: rgba(0,86,178,0.06);
}

/* Exhibition priority surfaces */
.exhibition-priority-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(0,86,178,0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0,86,178,0.06), rgba(0,233,207,0.05));
  box-shadow: var(--shadow-sm);
}

.exhibition-priority-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 900;
}

.exhibition-priority-desc {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.exhibition-priority-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.exhibition-priority-metrics span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 11px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
}

.exhibition-priority-metrics strong {
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
}

.source-check-card {
  border: 1px solid rgba(16,185,129,0.18);
  background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(255,255,255,1));
}

.source-check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.source-check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.55;
}

.source-check-item i {
  margin-top: 2px;
  color: var(--success);
}

@media (max-width: 768px) {
  .todo-summary-grid,
  .todo-card {
    grid-template-columns: 1fr;
  }

  .todo-actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dashboard-search-head,
  .dashboard-search-source {
    width: 100%;
  }

  .dashboard-search-head {
    flex-direction: column;
  }

  .dashboard-search-source button {
    flex: 1;
    justify-content: center;
  }

  .dashboard-search-fields {
    grid-template-columns: 1fr;
  }

  .exhibition-priority-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .exhibition-priority-metrics {
    justify-content: flex-start;
  }
}
.crm-nav-divider {
  height: 1px;
  background: var(--border-light);
  margin: 6px 0;
}

/* Lead Card */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition-slow);
  cursor: pointer;
  position: relative;
}
.lead-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0,86,178,0.18);
  transform: translateY(-1px);
}
.lead-card.selected {
  border-color: var(--primary);
  background: rgba(0,86,178,0.02);
  box-shadow: 0 0 0 2px rgba(0,86,178,0.12);
}
.lead-card-logo {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
  color: white;
}
.lead-card-main { flex: 1; min-width: 0; }
.lead-card-name {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.775rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.lead-card-meta i { margin-right: 3px; }
.lead-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
}
.lead-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.lead-score {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.lead-score.high   { background: rgba(16,185,129,0.12); color: #059669; }
.lead-score.medium { background: rgba(245,158,11,0.12); color: #d97706; }
.lead-score.low    { background: rgba(148,163,184,0.12); color: #64748b; }

.lead-last-follow {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* Lead Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-new        { background: rgba(59,130,246,0.1);  color: #2563eb; }
.status-contacted  { background: rgba(0,86,178,0.1);    color: var(--primary); }
.status-interested { background: rgba(16,185,129,0.1);  color: #059669; }
.status-negotiating{ background: rgba(245,158,11,0.1);  color: #d97706; }
.status-closed     { background: rgba(16,185,129,0.18); color: #047857; }
.status-lost       { background: rgba(239,68,68,0.1);   color: #dc2626; }

/* CRM Stats bar */
.crm-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.crm-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.crm-stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.crm-stat-value { font-size: 1.4rem; font-weight: 800; font-family: 'Montserrat', sans-serif; line-height: 1; }
.crm-stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* Right Drawer / Panel */
.crm-drawer {
  position: fixed;
  top: var(--navbar-height);
  right: -520px;
  width: 500px;
  height: calc(100vh - var(--navbar-height));
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
  overflow: hidden;
}
.crm-drawer.open { right: 0; }
.crm-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.3);
  z-index: 149;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.crm-drawer-overlay.active { opacity: 1; pointer-events: auto; }

.crm-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: var(--bg-card);
}
.crm-drawer-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); flex: 1; }
.crm-drawer-close {
  width: 30px; height: 30px;
  background: var(--bg-subtle);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.crm-drawer-close:hover { background: var(--border); color: var(--text-primary); }

.crm-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.crm-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: var(--bg-card);
}

/* Follow-up Timeline */
.follow-timeline { display: flex; flex-direction: column; gap: 0; }
.follow-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.follow-item:not(:last-child) .follow-dot-col::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}
.follow-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}
.follow-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: white;
  flex-shrink: 0;
  z-index: 1;
}
.follow-content { flex: 1; min-width: 0; padding-top: 3px; }
.follow-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.follow-type { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.follow-time { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.follow-body { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.65; }
.follow-person { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }

/* CRM State Pipeline */
.pipeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}
.pipeline-track::-webkit-scrollbar { display: none; }
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}
.pipeline-node {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.pipeline-node.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.pipeline-node.done {
  background: rgba(16,185,129,0.1);
  color: #059669;
  border-color: rgba(16,185,129,0.3);
}
.pipeline-node.lost {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border-color: rgba(239,68,68,0.2);
}
.pipeline-arrow {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Batch action bar */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(0,86,178,0.06), rgba(0,86,178,0.02));
  border: 1px solid rgba(0,86,178,0.15);
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.82rem;
}
.batch-bar.hidden { display: none; }

/* Priority indicator */
.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.priority-high   { background: var(--danger); }
.priority-medium { background: var(--warning); }
.priority-low    { background: var(--text-muted); }

/* ============================================================
   33. DATA PACKAGES PAGE
   ============================================================ */
.pkg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.pkg-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}
.pkg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pkg-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pkg-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.pkg-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.pkg-desc { font-size: 0.78rem; color: var(--text-secondary); }
.pkg-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.pkg-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pkg-stat-value { font-size: 1.1rem; font-weight: 800; font-family: 'Montserrat', sans-serif; color: var(--text-primary); }
.pkg-stat-label { font-size: 0.68rem; color: var(--text-muted); }
.pkg-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pkg-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-subtle);
  overflow: hidden;
}
.pkg-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s ease;
}

/* Market store cards */
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
}
.market-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.market-card-img {
  width: 100%; height: 120px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.6);
}
.market-card-body { padding: 16px; }
.market-card-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.market-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.market-card-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.market-card-price .price-unit { font-size: 0.78rem; font-weight: 500; color: var(--text-muted); }


/* ============================================================
   TOKEN SYSTEM STYLES
   ============================================================ */

/* Token Balance Display in Navbar */
.token-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(0,86,178,0.08), rgba(0,233,207,0.08));
  border: 1px solid rgba(0,86,178,0.15);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 8px;
}
.token-balance:hover {
  background: linear-gradient(135deg, rgba(0,86,178,0.12), rgba(0,233,207,0.12));
  border-color: var(--primary);
  transform: translateY(-1px);
}
.token-icon {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: white;
  font-weight: 700;
}
.token-amount {
  font-size: 0.9rem;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.3px;
}

/* Token Progress Bar */
.token-progress-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}
.token-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.token-progress-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.token-progress-values {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.token-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.token-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Token Cost Badge */
.token-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0,86,178,0.08);
  border: 1px solid rgba(0,86,178,0.2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 8px;
}
.token-cost-badge.warning {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.3);
  color: var(--warning);
}
.token-cost-badge.danger {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.3);
  color: var(--danger);
}

/* Token Consumption Modal */
.token-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5,15,46,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.token-confirm-modal.active {
  opacity: 1;
  pointer-events: all;
}
.token-confirm-box {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.token-confirm-modal.active .token-confirm-box {
  transform: scale(1);
}
.token-confirm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.token-confirm-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
}
.token-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.token-confirm-body {
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.token-confirm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.token-confirm-item:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.token-confirm-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.token-confirm-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.token-confirm-value.large {
  font-size: 1.2rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
}
.token-confirm-value.danger {
  color: var(--danger);
}
.token-confirm-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Pricing Tiers */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: var(--transition-slow);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.pricing-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0,86,178,0.15);
  transform: scale(1.05);
}
.pricing-card.recommended::before {
  content: 'ǿ���Ƽ�';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pricing-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0,86,178,0.1);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}
.pricing-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  margin-bottom: 20px;
}
.pricing-price-symbol {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-right: 2px;
}
.pricing-price-amount {
  font-size: 2.8rem;
  font-weight: 900;
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
  line-height: 1;
}
.pricing-price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 6px;
}
.pricing-token {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(0,86,178,0.05), rgba(0,233,207,0.05));
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.pricing-token-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
}
.pricing-token-amount {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
}
.pricing-token-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.pricing-features {
  list-style: none;
  margin-bottom: 24px;
}
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.pricing-feature i {
  color: var(--success);
  margin-top: 2px;
  flex-shrink: 0;
}
.pricing-cta {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.pricing-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,86,178,0.3);
}
.pricing-card.recommended .pricing-cta {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* Token History Table */
.token-history-row {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}
.token-history-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 140px;
}
.token-history-action {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.token-history-amount {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  min-width: 100px;
  text-align: right;
}
.token-history-amount.negative {
  color: var(--danger);
}
.token-history-amount.positive {
  color: var(--success);
}

/* Token Recharge Cards */
.token-recharge-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition-slow);
}
.token-recharge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.token-recharge-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,86,178,0.15);
}
.token-recharge-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.token-recharge-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.token-recharge-amount {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.token-recharge-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.token-recharge-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-top: 12px;
}
.token-recharge-save {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 600;
  margin-left: 6px;
}


/* ============================================================
   CUSTOMS DATA - MATCH SCORE BADGES
   ============================================================ */
.match-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 900;
  font-family: 'Montserrat', sans-serif;
  color: white;
  background: linear-gradient(135deg, var(--text-muted), var(--text-secondary));
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.match-score-badge.high {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(0, 86, 178, 0.3);
}

.match-score-badge.medium {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 12px rgba(0, 233, 207, 0.3);
}

.match-score-badge.low {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3);
  color: var(--text-primary);
}

.match-score-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Match dimension bars (for detail modal) */
.match-dim-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.match-dim-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.match-dim-bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.match-dim-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.match-dim-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  text-align: right;
}
