/* ================================================================
   Monitorador de Clientes — Design System
   Tokens → Base → Components → Layout
   ================================================================ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Surface */
  --bg-base:     #070b14;
  --bg-surface:  #0e1623;
  --bg-elevated: #151f2e;
  --bg-hover:    #1c2840;
  --bg-active:   #223252;

  /* Brand */
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-900: #1e1b4b;

  /* Semantic */
  --success-400: #4ade80;
  --success-500: #22c55e;
  --success-900: #052e16;
  --warning-400: #fbbf24;
  --warning-500: #f59e0b;
  --warning-900: #1c1400;
  --danger-400:  #f87171;
  --danger-500:  #ef4444;
  --danger-900:  #1f0808;

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-inverted:  #0f172a;

  /* Border */
  --border:        rgba(148,163,184,.10);
  --border-strong: rgba(148,163,184,.20);
  --border-focus:  var(--brand-500);

  /* Spacing scale */
  --s1:  4px;  --s2:  8px;  --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px;

  /* Typography */
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  --text-xs:  11px; --text-sm: 13px; --text-base: 14px;
  --text-md:  15px; --text-lg: 18px; --text-xl:   22px;
  --text-2xl: 28px; --text-3xl: 36px;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* Radius */
  --r-sm:   6px;  --r-md:   8px;
  --r-lg:  12px;  --r-xl:  16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.6);
  --shadow-glow-brand: 0 0 20px rgba(99,102,241,.25);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration-fast:   120ms;
  --duration-normal: 200ms;

  /* Sidebar */
  --sidebar-w: 220px;

  /* Health score colors */
  --health-high:   var(--success-500);
  --health-medium: var(--warning-500);
  --health-low:    var(--danger-500);
  --health-none:   var(--text-muted);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
}

a { color: var(--brand-400); text-decoration: none; }
a:hover { color: var(--brand-300); }

::selection { background: var(--brand-600); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-active); }

/* ── Typography ──────────────────────────────────────────────── */
h1 { font-size: var(--text-2xl); font-weight: var(--fw-bold);     line-height: 1.25; }
h2 { font-size: var(--text-xl);  font-weight: var(--fw-semibold); line-height: 1.3; }
h3 { font-size: var(--text-lg);  font-weight: var(--fw-semibold); line-height: 1.35; }
h4 { font-size: var(--text-md);  font-weight: var(--fw-semibold); }

.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-md  { font-size: var(--text-md); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }

.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-success   { color: var(--success-400); }
.text-warning   { color: var(--warning-400); }
.text-danger    { color: var(--danger-400); }
.text-brand     { color: var(--brand-400); }

.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

.font-mono { font-family: var(--font-mono); }

/* ── Layout ──────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
}

.main-content {
  padding: var(--s6) var(--s8);
  overflow-y: auto;
  min-height: 100vh;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s8);
  gap: var(--s4);
}

.page-title { display: flex; flex-direction: column; gap: var(--s1); }
.page-title h1 { line-height: 1.2; }
.page-title p  { color: var(--text-secondary); font-size: var(--text-sm); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--s6) 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 var(--s5) var(--s6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--brand-600);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 16px;
}

.sidebar-logo-text { font-weight: var(--fw-bold); font-size: var(--text-md); }
.sidebar-logo-sub  { font-size: var(--text-xs); color: var(--text-muted); }

.sidebar-section {
  padding: 0 var(--s3);
  margin-bottom: var(--s4);
}

.sidebar-section-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: var(--s2) var(--s3);
  margin-bottom: var(--s1);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
  text-decoration: none;
}

.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }

.sidebar-item.active {
  background: var(--brand-900);
  color: var(--brand-300);
}

.sidebar-item-icon { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; }
.sidebar-item.active .sidebar-item-icon { opacity: 1; }

.sidebar-item-badge {
  margin-left: auto;
  background: var(--danger-500);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-bold);
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

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

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5);
  transition: border-color var(--duration-normal) var(--ease),
              box-shadow var(--duration-normal) var(--ease);
}

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

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--s4);
  gap: var(--s3);
}

.card-title   { font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.card-subtitle { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ── Stat Card ───────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin-bottom: var(--s8);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.stat-label { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--fw-medium); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: var(--text-2xl); font-weight: var(--fw-bold); line-height: 1; }
.stat-sub   { font-size: var(--text-xs); color: var(--text-secondary); }

.stat-card.stat-danger  { border-color: rgba(239,68,68,.3); }
.stat-card.stat-success { border-color: rgba(34,197,94,.3); }
.stat-card.stat-brand   { border-color: rgba(99,102,241,.3); }

/* ── Client Card ─────────────────────────────────────────────── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s4);
}

.client-card-wrapper {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--duration-normal) var(--ease),
              transform var(--duration-fast) var(--ease),
              box-shadow var(--duration-normal) var(--ease);
}

.client-card-wrapper:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.client-card-wrapper:hover .client-remove-btn {
  opacity: 1;
}

.client-remove-btn {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  opacity: 0;
  transition: opacity .15s;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--danger-400);
  font-size: 14px;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  line-height: 1;
  z-index: 1;
}

.client-remove-btn:hover {
  background: rgba(239,68,68,.1);
}

.client-card {
  padding: var(--s5);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.client-card:hover {
  color: inherit;
}

.client-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--s4);
}

.client-avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.client-name { font-weight: var(--fw-semibold); font-size: var(--text-md); margin-bottom: 2px; }

.health-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  border: 3px solid;
  transition: border-color var(--duration-normal) var(--ease);
}

.health-ring.high   { border-color: var(--health-high);   color: var(--health-high); }
.health-ring.medium { border-color: var(--health-medium); color: var(--health-medium); }
.health-ring.low    { border-color: var(--health-low);    color: var(--health-low); }
.health-ring.none   { border-color: var(--health-none);   color: var(--health-none); }

.client-stats {
  display: flex;
  gap: var(--s4);
  margin-top: var(--s3);
}

.client-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-stat-val  { font-size: var(--text-md); font-weight: var(--fw-semibold); }
.client-stat-label { font-size: var(--text-xs); color: var(--text-muted); }

/* ── Alert Banner ────────────────────────────────────────────── */
.alert-banner {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s8);
}

.alert-banner-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.alert-banner-title {
  font-weight: var(--fw-semibold);
  color: var(--danger-400);
  font-size: var(--text-sm);
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s3);
  border-radius: var(--r-md);
  transition: background var(--duration-fast) var(--ease);
}

.alert-item:hover { background: var(--bg-hover); }

.alert-item + .alert-item { border-top: 1px solid var(--border); }

.alert-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.alert-dot.urgente  { background: var(--danger-500);  box-shadow: 0 0 6px var(--danger-500); }
.alert-dot.positivo { background: var(--success-500); box-shadow: 0 0 6px var(--success-500); }

.alert-body  { flex: 1; min-width: 0; }
.alert-meta  { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 2px; }
.alert-text  { font-size: var(--text-sm); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.alert-resolve-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--r-sm);
  padding: 2px var(--s2);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.alert-resolve-btn:hover {
  border-color: var(--success-500);
  color: var(--success-400);
}

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 2px var(--s2);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-urgente  { background: rgba(239,68,68,.15);  color: var(--danger-400);  border: 1px solid rgba(239,68,68,.3);  }
.badge-positivo { background: rgba(34,197,94,.12);  color: var(--success-400); border: 1px solid rgba(34,197,94,.25); }
.badge-audio    { background: rgba(99,102,241,.15); color: var(--brand-300);   border: 1px solid rgba(99,102,241,.3); }
.badge-vk       { background: rgba(99,102,241,.1);  color: var(--brand-400);   border: 1px solid rgba(99,102,241,.2); }
.badge-cliente  { background: var(--bg-elevated);   color: var(--text-secondary); border: 1px solid var(--border); }
.badge-resolved { background: var(--bg-elevated);   color: var(--text-muted);  border: 1px solid var(--border); opacity: .6; }

/* ── Button ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease);
  white-space: nowrap;
}

.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-600); border-color: var(--brand-600); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }

.btn-danger {
  background: rgba(239,68,68,.1);
  color: var(--danger-400);
  border-color: rgba(239,68,68,.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }

.btn-sm { padding: var(--s1) var(--s3); font-size: var(--text-xs); }
.btn-lg { padding: var(--s3) var(--s6); font-size: var(--text-md); }

.btn-icon { padding: var(--s2); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
  margin-bottom: var(--s6);
}

.tab {
  padding: var(--s3) var(--s5);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  margin-bottom: -1px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.tab:hover { color: var(--text-secondary); }

.tab.active {
  color: var(--brand-400);
  border-bottom-color: var(--brand-500);
}

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

/* ── Timeline (mensagens) ────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4) 0;
}

.timeline-msg {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  max-width: 75%;
}

.timeline-msg.from-client { align-self: flex-start; }
.timeline-msg.from-vk     { align-self: flex-end; flex-direction: row-reverse; }

.timeline-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: grid; place-items: center;
  font-size: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
  font-weight: var(--fw-semibold);
}

.timeline-msg.from-vk .timeline-avatar     { background: var(--brand-900); color: var(--brand-400); }
.timeline-msg.from-client .timeline-avatar { background: var(--bg-elevated); }

.timeline-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  border-bottom-left-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  max-width: 100%;
}

.timeline-msg.from-vk .timeline-bubble {
  background: var(--brand-900);
  border-color: rgba(99,102,241,.25);
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-sm);
}

.timeline-sender {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-msg.from-vk .timeline-sender { color: var(--brand-400); }

.timeline-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

.timeline-audio {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.timeline-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.timeline-day-divider {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s4) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.timeline-day-divider::before,
.timeline-day-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Report Card ─────────────────────────────────────────────── */
.report-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s4);
}

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease);
  gap: var(--s3);
}

.report-card-header:hover { background: var(--bg-hover); }

.report-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex: 1;
  min-width: 0;
}

.report-period {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.report-card-body {
  padding: var(--s5);
  border-top: 1px solid var(--border);
  display: none;
}

.report-card.expanded .report-card-body { display: block; }
.report-card.expanded .report-card-header { background: var(--bg-elevated); }

/* Markdown rendering */
.markdown-body { font-size: var(--text-sm); line-height: 1.7; color: var(--text-primary); }
.markdown-body h2 {
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--brand-300);
  margin: var(--s5) 0 var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.markdown-body h2:first-child { margin-top: 0; }
.markdown-body p  { margin-bottom: var(--s3); }
.markdown-body ul { padding-left: var(--s5); margin-bottom: var(--s3); }
.markdown-body li { margin-bottom: var(--s1); }
.markdown-body strong { color: var(--text-primary); font-weight: var(--fw-semibold); }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s16) var(--s8);
  text-align: center;
  color: var(--text-muted);
  gap: var(--s3);
}

.empty-icon  { font-size: 40px; opacity: .4; }
.empty-title { font-size: var(--text-md); font-weight: var(--fw-medium); color: var(--text-secondary); }
.empty-desc  { font-size: var(--text-sm); max-width: 320px; }

/* ── Loading Skeleton ────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  z-index: 999;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--s3) var(--s5);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--s3);
  animation: toastIn var(--duration-normal) var(--ease) forwards;
}

.toast.toast-success { border-color: rgba(34,197,94,.4); }
.toast.toast-error   { border-color: rgba(239,68,68,.4); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Chip (filter) ───────────────────────────────────────────── */
.chip-group { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: var(--s1) var(--s3);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.chip:hover { border-color: var(--brand-500); color: var(--brand-400); }
.chip.active { background: var(--brand-900); border-color: var(--brand-500); color: var(--brand-300); }

/* ── Misc utilities ──────────────────────────────────────────── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.mt-4  { margin-top: var(--s4); }
.mt-6  { margin-top: var(--s6); }
.mb-4  { margin-bottom: var(--s4); }
.mb-6  { margin-bottom: var(--s6); }
.mb-8  { margin-bottom: var(--s8); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: var(--s4); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .clients-grid { grid-template-columns: 1fr; }
}
