/* Admin area (#/admin). Built only from the marketplace's tokens and
   components (styles.css, marketplace.css): white page, soft grey blocks with
   large corners, pill buttons, the teal eyebrow labels and the category pills,
   so the admin reads as the same product.

   First the pieces of particular tabs, then the frame (shared with My space,
   panel.js), the cards and the rest. */

/* ---------------------------------------------------------------- activity log */

.log-filters { display: grid; gap: 10px; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 12px; }
.log-filters > * { width: 100%; height: 38px; min-width: 0; }
.log-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.log-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.log-table th, .log-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.log-table th { font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-2); position: sticky; top: 0; }
.log-table tbody tr:last-child td { border-bottom: 0; }
.log-table .nowrap { white-space: nowrap; }
.log-table td.muted { font-size: 12px; font-variant-numeric: tabular-nums; }
.log-table .log-detail { min-width: 260px; max-width: 380px; overflow-wrap: anywhere; color: var(--text-2); }
.log-table td:first-child { font-variant-numeric: tabular-nums; color: var(--text-2); }
@media (max-width: 720px) {
  .log-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .log-filters input[type="search"] { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- settings forms, the queue's facts */

.redirect-uri { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.redirect-uri code { font-size: 13px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; }
.give-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: center; }
.give-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input-with-button { display: flex; gap: 8px; }
.input-with-button .input { flex: 1; min-width: 0; }
.textarea-cert { min-height: 130px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cert-box { display: grid; gap: 8px; }
.cert-info { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.cert-expired { color: var(--bad); }
.advanced summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.advanced .field { margin-top: 12px; }
@media (max-width: 640px) { .give-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---------------------------------------------------------------- catalogue */

.feat-pos { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 700; flex: none; }
.feat-hit .product-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.feat-hit .icon-tile span { font-size: 14px; }
.feat-copy { display: grid; gap: 1px; min-width: 0; flex: 1; text-align: left; }
.feat-copy b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-copy span { font-size: 12px; color: var(--text-3); }
.feat-actions { display: flex; gap: 6px; flex: none; }
.feat-picker { display: grid; gap: 8px; }
.feat-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.feat-hit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; color: var(--text); min-width: 0; }
.feat-hit:hover:not(:disabled) { border-color: var(--accent-border); }
.feat-hit:disabled { opacity: .45; cursor: not-allowed; }
.feat-add { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; flex: none; }
.tax-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tax-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 6px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; }
.tax-chip-curated { border-color: var(--accent-border); background: var(--accent-soft); }
.tax-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-size: 11.5px; display: grid; place-items: center; }
.tax-remove { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; }
.tax-remove:hover { background: var(--bad-soft); color: var(--bad); }
.tax-add { display: flex; gap: 8px; flex-wrap: wrap; }
.tax-add .input { flex: 1 1 200px; min-width: 0; }
@media (max-width: 640px) { .feat-actions { width: 100%; justify-content: flex-end; } }

/* ---------------------------------------------------------------- data */

.data-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.data-count { width: 110px; }
.data-confirm { width: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.danger-zone { padding: 18px; border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); border-radius: var(--radius); background: var(--bad-soft); }
.danger-zone h2 { color: var(--bad); }
.btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------- a check box with its label, the notice */

.check-row { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.textarea.notice-body { min-height: 220px; }

/* ---------------------------------------------------------------- page */

.admin-page { padding-block: 24px 56px; }
.admin-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 36px; align-items: start; }

/* ---------------------------------------------------------------- side nav */

.admin-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.admin-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-side-head .store-eyebrow { margin: 0; }
.admin-nav { display: grid; gap: 18px; }
.admin-nav-group { display: grid; gap: 2px; }
.admin-nav-label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 0 12px 6px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; border-radius: 999px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.admin-nav-item[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }
.admin-nav-item .pill-count { margin-left: auto; }
.admin-icon { width: 18px; height: 18px; flex: none; }
.admin-icon-sm { width: 14px; height: 14px; }

.pill-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- main */

.admin-main { display: grid; gap: 26px; min-width: 0; }

.admin-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.admin-section-head .store-eyebrow { margin-bottom: 8px; }
.admin-section-head h1 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.04em; }
.admin-section-sub { color: var(--text-2); font-size: 14px; margin: 8px 0 0; max-width: 68ch; }
.admin-section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-body { display: grid; gap: 20px; min-width: 0; }

/* Cards: the marketplace's soft grey block. */
.admin-card {
  background: var(--surface-2); border-radius: 18px; padding: 22px 24px;
  display: grid; gap: 16px; min-width: 0;
  /* Rows keep their own height: a card beside a taller one does not spread
     its content to fill the difference. */
  align-content: start;
}
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-card-copy { display: grid; gap: 4px; min-width: 0; flex: 1 1 280px; }
.admin-card-copy h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.admin-card-copy p { color: var(--text-2); font-size: 13px; margin: 0; max-width: 72ch; }
.admin-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-card-foot { display: flex; justify-content: center; }
.admin-card .input, .admin-card .select, .admin-card .textarea { background: var(--surface); }
.admin-card .field > label { font-size: 13px; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 20px; align-items: start; }
.admin-cols-form { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
/* Side-by-side cards of the same kind (Admin > Data) share one height, with
   their buttons on one line at the bottom. */
.admin-cols-even { align-items: stretch; }
.admin-cols-even > .admin-card { display: flex; flex-direction: column; }
.admin-cols-even > .admin-card > .queue-actions { margin-top: auto; }
/* Admin > Data: catalogue, configuration and demo data in one row. */
.data-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .data-cards { grid-template-columns: minmax(0, 1fr); } }
.admin-card-title { display: flex; align-items: center; gap: 10px; }
.admin-card-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.admin-card-badge .admin-icon { width: 16px; height: 16px; }

.admin-empty { text-align: center; padding: 34px 16px; display: grid; gap: 6px; justify-items: center; }
.admin-empty h3 { font-size: 16px; font-weight: 600; }
.admin-empty p { color: var(--text-2); font-size: 13px; margin: 0; max-width: 46ch; }

/* Pills: the category rail's pills, used for filters and language tabs. */
.admin-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-pills .category-pill { background: transparent; cursor: pointer; font-family: inherit; }
.admin-pills .category-pill[aria-selected='true'] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.admin-pills .category-pill .pill-count { background: var(--surface-2); color: var(--text-3); height: 18px; min-width: 18px; font-size: 10.5px; }
.admin-pills .category-pill[aria-selected='true'] .pill-count { background: var(--accent); color: var(--accent-text); }

/* ---------------------------------------------------------------- review queue */

.queue-pane {
  display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  background: var(--surface-2); border-radius: 18px; overflow: hidden; min-height: 460px;
}
.queue-pane-list { border-right: 1px solid var(--border); max-height: 72vh; overflow-y: auto; }
.queue-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.queue-row {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 14px; background: transparent; color: var(--text); cursor: pointer; font: inherit;
}
.queue-row:hover { background: var(--surface); }
.queue-row[aria-current='true'] { background: var(--surface); box-shadow: inset 3px 0 0 var(--netskope-blue); }
.queue-row .product-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.queue-row .icon-tile span { font-size: 14px; }
.queue-row-copy { display: grid; gap: 2px; min-width: 0; }
.queue-row-copy b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-row-meta { display: flex; gap: 6px; font-size: 12px; color: var(--text-3); }
.queue-row-flag { font-size: 11px; font-weight: 600; color: var(--bad); }

.queue-pane-detail { background: var(--surface); padding: 24px 26px; min-width: 0; }
.queue-detail { display: grid; gap: 18px; }
.queue-detail-head { display: flex; gap: 16px; align-items: flex-start; }
.queue-detail-head .product-logo { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.queue-detail-copy { display: grid; gap: 8px; min-width: 0; }
.queue-detail-copy h2 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.queue-detail-copy h2 a { color: var(--text); }
.queue-detail-copy .tagline { color: var(--text-2); margin: 0; }
.queue-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 14px 16px; background: var(--surface-2); border-radius: 14px; }
.queue-facts > div, .queue-link { display: grid; gap: 2px; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.queue-links { display: grid; gap: 10px; }
.queue-link a { display: inline-flex; align-items: center; gap: 6px; }
.queue-zip summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.queue-zip .entries { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.queue-checklist { display: grid; gap: 8px; }
.queue-checklist ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; }
.queue-checklist li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.queue-checklist li .admin-icon { color: var(--good); }
.queue-detail .queue-actions { align-items: center; }
.queue-detail .queue-actions .spacer { flex: 1; }

/* ---------------------------------------------------------------- activity log */

.admin-card-flush { padding: 20px 0 16px; }
.admin-card-flush > .admin-card-head, .admin-card-flush > .log-filters { padding-inline: 24px; }
.admin-page .log-filters { margin: 0; }
.admin-page .log-scroll { border: 0; border-radius: 0; background: var(--surface); border-block: 1px solid var(--border); }
.admin-page .log-table th { background: var(--surface); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.admin-page .log-table th:first-child, .admin-page .log-table td:first-child { padding-left: 24px; }
.admin-page .log-table td { vertical-align: middle; }
.log-time { color: var(--text-2); }
.log-person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.log-person-name { overflow-wrap: anywhere; }
.avatar-sm { width: 26px; height: 26px; font-size: 10px; box-shadow: none; flex: none; }
.log-item { font-weight: 500; }

/* One colour per kind of activity, from the chip palette. */
.act { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.act-auth { background: var(--accent-soft); color: var(--accent); }
.act-download { background: var(--good-soft); color: var(--good); }
.act-rating { background: var(--warn-soft); color: var(--warn); }
.act-submission { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.act-admin { background: var(--bad-soft); color: var(--bad); }

/* ---------------------------------------------------------------- catalogue */

.feat-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.feat-slot {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px; display: grid; gap: 10px; justify-items: start; min-width: 0; cursor: grab;
}
.feat-slot.is-dragging { opacity: .5; }
.feat-slot.is-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.feat-slot-top { display: flex; justify-content: space-between; width: 100%; color: var(--text-3); }
.feat-slot .product-logo { width: 48px; height: 48px; border-radius: 12px; }
.feat-slot .feat-copy { width: 100%; }
.feat-slot .feat-actions { display: flex; gap: 4px; }
.feat-slot .btn-icon { width: 30px; }
.feat-slot-empty { cursor: default; border-style: dashed; background: transparent; place-content: center; justify-items: center; color: var(--text-3); font-size: 13px; min-height: 180px; }
.feat-picker { display: grid; gap: 10px; }
.admin-page .feat-results { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.admin-page .feat-hit { border-radius: 14px; }

.admin-table-wrap { position: relative; background: var(--surface); border-radius: 14px; max-width: 100%; min-width: 0; overflow-x: auto; }
.admin-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.admin-page .input, .admin-page .select { min-width: 0; max-width: 100%; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 600; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .row-action { text-align: right; width: 1%; white-space: nowrap; padding-block: 4px; }
.admin-table .muted { font-size: 12.5px; }

/* Tags and categories: inputs sized to what they hold, not to the card. */
.admin-page .tax-add { align-items: center; }
.admin-page .tax-add .input { flex: 0 1 220px; height: 36px; padding-block: 0; font-size: 13.5px; }
.admin-page .admin-card > .input[type='search'] { max-width: 280px; height: 36px; padding-block: 0; font-size: 13.5px; }

/* ---------------------------------------------------------------- data */

.admin-page .danger-zone { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); padding: 22px 24px; }
.admin-page .danger-zone .admin-card-copy h2 { color: var(--bad); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; background: var(--surface); border-radius: 14px; }
.danger-copy { display: grid; gap: 2px; flex: 1 1 320px; min-width: 0; }
.danger-copy h3 { font-size: 14px; font-weight: 600; }
.danger-copy p { font-size: 12.5px; color: var(--text-2); margin: 0; }
.danger-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- identity */

.idp-status { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 18px; background: var(--surface-2); }
.idp-status > div { display: grid; gap: 2px; }
.idp-status b { font-size: 15px; }
.idp-status span:not(.idp-dot) { font-size: 13px; color: var(--text-2); }
.idp-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--text-3); box-shadow: 0 0 0 4px var(--surface); }
.idp-status.is-on { background: var(--good-soft); }
.idp-status.is-on .idp-dot { background: var(--good); }
.admin-page .give-row { grid-template-columns: 170px minmax(0, 1fr); }
.admin-page .redirect-uri code { background: var(--surface); }

/* ---------------------------------------------------------------- database */

.db-status .db-since { font-size: 12px; color: var(--text-3); }
.db-status.is-ready { background: var(--good-soft); }
.db-status.is-ready .idp-dot { background: var(--good); }
.db-status.is-connecting { background: var(--warn-soft); }
.db-status.is-connecting .idp-dot { background: var(--warn); }
.db-status.is-error { background: var(--bad-soft); }
.db-status.is-error .idp-dot { background: var(--bad); }
.db-check { display: grid; gap: 3px; overflow-wrap: anywhere; }
.db-check .db-problem { color: var(--bad); font-weight: 600; }
.db-check .db-warning { color: var(--text); font-weight: 600; }
.admin-card .row2 { align-items: start; }
.db-row { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.db-copy { align-items: flex-start; font-weight: 400; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.db-copy input { margin-top: 3px; }
.db-kpis { margin-bottom: 14px; }

/* ---------------------------------------------------------------- disclaimer */

.notice-preview-box { background: var(--surface); border-radius: 18px; padding: 24px 26px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.notice-preview-box .disclaimer-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.notice-preview-box .disclaimer-body { max-height: none; }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 1100px) {
  .feat-slots { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .admin-cols-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .admin-side { position: static; }
  .admin-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .admin-nav-group { display: contents; }
  .admin-nav-label { display: none; }
  .admin-nav-item { flex: none; border: 1px solid var(--border); }
  .queue-pane { grid-template-columns: minmax(0, 1fr); }
  .queue-pane-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 280px; }
}
@media (max-width: 640px) {
  .admin-card { padding: 18px 16px; }
  .feat-slots { grid-template-columns: minmax(0, 1fr); }
  .feat-slot-empty { min-height: 52px; grid-template-columns: 24px minmax(0, 1fr); justify-items: start; gap: 10px; }
  .feat-slot-empty .feat-pos { position: static; }
  .admin-card-flush > .admin-card-head, .admin-card-flush > .log-filters { padding-inline: 16px; }
  .queue-pane-detail { padding: 18px 16px; }
  .admin-page .give-row { grid-template-columns: minmax(0, 1fr); }
}

/* Activity log retention: what the log holds now, then the limits */
.retention-usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi.kpi-compact { min-height: 0; grid-template-rows: none; align-content: start; padding: 18px 20px; }
.kpi-compact .kpi-value { font-size: clamp(24px, 2.2vw, 30px); }
.retention-bar { height: 6px; margin-top: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.retention-bar span { display: block; height: 100%; border-radius: inherit; background: var(--chart); }
/* The two fields and Save in one row: label, box and range stack in columns
   (the field wrappers step aside), so Save lines up with the boxes. */
.retention-fields { display: grid; grid-auto-flow: column; grid-template-rows: auto auto auto; justify-content: start; align-items: center; gap: 6px 40px; }
.retention-field { display: contents; }
.retention-field label { font-size: 14px; font-weight: 600; }
.retention-field .hint { font-size: 12.5px; color: var(--text-3); }
.retention-save { grid-row: 2; }
.retention-last { margin: 0; font-size: 12.5px; color: var(--text-3); }
.input-unit { display: flex; align-items: center; gap: 10px; }
.input-unit .input { width: 110px; font-variant-numeric: tabular-nums; }
.input-unit span { color: var(--text-2); font-size: 13px; }
.retention-card .err:empty { display: none; }
.retention-card .err { margin: 0; color: var(--bad); font-size: 13px; }
@media (max-width: 900px) { .retention-usage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .retention-fields { grid-auto-flow: row; grid-template-rows: none; }
  .retention-field .hint { margin-bottom: 10px; }
  .retention-save { grid-row: auto; justify-self: start; }
}

/* ---------------------------------------------------------------- statistics */

/* The one chart colour. Brand teal, stepped so it passes the palette checks
   (saturation, lightness band, 3:1 against the surface) in each theme. */
:root { --chart: #0088a3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --chart: #139fc6; } }
:root[data-theme='dark'] { --chart: #139fc6; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  position: relative; display: grid; gap: 4px; grid-template-rows: auto auto auto 1fr;
  padding: 18px 20px 0; min-height: 176px;
  background: var(--surface-2); border-radius: 18px; color: var(--text);
}
a.kpi:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--accent-border); }
.kpi-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi-value { font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.kpi-sub { font-size: 12.5px; color: var(--text-2); min-height: 18px; }
.kpi-delta b { font-weight: 600; }
.kpi-delta-up b { color: var(--good); }
.kpi-delta-down b { color: var(--bad); }
.spark-wrap { position: relative; margin: auto 0 16px; height: 44px; }
.spark { display: block; width: 100%; height: 100%; }
.spark-line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--chart); opacity: .1; }
.spark-dot { position: absolute; right: 0; width: 8px; height: 8px; margin: -4px -4px 0 0; border-radius: 50%; background: var(--chart); box-shadow: 0 0 0 2px var(--surface-2); }

.chart-card .admin-pills { margin-top: -4px; }
.chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: 220px auto; column-gap: 8px; }
.chart-y { position: relative; }
.chart-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; border-bottom: 1px solid var(--border-strong); outline: none; }
.chart-plot:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 6px; }
.chart-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.chart-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.chart-bar { display: block; width: min(100%, 24px); background: var(--chart); border-radius: 4px 4px 0 0; transition: filter 120ms ease; }
.chart-col.is-active { background: color-mix(in srgb, var(--chart) 8%, transparent); border-radius: 6px 6px 0 0; }
.chart-col.is-active .chart-bar { filter: brightness(1.12); }
.chart-tip {
  position: absolute; top: 4px; left: var(--x, 50%); transform: translateX(var(--shift, -50%));
  display: grid; gap: 1px; padding: 8px 12px; white-space: nowrap; pointer-events: none; z-index: 2;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.chart-tip[hidden] { display: none; }
.chart-tip b { font-size: 16px; font-weight: 600; }
.chart-tip span { font-size: 12px; color: var(--text-2); }
.chart-x { display: flex; gap: 2px; padding-top: 6px; }
.chart-x span { flex: 1; font-size: 11px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: visible; }
.chart-table summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.chart-table .admin-table-wrap { margin-top: 10px; max-height: 280px; overflow-y: auto; }

.stats-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.stats-stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-list li { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-label { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; }
.bar-fill { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-list li { display: grid; grid-template-columns: 20px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.top-list li:hover { background: var(--surface); }
.top-rank { font-size: 13px; font-weight: 600; color: var(--text-3); text-align: center; }
.top-list .product-logo { width: 36px; height: 36px; border-radius: 10px; }
.top-list .icon-tile span { font-size: 12px; }
.top-name { display: grid; min-width: 0; color: var(--text); }
.top-name:hover { text-decoration: none; }
.top-name b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-name span { font-size: 12px; color: var(--text-3); }
.top-value { display: grid; justify-items: end; }
.top-value b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.top-value span { font-size: 11px; color: var(--text-3); }

@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .kpi-row { grid-template-columns: minmax(0, 1fr); }
  .kpi { min-height: 150px; }
  .chart { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: 180px auto; }
  .chart-x span:not(:empty) { font-size: 10px; }
}

/* Deleting a category that has entries: where they move. */
.cat-move { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--border)); }
.cat-move p { margin: 0; font-size: 13.5px; }
.cat-move-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cat-move-row .select { min-width: 180px; }
.cat-removed { display: grid; gap: 8px; }
.cat-restore { cursor: pointer; gap: 6px; padding: 0 12px; color: var(--text-2); font: inherit; font-size: 13px; }
.cat-restore:hover { border-color: var(--accent-border); color: var(--accent); }

/* Renaming a category or a type: a box per name under the table. */
.row-buttons { display: inline-flex; gap: 4px; justify-content: flex-end; }
.cat-rename { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft, var(--surface)); border: 1px solid var(--accent-border, var(--border)); }
.cat-rename p { margin: 0; font-size: 13.5px; }
.rename-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rename-field { display: grid; gap: 4px; min-width: 0; }
.rename-field .input { height: 36px; padding-block: 0; font-size: 13.5px; width: 100%; }

/* Types */
.type-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; align-items: center; }
.type-add .input, .type-add .select { height: 36px; padding-block: 0; font-size: 13.5px; width: 100%; }
.type-singular { font-weight: 400; }

/* Sessions */
.sessions-card .admin-table-wrap { border-radius: 0; background: var(--surface); border-block: 1px solid var(--border); }
.sessions-card .admin-table th:first-child, .sessions-card .admin-table td:first-child { padding-left: 24px; }
.sessions-card .admin-table th:last-child, .sessions-card .admin-table td:last-child { padding-right: 24px; }
.sessions-card .admin-table td { vertical-align: middle; }
.session-who { display: grid; min-width: 0; }
.session-who b { font-weight: 600; }
.session-who .muted { font-size: 12px; overflow-wrap: anywhere; }
.sessions-card .admin-empty { padding-inline: 24px; }
@media (max-width: 760px) {
  .sessions-table thead { display: none; }
  .sessions-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .sessions-table td { border: 0; padding: 0 !important; }
  .sessions-table td:nth-child(3) { display: none; }
  .sessions-table td.row-action { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}
.sessions-filter { padding: 0 24px; }
.sessions-filter .input { max-width: 320px; height: 36px; padding-block: 0; font-size: 13.5px; }
.sessions-nomatch { margin: 0; padding: 4px 24px 0; }
@media (max-width: 640px) { .sessions-filter, .sessions-nomatch { padding-inline: 16px; } }
.sessions-table tr[hidden] { display: none !important; }

/* Skills folder */
.skills-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.skills-tools .input { flex: 1 1 240px; }
.skills-tools .select { height: 36px; padding-block: 0; font-size: 13.5px; width: auto; }
.skills-table td { vertical-align: middle; }
.skills-table td.num, .skills-table td:nth-child(5) { white-space: nowrap; }
.skill-file { display: grid; min-width: 0; }
.skill-file a, .skill-file b { font-weight: 600; overflow-wrap: anywhere; }
.skill-id { font-size: 11.5px; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); overflow-wrap: anywhere; }
.skill-entry { font-weight: 500; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.skill-toggle { white-space: nowrap; }
.skills-table tr.skill-contents td { background: var(--surface); padding-block: 8px; }
.skill-entries { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 2px; font-size: 12.5px; }
.skill-entries li { display: flex; gap: 10px; justify-content: space-between; max-width: 560px; }
.skill-entries code { overflow-wrap: anywhere; }
.skills-table tr[hidden] { display: none !important; }
/* Four boxes in one row: size, files, free space and the limit. */
.retention-usage.skills-usage { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .retention-usage.skills-usage { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .retention-usage.skills-usage { grid-template-columns: minmax(0, 1fr); } }
.skills-limit-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 2px; }
.skills-limit .input-unit { gap: 8px; }
.skills-limit .input-unit .input { width: 96px; height: 38px; padding-block: 0; }
.skills-limit .err:empty { display: none; }
.skills-limit .err { margin: 0; color: var(--bad); font-size: 12.5px; }
.skills-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 24px 0; }
.skills-pager[hidden] { display: none; }
.skills-pager-info { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.retention-bar.is-over span { background: var(--bad); }
.skills-safety { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 4px 24px 0; }
.skills-safety .admin-icon { flex: none; margin-top: 2px; }
@media (max-width: 760px) {
  .skills-table thead { display: none; }
  .skills-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .skills-table td { border: 0; padding: 0 !important; }
  .skills-table td.row-action { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .skills-table tr.skill-contents { display: block; }
  .skills-safety { padding-inline: 16px; }
}

/* Statistics: the period filter, at the right of the heading */
.admin-section-actions:has(> .stats-period) { margin-left: auto; align-items: flex-start; justify-content: flex-end; }
.stats-report { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.stats-report-link {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.stats-report-link:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.stats-report-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stats-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.stats-presets { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.stats-preset {
  height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--text-2); font-family: inherit; font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.stats-preset:hover { color: var(--accent); }
.stats-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stats-preset[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); }
.stats-custom { display: flex; align-items: center; gap: 6px; padding-left: 2px; border-radius: 999px; }
.stats-custom.is-active { background: var(--accent-soft); }
.stats-custom .input.stats-days { width: 72px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
.stats-custom .input.stats-days::-webkit-inner-spin-button, .stats-custom .input.stats-days::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stats-custom .muted { font-size: 12px; padding-right: 8px; }
.stats-days-err { flex-basis: 100%; text-align: right; color: var(--bad); font-size: 12.5px; }
.stats-days-err:empty { display: none; }
@media (max-width: 640px) {
  .admin-section-actions:has(> .stats-period) { margin-left: 0; width: 100%; justify-content: flex-start; }
  .stats-period { justify-content: flex-start; }
  .stats-presets { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; border-radius: 20px; }
  .stats-custom { grid-column: 1 / -1; justify-content: center; }
  .stats-preset { padding: 0 6px; font-size: 12px; }
  .stats-days-err { text-align: left; }
}
.stats-retention { margin: 0; }
.admin-body.is-loading .kpi-row, .admin-body.is-loading .chart-card, .admin-body.is-loading .stats-cols { opacity: .45; transition: opacity 120ms ease; }
.chart-dense .chart-cols, .chart-dense .chart-x { gap: 1px; }
.chart-dense .chart-bar { border-radius: 2px 2px 0 0; }

@media (max-width: 720px) { .db-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- medals */

.medal-toggle { align-items: flex-start; font-weight: 400; margin-bottom: 8px; }
.medal-toggle input { margin-top: 3px; }
.medal-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 8px; }
.medal-sub { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.medal-table td { vertical-align: middle; }
.medal-table .field { margin: 0; justify-items: end; }
.medal-input { width: 110px; text-align: right; }
.medal-select { min-width: 120px; }
.medal-dist { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.medal-previewing { box-shadow: inset 0 0 0 2px var(--accent-border); }
.medal-people td { vertical-align: middle; }
.medal-people th, .medal-people td { padding-inline: 8px; }
.medal-people td:first-child { max-width: 240px; overflow-wrap: anywhere; }
.medal-people .medal-select { min-width: 0; width: 120px; }
.medal-people tr.is-manual td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.btn-link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 1000px) { .medal-grid { grid-template-columns: minmax(0, 1fr); } .medal-dist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .medal-dist { grid-template-columns: repeat(2, minmax(0, 1fr)); } .medal-people { font-size: 12.5px; } }

.admin-card .admin-table-wrap:has(.medal-people) { overflow-x: auto; }

/* Special medals: the list, the form with the icon grid, chips in the people table. */
.special-list { list-style: none; margin: 0; padding: 0; display: grid; }
.special-list > li { padding: 10px 0; border-top: 1px solid var(--border); }
.special-list > li:first-child { border-top: 0; }
.special-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.special-row .medal { font-size: 14px; }
.special-row .medal-icon { width: 28px; height: 28px; }
.special-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.special-form { display: grid; gap: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.special-form .field { margin: 0; }
.special-icons { max-height: 216px; margin-top: 6px; }
.special-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 150px; }
.special-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 2px 1px 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 12px; white-space: nowrap; }
.special-remove { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; width: 20px; height: 20px; border-radius: 50%; }
.special-remove:hover:not(:disabled) { color: var(--text); background: var(--surface-3, var(--border)); }
.special-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.medal-people .special-add { width: 110px; }

/* ---------------------------------------------------------- server status */

.status-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 20px 24px; border-radius: 20px; background: var(--surface-2);
  border: 1px solid var(--border);
}
.status-hero.is-ok { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, var(--border)); }
.status-hero.is-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.status-hero.is-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.status-hero-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: var(--text-3); }
.status-hero-icon .admin-icon { width: 26px; height: 26px; stroke-width: 2.5; }
.status-hero.is-ok .status-hero-icon { background: var(--good); }
.status-hero.is-warn .status-hero-icon { background: var(--warn); }
.status-hero.is-bad .status-hero-icon { background: var(--bad); }
.status-hero-copy h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.status-hero-copy p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.status-facts { display: flex; gap: 22px; margin: 0; }
.status-facts div { display: grid; gap: 2px; }
.status-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.status-facts dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The five parts in one row. */
.status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
/* A tile per part: green when it is fine, red when it is not (amber for
   "have a look"); a word and an icon always say it too. */
.status-tile {
  display: grid; align-content: start; gap: 8px; min-height: 132px; min-width: 0;
  padding: 14px 14px 16px; border-radius: 16px; color: var(--text);
  background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 45%, var(--border));
  transition: box-shadow .12s, transform .12s;
}
.status-tile:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 8%, transparent); }
.status-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-tile.is-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.status-tile.is-bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
.status-tile-head { display: flex; align-items: flex-start; gap: 6px; color: var(--text-2); }
.status-tile-head > .admin-icon { width: 16px; height: 16px; margin-top: 1px; }
.status-tile-head h2 { margin: 0; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--text-2); flex: 1; min-width: 0; }
.status-tile-value { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.status-tile-detail { font-size: 12.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }

.status-pill { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: #fff; flex: none; }
.status-pill .admin-icon { width: 13px; height: 13px; stroke-width: 3; }
.status-pill.is-ok { background: var(--good); color: var(--status-good-text); }
.status-pill.is-warn { background: var(--warn); color: var(--status-warn-text); }
.status-pill.is-bad { background: var(--status-bad-bg); color: var(--status-bad-text); }

.status-meter { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); overflow: hidden; }
.status-meter span { display: block; height: 100%; border-radius: inherit; background: var(--good); }
.status-meter.is-warn span { background: var(--warn); }
.status-meter.is-bad span { background: var(--bad); }

.status-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.status-type { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.status-type-name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.status-type-total { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.status-type .status-meter { height: 6px; background: var(--surface-2); }
.status-type .status-meter span { background: var(--chart); }
.status-type-split { margin: 0; display: grid; gap: 3px; font-size: 12.5px; }
.status-type-split div { display: flex; justify-content: space-between; gap: 8px; }
.status-type-split dt { color: var(--text-2); }
.status-type-split dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.status-type-demo { font-size: 12px; color: var(--text-3); }

@media (max-width: 1100px) { .status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .status-hero { grid-template-columns: auto minmax(0, 1fr); }
  .status-facts { grid-column: 1 / -1; flex-wrap: wrap; gap: 12px 22px; }
}

/* Server status: whether a newer release is out, and how to install it. */
.status-update-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.status-update-line.is-current { color: var(--text-2); }
.status-update-line.is-current .admin-icon { color: var(--good); }
.status-update {
  display: grid; gap: 12px; padding: 18px 20px; border-radius: 18px;
  border: 1px solid var(--accent-border); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface));
}
.status-update-head { display: flex; align-items: center; gap: 14px; }
.status-update-head h2 { margin: 0; font-size: 18px; }
.status-update-head p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.status-update-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; background: var(--accent); color: var(--accent-text);
}
.status-update-cmd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.status-update-cmd code { font-size: 14px; overflow-wrap: anywhere; }
.status-update .hint { margin: 0; }
.status-update-notes summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.status-update-notes .prose { margin-top: 10px; max-height: 320px; overflow: auto; font-size: 14px; }
.status-update-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; font-size: 14px; }
