/* Pruebas de controles y acciones operables (CG-Aseguramiento, 3.9.47). Reutiliza .gov-view (governance-register.css) y los tokens del tema. */
.cg-ct-view .cg-ct-error, .cg-action-editor-panel .cg-ct-error { color: #a02c20; font-size: 12px; font-weight: 600; }
.cg-ct-view [aria-invalid="true"], .cg-action-editor-panel [aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 1px #c0392b; }
.cg-ct-view .cg-ct-methods, .cg-ct-view .cg-ct-evidence { border: 1px solid var(--border, #c4ccd8); border-radius: 8px; padding: 8px 12px; margin: 0; display: grid; gap: 6px; }
.cg-ct-view .cg-ct-methods legend, .cg-ct-view .cg-ct-evidence legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.cg-ct-view .soa-kpi.cg-ct-kpi-warn strong { color: #8a5e00; }
.cg-ct-view .soa-kpi.cg-ct-kpi-danger strong { color: #a02c20; }
.cg-ct-view .cg-ct-readiness .testing-card .btn { justify-self: start; margin-top: 6px; }
.cg-ct-view .gov-actions .btn:focus-visible, .cg-ct-view .gov-check input:focus-visible, .cg-action-editor-panel .btn:focus-visible { outline: 2px solid #3b6fd4; outline-offset: 2px; }
.cg-action-editor-panel { margin: 12px 0; }
.cg-action-editor-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.cg-action-editor-panel input, .cg-action-editor-panel select, .cg-action-editor-panel textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--border, #c4ccd8); border-radius: 8px; background: var(--surface, #fff); color: inherit; min-height: 38px; }
.cg-action-editor-panel .gov-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.cg-action-editor-panel .gov-wide, .cg-action-editor-panel .gov-form-actions { grid-column: 1 / -1; }
.cg-action-editor-panel .gov-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.improvement-backlog .gov-notice { border: 1px solid var(--border, #d0d7e2); border-left: 4px solid #2e8b57; border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
@media (max-width: 640px) { .cg-action-editor-panel .gov-form { grid-template-columns: 1fr; } }
/* Responsive: KPI fluidos, botón del hero legible, casillas alineadas y el registro como tarjetas en pantallas estrechas. */
.cg-ct-view .soa-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cg-ct-view .cg-ct-hero { border-bottom: 0; padding-bottom: 14px; }
.cg-ct-view { --ct-blue: #2563eb; --ct-ink: #102a43; --ct-soft: #f5f8fc; }
.cg-ct-view .cg-ct-hero { margin: -4px -4px 12px; padding: 22px 24px 20px; border-radius: 14px; background: linear-gradient(115deg, #102a43 0%, #174ea6 58%, #2563eb 100%); color: #fff; box-shadow: 0 10px 24px rgba(16,42,67,.16); }
.cg-ct-view .cg-ct-hero .eyebrow, .cg-ct-view .cg-ct-hero p { color: rgba(255,255,255,.82); }
.cg-ct-view .cg-ct-hero h2 { color: #fff; letter-spacing: -.02em; margin: 5px 0 7px; font-size: clamp(24px, 3vw, 34px); }
.cg-ct-view .cg-ct-hero p { max-width: 760px; margin-bottom: 0; }
.cg-ct-view .cg-ct-hero .btn.pri { background: #fff; color: #174ea6; border-color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.14); }
.cg-ct-view .cg-ct-steps { display: flex; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--border, #dbe3ee); border-radius: 10px; background: color-mix(in srgb, var(--surface, #fff) 92%, #2563eb); overflow-x: auto; }
.cg-ct-view .cg-ct-steps span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted, #64748b); font-size: 12px; white-space: nowrap; }
.cg-ct-view .cg-ct-steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e6edf7; color: #345; font-size: 11px; }
.cg-ct-view .cg-ct-steps span.is-active { color: #174ea6; font-weight: 700; }
.cg-ct-view .cg-ct-steps span.is-active b { background: #2563eb; color: #fff; }
.cg-ct-view .gov-form-panel { border-top: 3px solid #2563eb; }
.cg-ct-view .gov-form-panel .gov-form { gap: 14px 18px; }
.cg-ct-view .gov-form-panel .gov-form > label, .cg-ct-view .gov-form-panel fieldset { background: color-mix(in srgb, var(--surface, #fff) 96%, #eef4ff); padding: 10px; border-radius: 8px; }
.cg-ct-view .cg-ct-filters { align-items: end; gap: 10px; }
.cg-ct-view .cg-ct-filters label { min-width: 150px; }
.cg-ct-view .cg-ct-filters .cg-ct-search { flex: 1 1 280px; }
.cg-ct-view .cg-ct-filter-summary { color: var(--muted, #64748b); font-size: 12px; padding: 0 4px 9px; white-space: nowrap; }
.cg-ct-view .cg-ct-filters .btn { margin-bottom: 2px; }
.cg-ct-view .soa-kpis { gap: 10px; margin: 14px 0; }
.cg-ct-view .soa-kpi { min-height: 76px; padding: 13px 15px; border: 1px solid #dbe5f1; border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgba(16,42,67,.05); }
.cg-ct-view .soa-kpi span { color: #58708a; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.cg-ct-view .soa-kpi strong { color: var(--ct-ink); font-size: 23px; }
.cg-ct-view .maturity-panel { border-radius: 13px; box-shadow: 0 3px 12px rgba(16,42,67,.06); }
.cg-ct-view .cg-ct-panel-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom: 12px; }
.cg-ct-view .cg-ct-panel-head h3 { margin: 3px 0 3px; color: var(--ct-ink); }
.cg-ct-view .cg-ct-panel-head p { margin: 0; max-width: 700px; }
.cg-ct-view .cg-ct-count-badge, .cg-ct-view .cg-ct-form-status { border-radius: 999px; padding: 5px 10px; background: #eaf1ff; color: #174ea6; font-weight: 700; font-size: 12px; white-space: nowrap; }
.cg-ct-view .cg-ct-register { padding: 18px; }
.cg-ct-view .cg-ct-filters { padding: 12px; border: 1px solid #dbe5f1; border-radius: 10px; background: var(--ct-soft); }
.cg-ct-view .cg-ct-filters label { color: #35516e; }
.cg-ct-view .cg-ct-filters input, .cg-ct-view .cg-ct-filters select { border-radius: 8px; min-height: 38px; background: #fff; }
.cg-ct-view .cg-ct-search input { box-shadow: inset 0 0 0 1px rgba(37,99,235,.12); }
.cg-ct-view .soa-table-wrap { border: 1px solid #dbe5f1; border-radius: 10px; overflow: auto; }
.cg-ct-view .soa-table { margin: 0; }
.cg-ct-view .soa-table thead th { background: #f3f7fc; color: #35516e; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; }
.cg-ct-view .soa-table tbody tr:hover { background: #f8fbff; }
.cg-ct-view .soa-table td { vertical-align: middle; }
.cg-ct-view .gov-form-panel { padding: 18px; }
.cg-ct-view .gov-form-panel .gov-form > label, .cg-ct-view .gov-form-panel fieldset { border: 1px solid #e1e9f3; box-shadow: none; }
.cg-ct-view .gov-form-panel .gov-form > label:focus-within, .cg-ct-view .gov-form-panel fieldset:focus-within { border-color: #8db2f5; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.cg-ct-view .cg-ct-advanced { padding: 0 !important; background: transparent !important; border: 0 !important; }
.cg-ct-view .cg-ct-advanced summary { cursor: pointer; color: #174ea6; font-weight: 700; padding: 8px 2px; }
.cg-ct-view .cg-ct-advanced-grid { display: grid; grid-template-columns: minmax(220px, 1fr); gap: 10px; padding: 8px 0 2px; }
.cg-ct-view .cg-ct-control-search input { width: 100%; min-height: 42px; border: 1px solid #9bb7df; border-radius: 9px; padding: 9px 12px; background: #fff; }
.cg-ct-view .cg-ct-control-search .cg-ct-control-id { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cg-ct-view .cg-ct-scope-note { margin: 8px 0 14px; padding: 9px 12px; border-left: 3px solid #6b8fd6; background: #f4f7fc; color: #49627c; font-size: 12px; border-radius: 4px; }
.cg-ct-view .gov-hero-actions .btn { white-space: nowrap; }
.cg-ct-view .cg-ct-methods { align-content: start; }
.cg-ct-view .gov-form .gov-check { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; font-weight: 400; }
.cg-ct-view .gov-form .gov-check input { width: auto; min-height: 0; }
@media (max-width: 760px) {
  .cg-ct-view .soa-hero { flex-direction: column; }
  .cg-ct-view .soa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-ct-view .gov-filters { flex-direction: column; }
  .cg-ct-view .gov-filters label, .cg-ct-view .gov-filters input, .cg-ct-view .gov-filters select { width: 100%; }
  .cg-ct-view .cg-ct-filter-summary { padding: 4px 0; }
  .cg-ct-view .cg-ct-register .soa-table thead { display: none; }
  .cg-ct-view .cg-ct-register .soa-table, .cg-ct-view .cg-ct-register .soa-table tbody, .cg-ct-view .cg-ct-register .soa-table tr, .cg-ct-view .cg-ct-register .soa-table td { display: block; width: 100%; min-width: 0; }
  .cg-ct-view .cg-ct-register .soa-table tr { border-bottom: 1px solid #e2e8f0; padding: 6px 0; }
  .cg-ct-view .cg-ct-register .soa-table td { border: 0; padding: 4px 10px; box-sizing: border-box; }
  .cg-ct-view .cg-ct-register .soa-table td.gov-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .cg-ct-view .cg-ct-register .soa-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: #64748b; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cg-ct-view *, .cg-action-editor-panel * { transition: none !important; animation: none !important; } }
