/* PRISMA Clinical BI — institutional hospital theme */
:root {
  --c-bg: #F4F6F9;
  --c-surface: #FFFFFF;
  --c-surface-2: #FAFBFD;
  --c-border: #E3E8EF;
  --c-border-strong: #CBD5E1;
  --c-text: #0F172A;
  --c-text-2: #334155;
  --c-text-3: #64748B;
  --c-text-4: #94A3B8;

  --c-primary: #008A3D;          /* SSR Emilia-Romagna green */
  --c-primary-700: #006B2F;
  --c-primary-900: #00451E;
  --c-primary-50: #E5F3EB;
  --c-primary-100: #C3E2CF;

  --c-accent: #C8102E;            /* AUSL red accent */
  --c-accent-50: #FBEAEC;
  --c-accent-100: #F4C5CB;

  --c-secondary: #0E7C8C;         /* teal for chart variety */
  --c-secondary-50: #E4F2F4;

  --c-warn: #C2410C;
  --c-warn-50: #FFF3EB;
  --c-danger: #C8102E;
  --c-danger-50: #FBEAEC;
  --c-info: #0369A1;

  --c-chart-1: #008A3D;
  --c-chart-2: #0E7C8C;
  --c-chart-3: #7C3AED;
  --c-chart-4: #C8102E;
  --c-chart-5: #C2410C;
  --c-chart-6: #B45309;
  --c-chart-7: #1E5BA8;
  --c-chart-8: #6D28D9;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);

  --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "tnum";
}
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ============ APP SHELL ============ */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  background: linear-gradient(180deg, #00451E 0%, #006B2F 100%);
  color: #DCEFE2;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #003417;
}
.sidebar__brand {
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #ffffff;
}
.sidebar__brand-logo {
  width: 100%;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  display: block;
}
.sidebar__brand-mark {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1B9E7C, #0E8F6E);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.sidebar__brand-text { line-height: 1.1; }
.sidebar__brand-name { font-weight: 700; font-size: 14px; letter-spacing: 0.02em; color: #fff; }
.sidebar__brand-sub { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }

.sidebar__section { padding: 14px 12px 6px; }
.sidebar__section-label {
  padding: 6px 10px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.sidebar__nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
}
.sidebar__item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar__item.is-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: inset 2px 0 0 #C8102E;
}
.sidebar__item svg { flex: 0 0 auto; opacity: 0.9; }
.sidebar__item .badge {
  margin-left: auto;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75);
}

.sidebar__footer {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #C8102E;
  color: white;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 12px;
}
.sidebar__user-name { font-size: 12.5px; color: #fff; }
.sidebar__user-role { font-size: 10.5px; color: rgba(255,255,255,0.5); }

/* ============ MAIN ============ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.topbar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  height: 56px;
  flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 16px;
}
.topbar__crumbs { display: flex; align-items: center; gap: 8px; color: var(--c-text-3); font-size: 12.5px; }
.topbar__crumbs strong { color: var(--c-text); font-weight: 600; }
.topbar__sep { color: var(--c-text-4); }
.topbar__spacer { flex: 1; }
.topbar__action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--c-text-2);
  cursor: pointer;
}
.topbar__action:hover { border-color: var(--c-border-strong); background: var(--c-surface-2); }
.topbar__action--primary {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}
.topbar__action--primary:hover { background: var(--c-primary-700); border-color: var(--c-primary-700); }

.topbar__env {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--c-primary-50);
  color: var(--c-primary);
  border: 1px solid var(--c-primary-100);
  font-weight: 600;
}

.content {
  flex: 1;
  overflow: auto;
  padding: 20px;
}
.content__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 700; color: var(--c-text); margin: 0; }
.page-sub { font-size: 12.5px; color: var(--c-text-3); margin-top: 2px; }

/* ============ CARDS ============ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 10px;
}
.card__title { font-size: 13.5px; font-weight: 600; color: var(--c-text); }
.card__sub { font-size: 11.5px; color: var(--c-text-3); }
.card__head-spacer { flex: 1; }
.card__body { padding: 16px; }
.card__body--tight { padding: 8px; }
.card__body--flush { padding: 0; }

/* ============ KPI ============ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi__label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-3);
  font-weight: 600;
}
.kpi__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-text);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.kpi__unit { font-size: 13px; color: var(--c-text-3); font-weight: 500; margin-left: 4px; }
.kpi__delta {
  margin-top: 6px;
  font-size: 11.5px;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--c-text-3);
}
.kpi__delta--up { color: var(--c-accent); }
.kpi__delta--down { color: var(--c-danger); }
.kpi__delta--neutral { color: var(--c-text-3); }
.kpi__icon {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--c-primary-50);
  color: var(--c-primary);
  display: grid; place-items: center;
}

/* ============ PILLS / CHIPS ============ */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--c-primary-50);
  color: var(--c-primary);
  border: 1px solid var(--c-primary-100);
}
.pill--accent { background: var(--c-accent-50); color: var(--c-accent); border-color: var(--c-accent-100); }
.pill--warn { background: var(--c-warn-50); color: var(--c-warn); border-color: #FCD9B6; }
.pill--neutral { background: #F1F5F9; color: var(--c-text-2); border-color: var(--c-border); }
.pill--danger { background: var(--c-danger-50); color: var(--c-danger); border-color: #FBD2CE; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  cursor: pointer;
}
.chip:hover { border-color: var(--c-border-strong); }
.chip.is-active {
  background: var(--c-primary-50);
  color: var(--c-primary);
  border-color: var(--c-primary-100);
  font-weight: 600;
}
.chip__remove {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  background: rgba(0, 138, 61, 0.15);
  color: var(--c-primary);
  cursor: pointer;
}

/* ============ TABLE ============ */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.table th {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-3);
  font-weight: 600;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tr:last-child td { border-bottom: none; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: var(--c-primary-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .mono { font-family: var(--font-mono); font-size: 12px; }
.table__pivot th, .table__pivot td { white-space: nowrap; }
.table tr.is-total td {
  background: var(--c-surface-2);
  font-weight: 600;
  color: var(--c-text);
  border-top: 1px solid var(--c-border-strong);
}

/* ============ FORM CONTROLS ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text-2);
  letter-spacing: 0.02em;
}
.field__hint { font-size: 11px; color: var(--c-text-3); }
.input, .select, .textarea {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--c-text);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0, 138, 61, 0.15);
}
.input--with-icon { padding-left: 32px; }
.field__icon {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--c-text-4);
  pointer-events: none;
}
.field__wrap { position: relative; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all 100ms;
}
.btn:hover { border-color: var(--c-border-strong); background: var(--c-surface-2); }
.btn--primary { background: var(--c-primary); color: white; border-color: var(--c-primary); }
.btn--primary:hover { background: var(--c-primary-700); border-color: var(--c-primary-700); }
.btn--accent { background: var(--c-accent); color: white; border-color: var(--c-accent); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--c-text-2); }
.btn--ghost:hover { background: var(--c-surface-2); }
.btn--sm { padding: 4px 8px; font-size: 11.5px; }
.btn--lg { padding: 9px 16px; font-size: 13px; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--c-text-2); }
.checkbox input {
  appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  background: white;
  transition: all 100ms;
}
.checkbox input:checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.checkbox input:checked::after {
  content: ""; position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid white; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--c-text-2); }
.radio input {
  appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  background: white;
}
.radio input:checked { border-color: var(--c-primary); border-width: 4.5px; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-surface-2);
  padding: 2px;
}
.segmented__btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-3);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.segmented__btn.is-active {
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* ============ LAYOUT HELPERS ============ */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2-1 { grid-template-columns: 2fr 1fr; }
.grid-3-2 { grid-template-columns: 3fr 2fr; }
.row { display: flex; align-items: center; gap: 8px; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }

/* ============ DRILL PANEL ============ */
.drill-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 40;
  animation: fadeIn 160ms ease-out;
}
.drill-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 640px;
  max-width: 92vw;
  background: var(--c-bg);
  z-index: 50;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideIn 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.drill-panel__head {
  padding: 16px 20px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 12px;
}
.drill-panel__crumbs { font-size: 11.5px; color: var(--c-text-3); }
.drill-panel__crumbs button {
  background: none; border: none;
  color: var(--c-primary);
  cursor: pointer;
  padding: 0;
  font-size: 11.5px;
}
.drill-panel__crumbs button:hover { text-decoration: underline; }
.drill-panel__crumbs strong { color: var(--c-text); font-weight: 600; }
.drill-panel__title { font-size: 16px; font-weight: 700; color: var(--c-text); margin-top: 4px; }
.drill-panel__close {
  border: none; background: transparent;
  color: var(--c-text-3);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid; place-items: center;
}
.drill-panel__close:hover { background: var(--c-surface-2); color: var(--c-text); }
.drill-panel__body { flex: 1; overflow: auto; padding: 16px 20px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ CHART SHARED ============ */
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11.5px; color: var(--c-text-2); }
.legend__dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.tooltip {
  position: absolute;
  background: #0F172A;
  color: white;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11.5px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 5;
}
.tooltip strong { color: white; font-weight: 600; }
.tooltip__row { display: flex; align-items: center; gap: 6px; }

/* misc */
.muted { color: var(--c-text-3); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-sm { font-size: 11.5px; }
hr.sep { border: none; border-top: 1px solid var(--c-border); margin: 12px 0; }

/* ============ CHAT ASSISTANT ============ */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(135deg, #008A3D 0%, #006B2F 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 138, 61, 0.32), 0 2px 6px rgba(0, 138, 61, 0.2);
  z-index: 30;
  transition: transform 120ms, box-shadow 120ms;
  position: fixed;
}
.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 138, 61, 0.4), 0 4px 8px rgba(0, 138, 61, 0.25);
}
.chat-fab__pulse {
  position: absolute;
  top: 8px; right: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #C8102E;
  box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.55);
  animation: chatPulse 2.2s infinite;
}
@keyframes chatPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

.chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  height: 600px;
  max-height: calc(100vh - 48px);
  background: var(--c-surface);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 8px 16px rgba(15, 23, 42, 0.08);
  z-index: 35;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatIn 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
  border: 1px solid var(--c-border);
}
@keyframes chatIn {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.chat-panel__head {
  padding: 12px 12px 12px 14px;
  background: linear-gradient(135deg, #008A3D 0%, #006B2F 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.chat-panel__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.chat-panel__title { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.chat-panel__sub {
  font-size: 11px;
  opacity: 0.82;
  display: flex; align-items: center; gap: 6px;
  margin-top: 1px;
}
.chat-panel__live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #82E5A6;
  box-shadow: 0 0 0 2px rgba(130, 229, 166, 0.3);
}
.chat-panel__icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: grid; place-items: center;
}
.chat-panel__icon-btn:hover { background: rgba(255, 255, 255, 0.22); }

.chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--c-bg);
}
.chat-panel__body::-webkit-scrollbar { width: 6px; }
.chat-panel__body::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 999px; }

.chat-bubble {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 100%;
}
.chat-bubble--user {
  flex-direction: row-reverse;
  margin-left: 36px;
}
.chat-bubble--assistant {
  margin-right: 24px;
}
.chat-bubble__avatar {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #008A3D, #006B2F);
  display: grid; place-items: center;
  margin-bottom: 2px;
}
.chat-bubble__content {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.chat-bubble--user .chat-bubble__content {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
  border-bottom-right-radius: 4px;
}
.chat-bubble--assistant .chat-bubble__content {
  border-bottom-left-radius: 4px;
}
.chat-bubble__content strong { font-weight: 700; }
.chat-bubble__content code {
  background: rgba(15, 23, 42, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.chat-bubble--user .chat-bubble__content code { background: rgba(255, 255, 255, 0.18); }
.chat-bubble__content ul { margin: 6px 0 0; padding-left: 20px; }
.chat-bubble__content li { margin: 2px 0; }
.chat-bubble__typing {
  display: flex; gap: 4px;
  padding: 2px 0;
}
.chat-bubble__typing span {
  width: 6px; height: 6px;
  background: #94A3B8;
  border-radius: 50%;
  animation: chatType 1.2s infinite;
}
.chat-bubble__typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-bubble__typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatType {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-panel__suggestions {
  padding: 10px 14px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
}
.chat-panel__suggestions-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.chat-panel__suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-suggestion {
  background: var(--c-primary-50);
  border: 1px solid var(--c-primary-100);
  color: var(--c-primary-700);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 100ms;
}
.chat-suggestion:hover {
  background: var(--c-primary-100);
}

.chat-panel__input {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  flex: 0 0 auto;
}
.chat-panel__textbox {
  flex: 1;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--c-text);
  outline: none;
  transition: all 100ms;
}
.chat-panel__textbox:focus {
  border-color: var(--c-primary);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px rgba(0, 138, 61, 0.12);
}
.chat-panel__send {
  width: 36px; height: 36px;
  background: var(--c-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  flex: 0 0 auto;
  transition: background 100ms;
}
.chat-panel__send:hover:not(:disabled) { background: var(--c-primary-700); }
.chat-panel__send:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-panel__footer {
  font-size: 10px;
  color: var(--c-text-4);
  text-align: center;
  padding: 6px 12px 10px;
  background: var(--c-surface);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}

.divider-v { width: 1px; background: var(--c-border); align-self: stretch; }

.search-wrap { position: relative; flex: 1; max-width: 340px; }
.search-wrap .input { padding-left: 32px; }

/* heatmap cells */
.heatmap-cell {
  stroke: white;
  stroke-width: 1;
  cursor: pointer;
  transition: opacity 100ms;
}
.heatmap-cell:hover { stroke: #0F172A; stroke-width: 1.5; }

/* status dot */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  margin-right: 6px;
  vertical-align: middle;
}

/* scrollbar */
.content::-webkit-scrollbar, .drill-panel__body::-webkit-scrollbar { width: 10px; height: 10px; }
.content::-webkit-scrollbar-track, .drill-panel__body::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb, .drill-panel__body::-webkit-scrollbar-thumb {
  background: #CBD5E1; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.content::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: padding-box; }

/* filter summary bar */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-bar__label { font-size: 11.5px; color: var(--c-text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }

/* empty state */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-text-3);
  font-size: 12.5px;
}

/* loading shimmer (not used now but kept) */
.skeleton { background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 50%, #EEF2F7 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
