:root {
  --bg: #0f172a;
  --panel: #172033;
  --panel2: #1e293b;
  --line: #2a3851;
  --text: #e5edf9;
  --muted: #8fa2bd;
  --accent: #35d0a4;
  --accent2: #65a9ff;
  --danger: #ff6b7a;
  --warn: #ffc266;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 700px at 85% -10%, #1b3b55 0%, var(--bg) 48%, #0a1020 100%);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
button, input, select {
  font: inherit;
  color: var(--text);
}
button { cursor: pointer; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(400px, 100%);
  background: rgba(23, 32, 51, .92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.brand { color: var(--accent); font-weight: 800; letter-spacing: .18em; font-size: 13px; }
.login-card h1 { margin: 8px 0 4px; font-size: 26px; }
.login-card label { display: block; margin-top: 18px; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e1626;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent2); }
button.primary, button.ghost, button.danger, button.small {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #06251d;
  font-weight: 700;
}
button.primary:hover { filter: brightness(1.08); }
button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  font-weight: 500;
}
button.danger { background: transparent; color: var(--danger); border-color: #63313a; }
button.small { padding: 6px 10px; font-size: 12px; }
.login-card button { width: 100%; margin-top: 20px; padding: 12px; }
.error { min-height: 20px; margin-top: 10px; color: var(--danger); font-size: 13px; }
.shell { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0 18px; }
.logo { font-weight: 800; letter-spacing: .04em; font-size: 18px; }
.logo span { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 8px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions select { width: 220px; margin: 0; padding: 8px 10px; }
.tabs { display: flex; gap: 6px; overflow: auto; padding: 4px; background: rgba(23,32,51,.8); border: 1px solid var(--line); border-radius: 12px; }
.tabs button {
  background: transparent; border: 0; color: var(--muted); padding: 9px 16px; border-radius: 9px; white-space: nowrap;
}
.tabs button.active { background: var(--panel2); color: var(--text); }
main { display: grid; gap: 16px; margin-top: 18px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card {
  background: linear-gradient(180deg, rgba(30,41,59,.88), rgba(23,32,51,.88));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h2 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; }
.stat { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.2; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: #21354b; color: var(--accent2); }
.pill.ok { color: var(--accent); background: #123b31; }
.pill.warn { color: var(--warn); background: #3b2f18; }
.form-row { display: grid; grid-template-columns: 1.2fr 1fr 100px auto; gap: 10px; align-items: end; }
.form-row.small { grid-template-columns: 1fr 1fr 1fr auto; }
.form-row label { font-size: 12px; color: var(--muted); }
.form-row input, .form-row select { margin-top: 5px; }
.list { display: grid; gap: 8px; margin-top: 14px; }
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(15,23,42,.55);
}
.item .main { min-width: 0; }
.item .title { font-weight: 700; }
.item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.item .actions { display: flex; gap: 6px; flex-shrink: 0; }
.empty { color: var(--muted); text-align: center; padding: 22px 10px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.days label { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.days input { width: auto; margin: 0; accent-color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #0b1220; border: 1px solid var(--line); color: var(--text);
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .18s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: #63313a; color: #ffd5da; }
@media (max-width: 760px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .form-row, .form-row.small { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions select { flex: 1; width: auto; }
}

/* 远程收听：音量电平条 */
.level { margin-top: 16px; height: 14px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; }
#level-bar { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg,#3b82f6,#22c55e,#eab308); transition: width .08s linear; }
.pill.ok { background: rgba(34,197,94,.18); }
.pill.bad { background: rgba(239,68,68,.18); }


/* 登录验证码 */
.captcha-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.captcha-row input { flex: 1; }
.captcha-img { width: 130px; height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(127,127,127,.25); background: #f5f7fa; }
.captcha-img:active { opacity: .7; }


/* 信号格 */
.sig { display: inline-block; width: 5px; border-radius: 2px; background: rgba(127,127,127,.28); }
.sig.on { background: #22c55e; }

