/*
 * Gaya tambahan di atas Bootstrap 5.3.
 *
 * Warna ditulis sebagai VARIABEL CSS (--app-..., --chart-...) dengan dua set
 * nilai: satu untuk mode terang, satu untuk mode gelap. Atribut
 * <html data-bs-theme="..."> (dipasang static/js/theme.js) menentukan set
 * mana yang berlaku. Elemen cukup memakai var(--nama), tanpa peduli modenya.
 */

/* ---------- Token warna ---------- */
:root,
[data-bs-theme="light"] {
  --app-bg: #f4f6f9;              /* latar halaman */
  --app-surface: #ffffff;         /* card */
  --app-surface-2: #f8f9fb;       /* bagian dalam card, kepala tabel */
  --app-border: #e4e7ec;
  --app-muted: #667085;
  --app-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --app-shadow-hover: 0 6px 16px rgba(16, 24, 40, 0.08);
  --app-accent: #2a78d6;
  --app-accent-soft: rgba(42, 120, 214, 0.1);
  --app-nav-bg: rgba(255, 255, 255, 0.85);

  /* Chart: biru seri-1 dan tinta sumbu dari palet yang sudah divalidasi. */
  --chart-series: #2a78d6;
  --chart-fill: rgba(42, 120, 214, 0.1);
  --chart-ink: #52514e;
  --chart-grid: #ebebe8;
  --chart-tooltip-bg: #ffffff;
  --chart-tooltip-text: #0b0b0b;
  --chart-tooltip-border: #e4e7ec;
}

[data-bs-theme="dark"] {
  --app-bg: #0f1115;
  --app-surface: #171a20;
  --app-surface-2: #1d2128;
  --app-border: #2a2f38;
  --app-muted: #9aa3b2;
  --app-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --app-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.5);
  --app-accent: #3987e5;
  --app-accent-soft: rgba(57, 135, 229, 0.16);
  --app-nav-bg: rgba(23, 26, 32, 0.85);

  /* Mode gelap memakai langkah warna tersendiri, bukan sekadar dibalik. */
  --chart-series: #3987e5;
  --chart-fill: rgba(57, 135, 229, 0.18);
  --chart-ink: #c3c2b7;
  --chart-grid: #2c2f35;
  --chart-tooltip-bg: #22262e;
  --chart-tooltip-text: #ffffff;
  --chart-tooltip-border: #343a45;

  /* Sesuaikan beberapa warna dasar Bootstrap agar serasi dengan latar di atas. */
  --bs-body-bg: #171a20;
  --bs-secondary-bg: #1d2128;
  --bs-tertiary-bg: #1a1e24;
  --bs-border-color: #2a2f38;
}

/* ---------- Dasar ---------- */
body {
  background-color: var(--app-bg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, .h1, h2, .h2, h3, .h3 {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.text-muted {
  color: var(--app-muted) !important;
}

/* ---------- Kerangka: side menu + isi ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  --bs-offcanvas-width: 270px;
  --bs-offcanvas-bg: var(--app-surface);
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
}

/* Layar lebar: side menu tetap di kiri setinggi layar. */
@media (min-width: 992px) {
  .app-sidebar {
    position: sticky;
    top: 0;
    width: 248px;
    height: 100vh;
    flex-shrink: 0;
  }
  .app-sidebar .offcanvas-body {
    flex-direction: column;
    height: 100%;
    padding: 1.1rem 0.9rem !important;
    overflow-y: auto;
  }
}

.sidebar-body {
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--bs-body-color);
  text-decoration: none;
}

.app-sidebar .sidebar-brand.d-lg-flex {
  padding: 0 0.5rem 0.75rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2a78d6, #1baf7a);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section {
  margin: 1rem 0.75rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.55rem;
  color: var(--app-muted);
  font-weight: 500;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--bs-body-color);
  background: var(--app-surface-2);
}

.sidebar-link.active {
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--app-border);
}

.app-main {
  flex: 1;
  min-width: 0;   /* tabel lebar tidak mendorong halaman melebihi layar */
}

.app-content {
  max-width: 1440px;
  padding: 1.5rem 1rem 3rem;
}

@media (min-width: 992px) {
  .app-content {
    padding: 2rem 2.25rem 3rem;
  }
}

/* Bilah atas di layar kecil, dan bilah atas halaman publik. */
.app-topbar,
.public-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0.6rem 1rem;
  background: var(--app-nav-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--app-border);
}

.public-topbar {
  margin-bottom: 2rem;
  padding: 0.75rem 0;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.user-chip .avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

/* Saklar tema: tiga tombol ikon yang menyatu. */
.theme-switch {
  padding: 2px;
  border: 1px solid var(--app-border);
  border-radius: 0.6rem;
  background: var(--app-surface-2);
}

.theme-switch .btn {
  border: 0;
  border-radius: 0.45rem !important;
  color: var(--app-muted);
  padding: 0.2rem 0.45rem;
  line-height: 1;
}

.theme-switch .btn:hover {
  color: var(--bs-body-color);
}

.theme-switch .btn.active {
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

/* ---------- Card ---------- */
.card {
  --bs-card-bg: var(--app-surface);
  --bs-card-border-color: var(--app-border);
  --bs-card-border-radius: 0.85rem;
  --bs-card-inner-border-radius: calc(0.85rem - 1px);
}

.card.shadow-sm {
  box-shadow: var(--app-shadow) !important;
}

/* Card nilai terkini */
.value-card {
  transition: box-shadow 0.2s, transform 0.2s;
}

.value-card:has(.stretched-link):hover {
  box-shadow: var(--app-shadow-hover) !important;
  transform: translateY(-2px);
}

.value-card .value {
  font-size: 2.1rem;
  font-weight: 650;
  line-height: 1.1;
  margin: 0.35rem 0 0.25rem;
  font-variant-numeric: tabular-nums;
}

.value-card .key {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 600;
}

.value-card .unit {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--app-muted);
}

/* Sorotan singkat pada card yang baru diperbarui lewat WebSocket. */
.live-flash {
  box-shadow: 0 0 0 3px var(--app-accent-soft), var(--app-shadow-hover) !important;
  transition: box-shadow 0.3s;
}

/* ---------- Tabel ---------- */
.table {
  --bs-table-bg: transparent;
}

.table > thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--app-muted);
  white-space: nowrap;
}

.table > :not(caption) > * > * {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.table td {
  font-variant-numeric: tabular-nums;
}

/* Kelas "light" Bootstrap tetap terang di mode gelap; samakan dengan permukaan gelap. */
.table-light {
  --bs-table-color: var(--bs-body-color);
  --bs-table-bg: var(--app-surface-2);
  --bs-table-border-color: var(--app-border);
}

[data-bs-theme="dark"] .text-bg-light {
  color: var(--bs-body-color) !important;
  background-color: var(--app-surface-2) !important;
}

[data-bs-theme="dark"] .alert-light {
  --bs-alert-color: var(--bs-body-color);
  --bs-alert-bg: var(--app-surface-2);
  --bs-alert-border-color: var(--app-border);
}

/* ---------- Chart ---------- */
.chart-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chart-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.chart-tools .form-select {
  min-width: 9.5rem;
}

.chart-tools .btn svg {
  vertical-align: -2px;
}

/* Tinggi area chart; Chart.js mengisi kotak ini (maintainAspectRatio: false). */
.chart-box {
  position: relative;
  height: 300px;
}

/* ---------- Peta ---------- */
/* Kotak peta Leaflet; tingginya harus ditentukan, kalau tidak peta tidak tampil. */
.map-box {
  height: 360px;
  border-radius: 0.6rem;
}

/* Peta OpenStreetMap hanya punya versi terang; di mode gelap ubinnya digelapkan. */
[data-bs-theme="dark"] .leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}

/* ---------- Dashboard ---------- */
.stat-tile .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.stat-tile .stat-value {
  font-size: 1.9rem;
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-tile .stat-note {
  font-size: 0.8rem;
  color: var(--app-muted);
}

.dash-location-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dash-location-header .pin {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

.dash-device > .card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: transparent;
  border-bottom-color: var(--app-border);
}

/* Card variabel di dalam card device: permukaan sedikit berbeda. */
.dash-var {
  position: relative;
  height: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--app-border);
  border-radius: 0.7rem;
  background: var(--app-surface-2);
  transition: box-shadow 0.2s, transform 0.2s;
}

.dash-var:has(.stretched-link):hover {
  box-shadow: var(--app-shadow-hover);
  transform: translateY(-2px);
}

.dash-var .value {
  font-size: 1.7rem;
}

/* Penanda status device: titik warna SELALU disertai teks. */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--app-muted);
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.online {
  color: #0ca30c;
  border-color: rgba(12, 163, 12, 0.35);
  background: rgba(12, 163, 12, 0.08);
}

/* Halaman Customize: anak dari lokasi/device yang disembunyikan tampak redup. */
.settings-children.is-muted {
  opacity: 0.45;
}

.settings-device + .settings-device {
  border-top: 1px dashed var(--app-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* Lencana protokol terakhir (HTTP / MQTT / CoAP). */
.protocol-badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

/* ---------- Rule engine (tahap 7) ---------- */
.model-badge {
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

.rule-state {
  color: var(--app-muted);
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
}

.rule-state-pending {
  color: #a15c00;
  background: rgba(240, 160, 0, 0.14);
  border-color: rgba(240, 160, 0, 0.4);
}

.rule-state-active {
  color: #0b8a0b;
  background: rgba(12, 163, 12, 0.1);
  border-color: rgba(12, 163, 12, 0.35);
}

[data-bs-theme="dark"] .rule-state-pending { color: #f2b544; }
[data-bs-theme="dark"] .rule-state-active { color: #4cc94c; }

/* Keparahan alarm: warna SELALU disertai teks. */
.severity { color: #fff; }
.severity-critical { background: #c62828; }
.severity-major { background: #e4572e; }
.severity-minor { background: #d19a00; }
.severity-warning { background: #6b7280; }

.model-card.is-planned { opacity: 0.7; }
.model-card.is-planned .card-body { background: var(--app-surface-2); border-radius: inherit; }

.model-example {
  white-space: normal;
  color: inherit;
  font-size: 0.78rem;
}

.eca-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.eca-step {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

.action-row {
  background: var(--app-surface-2);
}

.eca-steps li + li { margin-top: 0.6rem; }

.eca-key {
  display: inline-block;
  min-width: 3.5rem;
  font-weight: 650;
  color: var(--app-accent);
}

.sidebar-link .badge { font-size: 0.7rem; }

/* ---------- Editor kondisi "OR berisi AND" ---------- */
.cond-group {
  position: relative;
  padding: 0.75rem 0.9rem 0.4rem;
  border: 1px solid var(--app-border);
  border-radius: 0.7rem;
  background: var(--app-surface-2);
}

/* Tulisan OR di antara kotak grup. */
.cond-group + .cond-group {
  margin-top: 2.2rem;
}

.cond-group + .cond-group::before {
  content: "OR";
  position: absolute;
  top: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--app-accent);
  background: var(--app-accent-soft);
}

.cond-group:last-child { margin-bottom: 0.75rem; }

.cond-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--app-muted);
}

/* Tulisan AND di antara baris dalam satu grup. */
.cond-row + .cond-row::before {
  content: "AND";
  display: block;
  margin: 0.15rem 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--app-muted);
}

.cond-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem 7rem auto;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 575.98px) {
  .cond-fields { grid-template-columns: minmax(0, 1fr) 4.5rem 5.5rem auto; }
}

/* Tabel "apa yang dilihat mesin" di halaman detail aturan. */
.truth { font-weight: 600; }
.truth-true { color: #0b8a0b; }
.truth-false { color: var(--app-muted); }
.truth-unknown { color: #a15c00; }
[data-bs-theme="dark"] .truth-true { color: #4cc94c; }
[data-bs-theme="dark"] .truth-unknown { color: #f2b544; }

/* Tautan ke halaman variabel/device di halaman aturan: tidak bergaris, tetap terlihat. */
.var-link {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.var-link:hover { border-bottom-style: solid; }

.expr-op {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--app-muted);
}

/* ---------- Rule chain / Flow (tahap 8) ---------- */
/* Warna kategori node: filter (ungu), enrichment (biru), transformation (teal), action (oranye). */
:root, [data-bs-theme="light"] {
  --flow-filter: #7c4dff;
  --flow-enrichment: #2a78d6;
  --flow-transformation: #0f9488;
  --flow-action: #e4572e;
  --flow-true: #0b8a0b;
  --flow-false: #8a94a6;
  --flow-success: #2a78d6;
  --flow-failure: #c62828;
}
[data-bs-theme="dark"] {
  --flow-filter: #a283ff;
  --flow-enrichment: #5aa0f0;
  --flow-transformation: #2cc4b5;
  --flow-action: #ff7a52;
  --flow-true: #4cc94c;
  --flow-false: #8a94a6;
  --flow-success: #5aa0f0;
  --flow-failure: #ff6b6b;
}

.rule-state-listening {
  color: var(--app-accent);
  background: var(--app-accent-soft);
  border-color: rgba(42, 120, 214, 0.35);
}

.flow-diagram-wrap { overflow-x: auto; padding-bottom: 0.25rem; }
.flow-diagram { display: block; font-family: inherit; }
.flow-diagram text { fill: var(--bs-body-color); }
.flow-node rect { fill: var(--app-surface); stroke: var(--app-border); stroke-width: 1.5; }
.flow-node .flow-node-stripe { stroke: none; }
.flow-node-filter .flow-node-stripe { fill: var(--flow-filter); }
.flow-node-enrichment .flow-node-stripe { fill: var(--flow-enrichment); }
.flow-node-transformation .flow-node-stripe { fill: var(--flow-transformation); }
.flow-node-action .flow-node-stripe { fill: var(--flow-action); }
.flow-node-input rect { fill: var(--app-surface-2); }
.flow-node.is-walked rect:first-of-type { stroke: var(--app-accent); stroke-width: 2.5; }
.flow-node.is-unreachable rect:first-of-type { stroke-dasharray: 5 4; }
.flow-node.is-unreachable text { opacity: 0.55; }
.flow-node-name { font-size: 13px; font-weight: 600; }
.flow-node-kind { font-size: 11px; fill: var(--app-muted) !important; }
.flow-node-summary { font-size: 11px; font-family: var(--bs-font-monospace); }
.flow-node-result { font-weight: 600; fill: var(--app-accent) !important; }

.flow-link { fill: none; stroke: var(--app-border); stroke-width: 2; }
.flow-arrowhead { fill: var(--app-muted); }
.flow-link.is-walked { stroke: var(--app-accent); stroke-width: 3; }
.flow-label rect { fill: var(--app-surface); stroke-width: 1.2; }
.flow-label text { font-size: 10.5px; font-weight: 600; }
.flow-label-true rect { stroke: var(--flow-true); } .flow-label-true text { fill: var(--flow-true); }
.flow-label-false rect { stroke: var(--flow-false); } .flow-label-false text { fill: var(--flow-false); }
.flow-label-success rect { stroke: var(--flow-success); } .flow-label-success text { fill: var(--flow-success); }
.flow-label-failure rect { stroke: var(--flow-failure); } .flow-label-failure text { fill: var(--flow-failure); }
.flow-label.is-walked rect { stroke-width: 2.4; }

.flow-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.4rem; }
.flow-swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.3rem; vertical-align: -0.05rem; }
.flow-swatch.flow-node-filter { background: var(--flow-filter); }
.flow-swatch.flow-node-enrichment { background: var(--flow-enrichment); }
.flow-swatch.flow-node-transformation { background: var(--flow-transformation); }
.flow-swatch.flow-node-action { background: var(--flow-action); }

/* Hasil node (True/False/Success/Failure) dan kategori node dalam teks. */
.flow-result { font-weight: 600; }
.flow-result-true { color: var(--flow-true); }
.flow-result-false { color: var(--flow-false); }
.flow-result-success { color: var(--flow-success); }
.flow-result-failure { color: var(--flow-failure); }
.flow-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.flow-cat-filter { color: var(--flow-filter); }
.flow-cat-enrichment { color: var(--flow-enrichment); }
.flow-cat-transformation { color: var(--flow-transformation); }
.flow-cat-action { color: var(--flow-action); }

/* Form rule chain */
.node-row { border-left: 3px solid var(--app-border); }
.link-head, .link-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 7.5rem 1.2rem minmax(7rem, 1fr) 2rem;
  gap: 0.5rem;
  align-items: center;
}
.link-row { margin-bottom: 0.4rem; }
.link-arrow { color: var(--app-muted); text-align: center; }
.flow-trace td { vertical-align: top; }

/* ---------- Firmware OTA (tahap 9) ---------- */
.ota-status { font-weight: 600; border: 1px solid transparent; }
.ota-status-queued, .ota-status-canceled { color: var(--app-muted); background: var(--app-surface-2); border-color: var(--app-border); }
.ota-status-downloading, .ota-status-downloaded, .ota-status-verified, .ota-status-updating {
  color: var(--app-accent); background: var(--app-accent-soft); border-color: rgba(42, 120, 214, 0.35);
}
.ota-status-updated { color: #0b8a0b; background: rgba(12, 163, 12, 0.1); border-color: rgba(12, 163, 12, 0.35); }
.ota-status-failed { color: #fff; background: #c62828; }
[data-bs-theme="dark"] .ota-status-updated { color: #4cc94c; }

/* Langkah pembaruan: Queued › Downloading › ... › Updated */
.ota-steps { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; list-style: none; padding: 0; margin: 0 0 0.75rem; }
.ota-step {
  position: relative;
  font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--app-border); color: var(--app-muted); background: var(--app-surface);
}
/* Tanda › di ANTARA dua langkah, di luar kotaknya. */
.ota-step + .ota-step::before {
  content: "›"; position: absolute; left: -0.8rem; top: 50%; transform: translateY(-55%);
  color: var(--app-muted); font-weight: 400;
}
.ota-step.is-done { color: #0b8a0b; border-color: rgba(12, 163, 12, 0.35); background: rgba(12, 163, 12, 0.08); }
.ota-step.is-current { color: var(--app-accent); border-color: var(--app-accent); background: var(--app-accent-soft); font-weight: 600; }
.ota-step.is-failed { color: #c62828; border-color: rgba(198, 40, 40, 0.5); background: rgba(198, 40, 40, 0.08); font-weight: 600; }
[data-bs-theme="dark"] .ota-step.is-done { color: #4cc94c; }
[data-bs-theme="dark"] .ota-step.is-failed { color: #ff6b6b; }
.ota-progress { height: 1.1rem; }
.ota-timeline li + li { margin-top: 0.45rem; }
