/* ---------- Status bar ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.statusbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  min-height: var(--bar-h); padding: 8px 20px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.stats { display: flex; align-items: center; gap: 22px; min-width: 0; }
.phone-only { display: none; }
.brand { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand b { font-size: 15px; letter-spacing: -0.01em; }
.brand span { color: var(--muted); font-size: 12px; }
.stat { display: flex; flex-direction: column; gap: 1px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; }
.stat .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.stat .v { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
button.stat:hover .v { text-decoration: underline; text-decoration-color: var(--rule-strong); }
.stat .v.warn { color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.dot.idle { background: var(--idle); }
.meter { width: 72px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: none; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.meter.hot > i { background: var(--warn); }
.meter.over > i { background: var(--bad); }

.banner { padding: 10px 20px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 13px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--rule); }
.banner-running { background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--rule); }
.banner-info { background: var(--surface-2); color: var(--muted); font-weight: 500; }

/* ---------- Refresh button + "Updated … ago" ---------- */
.sync { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2);
  border-radius: 8px; box-shadow: var(--shadow);
}
.icon-btn:hover { border-color: var(--muted); color: var(--ink); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.spinning svg { animation: sync-spin 0.9s linear infinite; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
.updated-ago { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 759px) {
  .icon-btn { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .icon-btn.spinning svg { animation: none; opacity: 0.45; }
}
