/* Operations dashboard, first screen. Colours are tokens on .admin-ops so the inline SVG can take the same
   ones as the text beside it (the chart uses fill/stroke: var(--ops-…)), instead of hard-coding a second palette.
   Mobile first: one column, two KPI cards per row, every tap target at least 44px. Desktop goes two columns. */
.admin-ops { --ops-ink: #1e293b; --ops-muted: #64748b; --ops-line: #e2e8f0; --ops-accent: #1d4ed8; --ops-good: #15803d; --ops-warn: #b45309; --ops-bad: #b42318; --ops-off: #94a3b8; }
.admin-ops header { margin: 20px 0 14px; }
.ops-asof { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 8px; font-size: 13px; color: var(--ops-muted); font-variant-numeric: tabular-nums; }
.ops-refresh { width: auto; min-height: 44px; padding: 0 16px; }
.ops-period { display: inline-flex; border: 1px solid var(--ops-line); border-radius: 10px; overflow: hidden; }
.ops-period-b { min-height: 44px; min-width: 56px; padding: 0 12px; border: 0; background: #fff; color: var(--ops-muted); font: inherit; font-size: 13px; cursor: pointer; }
.ops-period-b + .ops-period-b { border-left: 1px solid var(--ops-line); }
.ops-period-on { background: var(--ops-accent); color: #fff; }
.ops-period-b:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: -2px; }
/* 看板分页(总览 / Bot)。样式像周期选择器,但【类名与语义都自己一套】:周期是一组按下的按钮(aria-pressed),
   分页是一组标签页(role=tab + aria-selected)。共用 .ops-period-b 会让"当前被按下的那个"在一屏里指向两样东西。 */
.ops-tabs { display: inline-flex; border: 1px solid var(--ops-line); border-radius: 10px; overflow: hidden; }
.ops-tab-b { min-height: 44px; min-width: 56px; padding: 0 12px; border: 0; background: #fff; color: var(--ops-muted); font: inherit; font-size: 13px; cursor: pointer; }
.ops-tab-b + .ops-tab-b { border-left: 1px solid var(--ops-line); }
.ops-tab-on { background: var(--ops-accent); color: #fff; }
.ops-tab-b:focus-visible { outline: 2px solid var(--ops-accent); outline-offset: -2px; }
.ops-strip { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--ops-line); border-radius: 12px; background: #fff; font-size: 13px; }
.ops-state { display: inline-flex; align-items: center; gap: 7px; color: var(--ops-ink); }
.ops-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ops-off); }
.ops-dot-good { background: var(--ops-good); }
.ops-dot-wait { background: var(--ops-warn); }
.ops-dot-bad { background: var(--ops-bad); }
.ops-state small { color: var(--ops-muted); }
.ops-badge { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: #fef3c7; color: #92400e; }
.ops-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 14px; margin-bottom: 12px; border-radius: 12px; background: #fef3c7; color: #92400e; font-size: 14px; }
.ops-todo a { color: inherit; text-decoration: underline; display: inline-flex; align-items: center; min-height: 44px; }
.ops-todo-clear { background: #f1f5f9; color: var(--ops-muted); min-height: 44px; }
.ops-kpis { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.ops-kpi { min-width: 0; padding: 12px; border: 1px solid var(--ops-line); border-radius: 12px; background: #fff; color: var(--ops-muted); cursor: pointer; outline: none; }
.ops-kpi-on { border-color: var(--ops-accent); box-shadow: 0 0 0 2px rgba(29,78,216,.18); color: var(--ops-accent); }
.ops-kpi:focus-visible { box-shadow: 0 0 0 2px rgba(29,78,216,.45); }
.ops-kpi .ops-l { display: block; font-size: 13px; color: var(--ops-muted); }
.ops-kpi .ops-n { display: block; margin: 2px 0; font-size: 28px; line-height: 1.15; color: var(--ops-ink); font-variant-numeric: tabular-nums; }
.ops-d { display: block; font-size: 12px; color: var(--ops-muted); }
.ops-up { color: var(--ops-good); }
.ops-down { color: var(--ops-bad); }
.ops-spark { display: block; width: 100%; height: 26px; margin-top: 4px; }
.ops-panel { margin-bottom: 12px; }
.ops-panel h3 small { font-size: 12px; font-weight: 400; color: var(--ops-muted); }
.ops-chart { display: block; width: 100%; height: auto; }
.ops-chart text { fill: var(--ops-muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.ops-note { display: block; margin-top: 8px; font-size: 12px; color: var(--ops-muted); line-height: 1.6; }
.ops-empty { margin: 0; font-size: 13px; color: var(--ops-muted); }
.ops-hbars { display: flex; flex-direction: column; gap: 6px; }
.ops-hbar { display: grid; grid-template-columns: 6.5em 1fr 3.4em; gap: 8px; align-items: center; font-size: 13px; color: var(--ops-muted); }
.ops-hbar span { min-width: 0; overflow-wrap: anywhere; }
.ops-hbar i { display: block; height: 14px; border-radius: 4px; background: var(--ops-accent); opacity: .55; }
.ops-hbar em { font-style: normal; text-align: right; color: var(--ops-ink); font-variant-numeric: tabular-nums; }
.ops-hbar-none { background: transparent; }
.ops-hbar-s { grid-template-columns: 6.5em 1fr 3.4em 64px; }
.ops-hbar .ops-spark { height: 16px; margin: 0; color: var(--ops-accent); }
.ops-two { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 760px) {
  .ops-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .ops-two { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
}
