:root {
  color-scheme: light dark;
  --bg: #eef4ff;
  --card: rgba(255,255,255,.84);
  --text: #102033;
  --muted: #667085;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --border: rgba(37, 99, 235, .16);
  --danger: #dc2626;
  --ok: #16a34a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07111f;
    --card: rgba(15, 23, 42, .86);
    --text: #e5edf8;
    --muted: #9aa8bd;
    --border: rgba(148, 163, 184, .22);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #dbeafe, transparent 32rem), var(--bg);
}
.app { width: min(760px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 14px 0 18px; }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0 0 8px; font-size: clamp(28px, 8vw, 48px); line-height: 1.02; }
.muted { margin: 0; color: var(--muted); line-height: 1.55; }
code { padding: 2px 6px; border-radius: 6px; background: rgba(37,99,235,.1); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: 0 16px 50px rgba(2, 8, 23, .08); backdrop-filter: blur(12px); margin-bottom: 14px; }
.badge { white-space: nowrap; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid var(--border); }
.badge-ok { color: var(--ok); background: rgba(22, 163, 74, .12); }
.badge-warn { color: #d97706; background: rgba(245, 158, 11, .13); }
.status-main { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.machine-status { font-size: clamp(36px, 12vw, 72px); color: var(--primary); font-variant-numeric: tabular-nums; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.meta-grid span:last-child { word-break: break-all; }
.actions { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; }
button { border: 0; border-radius: 16px; padding: 14px 16px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text); background: rgba(148, 163, 184, .18); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .wash:not(:disabled) { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
button.ghost { padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.wash { min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
.wash span { font-size: 22px; }
.wash small { opacity: .78; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row small { display: block; color: var(--muted); margin-top: 4px; }
input[type="checkbox"] { width: 46px; height: 28px; accent-color: var(--primary); }
.log-head { display: flex; align-items: center; justify-content: space-between; }
pre { margin: 0; min-height: 120px; max-height: 260px; overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.5; color: var(--muted); }
@media (max-width: 560px) {
  .hero { flex-direction: column; }
  .actions { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
}
