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

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  --bg-base:      #06080f;
  --bg-surface:   #0c1120;
  --bg-elevated:  #111827;
  --bg-overlay:   rgba(17, 24, 39, 0.8);

  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --border-focus: rgba(0, 212, 170, 0.4);

  --teal:         #00d4aa;
  --teal-dim:     rgba(0, 212, 170, 0.12);
  --teal-glow:    rgba(0, 212, 170, 0.25);

  --violet:       #7c5cbf;
  --violet-dim:   rgba(124, 92, 191, 0.12);
  --violet-glow:  rgba(124, 92, 191, 0.3);

  --amber:        #f59e0b;
  --amber-dim:    rgba(245,158,11,0.12);

  --rose:         #f43f5e;
  --rose-dim:     rgba(244,63,94,0.12);

  --cyan:         #06b6d4;
  --cyan-dim:     rgba(6,182,212,0.12);

  --text-1:  #f1f5f9;
  --text-2:  #94a3b8;
  --text-3:  #475569;
  --text-inv: #0c1120;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --sidebar-w:   72px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --dur:         180ms;

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* floating orbs */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,191,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  z-index: 200;
  gap: 4px;
}

.sb-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 24px var(--teal-glow);
  flex-shrink: 0;
}
.sb-logo svg { width: 20px; height: 20px; fill: #fff; }

.sb-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; width: 100%; padding: 0 10px; }

.sb-btn {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  position: relative;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sb-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-btn:hover { background: var(--bg-elevated); color: var(--text-2); }
.sb-btn.active {
  background: var(--teal-dim);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal-glow) inset;
}
.sb-btn::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%; transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 12px; font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease);
  z-index: 999;
}
.sb-btn:hover::after { opacity: 1; }

.sb-divider { width: 36px; height: 1px; background: var(--border); margin: 6px 0; }

.sb-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 10px; }
.sb-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-3);
  position: absolute;
  bottom: 10px; right: 10px;
}
.sb-status-dot.on { background: var(--teal); box-shadow: 0 0 6px var(--teal); animation: pulse-dot 2s infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: 60px;
  background: rgba(6,8,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left { display: flex; flex-direction: column; }
.topbar-title {
  font-size: 15px; font-weight: 600; color: var(--text-1);
  line-height: 1;
}
.topbar-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── VIEWS ──────────────────────────────────────────────── */
.view { display: none; padding: 28px; flex-direction: column; gap: 24px; animation: view-in 0.25s var(--ease); }
.view.active { display: flex; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 36px;
  border-radius: var(--radius-sm);
  font: 500 13px/1 var(--font);
  cursor: pointer; border: 1px solid transparent;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.btn-primary {
  background: var(--teal);
  color: var(--text-inv);
  font-weight: 600;
  box-shadow: 0 0 20px var(--teal-glow);
}
.btn-primary:hover { background: #00bfa0; box-shadow: 0 0 28px var(--teal-glow); transform: translateY(-1px); }

.btn-ghost {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-1); background: rgba(255,255,255,0.06); }

.btn-danger { background: var(--rose-dim); border-color: rgba(244,63,94,0.2); color: var(--rose); }
.btn-danger:hover { background: rgba(244,63,94,0.2); border-color: var(--rose); }

.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.btn-sm svg { width: 13px; height: 13px; }

.btn-icon {
  width: 32px; height: 32px; padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur) var(--ease);
}
.btn-icon:hover { border-color: var(--border-hover); color: var(--text-1); }
.btn-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-teal    { background: var(--teal-dim); color: var(--teal); }
.badge-violet  { background: var(--violet-dim); color: #a78bfa; }
.badge-amber   { background: var(--amber-dim); color: var(--amber); }
.badge-rose    { background: var(--rose-dim); color: var(--rose); }
.badge-cyan    { background: var(--cyan-dim); color: var(--cyan); }
.badge-gray    { background: rgba(255,255,255,0.06); color: var(--text-3); }
.badge-outline { background: transparent; border: 1px solid var(--teal); color: var(--teal); }

/* ─── CARDS / PANELS ─────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease);
}
.card:hover { border-color: var(--border-hover); }

.card-body { padding: 20px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 600; color: var(--text-1); }
.card-header p  { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ─── KPI METRIC CARDS ───────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
  cursor: default;
}
.kpi-card:hover { transform: translateY(-3px); border-color: var(--c, var(--teal)); }
.kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--kpi-glow, var(--teal-glow)) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.kpi-card:hover::after { opacity: 1; }

.kpi-card[data-color="teal"]   { --c: var(--teal);   --kpi-glow: var(--teal-glow); }
.kpi-card[data-color="violet"] { --c: #a78bfa;        --kpi-glow: var(--violet-glow); }
.kpi-card[data-color="amber"]  { --c: var(--amber);   --kpi-glow: var(--amber-dim); }
.kpi-card[data-color="rose"]   { --c: var(--rose);    --kpi-glow: var(--rose-dim); }

.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.kpi-label { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-icon {
  width: 32px; height: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { width: 15px; height: 15px; stroke: var(--c, var(--teal)); fill: none; stroke-width: 2; }

.kpi-value {
  font-size: 32px; font-weight: 800;
  color: var(--text-1);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.kpi-delta { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.kpi-delta .up   { color: var(--teal); }
.kpi-delta .down { color: var(--rose); }

/* ─── PIPELINE FUNNEL ────────────────────────────────────── */
.pipeline-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 20px;
}
.pipe-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pipe-bar-wrap {
  background: var(--bg-elevated);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  position: relative;
}
.pipe-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
  transition: width 0.8s var(--ease);
}
.pipe-label { font-size: 11px; color: var(--text-3); font-weight: 500; }
.pipe-count { font-size: 20px; font-weight: 700; color: var(--text-1); }

/* ─── TWO-COL GRID ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
@media (max-width: 960px) { .grid-2, .grid-3-1, .grid-1-2 { grid-template-columns: 1fr; } }

/* ─── LEAD TABLE ─────────────────────────────────────────── */
.table-wrap { overflow: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg-elevated); }
thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
tbody tr {
  border-top: 1px solid var(--border);
  transition: background var(--dur) var(--ease);
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
td { padding: 13px 16px; font-size: 13px; color: var(--text-2); vertical-align: middle; }
td:first-child { color: var(--text-1); font-weight: 500; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-inv);
}

.lead-cell { display: flex; align-items: center; gap: 10px; }
.lead-info-wrap .lead-nm { font-size: 13px; font-weight: 600; color: var(--text-1); }
.lead-info-wrap .lead-co { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.score-bar-wrap { display: flex; align-items: center; gap: 8px; }
.score-track { flex: 1; height: 4px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; min-width: 60px; }
.score-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--violet)); }
.score-num { font-size: 12px; font-weight: 600; color: var(--text-2); min-width: 28px; text-align: right; }

.actions-cell { display: flex; gap: 6px; }

/* ─── FILTERS BAR ────────────────────────────────────────── */
.filters {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.search-wrap { position: relative; flex: 1; min-width: 180px; }
.search-wrap input { padding-left: 34px; }
.search-wrap svg {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--text-3); fill: none; stroke-width: 2;
}
.filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 0 10px; height: 32px;
  font: 13px var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.filter-select:focus { border-color: var(--border-focus); }
.filter-select option { background: var(--bg-elevated); }

/* ─── FORM ELEMENTS ──────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-2); }
input, textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font: 14px var(--font);
  padding: 10px 12px;
  outline: none;
  width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
select option { background: var(--bg-elevated); }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ─── CHAT MESSAGES ──────────────────────────────────────── */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.msg.ai .msg-avatar   { background: var(--teal-dim); color: var(--teal); border: 1px solid var(--teal-glow); }
.msg.user .msg-avatar { background: var(--violet-dim); color: #a78bfa; border: 1px solid var(--violet-glow); }
.msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 15px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-1);
}
.msg.user .msg-bubble {
  background: var(--violet-dim);
  border-color: var(--violet-glow);
  border-bottom-right-radius: 4px;
}
.msg.ai .msg-bubble   { border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; color: var(--text-3); margin-top: 4px; }

.chat-input-row {
  display: flex; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}
.chat-input-row input { flex: 1; }

.typing-dots { display: flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  animation: tdot 1.2s infinite ease-in-out both;
}
.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes tdot { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* ─── TERMINAL ────────────────────────────────────────────── */
.terminal {
  background: #020408;
  border: 1px solid rgba(0,212,170,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}
.term-bar {
  background: #050d14;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,212,170,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.term-dots { display: flex; gap: 6px; }
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.red    { background: #ff5f57; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green  { background: #28ca41; }
.term-name { font: 12px var(--mono); color: rgba(0,212,170,0.5); }
.term-body {
  padding: 20px;
  height: 380px;
  overflow-y: auto;
  font: 12.5px/1.8 var(--mono);
  color: #4ade80;
}
.log-ln { margin: 0; }
.log-ln.e { color: #f87171; }
.log-ln.w { color: #fbbf24; }
.log-ln.d { color: #475569; }
.log-ln.i { color: #4ade80; }

/* ─── OUTREACH SPLIT PANE ────────────────────────────────── */
.outreach-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .outreach-layout { grid-template-columns: 1fr; } }

.outreach-leads {
  display: flex; flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.ol-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.ol-item:hover  { border-color: var(--border-hover); }
.ol-item.active { border-color: var(--teal); background: var(--teal-dim); }
.ol-text .ol-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.ol-text .ol-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.thread-area {
  display: flex; flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  gap: 10px;
  padding: 16px;
}
.thread-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--border);
}
.thread-msg.out {
  align-self: flex-end;
  background: var(--violet-dim);
  border-color: var(--violet-glow);
  border-bottom-right-radius: 3px;
}
.thread-msg.in {
  align-self: flex-start;
  background: var(--teal-dim);
  border-color: var(--teal-glow);
  border-bottom-left-radius: 3px;
}
.thread-msg .tm-meta {
  font-size: 10px; color: var(--text-3);
  margin-bottom: 4px;
  display: flex; justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.tm-delivery {
  font-size: 9px;
  padding: 2px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─── STATUS WIDGET ──────────────────────────────────────── */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}
.conn-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.conn-dot.on { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.conn-label { font-size: 11px; font-weight: 600; color: var(--text-2); }
.conn-status { font-size: 10px; color: var(--text-3); }

/* ─── PRODUCT CATALOG ────────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
@media (max-width: 1000px) { .catalog-grid { grid-template-columns: 1fr 1fr; } }
.cat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color var(--dur) var(--ease);
}
.cat-card:hover { border-color: var(--teal-glow); }
.cat-card h4 { font-size: 13px; font-weight: 600; color: var(--teal); margin-bottom: 4px; }
.cat-card p { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.cat-buyers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

/* ─── APPOINTMENT ITEM ───────────────────────────────────── */
.appt-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.appt-item:last-child { border-bottom: none; }
.appt-time {
  background: var(--teal-dim);
  border: 1px solid var(--teal-glow);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 60px;
}
.appt-time .at-day { font-size: 10px; color: var(--teal); font-weight: 600; text-transform: uppercase; }
.appt-time .at-slot { font-size: 11px; color: var(--text-1); font-weight: 600; margin-top: 1px; }
.appt-info .ai-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.appt-info .ai-co   { font-size: 11px; color: var(--text-3); }

/* ─── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-state svg { width: 40px; height: 40px; stroke: var(--text-3); fill: none; stroke-width: 1.5; }
.empty-state h4 { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty-state p  { font-size: 12px; color: var(--text-3); max-width: 260px; line-height: 1.5; }

/* ─── DRAWER ─────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed;
  top: 0; right: -520px;
  width: 480px; height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 501;
  overflow-y: auto;
  transition: right 0.3s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-surface);
  z-index: 1;
}
.drawer-head h3 { font-size: 15px; font-weight: 600; color: var(--text-1); }
.drawer-head p  { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.drawer-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.drawer-close {
  width: 28px; height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.drawer-close:hover { color: var(--text-1); border-color: var(--border-hover); }

/* ─── FLOATING CHAT BUTTON ───────────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  box-shadow: 0 4px 24px var(--teal-glow), 0 0 0 0 var(--teal-glow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; z-index: 300;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  animation: fab-pulse 3s infinite;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 6px 32px var(--teal-glow); animation: none; }
.fab svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 24px var(--teal-glow), 0 0 0 0 var(--teal-glow); }
  50% { box-shadow: 0 4px 24px var(--teal-glow), 0 0 0 8px rgba(0,212,170,0); }
}

/* ─── TOASTS ─────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px; color: var(--text-1);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transform: translateY(16px); opacity: 0;
  transition: all 0.3s var(--ease);
  pointer-events: all;
  min-width: 280px; max-width: 420px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok  { border-color: var(--teal-glow); }
.toast.err { border-color: rgba(244,63,94,0.3); }
.toast-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.toast.ok .toast-icon  { background: var(--teal-dim); color: var(--teal); }
.toast.err .toast-icon { background: var(--rose-dim); color: var(--rose); }

/* ─── STRATEGY TOGGLE ────────────────────────────────────── */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.toggle-info h4 { font-size: 13px; font-weight: 600; color: var(--text-1); }
.toggle-info p  { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.toggle-switch {
  width: 44px; height: 24px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.toggle-switch.on { background: var(--teal-dim); border-color: var(--teal); }
.toggle-switch.on::after { transform: translateX(20px); background: var(--teal); }

/* ─── MISC UTILS ─────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-muted { color: var(--text-3); }
.text-teal  { color: var(--teal); }
.font-mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--radius-md); }
.border-t { border-top: 1px solid var(--border); }
.separator { height: 1px; background: var(--border); }
