/* =========================================================
   Jeshu Soft Solutions CRM — Styles
   ========================================================= */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-alt: #f9fafc;
  --border: #e6e8ef;
  --border-strong: #d6d9e2;
  --text: #1a1d2b;
  --text-muted: #6b7080;
  --text-soft: #9097a8;

  --primary: #5b21b6;
  --primary-600: #4c1d95;
  --primary-50: #f3eefe;
  --accent: #06b6d4;
  --accent-50: #ecfeff;

  --success: #16a34a;
  --success-50: #e7f8ee;
  --warning: #d97706;
  --warning-50: #fef3e2;
  --danger: #dc2626;
  --danger-50: #fdecec;
  --info: #2563eb;
  --info-50: #e8efff;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 40, 0.06);
  --shadow: 0 4px 14px rgba(20, 22, 40, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 22, 40, 0.18);

  --sidebar-w: 248px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* ============ LOGIN ============ */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 480px) 1fr;
  background: linear-gradient(135deg, #f7f4ff 0%, #e9efff 100%);
}
.login-card {
  background: #fff;
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 16px rgba(91, 33, 182, 0.32);
}
.brand-title { font-weight: 700; font-size: 16px; color: var(--text); line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--text-muted); }

.login-title { font-size: 1.5rem; margin: 0 0 0.5rem; color: var(--text); }
.login-help { color: var(--text-muted); margin: 0 0 1.5rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.15);
}
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-alt); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 13px; }
.btn-block { width: 100%; }

.alert {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 1rem;
}
.alert-error { background: var(--danger-50); color: var(--danger); border: 1px solid #f5c2c2; }
.alert-success { background: var(--success-50); color: var(--success); border: 1px solid #bfe7cd; }
.alert-info { background: var(--info-50); color: var(--info); border: 1px solid #c8d6f7; }
.alert-warning { background: var(--warning-50); color: var(--warning); border: 1px solid #f6dbb1; }

.demo-credentials { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--border-strong); }
.demo-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.6rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.demo-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  text-align: left;
  display: flex; flex-direction: column; gap: 0.1rem;
  transition: all 0.15s;
}
.demo-chip:hover { border-color: var(--primary); background: var(--primary-50); }
.demo-role { font-weight: 600; font-size: 12px; color: var(--primary); }
.demo-email { font-size: 11px; color: var(--text-muted); }

.login-marketing {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #06b6d4 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-marketing::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.13), transparent 40%);
}
.marketing-inner { position: relative; max-width: 460px; }
.marketing-inner h2 { font-size: 2.25rem; margin: 0 0 0.85rem; line-height: 1.15; }
.marketing-inner p { font-size: 1.05rem; opacity: 0.92; margin: 0 0 1.5rem; }
.marketing-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.marketing-list li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.95rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-violet { background: #ddd6fe; }
.dot-cyan { background: #67e8f9; }
.dot-emerald { background: #86efac; }
.dot-amber { background: #fcd34d; }
.dot-rose { background: #fda4af; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-marketing { display: none; }
}

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

.sidebar {
  background: #0f1024;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f1024 100%);
  color: #e6e8f3;
  display: flex; flex-direction: column;
  padding: 1.25rem 0.85rem 1rem;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 1rem; }
.sidebar-brand .brand-title { color: #fff; }
.sidebar-brand .brand-sub { color: #b4b7d4; }

.sidebar-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section { font-size: 11px; font-weight: 600; color: #8a8db0; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.85rem 0.7rem 0.35rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #c8cae5;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: rgba(124, 58, 237, 0.22); color: #fff; }
.nav-link svg { flex-shrink: 0; opacity: 0.85; }
.nav-link .badge { margin-left: auto; }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.85rem; display: flex; align-items: center; gap: 0.6rem; }
.user-block { display: flex; align-items: center; gap: 0.55rem; flex: 1; min-width: 0; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #b4b7d4; text-transform: capitalize; }

.main {
  display: flex; flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 1.1rem; font-weight: 600; color: var(--text); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 0.7rem; }
.search-box {
  position: relative;
  display: flex; align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 0.5rem 0 0.7rem;
  width: 280px;
  color: var(--text-muted);
}
.search-box input {
  border: none; background: transparent; padding: 0.45rem 0.5rem;
  width: 100%;
}
.search-box input:focus { box-shadow: none; }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--text); }

.mobile-only { display: none; }

.view-root {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* ============ CARDS / GRID ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.25rem; }
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.card-title { font-weight: 600; font-size: 0.95rem; margin: 0; }
.card-body { padding: 1rem 1.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex; align-items: center; gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon.violet { background: #ede9fe; color: #6d28d9; }
.stat-icon.cyan { background: #cffafe; color: #0891b2; }
.stat-icon.emerald { background: #d1fae5; color: #047857; }
.stat-icon.amber { background: #fef3c7; color: #b45309; }
.stat-icon.rose { background: #ffe4e6; color: #be123c; }
.stat-icon.slate { background: #e2e8f0; color: #475569; }
.stat-label { font-size: 12px; color: var(--text-muted); margin: 0 0 0.15rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0; line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--text-soft); margin-top: 0.15rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1rem; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }
table.crm-table { width: 100%; border-collapse: collapse; }
table.crm-table th, table.crm-table td { padding: 0.75rem 1rem; text-align: left; font-size: 13.5px; }
table.crm-table thead th { background: var(--surface-alt); border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.04em; }
table.crm-table tbody tr { border-bottom: 1px solid var(--border); }
table.crm-table tbody tr:hover { background: var(--surface-alt); }
table.crm-table tbody tr.row-clickable { cursor: pointer; }
table.crm-table tbody tr.row-selected { background: var(--primary-50); }
table.crm-table tbody tr.row-selected:hover { background: var(--primary-50); }
table.crm-table input[type="checkbox"] { cursor: pointer; width: 16px; height: 16px; accent-color: var(--primary); }
table.crm-table select.lead-owner-inline {
  min-width: 9.5rem;
  max-width: 15rem;
  width: 100%;
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
table.crm-table select.lead-owner-inline:focus {
  outline: 2px solid var(--primary-50);
  border-color: var(--primary);
}
.toolbar-bulk-assign {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-right: 0.25rem;
}
.toolbar-bulk-assign .bulk-assign-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.icon-btn-sm { width: 30px; height: 30px; }
.icon-btn-sm:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-50); }

.row-name { font-weight: 600; color: var(--text); }
.row-sub { font-size: 12px; color: var(--text-muted); }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-violet { background: var(--primary-50); color: var(--primary); border-color: #ddd6fe; }
.badge-cyan { background: var(--accent-50); color: var(--accent); border-color: #a5f3fc; }
.badge-emerald { background: var(--success-50); color: var(--success); border-color: #bfe7cd; }
.badge-amber { background: var(--warning-50); color: var(--warning); border-color: #f6dbb1; }
.badge-rose { background: var(--danger-50); color: var(--danger); border-color: #f5c2c2; }
.badge-blue { background: var(--info-50); color: var(--info); border-color: #c8d6f7; }
.badge-slate { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }

/* ============ FILTERS ============ */
.filters-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.filter-item { display: flex; flex-direction: column; gap: 0.25rem; min-width: 160px; flex: 1; }
.filter-item label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-item select, .filter-item input { padding: 0.45rem 0.65rem; font-size: 13px; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
}
.toolbar .grow { flex: 1; }

/* ============ KANBAN ============ */
.kanban-wrap { overflow-x: auto; padding-bottom: 0.5rem; }
.kanban-row {
  display: flex; gap: 0.85rem;
  min-width: max-content;
}
.kanban-col {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 8rem);
}
.kanban-head { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kanban-title { font-weight: 600; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 0.45rem; }
.kanban-count { background: var(--surface); border: 1px solid var(--border); padding: 1px 0.5rem; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text-muted); }
.kanban-body { flex: 1; overflow-y: auto; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.55rem; min-height: 60px; }
.kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.kanban-card:hover { border-color: var(--primary); }
.kanban-card.dragging { opacity: 0.55; }
.kanban-card-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.kanban-card-sub { font-size: 12px; color: var(--text-muted); }
.kanban-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.2rem; }
.kanban-body.drop-over { background: rgba(91, 33, 182, 0.06); }

/* ============ DRAWER / MODAL ============ */
.modal-root {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 16, 36, 0.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 2rem);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-card.modal-lg { max-width: 920px; }
.modal-head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-body { padding: 1.25rem 1.4rem; overflow-y: auto; }
.modal-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.5rem; background: var(--surface-alt); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-row .field { margin-bottom: 0; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.85rem; }

/* ============ TOAST ============ */
.toast-root { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: #fff;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  min-width: 240px;
  font-size: 13px;
  animation: slide-in 0.2s ease-out;
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-info { border-left-color: var(--info); }
@keyframes slide-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============ LEAD DETAIL ============ */
.lead-detail { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; }
.lead-detail-main { display: flex; flex-direction: column; gap: 1rem; }
.lead-detail-side { display: flex; flex-direction: column; gap: 0.9rem; }
.detail-block { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 0.85rem 1rem; }
.detail-row { display: flex; justify-content: space-between; padding: 0.25rem 0; font-size: 13px; }
.detail-row span:first-child { color: var(--text-muted); }
.detail-row span:last-child { color: var(--text); font-weight: 500; text-align: right; }
.timeline { display: flex; flex-direction: column; gap: 0.7rem; }
.timeline-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}
.timeline-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; }
.timeline-meta { font-size: 12px; color: var(--text-muted); }
.timeline-text { font-size: 13px; }

.tab-bar { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 0.85rem; }
.tab {
  padding: 0.55rem 0.85rem;
  border: none; background: transparent;
  font-weight: 600; font-size: 13px; color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

@media (max-width: 900px) {
  .lead-detail { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* ============ PROGRESS BAR ============ */
.progress {
  width: 100%; height: 8px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
}
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width 0.3s; }

/* ============ FUNNEL ============ */
.funnel { display: flex; flex-direction: column; gap: 0.5rem; }
.funnel-row { display: flex; align-items: center; gap: 0.7rem; }
.funnel-label { width: 130px; font-size: 13px; color: var(--text-muted); }
.funnel-bar { flex: 1; height: 24px; background: var(--surface-alt); border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.funnel-bar > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); display: flex; align-items: center; padding: 0 0.5rem; color: #fff; font-size: 12px; font-weight: 600; }
.funnel-value { width: 60px; text-align: right; font-weight: 600; font-size: 13px; }

/* ============ EMPTY STATE ============ */
.empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty h3 { color: var(--text); margin: 0.5rem 0 0.35rem; font-size: 1rem; }
.empty p { margin: 0 0 1rem; font-size: 13.5px; }

/* ============ MOBILE ============ */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.25s;
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  .search-box { width: 180px; }
}
@media (max-width: 640px) {
  .search-box { display: none; }
  .view-root { padding: 1rem; }
  .stat-value { font-size: 1.25rem; }
}
