/* Aerostatic Marketing and Design - Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-primary:    #0a0e27;
  --bg-secondary:  #131829;
  --bg-card:       #1a1f3a;
  --bg-hover:      #242e52;
  --bg-accent:     #2d3a6f;
  --border:        rgba(255,255,255,0.08);
  --border-light:  rgba(255,255,255,0.12);
  --text-primary:  #f0f4ff;
  --text-secondary:#a0aac0;
  --text-muted:    #606b88;
  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-dark:   #4f46e5;
  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;
  --radius:        16px;
  --radius-sm:     8px;
  --shadow:        0 8px 32px rgba(0,0,0,0.3);
  --shadow-glow:   0 0 60px rgba(99,102,241,0.2);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.15);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SIDEBAR ──────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100vh; height: 100dvh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; }
.logo-sub  { font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; }

.nav-section { margin-bottom: 24px; }
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; padding: 0 8px; margin-bottom: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: rgba(99,102,241,0.15); color: var(--accent-light); }
.nav-item .badge { margin-left: auto; background: var(--accent); color: white; font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── MAIN ─────────────────────────────────────── */
.main { margin-left: 240px; min-height: 100vh; }

.topbar {
  height: 60px;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.topbar-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; gap: 8px; }

.content { padding: 32px; }

/* ── CARDS ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-light); }
.card-sm { padding: 16px; }

/* ── KPI CARDS ────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--kpi-color, var(--accent));
}
.kpi-icon { font-size: 28px; margin-bottom: 12px; }
.kpi-value { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; line-height: 1; }
.kpi-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.kpi-trend { font-size: 12px; margin-top: 8px; }
.kpi-trend.up   { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ── GRID LAYOUTS ──────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── PIPELINE ──────────────────────────────────── */
.pipeline-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; }
.pipeline-col {
  min-width: 220px; flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.pipeline-col-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.pipeline-col-header .count { margin-left: auto; background: var(--bg-primary); padding: 2px 8px; border-radius: 20px; font-size: 11px; }

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 8px;
  cursor: pointer; transition: all 0.2s;
}
.pipeline-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.pipeline-card .client-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pipeline-card .client-industry { font-size: 11px; color: var(--text-muted); }

/* ── TAGS / BADGES ──────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: rgba(99,102,241,0.15); color: var(--accent-light);
}
.tag.green  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.tag.yellow { background: rgba(245,158,11,0.15); color: #fcd34d; }
.tag.red    { background: rgba(239,68,68,0.15);  color: #f87171; }
.tag.blue   { background: rgba(59,130,246,0.15); color: #93c5fd; }

/* ── AVATAR ─────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
}

/* ── TABLE ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: none; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 16px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.btn-icon:hover { background: var(--bg-hover); border-color: var(--border-light); }

/* ── PROCESS STEPS ──────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 16px;
  padding: 16px 0; position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute; left: 19px; top: 48px;
  width: 2px; height: calc(100% - 16px);
  background: var(--border);
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-secondary); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; z-index: 1;
}
.step-num.done { background: var(--accent); border-color: var(--accent); }
.step-content { flex: 1; padding-top: 6px; }
.step-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.step-meta  { font-size: 12px; color: var(--text-muted); }

/* ── INTEGRATION CARDS ──────────────────────────── */
.integration-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all 0.2s; cursor: pointer; text-decoration: none;
}
.integration-card:hover { border-color: var(--border-light); background: var(--bg-hover); }
.integration-icon { font-size: 24px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.integration-info { flex: 1; }
.integration-name { font-size: 14px; font-weight: 600; }
.integration-desc { font-size: 12px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.connected    { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.status-dot.pending      { background: var(--warning); }
.status-dot.recommended  { background: var(--info); }

/* ── SEARCH ─────────────────────────────────────── */
.search-input {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 16px;
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }

/* ── SECTION HEADERS ────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; }
.section-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── PAGE ────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── PROGRESS BAR ───────────────────────────────── */
.progress-bar { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* ── TOAST ──────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 14px; box-shadow: var(--shadow);
  animation: slideIn 0.3s ease; max-width: 320px;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── APP SHELL (default.php) ────────────────────── */
.logo-section {
  display: flex; align-items: center; gap: 12px;
  padding: 0 8px 20px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.logo-icon { flex-shrink: 0; }
.logo-copy { min-width: 0; }
.logo-subtitle { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; }
.logo-section .logo-text { font-size: 16px; line-height: 1.2; }
.sidebar-close { display: none; margin-left: auto; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.nav-text { overflow: hidden; text-overflow: ellipsis; }

.user-info { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-details { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.user-role { font-size: 11px; color: var(--text-muted); }

.sidebar-backdrop { display: none; }
.menu-toggle { display: none; }

.main-content { margin-left: 240px; min-height: 100vh; min-width: 0; }

.top-header {
  position: sticky; top: 0; z-index: 50;
  height: 64px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(10,14,39,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-left h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-right { display: flex; gap: 8px; flex-shrink: 0; }

.page-content { padding: 32px; max-width: 1440px; margin: 0 auto; }
.page-content > .card + .card { margin-top: 24px; }

/* ── DASHBOARD GRID ─────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card-full { grid-column: 1 / -1; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.card-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: rgba(34,197,94,0.15); color: #4ade80;
}
.card-header .badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* Pipeline mini */
.pipeline-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.pipeline-bar {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
}
.pipeline-stage-name {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
}
.pipeline-bar-fill {
  height: 8px; border-radius: 4px; font-size: 0; overflow: hidden;
}

/* Clientes recientes */
.clients-list, .integrations-list { display: flex; flex-direction: column; gap: 4px; }
.client-item, .integration-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: var(--radius-sm); transition: background 0.2s;
}
.client-item { cursor: pointer; }
.client-item:hover, .integration-item:hover { background: var(--bg-hover); }
.client-avatar, .client-card-avatar {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--client-color, var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.client-info { flex: 1; min-width: 0; }
.client-info .client-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-info .client-industry { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-status {
  flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: rgba(99,102,241,0.15); color: var(--accent-light);
}

/* Estado de integraciones */
.integration-item .integration-icon { width: 38px; height: 38px; font-size: 18px; flex-shrink: 0; }
.integration-item h4 { font-size: 14px; font-weight: 600; }
.integration-status { flex-shrink: 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.integration-status.active   { color: #4ade80; }
.integration-status.inactive { color: var(--text-muted); }

/* ── PAGE GRIDS ─────────────────────────────────── */
.clients-grid, .services-grid, .integrations-full {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.services-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.client-card, .service-card, .integrations-full .integration-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.client-card { cursor: pointer; }
.client-card:hover, .service-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.client-card-avatar { width: 44px; height: 44px; margin-bottom: 12px; }
.client-card h3, .service-card h3, .integrations-full h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.client-card p, .integrations-full p { font-size: 13px; color: var(--text-muted); }
.client-services { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.service-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
}

.service-card { border-top: 3px solid var(--service-color, var(--accent)); }
.service-icon { font-size: 28px; margin-bottom: 10px; }
.service-unit { font-size: 12px; color: var(--text-muted); }

.search-input { width: 100%; max-width: 280px; }

/* Integraciones (página completa) */
.integrations-full .integration-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; cursor: default; }
.integration-card-icon {
  width: 44px; height: 44px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border-radius: var(--radius-sm);
}
.integration-card-status { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--text-secondary); }
.status-dot { background: var(--success); }
.status-dot.inactive { background: var(--text-muted); box-shadow: none; }

/* Pipeline detallado */
.pipeline-board { align-items: flex-start; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.pipeline-col { scroll-snap-align: start; }

/* Procesos */
.processes-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
.process-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; min-width: 0;
}
.process-title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 600;
}
.process-icon { font-size: 22px; }
.process-steps { display: flex; flex-direction: column; }
.process-step { display: flex; gap: 14px; padding: 12px 0; position: relative; }
.process-step:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 44px; bottom: -12px;
  width: 2px; background: var(--border);
}
.step-number {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); border: 2px solid var(--accent);
  font-size: 13px; font-weight: 700; color: var(--accent-light);
}
.process-step .step-content { min-width: 0; padding-top: 3px; }
.process-step h4 { font-size: 14px; font-weight: 600; }
.process-step p { font-size: 12px; color: var(--text-secondary); overflow-wrap: anywhere; }
.process-step .step-time { color: var(--text-muted); }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar { width: 60px; padding: 16px 8px; }
  .logo-text, .logo-sub, .nav-label, .nav-item .nav-text { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item .badge { display: none; }
  .main { margin-left: 60px; }
}

/* Tablet: sidebar colapsado a iconos */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: 72px; padding: 20px 10px; }
  .logo-section { justify-content: center; padding: 0 0 16px; }
  .logo-copy, .user-details { display: none; }
  .user-info { justify-content: center; padding: 0; }
  .main-content { margin-left: 72px; }
  .top-header, .page-content { padding-left: 24px; padding-right: 24px; }
  .page-content { padding-top: 24px; padding-bottom: 24px; }
}

#kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) {
  #kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .processes-container { grid-template-columns: minmax(0, 1fr); }
}

/* Móvil: sidebar como drawer */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }

  .sidebar {
    width: min(280px, 85vw); padding: 20px 16px;
    padding-top: calc(20px + env(safe-area-inset-top));
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: var(--shadow);
    z-index: 200;
  }
  .sidebar .nav-text, .sidebar .logo-text { display: block; }
  .sidebar .nav-item { justify-content: flex-start; padding: 12px; font-size: 15px; }
  .sidebar-close { display: inline-flex; }
  .sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 150;
    background: rgba(5,7,20,0.6);
    opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
  }
  .sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-open { overflow: hidden; }

  .menu-toggle { display: inline-flex; }
  .main-content { margin-left: 0; }
  .top-header { height: 56px; padding: 0 16px; }
  .header-left h1 { font-size: 17px; }
  .page-content { padding: 16px; }

  .card { padding: 16px; }
  .card-header { margin-bottom: 16px; }
  .card-header h2 { font-size: 16px; }
  .search-input { max-width: none; }

  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
  .kpi-card { padding: 16px; }
  .kpi-icon { font-size: 22px; margin-bottom: 8px; }
  .kpi-value { font-size: 26px; }
  .kpi-label { font-size: 12px; }
  .dashboard-grid { gap: 16px; }
  .pipeline-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

  .pipeline-board { margin: 0 -16px; padding: 0 16px 12px; scroll-padding: 0 16px; }
  .pipeline-col { min-width: 78%; }

  .clients-grid, .services-grid, .integrations-full { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { padding: 16px; }
  .process-card { padding: 16px; }

  .toast-container { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}

@media (max-width: 400px) {
  .header-right { gap: 6px; }
  .kpi-value { font-size: 22px; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── GLOW EFFECTS ───────────────────────────────── */
.glow-accent { box-shadow: 0 0 30px rgba(99,102,241,0.2); }

/* ── HUBSPOT BUTTON ─────────────────────────────── */
.hubspot-btn {
  background: linear-gradient(135deg, #ff7a59, #ff5c35);
  color: white; padding: 10px 20px;
  border-radius: var(--radius-sm); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-size: 14px; border: none; cursor: pointer;
  transition: opacity 0.2s;
}
.hubspot-btn:hover { opacity: 0.9; }

/* ── FRAMEWORK CARDS ────────────────────────────── */
.framework-card {
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.framework-priority { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.framework-title { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.framework-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.framework-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.dot-green  { color: #4ade80; }
.dot-yellow { color: #fcd34d; }
.dot-blue   { color: #93c5fd; }
