:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #171a23;
  --muted: #6b7185;
  --line: #e3e5ee;
  --accent: #6d4aff;
  --accent-2: #19b6e6;
  --ok: #138a4c;
  --bad: #c9302c;
  --warn-bg: #fff6dd;
  --warn-text: #7a5800;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --card: #181b24;
    --text: #e8eaf2;
    --muted: #9298ad;
    --line: #2a2e3b;
    --ok: #3ccb7f;
    --bad: #ff6b66;
    --warn-bg: #3a3014;
    --warn-text: #f5d27a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.logo {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.bar-right { display: flex; gap: 8px; }
main { max-width: 1000px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
}
.narrow { max-width: 420px; margin: 48px auto; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; min-width: 0;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 8px;
  padding: 9px 16px; color: #fff; background: var(--accent);
}
button:disabled { opacity: .55; cursor: default; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 6px 12px; }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); padding: 5px 10px; }
button.small { padding: 5px 10px; font-size: 13px; }
.error { color: var(--bad); min-height: 1em; margin: 6px 0 0; white-space: pre-wrap; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid .wide { grid-column: 1 / -1; }
.plan { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.big { font-size: 18px; font-weight: 650; }
.badge { margin-left: auto; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px solid currentColor; }
.badge.ok, .st-ok { color: var(--ok); }
.badge.bad, .st-bad { color: var(--bad); }
.created { margin-top: 12px; }
.warn { background: var(--warn-bg); color: var(--warn-text); padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.row-between h2 { margin: 0; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button { margin-left: 6px; }
.devices td { background: var(--bg); }
.device { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.device + .device { border-top: 1px solid var(--line); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .plan { gap: 16px; }
  .badge { margin-left: 0; }
}
.limit { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
button.step { padding: 0; width: 26px; height: 26px; line-height: 1; font-size: 16px; }
