/* Admin Collection workspace: a restrained source list, with depth behind a source or plan.
   Colours come from palette tokens only; tables use the shared .dt renderer. */
#module-collection { min-width: 0; }
.co-shell { max-width: 1120px; margin: 0 auto; padding: 4px 0 40px; }
.co-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.co-head > div:first-child { min-width: 0; }
.co-title { margin: 0; font-size: 1.35rem; line-height: 1.3; font-weight: 600; }
.co-kind { margin-left: 6px; color: var(--muted); font-size: .95rem; font-weight: 400; }
.co-subtitle { margin: 6px 0 0; max-width: 70ch; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.co-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.co-fresh { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.co-fresh:empty { display: none; }
.co-notice { margin: -8px 0 16px; font-size: .82rem; }
.co-notice:empty { display: none; }
.co-muted { color: var(--muted); }
.co-block { display: block; margin-top: 2px; }
.co-warn { color: var(--warning); }
.co-hint { max-width: 80ch; margin: 10px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.co-lede { max-width: 85ch; margin: 0 0 12px; font-size: .85rem; line-height: 1.55; }
.co-code { padding: 1px 5px; border-radius: 4px; background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }
.co-link { padding: 0; border: 0; background: none; color: var(--text-accent); font: inherit; text-align: left; cursor: pointer; }
.co-link:hover { text-decoration: underline; }
.co-shell :is(a, button, select, summary):focus-visible, .co-panel :is(button, summary):focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.co-denied { padding: 40px 0; color: var(--muted); text-align: center; }

/* Landing: one list, one row per source. */
.co-sources { margin: 0; padding: 0; list-style: none; border: 1px solid var(--ops-panel-border); border-radius: 10px; background: var(--ops-panel-bg); overflow: hidden; }
.co-sources > li + li { border-top: 1px solid var(--line-soft); }
.co-source { position: relative; display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(150px, .8fr) minmax(200px, 1.4fr) 14px; align-items: center; gap: 6px 24px; padding: 16px 20px; color: inherit; text-decoration: none; }
.co-source:hover { background: var(--row-hover); }
.co-source:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
.co-source[data-tone="attention"]::before { content: ''; position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--warning); }
.co-source-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-source-name strong { font-size: .92rem; font-weight: 600; }
.co-source-name span { color: var(--muted); font-size: .78rem; }
.co-state { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; white-space: nowrap; }
.co-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 60%, transparent); }
.co-state[data-tone="attention"] .co-dot { background: var(--warning); }
.co-state[data-tone="active"] .co-dot { background: var(--text-accent); }
.co-state[data-tone="pending"] .co-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--text-accent); }
.co-state[data-tone="paused"] .co-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.co-state[data-tone="muted"] { color: var(--muted); }
.co-last { min-width: 0; font-size: .85rem; }
.co-last time, .co-sep { color: var(--muted); }
.co-chevron { justify-self: end; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.co-note { grid-column: 1 / 4; max-width: 90ch; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.co-source[data-tone="attention"] .co-note { color: var(--text); }
.co-empty { padding: 28px 20px; color: var(--muted); font-size: .85rem; text-align: center; }
.co-placeholder { display: grid; grid-template-columns: 1.2fr .8fr 1.4fr; gap: 24px; padding: 22px 20px; }
.co-placeholder span, .co-placeholder-block { height: 10px; border-radius: 5px; background: var(--line); animation: co-pulse 1.4s ease-in-out infinite; }
.co-placeholder span:nth-child(2) { width: 60%; }
.co-placeholder-block { height: 64px; border-radius: 8px; }
@keyframes co-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .co-placeholder span, .co-placeholder-block { animation: none; } }

/* Source detail. */
.co-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: .8rem; }
.co-crumb a { color: var(--text-accent); text-decoration: none; }
.co-crumb a:hover { text-decoration: underline; }
.co-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 8px 0 0; font-size: .85rem; }
.co-summary-note { color: var(--muted); }
.co-filter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.co-filter select { max-width: 220px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--text); font: inherit; font-size: .8rem; }
.co-section { padding: 20px 0 24px; border-top: 1px solid var(--line); }
.co-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.co-section h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.co-sub { margin: 18px 0 8px; font-size: .8rem; font-weight: 600; }
.co-section-head + div > .co-sub:first-child, .co-usage > .co-sub { margin-top: 0; }
.co-sub .co-muted { font-weight: 400; }
.co-facts { margin: 0; padding-left: 18px; font-size: .85rem; line-height: 1.5; }
.co-facts li + li { margin-top: 6px; }
.co-dl { display: grid; gap: 6px; margin: 0; font-size: .82rem; line-height: 1.45; }
.co-dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; }
.co-dl dt { color: var(--muted); }
.co-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.co-tech { margin-top: 8px; }
.co-usage .co-dl > div { grid-template-columns: 128px minmax(0, 1fr); }
.co-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px 40px; }
.co-pager { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 8px; font-size: .82rem; }
.co-pager:empty { display: none; }
.co-table { overflow-x: auto; }
.co-table .dt { width: 100%; }
.co-outcome[data-tone="attention"] { color: var(--warning); }
.co-table tr[data-row-kind="expansion"] > td { padding: 4px 16px 12px; white-space: normal; text-align: left; background: var(--table-body-bg); }
.co-request-detail { display: grid; gap: 8px; }
.co-devices { display: grid; gap: 16px; margin: 0 0 8px; padding: 0; list-style: none; }
.co-devices > li { padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.co-device-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; font-size: .9rem; }
.co-shell details > summary, .co-panel details > summary { width: fit-content; margin-top: 8px; color: var(--text-accent); font-size: .8rem; cursor: pointer; }
.co-disclosure { margin-top: 10px; }
.co-pre { max-height: 320px; margin: 0; padding: 8px 10px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--table-body-bg); font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Plan detail in the shared side panel. */
.co-panel { --side-panel-width: 760px; }
.co-panel-section { padding: 0 0 18px; }
.co-panel-section + .co-panel-section { padding-top: 16px; border-top: 1px solid var(--floating-panel-divider); }
.co-panel-section > .co-sub { margin-top: 0; }
.co-diagnostics { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.co-captures { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.co-captures li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .82rem; }

@media (max-width: 760px) {
    .co-source { grid-template-columns: minmax(0, 1fr) 14px; gap: 6px 12px; padding: 14px 16px; }
    .co-source > :not(.co-chevron) { grid-column: 1; }
    .co-chevron { grid-row: 1 / span 3; grid-column: 2; }
    .co-note { grid-column: 1 / -1; }
    .co-placeholder { grid-template-columns: 1fr; gap: 10px; }
    .co-head-actions { width: 100%; }
    .co-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .co-columns { grid-template-columns: minmax(0, 1fr); }
}

/* Contextual actions and settings (commit 10a): inside the selected source only. */
.co-head-tools { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.co-head-tools:empty { display: none; }
.co-section-tools { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.co-action-region:empty { display: none; }
.co-action-region { margin: -6px 0 16px; display: grid; gap: 6px; }
.co-action-status { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); border-radius: 0 6px 6px 0; background: var(--ops-panel-bg); font-size: .82rem; line-height: 1.5; }
.co-action-status[data-tone="attention"] { border-left-color: var(--warning); }
.co-callout { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--warning); border-radius: 0 6px 6px 0; background: var(--ops-panel-bg); font-size: .82rem; }
.co-callout p { margin: 0 0 8px; }
.co-small { font-size: .78rem; }
.co-form { display: grid; gap: 12px; }
.co-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.co-form legend { margin-bottom: 6px; font-size: .8rem; font-weight: 600; }
.co-field { display: grid; gap: 6px; color: var(--muted); font-size: .8rem; }
.co-field :is(select, textarea), .co-mini-field input, .co-setting-edit select {
    max-width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--input-bg); color: var(--text); font: inherit; font-size: .82rem; }
.co-field textarea { resize: vertical; }
.co-form-status { min-height: 1.2em; margin: 0; font-size: .8rem; }
.co-form-status:empty { min-height: 0; }
.co-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.co-item-picks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: .82rem; }
.co-item-picks label, .co-choices label { display: inline-flex; align-items: baseline; gap: 6px; }
.co-settings { display: grid; gap: 14px; }
.co-scope { display: grid; gap: 6px; }
.co-settings-group { display: grid; gap: 2px; }
.co-setting { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--floating-panel-divider); }
.co-setting.is-changed { box-shadow: inset 3px 0 0 var(--text-accent); padding-left: 10px; }
.co-setting-label { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; }
.co-setting-label span { font-size: .76rem; }
.co-setting-value { font-size: .82rem; }
.co-setting-edit { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.co-setting.is-readonly .co-setting-value { grid-column: 2; }
.co-setting > .co-hint { grid-column: 2; margin: 0; }
.co-mini-field { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.co-mini-field input { width: 7em; }
.co-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; width: 100%; margin: 4px 0 0; padding: 0; border: 0; font-size: .78rem; }
.co-choices legend { font-size: .76rem; color: var(--muted); }
.co-preview { padding: 12px; border: 1px solid var(--floating-panel-divider); border-radius: 8px; display: grid; gap: 10px; }
.co-settings-actions { display: grid; gap: 10px; }
.co-revisions { display: grid; gap: 10px; margin: 8px 0; padding-left: 18px; font-size: .82rem; }
.co-revision > div + div { margin-top: 2px; }
.co-form-panel { --side-panel-width: 520px; }
.co-settings-panel { --side-panel-width: 760px; }

@media (max-width: 760px) {
    .co-setting { grid-template-columns: minmax(0, 1fr); }
    .co-setting-edit, .co-setting.is-readonly .co-setting-value, .co-setting > .co-hint { grid-column: 1; }
}
.co-setting-edit .co-link, .co-device-head .co-link, .co-action-status .co-link { font-size: .8rem; }

/* System health (commit 10b): a secondary view, never on the landing list. */
.co-secondary { color: var(--text-accent); font-size: .8rem; text-decoration: none; }
.co-secondary:hover { text-decoration: underline; }
.co-health-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.co-health-item { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.co-health-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 6px; font-size: .9rem; }
.co-health-head .co-muted { font-size: .8rem; }
.co-health-reason { margin: 4px 0 8px; font-size: .82rem; }
