/* Nove critérios em uma única tabela; descrições e evidências sob demanda. */
.scoring-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.scoring-shell .app-content { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
main.scoring-main { display: flex; flex: 1; flex-direction: column; min-height: 0; max-width: none; gap: 12px; padding: 20px 24px; overflow: hidden; }
.scoring-profile-head { display: flex; flex: none; align-items: center; gap: 12px; margin: 0 0 14px; min-width: 0; }
.scoring-main .scoring-profile-head { margin: 0; }
.scoring-profile-head>div { min-width: 0; }
.scoring-profile-head h1 { font-size: 21px; line-height: 27px; margin: 0 0 2px; }
.scoring-profile-head p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoring-profile-head>.icon-button { width: 34px; min-height: 34px; flex: none; }
.scoring-stepbar { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 12px; }
.scoring-stepbar .evaluation-steps { margin: 0; }
.scoring-grid { flex: 1; min-height: 0; grid-template-columns: minmax(0,1fr) minmax(235px,30%); gap: 16px; align-items: stretch; }
.criteria-table-panel { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.criteria-table-panel .panel-title { flex: none; min-height: 42px; padding: 10px 16px; }
.criteria-hint { display: flex; flex: none; justify-content: space-between; gap: 8px; margin: 0; padding: 7px 16px; font-size: 11px; line-height: 16px; color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border)); }
.criteria-table-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.criteria-table { width: 100%; height: 100%; table-layout: fixed; }
.criteria-table .grade-col { width: 44px; }
.criteria-table .criterion-tools-col { width: 86px; }
.criteria-table thead th { height: 30px; padding: 5px 8px; font-size: 11px; line-height: 16px; position: sticky; top: 0; z-index: 1; }
.criteria-table thead th:first-child { padding-left: 16px; }
.criteria-table .criterion { padding: 0; border: 0; }
.criteria-table tbody th,.criteria-table tbody td { padding: 5px 4px; height: 44px; border-bottom: 1px solid hsl(var(--border) / .6); vertical-align: middle; }
.criteria-table tbody th { background: white; text-align: left; font-weight: 500; padding-left: 16px; }
.criteria-table tbody tr:last-child th,.criteria-table tbody tr:last-child td { border-bottom: 0; }
.criteria-table tbody tr:hover>th,.criteria-table tbody tr:hover>td { background: hsl(var(--sunken)); }
.criteria-table .criterion-name { padding: 0; min-height: 30px; border: 0; background: transparent; box-shadow: none; color: hsl(var(--foreground)); font-size: 12px; font-weight: 500; line-height: 16px; text-align: left; }
.criterion-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.grade-cell { text-align: center; }
.table-rating { display: inline-block; position: relative; width: 34px; height: 32px; vertical-align: middle; }
.table-rating input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.table-rating span { display: grid; place-items: center; width: 100%; height: 100%; border: 1px solid hsl(var(--border)); border-radius: 6px; background: white; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 500; pointer-events: none; }
.table-rating input:hover+span { border-color: #acbfd8; background: #edf3fc; }
.table-rating input:checked+span { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: white; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15); }
.table-rating input:focus-visible { outline: none; }
.table-rating input:focus-visible+span { outline: 2px solid #8bb0e9; outline-offset: 2px; }
.criteria-table .criterion-tools { padding-right: 12px; }
.criterion-tools>div { display: flex; justify-content: flex-end; gap: 4px; }
.criterion-tool { position: relative; display: inline-grid; place-items: center; padding: 0; min-height: 30px; height: 30px; width: 30px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #65758c; box-shadow: none; }
.criterion-tool .ui-icon { height: 15px; width: 15px; }
.criterion-tool:hover:not(:disabled) { background: #edf3fc; border-color: #dbe3ed; color: #2b5692; }
.clear-tool:hover:not(:disabled) { color: hsl(var(--danger)); background: hsl(var(--danger-soft)); border-color: hsl(var(--danger-line)); }
.criterion-tool:disabled { opacity: .3; }
.example-tool.has-example { color: #2b5692; background: #edf3fc; }
.example-dot { position: absolute; top: 2px; right: 2px; height: 5px; width: 5px; border-radius: 50%; background: currentColor; }
.example-tool.needs-example { color: #966a27; background: #fff8e9; border-color: #efdfbd; }
.example-pending { position: absolute; top: -3px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #966a27; color: white; font-size: 9px; line-height: 12px; text-align: center; }
.criteria-scale-hint { margin-left: 8px; white-space: nowrap; }
.criteria-hint { align-items: center; }
.criteria-hint button { flex: none; min-height: 25px; padding: 3px 7px; font-size: 10px; }
.example-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 0 0 12px; font-size: 11px; color: #637796; }
.example-prompt { font-size: 12px; line-height: 1.5; margin: 0 0 10px; color: #516b91; }
#example-error:empty { display: none; }
#criterion-example-text[aria-invalid=true] { border-color: #b34d45; }
@media (max-width:1150px) { .criteria-scale-hint { display: none; } }
.scoring-reference { display: flex; flex-direction: column; gap: 12px; position: static; min-height: 0; overflow: auto; }
.scoring-reference>.panel { margin: 0; flex: none; }
.scoring-reference .panel-title { padding: 10px 14px; min-height: 42px; }
.scoring-reference .panel-title h2 { font-size: 12px; }
.scoring-reference .radar-wrap { padding: 4px; }
.scoring-reference .radar { max-height: min(280px,36dvh); width: 100%; }
.scoring-reference .radar-key { display: none; }
.scoring-scale { padding: 12px 14px; }
.scoring-scale .scale-list { gap: 8px; }
.scoring-scale .scale-list>div { font-size: 10px; line-height: 14px; gap: 8px; }
.scoring-scale .score { width: 23px; height: 23px; flex: none; font-size: 10px; }
.scoring-main .sticky-save { flex: none; position: static; margin: 0; min-height: 56px; padding: 9px 14px; }
.scoring-main .sticky-save button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
#criterion-example-form .criterion-description { margin: 0 0 18px; font-size: 13px; line-height: 1.6; }
#criterion-example-form label.field { margin-bottom: 8px; }
#criterion-example-text { width: 100%; min-height: 140px; }
#criterion-example-form .subtle { margin: 8px 0 0; font-size: 11px; }
@media (max-height:700px) and (min-width:761px) {
  main.scoring-main { gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .scoring-profile-head h1 { font-size: 19px; line-height: 23px; }
  .criteria-table tbody th,.criteria-table tbody td { height: 34px; padding-top: 2px; padding-bottom: 2px; }
  .table-rating { height: 28px; width: 30px; }
  .criteria-table-panel .panel-title { min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
  .criteria-hint { padding-top: 4px; padding-bottom: 4px; }
  .scoring-reference .radar { max-height: 31dvh; }
  .scoring-scale { padding: 9px 12px; }
  .scoring-scale .scale-list { gap: 5px; }
}
@media (min-width:761px) and (max-width:1150px) {
  .scoring-grid { grid-template-columns: minmax(0,1fr) 215px; gap: 12px; }
  .criteria-table .grade-col { width: 34px; }
  .criteria-table .criterion-tools-col { width: 74px; }
  .criteria-table tbody th,.criteria-table thead th:first-child { padding-left: 10px; }
  .criteria-table .criterion-name { font-size: 11px; }
  .criteria-table .criterion-tools { padding-right: 8px; }
  .table-rating { width: 29px; }
}
@media (max-width:900px) { main.scoring-main { padding: 10px 14px 14px; } }
@media (max-width:760px) {
  .scoring-shell { height: auto; min-height: 100dvh; overflow: visible; }
  .scoring-shell .app-content { overflow: visible; }
  main.scoring-main { overflow: visible; gap: 10px; padding: 10px; }
  .scoring-grid { display: flex; flex-direction: column; gap: 12px; }
  .criteria-table-scroll { overflow: visible; }
  .criteria-table { height: auto; }
  .criteria-table tbody th,.criteria-table tbody td { height: 42px; padding: 3px 2px; }
  .criteria-table .grade-col { width: 30px; }
  .criteria-table .criterion-tools-col { width: 64px; }
  .criteria-table .criterion-name { font-size: 11px; line-height: 14px; }
  .criteria-table tbody th,.criteria-table thead th:first-child { padding-left: 10px; }
  .criteria-table .criterion-tools { padding-right: 6px; }
  .table-rating { width: 26px; height: 30px; }
  .criterion-tools>div { gap: 2px; }
  .criterion-tool { width: 27px; }
  .criteria-table-panel .panel-title { padding-left: 10px; padding-right: 10px; }
  .criteria-hint { padding-left: 10px; padding-right: 10px; font-size: 10px; }
  .scoring-reference { display: grid; grid-template-columns: minmax(0,1fr) minmax(140px,.8fr); overflow: visible; gap: 10px; }
  .scoring-reference .radar { max-height: 200px; }
  .scoring-reference .panel-title { display: none; }
  .scoring-stepbar>.count-note { display: none; }
  .scoring-main .sticky-save { position: sticky; z-index: 4; bottom: 0; padding: 9px 10px; }
  .scoring-main .sticky-save small { font-size: 10px; }
  .scoring-main .sticky-save .actions { width: auto; flex-wrap: nowrap; }
  .scoring-main .sticky-save { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .scoring-main .sticky-save button { padding: 6px 8px; font-size: 11px; }
  .scoring-profile-head h1 { font-size: 18px; line-height: 23px; }
}
@media (max-width:360px) {
  .criteria-table .grade-col { width: 26px; }
  .criteria-table .criterion-tools-col { width: 58px; }
  .table-rating { width: 23px; }
  .criterion-tool { width: 25px; }
  .scoring-reference { grid-template-columns: 1fr; }
}
@media print {
  .scoring-shell,main.scoring-main { height: auto; overflow: visible; display: block; }
  .scoring-grid { display: block; }
  .criterion-tools,.scoring-stepbar { display: none; }
  .criteria-table { height: auto; }
}
