/* Entity Compliance module. Tokens only. Prefix cx-. Reuses --md-list/--md-detail for the split. */
.cx-wrap { max-width: 1160px; }
.cx-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.cx-title { font-size: 16px; font-weight: 600; color: var(--color-text-primary); }
.cx-title .muted { font-size: 12px; font-weight: 400; margin-left: 8px; }
.cx-q { padding: 6px 22px 6px 10px; border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-md); background: var(--surface-2); color: var(--color-text-primary); font-family: inherit; font-size: 13px; min-width: 220px; }
.cx-q:focus { outline: none; border-color: var(--accent); }

.cx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 12px; border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); background: transparent; color: var(--color-text-secondary); cursor: pointer; font-family: inherit; font-size: 13px; }
.cx-chip:hover { background: var(--hover-bg); }
.cx-chip.on { background: var(--surface-3); color: var(--color-text-primary); border-color: var(--color-border-secondary); }
.cx-chip-sub { font-size: 10px; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: .03em; }

.cx-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-hcell { display: inline-flex; flex-direction: column; align-items: center; min-width: 62px; padding: 5px 10px; border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); background: var(--surface-1); cursor: pointer; font-family: inherit; }
.cx-hcell.on { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.cx-hn { font-size: 16px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.cx-hl { font-size: 10px; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }

.cx-banner { display: block; width: 100%; text-align: left; box-sizing: border-box; margin-bottom: 10px; padding: 8px 12px; border: 0.5px solid var(--color-text-danger); border-radius: var(--border-radius-md); background: color-mix(in srgb, var(--color-text-danger) 12%, transparent); color: var(--color-text-danger); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }

.cx-entity { border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-1); }
.cx-entity-h { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.cx-entity-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; font-size: 12px; color: var(--color-text-secondary); }
.cx-idf b { color: var(--color-text-primary); }
.cx-fill { background: none; border: none; color: var(--color-text-info); cursor: pointer; font-family: inherit; font-size: 12px; padding: 0; }
.cx-nexus { color: var(--color-text-tertiary); }

/* health colors */
.cx-overdue { color: var(--color-text-danger); }
.cx-soon { color: var(--color-text-warn); }
.cx-upcoming { color: var(--color-text-info); }
.cx-needs { color: var(--color-text-warn); }
.cx-ok { color: var(--color-text-success); }
.cx-prog { color: var(--color-text-info); }
.cx-blocked { color: var(--color-text-secondary); }
.cx-filed { color: var(--color-text-success); }
.cx-waived { color: var(--color-text-tertiary); }
.cx-hcell.cx-overdue .cx-hn { color: var(--color-text-danger); }
.cx-hcell.cx-soon .cx-hn { color: var(--color-text-warn); }
.cx-hcell.cx-ok .cx-hn { color: var(--color-text-success); }
.cx-hcell.cx-filed .cx-hn { color: var(--color-text-success); }

.cx-grid { display: grid; grid-template-columns: minmax(0, var(--md-list, 1.1fr)) minmax(0, var(--md-detail, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 820px) { .cx-grid { grid-template-columns: 1fr; } }
.cx-list { display: flex; flex-direction: column; }
.cx-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 0.5px solid var(--color-border-tertiary); cursor: pointer; border-radius: var(--border-radius-md); }
.cx-row:hover { background: var(--hover-bg); }
.cx-row:focus { outline: none; background: var(--hover-bg); }
.cx-sel { background: var(--selected-bg); box-shadow: inset 3px 0 0 var(--accent); }
.cx-overdue-row { background: color-mix(in srgb, var(--color-text-danger) 6%, transparent); }
.cx-chip-h { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.cx-chip-h.cx-overdue { background: color-mix(in srgb, var(--color-text-danger) 16%, transparent); }
.cx-chip-h.cx-soon { background: var(--color-background-warn); }
.cx-chip-h.cx-needs { background: var(--color-background-warn); }
.cx-chip-h.cx-ok, .cx-chip-h.cx-filed { background: var(--color-background-success); }
.cx-chip-h.cx-upcoming, .cx-chip-h.cx-prog { background: var(--color-background-info); }
.cx-chip-h.cx-waived { background: var(--surface-3); }
.cx-chip-h.cx-blocked { background: var(--surface-3); color: var(--color-text-secondary); }
.cx-row-main { flex: 1 1 auto; min-width: 0; }
.cx-row-name { font-size: 13px; color: var(--color-text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-row-sub { font-size: 11px; color: var(--color-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-ent-tag { color: var(--color-text-secondary); }
.cx-tag { font-size: 9px; color: var(--color-text-tertiary); border: 0.5px solid var(--color-border-tertiary); border-radius: 3px; padding: 0 4px; text-transform: uppercase; }
.cx-row-right { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.cx-doc-ind { font-size: 11px; color: var(--color-text-success); }
.cx-doc-none { font-size: 11px; color: var(--color-text-tertiary); }
.cx-cost { font-size: 11px; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.cx-list-hint { font-size: 11px; padding: 8px 2px; }

.cx-detailpane { position: sticky; top: 8px; }
.cx-empty { font-size: 13px; color: var(--color-text-tertiary); border: 1px dashed var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 22px; text-align: center; }
.cx-detail { border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-lg); padding: 14px; background: var(--surface-1); }
.cx-d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cx-d-title { font-size: 15px; font-weight: 600; color: var(--color-text-primary); }
.cx-d-meta { font-size: 12px; color: var(--color-text-secondary); }
.cx-d-due { font-size: 13px; color: var(--color-text-primary); margin-top: 4px; }
.cx-d-note { font-size: 12px; color: var(--color-text-secondary); margin-top: 8px; background: var(--surface-2); border-radius: var(--border-radius-md); padding: 7px 9px; line-height: 1.45; }
.cx-d-noproof { font-size: 12px; color: var(--color-text-success); margin-top: 8px; background: var(--color-background-success); border-radius: var(--border-radius-md); padding: 7px 9px; }
.cx-d-blocked { font-size: 12px; color: var(--color-text-secondary); margin-top: 8px; background: var(--surface-2); border-left: 3px solid var(--color-text-warn); border-radius: var(--border-radius-md); padding: 7px 9px; }
.cx-blocked-btn.on { color: var(--color-text-warn); }
.cx-link { color: var(--color-text-info); text-decoration: none; }
.cx-link:hover { text-decoration: underline; }

.cx-sect { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-tertiary); margin: 14px 0 7px; }
.cx-sect .muted { font-weight: 400; text-transform: none; letter-spacing: 0; }
.cx-docs { display: flex; flex-direction: column; gap: 6px; }
.cx-doc { display: flex; align-items: center; gap: 8px; }
.cx-doc-when { font-size: 10px; }
.cx-doc-rm { background: none; border: none; color: var(--color-text-tertiary); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; }
.cx-doc-rm:hover { color: var(--color-text-danger); }
.cx-doc-empty { font-size: 12px; }
.cx-attach { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.cx-in { padding: 6px 9px; border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-md); background: var(--surface-2); color: var(--color-text-primary); font-family: inherit; font-size: 12px; }
.cx-att-label { flex: 1 1 130px; min-width: 0; }
.cx-att-url { flex: 2 1 200px; min-width: 0; }
.cx-in:focus { outline: none; border-color: var(--accent); }

.cx-status { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-btn { font-size: 12px; padding: 6px 12px; border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-md); background: var(--surface-2); color: var(--color-text-primary); cursor: pointer; font-family: inherit; }
.cx-btn:hover { border-color: var(--accent); }
.cx-btn.on { background: var(--surface-3); border-color: var(--accent); }
.cx-file.on { color: var(--color-text-success); }
.cx-waive.on { color: var(--color-text-tertiary); }
.cx-att-btn { background: var(--surface-3); }

.cx-packet { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-pk { font-size: 12px; }
.cx-pk-none { color: var(--color-text-tertiary); }
.cx-hist { display: flex; flex-direction: column; gap: 3px; }
.cx-hev { font-size: 12px; color: var(--color-text-secondary); }

/* view toggle (Filings / Assets) */
.cx-head-right { display: flex; align-items: center; gap: 12px; }
.cx-viewtoggle { display: inline-flex; border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-md); overflow: hidden; }
.cx-vt { font-size: 12px; padding: 5px 14px; border: none; background: transparent; color: var(--color-text-secondary); cursor: pointer; font-family: inherit; }
.cx-vt:hover { background: var(--hover-bg); color: var(--color-text-primary); }
.cx-vt.on { background: var(--surface-3); color: var(--color-text-primary); }

/* assets */
.cx-add-asset, .cx-add-lic { width: 100%; margin-bottom: 8px; justify-content: center; }
.cx-asset-acts { display: flex; gap: 8px; margin-top: 8px; }
.cx-aitems { display: flex; flex-direction: column; gap: 8px; }
.cx-aitem { border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); padding: 8px 10px; }
.cx-aitem-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cx-aitem-name { font-size: 13px; color: var(--color-text-primary); font-weight: 500; }
.cx-aitem-due { font-size: 11px; margin-left: auto; }
.cx-aitem-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cx-mini { font-size: 11px; padding: 3px 8px; }
.cx-ai-doc { font-size: 11px; padding: 3px 8px; flex: 1 1 130px; min-width: 90px; }
.cx-ai-del { color: var(--color-text-tertiary); }
.cx-ai-del:hover { color: var(--color-text-danger); }
.cx-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-preset { font-size: 11px; padding: 4px 10px; border: 0.5px dashed var(--color-border-secondary); border-radius: var(--border-radius-md); background: transparent; color: var(--color-text-info); cursor: pointer; font-family: inherit; }
.cx-preset:hover { background: var(--color-background-info); }
.cx-preset-custom { color: var(--color-text-secondary); }

/* prep packet */
.cx-linkbtn { background: none; border: none; padding: 0; color: var(--color-text-info); cursor: pointer; font-family: inherit; font-size: inherit; }
.cx-linkbtn:hover { text-decoration: underline; }
.cx-pk-modal { width: 540px; max-width: 100%; }
.pk-summary { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 10px; }
.pk-gapn { color: var(--color-text-warn); }
.pk-ready { color: var(--color-text-success); }
.pk-list { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; }
.pk-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: var(--border-radius-md); font-size: 13px; }
.pk-ic { flex: 0 0 auto; width: 14px; text-align: center; font-weight: 700; }
.pk-lbl { flex: 0 0 auto; color: var(--color-text-primary); }
.pk-val { color: var(--color-text-tertiary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-val em { color: var(--color-text-warn); font-style: normal; }
.pk-have { background: color-mix(in srgb, var(--color-text-success) 8%, transparent); }
.pk-have .pk-ic { color: var(--color-text-success); }
.pk-prov .pk-ic { color: var(--color-text-info); }
.pk-susp { background: var(--color-background-warn); }
.pk-susp .pk-ic { color: var(--color-text-warn); }
.pk-miss { background: color-mix(in srgb, var(--color-text-danger) 8%, transparent); }
.pk-miss .pk-ic { color: var(--color-text-danger); }
.pk-docs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

/* add-entity chip + modal */
.cx-add-entity { color: var(--color-text-info); border-style: dashed; }
.cx-add-entity:hover { background: var(--color-background-info); }
.cx-modal-scrim { position: fixed; inset: 0; z-index: 9600; background: color-mix(in srgb, var(--bg) 55%, transparent); display: flex; align-items: center; justify-content: center; padding: 20px; }
.cx-modal { width: 420px; max-width: 100%; background: var(--surface-1); border: 1px solid var(--color-border-secondary); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-2); padding: 18px; }
.cx-modal-h { font-size: 15px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 12px; }
.cx-mf { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cx-mf > span { font-size: 11px; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
.cx-mf > span .muted { text-transform: none; letter-spacing: 0; }
.cx-mf input, .cx-mf select { padding: 7px 10px; border: 0.5px solid var(--color-border-secondary); border-radius: var(--border-radius-md); background: var(--surface-2); color: var(--color-text-primary); font-family: inherit; font-size: 13px; width: 100%; box-sizing: border-box; }
.cx-mf input:focus, .cx-mf select:focus { outline: none; border-color: var(--accent); }
.cx-mf-row { display: flex; gap: 10px; }
.cx-mf-row .cx-mf { flex: 1 1 auto; }
.cx-mf-row .cx-mf-sm { flex: 0 0 90px; }
.cx-modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cx-modal-save { background: var(--color-background-info); border-color: var(--color-text-info); color: var(--color-text-info); }
.cx-modal-status { font-size: 12px; }
