:root {
  --bg:#0d1117; --panel:#161b22; --border:#30363d;
  --text:#e6edf3; --muted:#7d8590; --accent:#58a6ff;
  --ok:#3fb950; --warn:#d29922; --bad:#f85149;
  /* v2 tokens */
  --panel-elevated:#1c2128;
  --border-subtle:#21262d;
  --accent-hover:#7cb8ff;
  --overlay:rgba(1,4,9,0.7);
}
* { box-sizing:border-box; margin:0; padding:0 }
body {
  background:var(--bg); color:var(--text);
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  line-height:1.5;
}

/* ─── Sidebar layout ────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: 224px;
  background: var(--panel); border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
}
.sidebar-header {
  padding: 24px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-title { font-size: 20px; font-weight: 600; }
.sidebar-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-bottom {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-bottom .version { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sidebar-bottom .last-refresh { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sidebar-bottom .btn { width: 100%; }
.main-content { margin-left: 224px; padding: 24px; min-height: 100vh; }

/* ─── Mobile top bar ────────────────────────────────────────────────────────── */
.topbar {
  display: none;
  position: sticky; top: 0; z-index: 100;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 0 16px; height: 48px;
  align-items: center; justify-content: space-between;
}
.topbar-title { font-size: 14px; font-weight: 600; }

/* ─── Drawer overlay ─────────────────────────────────────────────────────────  */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 199;
  background: var(--overlay);
}
.drawer {
  position: fixed; top: 0; left: 0; height: 100vh; width: 280px;
  z-index: 200; background: var(--panel);
  transform: translateX(-100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.drawer-title { font-size: 14px; font-weight: 600; }
.drawer-nav { flex: 1; padding: 8px 0; overflow-y: auto; }

/* ─── Responsive breakpoint ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .main-content { margin-left: 0; padding: 16px; }
}

/* ─── Nav items ─────────────────────────────────────────────────────────────── */
.nav-item {
  display: block; width: 100%; background: transparent; border: none;
  border-left: 3px solid transparent; padding: 12px 16px;
  color: var(--muted); cursor: pointer; font: inherit; font-size: 13px;
  text-align: left; min-height: 44px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.nav-item:hover { color: var(--text); background: var(--panel-elevated);
                  border-left-color: var(--border); }
.nav-item.active { color: var(--accent); background: var(--panel-elevated);
                   border-left-color: var(--accent); font-weight: 600; }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ─── Bento grid ─────────────────────────────────────────────────────────────  */
.bento-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
@media (max-width: 767px) {
  .bento-grid { grid-template-columns: 1fr; }
}
.bento-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.bento-card .bento-title {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.bento-card .bento-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin-top: 12px;
  text-align: right;
  cursor: pointer;
  background: none; border: none; font: inherit;
}
.bento-card .bento-more:hover { text-decoration: underline; }
.bento-full { grid-column: 1 / -1; }

/* ─── Chart containers ───────────────────────────────────────────────────────  */
.chart-wrap { width: 100%; }
.chart-wrap-200 { height: 200px; }
.chart-wrap-260 { height: 260px; }
.chart-wrap-380 { height: 380px; }
.chart-wrap-400 { height: 400px; }

/* Calibration scatter: tooltip + contained legend (2026-06-03) */
.calib-chart-wrap { position: relative; width: 100%; }
.calib-tooltip {
  position: absolute; pointer-events: none; z-index: 20;
  background: #161b22; border: 1px solid #30363d; border-radius: 6px;
  padding: 6px 8px; font-size: 11px; max-width: 240px; line-height: 1.45;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.calib-tooltip .ct-q { font-weight: 600; margin-bottom: 4px; word-break: break-word; }
.calib-tooltip .ct-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.calib-tooltip .ct-row b { color: #c9d1d9; }
.calib-tooltip .ct-won { color: #3fb950; }
.calib-tooltip .ct-lost { color: #f85149; }
.calib-tooltip .ct-hint { margin-top: 4px; color: #58a6ff; font-size: 10px; }
.calib-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--muted); margin-top: 8px; }
.calib-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.calib-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }


.chart-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; padding: 24px;
  text-align: center; font-size: 13px; color: var(--muted);
}
.chart-empty .label { font-size: 12px; color: var(--muted); }
/* Phase 23-05 (D-05): value-history cold-start note when < 30 points. */
.acumulando-note {
  background: rgba(210,153,34,0.12); color: var(--warn);
  border: 1px solid rgba(210,153,34,0.3); border-radius: 8px;
  padding: 8px 12px; font-size: 12px; margin-bottom: 12px;
}
/* Phase 23-05 (FRONT-06): activity feed rows. */
.activity-list { display: flex; flex-direction: column; }
.activity-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dotted var(--border);
  font-size: 13px;
}
.activity-row .activity-summary { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.activity-row .activity-time { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
/* Phase 23-05 (FRONT-05): settings change-log rows. */
.change-log-list { display: flex; flex-direction: column; }
.change-log-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px dotted var(--border); font-size: 12px;
}
.change-log-row .cl-key { font-weight: 600; font-family: ui-monospace, monospace; }
.change-log-row .cl-diff { color: var(--muted); font-variant-numeric: tabular-nums; }
.change-log-row .cl-time { margin-left: auto; color: var(--muted); white-space: nowrap; }
.chart-loading {
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted);
}
.err { color:var(--bad); background:var(--panel); border:1px solid var(--bad);
       border-radius:8px; padding:14px; margin:12px 0 }

/* ─── Settings ───────────────────────────────────────────────────────────────  */
.settings-toggle {
  width: 40px; height: 24px;
  background: var(--border);
  border-radius: 12px;
  border: none; cursor: pointer;
  transition: background 0.2s;
  position: relative;
  flex-shrink: 0;
}
.settings-toggle[aria-checked="true"] {
  background: var(--accent);
}
.settings-toggle::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}
.settings-toggle[aria-checked="true"]::after {
  transform: translateX(16px);
}
.settings-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  width: 120px;
}
.settings-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.settings-input:invalid {
  border-color: var(--bad);
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 16px;
}
@media (max-width: 767px) {
  .settings-row { flex-direction: column; align-items: flex-start; }
}
.settings-row .settings-key {
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.settings-row .settings-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
/* Phase 23-05 (FRONT-05): per-key last-changed hint. */
.settings-row .settings-lastchanged { font-size: 11px; color: var(--muted); margin-top: 3px; }
.settings-section-label {
  font-size: 12px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin: 24px 0 8px;
}

/* ─── PIN modal ──────────────────────────────────────────────────────────────  */
.pin-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
}
.pin-modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
}
.pin-modal-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.pin-modal-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.pin-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-size: 16px;
  width: 100%;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 8px;
}
.pin-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.pin-error { font-size: 12px; color: var(--bad); margin-bottom: 12px; }
.pin-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ─── Cost bars (Sistema) ────────────────────────────────────────────────────  */
.cost-bar { height: 4px; background: var(--bg); border-radius: 2px; margin-top: 4px; }
.cost-bar-fill { height: 100%; border-radius: 2px; transition: width 0.25s; }
.cost-bar-fill.ok { background: var(--ok); }
.cost-bar-fill.warn { background: var(--warn); }
.cost-bar-fill.bad { background: var(--bad); }

/* ─── Misc shared ────────────────────────────────────────────────────────────  */
.muted { color:var(--muted) }
.mono { font-variant-numeric: tabular-nums }
.grid { display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
        margin-bottom:24px }
.card { background:var(--panel); border:1px solid var(--border);
        border-radius:8px; padding:16px }
.card .label { color:var(--muted); font-size:12px; text-transform:uppercase;
               letter-spacing:0.5px; margin-bottom:6px }
.card .value { font-size:20px; font-weight:600; font-variant-numeric: tabular-nums; }
.card .sub { color:var(--muted); font-size:13px; margin-top:4px }
.pill { display:inline-block; padding:2px 8px; border-radius:12px;
        font-size:12px; font-weight:600; text-transform:uppercase }
.pill { background:rgba(125,133,144,0.15); color:var(--muted) }
.pill.ok { background:rgba(63,185,80,0.15); color:var(--ok) }
.pill.warn { background:rgba(210,153,34,0.15); color:var(--warn) }
.pill.bad { background:rgba(248,81,73,0.15); color:var(--bad) }
/* Phase 23-05 (FRONT-03/D-08): stale-data badge on the KPI strip — reuses the
   pill base + warn/bad color; non-uppercase so the relative time reads cleanly. */
.pill.stale-badge { text-transform:none; }
section h2 { font-size:14px; color:var(--muted); text-transform:uppercase;
             letter-spacing:0.5px; margin:16px 0 12px }
.empty { color:var(--muted); padding:14px; text-align:center;
         background:var(--panel); border:1px solid var(--border); border-radius:8px }
footer { color:var(--muted); font-size:12px; text-align:center; margin-top:32px; padding: 16px 0; }

/* ─── Active bets ─────────────────────────────────────────────────────────── */
.bet-card { background:var(--panel); border:1px solid var(--border);
            border-radius:8px; padding:16px; margin-bottom:12px }
.bet-card .question { font-size:14px; margin-bottom:8px; font-weight:600 }
.bet-card .meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
                  gap:5px 18px; color:var(--muted); font-size:12px;
                  margin-bottom:8px }
.bet-card .meta > span { display:flex; justify-content:space-between; gap:10px;
                         padding:2px 0; border-bottom:1px dotted var(--border) }
.bet-card .meta > span > :last-child { color:var(--text); white-space:nowrap;
                                       font-variant-numeric:tabular-nums }
.bet-card .meta > span > .k { color:var(--muted) }
.bet-card .meta strong { color:var(--text) }
.bet-card .chart-wrap { width:100%; height:180px; margin-top:8px }
.bet-card .chart-empty { padding:24px 0; text-align:center; font-size:12px }
.bet-card.clickable { cursor:pointer; transition: border-color 0.15s, transform 0.05s }
.bet-card.clickable:hover { border-color:var(--accent) }
.bet-card.clickable:active { transform:translateY(1px) }
.bet-card .card-hint { font-size:12px; margin-top:8px; text-align:right;
                       opacity:0.5; transition:opacity 0.15s }
.bet-card.clickable:hover .card-hint { opacity:1 }

/* ─── Bet detail ─────────────────────────────────────────────────────────── */
.bet-detail .detail-title { font-size:14px; margin:12px 0 4px; line-height:1.4; font-weight:600 }
.bet-detail h3 { font-size:13px; color:var(--muted); text-transform:uppercase;
                 letter-spacing:0.5px; margin:24px 0 10px;
                 padding-bottom:6px; border-bottom:1px solid var(--border) }
.bet-detail .thesis-meta { display:flex; gap:18px; flex-wrap:wrap;
                           font-size:13px; margin-bottom:12px; color:var(--muted) }
.bet-detail .thesis-meta strong { color:var(--text) }
.bet-detail .thesis-body {
  background:var(--panel); border:1px solid var(--border);
  border-radius:8px; padding:14px 18px; line-height:1.7; font-size:13px;
  white-space:pre-wrap; word-break:break-word;
}
.bet-detail .sources { list-style:none; padding:0; margin:0 }
.bet-detail .sources li {
  background:var(--panel); border:1px solid var(--border);
  border-radius:6px; padding:8px 12px; margin-bottom:4px;
  font-size:12px; word-break:break-all;
}
.bet-detail .meta-table { display:grid; gap:6px;
                          grid-template-columns:repeat(auto-fit,minmax(280px,1fr)) }
.bet-detail .meta-table > div {
  display:flex; justify-content:space-between; gap:12px;
  padding:6px 12px; background:var(--panel); border:1px solid var(--border);
  border-radius:6px; font-size:12px;
}
.bet-detail .meta-table .label { font-size:12px; text-transform:uppercase;
                                 letter-spacing:0.5px; flex:0 0 auto }
.bet-detail .meta-table > div > .mono { min-width:0; text-align:right;
                                        word-break:break-all; overflow-wrap:anywhere }

/* ─── Exit cards (Retiradas) ─────────────────────────────────────────────── */
.exit-card { background:var(--panel); border:1px solid var(--border);
             border-radius:8px; padding:16px; margin-bottom:12px }
.exit-card .exit-question { font-size:14px; font-weight:600; margin-bottom:8px; }
.exit-card .exit-meta { display:flex; gap:16px; flex-wrap:wrap;
                        font-size:12px; color:var(--muted); margin-top:8px; align-items:center; }
.exit-card .exit-meta strong { color:var(--text); font-variant-numeric:tabular-nums }
.exit-edge-pos { color:var(--ok); font-variant-numeric:tabular-nums }
.exit-edge-neg { color:var(--bad); font-variant-numeric:tabular-nums }

/* ─── uPlot ──────────────────────────────────────────────────────────────── */
.uplot { font-family: inherit !important; font-size:12px !important }
.uplot .u-legend { color:var(--muted); font-size:12px }
.uplot .u-legend .u-marker { display:inline-block }
.uplot .u-axis text { fill:var(--muted) !important }

/* ─── Price-chart X-axis format selector ─────────────────────────────────── */
.chart-controls { display:flex; align-items:center; gap:6px; margin:8px 0 4px;
                  flex-wrap:wrap }
.chart-controls-lbl { font-size:12px; text-transform:uppercase; letter-spacing:0.5px }
.chart-fmt-btn { background:var(--bg); color:var(--muted);
                 border:1px solid var(--border); border-radius:6px;
                 padding:3px 10px; font:inherit; font-size:12px; cursor:pointer;
                 transition: background 0.15s, color 0.15s, border-color 0.15s }
.chart-fmt-btn:hover { color:var(--text); border-color:var(--accent) }
.chart-fmt-btn.active { background:var(--accent); color:#0d1117;
                        border-color:var(--accent); font-weight:600 }

/* ─── Feature rows ───────────────────────────────────────────────────────── */
.feature-row { background:var(--panel); border:1px solid var(--border);
               border-radius:8px; padding:12px 16px; margin-bottom:8px }
.feature-row .name { font-weight:600; font-size:14px }
.feature-row .desc { color:var(--muted); font-size:13px; margin:4px 0 }
.feature-row .sub { color:var(--muted); font-size:12px }
.feature-row .settings-link { font-size:12px; color:var(--accent);
                               cursor:pointer; background:none; border:none;
                               font:inherit; padding:0; margin-top:4px; display:inline-block; }
.feature-row .settings-link:hover { text-decoration:underline; }

/* ─── Architecture (Cómo funciona) ──────────────────────────────────────── */
.arch-node, .arch-api {
  display:inline-block; background:var(--panel); border:1px solid var(--border);
  border-radius:6px; padding:6px 10px; margin:4px; font-size:12px;
}
.arch-api { display:block; margin:8px 0 }
.arch-api .sub { color:var(--muted); font-size:12px; margin-top:4px }
.arch-api .arch-api-name { font-weight:600; font-size:14px; color:var(--text);
                           margin-bottom:4px }
.arch-api .arch-api-impact { font-size:13px; color:var(--text); line-height:1.6;
                             margin-bottom:6px }
.arch-details { margin-top:24px }
.arch-details summary { color:var(--muted); cursor:pointer; padding:8px 0;
                        font-size:13px }
.arch-details summary:hover { color:var(--text) }
.flow-step { background:var(--panel); border:1px solid var(--border);
             border-radius:8px; padding:14px 18px; margin-bottom:10px }
.flow-step-header { display:flex; align-items:baseline; gap:12px; margin-bottom:6px }
.flow-step-num { background:var(--accent); color:#0d1117; font-weight:600;
                 width:24px; height:24px; border-radius:50%;
                 display:inline-flex; align-items:center; justify-content:center;
                 font-size:12px; flex-shrink:0 }
.flow-step-title { font-weight:600; font-size:14px }
.flow-step-body { color:var(--muted); font-size:13px; line-height:1.6;
                  padding-left:36px }

/* ─── Bankroll banner ────────────────────────────────────────────────────── */
.bankroll-banner {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; margin: 12px 0;
}
.bankroll-banner.depleted { border-color: var(--bad); background: rgba(220,80,80,0.08) }
.bankroll-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; }
.bankroll-item { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.bankroll-item .lbl { font-size: 12px; color: var(--muted);
                      text-transform: uppercase; letter-spacing: 0.5px }
.bankroll-item .val { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bankroll-item .sub { font-size: 12px; }
.bankroll-item .pnl-pos { color: #5cd373 }
.bankroll-item .pnl-neg { color: var(--bad) }
.bankroll-progress {
  height: 6px; background: var(--bg); border-radius: 3px;
  margin-top: 12px; overflow: hidden;
}
.bankroll-progress-fill {
  height: 100%; background: linear-gradient(90deg, #58a6ff, #ff7b72);
  transition: width 0.25s ease;
}
.bankroll-warn { margin-top: 10px; color: var(--bad); font-size: 12px; font-weight: 600 }

/* ─── Bet card market-id ─────────────────────────────────────────────────── */
.bet-card .market-id { font-size:12px; margin-top:-4px; margin-bottom:6px;
                       word-break:break-all }
.mono { font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace }

/* ─── Header-right / top bar misc ───────────────────────────────────────── */
.header-right { display:flex; gap:12px; align-items:center }

/* ─── Buttons ─────────────────────────────────────────────────────────────  */
.btn { background:var(--panel); color:var(--text); border:1px solid var(--border);
       border-radius:6px; padding:6px 12px; cursor:pointer; font:inherit;
       font-size:13px; transition: background 0.15s }
.btn:hover:not(:disabled) { background:var(--border); color:var(--text) }
.btn:disabled { opacity:0.4; cursor:not-allowed }
.btn-primary { background:var(--accent); color:#0d1117; border-color:var(--accent);
               font-weight:600 }
.btn-primary:hover:not(:disabled) { background:#7cb8ff; color:#0d1117 }

/* ─── Filters bar ────────────────────────────────────────────────────────── */
.filters { display:flex; gap:16px; align-items:center; margin-bottom:16px;
           padding:10px 14px; background:var(--panel); border:1px solid var(--border);
           border-radius:8px; flex-wrap:wrap }
.filters label { display:flex; gap:6px; align-items:center; font-size:13px;
                 color:var(--muted) }
.filters select { background:var(--bg); color:var(--text);
                  border:1px solid var(--border); border-radius:4px;
                  padding:4px 8px; font:inherit; font-size:12px }
.filter-count { font-size:12px; margin-left:auto }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pager { display:flex; gap:12px; align-items:center; justify-content:center;
         margin-top:16px; padding:12px 0 }

/* ─── KPI strip ──────────────────────────────────────────────────────────── */
.kpi-strip { display:flex; gap:24px; flex-wrap:wrap; align-items:baseline; }
.kpi-item { display:flex; flex-direction:column; gap:2px; }
.kpi-item .kpi-lbl { font-size:12px; color:var(--muted);
                     text-transform:uppercase; letter-spacing:0.5px }
.kpi-item .kpi-val { font-size:20px; font-weight:600; font-variant-numeric:tabular-nums; }
.kpi-item .kpi-val-sm { font-size:13px; font-variant-numeric:tabular-nums; }
.kpi-item .kpi-sub { font-size:12px; color:var(--muted); }
/* Loading skeleton for KPI values. LIVE fetches positions from the API (slower
   than the paper simulator); show a shimmer instead of stale PAPER figures while
   it loads, so the strip never flashes wrong numbers (#aggregate-cash flicker). */
.kpi-skel { display:inline-block; height:20px; width:64px; border-radius:4px; margin-top:2px;
            background:linear-gradient(90deg, var(--border-subtle) 25%, var(--border) 50%, var(--border-subtle) 75%);
            background-size:200% 100%; animation:kpi-shimmer 1.3s ease-in-out infinite; }
.kpi-skel.sm { height:14px; width:48px; }
@keyframes kpi-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── Sistema health rows ────────────────────────────────────────────────── */
.health-row { display:flex; justify-content:space-between; align-items:center;
              padding:8px 0; border-bottom:1px dotted var(--border-subtle); font-size:13px; }
.health-row:last-child { border-bottom:none; }
.health-row .h-label { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:0.5px }
.health-row .h-value { font-variant-numeric:tabular-nums; }

/* ─── Warning banner ─────────────────────────────────────────────────────── */
.warning-banner {
  background:rgba(210,153,34,0.1); border:1px solid var(--warn);
  border-radius:8px; padding:12px 16px; margin-bottom:16px;
  font-size:13px; color:var(--warn);
}

/* ─── Success pill (settings save) ──────────────────────────────────────── */
.success-pill {
  display:inline-block; padding:6px 12px; border-radius:6px;
  background:rgba(63,185,80,0.15); color:var(--ok);
  font-size:13px; font-weight:600; margin-bottom:16px;
  transition: opacity 0.5s;
}
.success-pill.fade { opacity:0; }

/* ─── Misc Calibration ───────────────────────────────────────────────────── */
.calib-headline { font-size:20px; font-weight:600; font-variant-numeric:tabular-nums; margin-bottom:4px; }
.calib-sub { font-size:13px; color:var(--muted); margin-bottom:16px; }
