/* Staff console: platform administration (internal/web/adminplatform).
   Only classes prefixed "ap-" live here, so nothing in this file can restyle
   another feature's pages. */

/* Filter bars: a responsive grid of labelled controls. */
.ap-filters .field { margin-bottom: var(--sp-3); }
.ap-filter-grid { display: grid; gap: 0 var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Compact row-level action forms that sit inside table cells and cards. */
.ap-inline-form { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: flex-end; }
.ap-inline-form .field { margin-bottom: 0; }
.ap-inline-form input[type="text"] { min-width: 12rem; }

/* In-page section links on the member record. */
.ap-jump { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.ap-jump a { padding: var(--sp-1) var(--sp-3); border: 1px solid var(--border); border-radius: 999px; font-size: .88rem; text-decoration: none; background: var(--surface-raised); }
.ap-jump a:hover, .ap-jump a:focus-visible { border-color: var(--border-strong); text-decoration: underline; }

.ap-plain { list-style: none; padding: 0; margin: 0; }
.ap-plain > li + li { margin-top: var(--sp-1); }
.ap-plain-ol { padding-left: 1.4rem; margin: 0; }
.ap-normal { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ap-nowrap { white-space: nowrap; }
.ap-prewrap { white-space: pre-wrap; }

/* Category tree indentation. Depth comes from the taxonomy service. */
.ap-depth-1 { padding-left: calc(var(--sp-3) + 1.5rem); }
.ap-depth-2 { padding-left: calc(var(--sp-3) + 3rem); }
.ap-depth-3, .ap-depth-4, .ap-depth-5 { padding-left: calc(var(--sp-3) + 4.5rem); }
.ap-depth-1::before, .ap-depth-2::before, .ap-depth-3::before { content: "↳ "; color: var(--text-faint); }

/* Recorded JSON and error text. Wrapped rather than scrolled so a long
   value never hides the next column. */
.ap-json, .ap-error {
  font-family: var(--font-mono, ui-monospace, monospace); font-size: .8rem; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3); margin: 0; max-height: 22rem; overflow: auto;
}
.ap-error { max-height: 8rem; color: var(--err-700); }
.ap-audit td { min-width: 8rem; }
.ap-compact th, .ap-compact td { padding: var(--sp-2); font-size: .86rem; }

/* The emergency switch is visually distinct but its meaning is in the text. */
.ap-emergency { border-left: 4px solid var(--err-700); }

/* Report families. The heading names the family; the edge colour is a
   secondary cue, never the only one. */
.ap-report > h2 { display: flex; align-items: center; gap: var(--sp-2); }
.ap-report-confirmed > h2::before, .ap-report-reported > h2::before, .ap-report-engagement > h2::before {
  content: ""; width: .7rem; height: .7rem; border-radius: 2px; display: inline-block;
}
.ap-report-confirmed > h2::before { background: var(--ok-700); }
.ap-report-reported > h2::before { background: var(--gold-600); }
.ap-report-engagement > h2::before { background: var(--info-700); }
.ap-range { font-size: 1.25rem; }

@media (max-width: 560px) {
  .ap-inline-form { align-items: stretch; flex-direction: column; }
  .ap-inline-form input[type="text"] { min-width: 0; width: 100%; }
}
