:root {
  --bg: #1b1e24;
  --panel: #23272f;
  --panel-alt: #2b303a;
  --border: #3a3f4a;
  --text: #e6e8eb;
  --text-dim: #9aa1ad;
  --accent: #4dd68a;
  --accent-hover: #6de3a3;
  --accent2: #7bdff2;
  --danger: #ff6b6b;
  --highlight: #ffb703;
  --map-bg: #10131a;
}

/* Light theme: toggled via data-theme="light" on <html> (see theme.js).
   Chart.js canvases don't pick these up automatically -- utils.js's
   chartTheme() reads this same attribute and every chart-building function
   re-reads it at render time, so a toggle re-renders open charts instead of
   relying on CSS inheritance for canvas content. */
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-alt: #eceef1;
  --border: #d8dce3;
  --text: #1b1e24;
  --text-dim: #5b6372;
  --accent: #1f9d5a;
  --accent-hover: #178049;
  --accent2: #0891b2;
  --danger: #d6334a;
  --highlight: #b45f00;
  --map-bg: #d8dce3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: "Segoe UI", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

#app { display: flex; flex-direction: column; height: 100vh; }

#topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand { font-weight: 700; font-size: 16px; color: var(--accent); margin-right: 6px; }

#topbar .label { color: var(--text-dim); margin-right: 6px; }
#topbar label { margin-right: 10px; white-space: nowrap; }

.basemap-select, .layer-toggles { display: flex; align-items: center; }
.basemap-select[hidden], .layer-toggles[hidden] { display: none; }

.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

button, .mini-btn {
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}
button:hover, .mini-btn:hover { background: var(--accent); color: #101317; border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:disabled:hover { background: var(--panel-alt); color: var(--text); border-color: var(--border); }

#tabBar { display: flex; gap: 2px; background: var(--panel); border-bottom: 1px solid var(--border); padding: 0 10px; }
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--text-dim); padding: 9px 14px; font-size: 12.5px; font-weight: 600;
}
.tab-btn:hover { background: var(--panel-alt); color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tab-page[hidden] { display: none; }

#mainArea { flex: 1; display: flex; min-height: 0; }

/* ---- 생산성 분석 탭 ---- */
/* Oil moved onto the Gas chart's right axis (optional overlay) instead of
   its own panel below -- that freed-up room goes back to the map/well-info
   area up top (was 300px) so more of it is visible without scrolling. */
#analyticsMainArea { flex: 0 0 420px; display: flex; min-height: 0; border-bottom: 1px solid var(--border); }
#analyticsMap { flex: 1; background: var(--map-bg); min-width: 0; }
#analyticsSidebar {
  width: 460px; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px;
}
#analyticsCharts { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
#analyticsCharts .panel canvas { width: 100%; }
#analyticsCharts .panel:first-child canvas { max-height: 380px; }
#analyticsCharts .panel:not(:first-child) canvas { max-height: 280px; }
.insight-item {
  border-left: 3px solid var(--accent); padding: 4px 8px; margin: 4px 0;
  background: var(--bg); font-size: 11.5px; line-height: 1.5;
}
.insight-item.warn { border-left-color: var(--danger); }

/* ---- Well별 비교분석 탭 ---- */
/* Left: a full-height options sidebar (same idea as WellProdAnalyzer's own
   #side), not a top-right box -- the previous "index map top-left, options
   top-right, inset full-width below" layout read as unbalanced and left the
   options column too short vertically. Right: Index map + Inset map side by
   side at the top, charts below -- matches WellProdAnalyzer's own
   #mapRow/#mapMain+#insetBox split. */
#wcLayout { flex: 1; display: flex; min-height: 0; }
#wcSidebar {
  width: 340px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--border);
  overflow-y: auto; overflow-x: hidden; padding: 10px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box;
}
#wcWork { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
#wcIndexToolbar { padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 11.5px; flex-wrap: wrap; row-gap: 4px; }
#wcIndexToolbar select { padding: 2px 4px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; }
.wc-tool.on { background: var(--accent); color: #101317; border-color: var(--accent); }
#wcMapRow { flex: 0 0 380px; display: flex; min-height: 0; border-bottom: 1px solid var(--border); }
#wcIndexMapWrap { flex: 1; min-width: 0; position: relative; }
#wcIndexMap { width: 100%; height: 100%; background: var(--map-bg); }
#wcInsetMapWrap { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); padding: 8px; box-sizing: border-box; position: relative; }
#wcInsetMap { flex: 1; min-height: 0; background: var(--map-bg); position: relative; }
/* #wcInsetMapWrap's heading sits outside any .panel wrapper (the box itself
   just has a left border, not a full panel treatment), so .panel h3's font
   rules below never reached it -- restate them here so it matches every
   other section heading instead of falling back to the browser default. */
#wcInsetMapWrap .panel-head h3 { margin: 0 0 8px; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; flex: 1; }
#wcCharts { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.wc-card canvas { width: 100%; max-height: 320px; }
.wc-card-controls { flex-wrap: wrap; row-gap: 4px; font-size: 11.5px; margin-bottom: 6px; }
.wc-card-controls select { padding: 2px 4px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; }
.wc-dist-lbl .trs-label { white-space: nowrap; }

/* Collapsible category filter groups (<details>/<summary>) -- collapsed by
   default, native disclosure triangle makes "there's more below" obvious
   without needing a custom-drawn arrow/JS toggle. */
.wc-filter-group { margin-bottom: 2px; }
.wc-filter-group summary {
  cursor: pointer; font-size: 11.5px; color: var(--text-dim); padding: 3px 0;
  list-style-position: outside; user-select: none;
}
.wc-filter-group summary:hover { color: var(--text); }
.wc-filter-group .checklist { margin: 4px 0 6px 4px; }
/* .checklist label is display:flex (shared global rule) -- a long category
   value is then an anonymous flex item with min-width:auto by default, so
   it refuses to shrink/wrap and instead overflows past the sidebar's right
   edge instead of wrapping onto a 2nd line. Scoped here rather than fixing
   the shared .checklist rule globally, since that's used by other tabs too
   (narrower checklists there, never hit this in practice). */
.wc-filter-group .checklist label { flex-wrap: wrap; word-break: break-word; }

/* Index/Inset map color-by legend (categorical swatches, or a numeric
   min→max line for a gradient field) -- floats directly over its map
   (bottom-left, clear of the zoom control which sits top-left) instead of
   living in the sidebar, so it's visible right where the colors are and
   updates in place as you pan/zoom/change the color field. */
.wc-legend { font-size: 11px; color: var(--text-dim); }
.wc-legend-onmap {
  position: absolute; left: 8px; bottom: 8px; z-index: 450; max-width: 190px; max-height: 140px;
  overflow-y: auto; background: var(--panel-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 7px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.wc-legend-row { display: flex; align-items: center; gap: 5px; padding: 1px 0; flex-wrap: wrap; word-break: break-word; }
.wc-legend-row .swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.wc-legend-num { padding: 1px 0; }

/* ---- 생산량 변화 요약 탭 ---- */
#changeSummaryScroll { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.cs-section .cs-chart { max-height: 220px; margin: 8px 0; }
.cs-trend canvas { max-height: 180px; width: 100%; }
.table-wrap { overflow-x: auto; }
table.cs-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
table.cs-table th, table.cs-table td {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top;
}
table.cs-table th { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
table.cs-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cs-table td.na { color: var(--text-dim); }
table.cs-table .cs-quotes { color: var(--text-dim); font-size: 11px; margin-top: 3px; }
.cs-well-cell { display: flex; align-items: center; gap: 6px; }

/* ---- 운영 현황 탭 ---- */
#dashboardScroll { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
/* Fixed row height so the map (left) and the stat-cards+daily-chart column
   (right) can both stretch to fill it exactly -- no leftover empty space
   under the map, no guessing from content height. */
#dashboardTopRow { display: flex; gap: 10px; height: 460px; }
#dashboardMap {
  width: 420px; height: 100%; flex-shrink: 0;
  background: var(--map-bg); border: 1px solid var(--border); border-radius: 6px;
}
#dashboardTopRight { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; }
#dashboardStats.stat-grid {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px; align-content: start;
}
.stat-card {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px;
}
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat-card .stat-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
#dashboardCharts { display: flex; flex-direction: column; gap: 10px; }
#dashboardCharts .panel canvas { width: 100%; max-height: 260px; }

/* Daily chart panel fills whatever's left of the row's fixed height below
   the stat cards -- its canvas uses Chart.js's maintainAspectRatio:false
   (see dashboard.js) specifically so it can stretch into that flexed space
   instead of being locked to Chart.js's default 2:1 aspect ratio. */
#dashboardDailyPanel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#dashboardDailyBody { display: flex; gap: 10px; flex: 1; min-height: 0; }
/* Chart.js (responsive, maintainAspectRatio:false) sizes itself off its
   canvas's DIRECT parent's clientWidth -- it has to be the canvas's own
   dedicated box, not a flex row shared with a sibling (#dashDailyControls),
   or Chart.js reads the whole row's width (including the sidebar) instead
   of the canvas's actual flex-allocated share, drawing wider than what's
   visible and clipping tooltips near the real right edge. */
#dashDailyChartWrap { flex: 1; min-width: 0; min-height: 0; position: relative; }
#dashDailyChartWrap canvas { max-height: none; }
#dashDailyControls { width: 200px; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
#dashDailyControls .dash-daily-date { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
#dashDailyControls .dash-daily-date .dsname { width: auto; color: var(--text-dim); font-size: 11px; }
#dashDailyControls input[type="date"] {
  padding: 4px 6px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; font-size: 12px;
}
#dashDailyControls .dsname { color: var(--text-dim); font-size: 11px; }
#dashDailyOperatorLegend { max-height: 110px; overflow-y: auto; }

#map { flex: 1; background: var(--map-bg); position: relative; }

/* ---- 지진 정보 탭 ---- */
#seismicMainArea { flex: 1; display: flex; min-height: 0; }
#seismicMap { flex: 1; background: var(--map-bg); position: relative; min-width: 0; }
#seismicSidebar {
  width: 360px; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px;
}
#seismicSidebar input[type="range"] { width: 100%; }
.seismic-mag-legend-row { display: flex; align-items: center; gap: 6px; font-size: 11px; margin: 2px 0; }
.seismic-mag-legend-row .swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.seismic-popup { font-size: 12px; line-height: 1.5; }
.seismic-popup .mag { font-size: 16px; font-weight: 700; }
.seismic-popup a { color: var(--accent); }

#sidebar {
  width: 540px;
  flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}
.panel h3 { margin: 0 0 8px; font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h3 { margin-bottom: 0; flex: 1; }

#searchBox {
  width: 100%; padding: 6px 8px; margin-bottom: 6px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
}

.scroll-list { max-height: 220px; overflow-y: auto; padding-right: 14px; }
.checklist label { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 12px; }
.checklist input[type=checkbox] { flex-shrink: 0; }
.checklist .cnt { margin-left: auto; padding-right: 2px; color: var(--text-dim); font-size: 11px; flex-shrink: 0; }

.filter-group { margin-bottom: 10px; }
.filter-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--text-dim); }
.filter-head span { flex: 1; }
.mini-btn { padding: 2px 6px; font-size: 10px; }

.filter-count { color: var(--text-dim); font-size: 11px; margin-top: 4px; }

.result-item {
  padding: 5px 6px; border-radius: 4px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.result-item:hover { background: var(--bg); }
.result-item .rmain { cursor: pointer; flex: 1; min-width: 0; }
.result-item .rname { font-weight: 600; }
.badge {
  display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .03em;
  color: #0a6b3a; background: #bdf0d2; border-radius: 8px; padding: 0 6px; margin-left: 4px; vertical-align: middle;
}
.result-item .rmeta { color: var(--text-dim); font-size: 11px; }
.result-item input[type=checkbox] { flex-shrink: 0; }

#detailContent .muted { color: var(--text-dim); }
#detailContent table { width: 100%; border-collapse: collapse; }
#detailContent td { padding: 3px 4px; vertical-align: top; border-bottom: 1px solid var(--border); font-size: 12px; }
#detailContent td.k { color: var(--text-dim); width: 46%; }
#detailContent .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
#detailContent .section-title { color: var(--accent); font-weight: 600; margin: 10px 0 2px; cursor: pointer; user-select: none; }
#detailContent .section-title:before { content: "\25be  "; }
#detailContent .section-title.collapsed:before { content: "\25b8  "; }
#detailContent .section-body.collapsed { display: none; }
#detailContent .issue-item { border-left: 3px solid var(--danger); padding: 4px 8px; margin: 4px 0; background: var(--bg); font-size: 11.5px; }
#detailContent .issue-item .idate { color: var(--accent); font-weight: 600; }
#detailContent .issue-disclaimer { color: var(--text-dim); font-size: 10.5px; font-style: italic; }

.custom-layer-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.custom-layer-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-layer-row .rm { color: var(--danger); cursor: pointer; }

.leaflet-popup-content { font-size: 12px; }
.well-label {
  background: rgba(20,22,27,.82); color: #fff; border: none !important; box-shadow: none !important;
  font-size: 10.5px; padding: 1px 4px !important; white-space: nowrap;
}
.well-label::before { display: none; }

.land-acre-label {
  background: rgba(20,22,27,.82); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 3px; font-size: 10.5px; font-weight: 600; line-height: 1.25;
  padding: 1px 5px; white-space: nowrap; text-align: center; pointer-events: none;
}
.land-acre-label .expiry-date { display: block; font-size: 9px; font-weight: 400; color: #ffd0a8; }

.trs-label {
  background: rgba(20,22,27,.75); color: #7bdff2; border: none !important; box-shadow: none !important; /* trs-label: a map overlay chip, intentionally theme-independent (always a dark chip over map imagery) */
  font-size: 9.5px; font-weight: 600; padding: 0 3px !important; white-space: nowrap; pointer-events: none;
}
.trs-label::before { display: none; }

#toastHost {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 6px; z-index: 5000;
  align-items: center;
}
.toast {
  background: var(--panel-alt); color: var(--text); border: 1px solid var(--accent);
  padding: 8px 14px; border-radius: 6px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.4);
  white-space: pre-line; max-width: 480px; text-align: center;
}
.toast-error { border-color: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 6000;
}
.modal-backdrop[hidden] { display: none; }
.modal-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  width: min(760px, 92vw); max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.modal-box.wide { width: min(1180px, 95vw); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 16px; color: var(--accent); }
.modal-close { padding: 4px 9px; font-size: 13px; }
.modal-body { padding: 14px 20px; overflow-y: auto; line-height: 1.55; font-size: 12.5px; }
.modal-body h3 { color: var(--accent); font-size: 13.5px; margin: 18px 0 6px; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body ul, .modal-body ol { padding-left: 20px; margin: 6px 0; }
.modal-body li { margin: 4px 0; }
.modal-body code {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 3px;
  padding: 1px 5px; font-size: 11.5px;
}
.modal-body pre {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 5px;
  padding: 8px 10px; overflow-x: auto; font-size: 11.5px; margin: 6px 0;
}
.modal-body pre code { background: none; border: none; padding: 0; }
.modal-body p.muted { color: var(--text-dim); }

/* ---- compare tray + well quick actions (stacked bottom-left so neither
   overlaps the other when both are visible at once) ---- */
#bottomTrays {
  position: fixed; left: 16px; bottom: 16px; z-index: 4000;
  display: flex; flex-direction: column-reverse; gap: 8px; align-items: flex-start;
}
#compareTray, #wellQuickActions {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; box-shadow: 0 4px 16px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 580px);
}
#compareTray[hidden], #wellQuickActions[hidden] { display: none; }
#compareTray .tray-chips { display: flex; gap: 6px; flex-wrap: wrap; max-width: 640px; }
.tray-chip {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 2px 8px; font-size: 11px; display: flex; align-items: center; gap: 5px;
}
.tray-chip .x { cursor: pointer; color: var(--danger); }
#compareTray .tray-hint { color: var(--text-dim); font-size: 11px; }
#wellQuickActions .tray-hint { color: var(--text-dim); font-size: 11px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- box-select ---- */
.box-select-rect {
  position: absolute; border: 1.5px dashed var(--accent); background: rgba(255,157,77,.12);
  z-index: 1000; pointer-events: none;
}

/* ---- compare table ---- */
#compareTableWrap { overflow-x: auto; }
#compareTableWrap table { border-collapse: collapse; width: 100%; font-size: 11.5px; }
#compareTableWrap th, #compareTableWrap td { border: 1px solid var(--border); padding: 5px 7px; white-space: nowrap; text-align: right; }
#compareTableWrap th { position: sticky; top: 0; background: var(--panel-alt); cursor: pointer; text-align: right; }
#compareTableWrap td:first-child, #compareTableWrap th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
#compareTableWrap .group-select { margin-bottom: 8px; }

/* ---- upload / db status ---- */
.upload-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.upload-row .dsname { width: 100px; flex-shrink: 0; color: var(--text-dim); }
#dbStatusTable { width: 100%; font-size: 11px; border-collapse: collapse; margin-top: 6px; }
#dbStatusTable td { padding: 2px 4px; border-bottom: 1px solid var(--border); }

.cmp-filter-panel { margin: 6px 0 10px; font-size: 12px; }
.cmpf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.cmpf-summary { margin-left: auto; color: #9aa1ad; }
.cmpf-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--border); }
.cmpf-item select.cmpf-key { min-width: 230px; }
.cmpf-item select.cmpf-values { min-width: 220px; }
.cmpf-item input[type="number"] { width: 90px; }
.cmpf-item .cmpf-remove { color: var(--danger); }
.cmp-col-details { margin-bottom: 8px; font-size: 12px; }
.cmp-col-details summary { cursor: pointer; color: #9aa1ad; margin-bottom: 6px; }
.cmp-col-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.cmp-col-chooser { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.cmp-col-group label { display: block; padding: 1px 0; }
.cmp-col-group > b { display: block; color: var(--accent2); margin-bottom: 2px; }

.workover-event { border-left: 3px solid var(--accent2); padding: 6px 10px; margin: 10px 0; background: var(--bg); border-radius: 4px; }
.workover-event.high { border-left-color: var(--highlight); background: color-mix(in srgb, var(--highlight) 10%, var(--bg)); }
.workover-event .we-date { font-weight: 600; color: var(--accent); }
.workover-event .we-labels { margin: 3px 0 6px; }
.workover-event .we-label {
  display: inline-block; font-size: 10px; background: var(--panel-alt); border: 1px solid var(--border);
  border-radius: 8px; padding: 1px 7px; margin: 0 4px 3px 0; color: var(--text-dim);
}
.workover-event .we-label.high { background: color-mix(in srgb, var(--highlight) 20%, var(--panel-alt)); border-color: var(--highlight); color: var(--highlight); font-weight: 600; }
.workover-event .we-comments { font-size: 11.5px; color: var(--text-dim); }
.workover-event .we-comments div { margin: 2px 0; }
.workover-event .we-comments b { color: var(--text); }
.workover-event .we-source {
  display: inline-block; font-size: 9.5px; font-weight: 400; color: var(--text-dim);
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 8px;
  padding: 0 6px; margin-left: 6px; vertical-align: middle;
}
