/* ═══════════════════════════════════════════════════════
   GHL Uploader — Premium B&W Minimalist Design System
   ═══════════════════════════════════════════════════════ */

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-input: #0d0d0d;
  --bg-tooltip: #1a1a1a;
  --border: #1a1a1a;
  --border-light: #222222;
  --border-focus: #444444;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --text-hint: #444444;
  --accent: #ffffff;
  --accent-dim: #888888;
  --accent-primary: #cccccc;
  --success: #a0a0a0;
  --error: #ff4444;
  --warning: #777777;

  /* Minimal accent highlights */
  --highlight-best: #00e676;
  --highlight-good: #69f0ae;
  --highlight-mid: #ffffff;
  --highlight-low: #666666;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ═══ SCREENS ═══ */
.screen { display: none; }
.screen.active { display: flex; }

/* ─── LOGIN ──────────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 48px 32px;
  position: relative;
  z-index: 2;
}

.login-brand { text-align: center; margin-bottom: 40px; }
.logo-icon { margin-bottom: 20px; opacity: 0.9; }
.logo-icon svg rect { fill: #ffffff !important; }
.logo-icon svg path { fill: #000000 !important; }
.logo-icon svg stop { stop-color: #ffffff !important; }

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.input-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-wrapper { position: relative; display: flex; align-items: center; }

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 48px 14px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.input-wrapper input:focus { border-color: var(--border-focus); }
.input-wrapper input::placeholder { color: var(--text-hint); }

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 14px 24px;
}
.btn-primary:hover { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-full { width: 100%; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 14px;
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-sm { font-size: 0.75rem; padding: 6px 12px; }

.error-msg { color: #ff4444; font-size: 0.8rem; text-align: center; margin-top: 4px; }
.hidden { display: none !important; }
.login-bg-decoration { display: none; }

/* ═══ APP LAYOUT ═══ */
#app-screen {
  flex-direction: column;
  height: 100vh;
  background: var(--bg-primary);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  flex-shrink: 0;
  z-index: 10;
}

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

.header-avatar { position: relative; width: 36px; height: 36px; }
.header-avatar svg rect { fill: #ffffff !important; }
.header-avatar svg path { fill: #000000 !important; }
.header-avatar svg stop { stop-color: #ffffff !important; }

.avatar-status {
  position: absolute;
  bottom: 0; right: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #666;
  border: 2px solid var(--bg-primary);
}

.header-title { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; }
.header-status { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.02em; }

.header-center {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.header-right { display: flex; gap: 8px; }

.tab-panel { display: none; }
.tab-panel.active { display: flex; }

/* ═══ CHAT ═══ */
.chat-area { flex: 1; flex-direction: column; overflow: hidden; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 680px;
  animation: msgIn 0.3s var(--ease);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message.consecutive .msg-avatar { visibility: hidden; }

.msg-avatar { width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; }
.msg-avatar svg rect { fill: #ffffff !important; }
.msg-avatar svg path { fill: #000000 !important; }
.msg-avatar svg stop { stop-color: #ffffff !important; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 560px;
}

.message.bot .msg-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message.user .msg-bubble {
  background: #ffffff;
  color: #000000;
  border-bottom-right-radius: 4px;
}

.message.bot .msg-bubble strong { color: var(--text-primary); font-weight: 600; }

.typing-indicator { display: flex; align-items: center; gap: 10px; padding: 4px 0; }

.typing-dots {
  display: flex; gap: 4px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
}

.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ─── Chat Components ────────────────────────────────── */
.chat-drop-zone {
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  margin-top: 10px;
  background: var(--bg-secondary);
}
.chat-drop-zone:hover, .chat-drop-zone.drag-over {
  border-color: var(--text-muted);
  background: var(--bg-card);
}

.drop-icon { color: var(--text-muted); margin-bottom: 10px; }
.drop-text { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.drop-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.drop-formats { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }

.format-badge {
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

.file-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.file-pill-icon { color: var(--text-muted); }
.file-pill-name { font-size: 0.85rem; font-weight: 600; }
.file-pill-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.chat-table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.chat-table-wrapper table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.chat-table-wrapper th {
  background: var(--bg-secondary);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}
.chat-table-wrapper td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.chat-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chat-btn-primary { background: var(--text-primary); color: var(--bg-primary); }
.chat-btn-primary:hover { opacity: 0.85; }
.chat-btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.chat-btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.chat-btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* Mapping */
.chat-mapping-container { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

.mapping-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
.mapping-row.mapped { border-color: var(--border-focus); }

.mapping-source { flex: 1; min-width: 0; }
.mapping-source-label { font-size: 0.8rem; font-weight: 600; display: block; }
.mapping-source-sample { font-size: 0.65rem; color: var(--text-muted); }
.mapping-arrow { color: var(--text-hint); flex-shrink: 0; }
.mapping-target { flex: 1; }

.mapping-target select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}
.mapping-target select:focus { border-color: var(--border-focus); }

/* Tags */
.tags-search-wrap { position: relative; margin-bottom: 10px; }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.tags-search-inline {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.8rem;
  outline: none;
}
.tags-search-inline:focus { border-color: var(--border-focus); }

.chat-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  user-select: none;
}
.tag-chip:hover { border-color: var(--border-focus); color: var(--text-primary); }
.tag-chip.selected {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}
.tag-check { width: 14px; height: 14px; display: none; }
.tag-chip.selected .tag-check { display: block; }

/* Progress */
.chat-progress {
  margin-top: 10px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.progress-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.8rem; }
.progress-status { font-weight: 600; }
.progress-counter { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.progress-bar-wrapper {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}

.progress-stats { display: flex; gap: 20px; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Errors */
.error-list-chat {
  margin-top: 10px;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.error-list-chat h5 { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 8px; }
.error-item { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.75rem; }
.error-item:last-child { border-bottom: none; }
.error-item-row { font-weight: 600; font-size: 0.7rem; color: var(--text-muted); }
.error-item-msg { color: var(--text-secondary); margin-top: 2px; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-inline { display: flex; align-items: center; gap: 8px; }

/* ═══ DASHBOARD ═══ */
.dashboard-area { flex: 1; overflow-y: auto; background: var(--bg-primary); }

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* KPI */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s var(--ease);
  position: relative;
}
.kpi-card:hover { border-color: var(--border-light); }

.kpi-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.kpi-blue, .kpi-green, .kpi-purple, .kpi-cyan {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.1;
}
.kpi-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-top: 2px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s var(--ease);
}
.dash-card:hover { border-color: var(--border-light); }
.dash-card-wide { grid-column: span 2; }
.dash-card-full { grid-column: span 2; }

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dash-card-header h3 { font-size: 0.85rem; font-weight: 700; letter-spacing: -0.01em; }
.dash-card-hint { font-size: 0.7rem; color: var(--text-muted); }

.dash-loading { display: flex; justify-content: center; padding: 40px; }

/* ═══ FUNNEL ═══ */
.funnel-section { margin-bottom: 28px; }

.funnel-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.funnel-container {
  display: flex;
  gap: 2px;
  align-items: stretch;
  margin-bottom: 16px;
}

.funnel-stage {
  flex: 1;
  position: relative;
  padding: 20px 14px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s var(--ease);
  cursor: default;
  min-width: 0;
}
.funnel-stage:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
}

.funnel-stage-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funnel-stage-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.funnel-stage-pct {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.funnel-stage-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.funnel-stage-bar-fill {
  height: 100%;
  background: var(--text-primary);
  transition: width 1s var(--ease);
}

.funnel-arrow {
  display: flex;
  align-items: center;
  color: var(--text-hint);
  font-size: 12px;
  flex-shrink: 0;
  padding: 0 2px;
}

/* Funnel group selector */
.funnel-group-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.funnel-group-btn {
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.funnel-group-btn:hover { border-color: var(--border-focus); color: var(--text-secondary); }
.funnel-group-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* Store funnels */
.store-funnels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.store-funnel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s var(--ease);
}
.store-funnel-card:hover { border-color: var(--border-light); }

.store-funnel-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-funnel-stages { display: flex; flex-direction: column; gap: 4px; }

.store-funnel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
}

.store-funnel-row-label {
  flex: 1;
  color: var(--text-muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-funnel-row-bar {
  flex: 2;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.store-funnel-row-bar-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: width 0.8s var(--ease);
}

.store-funnel-row-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
  color: var(--text-secondary);
}

/* ═══ TIMELINE LINE CHART ═══ */
.timeline-chart-container {
  position: relative;
  width: 100%;
  height: 280px;
  margin-top: 12px;
}

.timeline-canvas { width: 100%; height: 100%; display: block; }

.timeline-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 10px;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ═══ TOOLTIPS ═══ */
/* Tooltip via JS — see app.js tooltipSystem */
[data-tooltip] { cursor: help; }

/* Tooltip rendered as fixed overlay by JS */
.tooltip-overlay {
  position: fixed;
  padding: 10px 14px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 400;
  color: #ccc;
  max-width: 280px;
  white-space: normal;
  pointer-events: none;
  z-index: 99999;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.tooltip-overlay.visible { opacity: 1; }

/* ═══ HISTORY TABLE ═══ */
.history-table-wrap { overflow-x: auto; }

.history-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }

.history-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.history-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.history-table tbody tr:hover { background: var(--bg-card-hover); }

.history-empty { text-align: center; padding: 32px; color: var(--text-muted); font-size: 0.8rem; }

.history-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.65rem;
  margin: 1px 2px;
  color: var(--text-muted);
}
.history-tags { display: flex; flex-wrap: wrap; gap: 2px; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}
.status-completed { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }
.status-error { background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border); }

/* Tag Stats */
.tag-stats-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }

.tag-stat-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; }

.tag-stat-name {
  font-size: 0.75rem;
  font-weight: 500;
  min-width: 90px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.tag-stat-bar { flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.tag-stat-bar-fill { height: 100%; background: var(--text-primary); border-radius: 2px; transition: width 0.6s var(--ease); }
.tag-stat-count { font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; color: var(--text-secondary); }

/* Workflows */
.workflows-list { display: flex; flex-direction: column; gap: 8px; }

.workflow-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
.workflow-card:hover { border-color: var(--border-light); }

.workflow-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.workflow-status-dot.published { background: var(--text-secondary); }
.workflow-status-dot.draft { background: var(--text-hint); }

.workflow-info { flex: 1; min-width: 0; }
.workflow-name { font-size: 0.8rem; font-weight: 600; }
.workflow-meta { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }

.workflow-stats { display: flex; gap: 16px; }
.wf-stat { text-align: center; }
.wf-stat-value { display: block; font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wf-stat-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Bar Chart */
.bar-chart-container { overflow-x: auto; }

.bar-chart {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 180px;
  padding-top: 10px;
}

.bar-item {
  flex: 1;
  min-width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 100%;
  background: var(--text-primary);
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 2px;
  transition: height 0.6s var(--ease);
  opacity: 0.6;
}
.bar-fill:hover { opacity: 1; }

.bar-tooltip {
  position: fixed;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #ccc;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
  z-index: 99999;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}
.bar-fill:hover .bar-tooltip { opacity: 1; }

.bar-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  max-height: 60px;
}

/* Click Analysis */
.click-generated { font-size: 0.65rem; color: var(--text-hint); margin-bottom: 14px; }

.click-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.click-channel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.click-channel-total { border-color: var(--border-light); }

.click-channel-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.click-metrics { display: flex; gap: 14px; }
.click-metric { text-align: center; flex: 1; }
.click-metric-value { display: block; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.click-metric-label { font-size: 0.6rem; color: var(--text-muted); margin-top: 4px; }

.click-section-title { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; margin-top: 20px; }
.click-table-wrap { overflow-x: auto; }
.click-table tbody td { font-variant-numeric: tabular-nums; }

/* Timeline (old bar) */
.timeline-chart {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 120px;
}

.timeline-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  min-width: 30px;
}

.timeline-fill {
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px 2px 0 0;
  position: relative;
  opacity: 0.5;
  transition: height 0.6s var(--ease), opacity 0.2s;
}
.timeline-fill:hover { opacity: 1; }

/* ═══ TOAST ═══ */
.toast-container {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: toastIn 0.3s var(--ease);
  max-width: 380px;
}
.toast-out { animation: toastOut 0.3s var(--ease) forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

/* ═══ CEO EXECUTIVE SUMMARY ═══ */
.exec-summary {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
}

.exec-hero {
  flex-shrink: 0;
  text-align: left;
  padding-right: 40px;
  border-right: 1px solid var(--border);
}

.exec-hero-number {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.exec-hero-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 8px;
}

.exec-hero-sub {
  font-size: 0.65rem;
  color: var(--text-hint);
  margin-top: 4px;
}

.exec-metrics {
  display: flex;
  gap: 32px;
  flex: 1;
}

.exec-metric {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  transition: background 0.15s var(--ease);
}

.exec-metric:hover { background: var(--bg-secondary); }

.exec-metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.exec-metric-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 6px;
}

.exec-metric-rate {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--highlight-best);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ═══ SIDE-BY-SIDE COMPARISON ═══ */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s var(--ease);
}

.comparison-card:hover { border-color: var(--border-light); }

.comparison-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.comparison-body {}

.comp-funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comp-stage {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comp-stage-bar-wrap {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.comp-stage-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s var(--ease);
  min-width: 2px;
}

.comp-stage-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 70px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comp-stage-value {
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 50px;
  text-align: right;
}

.comp-stage-pct {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-hint);
  min-width: 36px;
  text-align: right;
}

.comp-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.comp-total-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.comp-total-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .exec-summary { flex-direction: column; gap: 20px; padding: 24px 20px; }
  .exec-hero { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 20px; text-align: center; }
  .exec-metrics { gap: 16px; }
  .comparison-grid { grid-template-columns: 1fr; }
}

/* ═══ ACTION BAR ═══ */
.dash-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.dash-action-bar-left { display: flex; align-items: center; gap: 12px; }
.dash-action-bar-right { display: flex; align-items: center; gap: 8px; }

.dash-cache-hint {
  font-size: 0.65rem;
  color: var(--text-hint);
  letter-spacing: 0.02em;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.action-btn:hover { opacity: 0.85; }
.action-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.action-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.action-btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }

/* ═══ SKELETON LOADING ═══ */
.skeleton {
  background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  display: inline-block;
  height: 1.2em;
  min-width: 40px;
  vertical-align: middle;
}

.skeleton-box {
  flex: 1;
  height: 100px;
  border-radius: var(--radius);
}

.skeleton-funnel {
  display: flex;
  gap: 8px;
}

.skeleton-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
}

.skeleton-bar {
  flex: 1;
  min-width: 24px;
  border-radius: 3px 3px 0 0;
}

.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-row {
  height: 32px;
  border-radius: 4px;
}

/* ═══ STORE SEARCH/SORT ═══ */
.store-search-input {
  padding: 5px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.7rem;
  outline: none;
  width: 140px;
  transition: border-color 0.15s var(--ease);
}
.store-search-input:focus { border-color: var(--border-focus); }
.store-search-input::placeholder { color: var(--text-hint); }

.store-sort-select {
  padding: 5px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.7rem;
  outline: none;
  cursor: pointer;
}
.store-sort-select:focus { border-color: var(--border-focus); }

/* ═══ CONVERSATION INTELLIGENCE ═══ */
.ci-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.ci-kpi {
  text-align: center;
  padding: 16px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ci-kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ci-kpi-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 6px;
}
.ci-kpi-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--highlight-best);
  margin-top: 2px;
}

/* Horizontal funnel bars */
.ci-funnel {
  margin-bottom: 24px;
}
.ci-funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.ci-funnel-label {
  min-width: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}
.ci-funnel-bar-wrap {
  flex: 1;
  height: 28px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.ci-funnel-bar {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  transition: width 0.8s var(--ease);
  min-width: 2px;
  display: flex;
  align-items: center;
  padding-left: 8px;
}
.ci-funnel-bar-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}
.ci-funnel-value {
  min-width: 70px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ci-funnel-pct {
  min-width: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-hint);
  text-align: right;
}
.ci-funnel-drop {
  min-width: 50px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #ff4444;
  text-align: right;
}

/* Category bars */
.ci-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.ci-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.ci-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ci-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 0.7rem;
}
.ci-cat-name {
  min-width: 100px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ci-cat-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.ci-cat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s var(--ease);
}
.ci-cat-count {
  min-width: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-secondary);
}

/* Temporal bars (mini) */
.ci-temporal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
}
.ci-temporal-bar {
  flex: 1;
  background: #fff;
  border-radius: 2px 2px 0 0;
  min-width: 4px;
  transition: height 0.4s var(--ease);
  opacity: 0.5;
  position: relative;
}
.ci-temporal-bar:hover { opacity: 1; }
.ci-temporal-labels {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}
.ci-temporal-label {
  flex: 1;
  text-align: center;
  font-size: 0.5rem;
  color: var(--text-hint);
}

/* Store ranking table */
.ci-ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.ci-ranking-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ci-ranking-table th:hover { color: var(--text-primary); }
.ci-ranking-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.ci-ranking-table tr:hover { background: var(--bg-card-hover); }
.ci-score-bar {
  width: 60px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.ci-score-fill {
  height: 100%;
  background: var(--highlight-best);
  border-radius: 2px;
}

/* Sample replies */
.ci-samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ci-sample {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.75rem;
}
.ci-sample-text {
  flex: 1;
  color: var(--text-secondary);
  font-style: italic;
}
.ci-sample-badge {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.ci-sample-badge.intent { color: var(--highlight-best); border-color: var(--highlight-best); }
.ci-sample-badge.question { color: #64b5f6; border-color: #64b5f6; }
.ci-sample-badge.positive { color: #81c784; border-color: #81c784; }
.ci-sample-badge.optout { color: #ff8a65; border-color: #ff8a65; }
.ci-sample-badge.complaint { color: #ef5350; border-color: #ef5350; }

/* Keywords */
.ci-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.ci-keyword {
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Deep reply stats */
.ci-deep-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}
.ci-deep-stat {
  text-align: center;
}
.ci-deep-stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ci-deep-stat-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .ci-kpis { grid-template-columns: repeat(2, 1fr); }
  .ci-grid { grid-template-columns: 1fr; }
  .ci-funnel-label { min-width: 60px; font-size: 0.6rem; }
}

/* ═══ SORTABLE TABLE ═══ */
.history-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s var(--ease);
}
.history-table thead th.sortable:hover { color: var(--text-primary); }
.history-table thead th.sortable .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.3;
  transition: opacity 0.15s var(--ease);
}
.history-table thead th.sortable.sorted .sort-icon { opacity: 1; }
.history-table thead th.sortable.sorted { color: var(--text-primary); }

/* ═══ FUNNEL DROP-OFF ═══ */
.funnel-dropoff {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-hint);
  background: var(--bg-primary);
  padding: 2px 4px;
  border-radius: 3px;
  z-index: 2;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-card-wide, .dash-card-full { grid-column: span 1; }
  .click-overview { grid-template-columns: 1fr; }
  .funnel-container { flex-direction: column; }
  .funnel-arrow { transform: rotate(90deg); padding: 4px 0; }
  .store-funnels-grid { grid-template-columns: 1fr; }
  .header-center { display: none; }
  .app-header { padding: 10px 16px; }
  .chat-messages { padding: 16px; }
  .dashboard-container { padding: 16px; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  html { font-size: 13px; }
}
