/* ServerGuard console — the few rules ServerMod's dashboard.css has no
   equivalent for. Loaded after it. Every selector carries an `sg-` class, and
   nothing here restyles a ServerMod class except beneath an `sg-` marker the
   console's own markup put there, so dashboard.css can be re-copied wholesale
   without reading this file. Colours are ServerMod's tokens only,
   so light mode follows for free. */

/* Ids, counts: a snowflake is read digit by digit. */
.sg-mono { font-family: var(--sm-font-mono); }

/* The audit log's `detail` column: key value, key value. */
.sg-kv { display: inline-block; margin-right: 0.75rem; white-space: nowrap; }

/* A sentence under a panel heading, before its table. When it is the last
   thing in the panel (a test result, a "not run" line) it needs the bottom
   padding the table would have brought. */
.sg-panel-note { margin: 0; padding: 0.75rem 1.1rem 0; }
.sg-panel-note:last-child { padding-bottom: 0.9rem; }

/* The audit log's filter row. Wraps on a phone rather than scrolling. */
.sg-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--sm-border); }
.sg-filter { display: flex; flex-direction: column; gap: 0.25rem; min-width: 11rem; flex: 1 1 11rem; margin: 0; }
.sg-filter-actions { display: flex; gap: 0.5rem; }

/* Newer / Older, under the table. */
.sg-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.1rem; border-top: 1px solid var(--sm-border); flex-wrap: wrap; }
.sg-pager-links { display: flex; gap: 0.5rem; }

/* A panel's body when it is prose and a form rather than a table. */
.sg-panel-body { padding: 0.9rem 1.1rem 1.1rem; }

/* A server: its icon beside its name and id, on the Servers list. */
.sg-guild { display: inline-flex; align-items: center; gap: 0.6rem; }
.sg-guild-icon { width: 28px; height: 28px; flex-shrink: 0; object-fit: cover; border-radius: 0; }
.sg-guild-icon-empty { display: inline-grid; place-items: center; background: var(--sm-bg-deep); border: 1px solid var(--sm-border); color: var(--sm-text-dim); font-size: 0.8rem; }

/* Look up a person: the account's face, name and standing, above its records. */
.sg-profile { display: flex; gap: 1rem; align-items: flex-start; }
.sg-profile-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sg-profile-name { font-size: 1.15rem; font-weight: 600; }

/* A report's decision row: the note takes what the two buttons leave. */
.sg-grow { width: 100%; }
.sg-note { flex: 1 1 12rem; min-width: 10rem; }

/* A filter field that takes the spare width. */
.sg-filter.sg-wide { flex: 3 1 18rem; }

/* A keyword pack: one per block, a rule between them. */
.sg-pack + .sg-pack { border-top: 1px solid var(--sm-border); }

/* The alerts inbox: who the alert is about, at the top of the pane. */
.main .sg-account-card { display: flex; gap: 0.9rem; align-items: center; }
.sg-account-text { min-width: 0; }
.sg-account-handle { color: var(--sm-text-muted); font-size: 0.9rem; }
.sg-avatar-blank { display: inline-grid; place-items: center; background: var(--sm-bg-deep); border: 1px solid var(--sm-border); color: var(--sm-text-dim); }

/* Why an alert is Critical or High, under its pill. */
.sg-why { margin: 0.35rem 0 0; font-size: 0.85rem; }
.sg-why-critical { color: var(--sm-danger-text); }
.sg-why-high { color: var(--sm-warning-text); }

/* A table row that opens something: the whole row is the link. */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover > td { background: var(--sm-bg-hover); }
tr[data-href]:focus-visible { outline: 2px solid var(--sm-accent); outline-offset: -2px; }

/* Configure → Servers → a server: its escalation rules (utils/guildEscalations.js). */
.sg-rule-list { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--sm-border); }
.sg-rule-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--sm-border); }
.sg-rule-row:last-child { border-bottom: 0; }
.sg-rule-label { min-width: 0; overflow-wrap: anywhere; font-size: 0.88rem; }
.sg-rule-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

/* Configure → Servers: the network-bans badge with its one-click switch. */
.sg-net-cell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }

/* An alert's type: a squared tile, one icon and colour per watcher, in the
   inbox list, its item pane and the history. Non-status colours on purpose —
   the alert scheme (red, orange, green, blue, grey) is the pill's. */
.sg-kind { display: inline-grid; place-items: center; flex-shrink: 0; width: 1.75rem; height: 1.75rem; font-size: 0.8rem; color: var(--sm-kind, var(--sm-text-muted)); background: color-mix(in srgb, var(--sm-kind, var(--sm-text-muted)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--sm-kind, var(--sm-text-muted)) 35%, transparent); }
.sg-kind-lg { width: 2.1rem; height: 2.1rem; font-size: 0.95rem; }
.sg-kind-message { --sm-kind: var(--sm-accent); }
.sg-kind-link { --sm-kind: var(--sm-accent-cyan); }
.sg-kind-member { --sm-kind: var(--sm-tier-gold); }
.sg-kind-media { --sm-kind: var(--sm-tier-diamond); }
.sg-kind-sticker { --sm-kind: var(--sm-tier-bronze); }
.sg-kind-cell { display: inline-flex; align-items: flex-start; gap: 0.6rem; }

/* The inbox's filter: a disclosure under the view chips, its fields in two
   columns (one on a phone), then one removable chip per filter in use. */
.sg-inbox-filters { padding: 0.5rem 1rem 0; }
.sg-inbox-filters > summary { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; font-size: 0.8rem; color: var(--sm-text-muted); list-style: none; min-height: 2rem; }
.sg-inbox-filters > summary::-webkit-details-marker { display: none; }
.sg-inbox-filters > summary:hover, .sg-inbox-filters[open] > summary { color: var(--sm-text); }
.sg-inbox-filters > summary:focus-visible { outline: 2px solid var(--sm-accent); outline-offset: 2px; }
.sg-filter-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 0.25rem; font-size: 0.7rem; font-family: var(--sm-font-mono); color: var(--sm-accent-fg); background: var(--sm-accent); }
.sg-inbox-filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.6rem; padding: 0.4rem 0 0.6rem; }
.sg-inbox-filter { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; margin: 0; }
.sg-inbox-filter .form-select { min-width: 0; text-overflow: ellipsis; }
.sg-inbox-filter-actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; }
@media (max-width: 420px) { .sg-inbox-filter-form { grid-template-columns: minmax(0, 1fr); } }
.sg-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding: 0.4rem 1rem 0.2rem; }
.sg-filter-chip { display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; min-height: 1.75rem; padding: 0 0.55rem; font-size: 0.76rem; color: var(--sm-text); background: var(--sm-pill-bg); border: 1px solid var(--sm-pill-border); text-decoration: none; }
.sg-filter-chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-filter-chip i { font-size: 0.7rem; color: var(--sm-text-dim); }
.sg-filter-chip:hover { background: var(--sm-bg-hover); }
.sg-filter-chip:hover i { color: var(--sm-danger); }
.sg-filter-clear { font-size: 0.76rem; color: var(--sm-text-muted); }

/* Configure → Servers: quick views and a search above the list. */
.sg-list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--sm-border); }
.sg-list-tools .inbox-chips { flex: 1 1 22rem; }
.sg-list-search { flex: 0 1 18rem; min-width: 12rem; margin: 0; }
.sg-chip-count { margin-left: 0.35rem; font-family: var(--sm-font-mono); font-size: 0.72rem; color: var(--sm-text-dim); }
/* `.main .btn-sm` sets a 2.25rem floor and a 5.5rem minimum width, so this
   needs the same specificity to be smaller than the small button. */
.main .sg-btn-xs { min-height: 0; min-width: 0; padding: 0.1rem 0.5rem; font-size: 0.74rem; line-height: 1.4; }

/* One server: where it stands, above its forms. Wraps to two or one column. */
.sg-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1px; margin-bottom: 1rem; background: var(--sm-border); border: 1px solid var(--sm-border); }
.sg-summary-item { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.7rem 0.9rem; background: var(--sm-bg-raised); min-width: 0; }

/* An alert's commission-scam profile indicators (console/pages/alerts.js). */
.sg-indicators { margin: 0 0 0.5rem; padding-left: 1.1rem; font-size: 0.86rem; }
.sg-indicators li { margin-bottom: 0.15rem; }

/* ---- UI audit 2026-11-14 ------------------------------------------------- */

/* Stacked panels. dashboard.css gives `.ov-panel` no bottom margin (Overview
   lays its panels out in a grid with a gap), so cards that follow one another
   down a page touched, and a panel head read as a section row of the table
   above it. ovPanel() (console/html.js) marks every console panel `sg-panel`;
   one panel after another gets the gap the grid would have given. */
.main > .sg-panel + .sg-panel { margin-top: 1rem; }

/* A column worth having only on a wide screen: hidden under 768px, where the
   sidebar folds and a six-column table ran off a phone inside a scroll region
   with nothing to say so. On the <th> (tableHead's className) and its <td>s.
   Paired with the shared `sm-col-wide` (WIDE_COL in console/html.js), which
   keeps the column out of dashboard.css's phone table floor. */
@media (max-width: 767.98px) { .main .sg-col-md { display: none; } }

/* A link in a table cell or a line of text. dashboard.css paints `.main a`
   in the muted grey that `.muted` uses, so a name that opens Look up looked
   like a label beside brighter plain text. The accent cyan it already turns on
   hover, and an underline on hover so hovering still says something. */
.main .sg-link { color: var(--sm-accent-cyan); }
.main .sg-link:hover, .main .sg-link:focus-visible { text-decoration: underline; }

/* Overview on a phone: dashboard.css moves `.ov-side` above the main column
   (ServerMod's side column is the summary). Here the side column is the
   component table and the main column is the queue, which comes first. */
.main .ov-cols > .sg-side-after { order: 0; }

/* Report rows in the Reports queue: the same kind tile as the alerts inbox,
   in the report colour, so the two queues' rows line up. */
.sg-kind-report { --sm-kind: var(--sm-danger); }

/* The quick-view chips above a table when there is no search beside them. */
.sg-chip-row { padding: 0.75rem 1.1rem 0; }

/* The topbar on a phone: dashboard.css hides `.brand` under 768px and shows
   `.topbar-server-home` in its place (ServerMod's server icon). The console
   has no server, so the mark there is ServerGuard's own, and the page is still
   named by the title line below the bar. */
.sg-topbar-mark .topbar-server-icon { object-fit: contain; }

/* The audit log's key: value pairs stay on one line on a desk; on a phone a
   120-character value made the Detail column 800px wide, so there they wrap. */
@media (max-width: 767.98px) { .sg-kv { display: block; white-space: normal; margin-right: 0; min-width: 12rem; } }

/* A row's action buttons: side by side, and on a phone one above the other,
   so the actions column (nowrap, by the shared sm-col-actions) does not take
   two buttons' width out of a 364px pane. */
.sg-row-actions { display: inline-flex; gap: 0.5rem; justify-content: flex-end; }
@media (max-width: 767.98px) { .sg-row-actions { flex-direction: column; align-items: flex-end; } }

/* Four KPI tiles: dashboard.css's phone strip fits three across, which left
   the fourth alone on a second row. Two by two instead. */
@media (max-width: 575.98px) { .main .stats-figures.sg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
