/* ═══════════════════════════════════════════════════════════════
   MapScrapX — Dashboard Home (Enterprise) · dashboard-pro.css
   Namespaced under .dash — premium home experience
   ═══════════════════════════════════════════════════════════════ */

.dash {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */
.dash-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-7);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background:
    radial-gradient(900px 240px at 8% -40%, var(--primary-subtle), transparent 60%),
    var(--gradient-surface);
  overflow: hidden;
}
.dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-sheen);
  pointer-events: none;
}
.dash-hero-left { position: relative; z-index: 1; min-width: 0; }
.dash-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.dash-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-muted);
  animation: dashPulse 2.4s ease-in-out infinite;
}
@keyframes dashPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.dash-hero-title {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0;
}
.dash-hero-sub {
  margin-top: var(--space-2);
  font-size: var(--fs-base);
  color: var(--text-secondary);
  max-width: 46ch;
}
.dash-hero-actions {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: var(--space-2-5);
  flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end;
}

.dash-select {
  appearance: none;
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3-5);
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ba1b0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.dash-select:hover { border-color: var(--border-color-hover); background-color: var(--bg-surface-hover); }
.dash-select:focus { outline: none; border-color: var(--border-color-focus); box-shadow: var(--shadow-ring-primary); }

.dash-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3-5);
  font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.dash-btn svg { width: 15px; height: 15px; }
.dash-btn:hover { border-color: var(--border-color-hover); background: var(--bg-surface-hover); transform: translateY(-1px); }
.dash-btn-primary {
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, var(--shadow-glow);
}
.dash-btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow-lg); }
.dash-btn-ghost { background: transparent; }
.dash-btn-ghost:hover { background: var(--bg-surface-hover); }

/* ─────────────────────────────────────────────
   GRID SYSTEM
   ───────────────────────────────────────────── */
.dash-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(12, 1fr); }
.dash-col-3 { grid-column: span 3; }
.dash-col-4 { grid-column: span 4; }
.dash-col-5 { grid-column: span 5; }
.dash-col-6 { grid-column: span 6; }
.dash-col-7 { grid-column: span 7; }
.dash-col-8 { grid-column: span 8; }
.dash-col-12 { grid-column: span 12; }

/* ─────────────────────────────────────────────
   CARD
   ───────────────────────────────────────────── */
.dash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal), transform var(--duration-normal);
  min-width: 0;
}
.dash-card:hover { border-color: var(--border-color-hover); box-shadow: var(--shadow-md); }
.dash-card-pad { padding: var(--space-5); }
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
}
.dash-card-head-titles { min-width: 0; }
.dash-card-title {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-base); font-weight: var(--fw-bold);
  color: var(--text-primary); letter-spacing: var(--ls-tight);
}
.dash-card-title .tt-ic {
  width: 26px; height: 26px; border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-muted); color: var(--primary-hover);
}
.dash-card-title .tt-ic svg { width: 15px; height: 15px; }
.dash-card-sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.dash-card-body { padding: var(--space-5); }

.dash-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold);
  background: var(--bg-canvas-accent); color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.dash-chip.ok { color: var(--success); background: var(--success-bg); border-color: transparent; }
.dash-chip.ai { color: var(--cyan); background: var(--cyan-muted); border-color: transparent; }
.dash-link { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--primary-hover); cursor: pointer; }
.dash-link:hover { color: var(--primary); }

/* ─────────────────────────────────────────────
   KPI TILES
   ───────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.kpi-tile {
  position: relative;
  padding: var(--space-4-5, var(--space-4));
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color var(--duration-normal), transform var(--duration-normal), box-shadow var(--duration-normal);
}
.kpi-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-line, var(--primary)); opacity: .8;
}
.kpi-tile:hover { transform: translateY(-2px); border-color: var(--border-color-hover); box-shadow: var(--shadow-md); }
.kpi-tile.k-leads { --accent-line: var(--primary); }
.kpi-tile.k-gbp { --accent-line: var(--info); }
.kpi-tile.k-audit { --accent-line: var(--cyan); }
.kpi-tile.k-rev { --accent-line: var(--success); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.kpi-ic {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-canvas-accent); color: var(--text-secondary);
}
.kpi-tile.k-leads .kpi-ic { background: var(--primary-muted); color: var(--primary-hover); }
.kpi-tile.k-gbp .kpi-ic { background: var(--info-muted); color: var(--info); }
.kpi-tile.k-audit .kpi-ic { background: var(--cyan-muted); color: var(--cyan); }
.kpi-tile.k-rev .kpi-ic { background: var(--success-muted); color: var(--success); }
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); }
.kpi-value {
  font-size: 1.75rem; font-weight: var(--fw-extrabold); letter-spacing: var(--ls-tight);
  color: var(--text-primary); line-height: 1.1; margin-top: 2px;
}
.kpi-foot { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.kpi-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  padding: 2px 7px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.03); color: var(--text-muted);
}
.kpi-trend.up { color: var(--success); background: var(--success-bg); }
.kpi-trend.down { color: var(--error); background: var(--error-bg); }
.kpi-foot-note { font-size: var(--fs-2xs); color: var(--text-faint); }

/* mini sparkline */
.kpi-spark { position: absolute; right: var(--space-3); bottom: var(--space-3); width: 68px; height: 26px; opacity: .5; }

/* ─────────────────────────────────────────────
   PERFORMANCE CHART
   ───────────────────────────────────────────── */
.chart-tabs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-sm); background: var(--bg-canvas-accent); flex-wrap: wrap; }
.chart-tab-btn {
  padding: 5px 11px; border: none; background: transparent;
  font-family: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); border-radius: var(--radius-xs); cursor: pointer;
  transition: all var(--duration-fast);
}
.chart-tab-btn:hover { color: var(--text-secondary); }
.chart-tab-btn.active { color: var(--text-primary); background: var(--bg-elevated); box-shadow: var(--shadow-xs); }
#overview-chart-canvas { width: 100%; min-height: 240px; }
.svg-chart-grid line { stroke: var(--border-color); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-dot { transition: r var(--duration-fast); }
.chart-dot:hover { r: 6; }

.chart-geogrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: var(--space-2); }
.geogrid-cell {
  aspect-ratio: 1; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); color: #fff;
}
.geogrid-cell.rank-1 { background: rgba(16,185,129,.55); }
.geogrid-cell.rank-2 { background: rgba(16,185,129,.4); }
.geogrid-cell.rank-3 { background: rgba(34,211,238,.32); }
.geogrid-cell.rank-4 { background: rgba(245,158,11,.3); }
.geogrid-cell.rank-5 { background: rgba(245,158,11,.22); }
.geogrid-cell.rank-fail { background: rgba(244,63,94,.24); color: rgba(255,255,255,.75); }

/* ─────────────────────────────────────────────
   RING (health + credits)
   ───────────────────────────────────────────── */
.dash-ring-wrap { display: flex; align-items: center; gap: var(--space-5); }
.dash-ring { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.dash-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-ring-track { fill: none; stroke: var(--bg-canvas-accent); stroke-width: 3.4; }
.dash-ring-bar { fill: none; stroke-width: 3.4; stroke-linecap: round; transition: stroke-dasharray var(--duration-slower) var(--ease-out); }
.dash-ring-bar.grad-health { stroke: var(--success); }
.dash-ring-bar.grad-credits { stroke: var(--primary); }
.dash-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.dash-ring-value { font-size: 1.7rem; font-weight: var(--fw-extrabold); color: var(--text-primary); letter-spacing: var(--ls-tight); line-height: 1; }
.dash-ring-unit { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: var(--fw-medium); margin-top: 2px; }

.health-bars { flex: 1; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.health-bar-row { display: flex; flex-direction: column; gap: 5px; }
.health-bar-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-xs); }
.health-bar-label { color: var(--text-secondary); font-weight: var(--fw-medium); }
.health-bar-val { color: var(--text-primary); font-weight: var(--fw-bold); }
.health-bar-track { height: 6px; border-radius: var(--radius-full); background: var(--bg-canvas-accent); overflow: hidden; }
.health-bar-fill { height: 100%; border-radius: var(--radius-full); width: 0; transition: width var(--duration-slower) var(--ease-out); }
.hbf-tech { background: var(--gradient-primary); }
.hbf-gbp { background: var(--gradient-success); }
.hbf-cit { background: linear-gradient(90deg, var(--warning), var(--accent)); }
.hbf-rev { background: linear-gradient(90deg, var(--accent), var(--primary)); }

.credit-meta { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.credit-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); }
.credit-row .lbl { color: var(--text-muted); }
.credit-row .val { color: var(--text-primary); font-weight: var(--fw-semibold); }

/* ─────────────────────────────────────────────
   AI COPILOT PANEL
   ───────────────────────────────────────────── */
.ai-panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34,211,238,.5), rgba(99,91,255,.4), rgba(168,85,247,.5));
  overflow: hidden;
}
.ai-panel-inner {
  position: relative;
  border-radius: calc(var(--radius-lg) - 1px);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(168,85,247,.1), transparent 60%),
    radial-gradient(500px 200px at 0% 100%, rgba(34,211,238,.08), transparent 60%),
    var(--bg-surface);
  padding: var(--space-5);
  height: 100%;
  overflow: hidden;
}
.ai-panel-inner::before {
  content: ""; position: absolute; top: -40%; left: -10%; width: 60%; height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  transform: rotate(18deg); animation: aiSheen 6s linear infinite;
  pointer-events: none;
}
@keyframes aiSheen { 0% { transform: translateX(-120%) rotate(18deg); } 100% { transform: translateX(320%) rotate(18deg); } }
.ai-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.ai-orb {
  width: 38px; height: 38px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-ai); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(99,91,255,.7);
}
.ai-orb svg { width: 20px; height: 20px; }
.ai-title { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-primary); }
.ai-status { font-size: var(--fs-2xs); color: var(--cyan); font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: 5px; }
.ai-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: dashPulse 2s infinite; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.ai-chip {
  font-size: var(--fs-2xs); font-weight: var(--fw-medium);
  padding: 6px 11px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.04); border: 1px solid var(--glass-border);
  color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast);
}
.ai-chip:hover { color: var(--text-primary); border-color: rgba(168,85,247,.4); background: var(--accent-muted); }
.ai-inputbar {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 5px 5px 5px var(--space-3-5); border-radius: var(--radius-md);
  background: var(--bg-input); border: 1px solid var(--border-color);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.ai-inputbar:focus-within { border-color: var(--border-color-focus); box-shadow: var(--shadow-ring-primary); }
.ai-inputbar input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: inherit; font-size: var(--fs-sm); color: var(--text-primary);
}
.ai-inputbar input::placeholder { color: var(--text-muted); }
.ai-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: none; border-radius: var(--radius-sm);
  background: var(--gradient-ai); color: #fff; cursor: pointer;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.ai-send:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -4px rgba(99,91,255,.6); }
.ai-send svg { width: 16px; height: 16px; }

/* ─────────────────────────────────────────────
   GBP METRIC STRIP
   ───────────────────────────────────────────── */
.gbp-metrics { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-2); }
.gbp-metric {
  padding: var(--space-3); border-radius: var(--radius-sm);
  background: var(--bg-canvas-accent); border: 1px solid var(--border-color);
  min-width: 0;
}
.gbp-metric .gm-label { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--text-muted); margin-bottom: 6px; }
.gbp-metric .gm-label svg { width: 13px; height: 13px; opacity: .8; }
.gbp-metric .gm-value { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text-primary); line-height: 1; }
.gbp-metric .kpi-trend { margin-top: 6px; }

/* GBP layout: heatmap + table */
.gbp-split { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-5); align-items: start; }
.gbp-heat-title { font-size: var(--fs-xs); color: var(--text-secondary); font-weight: var(--fw-semibold); margin-bottom: var(--space-2); display: flex; align-items: center; justify-content: space-between; }
.gbp-heat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.gbp-heat .geogrid-cell { border-radius: var(--radius-xs); font-size: var(--fs-2xs); }
.gbp-heat-legend { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); flex-wrap: wrap; }
.gbp-legend-item { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--text-muted); }
.gbp-legend-dot { width: 9px; height: 9px; border-radius: 3px; }

/* ─────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────── */
.dash-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.dash-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
.dash-table thead th {
  text-align: left; padding: var(--space-2-5) var(--space-3);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: var(--ls-wide); color: var(--text-muted);
  background: var(--bg-canvas-accent); border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.dash-table tbody td { padding: var(--space-3); border-bottom: 1px solid var(--border-color); color: var(--text-secondary); vertical-align: middle; }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover td { background: var(--bg-surface-hover); }

.biz-profile-cell { display: flex; align-items: center; gap: var(--space-2-5); }
.biz-profile-img {
  width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-muted); font-size: var(--fs-base);
}
.biz-name-meta { display: flex; flex-direction: column; min-width: 0; }
.biz-name-title { font-weight: var(--fw-semibold); color: var(--text-primary); }
.biz-category-lbl { font-size: var(--fs-2xs); color: var(--text-muted); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius-full); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.status-badge.connected { color: var(--success); background: var(--success-bg); }
.status-badge.connected::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.rating-star-lbl { display: inline-flex; align-items: center; gap: 4px; color: var(--text-primary); font-weight: var(--fw-semibold); }
.rating-star-icon { color: var(--warning); }
.health-pill { display: inline-flex; padding: 3px 9px; border-radius: var(--radius-full); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.health-pill.excellent { color: var(--success); background: var(--success-bg); }
.verification-check { color: var(--success); font-weight: var(--fw-bold); }

/* ─────────────────────────────────────────────
   PIPELINE / KANBAN
   ───────────────────────────────────────────── */
.dash-kanban { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-1); }
.kanban-col { display: flex; flex-direction: column; gap: var(--space-2-5); min-width: 150px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-1); }
.kanban-col-name { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-secondary); }
.kanban-col-dot { width: 8px; height: 8px; border-radius: 50%; }
.kanban-col-count { font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--text-muted); background: var(--bg-canvas-accent); padding: 1px 7px; border-radius: var(--radius-full); }
.kanban-col-cards { display: flex; flex-direction: column; gap: var(--space-2); min-height: 40px; }
.kanban-card {
  padding: var(--space-3); border-radius: var(--radius-sm);
  background: var(--bg-surface); border: 1px solid var(--border-color);
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color var(--duration-fast), transform var(--duration-fast);
}
.kanban-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kanban-card-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.kanban-card-city { font-size: var(--fs-2xs); color: var(--text-muted); }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-2xs); color: var(--text-secondary); margin-top: 2px; }
.kanban-card-meta span:last-child { color: var(--success); }

/* ─────────────────────────────────────────────
   AUTOMATIONS / TOOL TILES
   ───────────────────────────────────────────── */
.tool-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: var(--space-3); }
.tool-tile {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); border-radius: var(--radius-md);
  border: 1px solid var(--border-color); background: var(--bg-surface);
  cursor: pointer; transition: all var(--duration-normal) var(--ease-out); overflow: hidden;
}
.tool-tile:hover { transform: translateY(-3px); border-color: var(--border-color-hover); box-shadow: var(--shadow-md); }
.tool-tile-ic {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-muted); color: var(--primary-hover);
}
.tool-tile-ic svg { width: 18px; height: 18px; }
.tool-tile-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.tool-tile-foot { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-2xs); color: var(--text-muted); }
.tool-tile-status { display: inline-flex; align-items: center; gap: 4px; }
.tool-tile-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.automation-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-canvas-accent); }
.automation-ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: var(--accent-muted); color: var(--accent-hover); flex-shrink: 0; }
.automation-ic svg { width: 16px; height: 16px; }
.automation-meta { flex: 1; min-width: 0; }
.automation-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.automation-desc { font-size: var(--fs-2xs); color: var(--text-muted); }

/* ─────────────────────────────────────────────
   TASKS
   ───────────────────────────────────────────── */
.task-item-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2-5) 0; border-bottom: 1px solid var(--border-color); }
.task-item-row:last-child { border-bottom: none; }
.task-checkbox-input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.task-item-row label { font-size: var(--fs-sm); color: var(--text-secondary); cursor: pointer; flex: 1; }
.task-checkbox-input:checked ~ label { color: var(--text-faint); text-decoration: line-through; }
.task-tag { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); padding: 2px 8px; border-radius: var(--radius-full); }
.task-tag.high { color: var(--error); background: var(--error-bg); }
.task-tag.med { color: var(--warning); background: var(--warning-bg); }
.task-tag.low { color: var(--text-muted); background: var(--bg-canvas-accent); }

/* ─────────────────────────────────────────────
   ACTIVITY / FOOTER USAGE BARS
   ───────────────────────────────────────────── */
.activity-item { display: flex; gap: var(--space-3); padding: var(--space-2-5) 0; }
.activity-dot { width: 30px; height: 30px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-canvas-accent); color: var(--text-secondary); }
.activity-dot svg { width: 15px; height: 15px; }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: var(--fs-sm); color: var(--text-secondary); }
.activity-text b { color: var(--text-primary); font-weight: var(--fw-semibold); }
.activity-time { font-size: var(--fs-2xs); color: var(--text-faint); margin-top: 1px; }

.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.usage-item { display: flex; flex-direction: column; gap: var(--space-2); }
.usage-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); }
.usage-label { color: var(--text-secondary); font-weight: var(--fw-medium); }
.usage-val { color: var(--text-primary); font-weight: var(--fw-bold); }
.usage-track { height: 7px; border-radius: var(--radius-full); background: var(--bg-canvas-accent); overflow: hidden; }
.usage-fill { height: 100%; border-radius: var(--radius-full); width: 0; transition: width var(--duration-slower) var(--ease-out); }
.usage-fill.u1 { background: var(--gradient-primary); }
.usage-fill.u2 { background: var(--gradient-success); }
.usage-fill.u3 { background: linear-gradient(90deg, var(--accent), var(--cyan)); }

/* ─────────────────────────────────────────────
   CUSTOMIZER MODAL
   ───────────────────────────────────────────── */
.dash-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: var(--z-modal);
  align-items: center; justify-content: center; padding: var(--space-5);
  background: rgba(3,4,8,.6); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--duration-normal);
}
.dash-modal-overlay.active { opacity: 1; }
.dash-modal-overlay .modal {
  width: 100%; max-width: 460px;
  background: var(--bg-elevated); border: 1px solid var(--border-color);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-2xl);
  transform: translateY(12px) scale(.98); transition: transform var(--duration-normal) var(--ease-out);
  overflow: hidden;
}
.dash-modal-overlay.active .modal { transform: translateY(0) scale(1); }
.dash-modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-color); }
.dash-modal-title { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-primary); }
.dash-modal-close { width: 30px; height: 30px; border: none; background: var(--bg-canvas-accent); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; font-size: var(--fs-md); }
.dash-modal-close:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
.dash-modal-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.dash-modal-foot { display: flex; gap: var(--space-2-5); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border-color); justify-content: flex-end; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; }
.toggle-row label { font-size: var(--fs-sm); color: var(--text-secondary); }
.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--bg-canvas-accent); border: 1px solid var(--border-color); border-radius: var(--radius-full); cursor: pointer; transition: background var(--duration-fast); }
.switch .slider::before { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: transform var(--duration-fast), background var(--duration-fast); }
.switch input:checked + .slider { background: var(--primary-muted); border-color: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); background: var(--primary); }

/* ─────────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────────── */
.dash-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--space-8) var(--space-4); color: var(--text-muted); }
.dash-empty-ic { font-size: 1.6rem; margin-bottom: var(--space-2); opacity: .6; }
.dash-empty h4 { font-size: var(--fs-sm); color: var(--text-secondary); margin: 0 0 4px; }
.dash-empty p { font-size: var(--fs-xs); max-width: 300px; }

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .gbp-metrics { grid-template-columns: repeat(4, 1fr); }
  .dash-col-3 { grid-column: span 6; }
  .dash-col-4 { grid-column: span 6; }
  .dash-col-5 { grid-column: span 12; }
  .dash-col-7 { grid-column: span 12; }
  .dash-col-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .gbp-split { grid-template-columns: 1fr; }
  .usage-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}
@media (max-width: 680px) {
  .dash-hero { flex-direction: column; padding: var(--space-5); }
  .dash-hero-actions { width: 100%; }
  .dash-col-3, .dash-col-4, .dash-col-6 { grid-column: span 12; }
  .gbp-metrics { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 1.5rem; }
  .toggle-grid { grid-template-columns: 1fr; }
}
