:root {
  --primary: #286574; --secondary: #347c8c; --accent: #50c5b4;
  --primary-fg: #edf3f1; --body-fg: #edf3f1; --body-bg: #111719;
  --body-quiet-color: #9aacab; --body-loud-color: #edf3f1;
  --header-color: #edf3f1; --header-branding-color: #edf3f1; --header-bg: #286574;
  --header-link-color: #edf3f1; --breadcrumbs-fg: #9aacab;
  --breadcrumbs-link-fg: #edf3f1; --breadcrumbs-bg: #192225;
  --link-fg: #74d4c6; --link-hover-color: #b1f2e6; --link-selected-fg: #74d4c6;
  --hairline-color: #304045; --border-color: #304045; --darkened-bg: #192225;
  --selected-bg: #243337; --selected-row: #233c40; --close-button-bg: #304045;
  --button-fg: #edf3f1; --button-bg: #347c8c; --button-hover-bg: #428d9c;
  --default-button-bg: #347c8c; --default-button-hover-bg: #428d9c;
  --error-fg: #ffb2ac; --message-success-bg: #203c33; --message-warning-bg: #443927;
  --message-error-bg: #462b2b; --object-tools-fg: #edf3f1;
  --object-tools-bg: #347c8c; --object-tools-hover-bg: #428d9c;
  color-scheme: dark;
}
body { font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; }
#header { min-height: 66px; box-sizing: border-box; padding: 12px 28px; gap: 24px; }
.sd-workspace #header { height: auto; flex-shrink: 0; }
.sd-brand { display: flex; align-items: center; gap: 16px; color: #edf3f1 !important; }
.sd-brand-logo { display: block; width: 80px; max-width: 100%; height: auto; }
.sd-brand strong { font-size: 23px; letter-spacing: -.6px; }
.sd-brand span { font-size: 12px; font-weight: 400; opacity: .83; }
#user-tools { font-size: 12px; letter-spacing: 0; text-transform: none; }
#user-tools a, #logout-form button { text-decoration: none; border: 0; }
div.breadcrumbs { padding: 11px 28px; border-bottom: 1px solid #304045; font-size: 12px; }
.sd-workspace #main { display: grid; grid-template-columns: 238px minmax(0, 1fr); align-items: start; }
#content-start { min-width: 0; width: auto; margin-left: 0; }
#content { padding: 28px 32px 42px; box-sizing: border-box; }
.sd-sidebar { box-sizing: border-box; min-height: calc(100vh - 104px); background: #161e21;
  border-right: 1px solid #304045; padding: 30px 18px; position: sticky; top: 0; }
.sd-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: #9aacab; }
.sd-sidebar > .sd-eyebrow { margin-left: 12px; }
.sd-sidebar-title { color: #edf3f1; margin: 8px 12px 25px; font-size: 13px; }
.sd-sidebar nav { display: grid; gap: 6px; }
.sd-sidebar nav a { color: #b8c8c8; padding: 12px; border-radius: 7px; font-weight: 500; }
.sd-sidebar nav a:hover { background: #243337; color: #edf3f1; }
.sd-sidebar nav .sd-nav-active { color: #9bebdf; background: #21363b; }
.sd-sidebar-foot { margin: 65px 12px 0; font-size: 12px; color: #9aacab; }
.sd-sidebar-foot small { display: block; margin: 8px 0 0 13px; font-size: 11px; }
.sd-dot { display: inline-block; width: 6px; height: 6px; background: #50c5b4; border-radius: 50%; margin-right: 5px; }
.sd-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sd-page-heading h1 { font-size: 28px; font-weight: 600; color: #edf3f1; margin: 8px 0; letter-spacing: -.7px; }
.sd-page-heading p { color: #9aacab; margin: 0; }
.sd-panel { background: #192225; border: 1px solid #304045; border-radius: 10px; min-width: 0; overflow: hidden; }
.sd-panel-body { padding: 24px; }
.sd-ai-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.sd-ai-comparison > div, .sd-ai-comparison > section { min-width: 0; }
.sd-ai-proposal { border: 1px solid var(--border-color); border-radius: 6px; padding: 16px; background: var(--body-bg); }
.sd-ai-proposal label { display: block; font-weight: 600; margin-bottom: 8px; }
.sd-ai-proposal textarea { width: 100%; box-sizing: border-box; min-height: 42px; margin-bottom: 12px; padding: 10px 12px; resize: vertical; font: inherit; line-height: 1.55; color: var(--body-fg); background: var(--darkened-bg); border: 1px solid var(--border-color); border-radius: 6px; }
.sd-ai-proposal small { display: block; margin-top: 8px; color: var(--body-quiet-color); }
.sd-ai-proposal p { overflow-wrap: anywhere; }
.sd-ai-cause { border-bottom: 1px solid var(--border-color); margin-bottom: 16px; padding-bottom: 12px; }
.sd-ai-collapsed { grid-template-columns: 1fr; }
.sd-ai-proposal[hidden], [data-discard-proposal][hidden], [data-restore-proposal][hidden] { display: none; }
.sd-score-comparison:has([data-ai-comparison]) { grid-template-columns: 1fr; align-items: start; }
.sd-score-comparison:has([data-ai-comparison]) .sd-score-field { display: block; }
@media (max-width: 760px) { .sd-ai-comparison { grid-template-columns: 1fr; } }
.sd-panel h2 { padding: 0; margin: 0 0 10px; color: #edf3f1; background: none; font-size: 17px; font-weight: 600; }
.sd-panel h3 { font-size: 14px; color: #edf3f1; margin: 0; }
.sd-muted, .sd-help { color: #9aacab; }
.sd-help { font-size: 12px; line-height: 1.65; }
.sd-panel-body > p.sd-muted { margin-bottom: 22px; }
.sd-stats { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 16px; margin-bottom: 24px; }
.sd-stats > div { border: 1px solid #304045; background: #192225; border-radius: 10px; padding: 20px 24px; }
.sd-stats span, .sd-stats small { display: block; color: #9aacab; font-size: 12px; }
.sd-stats strong { display: block; font-size: 32px; font-weight: 600; margin: 8px 0; }
.sd-stats p { margin: 13px 0; font-size: 16px; }
.sd-filters { display: flex; align-items: flex-end; gap: 14px; padding: 20px 24px; border-bottom: 1px solid #304045; }
.sd-filters .sd-field { margin: 0; flex: 1; }
.sd-filters .sd-field:first-child { flex: 2; }
.sd-field { margin: 0 0 20px; min-width: 0; }
.sd-field label { display: block; color: #b8c8c8; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.sd-field input:not([type=checkbox]), .sd-field select, .sd-field textarea {
  display: block; width: 100%; box-sizing: border-box; background: #111a1d; color: #edf3f1;
  border: 1px solid #3c5157; border-radius: 6px; padding: 10px 12px; min-height: 41px;
  font-family: inherit; font-size: 14px; line-height: 1.55;
}
.sd-field textarea { resize: vertical; }
.sd-field small { display: block; margin-top: 8px; color: #9aacab; }
input:focus, textarea:focus, select:focus { outline: 2px solid #50c5b4; outline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #50c5b4; outline-offset: 3px; }
.sd-field-error input, .sd-field-error textarea { border-color: #ffb2ac; }
.errorlist { margin: 8px 0; padding: 0; list-style: none; color: #ffb2ac; font-size: 12px; }
.errorlist li { color: #ffb2ac; background: transparent; }
.sd-error-summary { padding: 16px 20px; border: 1px solid #875b57; background: #462b2b; color: #ffd1cd; border-radius: 7px; margin-bottom: 22px; }
.sd-button, a.sd-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-decoration: none;
  padding: 11px 17px; border: 1px solid #40575d; border-radius: 6px; background: #253237; color: #edf3f1; cursor: pointer; }
.sd-button:hover { background: #30464c; color: #edf3f1; }
.sd-primary, a.sd-primary { background: #347c8c; border-color: #347c8c; }
.sd-primary:hover { background: #428d9c; }
.sd-button:disabled { opacity: .45; cursor: default; background: #253237; border-color: #40575d; }
.sd-small, a.sd-small { padding: 8px 12px; font-size: 12px; }
.sd-full { width: 100%; }
.sd-link-button { font-family: inherit; border: 0; background: none; color: #74d4c6; font-size: 12px; padding: 5px 0; cursor: pointer; white-space: nowrap; }
.sd-discard-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.sd-discard-button { color: var(--body-quiet-color); }
.sd-discard-button:hover { color: var(--link-hover-color); }
.sd-discard-button:disabled { opacity: .6; cursor: wait; }
.sd-discard-section + .sd-discard-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.sd-table-wrap { overflow-x: auto; position: relative; }
table.sd-table { width: 100%; border-collapse: collapse; }
.sd-table thead th { background: #1e2a2e; color: #9aacab; font-weight: 500; text-transform: none; font-size: 11px; padding: 13px 18px; border-bottom: 1px solid #304045; white-space: nowrap; }
.sd-table td { padding: 20px 18px; border-bottom: 1px solid #304045; vertical-align: middle; font-size: 13px; background: transparent; }
.sd-table tr:last-child td { border-bottom: 0; }
.sd-table .sd-table-title { display: block; font-size: 14px; font-weight: 600; color: #edf3f1; }
.sd-table-title:hover { color: #74d4c6; }
.sd-table td small { display: block; color: #9aacab; margin-top: 7px; font-size: 11px; }
.sd-table td.sd-list-dates .sd-production-date { white-space: nowrap; }
.sd-table td .sd-mock-label { color: #d3b989; }
.sd-number { font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-nowrap { white-space: nowrap; }
.sd-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sd-badge-rascunho { background: #343b40; color: #c0cdd3; border: 1px solid #4b5961; }
.sd-badge-revisao { background: #3d3526; color: #e6c78f; border: 1px solid #6b5733; }
.sd-badge-cancelada { background: #3b2b2e; color: #e6b4bb; border: 1px solid #71434a; }
.sd-badge-publicada { background: #263e35; color: #a6dec3; border: 1px solid #466c59; }
.sd-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sd-row-actions form { margin: 0; }
.sd-order-controls { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sd-order-controls > span { min-width: 22px; color: var(--body-quiet-color); font-size: 12px; font-variant-numeric: tabular-nums; }
.sd-order-controls button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--border-color);
  border-radius: 4px; background: var(--body-bg); color: var(--link-fg); font: inherit; cursor: pointer; }
.sd-order-controls button:disabled { opacity: .35; cursor: default; }
.sd-order-ready .sd-dimension-index { display: none; }
.sd-dimension-option.sd-order-ready { flex-wrap: wrap; }
.sd-dimension-option.sd-order-ready > span { flex: 1 1 10rem; min-width: 0; overflow-wrap: anywhere; }
.sd-analysis-heading { align-items: flex-start; flex-wrap: wrap; }
.sd-analysis-heading-actions { display: grid; justify-items: end; gap: 12px; margin-left: auto; }
.sd-analysis-heading-actions .sd-analysis-actions { justify-content: flex-end; }
.sd-analysis-form .sd-section-heading { flex-wrap: wrap; }
.sd-section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.sd-back-to-top { display: inline-block; padding: 5px 0; font-size: 12px; white-space: nowrap; }
.sd-page-navigation { align-items: center; flex-wrap: wrap; font-size: 13px; }
.sd-analysis-form .sd-action-bar { flex-wrap: wrap; }
.sd-analysis-form .sd-action-bar > .sd-analysis-actions { flex-wrap: wrap; margin-left: auto; }
.sd-preview .sd-section-heading h2 { margin: 10px 0 0; }
.sd-cancel-button { color: #e6b4bb; border-color: #71434a; }
.sd-cancel-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.sd-cancel-notice > div { flex: 1; min-width: 220px; }
.sd-cancel-notice form { margin: 0; }
.sd-empty { text-align: center; padding: 48px !important; color: #9aacab; }
.sd-pagination { padding: 16px 24px; border-top: 1px solid #304045; color: #9aacab; display: flex; justify-content: space-between; font-size: 12px; }
.sd-pagination a { margin-left: 15px; }
.sd-steps { margin: 0 0 24px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #304045; background: #192225; border-radius: 8px; overflow: hidden; }
.sd-steps li { padding: 15px 18px; color: #9aacab; font-size: 12px; display: flex; align-items: center; gap: 9px; border-right: 1px solid #304045; }
.sd-steps li:last-child { border: 0; }
.sd-steps li > span { display: inline-grid; place-items: center; border: 1px solid #52666d; border-radius: 50%; width: 23px; height: 23px; flex-shrink: 0; }
.sd-steps li.sd-step-active { background: #21363b; color: #9bebdf; }
.sd-step-active > span { border-color: #50c5b4 !important; color: #9bebdf; }
.sd-steps small { font-size: 9px; color: #9aacab; margin-left: auto; }
.sd-step-disabled { opacity: .65; }
.sd-preparation-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sd-stack { display: grid; gap: 22px; min-width: 0; }
.sd-two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sd-two-columns > .sd-field { margin-bottom: 0; }
.sd-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sd-section-heading p { margin: 0; font-size: 13px; }
.sd-label-action { float: right; margin-top: -1px; }
.sd-dimension-list { display: grid; gap: 10px; }
.sd-dimension-option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #304045; border-radius: 7px; padding: 14px; cursor: pointer; }
.sd-dimension-option:has(input:checked) { border-color: #478f93; background: #1e3338; }
.sd-dimension-option input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: #50c5b4; flex-shrink: 0; }
.sd-dimension-option strong { display: block; font-size: 13px; font-weight: 600; }
.sd-dimension-option small { display: block; color: #9aacab; line-height: 1.55; margin-top: 5px; font-size: 12px; }
.sd-dimension-picker { display: flex; align-items: flex-end; gap: 12px; }
.sd-dimension-picker > .sd-field { flex: 1; margin-bottom: 0; }
.sd-dimension-picker > .sd-button { flex-shrink: 0; }
.sd-dimension-description { min-height: 18px; margin: 8px 0 16px; }
.sd-dimension-selected { cursor: default; border-color: #478f93; background: #1e3338; }
.sd-dimension-selected > span { flex: 1; min-width: 0; }
.sd-dimension-selected > button { flex-shrink: 0; }
.sd-format { background: #142025; border-radius: 6px; border: 1px solid #30464c; padding: 16px; }
.sd-format summary { cursor: pointer; color: #b8c8c8; font-size: 12px; font-weight: 600; }
.sd-format summary span { float: right; font-weight: 400; font-size: 10px; color: #9aacab; }
.sd-format p { line-height: 1.7; color: #9aacab; font-size: 12px; }
.sd-methodology { margin-top: 18px; max-height: 580px; overflow-y: auto; padding-right: 12px; scrollbar-gutter: stable; color: #b8c8c8; font-size: 12px; line-height: 1.7; }
.sd-methodology h3 { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.sd-methodology h4 { color: #9bebdf; font-size: 12px; font-weight: 600; margin: 24px 0 10px; padding-top: 16px; border-top: 1px solid #304045; }
.sd-methodology h5 { font-size: 12px; margin: 15px 0 8px; color: #edf3f1; }
.sd-methodology p { margin: 0 0 12px; }
.sd-methodology ul, .sd-methodology ol { padding-left: 21px; margin: 8px 0 14px; }
.sd-methodology li { margin-bottom: 9px; padding: 0; font-size: inherit; line-height: inherit; }
.sd-methodology-scale { width: 100%; border-collapse: collapse; font-size: 12px; }
.sd-methodology-scale th, .sd-methodology-scale td { padding: 9px 10px; font-size: inherit; border-bottom: 1px solid #304045; }
.sd-methodology-scale th { background: #213238; color: #b8c8c8; font-weight: 600; }
.sd-methodology-scale td { background: transparent; }
.sd-action-bar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 25px 0 8px; padding: 20px 0 0; border-top: 1px solid #304045; }
.sd-action-bar > div { display: flex; gap: 10px; }
.sd-action-bar > a { font-size: 13px; }
.sd-align-right { text-align: right; }
.sd-notice { border: 1px solid #665332; background: #302b21; color: #dfcfae; border-radius: 7px; padding: 14px 18px; font-size: 13px; margin: 0 0 24px; line-height: 1.65; }
.sd-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.sd-preview { position: sticky; top: 22px; }
.sd-preview h2 { margin: 10px 0 20px; }
.sd-preview-summary { flex: 0 0 auto; }
.sd-preview-summary .sd-indicators { margin-top: 16px; }
.sd-preview-summary > .sd-help { margin: 12px 0; }
.sd-preview-scroll { min-width: 0; }
.sd-preview-scroll > .sd-bars { margin: 16px 0; }
.sd-preview-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 1081px) {
  .sd-review-layout > .sd-preview { display: flex; flex-direction: column; box-sizing: border-box;
    max-height: calc(100vh - 44px); max-height: calc(100dvh - 44px); }
  .sd-preview-scroll { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
}
/* Em janelas muito baixas, o painel inteiro rola para manter todas as notas acessíveis. */
@media (min-width: 1081px) and (max-height: 520px) {
  .sd-review-layout > .sd-preview { overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
  .sd-preview-scroll { flex: 0 0 auto; overflow: visible; }
}
.sd-indicators { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sd-indicators > div { border: 1px solid #304045; background: #142025; padding: 15px 12px; border-radius: 8px; }
.sd-indicators small { color: #9aacab; display: block; font-size: 11px; white-space: nowrap; }
.sd-indicators strong { font-size: 32px; font-weight: 600; color: #84ded0; display: block; margin-top: 9px; font-variant-numeric: tabular-nums; }
.sd-bars { margin: 26px 0; display: grid; gap: 20px; }
.sd-bar-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; margin-bottom: 8px; }
.sd-bar-track { height: 7px; background: #304045; border-radius: 4px; overflow: hidden; }
.sd-bar-track > span { display: block; height: 100%; width: 0; background: #50c5b4; border-radius: 4px; transition: width .15s; }
.sd-definition { color: #b8c8c8; font-size: 13px; line-height: 1.65; border-left: 2px solid #347c8c; padding-left: 13px; margin-bottom: 20px; }
.sd-dimension-index { color: #697d84; font-size: 21px; }
.sd-score-field { display: flex; align-items: center; gap: 12px; }
.sd-score-field .sd-field { width: 120px; }
.sd-score-field > span { margin-top: 3px; font-size: 13px; }
.sd-references-group { border-top: 1px solid #304045; padding-top: 18px; margin-top: 24px; position: relative; }
.sd-causes { border-top: 1px solid #304045; padding-top: 18px; margin-top: 24px; }
.sd-references-toolbar { position: absolute; top: 14px; right: 0; }
.sd-references summary { cursor: pointer; color: #d7e4e2; font-size: 13px; padding: 5px 150px 5px 0; line-height: 1.8; }
.sd-source-count { color: #a8bab7; font-size: 11px; margin-left: 8px; white-space: nowrap; }
.sd-source-pending { display: inline-block; color: #efba91; font-size: 11px; margin-left: 8px; }
.sd-references-content { margin-top: 14px; }
.sd-source { padding: 15px; border: 1px solid #304045; border-radius: 6px; background: #152024; margin-top: 12px; }
.sd-source-content { min-width: 0; border: 0; padding: 0; margin: 0; }
.sd-source-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sd-source-date-option { display: flex; gap: 8px; align-items: center; color: #a8bab7; font-size: 12px; margin-bottom: 14px; }
.sd-manus-status { margin-bottom: 24px; }
.sd-manus-status .sd-format { margin-top: 16px; }
.sd-json { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 400px; overflow: auto; font-size: 12px; }
.sd-source-fields .sd-field { margin: 0 0 10px; }
.sd-source-fields .sd-field input { font-size: 12px; min-height: 38px; }
.sd-delete-source { font-size: 11px; color: #9aacab; display: inline-flex; align-items: center; gap: 7px; }
.sd-delete-source input { accent-color: #d1a083; }
.sd-remove-source { color: #e6b4bb; }
.sd-source-deleted { border-color: #665332; background: #24251e; }
.sd-source-removed { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.sd-source-removed strong { display: block; font-size: 12px; color: #dfcfae; overflow-wrap: anywhere; }
.sd-source-removed span { display: block; margin-top: 5px; color: #b8c8c8; font-size: 11px; }
.sd-dialog { width: min(480px, calc(100% - 48px)); border: 1px solid #40575d; border-radius: 12px; background: #192225; color: #edf3f1; padding: 26px; box-sizing: border-box; box-shadow: 0 24px 90px #0008; }
.sd-dialog::backdrop { background: #050d11b8; }
.sd-dialog h2 { font-size: 19px; margin: 0; }
.sd-dialog-close { border: 0; background: none; color: #b8c8c8; font-size: 26px; cursor: pointer; padding: 0 4px; }
.sd-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.sd-dialog-errors { font-size: 12px; color: #ffb2ac; margin-bottom: 16px; }
.sd-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.sd-dev-label { display: block; margin-top: 6px; font-weight: 600; color: #efca7e; }
.sd-mock-generator, .sd-source-snapshot { margin-bottom: 24px; }
.sd-source-snapshot summary { cursor: pointer; font-weight: 700; }
.sd-gapmap-comparison { margin-bottom: 24px; }
.sd-gapmap-indicators { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0; }
.sd-gapmap-indicators small { white-space: normal; line-height: 1.6; }
.sd-gapmap-indicators .sd-secondary-value { font-size: 21px; margin: 5px 0 0; }
.sd-indicators .sd-origin-indicator strong { color: #b7c9d2; }
.sd-comparison-table th:not(:first-child), .sd-comparison-table td:not(:first-child) { text-align: right; }
.sd-gap-value[data-negativo="true"] { color: #efba91; }
.sd-score-comparison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; margin: 15px 0; }
.sd-fixed-score { padding: 15px; border: 1px solid #304045; border-radius: 8px; }
.sd-fixed-score small { display: block; color: #a8bab7; font-size: 11px; line-height: 1.6; }
.sd-fixed-score strong { display: block; font-size: 25px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.sd-score-comparison .sd-score-field { margin: 0; }
.sd-score-comparison .sd-score-field .sd-field { margin: 0; width: 100%; }
.sd-comparison-bar h3 { font-size: 13px; margin: 0 0 12px; }
.sd-comparison-bar > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 7px; }
.sd-comparison-bar .sd-bar-track { display: block; margin-bottom: 13px; }
.sd-origin-track > span { background: #9eb7c5; }
.sd-chart-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: #b8c8c8; }
.sd-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sd-chart-legend i { width: 9px; height: 9px; border-radius: 2px; }
.sd-origin-color { background: #9eb7c5; }
.sd-potential-color { background: #50c5b4; }
@media (max-width: 760px) {
  .sd-gapmap-indicators, .sd-score-comparison { grid-template-columns: 1fr; }
}
input:disabled, textarea:disabled, select:disabled { opacity: .65; }
/* Mantém os cadastros nativos do Django dentro da mesma cozinha. */
.module { border: 1px solid #304045; border-radius: 8px; overflow: hidden; }
.module h2, .module caption, .inline-group h2 { background: #25383e; }
.form-row { border-bottom-color: #304045; padding: 16px; }
.submit-row { border: 1px solid #304045; background: #192225; border-radius: 8px; }
.submit-row input { border-radius: 6px; }
.form-row input[type=text], .form-row textarea { background: #111a1d; border-color: #3c5157; padding: 10px; box-sizing: border-box; max-width: 100%; }
.login #main, .popup #main, #main:not(:has(.sd-sidebar)) { display: block; }
.login #content { padding: 24px; }
.login #header { padding: 15px 24px; }
.login .sd-brand { justify-content: center; width: 100%; }
.login .sd-brand-logo { width: 176px; }
.login .sd-brand span { display: none; }
.login .submit-row { border: 0; background: transparent; border-radius: 0; }
@media (max-width: 1350px) {
  .sd-review-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .sd-source-fields { grid-template-columns: 1fr 1fr; }
  .sd-steps li { padding: 13px 10px; gap: 7px; }
}
@media (max-width: 1080px) {
  .sd-workspace #main { grid-template-columns: 195px minmax(0, 1fr); }
  #content { padding: 24px; }
  .sd-sidebar { padding: 26px 12px; }
  .sd-preparation-grid, .sd-review-layout { grid-template-columns: 1fr; }
  .sd-preview { position: static; grid-row: 1; }
  .sd-preview .sd-indicators { max-width: 340px; }
  .sd-stats { grid-template-columns: 1fr 1fr; }
  .sd-stat-note { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  #header { padding: 13px 18px; flex-wrap: wrap; gap: 12px; }
  .sd-workspace #header { flex-wrap: nowrap; align-items: flex-start; }
  #header #user-tools { margin: 0; text-align: left; }
  .sd-workspace #main { display: block; }
  .sd-sidebar { min-height: 0; position: static; padding: 14px 18px; border-right: 0; border-bottom: 1px solid #304045; }
  .sd-sidebar > .sd-eyebrow, .sd-sidebar-title, .sd-sidebar-foot { display: none; }
  .sd-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .sd-sidebar nav a { padding: 9px 10px; font-size: 12px; }
  #content { padding: 22px 16px; }
  div.breadcrumbs { padding: 10px 18px; }
  .sd-page-heading { align-items: flex-start; flex-wrap: wrap; }
  .sd-page-heading h1 { font-size: 25px; }
  .sd-stats { gap: 10px; }
  .sd-stats > div { padding: 16px; }
  .sd-steps { grid-template-columns: 1fr 1fr; }
  .sd-steps li:nth-child(-n+2) { border-bottom: 1px solid #304045; }
  .sd-steps li:nth-child(2) { border-right: 0; }
  .sd-filters { flex-wrap: wrap; padding: 18px; }
  .sd-filters .sd-field:first-child { flex-basis: 100%; }
  .sd-panel-body { padding: 20px 18px; }
  .sd-two-columns, .sd-source-fields { grid-template-columns: 1fr; gap: 0; }
  .sd-two-columns > .sd-field { margin-bottom: 20px; }
  .sd-source-fields > :last-child { max-width: 100%; }
  .sd-references-toolbar { position: static; display: flex; justify-content: flex-end; margin-bottom: 5px; }
  .sd-references summary { padding-right: 0; }
  .sd-action-bar { align-items: flex-start; flex-wrap: wrap; }
  .sd-action-bar > div { flex-wrap: wrap; }
  .sd-align-right { text-align: left; }
}

.sd-badge-analisando, .sd-badge-aguardando_envio { background: #253d49; color: #a9d8ef; border: 1px solid #426477; }
.sd-methodology { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 26rem; overflow: auto; margin-top: 14px; }
.sd-badge-incerta { background: #3d3526; color: #e6c78f; border: 1px solid #6b5733; }
.sd-badge-aguardando, .sd-badge-falhou { background: #3b2b2e; color: #e6b4bb; border: 1px solid #71434a; }
.sd-pesquisa-destaque > td { background: #253d49; }
[data-pesquisa-confirmacao]:focus, #manus-acompanhamento:focus, [data-refresh-warning]:focus { outline: 2px solid #a9d8ef; outline-offset: 3px; }
[data-pesquisa-confirmacao], .sd-manus-status { overflow-wrap: anywhere; }
.sd-refresh-actions { flex-wrap: wrap; }
.sd-refresh-actions .sd-help { flex: 1 1 20rem; }
.sd-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
