:root {
  --paper: #f7f7fa;
  --card: #ffffff;
  --ink: #0a0a0d;
  --muted: #71717a;
  --line: rgba(15,15,25,0.07);
  --line-2: rgba(15,15,25,0.14);
  --violet: #7c3aed;
  --violet-2: #8b5cf6;
  --violet-soft: #f3f0ff;
}

* { box-sizing: border-box; }
html, body { font-family: 'Inter', system-ui, sans-serif; }
.font-display { font-family: 'Inter', system-ui, sans-serif; font-feature-settings: "ss01","cv11"; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

body { background: var(--paper); color: #18181b; }
.bg-paper { background-color: var(--paper); }

/* ===========================
   APP SHELL
   =========================== */
.app-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

/* ===========================
   SIDEBAR
   =========================== */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f8 100%);
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand-wrap { line-height: 1.15; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

.logo-mark {
  position: relative;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  box-shadow: 0 0 22px rgba(139,92,246,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  display: inline-flex; align-items: center; justify-content: center;
}
.logo-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.9);
  animation: pulse-dot 2.4s infinite ease-in-out;
}
@keyframes pulse-dot { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.55; } }

.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  margin: 4px 4px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
}
.sidebar-search i { color: var(--muted); font-size: 16px; }
.sidebar-search input {
  border: none; outline: none; background: transparent;
  font-size: 13px; flex: 1; color: #18181b;
}
.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; padding: 2px 5px;
  border-radius: 5px;
  background: #f4f4f5;
  border: 1px solid var(--line);
  color: #71717a;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section {
  margin: 14px 12px 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.nav-link {
  display: flex; align-items: center;
  gap: 10px; padding: 8px 12px;
  border-radius: 9px;
  color: #3f3f46;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.nav-link i { font-size: 17px; color: #52525b; }
.nav-link:hover { background: rgba(15,15,25,0.04); color: #0a0a0d; }
.nav-link.active {
  background: #fff;
  color: #0a0a0d;
  box-shadow: 0 1px 2px rgba(15,15,25,0.06), 0 0 0 1px var(--line);
}
.nav-link.active i { color: var(--violet); }
.nav-link .badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1.5px 7px;
  border-radius: 6px;
  background: #f4f4f5;
  color: #52525b;
  font-family: 'JetBrains Mono', monospace;
}
.nav-link .badge-violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.nav-link .dot-live {
  margin-left: auto;
  width: 7px; height: 7px; border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
  animation: pulse-dot 2s infinite;
}

.sidebar-foot { margin-top: auto; padding-top: 14px; }
.upgrade-card {
  padding: 12px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(217,70,239,0.18), transparent 60%),
    linear-gradient(180deg, #1f1530 0%, #0f0a1c 100%);
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.upgrade-title { display:flex; align-items:center; gap:6px; font-weight: 600; font-size: 13px; }
.upgrade-title i { color: #f0abfc; }
.upgrade-card p { margin: 6px 0 10px; font-size: 11.5px; color: #c4b5fd; line-height: 1.4; }
.upgrade-cta {
  width: 100%; padding: 7px;
  border-radius: 8px;
  background: #fff;
  color: #0a0a0d;
  font-size: 12px; font-weight: 600;
  transition: all 0.2s;
}
.upgrade-cta:hover { background: #f4f4f5; transform: translateY(-1px); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.2s;
}
.user-chip:hover { background: #fafafb; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em;
}
.user-meta { line-height: 1.15; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }

/* ===========================
   MAIN
   =========================== */
.main { padding: 0; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(247,247,250,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumb-home { width: 28px; height: 28px; border-radius: 7px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.crumb-home i { font-size: 14px; }
.crumb-current { color: #0a0a0d; font-weight: 600; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.tb-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: #3f3f46;
  position: relative;
  transition: all 0.2s;
}
.tb-btn:hover { background: #fafafb; border-color: var(--line-2); }
.tb-btn i { font-size: 16px; }
.bell-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 999px; background: #ef4444; box-shadow: 0 0 0 2px #fff; }
.divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tb-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 18px -6px rgba(139,92,246,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.tb-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -6px rgba(139,92,246,0.75); }
.tb-cta i { font-size: 13px; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  color: #3f3f46; font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.ghost-btn:hover { background: #fafafb; border-color: var(--line-2); }
.ghost-btn i { font-size: 14px; }

.view { display: none; padding: 28px 28px 64px; }
.view.active { display: block; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.page-title .wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s 0.4s infinite; }
@keyframes wave {
  0%,40%,100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
}
.page-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-actions { display: flex; gap: 8px; }

.seg {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.seg-btn { padding: 6px 12px; border-radius: 7px; font-size: 12.5px; color: #71717a; font-weight: 500; transition: all 0.2s; }
.seg-btn:hover { color: #0a0a0d; }
.seg-btn.active { background: #0a0a0d; color: #fff; }
.seg-sm .seg-btn { padding: 5px 10px; font-size: 12px; }

/* ===========================
   KPI CARDS
   =========================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
  overflow: hidden;
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
}
.kpi-icon i { font-size: 14px; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 14px; }
.kpi-foot { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 12px; }
.trend { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-weight: 600; font-size: 11.5px; }
.trend.up { background: #ecfdf5; color: #047857; }
.trend.down { background: #fef2f2; color: #b91c1c; }
.kpi-sub { color: var(--muted); }
.kpi-spark { display: block; width: 100%; height: 44px; margin-top: 12px; }

/* ===========================
   ROW 2 : funnel + hot
   =========================== */
.row-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 22px; }
@media (max-width: 1100px) { .row-2 { grid-template-columns: 1fr; } }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
}
.panel-flush { padding: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.panel-flush .panel-head { padding: 16px 18px 12px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-tool { width: 28px; height: 28px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: #52525b; display: inline-flex; align-items: center; justify-content: center; }
.panel-tool:hover { background: #fafafb; }
.panel-link { font-size: 12.5px; color: var(--violet); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.funnel-row {
  position: relative;
  height: 44px;
  background: #fafafb;
  border-radius: 10px;
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c1) 0%, var(--c2) 100%);
  border-radius: 10px;
  width: 0;
  transition: width 1s cubic-bezier(.2,.7,.2,1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.funnel-row .funnel-meta {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
}
.funnel-meta .stage { color: #0a0a0d; }
.funnel-meta .val { color: #18181b; font-family: 'JetBrains Mono', monospace; }
.funnel-legend {
  margin-top: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.funnel-legend b { color: #0a0a0d; font-family: 'JetBrains Mono', monospace; }
.dot-sm { display: inline-block; width: 7px; height: 7px; border-radius: 999px; margin-right: 6px; vertical-align: middle; }

/* Hot leads */
.hot-list { display: flex; flex-direction: column; gap: 4px; }
.hot-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; transition: background 0.2s; }
.hot-item:hover { background: #fafafb; }
.hot-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.hot-meta { flex: 1; line-height: 1.2; }
.hot-name { font-size: 13.5px; font-weight: 600; }
.hot-co { font-size: 11.5px; color: var(--muted); }
.hot-score {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f0ff;
  color: var(--violet);
  font-size: 11px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.hot-score.cold { background: #f0f9ff; color: #0369a1; }
.hot-score.warm { background: #fffbeb; color: #b45309; }

/* ===========================
   ROW 3 : deals table + activity
   =========================== */
.row-3 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .row-3 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
.deals-table, .contacts-table { width: 100%; border-collapse: collapse; }
.deals-table th, .contacts-table th {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafafb;
}
.deals-table td, .contacts-table td {
  padding: 14px;
  font-size: 13.5px;
  color: #18181b;
  border-bottom: 1px solid var(--line);
}
.deals-table tr, .contacts-table tr { cursor: pointer; transition: background 0.15s; }
.deals-table tr:hover td, .contacts-table tr:hover td { background: #fbfaff; }
.cell-deal { display: flex; align-items: center; gap: 10px; }
.cell-deal-name { font-weight: 600; color: #0a0a0d; }
.cell-deal-co { font-size: 11.5px; color: var(--muted); }
.cell-amount { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill.s-prop { background: #f3f0ff; color: var(--violet); }
.status-pill.s-demo { background: #ecfeff; color: #0e7490; }
.status-pill.s-neg { background: #fffbeb; color: #b45309; }
.status-pill.s-won { background: #ecfdf5; color: #047857; }
.status-pill.s-lost { background: #fef2f2; color: #b91c1c; }
.status-pill.s-lead { background: #f4f4f5; color: #52525b; }
.status-pill.s-customer { background: #ecfdf5; color: #047857; }
.status-pill.s-cold { background: #f0f9ff; color: #0369a1; }
.status-pill.s-vip { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.bar-prob {
  height: 6px; background: #f4f4f5; border-radius: 999px; overflow: hidden; min-width: 64px;
}
.bar-prob-fill { height: 100%; background: linear-gradient(90deg, var(--violet-2), var(--violet)); border-radius: 999px; }

/* Activity */
.activity-feed { display: flex; flex-direction: column; gap: 2px; }
.activity-feed-lg .act-item { padding: 16px 6px; }
.act-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px; position: relative; }
.act-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.act-icon i { font-size: 14px; }
.act-text { flex: 1; line-height: 1.45; font-size: 13.5px; }
.act-text b { font-weight: 600; }
.act-time { font-size: 11.5px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.act-item + .act-item::before {
  content: ""; position: absolute; left: 20px; top: -10px; bottom: calc(100% - 20px);
  width: 1px; background: var(--line);
}

/* ===========================
   KANBAN
   =========================== */
.kanban {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  overflow-x: auto;
}
@media (max-width: 1280px) { .kanban { grid-template-columns: repeat(3, minmax(280px, 1fr)); } }
.column {
  background: linear-gradient(180deg, #fbfbfd, #f4f4f7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  min-height: 540px;
  display: flex; flex-direction: column; gap: 10px;
}
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.col-title { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #0a0a0d; }
.col-title .pill { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: #52525b; }
.col-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--cdot); }
.col-add { width: 22px; height: 22px; border-radius: 7px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: #52525b; }
.col-add:hover { background: #f4f4f5; }
.kanban-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
  cursor: grab;
  transition: all 0.2s;
}
.kanban-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(15,15,25,0.14); border-color: var(--line-2); }
.kanban-card:active { cursor: grabbing; }
.kc-co { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.kc-co .ic { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--c1), var(--c2)); display: inline-block; }
.kc-title { margin-top: 6px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }
.kc-amount { margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; color: #0a0a0d; }
.kc-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.kc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.kc-tag { font-size: 10px; padding: 2px 6px; border-radius: 5px; background: #f4f4f5; color: #52525b; font-family: 'JetBrains Mono', monospace; }
.kc-avatars { display: flex; }
.kc-avatars .av { width: 20px; height: 20px; border-radius: 5px; margin-left: -3px; background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }

/* ===========================
   CONTACTS
   =========================== */
.contact-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search-inline { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #fafafb; border: 1px solid var(--line); border-radius: 9px; min-width: 220px; }
.search-inline i { color: var(--muted); font-size: 14px; }
.search-inline input { border: none; outline: none; background: transparent; font-size: 13px; flex: 1; }
.chips { display: flex; gap: 6px; }
.chip { padding: 6px 11px; border-radius: 8px; font-size: 12px; font-weight: 500; color: #52525b; background: #fff; border: 1px solid var(--line); transition: all 0.2s; cursor: pointer; }
.chip:hover { border-color: var(--line-2); color: #0a0a0d; }
.chip-active { background: #0a0a0d; color: #fff; border-color: #0a0a0d; }
.contact-cell { display: flex; align-items: center; gap: 10px; }
.contact-name { font-weight: 600; color: #0a0a0d; }
.contact-mail { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* ===========================
   COMPANIES
   =========================== */
.companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.co-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
  transition: all 0.25s;
}
.co-card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 10px 24px -10px rgba(15,15,25,0.14); }
.co-logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.co-name { margin-top: 12px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.co-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.co-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.co-stat-v { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #0a0a0d; font-size: 13px; }
.co-stat-l { color: var(--muted); font-size: 11px; }

/* ===========================
   REPORTS
   =========================== */
.reports-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .reports-grid { grid-template-columns: 1fr; } }
.big-chart { display: block; width: 100%; height: 260px; margin-top: 10px; }
.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.bar-meta b { font-family: 'JetBrains Mono', monospace; }
.bar-wrap { height: 8px; background: #f4f4f5; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--violet-2), var(--violet)); border-radius: 999px; transition: width 1s cubic-bezier(.2,.7,.2,1); }

/* ===========================
   GOALS
   =========================== */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.goal-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 2px rgba(15,15,25,0.04);
}
.goal-name { font-size: 13px; color: var(--muted); }
.goal-val { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.ring-wrap { position: relative; display: flex; justify-content: center; padding: 12px 0; }
.ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.goal-note { font-size: 12px; color: var(--muted); text-align: center; }

/* ===========================
   DRAWER
   =========================== */
.drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.drawer.open { pointer-events: auto; }
.drawer-overlay { position: absolute; inset: 0; background: rgba(15,15,25,0.35); opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(2px); }
.drawer.open .drawer-overlay { opacity: 1; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 440px; max-width: 92vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -24px 0 64px -24px rgba(15,15,25,0.2); transform: translateX(100%); transition: transform 0.35s cubic-bezier(.2,.7,.2,1); overflow-y: auto; padding: 28px; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 8px; background: #f4f4f5; display: inline-flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: #e4e4e7; }
.drawer-tag { display: inline-block; font-size: 11px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--violet); margin-bottom: 8px; }
.drawer-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.drawer-co { color: var(--muted); margin-top: 4px; font-size: 13px; }
.drawer-section { margin-top: 22px; }
.drawer-section h4 { font-size: 11px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer-field { padding: 10px 12px; background: #fafafb; border: 1px solid var(--line); border-radius: 10px; }
.drawer-field .l { font-size: 11px; color: var(--muted); }
.drawer-field .v { font-size: 13.5px; font-weight: 600; margin-top: 2px; }

/* ===========================
   ANIMATIONS
   =========================== */
.reveal { opacity: 0; transform: translateY(8px); }

/* responsive */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; gap: 8px; overflow-x: auto; padding: 12px; }
  .sidebar-search, .sidebar-nav, .sidebar-foot, .sidebar-brand .brand-wrap { display: none; }
  .topbar { padding: 12px 16px; }
  .view { padding: 16px; }
}
