:root {
  color-scheme: dark;
  --bg: #06101d;
  --bg-soft: #0a1727;
  --panel: rgba(8, 18, 32, .88);
  --panel-strong: rgba(7, 16, 29, .97);
  --card: rgba(15, 27, 45, .72);
  --line: rgba(148, 163, 184, .20);
  --line-strong: rgba(125, 211, 252, .42);
  --text: #e8eef7;
  --muted: #91a2b8;
  --accent: #42d3ff;
  --accent-2: #3978ff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 22px 70px rgba(0, 0, 0, .42);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: inherit; }
button, input, select, textarea, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 37px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(15, 29, 48, .82);
  color: #dce8f5;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, opacity .14s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: rgba(20, 42, 66, .92); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { border-color: transparent; background: linear-gradient(145deg, #0ea5e9, #2563eb); color: white; font-weight: 750; }
.btn.success { border-color: transparent; background: linear-gradient(145deg, #16a34a, #22c55e); color: white; font-weight: 750; }
.btn.danger { color: #fecaca; }
.btn.danger:hover { border-color: rgba(239, 68, 68, .65); background: rgba(127, 29, 29, .35); }
.btn[aria-pressed="true"] { border-color: rgba(66, 211, 255, .7); background: rgba(14, 116, 144, .28); box-shadow: inset 0 0 0 1px rgba(66, 211, 255, .12); }
.field { margin-top: 12px; }
.field label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: #becbda; font-size: 11px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #081421;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(66, 211, 255, .1); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card {
  background: rgba(13, 26, 43, .90);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 18px 58px rgba(0, 0, 0, .27);
  backdrop-filter: blur(14px);
}
.notice { padding: 10px 12px; border: 1px solid rgba(66, 211, 255, .28); border-radius: 11px; background: rgba(14, 165, 233, .08); color: #c9f2ff; font-size: 11px; line-height: 1.55; }
.notice.ok { border-color: rgba(34, 197, 94, .34); background: rgba(34, 197, 94, .08); color: #bbf7d0; }
.notice.warn { border-color: rgba(245, 158, 11, .38); background: rgba(245, 158, 11, .08); color: #fde7b0; }
.notice.error { border-color: rgba(239, 68, 68, .42); background: rgba(239, 68, 68, .09); color: #fecaca; }
.toast {
  position: fixed;
  z-index: 5000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translate(-50%, 120px);
  opacity: 0;
  max-width: min(560px, calc(100vw - 30px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 10, 20, .96);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: center;
  font-size: 12px;
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.logo {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #31d8ff, #2169ff);
  box-shadow: 0 0 32px rgba(49, 216, 255, .32);
  color: white;
  font-weight: 900;
  font-size: 18px;
}
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(15, 23, 42, .68); color: #cbd5e1; font-size: 11px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px rgba(148, 163, 184, .12); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .16); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .16); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }
.toggle-line { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.toggle-line input { width: auto; accent-color: var(--accent); }
