/* R374 — scoped to existing Test Key screens only */
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card {min-width:0;container-type:inline-size;}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions {
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;align-items:stretch!important;min-width:0!important;width:100%!important;
}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions>.button {
  display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:44px!important;padding:8px 6px!important;line-height:1.2!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;font-size:12px!important;text-align:center!important;
}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions>.button>svg {flex:0 0 16px!important;width:16px!important;height:16px!important;}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions>.button>span {min-width:0;word-break:normal;overflow-wrap:normal;}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-actions>.r862-obj-done {grid-column:2/-1;display:flex;align-items:center;justify-content:center;margin:0;text-align:center;}
body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-actions>input[hidden] {display:none!important;}
@container (max-width:420px) {
  body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions>.button {flex-direction:column!important;gap:4px!important;min-height:64px!important;font-size:11px!important;padding:6px 3px!important;}
}
@container (max-width:235px) {
  body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions {grid-template-columns:1fr!important;}
  body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-card:not(.is-final)>.r862-key-actions>.button {flex-direction:row!important;min-height:44px!important;}
  body[data-portal-role="PRINCIPAL"] .r862-key-shell .r862-key-actions>.r862-obj-done {grid-column:1/-1;}
}
/* Remove old selection-column width assumptions without affecting the mobile table/card rules. */
@media(min-width:981px){
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(1),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(1){width:9%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(2),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(2){width:7%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(3),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(3){width:10%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(4),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(4){width:9%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(5),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(5){width:10%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(6),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(6){width:12%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(7),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(7){width:18%!important;}
  body[data-portal-role="OPERATOR"] .tk4 .tk4-table th:nth-child(8),body[data-portal-role="OPERATOR"] .tk4 .tk4-table td:nth-child(8){width:25%!important;}
}
@media(max-width:1100px){body[data-portal-role="OPERATOR"] .tk4 .tk4-row-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;}body[data-portal-role="OPERATOR"] .tk4 .tk4-row-actions>.tk4-view-btn{grid-column:1/-1;}}
