/* Admin-panel-only additions layered on top of the shared web/styles.css —
   same tokens (--ink, --panel, --signal, --mono, etc.), no new palette. */

.admin-row { display: flex; align-items: center; gap: 10px; padding: 16px 18px; flex-wrap: wrap; }
.admin-row .spacer { flex: 1; }
/* .sub itself is styled once, sitewide, in the shared web/styles.css now —
   nothing admin-specific needed here. */
/* A hint/note row that should sit flush under the row above it (no top
   gap), or a row nested inside an already-padded parent that just needs
   .admin-row's flex+gap behavior with none of its own padding — named
   modifiers instead of a repeated inline style="padding-top:0"/"padding:0"
   on whichever rows happened to need it. */
.admin-row--flush { padding-top: 0; }
.admin-row--bare { padding: 0; }

.admin-input {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); padding: 10px 13px; font-size: 16px; flex: 1; min-width: 160px;
  transition: border-color .12s;
}
.admin-input:hover { border-color: var(--line-2); }
.admin-input:focus { border-color: var(--line-2); outline: none; }
select.admin-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0 L5 6 L10 0 Z' fill='%237C9199'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 30px; flex: none; min-width: 130px; cursor: pointer;
}
/* A select's own hover/focus reuses the amber accent (not the plain
   .admin-input line-2 above) — it's the one control here where a distinct
   "you're about to change something" cue is worth the extra color. */
select.admin-input:hover { border-color: var(--signal-dim); }
select.admin-input:focus { border-color: var(--signal-dim); }
select.admin-input option { background: var(--panel); color: var(--text); }

/* The .ui-select custom dropdown (web/ui-select.js) sized/positioned to sit
   in an .admin-row exactly like the old native select.admin-input did — the
   trigger fills the wrapper, so no separate width rule is needed on it.
   Same amber hover/focus accent as the native select it replaces. */
.ui-select.admin-input { flex: none; min-width: 130px; }
.ui-select.admin-input .ui-select-trigger:hover,
.ui-select.admin-input .ui-select-trigger:focus-visible,
.ui-select.admin-input .ui-select-trigger.open { border-color: var(--signal-dim); }

.admin-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 0; border-top: 1px solid var(--line); }
.admin-grid > div { padding: 16px 18px; }
.admin-grid > div:not(:last-child) { border-right: 1px solid var(--line); }
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } .admin-grid > div:not(:last-child) { border-right: none; border-bottom: 1px solid var(--line); } }

.token-card .note { color: var(--faint); font-size: 11px; margin-top: 6px; }

/* A labeled chart's own padded wrapper — the server panel's two charts and
   both line-stats-modal instances (admin's and manager's) all built this
   from the same repeated inline style pair. */
.chart-section { padding: 16px 18px 18px; }
.chart-section .eyebrow { padding-bottom: 8px; }

.admin-divider { border-top: 1px solid var(--line); }

.admin-out {
  margin: 0 18px 16px; padding: 12px 14px; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12px; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto;
}

.token-card {
  margin: 0 18px 16px; padding: 12px 14px; background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: 12px;
}
.token-card div { margin-bottom: 4px; word-break: break-all; }
.token-card a { color: var(--signal); }
.token-card .k { color: var(--faint); display: inline-block; min-width: 78px; }

#status #svc-status.pill.ok .dot { background: var(--live); box-shadow: 0 0 8px var(--live); }

/* Same amber-warning treatment as the shared .maintenance-banner, but flush
   within a panel's own row (top/bottom border only, no radius) rather than
   a standalone rounded box — the same accent color meaning either way. */
.update-banner {
  background: rgba(244,183,64,.08); border-top: 1px solid var(--signal-dim);
  border-bottom: 1px solid var(--signal-dim); color: var(--signal); font-size: 13px;
}

.conn-row {
  /* flex, not a fixed 3-column grid — a row can now carry a variable number
     of children (room, optional viewer-link name, badge+Sever per role), so
     a rigid column count would overflow/misalign once Sever buttons appear. */
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; background: var(--panel);
}
.conn-row .line-room { flex: 1 1 auto; min-width: 90px; }
.conn-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px;
  font-size: 11px; border: 1px solid; font-family: var(--mono);
}
.conn-badge.on  { color: var(--live); border-color: #234a3c; background: rgba(53,192,138,.07); }
.conn-badge.off { color: var(--faint); border-color: var(--line); }

/* Per-line call stats — a full-screen dim backdrop with a centered scrolling
   card, the same construction as a browser's own login/consent dialog. */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 10, 12, .72);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card { /* .panel already supplies border/background/radius */
  width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.modal-card--wide { max-width: 920px; } /* the Logs modal needs more room for its filter row */
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 18px 0;
}
.modal-head h2 { margin: 4px 0 0; font-size: 18px; }

/* Logs modal */
.badge.warn { color: var(--signal); border-color: var(--signal-dim); background: rgba(244,183,64,.08); }
.logs-out { max-height: 46vh; overflow-y: auto; padding: 4px 0; }
.log-row {
  display: flex; align-items: baseline; gap: 10px; padding: 7px 18px;
  font-family: var(--mono); font-size: 12.5px; border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: none; }
.log-row .log-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-row .log-msg { flex: 1; word-break: break-word; white-space: pre-wrap; color: var(--text); }

/* Wheel time picker — two scrollable columns (hour, minute) that snap to a
   fixed center band, the same feel as an iOS UIDatePicker in wheel mode.
   Scroll-snap does the physical snapping; JS (see admin.js makeWheel) only
   needs to read where a scroll settled and mark that item selected. */
.wheel-picker { position: relative; display: flex; align-items: center; height: 120px; }
.wheel-col {
  height: 120px; width: 44px; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch; touch-action: pan-y;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 40px; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; font-family: var(--mono); font-size: 17px; color: var(--faint);
}
.wheel-item.selected { color: var(--text); font-weight: 600; }
.wheel-sep { color: var(--faint); font-family: var(--mono); font-size: 17px; padding: 0 2px; }
.wheel-highlight {
  position: absolute; left: 0; right: 0; top: 40px; height: 40px;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  pointer-events: none;
}

/* Below 560px the two-column scroll-snap wheel picker is finicky to hit
   accurately with a thumb (44px-wide columns nested inside a scrolling
   modal), so swap it for a native <input type="time"> there instead — the
   OS's own picker UI, guaranteed to work with touch. Same underlying
   since/until value either way; admin.js's logRangeParam reads from
   whichever one is actually visible. */
.logs-time-native { display: none; max-width: 110px; flex: none; }

@media (max-width: 560px) {
  #logs-history-controls { gap: 14px !important; }
  /* Force From / To / Apply-Clear onto their own row each, one at a time,
     rather than however many happen to fit at the current width. */
  #logs-history-controls > div { width: 100%; }
  .wheel-picker { display: none; }
  .logs-time-native { display: block; }
  .modal-head { padding: 14px 14px 0; }
  .modal-head h2 { font-size: 16px; }
}
