:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --border: #e3e7ef;
  --border-strong: #d3d9e4;
  --text: #1f2733;
  --text-soft: #3d4757;
  --muted: #8a93a3;
  --teal: #0f9d8f;
  --teal-soft: #e4f6f3;
  --teal-border: #9bd9d1;
  --green: #2fae6b;
  --red: #e5484d;
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 6px 20px rgba(20, 30, 50, .05);
}

/* ---- Dark mode ---- */
body.dark {
  --bg: #0f1420;
  --card: #171d2b;
  --border: #273040;
  --border-strong: #354055;
  --text: #e7ebf3;
  --text-soft: #b7c0d0;
  --muted: #7b8699;
  --teal-soft: #12352f;
  --teal-border: #1c5850;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Uniformly scale the whole dashboard down (10px-equivalent from a 14px base). */
.app { max-width: 1640px; margin: 0 auto; padding: 18px 24px 32px; zoom: 0.71; position: relative; }

/* ---- Dark mode toggle ---- */
.theme-toggle {
  position: absolute; top: 18px; right: 24px; z-index: 20;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
  font-size: 17px; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow); transition: background .15s ease, transform .1s ease;
}
.theme-toggle:hover { background: var(--teal-soft); }
.theme-toggle:active { transform: translateY(1px); }

/* Remap hardcoded light surfaces when dark mode is active. */
body.dark .ai-summary { background: linear-gradient(135deg, #191a2e 0%, #141c2e 100%); border-color: #2a2b45; }
body.dark .ai-stat,
body.dark .ai-card,
body.dark input[type="date"],
body.dark select,
body.dark .seg-btn.active,
body.dark .pill,
body.dark .ms-control,
body.dark .ms-menu,
body.dark .btn-ghost,
body.dark .modal,
body.dark .modal-close,
body.dark .day-select { background: var(--card); }
body.dark .segmented,
body.dark .status-pill,
body.dark .bar-track,
body.dark .ms-opt:hover,
body.dark .bar-row.clickable:hover,
body.dark .ticket-table th,
body.dark .ticket-table tr:hover td { background: #202838; }
body.dark .status-pill.live { background: #13342a; border-color: #1d5a44; }
body.dark .status-pill.error { background: #3a1f22; border-color: #6b3236; }
body.dark .error-box { background: #2a1a1c; border-color: #6b3236; }
body.dark .prio-badge.prio-high { background: #3a2a12; color: #e0a94b; }
body.dark .prio-badge.prio-critical { background: #3a1c1e; color: #e97a7f; }

/* ---- Header ---- */
.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
h1 { font-size: 22px; margin: 0 0 6px; color: var(--text); letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 13px; margin: 0 0 16px; max-width: 720px; line-height: 1.5; }

/* ---- AI summary ---- */
.ai-summary {
  background: linear-gradient(135deg, #faf8ff 0%, #f4f8ff 100%);
  border: 1px solid #e4def5;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.ai-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.ai-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: #fff; background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 6px; padding: 3px 7px;
}
.ai-meta { color: var(--muted); font-size: 12px; }
.ai-loading, .ai-error { color: var(--muted); font-size: 13px; padding: 8px 0; }
.ai-error { color: var(--red); }

.ai-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ai-stat {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; min-width: 92px;
}
.ai-stat-v { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.ai-stat-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ai-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; border-left-width: 3px; }
.ai-card.good { border-left-color: var(--green); }
.ai-card.bad { border-left-color: var(--red); }
.ai-card.warn { border-left-color: #e0952b; }
.ai-card.info { border-left-color: #7c3aed; }
.ai-card.action { border-left-color: var(--teal); }
.ai-card-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); margin-bottom: 8px; }
.ai-ic { font-size: 12px; }
.ai-card.good .ai-ic { color: var(--green); }
.ai-card.bad .ai-ic { color: var(--red); }
.ai-card.warn .ai-ic { color: #e0952b; }
.ai-card.info .ai-ic { color: #7c3aed; }
.ai-card.action .ai-ic { color: var(--teal); }
.ai-card ul { margin: 0; padding-left: 16px; }
.ai-card li { font-size: 12.5px; color: var(--text-soft); line-height: 1.5; margin-bottom: 4px; }
.ai-card li:last-child { margin-bottom: 0; }

/* ---- Ask box ---- */
.ask {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.ask-row { display: flex; align-items: center; gap: 10px; }
.ask-ic { color: #7c3aed; font-size: 16px; }
.ask-input {
  flex: 1; height: 38px; border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 0 14px; font-size: 14px; color: var(--text); background: #fff; outline: none;
}
.ask-input:focus { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168, 85, 247, .16); }
.ask-btn { height: 38px; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ask-chip {
  border: 1px solid var(--border-strong); background: #faf9ff; color: var(--text-soft);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.ask-chip:hover { border-color: #c4b5fd; color: #7c3aed; }
.ask-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.ask-answer { font-size: 14px; color: var(--text); line-height: 1.55; font-weight: 500; }
.ask-thinking, .ask-error { font-size: 13px; color: var(--muted); }
.ask-error { color: var(--red); }
.ask-count { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 8px; font-weight: 600; }

/* ---- Filters ---- */
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.filter-row { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: flex-end; }
.control { display: flex; flex-direction: column; gap: 7px; }
.control .ms { width: 220px; min-width: 180px; max-width: 260px; flex: none; }
.control-label, .pill-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="date"], select {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  height: 34px;
}
input[type="date"]:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

/* Segmented control */
.segmented { display: inline-flex; background: #f1f4f9; border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-btn {
  border: 0; background: transparent; color: var(--text-soft);
  font-size: 13px; padding: 6px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: #fff; color: var(--teal); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Pills */
.pill-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pill-label { min-width: 96px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .12s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill:hover { border-color: var(--teal-border); color: var(--teal); }
.pill.active { background: var(--teal-soft); border-color: var(--teal-border); color: var(--teal); font-weight: 600; }
.pill .count { color: var(--muted); font-size: 11px; font-weight: 500; }
.pill.active .count { color: var(--teal); }

/* Searchable multi-select dropdown */
.ms { position: relative; flex: 1; min-width: 240px; max-width: 380px; }
.ms-control {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  min-height: 36px; padding: 4px 8px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; cursor: text;
}
.ms-control.open { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.ms-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-border);
  border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 12px; max-width: 200px;
}
.ms-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-chip-x { border: 0; background: none; color: var(--teal); cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.ms-chip-x:hover { color: var(--red); }
.ms-input { border: 0; outline: 0; flex: 1; min-width: 90px; font-size: 13px; padding: 4px; background: transparent; color: var(--text); }
.ms-caret { color: var(--muted); font-size: 11px; margin-left: auto; padding-left: 4px; }
.ms-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; z-index: 30; padding: 4px;
}
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-soft); }
.ms-opt:hover { background: #f1f4f9; }
.ms-opt.sel { color: var(--teal); font-weight: 600; }
.ms-opt-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-check { width: 14px; flex: 0 0 14px; color: var(--teal); font-size: 12px; }
.ms-empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* Actions */
.filter-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  border-radius: 8px; font-size: 13px; padding: 8px 16px; cursor: pointer; font-weight: 600;
}
.btn-primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: #fff; color: var(--text-soft); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--teal-border); color: var(--teal); }

.switch { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.status-pill { font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: #f1f4f9; border: 1px solid var(--border); color: var(--muted); }
.status-pill.live { color: var(--green); background: #e9f8f0; border-color: #b7e6cd; }
.status-pill.error { color: var(--red); background: #fdecec; border-color: #f5c2c4; }
.updated { color: var(--muted); font-size: 12px; margin-left: auto; }
.hint { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ---- KPI cards ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.kpi .k-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.kpi .k-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi .k-value.small { font-size: 17px; }

/* ---- Chart card ---- */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.charts-grid.one-col { grid-template-columns: 1fr; }
@media (max-width: 1000px) { .charts-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  position: relative;
}

/* Loading overlay on chart cards */
.card-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(1.5px);
  border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text-soft);
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #e0dbf2; border-top-color: #7c3aed;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; gap: 16px; }
.card h2 { font-size: 15px; margin: 0 0 4px; color: var(--text); }
.card .meta { color: var(--muted); font-size: 12px; }

.empty, .error-box { color: var(--muted); padding: 32px; text-align: center; }
.error-box { color: var(--red); white-space: pre-wrap; text-align: left; font-family: ui-monospace, monospace; font-size: 12px; background: #fdf0f0; border: 1px solid #f5c2c4; border-radius: 8px; }
.jql { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); word-break: break-all; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

/* CSS bar chart */
#chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 12px; }
.bar-row.clickable { cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; transition: background .12s ease; }
.bar-row.clickable:hover { background: #f1f4f9; }
.bar-row.clickable:hover .bar-name { color: #0f9d8f; }
.bar-row.aggregate .bar-name { color: var(--muted); font-style: italic; }
.bar-name { font-size: 12.5px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #f1f4f9; border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill {
  background: linear-gradient(90deg, #12b3a3, #34c9a6);
  height: 100%; border-radius: 6px;
  display: flex; align-items: center; justify-content: flex-end;
  min-width: 24px; transition: width .35s ease;
}
.bar-fill.agg { background: linear-gradient(90deg, #9aa5b5, #b8c0cd); }
.bar-fill.navy { background: linear-gradient(90deg, #1a2a6c, #274690); }
.bar-fill.navy.agg { background: linear-gradient(90deg, #5a6288, #7a86a8); }
.bar-val { color: #fff; font-size: 12px; font-weight: 700; padding: 0 9px; }

/* Line chart (open tickets over time) */
#openChart { width: 100%; position: relative; }
.line-svg { width: 100%; display: block; }
.line-grid { stroke: var(--border); stroke-width: 1; }
.line-grid-label { fill: var(--muted); font-size: 11px; }
.line-x-label { fill: var(--muted); font-size: 11px; }
.line-area { fill: rgba(124, 58, 237, .14); }
.line-path { fill: none; stroke: #7c3aed; stroke-width: 2; }
.line-dot { fill: #7c3aed; }
.line-dot-val { fill: var(--text); font-size: 12px; font-weight: 700; }
.line-hover-dot { fill: #fff; stroke: #7c3aed; stroke-width: 2.5; }

.line-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #2a2140;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

/* Grouped bar chart (raised vs resolved) */
#rrChart { width: 100%; position: relative; }
.bar-svg { width: 100%; display: block; }
.bar-x-label { fill: var(--muted); font-size: 10px; }
.bar-col { transition: opacity .12s ease; }
.bar-col:hover { opacity: .82; }
.bar-raised { fill: #6b7cff; }
.bar-resolved { fill: #2fae6b; }

.chart-legend { display: flex; gap: 14px; align-items: center; }
.chart-legend .lg { position: relative; padding-left: 16px; font-size: 12px; color: var(--text-soft); }
.chart-legend .lg::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 11px; height: 11px; border-radius: 3px; }
.chart-legend .lg-raised::before { background: #6b7cff; }
.chart-legend .lg-resolved::before { background: #2fae6b; }

/* Oldest open tickets table */
#oldestTable { width: 100%; }
.oldest-table { table-layout: fixed; }
.oldest-table tr.clickable-row { cursor: pointer; }
.oldest-table td, .oldest-table th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Give the Ticket column the most room; shrink the rest. */
.oldest-table th:nth-child(1), .oldest-table td:nth-child(1) { width: 46%; }
.oldest-table th:nth-child(2), .oldest-table td:nth-child(2) { width: 14%; }
.oldest-table th:nth-child(3), .oldest-table td:nth-child(3) { width: 13%; }
.oldest-table th:nth-child(4), .oldest-table td:nth-child(4) { width: 12%; }
.oldest-table th:nth-child(5), .oldest-table td:nth-child(5) { width: 15%; }
.oldest-table .tt-ticket { max-width: none; font-size: 13.5px; }
.oldest-table .tt-key { color: #7c3aed; font-weight: 600; }
.oldest-table .tt-sum { color: var(--text-soft); }
.oldest-table td:not(.tt-ticket):not(.tt-days), .oldest-table th:not(:first-child) { font-size: 11px; }
.oldest-table th.tt-days, .oldest-table td.tt-days { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); font-size: 11px; }
.oldest-table td.age-amber { color: #d1932a; }
.oldest-table td.age-red { color: #e5484d; }

/* Priority watchlist table */
.priority-table tr.clickable-row { cursor: pointer; }
.priority-table .tt-ticket { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priority-table .tt-key { color: #7c3aed; font-weight: 600; }
.priority-table .tt-sum { color: var(--text-soft); }
.priority-table th.tt-days, .priority-table td.tt-days { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.priority-table td.age-amber { color: #d1932a; }
.priority-table td.age-red { color: #e5484d; }
.prio-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #eef1f6; color: var(--text-soft); }
.prio-badge.prio-high { background: #fdf0dc; color: #b26a00; }
.prio-badge.prio-critical { background: #fde5e6; color: #c62a2f; }

/* Per-card scope filter (persistent My Team's / My issues) */
.scope-filter { display: flex; align-items: center; gap: 8px; }
.scope-filter label { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.scope-select {
  font: inherit; font-size: 13px; color: var(--text);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; min-width: 180px; cursor: pointer;
}
.scope-select:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }

/* Clicked-day ticket table (in popup) */
.tt-scroll { max-height: 60vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.ticket-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ticket-table th, .ticket-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ticket-table th { position: sticky; top: 0; background: #faf9fe; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.ticket-table tr:last-child td { border-bottom: 0; }
.ticket-table tr:hover td { background: #faf9fe; }
.ticket-table a { color: #7c3aed; font-weight: 600; text-decoration: none; }
.ticket-table a:hover { text-decoration: underline; }
.ticket-table .tt-summary { color: var(--text-soft); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ticket popup modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 24, 34, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(20, 30, 50, .28);
  width: min(860px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-actions { display: flex; align-items: center; gap: 10px; }
.modal-export { padding: 6px 12px; font-size: 12px; }
.modal-close { border: 1px solid var(--border-strong); background: #fff; color: var(--muted); border-radius: 7px; width: 30px; height: 30px; cursor: pointer; font-size: 17px; line-height: 1; }
.modal-close:hover { color: #7c3aed; border-color: #c4b5fd; }
.modal-body { padding: 16px 20px 20px; overflow-y: auto; }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 110px 1fr; }
  .pill-label { min-width: auto; width: 100%; }
}
