/* Assessment engine presentation boundary.
   The shared shell owns generic workbench tables and controls; this file owns
   the manual 51-artifact register, focused scoring workpaper, and filters. */

.artifactFilters {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(160px, 1fr) minmax(130px, .8fr) minmax(140px, .8fr);
  gap: 10px;
  align-items: end;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.artifactFilters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.artifactFilters input,
.artifactFilters select {
  min-height: 42px;
  border: 1px solid rgba(63, 83, 106, .18);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.artifactFilters .filterCheck {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  letter-spacing: 0;
  text-transform: none;
}

.artifactFilters .filterCheck input {
  min-height: auto;
  width: 17px;
  height: 17px;
  padding: 0;
}

.artifactFocusPanel {
  margin: 16px;
  padding: 16px;
  border: 1px solid rgba(23, 103, 232, .22);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: inset 0 0 0 1px rgba(23, 103, 232, .05), 0 10px 26px rgba(23, 103, 232, .055);
}

.focusEmpty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(23, 103, 232, .04), transparent 48%),
    linear-gradient(180deg, #fff, #f8fbff);
  font-size: 13px;
  text-align: center;
}

.focusHead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.focusHeadMain .artifactId {
  font-size: 12px;
}

.focusHeadMain h4 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 18px;
}

.focusMeta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.focusNav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.focusNav button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.focusNav button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .5;
}

.focusGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.focusGrid label,
.focusTextGrid label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.focusGrid select,
.focusTextGrid textarea {
  border: 1px solid rgba(63, 83, 106, .18);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 9px;
  font: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.focusConfirm {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.focusConfirm input {
  width: 18px;
  height: 18px;
}

.focusQualityNote {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.focusTextGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.focusTextGrid textarea {
  min-height: 72px;
  resize: vertical;
}

.focusFollowUp {
  grid-column: 1 / -1;
}

.artifactTable:not(.workflowTable) {
  min-width: 760px;
  table-layout: fixed;
}

.sortHeaderBtn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sortHeaderBtn:hover {
  color: var(--blue);
}

.sortHeaderBtn::after {
  content: "";
  display: inline-block;
  width: 8px;
}

th[data-sort-dir] .sortHeaderBtn {
  color: var(--blue);
}

th[data-sort-dir="asc"] .sortHeaderBtn::after {
  content: "▲";
  margin-left: 3px;
  font-size: 10px;
}

th[data-sort-dir="desc"] .sortHeaderBtn::after {
  content: "▼";
  margin-left: 3px;
  font-size: 10px;
}

.artifactTable:not(.workflowTable) th:nth-child(1),
.artifactTable:not(.workflowTable) td:nth-child(1) {
  width: 6%;
}

.artifactTable:not(.workflowTable) th:nth-child(2),
.artifactTable:not(.workflowTable) td:nth-child(2) {
  width: 28%;
}

.artifactTable:not(.workflowTable) th:nth-child(3),
.artifactTable:not(.workflowTable) td:nth-child(3) {
  width: 16%;
}

.artifactTable:not(.workflowTable) th:nth-child(4),
.artifactTable:not(.workflowTable) td:nth-child(4) {
  width: 8%;
}

.artifactTable:not(.workflowTable) th:nth-child(5),
.artifactTable:not(.workflowTable) td:nth-child(5) {
  width: 12%;
}

.artifactTable:not(.workflowTable) th:nth-child(6),
.artifactTable:not(.workflowTable) td:nth-child(6) {
  width: 13%;
}

.artifactTable:not(.workflowTable) th:nth-child(7),
.artifactTable:not(.workflowTable) td:nth-child(7) {
  width: 8%;
}

.artifactTable:not(.workflowTable) th:nth-child(8),
.artifactTable:not(.workflowTable) td:nth-child(8) {
  width: 9%;
  text-align: center;
}

.artifactTable:not(.workflowTable) th:nth-child(9),
.artifactTable:not(.workflowTable) td:nth-child(9) {
  display: none;
}

.artifactFocusBtn {
  padding: 3px 5px;
  border: 1px solid rgba(23, 103, 232, .28);
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.artifactFocusBtn:hover {
  background: #eaf2ff;
}

.artifactFocusBtn[aria-current="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.artifactTable:not(.workflowTable) tr.isFocused td {
  background: rgba(23, 103, 232, .05);
}

.asIsReadinessCell,
.asIsEvidenceCell,
.asIsTextCell {
  min-width: 0;
}

.roCell {
  font-size: 12px;
}

.roCell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.roScore {
  color: var(--ink);
  font-weight: 700;
}

.roScore-0 { color: var(--r0t); }
.roScore-1 { color: var(--r1t); }
.roScore-2 { color: var(--r2t); }
.roScore-3 { color: var(--r3t); }
.roScore-4 { color: var(--r4t); }
.roScore-na,
.roScore-none { color: var(--muted); }

.sensChip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.sensChip-cui,
.sensChip-controlled,
.sensChip-restricted {
  background: #fdeeee;
  color: #a33a3a;
}

.asIsTextCell {
  display: grid;
  gap: 4px;
}

.asIsTextCell p {
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
}

.asIsTextCell p i {
  color: var(--muted);
  font-style: normal;
}

.asIsTextCell b {
  margin-right: 4px;
  color: var(--navy);
}

.confirmCell {
  text-align: center;
}

.confirmCell input {
  width: 18px;
  height: 18px;
}

.confirmYes {
  color: var(--r4t);
  font-weight: 900;
}

.confirmNo {
  color: var(--muted);
}

.artifactTable:not(.workflowTable) tbody tr {
  --score-rail: #c9d8ec;
  --row-tint: transparent;
}

.artifactTable:not(.workflowTable) tbody tr[data-score-band="0"] {
  --score-rail: var(--r0);
  --row-tint: rgba(179, 64, 47, .035);
}

.artifactTable:not(.workflowTable) tbody tr[data-score-band="1"] {
  --score-rail: var(--r1);
  --row-tint: rgba(217, 131, 36, .04);
}

.artifactTable:not(.workflowTable) tbody tr[data-score-band="2"] {
  --score-rail: var(--r2);
  --row-tint: rgba(169, 121, 0, .04);
}

.artifactTable:not(.workflowTable) tbody tr[data-score-band="3"] {
  --score-rail: var(--r3);
  --row-tint: rgba(96, 127, 144, .045);
}

.artifactTable:not(.workflowTable) tbody tr[data-score-band="4"] {
  --score-rail: var(--r4);
  --row-tint: rgba(79, 111, 130, .045);
}

.artifactTable:not(.workflowTable) tbody tr[data-sensitive="true"] {
  --sensitivity-tint: rgba(238, 40, 42, .035);
}

.artifactTable:not(.workflowTable) tbody tr td {
  background:
    linear-gradient(90deg, var(--sensitivity-tint, transparent), transparent 26%),
    linear-gradient(90deg, var(--row-tint), transparent 62%),
    #fff;
}

.artifactTable:not(.workflowTable) tbody tr:nth-child(even) td {
  background:
    linear-gradient(90deg, var(--sensitivity-tint, transparent), transparent 26%),
    linear-gradient(90deg, var(--row-tint), transparent 62%),
    #f8fbff;
}

.artifactTable:not(.workflowTable) tbody tr td:first-child {
  box-shadow: inset 4px 0 0 var(--score-rail);
}

.artifactTable:not(.workflowTable) tbody tr.isFocused td {
  background:
    linear-gradient(90deg, rgba(23, 103, 232, .10), rgba(255, 255, 255, .94) 48%),
    #fff;
}

.artifactFocusPanel .focusBadge {
  border-color: rgba(63, 83, 106, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
}

.manualWorkbenchDisclosure {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(63, 83, 106, .14);
  border-radius: 18px;
  background: rgba(248, 250, 251, .72);
}

.manualWorkbenchDisclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.manualWorkbenchDisclosure summary::-webkit-details-marker {
  display: none;
}

.manualWorkbenchDisclosure summary::after {
  content: "Open";
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(63, 83, 106, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--hz1t);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.manualWorkbenchDisclosure[open] summary::after {
  content: "Hide";
}

.manualWorkbenchDisclosure summary span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manualWorkbenchDisclosure summary strong {
  color: var(--ink);
}

.manualWorkbenchDisclosure summary small {
  color: var(--muted);
}

.manualWorkbenchBody {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

@media screen and (max-width: 880px) {
  .artifactFilters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifactFilters .filterSearch,
  .artifactFilters .appMessage {
    grid-column: 1 / -1;
  }

  .focusGrid,
  .focusTextGrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .artifactFilters {
    grid-template-columns: minmax(0, 1fr);
  }

  .artifactFilters .filterSearch,
  .artifactFilters .appMessage {
    grid-column: auto;
  }

  .artifactFocusPanel {
    margin-inline: 0;
    padding: 14px;
  }

  .manualWorkbenchDisclosure summary {
    align-items: stretch;
    flex-direction: column;
  }

  .manualWorkbenchDisclosure summary::after {
    width: fit-content;
  }
}
