/* Oversight.css - Corporate > Quality > Oversight (TLP-1453; one page since TLP-1455).
   The deck's shape: the notices over ONE panel that fills the tab and scrolls its own rows
   (Panel.css's one-panel rule, as Compliance & Safety). The shared organisms do the layout;
   this file owns only the module's own pieces, every value from design-tokens.css.
   Gap-only spacing; no external margins. */

/* The notices about what could not be read: nothing to say, nothing drawn (no stray gap). */
.oversight-notices:empty {
    display: none;
}

/* The figures, then the grid they summarise, in the panel's one scrolling body. The body is
   a scroll box flush with its content and clips whatever leaves it, so the stack keeps a little
   headroom: the shared card's 2px lift on hover, and its shadow, stay inside the box. */
.oversight-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-top: var(--space-1);
}

/* The lit figure: the grid below is its rows. The house's selected look, the primary tint
   and a one-pixel ring, so it reads lit in light and dark alike. */
.oversight-cards .kpi-card.oversight-card--active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

/* The nine cards sit above the table they summarise on ONE row (PO, 2026-10-21): narrow,
   compact cards -- a smaller figure and padding -- nine across on a desktop, five on a desk
   tablet, two on a phone. Scoped under the module root, never the organism's bare class. */
.oversight-cards .kpi-card-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: var(--space-2);
}

.oversight-cards .kpi-card {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
}

.oversight-cards .kpi-card-value {
    font-size: var(--text-xl);
}

@media (max-width: 1024px) {
    .oversight-cards .kpi-card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .oversight-cards .kpi-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* The roll-up's numbers line up: tabular figures, right-aligned by the column. */
.oversight-rollup .table-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* A count is a link to its rows: no button padding, so it sits on the number's line. */
.oversight-rollup .oversight-count {
    padding: 0;
    min-height: 0;
    font-variant-numeric: tabular-nums;
}

/* A name is a link too (TLP-1456): the row's own words, left-aligned, no figure spacing. */
.oversight-rollup .oversight-name {
    font-variant-numeric: normal;
    text-align: left;
}

.oversight-zero {
    color: var(--text-muted);
}

/* A rate takes its band's colour; over too few checks or readings it stays muted. */
.oversight-rate--excellent,
.oversight-rate--good {
    color: var(--color-success);
}

.oversight-rate--fair {
    color: var(--color-warning);
}

.oversight-rate--poor {
    color: var(--color-error);
}

.oversight-rate--thin {
    color: var(--text-muted);
}

/* The open row: the FormGrid of FormSections carries the layout; this gives the groups the
   row's inner padding (the old Oversight row's rule). */
.oversight-panel .oversight-row-detail {
    padding: var(--space-3) var(--space-4);
}

/* On a phone a row keeps its outcome, its check and its badges; what it is on, where,
   when and who are in the open row, so the check's name is never squeezed out. */
@media (max-width: 640px) {
    .oversight-panel .expandable-row-header-text--muted,
    .oversight-panel .expandable-row-header-text--secondary {
        display: none;
    }
}
