/* ============================================================
   dashboard.css — Styles specific to dashboard.html
   Sections: sidebar, topbar, metric cards, charts,
             activity feed, compliance strip, agent grid
   ============================================================ */

/* ── Layout shell ───────────────────────────────────────────── */
body.dashboard-body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-sans);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  height: 100vh;
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 50;
}
.sidebar-brand {
  padding: 8px 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--green-neon, #9a5b3c);
  font-family: var(--font-sans);
}
.sidebar-brand-sub {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6f6b62;
  font-weight: 500;
  margin-top: 2px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #ece9e0; border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-2);
  transition: all 0.15s;
  text-decoration: none;
}
.nav-item:hover { color: var(--tx); background: var(--surface-2); }
.nav-item.active { color: var(--green-neon); background: rgba(154,91,60,.08); }
.nav-item .nav-icon { font-size: 18px; flex-shrink: 0; }
.nav-section-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 700;
  padding: 12px 12px 4px;
}
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}

/* ── Top bar ────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 60px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.topbar-search {
  position: relative;
}
.topbar-search input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px 7px 36px;
  font-size: 12px;
  color: var(--tx);
  width: 220px;
  outline: none;
  transition: border-color 0.15s;
}
.topbar-search input:focus { border-color: var(--cyan); }
.topbar-search input::placeholder { color: var(--tx-3); }
.topbar-search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--tx-3);
  font-size: 16px;
}
.topbar-nav { display: flex; align-items: center; gap: 20px; }
.topbar-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
  transition: color 0.15s;
  text-decoration: none;
}
.topbar-nav a:hover { color: var(--tx); }
.topbar-nav a.active { color: var(--green-neon); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(154,91,60,.08);
  border: 1px solid rgba(154,91,60,.2);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.status-text {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-neon);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(154,91,60,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  cursor: pointer;
  border: 1px solid rgba(154,91,60,.25);
  transition: all 0.15s;
}
.user-avatar:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(154,91,60,.15); }

/* ── Notification bell ──────────────────────────────────────── */
.notif-btn {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--tx-2);
}
.notif-btn:hover { border-color: var(--border-2); color: var(--tx); }
.notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ece9e0;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ── User dropdown ──────────────────────────────────────────── */
.user-menu { position: relative; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-card-hover, 0 16px 48px rgba(0,0,0,.12));
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.18s ease;
  z-index: 200;
}
.user-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.user-dropdown-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-dropdown-name { font-size: 13px; font-weight: 700; color: var(--tx); }
.user-dropdown-email { font-size: 10px; color: var(--tx-3); margin-top: 2px; }
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--tx-2);
  cursor: pointer;
  transition: all 0.12s;
  text-decoration: none;
}
.user-dropdown-item:hover { background: var(--surface-2); color: var(--tx); }
.user-dropdown-item.danger:hover { background: rgba(220,38,38,.06); color: var(--red); }
.user-dropdown-item .material-symbols-outlined { font-size: 16px; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Main content area ──────────────────────────────────────── */
.main-content {
  margin-left: 240px;
  padding-top: 76px;
  padding-left: 28px;
  padding-right: 28px;
  padding-bottom: 48px;
  min-height: 100vh;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tx);
  font-family: var(--font-sans);
}
.page-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 18px;
}
.page-meta-item { text-align: center; }
.page-meta-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
}
.page-meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  font-family: var(--font-sans);
}
.page-meta-divider {
  width: 1px; height: 28px;
  background: var(--border);
}

/* ── Dashboard grid ─────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.col-8  { grid-column: span 8; }
.col-4  { grid-column: span 4; }
.col-12 { grid-column: span 12; }
.col-6  { grid-column: span 6; }
.col-3  { grid-column: span 3; }

/* ── Metric cards ───────────────────────────────────────────── */
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.metric-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-card-hover, 0 4px 16px rgba(0,0,0,.08)); }
.metric-card-bg-icon {
  position: absolute;
  right: -8px; top: -8px;
  font-size: 72px;
  opacity: 0.06;
  transition: opacity 0.2s;
  pointer-events: none;
}
.metric-card:hover .metric-card-bg-icon { opacity: 0.1; }
.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.metric-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.metric-live-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
}
.metric-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
  margin-bottom: 6px;
}
.metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-sans);
}
.metric-trend {
  font-size: 11px;
  color: var(--tx-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-trend .trend-icon { font-size: 14px; }

/* ── KPI row (4 small cards) ────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.2s;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.kpi-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.kpi-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--font-sans);
}
.kpi-sub {
  font-size: 10px;
  color: var(--tx-3);
  margin-top: 4px;
}

/* ── Token usage chart ──────────────────────────────────────── */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.chart-title { font-size: 1rem; font-weight: 700; color: var(--tx); }
.chart-sub   { font-size: 11px; color: var(--tx-3); margin-top: 2px; }
.chart-tabs  {
  display: flex;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.chart-tab {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tx-3);
  cursor: pointer;
  transition: all 0.15s;
}
.chart-tab.active {
  background: var(--surface);
  color: var(--tx);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.chart-area {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  position: relative;
}
.chart-grid-lines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.chart-grid-line { border-top: 1px solid var(--border); }
.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(.34,1.56,.64,1);
  min-height: 4px;
}
.chart-bar-label {
  font-size: 9px;
  color: var(--tx-3);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.chart-x-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  color: var(--tx-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Traffic card ───────────────────────────────────────────── */
.traffic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.traffic-sparkline {
  position: absolute;
  right: 0; bottom: 0;
  opacity: 0.12;
  pointer-events: none;
}
.traffic-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--cyan);
  font-family: var(--font-sans);
}

/* ── Activity feed ──────────────────────────────────────────── */
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.activity-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.activity-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-2);
}
.activity-feed {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.activity-feed::-webkit-scrollbar { width: 3px; }
.activity-feed::-webkit-scrollbar-thumb { background: var(--border-2); }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.activity-item:hover { background: var(--surface-2); }
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.activity-text {
  font-size: 11px;
  color: var(--tx);
  line-height: 1.5;
}
.activity-meta {
  font-size: 10px;
  color: var(--tx-3);
  margin-top: 2px;
}
.activity-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.activity-footer a {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  transition: color 0.15s;
  text-decoration: none;
}
.activity-footer a:hover { color: var(--green-neon); }

/* ── Compliance strip ───────────────────────────────────────── */
.compliance-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.compliance-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.compliance-strip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-2);
}
.compliance-cells {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.compliance-cell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  transition: border-color 0.2s;
}
.compliance-cell:hover { border-color: var(--border-2); }
.compliance-cell-icon {
  font-size: 16px;
  margin-bottom: 6px;
}
.compliance-cell-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.compliance-cell-value {
  font-size: 11px;
  font-weight: 700;
}
.compliance-cell-sub {
  font-size: 9px;
  color: var(--tx-3);
  margin-top: 2px;
}

/* ── Agent grid ─────────────────────────────────────────────── */
.agents-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.agents-card-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.agents-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tx);
  font-family: var(--font-sans);
}
.agents-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.agent-cell {
  padding: 20px;
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}
.agent-cell:last-child { border-right: none; }
.agent-cell:hover { background: var(--surface-2); }
.agent-cell-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}
.agent-cell-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 3px;
  text-transform: capitalize;
}
.agent-cell-status {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.agent-cell-bar-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--tx-3);
  margin-bottom: 4px;
}
.agent-cell-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.agent-cell-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* ── Skeleton loader ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f5f3ed 25%, #ece9e0 50%, #f5f3ed 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Background ambient glows — subtle on light bg ─────────── */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
}
.ambient-glow-1 {
  top: -10%; right: -10%;
  width: 40%; height: 40%;
  background: rgba(154,91,60,.04);
}
.ambient-glow-2 {
  bottom: -10%; left: 20%;
  width: 30%; height: 30%;
  background: rgba(12,179,255,.04);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .compliance-cells { grid-template-columns: repeat(4, 1fr); }
  .agents-grid-inner { grid-template-columns: repeat(2, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .col-8, .col-4 { grid-column: span 12; }
  .col-6 { grid-column: span 12; }
  .col-3 { grid-column: span 6; }
}
@media (max-width: 900px) {
  /* The shared sidebar's menu button sits at the top left; the top bar keeps only
     search and status, and leaves room for the button. */
  .topbar { left: 0; padding: 0 12px 0 64px; gap: 10px; }
  .topbar-nav { display: none; }
  .topbar-left { gap: 12px; min-width: 0; flex: 1; }
  .topbar-search { flex: 1; min-width: 0; }
  .topbar-search input { width: 100%; }
  .topbar-right { gap: 8px; flex-shrink: 0; }
  .topbar-right .status-pill { display: none; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .topbar  { left: 0; }
  .main-content { margin-left: 0; }
  .compliance-cells { grid-template-columns: repeat(2, 1fr); }
  .agents-grid-inner { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
}

/* ── ROI & Value Section ────────────────────────────────────── */
.roi-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.roi-type-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.roi-type-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.roi-type-tab:hover { color: var(--tx); }
.roi-type-tab.active {
  background: linear-gradient(135deg, rgba(154,91,60,.1), rgba(95,122,100,.08));
  color: var(--cyan-2);
  border: 1px solid rgba(154,91,60,.2);
}

/* KPI row */
.roi-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.roi-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.roi-kpi-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-card-hover); }
.roi-kpi-primary {
  border-color: rgba(154,91,60,.2);
  background: linear-gradient(135deg, rgba(154,91,60,.04), rgba(95,122,100,.02));
}
.roi-kpi-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}
.roi-kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin-bottom: 6px;
}
.roi-kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--tx);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.roi-kpi-sub {
  font-size: 10px;
  color: var(--tx-3);
  line-height: 1.5;
  margin-bottom: 8px;
}
.roi-kpi-trend {
  font-size: 10px;
  font-weight: 600;
  color: var(--tx-3);
}
.roi-kpi-trend.up { color: #5f7a64; }
.roi-kpi-trend.down { color: #dc2626; }

/* Generic card */
.roi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,.06));
}
.roi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-2);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* Agent usage bars */
.roi-agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.roi-agent-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.roi-agent-name {
  width: 120px;
  color: var(--tx-2);
  flex-shrink: 0;
  font-size: 11px;
}
.roi-agent-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.roi-agent-bar {
  height: 100%;
  border-radius: 2px;
  opacity: 0.8;
}
.roi-agent-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--tx-3);
  width: 30px;
  text-align: right;
}

/* Performance bars */
.roi-perf-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roi-perf-label {
  font-size: 11px;
  color: var(--tx-3);
  width: 120px;
  flex-shrink: 0;
}
.roi-perf-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.roi-perf-bar {
  height: 100%;
  border-radius: 2px;
  opacity: 0.7;
}
.roi-perf-val {
  font-size: 11px;
  font-weight: 700;
  width: 50px;
  text-align: right;
}

/* Compare bars */
.roi-compare-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roi-compare-label {
  font-size: 11px;
  color: var(--tx-3);
  width: 100px;
  flex-shrink: 0;
}
.roi-compare-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.roi-compare-bar {
  height: 100%;
  border-radius: 3px;
}

/* Board summary card */
.roi-board-card {
  border-color: rgba(154,91,60,.2);
}
.roi-board-text {
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.8;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 8px;
}
.roi-board-text strong { color: var(--tx); }
.roi-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--tx-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.roi-copy-btn:hover { color: var(--cyan-2); border-color: rgba(154,91,60,.3); }
.roi-export-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--tx-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.roi-export-btn:hover { color: var(--tx); border-color: var(--border-2); }

/* Compliance rows */
.roi-compliance-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.roi-compliance-label {
  flex: 1;
  font-size: 11px;
  color: var(--tx-2);
}
.roi-compliance-val {
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .roi-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .roi-kpi-row { grid-template-columns: 1fr; }
  .roi-dash-header { flex-direction: column; }
}

/* ── Evidence-Based ROI Section ─────────────────────────────── */
.ev-assumptions-panel {
  background: var(--surface-2);
  border: 1px solid rgba(154,91,60,.2);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 8px;
}
.ev-assumptions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ev-assumption-item { display: flex; flex-direction: column; gap: 5px; }
.ev-assumption-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--tx-2);
}
.ev-assumption-source {
  font-size: 10px;
  color: var(--tx-3);
  line-height: 1.4;
}
.ev-assumption-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.ev-assumption-input {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-2);
  width: 90px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ev-assumption-input:focus { border-color: var(--cyan); }
.ev-assumption-unit { font-size: 11px; color: var(--tx-3); }

/* Use case grid */
.ev-usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ev-usecase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.ev-usecase-card:hover { border-color: var(--border-2); }
.ev-usecase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.ev-usecase-icon { font-size: 24px; flex-shrink: 0; }
.ev-usecase-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--tx);
}
.ev-usecase-subtitle {
  font-size: 10px;
  color: var(--tx-3);
  margin-top: 2px;
}
.ev-usecase-body { padding: 16px 18px; }
.ev-usecase-scenario {
  font-size: 11px;
  color: var(--tx-2);
  line-height: 1.65;
  margin-bottom: 14px;
}
.ev-usecase-scenario strong { color: var(--tx); }

/* Metrics row */
.ev-metrics-row {
  display: flex;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.ev-metric {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.ev-metric:last-child { border-right: none; }
.ev-metric-val {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ev-metric-label {
  font-size: 9px;
  color: var(--tx-3);
  margin-top: 3px;
  line-height: 1.3;
}

/* Steps */
.ev-usecase-steps { margin-bottom: 12px; }
.ev-step-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin-bottom: 8px;
}
.ev-steps-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: steps;
}
.ev-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--tx-2);
  line-height: 1.5;
  counter-increment: steps;
}
.ev-steps-list li::before {
  content: counter(steps);
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(154,91,60,.08);
  border: 1px solid rgba(154,91,60,.2);
  color: var(--cyan-2);
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Evidence badge */
.ev-usecase-evidence {
  font-size: 10px;
  color: var(--tx-3);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.ev-evidence-badge {
  font-weight: 700;
  color: var(--tx-2);
  margin-right: 4px;
}

/* Sources */
.ev-sources {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ev-sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ev-source-item {
  font-size: 10px;
  color: var(--tx-3);
  line-height: 1.5;
  padding: 6px 8px;
  background: var(--surface);
  border-radius: 5px;
  border: 1px solid var(--border);
}

@media (max-width: 1024px) {
  .ev-usecase-grid { grid-template-columns: 1fr; }
  .ev-assumptions-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-sources-grid { grid-template-columns: 1fr; }
}
