:root {
  --bg: #0e0f12;
  --panel: #181a1f;
  --panel-2: #22252c;
  --text: #f2f3f5;
  --muted: #9aa0ab;
  --accent: #4f8cff;
  --live: #ff3b30;
  --ok: #34c759;
  --warn: #ffb020;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

button, select, input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--panel-2);
  cursor: pointer;
  font-weight: 600;
  touch-action: manipulation;
}
button.primary { background: var(--accent); color: #fff; }
button.big { width: 100%; padding: 18px; font-size: 1.15rem; }
button.on { background: var(--accent); color: #fff; }
button:disabled { opacity: .5; }

select, input[type="text"] {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #2e323b;
  background: var(--panel-2);
}

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
}

.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

.dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--muted);
  margin-right: 6px;
  vertical-align: middle;
}
.dot.live { background: var(--live); box-shadow: 0 0 10px var(--live); animation: pulse 1.4s infinite; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.send { background: var(--accent); }

/* Foco visible para quien usa teclado */
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Botón con apariencia de enlace (acciones secundarias) */
.linkbtn { background: none; padding: 6px 0; color: var(--accent); font-weight: 500; text-align: left; }
.linkbtn.danger { color: #ff8a80; }
@keyframes pulse { 50% { opacity: .45; } }

code.link {
  display: block;
  padding: 10px 12px;
  background: #000;
  border-radius: 10px;
  word-break: break-all;
  font-size: .9rem;
}
