/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  --bg-base:       #0d1117;
  --bg-card:       #161b22;
  --bg-card-2:     #1c2330;
  --bg-input:      #0d1117;
  --border:        #30363d;
  --border-light:  #21262d;
  --text-primary:  #e6edf3;
  --text-muted:    #8b949e;
  --accent:        #58a6ff;
  --accent-green:  #3fb950;
  --accent-orange: #d29922;
  --accent-red:    #f85149;
  --accent-purple: #bc8cff;
  --accent-teal:   #39d353;
  --curve-hq:      #58a6ff;
  --curve-eff:     #f0c040;
  --curve-power:   #f85149;
  --curve-npsh:    #39d3c0;
  --curve-system:  #bc8cff;
}

/* ── Base ────────────────────────────────────────────────────────── */
/* Beginners Note: Browser autofill override. Chrome/Edge default to inserting a bright white
   or pale blue box inside inputs upon password/email autofill. This box-shadow inset rule
   forces the background to remain dark (#0d1117) and the text to remain clean white (#ffffff). */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0d1117 inset !important;
  box-shadow: 0 0 0 1000px #0d1117 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  caret-color: #58a6ff !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-moz-autofill,
input:-moz-autofill-preview {
  filter: grayscale(100%);
  background-color: #0d1117 !important;
  color: #ffffff !important;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.text-muted {
  color: var(--text-muted) !important;
}


/* ── Navbar ──────────────────────────────────────────────────────── */
.bg-primary-dark {
  background: #0d1117 !important;
  border-bottom: 1px solid var(--border);
}

.navbar-brand { font-size: 1.1rem; letter-spacing: -0.02em; }
.text-accent { color: var(--accent) !important; }

.nav-link {
  color: var(--text-muted) !important;
  border-radius: 6px;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--bg-card-2);
}

/* ── Page header ─────────────────────────────────────────────────── */
.page-header { }
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
}
.card-header-dark {
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 10px 10px 0 0;
}

/* ── Form controls & Dropdown Height Harmonization ───────────────────
   Beginners Note:
   Ensures all input boxes and select dropdown lists share identical height (32px for standard,
   36px for text-sm inputs), identical line-height, and matching vertical padding
   so that dropdown lists and inputs align seamlessly across all pump views.
────────────────────────────────────────────────────────────────────────── */
.form-control-dark,
.form-select-dark,
select.form-control-dark,
select.form-select,
.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  min-height: 32px;
  height: 32px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.6rem;
  padding-right: 1.6rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  box-sizing: border-box;
}

/* Prominent text-sm inputs and dropdowns */
input.form-control-dark.text-sm,
select.form-control-dark.text-sm {
  min-height: 36px;
  height: 36px;
  font-size: 0.875rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* Nested unit selectors inside flex input containers */
.unit-select {
  height: 100% !important;
  min-height: 100% !important;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.form-control-dark:focus,
select.form-control-dark:focus {
  background: var(--bg-input);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
  outline: none;
}
.form-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; margin-bottom: 4px; }
.form-label-sm { font-size: 0.78rem; }
.form-text { color: #6e7681; font-size: 0.75rem; }

input[type="number"].form-control-dark,
input[type="text"].form-control-dark,
textarea.form-control-dark {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
input[type="number"].form-control-dark:focus,
input[type="text"].form-control-dark:focus,
textarea.form-control-dark:focus {
  background: var(--bg-input);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

select.form-select.form-control-dark option {
  background: var(--bg-card-2);
  color: var(--text-primary);
}

.form-check-input { background-color: var(--bg-input); border-color: var(--border); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-dark {
  --bs-table-bg: var(--bg-card);
  --bs-table-hover-bg: var(--bg-card-2);
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-light);
}
.table-dark thead th {
  background: var(--bg-card-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.table-dark td { padding: 0.75rem 1rem; border-color: var(--border-light); }

/* ── Stat cards ──────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.stat-icon.bg-blue   { background: rgba(88,166,255,0.15); color: var(--accent); }
.stat-icon.bg-green  { background: rgba(63,185,80,0.15);  color: var(--accent-green); }
.stat-icon.bg-orange { background: rgba(210,153,34,0.15); color: var(--accent-orange); }
.stat-icon.bg-purple { background: rgba(188,140,255,0.15);color: var(--accent-purple); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }

/* ── Feature cards ───────────────────────────────────────────────── */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.feature-title { font-weight: 700; margin-bottom: 0.5rem; }
.feature-desc { color: var(--text-muted); font-size: 0.88rem; flex-grow: 1; }

/* ── Info panel ──────────────────────────────────────────────────── */
.info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}
.info-panel-title { font-weight: 700; font-size: 1rem; margin-bottom: 0; }
.liquid-card {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.liquid-card.water   { border-color: rgba(88,166,255,0.3); background: rgba(88,166,255,0.05); }
.liquid-card.slurry  { border-color: rgba(210,153,34,0.3); background: rgba(210,153,34,0.05); }
.liquid-card.viscous { border-color: rgba(188,140,255,0.3);background: rgba(188,140,255,0.05); }
.liquid-icon { font-size: 1.3rem; }
.liquid-card.water   .liquid-icon { color: var(--accent); }
.liquid-card.slurry  .liquid-icon { color: var(--accent-orange); }
.liquid-card.viscous .liquid-icon { color: var(--accent-purple); }

/* ── Charts ──────────────────────────────────────────────────────── */
.chart-container { height: 320px; width: 100%; }
.chart-container-tall { height: 500px; width: 100%; }

/* ── Curve labels ────────────────────────────────────────────────── */
.curve-label { font-weight: 600; }
.curve-label.hq    { color: var(--curve-hq); }
.curve-label.eff   { color: var(--curve-eff); }
.curve-label.power { color: var(--curve-power); }
.curve-label.npsh  { color: var(--curve-npsh); }

.curve-header.hq    { border-left: 3px solid var(--curve-hq); }
.curve-header.eff   { border-left: 3px solid var(--curve-eff); }
.curve-header.power { border-left: 3px solid var(--curve-power); }
.curve-header.npsh  { border-left: 3px solid var(--curve-npsh); }

/* ── Polynomial formula ──────────────────────────────────────────── */
.poly-formula {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

.section-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Alert variants ──────────────────────────────────────────────── */
.alert-info-dark {
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.2);
  color: #88bbff;
  border-radius: 6px;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state h4 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* ── Result cards (selection) ────────────────────────────────────── */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.result-card:hover { border-color: var(--accent); }
.result-card.result-excellent { border-left: 3px solid var(--accent-green); }
.result-card.result-good      { border-left: 3px solid var(--accent); }
.result-card.result-acceptable{ border-left: 3px solid var(--accent-orange); }
.result-card.result-marginal  { border-left: 3px solid var(--accent-red); }

.result-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card-2);
}
.result-title { font-size: 1rem; font-weight: 700; }
.result-body { padding: 1rem 1.25rem; }

/* Rating badge */
.rating-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rating-badge.excellent  { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.rating-badge.good       { background: rgba(88,166,255,0.15); color: var(--accent); }
.rating-badge.acceptable { background: rgba(210,153,34,0.15); color: var(--accent-orange); }
.rating-badge.marginal   { background: rgba(248,81,73,0.15);  color: var(--accent-red); }

.rating-score {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800;
  background: var(--bg-input);
  border: 2px solid var(--border);
}

/* Performance metrics */
.perf-metric { padding: 0.5rem; background: var(--bg-input); border-radius: 6px; }
.perf-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.perf-value { font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.perf-unit  { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }

/* BEP bar */
.bep-bar { position: relative; height: 10px; border-radius: 5px; background: var(--bg-input); overflow: hidden; }
.bep-zones { display: flex; height: 100%; }
.bep-zone { flex: 1; }
.bep-zone.marginal-lo  { background: rgba(248,81,73,0.3); }
.bep-zone.acceptable-lo{ background: rgba(210,153,34,0.3); }
.bep-zone.preferred    { flex: 2; background: rgba(63,185,80,0.35); }
.bep-zone.acceptable-hi{ background: rgba(210,153,34,0.3); }
.bep-zone.marginal-hi  { background: rgba(248,81,73,0.3); }
.bep-marker {
  position: absolute; top: 0; width: 3px; height: 100%;
  background: #fff; transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(255,255,255,0.6);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d1117;
  font-weight: 600;
}
.btn-primary:hover {
  background: #79baff;
  border-color: #79baff;
  color: #0d1117;
}
.btn-outline-primary  { border-color: var(--accent);       color: var(--accent); }
.btn-outline-secondary{ border-color: var(--border);       color: var(--text-muted); }
.btn-outline-success  { border-color: var(--accent-green); color: var(--accent-green); }
.btn-outline-danger   { border-color: var(--accent-red);   color: var(--accent-red); }
.btn-outline-info     { border-color: var(--curve-npsh);   color: var(--curve-npsh); }

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Custom Header Unit Selectors ────────────────────────────────── */
.header-unit-select {
  background:
    linear-gradient(135deg, rgba(88,166,255,0.06) 0%, rgba(0,0,0,0) 100%),
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2358a6ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")
    no-repeat right 0.35rem center var(--bg-card-2);
  background-size: auto, 8px 5px;
  border: 1px solid rgba(88,166,255,0.25);
  border-radius: 20px;           /* pill shape */
  color: #58a6ff;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 14px 2px 6px;
  margin-top: 2px;
  width: auto;
  min-width: 60px;
  display: inline-block;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 0 0 0 rgba(88,166,255,0);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.header-unit-select:hover {
  border-color: #58a6ff;
  color: #c9d1d9;
  box-shadow: 0 0 6px rgba(88,166,255,0.30);
}

.header-unit-select:focus {
  outline: none;
  border-color: #58a6ff;
  color: #c9d1d9;
  box-shadow: 0 0 8px rgba(88,166,255,0.40);
}

.header-unit-select option {
  background-color: #161b22 !important;
  color: #c9d1d9;
}

/* Operating-region card header variant – slightly larger & bolder */
.card-header .header-unit-select {
  font-size: 0.72rem;
  padding: 4px 20px 4px 10px;
  border-color: rgba(88,166,255,0.35);
}

/* ── Auto-calculated power field flash ──────────────────────────── */
@keyframes calcFlash {
  0%   { background-color: rgba(88,166,255,0.25); box-shadow: 0 0 8px rgba(88,166,255,0.5); }
  100% { background-color: transparent; box-shadow: none; }
}

.auto-calc-flash {
  animation: calcFlash 0.6s ease-out forwards;
}

/* ── Custom Curves Panel ─────────────────────────────────────────── */
.btn-outline-accent {
  color: var(--accent);
  border-color: rgba(88,166,255,0.45);
  background: transparent;
  transition: all 0.2s;
}
.btn-outline-accent:hover, .btn-outline-accent:focus {
  background: rgba(88,166,255,0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(88,166,255,0.3);
}

.custom-curve-entry {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.custom-curve-entry:hover {
  border-color: rgba(88,166,255,0.35);
}
.custom-curve-entry .curve-color-swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.custom-curve-entry .curve-color-swatch.active {
  border-color: #fff;
  transform: scale(1.2);
}
.custom-curve-entry textarea.curve-data-input {
  background: #0d1117;
  border: 1px solid #30363d;
  color: #c9d1d9;
  border-radius: 6px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.78rem;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}
.custom-curve-entry textarea.curve-data-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(88,166,255,0.25);
}
.custom-curve-entry .curve-status {
  font-size: 0.75rem;
  min-height: 1.2em;
}
.custom-curve-entry .curve-status.ok    { color: var(--accent-green); }
.custom-curve-entry .curve-status.error { color: var(--accent-red);   }
.custom-curve-entry .curve-status.busy  { color: var(--text-muted);   }

/* Alias used by pump_form.js extra curves */
.extra-curve-status         { font-size: 0.75rem; min-height: 1.2em; }
.extra-curve-status.ok      { color: var(--accent-green); }
.extra-curve-status.error   { color: var(--accent-red);   }
.extra-curve-status.busy    { color: var(--text-muted);   }

/* Legend pill shown in chart header for custom curves */
.custom-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: #c9d1d9;
}

/* ── Card Collapse Transitions ──────────────────────────────────── */
.card-collapse-content {
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-out;
  overflow: hidden;
}
.card-collapse-content.collapsed {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* ── Bootstrap .table (non-.table-dark variants) ─────────────────── */
.table {
  --bs-table-bg: var(--bg-card);
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-light);
  --bs-table-striped-bg: var(--bg-card-2);
  --bs-table-hover-bg: var(--bg-card-2);
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}
.table thead th {
  background-color: var(--bg-card-2) !important;
  color: var(--text-muted) !important;
  border-bottom-color: var(--border) !important;
}
.table td, .table th {
  border-color: var(--border-light) !important;
  color: var(--text-primary) !important;
}

/* ── Bootstrap .modal ────────────────────────────────────────────── */
.modal-content {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}
.modal-header {
  background-color: var(--bg-card-2) !important;
  border-bottom-color: var(--border) !important;
}
.modal-footer {
  background-color: var(--bg-card-2) !important;
  border-top-color: var(--border) !important;
}
.modal-title { color: var(--text-primary) !important; }
.btn-close { filter: invert(0.7) brightness(1.5); }

/* ── Bootstrap .list-group ───────────────────────────────────────── */
.list-group-item {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}
.list-group-item.active {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #0d1117 !important;
}

/* ── Bootstrap .badge ────────────────────────────────────────────── */
.badge.bg-secondary { background-color: var(--bg-card-2) !important; color: var(--text-muted) !important; }
.badge.bg-light     { background-color: var(--bg-card-2) !important; color: var(--text-primary) !important; }

/* ── Bootstrap .alert ────────────────────────────────────────────── */
.alert {
  border-color: var(--border) !important;
}

/* ── Bootstrap .nav-tabs / .nav-pills ───────────────────────────── */
.nav-tabs {
  border-bottom-color: var(--border) !important;
}
.nav-tabs .nav-link {
  color: var(--text-muted) !important;
  border-color: transparent !important;
}
.nav-tabs .nav-link:hover {
  color: var(--text-primary) !important;
  border-color: var(--border) var(--border) transparent !important;
  background: var(--bg-card-2) !important;
}
.nav-tabs .nav-link.active {
  background-color: var(--bg-card) !important;
  border-color: var(--border) var(--border) var(--bg-card) !important;
  color: var(--accent) !important;
}

/* ── Bootstrap .dropdown-menu ────────────────────────────────────── */
.dropdown-menu {
  background-color: var(--bg-card-2) !important;
  border-color: var(--border) !important;
}
.dropdown-item {
  color: var(--text-primary) !important;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
}
.dropdown-divider { border-color: var(--border) !important; }

/* ── Bootstrap .pagination ───────────────────────────────────────── */
.page-link {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--accent) !important;
}
.page-link:hover { background-color: var(--bg-card-2) !important; }
.page-item.active .page-link {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #0d1117 !important;
}
.page-item.disabled .page-link { color: var(--text-muted) !important; }

/* ── Bootstrap .accordion ────────────────────────────────────────── */
.accordion-item {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
}
.accordion-button {
  background-color: var(--bg-card-2) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  background-color: var(--bg-card-2) !important;
  color: var(--accent) !important;
}
.accordion-button::after {
  filter: invert(0.6) brightness(1.5);
}
.accordion-body {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* ── Bootstrap .progress ─────────────────────────────────────────── */
.progress {
  background-color: var(--bg-input) !important;
}

/* ── General link colour inside dark cards ───────────────────────── */
.card a:not(.btn) { color: var(--accent); }
.card a:not(.btn):hover { color: #79baff; }

/* ── Force Bootstrap border utility to use dark border ──────────── */
.border          { border-color: var(--border) !important; }
.border-top      { border-top-color: var(--border) !important; }
.border-bottom   { border-bottom-color: var(--border) !important; }
.border-start    { border-left-color: var(--border) !important; }
.border-end      { border-right-color: var(--border) !important; }

/* ── Fix Bootstrap secondary/light background utilities ─────────── */
.bg-secondary { background-color: var(--bg-card-2) !important; }
.bg-light     { background-color: var(--bg-card-2) !important; }
.bg-white     { background-color: var(--bg-card)   !important; }
.text-dark    { color: var(--text-primary) !important; }

/ *   �  � �  �   P u m p   S e l e c t i o n   C S S   �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  � �  �   * /  
  
 . s e l - c a r d   {  
     b a c k g r o u n d :   v a r ( - - c a r d - b g ) ;  
     b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ;  
     b o r d e r - r a d i u s :   8 p x ;  
     o v e r f l o w :   h i d d e n ;  
     t r a n s i t i o n :   b o r d e r - c o l o r   0 . 2 s ;  
 }  
  
 . s e l - c a r d : h o v e r   {  
     b o r d e r - c o l o r :   v a r ( - - a c c e n t ) ;  
 }  
  
 . s e l - c a r d - h e a d e r   {  
     p a d d i n g :   1 2 p x   1 6 p x ;  
     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 2 ) ;  
     b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r - c o l o r ) ;  
 }  
  
 . s e l - c a r d - t i t l e   {  
     c o l o r :   v a r ( - - t e x t - p r i m a r y ) ;  
     f o n t - w e i g h t :   6 0 0 ;  
     f o n t - s i z e :   1 . 1 r e m ;  
 }  
  
 . s e l - c a r d - b o d y   {  
     p a d d i n g :   1 6 p x ;  
 }  
  
 / *   R a t i n g   B o r d e r   C o l o r s   * /  
 . s e l - c a r d . s e l - e x c e l l e n t   {   b o r d e r - l e f t :   4 p x   s o l i d   # 3 f b 9 5 0 ;   }  
 . s e l - c a r d . s e l - g o o d             {   b o r d e r - l e f t :   4 p x   s o l i d   # 5 8 a 6 f f ;   }  
 . s e l - c a r d . s e l - a c c e p t a b l e {   b o r d e r - l e f t :   4 p x   s o l i d   # d 2 9 9 2 2 ;   }  
 . s e l - c a r d . s e l - m a r g i n a l     {   b o r d e r - l e f t :   4 p x   s o l i d   # f 8 5 1 4 9 ;   }  
  
 / *   P e r f o r m a n c e   M e t r i c s   * /  
 . p e r f - m e t r i c   {  
     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 2 ) ;  
     b o r d e r - r a d i u s :   6 p x ;  
     p a d d i n g :   8 p x   1 0 p x ;  
     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ;  
 }  
  
 . p e r f - l a b e l   {  
     f o n t - s i z e :   0 . 7 r e m ;  
     t e x t - t r a n s f o r m :   u p p e r c a s e ;  
     c o l o r :   v a r ( - - t e x t - m u t e d ) ;  
     f o n t - w e i g h t :   6 0 0 ;  
     m a r g i n - b o t t o m :   2 p x ;  
 }  
  
 . p e r f - v a l u e   {  
     f o n t - s i z e :   1 . 1 r e m ;  
     f o n t - w e i g h t :   7 0 0 ;  
     c o l o r :   v a r ( - - t e x t - p r i m a r y ) ;  
     l i n e - h e i g h t :   1 . 2 ;  
 }  
  
 . p e r f - u n i t   {  
     f o n t - s i z e :   0 . 7 5 r e m ;  
     f o n t - w e i g h t :   4 0 0 ;  
     c o l o r :   v a r ( - - t e x t - m u t e d ) ;  
 }  
  
 / *   S p a r k l i n e   C o n t a i n e r   * /  
 . s p a r k l i n e - c o n t a i n e r   {  
     w i d t h :   1 0 0 % ;  
     h e i g h t :   7 0 p x ;  
     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ;  
     b o r d e r - r a d i u s :   6 p x ;  
     b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ;  
     o v e r f l o w :   h i d d e n ;  
     d i s p l a y :   f l e x ;  
     a l i g n - i t e m s :   c e n t e r ;  
     j u s t i f y - c o n t e n t :   c e n t e r ;  
 }  
  
 . s p a r k l i n e - c o n t a i n e r   s v g   {  
     d i s p l a y :   b l o c k ;  
 }  
  
 / *   S o r t   B u t t o n s   * /  
 . s o r t - b t n   {  
     b a c k g r o u n d :   t r a n s p a r e n t ;  
     c o l o r :   v a r ( - - t e x t - m u t e d ) ;  
     b o r d e r :   1 p x   s o l i d   t r a n s p a r e n t ;  
     p a d d i n g :   2 p x   8 p x ;  
     b o r d e r - r a d i u s :   4 p x ;  
     f o n t - s i z e :   0 . 7 5 r e m ;  
     f o n t - w e i g h t :   5 0 0 ;  
     t r a n s i t i o n :   a l l   0 . 2 s ;  
     c u r s o r :   p o i n t e r ;  
 }  
  
 . s o r t - b t n : h o v e r   {  
     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ;  
     c o l o r :   v a r ( - - t e x t - p r i m a r y ) ;  
 }  
  
 . s o r t - b t n . s o r t - a c t i v e   {  
     b a c k g r o u n d :   r g b a ( 8 8 ,   1 6 6 ,   2 5 5 ,   0 . 1 5 ) ;  
     c o l o r :   # 5 8 a 6 f f ;  
     b o r d e r - c o l o r :   r g b a ( 8 8 ,   1 6 6 ,   2 5 5 ,   0 . 4 ) ;  
 }  
 