[hidden] { display: none !important; }
/* 传呼台: what app.css does not cover. The app sits in one rounded frame, at most 1480 wide, centred:
   frame padding 12 + sidebar 248 + gap 12 + main (topbar over canvas) + 12. */

.mono, code { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.unit { color: var(--muted); font-size: var(--fs-small); }
.grow { flex: 1; min-width: 0; }

.simple-page { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.simple-page .setting-panel { width: min(380px, 100%); }
.simple-page [role="alert"] { color: var(--negative); }
.devices td { vertical-align: middle; white-space: nowrap; }
.devices .input.bare { width: 12ch; }
.devices .switch { display: block; margin: 0; }

/* shell */
body { background: var(--page); }
.frame { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: 12px; max-width: 1480px; min-height: calc(100svh - 32px); margin: 16px auto; padding: 12px; background: var(--ground); border: 1px solid var(--border); border-radius: 28px; }
.sidebar { position: sticky; top: 28px; height: calc(100svh - 56px); display: flex; flex-direction: column; padding: 20px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.close-menu { display: none; margin-left: auto; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar .group-label { margin: 18px 10px 6px; font-size: 11px; letter-spacing: 0.06em; color: var(--faint); }
.nav-item { position: relative; gap: 12px; padding: 0 12px; border-radius: 12px; font-size: 15px; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar .bottom { display: grid; gap: 8px; padding-top: 16px; }
.server-card { padding: 16px; border-radius: 16px; background: var(--raised); }
.server-card .dot { color: var(--text); font-weight: 500; font-size: var(--fs-body); }
.server-card p { margin: 4px 0 10px; color: var(--muted); font-size: var(--fs-small); }
.nav-item.as-button { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; font-size: 15px; }

.main { display: grid; grid-template-rows: auto 1fr; gap: 12px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 14px 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; }
.menu-toggle { display: none; }
.search { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); height: 42px; padding: 0 14px; border-radius: 999px; background: var(--raised); color: var(--muted); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.who-name { font-weight: 500; line-height: 18px; }
.who-host { font-size: var(--fs-small); color: var(--muted); line-height: 16px; }
.canvas { padding: 30px var(--pad) var(--pad); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; }

/* softer pieces than app.css: pill buttons, chip links, grey table heads */
.btn { border-radius: 999px; padding: 0 16px; }
.btn.primary:hover { background: #ad4817; }
.icon-btn { padding: 0; }
.panel { border-color: var(--border); }
.panel > header { margin-bottom: 18px; }
.card-link { height: 30px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 999px; font-size: var(--fs-small); }
.card-link:hover { text-decoration: none; background: var(--raised); }
.server-card .card-link { background: var(--surface); }
th { height: 38px; background: var(--raised); border-bottom: 0; color: var(--muted); }
th:first-child { border-radius: 10px 0 0 10px; } th:last-child { border-radius: 0 10px 10px 0; }
.panel.flush th { border-radius: 0; }
.tabs a[aria-selected="true"]::after { background: var(--accent); }
.switch:checked { background: var(--accent); }
input[type="range"] { accent-color: var(--accent); }
.input, select.input { border-color: var(--control); }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
select.input { appearance: none; padding-right: 36px; background: var(--surface) var(--chevron-down) right 14px center / 12px no-repeat; cursor: pointer; }
:root { --chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2362656b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.name-link { white-space: nowrap; }

/* overview KPIs: separate cards, the icon in a soft circle */
.kpis.cards { display: grid; grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); background: none; border: 0; }
.kpis.cards .kpi { padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.kpis.cards .kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { color: var(--text); font-weight: 500; }
.kpi-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.kpi-icon svg { width: 17px; height: 17px; }
.kpi.bad .kpi-icon { background: var(--pill-negative-bg); color: var(--negative); }
.kpi.zero .kpi-icon { background: var(--raised); color: var(--muted); }
.kpis.cards .kpi-value { margin-top: 18px; font-weight: 600; }
.kpi.bad .kpi-value { color: var(--negative); }
.kpi.zero .kpi-value { color: var(--muted); }

/* title */
.title-row { margin-bottom: 26px; }
.title-row h1 { font-weight: 600; letter-spacing: -0.02em; }
.title-row .sub { max-width: 72ch; }
.crumb { font-size: var(--fs-small); color: var(--muted); margin-bottom: 4px; }
.crumb a:hover { color: var(--text); }

/* overview */
.grid.split { margin-top: var(--gap); }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.bars { width: 100%; height: auto; }
.bars text { font-size: 11px; fill: var(--axis-ink); font-variant-numeric: tabular-nums; }
.bars text.future { fill: var(--chart-muted); }
.line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.line2 { margin-top: 2px; font-size: var(--fs-small); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo .row { align-items: center; }
.todo .pill { flex: none; }
.name-link { font-weight: 500; }
.name-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--muted); white-space: nowrap; }
.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--control); }
.dot.on::before { background: var(--positive); }
.panel-foot { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); }
.status-text { color: var(--muted); }

/* tables sitting flush in a panel */
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush th:first-child, .panel.flush td:first-child { padding-left: var(--card-pad); }
.panel.flush th:last-child, .panel.flush td:last-child { padding-right: var(--card-pad); }
.panel.flush > header.pad { padding: 20px var(--card-pad) 4px; margin: 0; }
.panel.block { margin-bottom: 32px; }
tr.off td { color: var(--muted); }
td .pill + .sub { margin-top: 4px; }
.empty.inset { margin: var(--card-pad); }
table.log td:nth-child(4) { width: 50%; }
.more { display: flex; justify-content: center; margin-top: var(--gap); }

/* settings rows: label column beside a panel */
.setting { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); }
.title-row + .setting, .title-row + form > .setting:first-child { border-top: 0; padding-top: 8px; }
.setting-label h2 { font-size: var(--fs-section); font-weight: 500; line-height: 22px; margin-top: 6px; }
.setting-label > p { margin-top: 6px; color: var(--muted); max-width: 44ch; }
.setting-label .preview { margin-top: 20px; }
.setting-panel { display: grid; gap: 16px; align-content: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--card-pad); min-width: 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.field .value { color: var(--text); }
.hint { color: var(--muted); font-size: var(--fs-small); }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.input.short { width: 96px; }
input[type="range"] { width: 180px; }
.save-row { display: flex; justify-content: flex-end; gap: 8px; }
.save-row.split { justify-content: space-between; }
.form-foot { display: flex; justify-content: flex-end; padding-bottom: 32px; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.switch-row strong { font-weight: 500; }
.switch-row p { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.switch { flex: none; margin-top: 1px; }
.danger-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { color: var(--negative); border-color: #e9b8ba; }
.btn.danger:hover { background: var(--pill-negative-bg); }
a.btn { text-decoration: none; }
.icon-btn { width: var(--control-height); padding: 0; color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--text); }
.icon-btn.done { color: var(--positive); }
.footnote { margin: 8px 0 24px; color: var(--muted); font-size: var(--fs-small); max-width: 80ch; }

/* level picker: a segmented radio group */
.segmented label { display: inline-flex; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 999px; color: var(--muted); cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.segmented input:checked + span { background: var(--surface); color: var(--text); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented label.disabled span { color: var(--chart-muted); cursor: not-allowed; }

/* secrets and code */
.secret, .secret-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.secret-row { gap: 12px; justify-content: space-between; }
.secret code { padding: 7px 10px; background: var(--raised); border-radius: var(--radius-control); }
.code { margin: 0; padding: 14px 16px; background: var(--raised); border-radius: var(--radius-control); overflow-x: auto; line-height: 20px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.steps .secret { margin-top: 8px; }
.input.bare { height: 28px; padding: 0 6px; margin-left: -7px; border-color: transparent; background: transparent; font-weight: 500; }
.input.bare:hover, .input.bare:focus { border-color: var(--control); background: var(--surface); }

/* how the push looks on the lock screen */
.preview { max-width: 340px; }
.preview-card { padding: 12px 14px; border-radius: 18px; background: var(--raised); border: 1px solid var(--border); }
.preview-head { display: flex; gap: 6px; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.preview-app { color: var(--text); font-weight: 500; }
.preview-time { margin-left: auto; }
.preview-card strong { display: block; font-weight: 600; line-height: 20px; }
.preview-card p { color: var(--text); line-height: 20px; }
.preview[data-level="passive"] .preview-card { opacity: 0.7; }
.preview[data-level="critical"] .preview-card { box-shadow: inset 3px 0 0 var(--negative); }
.preview figcaption { margin-top: 8px; font-size: var(--fs-small); color: var(--muted); }

/* dialog floats, so it may carry a shadow */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 26px; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 12px 40px rgb(0 0 0 / 0.14); }
.dialog::backdrop { background: rgb(15 20 30 / 0.3); }
.dialog form { display: grid; gap: 16px; }
.dialog h2 { font-size: var(--fs-section); font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1100px) {
  .setting { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .setting-label .preview { display: none; }
}
@media (max-width: 1180px) {
  .kpis.cards { grid-template-columns: repeat(5, minmax(146px, 1fr)); overflow-x: auto; }
}
@media (max-width: 860px) {
  .frame { display: block; margin: 0; padding: 8px; min-height: 100svh; border: 0; border-radius: 0; }
  .main { gap: 8px; }
  .topbar { height: 60px; padding: 0 10px; border-radius: 18px; position: sticky; top: 8px; z-index: 10; }
  .menu-toggle, .close-menu { display: inline-flex; }
  .who > div { display: none; }
  .sidebar { position: fixed; inset: 0; top: 0; height: 100%; border-radius: 0; border: 0; z-index: 30; }
  .canvas { padding: 20px 16px 28px; border-radius: 18px; }
  .title-row h1 { font-size: 26px; }
  .kpis.cards { gap: 10px; }
  .kpis.cards .kpi { padding: 14px 16px 16px; }
  .kpis.cards .kpi:last-child:nth-child(odd) { grid-column: auto; }
  .kpis.cards .kpi-value { margin-top: 10px; font-size: 26px; }
  .field-pair { grid-template-columns: minmax(0, 1fr); }
  .panel { overflow-x: auto; }
  table.log td:nth-child(4) { min-width: 220px; }
}
.stack { display: grid; gap: var(--gap); align-content: start; }
@media (max-width: 860px) { .grid.split > .stack { order: -1; } }

/* API fields: a plain three-column list, no header */
table.fields td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
table.fields tr:last-child td { border-bottom: 0; }
table.fields td.mono { color: var(--accent-ink); }
.agent-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 14px; background: var(--raised); }
.agent-row strong { font-weight: 500; }
.agent-row p { margin-top: 2px; color: var(--muted); font-size: var(--fs-small); }
.agent-row .btn { flex: none; }
.btn.done { color: var(--positive); }
@media (max-width: 860px) { .agent-row { flex-direction: column; align-items: stretch; } }
.input.mono { font-size: 13px; }

.dot.offline::before { background: var(--negative); }
