/* ==========================================================================
   SGCB Design System
   Fundação: regras que viviam em app.css e identity.css, aposentados em
   27/11/2026. Ficam no início do arquivo para manter a mesma cascata de antes
   (app.css → identity.css → design system). Ao refatorar uma tela, prefira
   mover a regra para o componente correspondente abaixo.
   ========================================================================== */

/* --- Fundação migrada de app.css (ordem original preservada) --- */

:root {
  font-family: Segoe UI,Arial,sans-serif;
  color: #172033;
  background: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
}

a {
  color: #1769aa;
}

.site-header {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 12px 18px;
  background: var(--blue);
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.site-header nav>a,
.site-header summary {
  color: #dbe9fa;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.site-header summary::-webkit-details-marker {
  display: none;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.user-box form {
  margin: 0;
}

.site-header button,
button,
.button {
  background: var(--blue2);
  color: white;
  border: 0;
  border-radius: 7px;
  padding: 9px 14px;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #e7edf5;
  color: #17365d;
}

.danger-button {
  background: var(--danger) !important;
}

main {
  max-width: 1240px;
  margin: 28px auto;
  padding: 0 20px;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

h2 {
  font-size: 19px;
  margin: 0 0 14px;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
  gap: 14px;
}

.summary-grid article,
.grid article,
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

.summary-grid article span,
.grid article span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-grid article strong,
.grid article strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}

.summary-grid .value-sm {
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.section-gap {
  margin-top: 18px;
}

.card {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e6eaf0;
  vertical-align: top;
}

th {
  font-size: 13px;
  color: #344054;
}

td {
  font-size: 14px;
}

.actions-cell {
  white-space: nowrap;
}

.actions-cell>a,
.actions-cell form {
  margin-right: 10px;
}

.inline {
  display: inline;
}

.link-danger {
  background: none;
  color: var(--danger);
  padding: 0;
}

.danger {
  color: var(--danger) !important;
}

.danger-card {
  border-color: #e1bcbc;
}

.muted {
  color: var(--muted);
  margin-top: 4px;
}

.small {
  font-size: 12px;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  text-decoration: none;
}

.badge,
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  background: #e7f6ec;
  color: #18723a;
}

.badge.warning {
  background: #fff3d6;
  color: #8a5a00;
}

.badge.neutral {
  background: #eef2f6;
  color: #344054;
}

.tag {
  background: #eef5fb;
  color: #194f82;
  margin: 2px 4px 2px 0;
}

.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.form-card {
  max-width: 780px;
}

.field-row {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field-row label {
  font-weight: 600;
}

.field-row small {
  color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
select,
textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid #cbd4df;
  border-radius: 6px;
  background: white;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: auto;
  -webkit-appearance: auto;
}

.field-error input:not([type="checkbox"]):not([type="radio"]),
.field-error select,
.field-error textarea {
  border-color: #b42318;
}

.error-text {
  color: #b42318;
  font-size: 14px;
  margin: 4px 0;
  padding-left: 0;
  list-style: none;
}

.calculation-box {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: #eef5fb;
  border: 1px solid #cbddeb;
  border-radius: 8px;
  padding: 14px;
  margin: 8px 0 18px;
}

.calculation-box strong {
  font-size: 18px;
}

.msg {
  padding: 10px 12px;
  background: #e8f4eb;
  border: 1px solid #b9d9c0;
  border-radius: 7px;
  margin-bottom: 12px;
}

.msg.error {
  background: #fff0ef;
  border-color: #f3b8b4;
  color: #8e1c14;
}

.filter-bar {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 14px;
}

.filter-bar input {
  max-width: 380px;
}

.filter-bar select {
  max-width: 230px;
}

.filter-grid {
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 12px;
  margin: 18px 0;
}

.impact-grid>div {
  background: #f7f8fa;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  padding: 14px;
}

.impact-grid span {
  display: block;
  color: var(--muted);
}

.impact-grid strong {
  font-size: 28px;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin: 14px 0;
}

.danger-alert {
  background: #fff0ef;
  color: #8e1c14;
  border: 1px solid #f3b8b4;
}

.details {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.details dt {
  font-weight: 600;
  color: var(--sgcb-ink-soft);
}

.details dd {
  margin: 0;
}

.workspace-link,
.activity {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f4;
  text-decoration: none;
}

.workspace-link span,
.activity span {
  color: var(--muted);
  font-size: 13px;
}

.audit-table details summary {
  cursor: pointer;
  color: #1769aa;
}

.audit-json {
  min-width: 360px;
}

.audit-json pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f8fa;
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
}

.login {
  max-width: 420px;
  margin: 80px auto;
}

@media (max-width:800px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .site-header nav {
    order: 3;
    width: 100%;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .page-head,
  .title-row,
  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input,
  .filter-bar select {
    max-width: none;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .user-box {
    margin-left: auto;
  }
}

.badge.danger-badge {
  background: #fff0ef;
  color: #8e1c14;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-row input {
  flex: 1;
}

.public-body {
  background: #eef3f8;
}

.public-main {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px;
}

.public-card {
  padding: 28px;
}

.info-alert {
  background: #eef5fb;
  border: 1px solid #cbddeb;
  color: #17365d;
}

.public-card .impact-grid strong.value-sm {
  font-size: 18px;
}

@media (max-width:800px) {
  .copy-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.process-selector {
  display: grid;
  gap: 12px;
  width: 100%;
}

.process-selector-toolbar {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  background: var(--sgcb-canvas-subtle);
}

.process-selector-search {
  width: 100%;
  min-width: 0;
  margin: 0;
  background: #fff;
}

.process-selector-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button.process-mini-button {
  padding: 7px 10px;
  border: 1px solid #c6d5e5;
  border-radius: 7px;
  background: #fff;
  color: #174f82;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}

button.process-mini-button:hover {
  background: #edf5fc;
  border-color: #9dbbd8;
}

.process-selector-count {
  grid-column: 1/-1;
  display: inline-flex;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf1f8;
  color: #46617d;
  font-size: 12px;
  font-weight: 600;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.process-option {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 13px 14px;
  margin: 0;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.process-option:hover {
  border-color: #9ebbd6;
  background: #f8fbfe;
}

.process-option.is-selected {
  border-color: #1769aa;
  background: #edf6fd;
  box-shadow: 0 0 0 2px rgba(23,105,170,.10);
}

.process-option input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  accent-color: #1769aa;
  cursor: pointer;
}

.process-option-body {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 2px 8px;
  align-items: baseline;
  min-width: 0;
}

.process-option-title {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--sgcb-navy);
  white-space: nowrap;
}

.process-option-name {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: #26364a;
  overflow-wrap: anywhere;
}

.process-option-meta {
  grid-column: 1/-1;
  display: block;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid #e8edf3;
  font-size: 12px;
  line-height: 1.4;
  color: var(--sgcb-ink-soft);
}

.process-option.is-selected .process-option-meta {
  border-top-color: #d4e6f4;
}

.process-option-empty {
  padding: 16px;
  border: 1px dashed #cbd4df;
  border-radius: 9px;
  background: #fafbfc;
  color: var(--sgcb-ink-soft);
  text-align: center;
  font-size: 13px;
}

@media (max-width:700px) {
  .process-selector-toolbar {
    grid-template-columns: 1fr;
  }

  .process-selector-actions {
    justify-content: flex-start;
  }

  .process-selector-count {
    grid-column: auto;
  }

  .process-option-body {
    grid-template-columns: 1fr;
  }

  .process-option-name,
  .process-option-meta {
    grid-column: 1;
  }
}

.activity-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 8px;
  width: 100%;
}

.activity-checklist>div {
  min-width: 0;
}

.activity-checklist>div>label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d8e0e9;
  border-radius: 8px;
  background: #fff;
  color: #26364a;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.activity-checklist>div>label:hover {
  background: #f8fbfe;
  border-color: #a9bfd5;
}

.activity-checklist>div>label:has(input:checked) {
  background: #edf6fd;
  border-color: #1769aa;
  box-shadow: 0 0 0 1px rgba(23,105,170,.10);
  color: var(--sgcb-navy);
}

.activity-checklist input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  flex: 0 0 18px;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #1769aa;
}

@media (max-width:700px) {
  .activity-checklist {
    grid-template-columns: 1fr;
  }
}

.module-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 7px;
  background: #eaf0f7;
  border: 1px solid #d5dfe9;
  border-radius: 10px;
}

.module-tabs a {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 7px;
  text-decoration: none;
  color: #214c75;
  font-weight: 600;
  font-size: 13px;
}

.module-tabs a:hover {
  background: white;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 14px;
}

.module-card {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  text-decoration: none;
  color: #172033;
}

.module-card:hover {
  border-color: #9ebbd6;
  box-shadow: 0 4px 14px rgba(18,51,91,.08);
}

.module-card span {
  font-weight: 700;
}

.module-card strong {
  font-size: 30px;
  color: var(--sgcb-navy);
}

.module-card small {
  color: var(--muted);
  line-height: 1.4;
}

.group-card {
  margin: 12px 0 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.group-card-head {
  display: flex;
  color: #172033;
  position: static;
  top: auto;
  z-index: auto;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--sgcb-canvas-subtle);
  border-bottom: 1px solid var(--border);
}

.group-card-head h2 {
  margin: 3px 0 7px;
  color: #172033;
  font-weight: 700;
}

.group-kpis {
  display: grid;
  justify-items: end;
  gap: 4px;
  white-space: nowrap;
}

.group-kpis span {
  font-size: 12px;
  color: var(--sgcb-ink-soft);
}

.group-kpis strong {
  font-size: 20px;
  color: var(--sgcb-navy);
}

.compact-summary {
  margin-bottom: 16px;
}

.compact-summary article strong {
  font-size: 22px;
}

@media (max-width:760px) {
  .group-card-head {
    flex-direction: column;
  }

  .group-kpis {
    justify-items: start;
  }

  .module-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .module-tabs a {
    white-space: nowrap;
  }
}

.group-process-title {
  margin: 4px 0 6px;
  font-size: 14px;
  color: #344054;
}

.group-process-title strong {
  color: var(--sgcb-navy);
}

.document-preview {
  max-width: 900px;
}

.link-button {
  background: none !important;
  color: #1769aa !important;
  padding: 0 !important;
  border: 0 !important;
  font: inherit;
}

.link-button:hover {
  text-decoration: underline;
}

@media print {
  .site-header,
  .module-tabs,
  .page-head .actions,
  .document-preview .title-row button {
    display: none !important;
  }

  .document-preview {
    border: 0 !important;
    padding: 0 !important;
  }
}

.document-model-layout {
  grid-template-columns: minmax(0,1fr) 300px;
  align-items: start;
}

.document-model-main {
  min-width: 0;
}

.document-model-meta {
  max-width: none;
}

.docx-import-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed #b8c6d5;
  border-radius: 10px;
  background: #f8fbfe;
}

.docx-import-box input[type=file] {
  background: white;
}

.docx-source-current {
  font-size: 13px;
  color: var(--sgcb-ink-soft);
}

.document-variable-panel {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}

.variable-tags .variable-chip {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.variable-tags .variable-chip:hover {
  background: #dcecf8;
}

.document-page-editor {
  margin-top: 18px;
}

.document-page-label {
  width: max-content;
  margin: 0 auto 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e8eef6;
  color: var(--sgcb-ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.document-page-canvas {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border: 1px solid #dfe5ed;
  box-shadow: 0 8px 25px rgba(18,51,91,.08);
  padding: 26px 34px;
  min-height: 1050px;
}

.rich-editor-block {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.rich-editor-block:last-child {
  margin-bottom: 0;
}

.rich-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rich-editor-status {
  font-size: 11px;
  color: var(--sgcb-ink-soft);
}

.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 7px;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #f7f9fc;
}

.rich-editor-toolbar select {
  width: auto;
  min-width: 88px;
  padding: 6px 8px;
  font-size: 12px;
}

.rich-editor-toolbar button {
  padding: 6px 8px;
  background: white;
  color: #24496f;
  border: 1px solid #cdd8e3;
  border-radius: 5px;
  font-size: 12px;
}

.rich-editor-toolbar button:hover {
  background: #eaf3fb;
}

.rich-editor-separator {
  width: 1px;
  height: 24px;
  background: #d7dee7;
  margin: 0 2px;
}

.rich-editor-surface {
  min-height: 540px;
  padding: 20px 22px;
  border: 1px solid #cfd8e3;
  border-radius: 7px;
  background: white;
  outline: none;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.rich-editor-surface:focus {
  border-color: #1769aa;
  box-shadow: 0 0 0 2px rgba(23,105,170,.10);
}

.rich-editor-surface.compact {
  min-height: 125px;
}

.rich-editor-surface img {
  max-width: 100%;
  height: auto;
}

.rich-editor-surface table,
.generated-document-page table {
  width: 100%;
  border-collapse: collapse;
}

.rich-editor-surface td,
.rich-editor-surface th,
.generated-document-page td,
.generated-document-page th {
  border: 1px solid #8f99a5;
  padding: 6px;
}

.rich-editor-surface blockquote,
.generated-document-page blockquote {
  margin: 12px 24px;
  padding-left: 14px;
  border-left: 3px solid #9db3c8;
  color: var(--sgcb-ink-soft);
}

.generated-document-page {
  max-width: 800px;
  min-height: 1020px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--sgcb-border);
  padding: 28px 42px;
  line-height: 1.55;
}

.generated-document-header {
  min-height: 72px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e9ef;
}

.generated-document-footer {
  min-height: 62px;
  padding-top: 14px;
  margin-top: 28px;
  border-top: 1px solid #e5e9ef;
}

.generated-document-page img {
  max-width: 100%;
  height: auto;
}

.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkbox-label input {
  width: auto;
}

.document-model-form .form-card {
  max-width: none;
}

@media (max-width:900px) {
  .document-model-layout {
    grid-template-columns: 1fr;
  }

  .document-variable-panel {
    position: static;
    max-height: none;
  }

  .document-page-canvas {
    padding: 18px;
    min-height: 700px;
  }

  .rich-editor-surface {
    min-height: 420px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width:650px) {
  .rich-editor-toolbar {
    align-items: stretch;
  }

  .rich-editor-toolbar select {
    width: 100%;
  }

  .rich-editor-separator {
    display: none;
  }

  .document-page-canvas {
    padding: 12px;
  }

  .generated-document-page {
    padding: 20px;
  }

  .rich-editor-surface {
    padding: 14px;
  }
}

@media print {
  .generated-document-page {
    border: 0;
    box-shadow: none;
    max-width: none;
    min-height: auto;
    padding: 0;
  }

  .generated-document-header {
    position: relative;
  }

  .generated-document-footer {
    position: relative;
  }
}

.document-preview .title-row {
  align-items: flex-start;
  gap: 18px;
}

.document-preview .title-row>div:first-child {
  min-width: 0;
}

.document-preview .title-row .actions {
  flex-shrink: 0;
}

@media (max-width:700px) {
  .document-preview .title-row {
    flex-direction: column;
  }

  .document-preview .title-row .actions {
    width: 100%;
  }
}

.native-docx-panel {
  border-left: 4px solid #2f6fba;
}

.native-docx-panel .notice {
  margin-top: 12px;
}

.native-docx-summary {
  padding: 28px;
  border: 1px dashed #9aa8b7;
  border-radius: 8px;
  background: var(--sgcb-canvas-subtle);
}

.native-docx-summary p:last-child {
  margin-bottom: 0;
}

.financeiro-history {
  display: grid;
  gap: 0;
}

.financeiro-history article {
  display: grid;
  gap: 6px;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f4;
}

.financeiro-history article:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.financeiro-history-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.financeiro-history time {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.financeiro-history p {
  margin: 0;
  color: var(--sgcb-ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width:520px) {
  .financeiro-history-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

.document-queue .table-primary {
  display: block;
  line-height: 1.25;
}

.document-contract-ref {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.document-queue:has(tbody td[colspan]) {
  display: none;
}

.journey-overview,
.journey-contract {
  overflow: hidden;
}

.journey-totals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.journey-totals span,
.progress-label {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eaf1f8;
  color: #174f82;
  font-size: 12px;
  font-weight: 700;
}

.journey-person {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.journey-person:first-of-type {
  margin-top: 12px;
}

.journey-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.journey-person-head>div {
  display: grid;
  gap: 3px;
}

.journey-person-head>div span {
  color: var(--muted);
  font-size: 13px;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(7,minmax(95px,1fr));
  gap: 0;
  margin: 8px 0 14px;
}

.journey-step {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 0 10px 0 0;
  color: var(--sgcb-ink-soft);
}

.journey-step>span {
  display: block;
  height: 6px;
  margin-bottom: 6px;
  background: #dfe5ec;
}

.journey-step:first-child>span {
  border-radius: 999px 0 0 999px;
}

.journey-step:last-child>span {
  border-radius: 0 999px 999px 0;
}

.journey-step.complete>span {
  background: #2f855a;
}

.journey-step.current>span {
  background: #d69e2e;
}

.journey-step.complete {
  color: #276749;
}

.journey-step.current {
  color: #805b10;
}

.journey-step strong {
  font-size: 13px;
}

.journey-step small {
  font-size: 11px;
  color: var(--muted);
}

.journey-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #f6f9fc;
}

.empty-state {
  padding: 22px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 9px;
}

.readiness-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-left: 4px solid #d69e2e;
}

.readiness-inline h2 {
  margin: 4px 0 0;
}

.readiness-card {
  max-width: 820px;
}

.readiness-list {
  display: grid;
  gap: 9px;
  padding-left: 22px;
}

.readiness-list li {
  padding-left: 4px;
  color: #7a2e2e;
}

.status-separation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-separation h2 {
  margin: 4px 0 0;
}

.status-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width:800px) {
  .readiness-inline,
  .status-separation,
  .journey-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .journey-track {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .journey-step {
    grid-template-columns: 12px auto 1fr;
    align-items: center;
    padding: 0;
  }

  .journey-step>span {
    width: 8px;
    height: 28px;
    margin: 0;
    border-radius: 999px !important;
  }

  .journey-step small {
    text-align: right;
  }
}

.process-link-form {
  max-width: 920px;
}

.process-form-section {
  padding: 0 0 20px;
  margin: 0 0 20px;
  border-bottom: 1px solid #e7ebf0;
}

.process-form-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 8px;
}

.process-form-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.process-form-section-title h2 {
  margin: 0 0 3px;
}

.step-number {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e8f1fa;
  color: #174f82;
  font-weight: 800;
  font-size: 13px;
}

.process-source-choice {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.process-source-card {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 11px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #d4dde7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 400;
}

.process-source-card:hover {
  border-color: #9ebbd6;
  background: #f8fbfe;
}

.process-source-card.is-selected {
  border-color: #1769aa;
  background: #edf6fd;
  box-shadow: 0 0 0 2px rgba(23,105,170,.08);
}

.process-source-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #1769aa;
}

.process-source-card span {
  display: grid;
  gap: 4px;
}

.process-source-card strong {
  color: var(--sgcb-navy);
}

.process-source-card small {
  color: var(--sgcb-ink-soft);
  line-height: 1.4;
}

.process-mode-panel {
  padding: 14px;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  background: #fafbfd;
}

.master-process-summary {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 5px 12px;
  align-items: center;
  padding: 15px;
  border: 1px solid #cddbe8;
  border-radius: 10px;
  background: #f5f9fd;
}

.master-process-summary .eyebrow {
  grid-column: 1/-1;
}

.master-process-summary strong {
  font-size: 18px;
  color: var(--sgcb-navy);
}

.master-process-summary a {
  white-space: nowrap;
}

.specialty-link-form {
  max-width: 920px;
}

.specialty-process-selector {
  margin-top: 4px;
}

.specialty-process-selector .process-grid {
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
}

.specialty-process-selector .process-option {
  min-height: 92px;
}

.process-specialty-fallback {
  display: grid;
  gap: 8px;
}

.specialty-choice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.specialty-choice-head>div {
  display: grid;
  gap: 6px;
}

.specialty-choice-head .button {
  white-space: nowrap;
}

.specialty-choice-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.field-row[data-new-specialty][hidden] {
  display: none !important;
}

.specialty-options-box {
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #cbd4df;
  border-radius: 9px;
  background: #fff;
  transition: opacity .15s ease,background .15s ease;
}

.specialty-options-box.is-disabled {
  opacity: .55;
  background: #f2f4f7;
}

.specialty-multi-options {
  display: grid;
  gap: 3px;
}

.specialty-multi-options>div>label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
}

.specialty-multi-options>div>label:hover {
  background: #eef5fb;
}

.specialty-multi-options input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #1769aa;
}

.convite-vinculos-options {
  display: grid;
  gap: 3px;
}

.convite-vinculos-options>div>label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
}

.convite-vinculos-options>div>label:hover {
  background: #eef5fb;
}

.convite-vinculos-options input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #1769aa;
}

.convite-vinculos-selector {
  margin-top: 8px;
}

.convite-form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 0 3px;
  margin: 4px 0 2px;
  border-top: 1px solid #e7ebf0;
}

.convite-form-section-heading>span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f2fb;
  color: #174f82;
  font-size: 13px;
  font-weight: 800;
}

.convite-form-section-heading>div {
  display: grid;
  gap: 3px;
}

.convite-form-section-heading h2 {
  margin: 2px 0 0;
  font-size: 16px;
  color: var(--sgcb-navy);
}

.convite-form-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.convite-tipo-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.convite-tipo-opcoes {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.convite-tipo-opcoes li {
  min-width: 0;
}

.convite-tipo-opcoes label {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #cbd4df;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.convite-tipo-opcoes label:hover {
  border-color: #80add2;
  background: #f7fbff;
}

.convite-tipo-opcoes input[type="radio"] {
  accent-color: #1769aa;
}

.convite-tipo-opcoes input[type="radio"]:checked {
  accent-color: #1769aa;
}

@media (max-width:620px) {
  .convite-tipo-opcoes {
    grid-template-columns: 1fr;
  }

  .convite-form-section-heading {
    padding-top: 12px;
  }
}

.selection-tools {
  display: none;
}

.button.compact {
  padding: 7px 10px;
  font-size: 12px;
}

.process-master-list {
  min-height: 180px;
  width: 100%;
  padding: 6px;
  background: #fff;
}

.selection-column {
  width: 42px;
  text-align: center !important;
}

.selection-column input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #1769aa;
}

.bulk-delete-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 18px;
}

.bulk-delete-actions .danger-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width:620px) {
  .bulk-delete-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-delete-actions .danger-button {
    width: 100%;
  }
}

@media (max-width:760px) {
  .process-source-choice {
    grid-template-columns: 1fr;
  }

  .master-process-summary {
    grid-template-columns: 1fr;
  }

  .master-process-summary a {
    white-space: normal;
  }

  .specialty-process-selector .process-grid {
    grid-template-columns: 1fr;
  }

  .specialty-choice-head {
    align-items: stretch;
    flex-direction: column;
  }

  .specialty-choice-actions {
    justify-content: stretch;
  }

  .specialty-choice-actions>* {
    flex: 1;
  }

  .specialty-choice-head .button {
    width: 100%;
    white-space: normal;
  }
}

.context-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.context-breadcrumb a {
  text-decoration: none;
}

.journey-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 0 0 18px;
}

.journey-tabs a {
  padding: 11px 12px;
  text-decoration: none;
  color: var(--sgcb-ink-soft);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.journey-tabs a:hover,
.journey-tabs a.active {
  color: var(--blue2);
  border-bottom-color: var(--blue2);
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.complete {
  background: #e7f6ec;
  color: #18723a;
}

.status-pill.attention,
.status-pill.excess {
  background: #fff0ef;
  color: #8e1c14;
}

.status-pill.progress {
  background: #fff3d6;
  color: #8a5a00;
}

.status-pill.not-started {
  background: #eef2f6;
  color: var(--sgcb-ink-soft);
}

.empty-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

[hidden] {
  display: none !important;
}

@media (max-width:620px) {
  .empty-state {
    align-items: flex-start;
    flex-direction: column;
  }
}

.specialty-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 15px;
  background: #fbfcfd;
  font-size: 13px;
}

.specialty-empty span {
  color: var(--muted);
  margin-right: auto;
}

@media (max-width:620px) {
  .specialty-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .specialty-empty span {
    margin-right: 0;
  }
}

.year-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.year-tabs a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--sgcb-ink-soft);
  text-decoration: none;
  font-weight: 700;
}

.year-tabs a:hover,
.year-tabs a.active {
  border-color: #1769aa;
  background: #edf6fd;
  color: var(--sgcb-navy);
}

.year-tabs small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.annual-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #d7e3ef;
  border-radius: 10px;
  background: #f8fbfe;
}

.annual-context>div {
  display: grid;
  gap: 3px;
}

.annual-context strong {
  font-size: 22px;
  color: var(--sgcb-navy);
}

.annual-context span:not(.eyebrow):not(.badge) {
  color: var(--muted);
  font-size: 13px;
}

.cycle-list {
  display: grid;
  gap: 9px;
}

.cycle-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.cycle-row>div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cycle-row strong {
  font-size: 16px;
  color: #172033;
}

.cycle-row span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
}

.cycle-row-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.cycle-row-actions>a:not(.button) {
  font-size: 13px;
  font-weight: 600;
}

.cycle-workspace-head {
  margin-bottom: 8px;
}

.cycle-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}

.cycle-highlight-grid article {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.cycle-highlight-grid span {
  color: var(--muted);
  font-size: 12px;
}

.cycle-highlight-grid strong {
  font-size: 23px;
  color: var(--sgcb-navy);
}

.process-status-list {
  display: grid;
}

.process-status-list article {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f4;
}

.process-status-list article:last-child {
  border-bottom: 0;
}

.process-status-list article>div {
  display: grid;
  gap: 4px;
}

.process-status-list article span:not(.status-pill) {
  color: var(--muted);
  font-size: 13px;
}

.process-status-list a {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.professional-list {
  display: grid;
  gap: 9px;
}

.professional-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) minmax(170px,.55fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.professional-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e7f0f8;
  color: #174f82;
  font-size: 18px;
  font-weight: 800;
}

.professional-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.professional-main span,
.professional-main small {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.professional-next {
  display: grid;
  gap: 3px;
}

.professional-next span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.professional-next strong {
  font-size: 13px;
  line-height: 1.35;
}

.workspace-link-list {
  display: grid;
}

.workspace-link-list .workspace-link:last-child {
  border-bottom: 0;
}

@media (max-width:850px) {
  .cycle-highlight-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .professional-row {
    grid-template-columns: 42px minmax(0,1fr) auto;
  }

  .professional-next {
    grid-column: 2;
  }

  .professional-row>.button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width:620px) {
  .annual-context,
  .cycle-row,
  .professional-row,
  .process-status-list article {
    align-items: flex-start;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .annual-context {
    flex-direction: column;
  }

  .cycle-row-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .cycle-highlight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .professional-avatar {
    grid-row: auto;
  }

  .professional-next,
  .professional-row>.button {
    grid-column: auto;
    grid-row: auto;
  }

  .process-status-list article a {
    white-space: normal;
  }
}

.specialty-existing-note {
  display: block;
  margin: 4px 0 8px 28px;
  color: #25673f;
  font-size: .78rem;
  font-weight: 600;
}

.is-existing-specialty {
  opacity: .78;
}

.specialty-existing-context {
  margin: 8px 0 0;
}

.prestador-form {
  max-width: 1080px;
}

.prestador-form-section {
  padding: 0 0 21px;
  margin: 0 0 21px;
  border-bottom: 1px solid #e7ebf0;
}

.prestador-form-section.last {
  border: 0;
  margin-bottom: 5px;
}

.prestador-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.prestador-section-head h2 {
  margin: 3px 0 0;
  color: #172033;
  font-size: 18px;
}

.prestador-section-head small {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.prestador-field-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px 14px;
}

.prestador-field-grid .field-row {
  margin: 0;
}

.credential-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.credential-card {
  padding: 14px;
  border: 1px solid #dbe4ed;
  border-radius: 10px;
  background: #fbfcfe;
}

.credential-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--sgcb-navy);
}

.credential-card-head .danger {
  color: #a82d2d;
}

.prestador-form input[type=checkbox] {
  width: 18px;
  height: 18px;
}

.prestador-form .activity-checklist {
  margin-top: 4px;
}

@media (max-width:800px) {
  .prestador-field-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:560px) {
  .prestador-field-grid {
    grid-template-columns: 1fr;
  }

  .prestador-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .prestador-section-head small {
    text-align: left;
  }

  .credential-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.entidade-form {
  max-width: 920px;
}

/* --- Fundação migrada de identity.css (ordem original preservada) --- */

:root {
  font-family: "Segoe UI Variable","Segoe UI",Arial,sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

body {
  background: var(--canvas);
  color: var(--ink);
}

main {
  max-width: 1320px;
  margin: 30px auto 80px;
  padding: 0 28px;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -.025em;
}

h1 {
  font-size: clamp(27px,2.4vw,34px);
  line-height: 1.16;
}

h2 {
  font-size: 21px;
}

.muted {
  color: var(--ink-soft);
}

.eyebrow {
  color: #52748b;
  letter-spacing: .11em;
  font-size: 11px;
}

a {
  color: var(--accent);
}

button,
.button {
  background: var(--accent);
  border-radius: 9px;
  font-weight: 650;
  transition: background .15s ease,transform .15s ease,box-shadow .15s ease;
}

button:hover,
.button:hover {
  background: #07558f;
}

button:active,
.button:active {
  transform: translateY(1px);
}

.button.secondary {
  background: #e9f1f7;
  color: #17476c;
}

.button.secondary:hover {
  background: #dbeaf4;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
select,
textarea {
  border-color: #bfced9;
  border-radius: 8px;
  min-height: 39px;
  color: var(--ink);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--accent);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8dc6eb;
  outline-offset: 2px;
}

.card,
.summary-grid article,
.grid article {
  border-color: var(--line);
  border-radius: 13px;
}

.site-header {
  background: var(--navy-deep);
  border-bottom: 3px solid #1d658d;
  gap: 26px;
  min-height: 70px;
  padding: 10px max(24px,calc((100vw - 1320px)/2 + 28px));
  box-shadow: 0 5px 20px rgba(12,32,52,.12);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 17px;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 10px;
  background: linear-gradient(135deg,#2f84b9,#155078);
  font-size: 23px;
  line-height: 1;
}

.brand-name {
  display: grid;
  line-height: 1.05;
}

.brand-name small {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 500;
  color: #b5d1e1;
  letter-spacing: .03em;
}

.site-header nav {
  gap: 3px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.site-header nav>a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 7px;
  color: #c6d8e6;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}

.site-header nav>a:hover,
.site-header nav>a[aria-current="page"] {
  background: rgba(255,255,255,.11);
  color: white;
}

.site-header nav>a[aria-current="page"]:after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: #7cc3ec;
}

.user-box {
  flex-shrink: 0;
  gap: 8px;
  color: #e6f0f5;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #315f7f;
  font-weight: 700;
}

.user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.23);
  padding: 7px 10px;
}

.site-header button:hover {
  background: rgba(255,255,255,.14);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  background: #fff;
  padding: 10px;
  border-radius: 7px;
}

.skip-link:focus {
  top: 10px;
}

.module-tabs {
  border-color: var(--line);
  background: #eaf1f5;
}

.module-tabs a {
  color: #335b77;
}

.module-tabs a:hover {
  background: #fff;
  color: var(--accent);
}

.module-card.config-card strong {
  font-size: 16px;
  line-height: 1.3;
}

.module-tabs a.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(15, 40, 60, .12);
}

.home-pilot {
  display: grid;
  gap: 22px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) 220px;
  gap: 28px;
  min-height: 225px;
  overflow: hidden;
  border-radius: 19px;
  background: radial-gradient(circle at 92% 8%,rgba(69,144,185,.35),transparent 32%),linear-gradient(125deg,#102e4d,#143d5c 75%,#1d5774);
  box-shadow: 0 13px 28px rgba(15,45,72,.12);
  color: white;
}

.home-hero:after {
  content: "";
  position: absolute;
  right: 230px;
  top: -70px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-main {
  position: relative;
  z-index: 1;
  padding: 30px 38px;
}

.home-kicker {
  display: block;
  margin-bottom: 15px;
  color: #abd2e8;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 650px;
  margin: 0 0 10px;
  color: white;
  font-size: clamp(29px,3vw,41px);
  line-height: 1.08;
}

.home-hero p {
  max-width: 600px;
  margin: 0;
  color: #d4e4ee;
  font-size: 15px;
  line-height: 1.5;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.home-hero-actions .button {
  background: #eaf5fb;
  color: #153b57;
}

.home-hero-actions .button:hover {
  background: white;
}

.home-hero-link {
  color: #e2f1f9;
  text-decoration: none;
  font-weight: 650;
}

.home-hero-link:hover {
  text-decoration: underline;
}

.home-year-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 25px 28px;
  border-left: 1px solid rgba(255,255,255,.14);
  background: rgba(5,25,41,.13);
}

.home-year-label {
  color: #b9d2e0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.home-year-panel>strong {
  color: #fff;
  font-size: 42px;
  line-height: 1.1;
  margin: 8px 0;
}

.home-phase {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  color: #e7f3fb;
  font-size: 11px;
  font-weight: 700;
}

.home-year-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.home-year-list a {
  padding: 4px 8px;
  border-radius: 6px;
  color: #bdd8e8;
  text-decoration: none;
  font-size: 12px;
}

.home-year-list a:hover,
.home-year-list a[aria-current="page"] {
  background: rgba(255,255,255,.17);
  color: white;
}

.home-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-metrics>div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 12px;
  padding: 13px 22px;
  border-right: 1px solid var(--line);
}

.home-metrics>div:first-child {
  padding-left: 0;
}

.home-metrics>div:last-child {
  border-right: 0;
}

.home-metrics strong {
  grid-row: 1/3;
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}

.home-metrics span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.25;
}

.home-metric-alert strong {
  color: #a45c16;
}

.home-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(28,59,82,.025);
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 22px 22px 14px;
}

.home-section-head h2 {
  margin: 5px 0 0;
}

.home-section-count {
  flex: none;
  padding: 5px 9px;
  border-radius: 99px;
  background: #eef3f6;
  color: #4c6477;
  font-size: 11px;
  font-weight: 750;
}

.home-priority-list {
  padding: 0 12px;
}

.home-priority-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 10px;
  border-top: 1px solid #edf1f3;
  color: var(--ink);
  text-decoration: none;
}

.home-priority-row:hover {
  background: #f3f8fb;
  border-radius: 8px;
}

.home-priority-row>span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.home-priority-row strong {
  font-size: 14px;
}

.home-priority-row small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.3;
}

.home-priority-row>span:last-child {
  color: var(--accent);
  font-size: 18px;
}

.home-priority-count {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #fff1de;
  color: #8f4c0d;
  font-weight: 750;
}

.home-other-tasks {
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.home-other-tasks summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 650;
}

.home-other-tasks>div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 10px;
}

.home-other-tasks a {
  text-decoration: none;
}

.home-other-tasks a:hover {
  text-decoration: underline;
}

.home-workspace-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: #f7fafb;
  font-size: 12px;
}

.home-workspace-links span {
  margin-right: auto;
  color: var(--ink-soft);
  font-weight: 700;
}

.home-workspace-links a {
  text-decoration: none;
  font-weight: 650;
}

.home-workspace-links a:hover {
  text-decoration: underline;
}

.home-section-intro {
  margin: 0 22px 13px;
  color: var(--ink-soft);
  font-size: 13px;
}

.home-entity-list {
  padding: 0 12px 10px;
}

.home-entity-row {
  display: grid;
  grid-template-columns: 39px minmax(0,1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px 10px;
  border-top: 1px solid #edf1f3;
}

.home-entity-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e6f0f6;
  color: #245879;
  font-weight: 800;
}

.home-entity-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-entity-content strong {
  font-size: 15px;
}

.home-entity-content span,
.home-entity-content small {
  color: var(--ink-soft);
  font-size: 12px;
}

.home-entity-content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-entity-row>a {
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.home-entity-row>a:hover {
  background: #d8ebf7;
}

.home-empty {
  display: grid;
  gap: 7px;
  margin: 8px 10px 16px;
  padding: 15px;
  border-radius: 9px;
  background: #f3f7f9;
  color: var(--ink-soft);
  font-size: 13px;
}

.prestador-page-head {
  margin: 18px 0 20px;
}

.prestador-page-head .muted {
  max-width: 700px;
}

.prestador-form {
  max-width: none;
  width: 100%;
  padding: 12px 28px 0;
  border-radius: 14px;
}

.prestador-form-section {
  padding: 22px 0 25px;
  margin: 0;
  border-color: #e8edf0;
  scroll-margin-top: 90px;
}

.prestador-form-section:first-of-type {
  padding-top: 16px;
}

.prestador-section-head h2 {
  font-size: 20px;
}

.prestador-form .field-row label {
  font-size: 13px;
  color: #30495c;
}

.prestador-form input,
.prestador-form select,
.prestador-form textarea {
  padding: 10px 12px;
}

.prestador-form .field-row small {
  font-size: 11px;
  line-height: 1.35;
}

.prestador-form .prestador-field-grid {
  gap: 16px 18px;
}

.specialty-picker {
  display: grid;
  gap: 10px;
}

.specialty-picker #id_especialidades_atuais {
  max-height: 320px;
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
}

.specialty-picker #id_especialidades_atuais>div[hidden] {
  display: none !important;
}

.specialty-empty {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 13px;
}

.professionals-head {
  align-items: center;
  margin-bottom: 22px;
}

.professionals-head .muted {
  max-width: 700px;
}

.professionals-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(28,59,82,.025);
}

.professionals-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.professionals-filters label {
  display: grid;
  gap: 6px;
  min-width: 140px;
  flex: 1;
  color: #486173;
  font-size: 12px;
  font-weight: 650;
}

.professionals-filters label span {
  white-space: nowrap;
}

.professionals-filters .professionals-search {
  flex: 2;
  min-width: 240px;
}

.professionals-filters input,
.professionals-filters select {
  width: 100%;
  margin: 0;
  background: #fff;
}

.professionals-filters button {
  min-height: 39px;
}

.professionals-clear {
  align-self: center;
  font-size: 12px;
  text-decoration: none;
  font-weight: 650;
}

.professionals-result-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 15px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.professionals-result-bar strong {
  color: var(--ink);
}

.professionals-result-bar>span {
  color: var(--ink-soft);
}

.professionals-result-bar>div {
  display: flex;
  gap: 14px;
  margin-left: auto;
}

.professionals-result-bar a {
  font-size: 12px;
  text-decoration: none;
  font-weight: 650;
}

.professionals-result-bar a:hover {
  text-decoration: underline;
}

.professionals-table-wrap {
  overflow-x: auto;
}

.professionals-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
}

.professionals-table tr.professional-row {
  display: table-row;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.professionals-table th {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  background: #f9fbfc;
  color: #62798a;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.professionals-table td {
  padding: 13px 11px;
  border-bottom: 1px solid #ebf0f3;
  vertical-align: middle;
  color: var(--ink);
  font-size: 13px;
}

.professionals-table tbody tr:last-child td {
  border-bottom: 0;
}

.professionals-table td small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.professionals-table td>a {
  text-decoration: none;
  font-weight: 650;
}

.professionals-table td>a:hover {
  text-decoration: underline;
}

.professionals-table th:first-child {
  width: 18%;
}

.professionals-table th:nth-child(2) {
  width: 12%;
}

.professionals-table th:nth-child(3) {
  width: 19%;
}

.professionals-table th:nth-child(4) {
  width: 18%;
}

.professionals-table th:nth-child(5) {
  width: 13%;
}

.professionals-table th:last-child {
  width: 20%;
}

.professional-name {
  font-size: 14px;
}

.professionals-table tr.professional-row:hover {
  background: #fbfdfe;
}

.professional-email {
  overflow-wrap: anywhere;
}

.professional-specialty {
  display: inline-block;
  margin: 2px 5px 2px 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: #eef5f9;
  color: #285673;
  font-size: 11px;
  font-weight: 650;
}

.quick-icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.professional-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.professional-actions>a {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid #dce7ee;
  border-radius: 7px;
  background: #f4f8fb;
  color: #255879;
  text-decoration: none;
}

.professional-actions>a:hover {
  background: #e4f1fa;
  border-color: #b8d3e4;
}

.professional-actions>a:focus-visible {
  outline: 2px solid #1c6da0;
  outline-offset: 2px;
}

.professional-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.professional-actions>a.professional-delete {
  color: #9b3932;
  background: #fff7f6;
  border-color: #f0d6d2;
}

.professional-actions>a.professional-delete:hover {
  background: #fdeae7;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #dce7ee;
  border-radius: 7px;
  background: #f4f8fb;
  color: #255879;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.icon-action:hover {
  background: #e4f1fa;
  border-color: #b8d3e4;
  color: #17496d;
}

.icon-action:focus-visible {
  outline: 2px solid #1c6da0;
  outline-offset: 2px;
}

.icon-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action.danger {
  background: #fff7f6;
  border-color: #f0d6d2;
  color: #9b3932;
}

.icon-action.danger:hover {
  background: #fdeae7;
}

.table-actions form {
  margin: 0;
}

.data-table-panel {
  padding: 0;
  overflow: hidden;
}

.data-table-panel .table-wrap {
  overflow-x: auto;
}

.data-table-panel table {
  margin: 0;
}

.data-table-panel th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  background: #f8fbfd;
}

.data-table-panel td {
  vertical-align: middle;
}

.list-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.list-result-bar strong {
  color: var(--ink);
}

.list-result-bar span {
  color: var(--ink-soft);
}

.table-primary {
  font-weight: 700;
  color: var(--ink);
}

.table-secondary {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-soft);
}

.professional-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

.finance-overview-main {
  font-weight: 650;
}

.registration-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.registration-grid .card {
  min-width: 0;
}

.registration-grid .details {
  grid-template-columns: 150px minmax(0,1fr);
}

.registration-grid dd {
  overflow-wrap: anywhere;
}

.registration-grid h3 {
  margin: 20px 0 9px;
  font-size: 15px;
}

.professional-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.professional-status.neutral {
  background: #edf2f5;
  color: #475b6d;
}

.professional-status.attention {
  background: #fef3c7;
  color: var(--sgcb-warning-text);
  border: 1px solid #fde68a;
}

.professional-status.success {
  background: #dcfce7;
  color: var(--sgcb-success-text);
  border: 1px solid #bbf7d0;
}

.professionals-empty {
  text-align: center;
  padding: 32px !important;
  color: var(--ink-soft) !important;
}

.professionals-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.professionals-pages a {
  text-decoration: none;
  font-weight: 700;
}

.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
}

.badge.success,
.status-pill.complete {
  background: #dcfce7;
  color: var(--sgcb-success-text);
  border: 1px solid #bbf7d0;
}

.badge.warning,
.status-pill.progress {
  background: #fef3c7;
  color: var(--sgcb-warning-text);
  border: 1px solid #fde68a;
}

.badge.danger,
.badge.danger-badge,
.status-pill.attention,
.status-pill.excess {
  background: #fee2e2;
  color: var(--sgcb-danger-text);
  border: 1px solid #fecaca;
}

.badge.info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge.neutral,
.status-pill.not-started {
  background: var(--sgcb-border-subtle);
  color: var(--sgcb-ink-soft);
  border: 1px solid var(--sgcb-border-strong);
}

.msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 550;
  box-shadow: 0 3px 12px rgba(15,35,55,.05);
  border: 1px solid #bbf7d0;
  background: var(--sgcb-success-bg);
  color: var(--sgcb-success-text);
}

.msg.error {
  background: var(--sgcb-danger-bg);
  border-color: #fecaca;
  color: var(--sgcb-danger-text);
}

.msg.warning {
  background: var(--sgcb-warning-bg);
  border-color: #fde68a;
  color: var(--sgcb-warning-text);
}

.msg.info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.data-table-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(28,59,82,.025);
  overflow: hidden;
}

.data-table-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table-panel th {
  padding: 11px 14px;
  background: #f8fbfd;
  border-bottom: 1px solid var(--line);
  color: #5a7285;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.data-table-panel td {
  padding: 12px 14px;
  border-bottom: 1px solid #ecf1f5;
  vertical-align: middle;
  color: var(--ink);
}

.data-table-panel tbody tr:hover {
  background: #fbfdfe;
}

.data-table-panel tbody tr:last-child td {
  border-bottom: 0;
}

.table-empty-row {
  text-align: center;
  padding: 32px 16px !important;
  color: var(--ink-soft);
  font-size: 13px;
}

.context-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.context-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.context-breadcrumb a:hover {
  text-decoration: underline;
}

.context-breadcrumb span {
  color: var(--sgcb-ink-muted);
  font-size: 11px;
}

.choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 10px 0 18px;
}

.choice-card {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
}

.choice-card:hover {
  border-color: #94b8d7;
  background: #f8fbfe;
}

.choice-card.is-selected,
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: #edf6fd;
  box-shadow: 0 0 0 2px rgba(11,102,167,.12);
}

.choice-card input[type="radio"],
.choice-card input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.choice-card-content strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 3px;
}

.choice-card-content span {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.module-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  padding: 22px 24px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: all .15s ease;
  box-shadow: 0 3px 12px rgba(15,35,55,.03);
}

.module-card:hover {
  border-color: #92bcdb;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,45,75,.08);
}

.module-card span {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
}

.module-card strong {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  margin: 10px 0 4px;
  line-height: 1;
}

.module-card small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width:1200px) {
  .site-header {
    gap: 14px;
  }

  .site-header nav>a {
    padding: 0 7px;
    font-size: 12px;
  }

  .user-name {
    display: none;
  }

  .home-hero {
    grid-template-columns: minmax(0,1fr) 180px;
  }
}

@media (max-width:768px) {
  .site-header {
    align-items: center;
    padding: 10px 18px;
  }

  .site-header nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-year-panel {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 15px 25px;
  }

  .home-year-panel>strong {
    font-size: 28px;
    margin: 3px 0;
  }

  .home-year-list {
    margin-top: 8px;
  }

  .home-metrics {
    grid-template-columns: repeat(2,1fr);
  }

  .home-metrics>div:nth-child(2) {
    border-right: 0;
  }

  .home-metrics>div:nth-child(-n/**/+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width:768px) {
  .registration-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:640px) {
  main {
    padding: 0 14px;
    margin-top: 18px;
  }

  .home-pilot {
    gap: 14px;
  }

  .home-hero-main {
    padding: 25px;
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .home-metrics>div {
    padding: 11px 9px !important;
    gap: 6px;
  }

  .home-metrics strong {
    font-size: 24px;
  }

  .home-metrics span {
    font-size: 11px;
  }

  .home-section-head {
    flex-direction: column;
    padding: 17px 17px 12px;
  }

  .home-section-intro {
    margin: 0 17px 10px;
  }

  .home-entity-row {
    grid-template-columns: 35px 1fr;
  }

  .home-entity-row>a {
    grid-column: 2;
    justify-self: start;
  }

  .prestador-form {
    padding: 5px 16px 0;
  }
}

@media (max-width:640px) {
  .professionals-filters {
    padding: 15px;
  }

  .professionals-filters label,
  .professionals-filters .professionals-search {
    min-width: 100%;
  }

  .professionals-result-bar>div {
    width: 100%;
    margin-left: 0;
  }

  .professionals-table {
    min-width: 650px;
  }
}

@media (prefers-reduced-motion:reduce) {
  button,
  .button {
    transition: none;
  }
}

.institution-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .08em;
}

/* ==========================================================================
   DESIGN SYSTEM
   ========================================================================== */

/* SGCB Design System 2.0 — Design Tokens, Componentes e Base Responsiva */
:root {
  /* SGCB Design System 2.2 — paleta e tipografia da proposta visual 2027 */
  --sgcb-navy: #16243A;
  --sgcb-navy-deep: #0F1A2A;
  --sgcb-navy-light: #1C2A3F;
  --sgcb-accent: #1F4FBF;
  --sgcb-accent-hover: #163C93;
  --sgcb-accent-light: #E8EEFB;
  --sgcb-accent-focus: rgba(31, 79, 191, 0.25);
  --sgcb-focus-ring: #1F4FBF;
  --sgcb-focus-ring-dark: #8EB0FF;

  --sgcb-surface: #ffffff;
  --sgcb-canvas: #F4F5F7;
  --sgcb-canvas-subtle: #F8F9FA;
  --sgcb-surface-hover: #F5F7FA;

  /* Texto: todos com contraste mínimo de 4,5:1 sobre branco e sobre o canvas */
  --sgcb-ink: #141B26;
  --sgcb-ink-soft: #4B5563;
  --sgcb-ink-muted: #5F6B7A;
  --sgcb-ink-inverted: #ffffff;

  --sgcb-border: #E3E6EB;
  --sgcb-border-subtle: #EDEFF2;
  --sgcb-border-strong: #C9CFD8;

  /* Estados e feedback */
  --sgcb-success-bg: #E7F5EE;
  --sgcb-success-text: #1E6B45;
  --sgcb-success-border: #B7DFC9;

  --sgcb-warning-bg: #FFF4E0;
  --sgcb-warning-text: #8A4B00;
  --sgcb-warning-border: #F3D7A6;

  --sgcb-danger-bg: #FDECEA;
  --sgcb-danger-text: #A3231B;
  --sgcb-danger-border: #F2B8B2;

  --sgcb-info-bg: #E8EEFB;
  --sgcb-info-text: #1F4FBF;
  --sgcb-info-border: #C7D5F5;

  /* Escala canônica de espaçamento (4, 8, 12, 16, 24, 32px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Raios */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(15, 26, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 26, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 26, 42, 0.12);
  --shadow-drawer: 0 0 32px rgba(15, 26, 42, 0.28);

  /* Controles */
  --control-height: 42px;
  --button-height: 42px;
  --check-radio-size: 18px;

  /* Tipografia (IBM Plex servida localmente em /static/fonts/ibm-plex/) */
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* ------------------------------------------------------------------
     Aliases de compatibilidade: nomes usados por CSS legado (app.css,
     identity.css) e por estilos inline que antes não existiam. Todos
     apontam para os tokens acima, para que a paleta seja uma só.
     ------------------------------------------------------------------ */
  --blue: var(--sgcb-navy);
  --blue2: var(--sgcb-accent);
  --border: var(--sgcb-border);
  --muted: var(--sgcb-ink-soft);
  --danger: var(--sgcb-danger-text);
  --ink: var(--sgcb-ink);
  --ink-soft: var(--sgcb-ink-soft);
  --navy: var(--sgcb-navy);
  --navy-deep: var(--sgcb-navy-deep);
  --accent: var(--sgcb-accent);
  --accent-light: var(--sgcb-accent-light);
  --line: var(--sgcb-border);
  --surface: var(--sgcb-surface);
  --canvas: var(--sgcb-canvas);

  --sgcb-primary: var(--sgcb-accent);
  --sgcb-focus: var(--sgcb-focus-ring);
  --sgcb-accent-subtle: var(--sgcb-accent-light);
  --sgcb-success: var(--sgcb-success-text);
  --sgcb-danger: var(--sgcb-danger-text);
  --sgcb-surface-alt: var(--sgcb-canvas-subtle);
  --sgcb-surface-muted: var(--sgcb-canvas);
  --sgcb-surface-tint: var(--sgcb-accent-light);
  --sgcb-radius-sm: var(--radius-sm);
  --sgcb-radius-md: var(--radius-md);

  --color-primary: var(--sgcb-accent);
  --color-primary-200: #C7D5F5;
  --color-primary-500: var(--sgcb-accent);
  --color-primary-600: var(--sgcb-accent);
  --color-primary-700: var(--sgcb-accent-hover);
  --color-success: var(--sgcb-success-text);
  --color-success-200: var(--sgcb-success-border);
  --color-success-600: var(--sgcb-success-text);
  --color-success-700: var(--sgcb-success-text);
  --color-warning: var(--sgcb-warning-text);
  --color-warning-200: var(--sgcb-warning-border);
  --color-warning-500: #B86E00;
  --color-warning-600: var(--sgcb-warning-text);
  --color-warning-700: var(--sgcb-warning-text);
  --color-danger: var(--sgcb-danger-text);
  --color-danger-500: #C2362F;
  --color-danger-600: var(--sgcb-danger-text);
  --color-danger-700: var(--sgcb-danger-text);
  --color-info-500: var(--sgcb-accent);
  --color-border: var(--sgcb-border);
  --color-surface-subtle: var(--sgcb-canvas-subtle);
  --color-text: var(--sgcb-ink);
  --color-text-muted: var(--sgcb-ink-soft);
  --primary-rgb: 31, 79, 191;
  --success: var(--sgcb-success-text);
  --surface-alt: var(--sgcb-canvas-subtle);
  --surface-hover: var(--sgcb-surface-hover);
  --surface-subtle: var(--sgcb-canvas-subtle);
  --text: var(--sgcb-ink);
  --text-main: var(--sgcb-ink);
  --text-primary: var(--sgcb-ink);
  --text-secondary: var(--sgcb-ink-soft);
  --text-muted: var(--sgcb-ink-soft);
}

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/ibm-plex/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ==========================================================================
   1. RESET E FUNDAÇÃO DE CONTROLES TYPE-AWARE (UI-01)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--sgcb-ink);
  background-color: var(--sgcb-canvas);
  -webkit-font-smoothing: antialiased;
}

/* Controles de texto, seleção e áreas de texto */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
select,
textarea {
  display: block;
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: var(--control-padding, 8px 12px);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--sgcb-ink);
  background-color: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}

select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352677a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

textarea {
  height: auto;
  min-height: 84px;
  resize: vertical;
}

/* Foco acessível */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--sgcb-focus-ring) !important;
  outline-offset: 2px !important;
  border-color: var(--sgcb-accent) !important;
}

/* Checkbox e Radio — Preservação Semântica e Dimensões Fixas (P0) */
input[type="checkbox"],
input[type="radio"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  display: inline-block !important;
  width: var(--check-radio-size) !important;
  min-width: var(--check-radio-size) !important;
  max-width: var(--check-radio-size) !important;
  height: var(--check-radio-size) !important;
  min-height: var(--check-radio-size) !important;
  max-height: var(--check-radio-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  cursor: pointer;
  accent-color: var(--sgcb-accent);
  flex: none !important;
}

/* Labels de Checkbox e Radio Alinhados */
.checkbox-label,
.radio-label,
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  user-select: none;
}

/* Campos ocultos nunca ocupam espaço nem geram layout shift */
input[type="hidden"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Upload de arquivos */
input[type="file"] {
  display: block;
  width: 100%;
  height: auto;
  min-height: auto;
  padding: 6px 0;
  font-size: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Estados de Erro de Validação */
.field-error input,
.field-error select,
.field-error textarea,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #b42318 !important;
  background-color: #fffbfa;
}

.error-text,
.errorlist {
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   2. LARGURAS SEMÂNTICAS SUGERIDAS (DESKTOP/TABLET)
   ========================================================================== */
@media (min-width: 769px) {
  .field-cpf, input[name*="cpf"], input[id*="cpf"] {
    max-width: 180px;
  }
  .field-cnpj, input[name*="cnpj"], input[id*="cnpj"] {
    max-width: 220px;
  }
  .field-uf, select[name*="uf"], input[name*="uf"], select[id*="uf"] {
    max-width: 100px;
  }
  .field-ano, input[name*="ano"], input[id*="ano"] {
    max-width: 120px;
  }
  .field-moeda, .field-currency, input[name*="valor"], input[id*="valor"] {
    max-width: 180px;
  }
  .field-telefone, .field-phone, input[name*="telefone"], input[name*="celular"], input[id*="telefone"] {
    max-width: 190px;
  }
  .field-email, input[type="email"], input[name*="email"] {
    max-width: 360px;
  }
  .field-cep, input[name*="cep"], input[id*="cep"] {
    max-width: 160px;
  }
  .field-data, input[type="date"], input[name*="data"] {
    max-width: 190px;
  }
}

/* ==========================================================================
   3. BOTÕES DO SISTEMA (UI-02)
   ========================================================================== */
button,
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--button-height);
  min-height: var(--button-height);
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  background-color: var(--sgcb-accent);
  color: var(--sgcb-ink-inverted);
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}

button:hover,
.button:hover,
.btn:hover {
  background-color: var(--sgcb-accent-hover);
  color: var(--sgcb-ink-inverted);
}

button:active,
.button:active,
.btn:active {
  transform: translateY(1px);
}

.button.secondary,
.btn-secondary {
  background-color: var(--sgcb-accent-light);
  color: var(--sgcb-accent);
  border-color: #cbddeb;
}

.button.secondary:hover,
.btn-secondary:hover {
  background-color: #dbeaf4;
  color: #074776;
}

.button.ghost,
.btn-ghost {
  background-color: transparent;
  color: var(--sgcb-ink-soft);
  border-color: transparent;
}

.button.ghost:hover,
.btn-ghost:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--sgcb-ink);
}

.button.danger,
.danger-button,
.btn-danger {
  background-color: var(--sgcb-danger-text) !important;
  color: white !important;
  border-color: transparent !important;
}

.button.danger:hover,
.danger-button:hover,
.btn-danger:hover {
  background-color: #7f1d1d !important;
}

/* ==========================================================================
   4. ARQUITETURA DE LAYOUT COM SIDEBAR DESKTOP E DRAWER MOBILE (UI-03, UI-04)
   ========================================================================== */
.sgcb-app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  background-color: var(--sgcb-canvas);
  transition: grid-template-columns .2s ease;
}

.sgcb-app-shell.is-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar {
  width: 68px;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  gap: 10px;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-brand a {
  justify-content: center;
  gap: 0;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .brand-name {
  display: none !important;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 20px;
  border-radius: var(--radius-sm);
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-nav {
  padding: 12px 6px;
  align-items: center;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-nav-item {
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-nav-label {
  display: none !important;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-nav-item svg {
  width: 20px;
  height: 20px;
  margin: 0;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-footer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  gap: 8px;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-footer .user-name {
  display: none !important;
}

.sgcb-app-shell.is-collapsed .sgcb-sidebar .sgcb-sidebar-footer form button {
  font-size: 11px;
  padding: 4px 6px;
  height: 26px;
  min-height: 26px;
}

/* Painel Anual e Status Operacional (Dashboard Hero) */
.home-year-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 26px;
  background: rgba(6, 22, 38, 0.45) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.home-year-panel .home-year-label {
  color: #9acaf0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
}

.home-year-panel > strong {
  color: #ffffff !important;
  font-size: 38px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  margin: 4px 0 6px !important;
  letter-spacing: -0.02em !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

.home-phase {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 10px !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  border-radius: var(--radius-full) !important;
  color: #6ee7b7 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
}

.home-year-list {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  margin-top: 14px !important;
}

.home-year-list a {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #d2e7f7 !important;
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: all .15s ease !important;
}

.home-year-list a:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.home-year-list a[aria-current="page"],
.home-year-list a.active {
  background: #ffffff !important;
  color: #0b2f4d !important;
  border-color: #ffffff !important;
  font-weight: 750 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

.home-year-panel .home-year-links,
.home-year-panel p.small {
  margin-top: 12px !important;
  font-size: 11.5px !important;
  color: #92c4e8 !important;
}

.home-year-panel .home-year-links a,
.home-year-panel p.small a {
  color: #aae0ff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  border-bottom: 1px dotted rgba(170, 224, 255, 0.5) !important;
  transition: color .15s ease, border-color .15s ease !important;
}

.home-year-panel .home-year-links a:hover,
.home-year-panel p.small a:hover {
  color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}


/* Sidebar Fixa Desktop */
.sgcb-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sgcb-navy-deep);
  color: #e2edf6;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 40;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.sgcb-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sgcb-sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  min-width: 0;
}

.sgcb-sidebar-toggle {
  background: transparent;
  border: 0;
  color: #9cb8ce;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.sgcb-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sgcb-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  flex: 1;
}

.sgcb-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  color: #c5d7e6;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 550;
  border-radius: var(--radius-sm);
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
}

.sgcb-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sgcb-nav-item[aria-current="page"],
.sgcb-nav-item.is-active {
  background-color: var(--sgcb-accent);
  color: #ffffff;
  font-weight: 650;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sgcb-nav-item svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none !important;
  stroke: #7ea3c4 !important;
  stroke-width: 2 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .15s ease, filter .15s ease;
}

.sgcb-nav-item:hover svg {
  stroke: #ffffff !important;
}

.sgcb-nav-item[aria-current="page"] svg,
.sgcb-nav-item.is-active svg {
  stroke: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.icon-action svg,
.table-actions svg,
.sgcb-sidebar-toggle svg,
.sgcb-mobile-menu-btn svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sgcb-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

/* Área Principal */
.sgcb-main-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--sgcb-canvas);
}

/* Topbar com Contexto e Usuário */
.site-header,
.sgcb-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 24px;
  background: var(--sgcb-surface);
  border-bottom: 1px solid var(--sgcb-border);
  box-shadow: var(--shadow-sm);
}

.sgcb-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.sgcb-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.sgcb-mobile-menu-btn {
  display: none;
  background: var(--sgcb-canvas-subtle);
  border: 1px solid var(--sgcb-border);
  color: var(--sgcb-ink) !important;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.sgcb-mobile-menu-btn svg {
  stroke: var(--sgcb-ink) !important;
}

/* Seletor Contextual Funcional (UI-05) */
.sgcb-context-selector {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  background-color: var(--sgcb-canvas-subtle);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 550;
  color: var(--sgcb-ink-soft);
  max-width: 100%;
  flex-wrap: wrap;
  white-space: nowrap;
}

.sgcb-context-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sgcb-ink-soft);
  text-decoration: none;
}

.sgcb-context-step:hover {
  color: var(--sgcb-accent);
}

.site-header .sgcb-context-step.is-current,
.sgcb-context-step.is-current {
  color: var(--sgcb-ink);
  font-weight: 700;
}

.sgcb-context-separator {
  color: var(--sgcb-border-strong);
  user-select: none;
}

.sgcb-context-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sgcb-ink-soft);
  font-weight: 700;
}

.sgcb-context-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.site-header .sgcb-context-trigger,
.sgcb-context-trigger {
  height: auto;
  background: none;
  border: 0;
  padding: 2px 6px;
  min-height: 0;
  font: inherit;
  font-weight: 600;
  color: var(--sgcb-ink-soft);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.site-header .sgcb-context-trigger:hover,
.sgcb-context-trigger:hover {
  background: var(--sgcb-accent-light);
  color: var(--sgcb-accent);
}

.site-header .sgcb-context-trigger.is-entity,
.sgcb-context-trigger.is-entity {
  color: var(--sgcb-accent);
}

.sgcb-context-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  background: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 120px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.sgcb-context-menu-wide {
  min-width: 240px;
}

.sgcb-context-menu form {
  display: grid;
  margin: 0;
}

.sgcb-context-menu .sgcb-context-option {
  height: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sgcb-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.sgcb-context-menu .sgcb-context-option small {
  color: var(--sgcb-ink-soft);
  font-size: 11px;
}

.sgcb-context-menu .sgcb-context-option:hover {
  background: var(--sgcb-accent-light);
}

.sgcb-context-menu .sgcb-context-option.is-selected {
  background: var(--sgcb-accent-light);
  color: var(--sgcb-accent);
  font-weight: 700;
}

/* Breadcrumbs Semânticos (UI-05) */
.sgcb-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-3);
  font-size: 13px;
  color: var(--sgcb-ink-soft);
}

.sgcb-breadcrumbs a {
  color: var(--sgcb-accent);
  text-decoration: none;
  font-weight: 500;
}

.sgcb-breadcrumbs a:hover {
  text-decoration: underline;
}

.sgcb-breadcrumbs-sep {
  color: #9cb1c2;
  user-select: none;
}

.sgcb-breadcrumbs-current {
  color: var(--sgcb-ink);
  font-weight: 600;
}

/* Conteúdo Principal */
.sgcb-content {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* Drawer Mobile com Backdrop */
.sgcb-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 33, 55, 0.5);
  backdrop-filter: blur(2px);
  z-index: 50;
}

.sgcb-drawer-backdrop.is-open {
  display: block;
}

.sgcb-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--sgcb-navy-deep);
  color: #e2edf6;
  z-index: 51;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-drawer);
  transform: translateX(-100%);
  transition: transform .25s ease;
}

/* O atributo hidden precisa superar o display:flex do drawer. */
.sgcb-drawer[hidden] {
  display: none;
}

.sgcb-drawer.is-open {
  transform: translateX(0);
}

/* ==========================================================================
   5. RESPONSIVIDADE MOBILE (P0)
   ========================================================================== */
@media (max-width: 860px) {
  .sgcb-app-shell {
    grid-template-columns: 1fr;
  }
  .sgcb-sidebar {
    display: none;
  }
  .sgcb-mobile-menu-btn {
    display: grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    min-height: 40px;
    color: var(--sgcb-ink) !important;
  }
  .site-header {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 16px;
  }
  .sgcb-topbar-left {
    flex: 1 1 100%;
  }
  .sgcb-topbar-right {
    margin-left: 0;
  }
  .sgcb-context-selector {
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-md) !important;
    padding: 6px 10px;
    font-size: 11px;
    gap: 4px;
    line-height: 1.35;
    white-space: normal;
  }
  .sgcb-content {
    padding: 16px;
  }

  /* Controles em Mobile (altura 48px, fonte >= 16px) */
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  select {
    height: 48px;
    min-height: 48px;
    font-size: 16px;
    padding: 10px 14px;
  }
  textarea {
    font-size: 16px;
    padding: 10px 14px;
  }
  button,
  .button,
  .btn {
    min-height: 48px;
    height: 48px;
    font-size: 15px;
    padding: 0 18px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
  }

  /* Listas e tabelas em Mobile */
  .sgcb-table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .field-cpf,
  .field-cnpj,
  .field-uf,
  .field-ano,
  .field-moeda,
  .field-currency,
  .field-telefone,
  .field-phone,
  .field-email,
  .field-cep,
  .field-data {
    max-width: 100% !important;
  }
}

/* ==========================================================================
   6. FEEDBACK DE CARREGAMENTO E SALVAMENTO (UI-02, UI-10)
   ========================================================================== */
.sgcb-save-feedback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 550;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: opacity .2s ease;
}

.sgcb-save-feedback.is-saving {
  background-color: var(--sgcb-info-bg);
  color: var(--sgcb-info-text);
}

.sgcb-save-feedback.is-saved {
  background-color: var(--sgcb-success-bg);
  color: var(--sgcb-success-text);
}

.sgcb-save-feedback.is-error {
  background-color: var(--sgcb-danger-bg);
  color: var(--sgcb-danger-text);
}

/* Spinner CSS puro */
.sgcb-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: sgcb-spin .6s linear infinite;
  display: inline-block;
}

@keyframes sgcb-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   11. FORMULÁRIOS INTERNOS E GRIDS (UI-06)
   ========================================================================== */
.form-card {
  max-width: 900px;
  background: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.two-col,
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .two-col,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: var(--space-4);
  }
}

/* ==========================================================================
   12. TABELAS DE DADOS, BARRAS DE FILTROS, PAGINAÇÃO E AÇÕES (UI-07)
   ========================================================================== */
.data-table-panel {
  padding: 0;
  overflow: hidden;
  background: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.list-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--sgcb-border);
  background: var(--sgcb-canvas-subtle);
  font-size: 13px;
}

.list-result-bar strong {
  color: var(--sgcb-ink);
  font-weight: 650;
}

.list-result-bar span {
  color: var(--sgcb-ink-soft);
  font-size: 12px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.4;
  margin: 0;
}

thead th {
  background: var(--sgcb-canvas-subtle);
  color: var(--sgcb-ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--sgcb-border);
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sgcb-border-subtle);
  vertical-align: middle;
  color: var(--sgcb-ink);
}

/* Tabelas largas (relatórios, Financeiro): o cabeçalho em maiúsculas sem quebra
   ("CONCLUSÃO REALIZADA" = 169px) forçava rolagem horizontal mesmo em 1440px.
   Aqui o título da coluna quebra em duas linhas e o respiro lateral é menor. */
.u-overflow-x-auto > table thead th {
  white-space: normal;
  vertical-align: bottom;
  padding: 10px 12px;
}

.u-overflow-x-auto > table tbody td,
.u-overflow-x-auto > table tfoot td {
  padding-left: 12px;
  padding-right: 12px;
}

tbody tr:hover {
  background-color: var(--sgcb-surface-hover);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-primary {
  font-weight: 650;
  color: var(--sgcb-ink);
  text-decoration: none;
}

.table-primary:hover {
  color: var(--sgcb-accent);
  text-decoration: underline;
}

.table-secondary {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--sgcb-ink-soft);
}

/* Alternância acessível e reutilizável entre tabela e cartões de registro. */
.sgcb-list-view-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 16px;
  color: var(--sgcb-ink-soft);
  font-size: 12px;
}

.sgcb-list-view-toggle button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--sgcb-border);
  border-radius: 8px;
  background: var(--sgcb-surface);
  color: var(--sgcb-ink);
  cursor: pointer;
}

.sgcb-list-view-toggle button[aria-pressed="true"] {
  border-color: var(--sgcb-accent);
  background: var(--sgcb-accent-subtle, #eff6ff);
  color: var(--sgcb-accent);
  font-weight: 700;
}

.sgcb-list-view-toggle button:focus-visible {
  outline: 3px solid var(--sgcb-focus, #2563eb);
  outline-offset: 2px;
}

.sgcb-list-view-cards table[data-list-view-table] thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.sgcb-list-view-cards table[data-list-view-table],
.sgcb-list-view-cards table[data-list-view-table] tbody {
  display: block;
  width: 100%;
}

.sgcb-list-view-cards table[data-list-view-table] tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  padding: 12px;
}

.sgcb-list-view-cards table[data-list-view-table] tbody tr {
  display: block;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--sgcb-border);
  border-radius: 10px;
  background: var(--sgcb-surface);
  box-shadow: var(--shadow-sm);
}

.sgcb-list-view-cards table[data-list-view-table] tbody tr:hover {
  background: var(--sgcb-surface);
}

.sgcb-list-view-cards table[data-list-view-table] tbody td {
  display: grid;
  grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--sgcb-border-subtle);
}

.sgcb-list-view-cards table[data-list-view-table] tbody td::before {
  content: attr(data-label);
  color: var(--sgcb-ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sgcb-list-view-cards table[data-list-view-table] tbody td:last-child {
  border-bottom: 0;
}

.sgcb-list-view-cards table[data-list-view-table] tbody td[colspan] {
  display: block;
}

/* Coluna e Botões de Ações */
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-sm);
  background: var(--sgcb-canvas-subtle);
  color: var(--sgcb-accent);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.icon-action:hover {
  background: var(--sgcb-accent-light);
  border-color: #cbddeb;
  color: var(--sgcb-accent-hover);
}

.icon-action:active {
  transform: scale(0.96);
}

.icon-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action.danger {
  color: var(--sgcb-danger-text);
  background: #fff5f5;
  border-color: #fecaca;
}

.icon-action.danger:hover {
  background: var(--sgcb-danger-bg);
  border-color: var(--sgcb-danger-border);
}

@media (max-width: 768px) {
  .icon-action {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .icon-action svg {
    width: 18px;
    height: 18px;
  }
  .list-result-bar {
    padding: 10px 14px;
  }
  thead th,
  tbody td {
    padding: 10px 12px;
  }
}

/* Barra de Filtros e Pesquisa */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.filter-bar input[type="search"] {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.filter-bar select {
  width: auto;
  min-width: 160px;
  max-width: 240px;
}

.filter-bar a {
  font-size: 13px;
  color: var(--sgcb-ink-soft);
  text-decoration: none;
  font-weight: 550;
  padding: 8px 12px;
}

.filter-bar a:hover {
  color: var(--sgcb-accent);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .filter-bar input[type="search"],
  .filter-bar select {
    max-width: 100%;
    width: 100%;
  }
}

/* Paginação Acessível */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  font-size: 13px;
  color: var(--sgcb-ink-soft);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  min-height: 36px;
  background: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-sm);
  color: var(--sgcb-ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.pagination a:hover {
  background: var(--sgcb-accent-light);
  border-color: var(--sgcb-accent);
  color: var(--sgcb-accent);
}

.pagination span {
  font-weight: 600;
  color: var(--sgcb-ink);
  padding: 0 4px;
}

/* Cartões de Agrupamento */
.group-card {
  background: var(--sgcb-surface);
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.group-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sgcb-border);
  background: var(--sgcb-canvas-subtle);
}

.group-card-head h2 {
  margin: 4px 0 0;
  font-size: 17px;
  color: var(--sgcb-ink);
}

.group-process-title {
  font-size: 13px;
  color: var(--sgcb-ink-soft);
  margin-top: 2px;
}

.group-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sgcb-environment-badge { display: inline-flex; align-items: center; border: 1px solid #b7c8d8; border-radius: 999px; padding: 5px 10px; background: #eef5fb; color: #173653; font-size: 12px; font-weight: 700; white-space: nowrap; }
.professional-actions > a.professional-primary-action { display: inline-flex; width: auto; height: 32px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.professional-more-actions { position: relative; }
.professional-more-actions summary { cursor: pointer; padding: 7px 9px; border: 1px solid #dce7ee; border-radius: 7px; background: #f4f8fb; color: #255879; font-size: 12px; font-weight: 700; white-space: nowrap; }
.professional-more-actions summary:focus-visible, .professional-more-menu a:focus-visible { outline: 2px solid #1c6da0; outline-offset: 2px; }
.professional-more-menu { position: absolute; z-index: 20; right: 0; top: 100%; display: flex; flex-wrap: wrap; gap: 6px; min-width: 185px; padding: 9px; border: 1px solid #dce7ee; border-radius: 8px; background: #fff; box-shadow: 0 8px 20px #102c3d26; }
.professional-more-menu a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #dce7ee; border-radius: 7px; }
.professionals-table { min-width: 660px; }
@media (max-width: 768px) { .sgcb-environment-badge { white-space: normal; } .sgcb-list-view-cards .professional-more-menu { left: 0; right: auto; } }
.module-tabs { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* ==========================================================================
   WORKSPACE DA ENTIDADE (Início com entidade em contexto)
   ========================================================================== */
.ws { display: grid; gap: var(--space-5); }
.ws-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.ws-kicker { margin: 0 0 4px; font-size: 13px; color: var(--sgcb-ink-soft); }
.ws-fase { color: var(--sgcb-success-text); font-weight: 600; }
.ws-title { margin: 0; font-size: 28px; line-height: 1.2; }
.ws-head-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ws-head-actions form { margin: 0; }

.ws-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); }
.ws-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--sgcb-surface); border: 1px solid var(--sgcb-border); border-radius: var(--radius-md); color: var(--sgcb-ink); text-decoration: none; }
.ws-kpi-label { font-size: 13px; color: var(--sgcb-ink-soft); }
.ws-kpi-value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-kpi-money { font-size: 22px; white-space: nowrap; }
.ws-kpi-note { font-size: 12px; color: var(--sgcb-ink-soft); }
.ws-kpi-alert { background: var(--sgcb-warning-bg); border-color: var(--sgcb-warning-border); }
.ws-kpi-alert .ws-kpi-label, .ws-kpi-alert .ws-kpi-value, .ws-kpi-alert .ws-kpi-note { color: var(--sgcb-warning-text); }
.ws-kpi-alert:hover { border-color: var(--sgcb-warning-text); }

.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--space-5); align-items: start; }
.ws-card { background: var(--sgcb-surface); border: 1px solid var(--sgcb-border); border-radius: var(--radius-md); padding: 16px 18px; min-width: 0; }
.ws-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.ws-card-head h2 { margin: 0; font-size: 16px; }
.ws-card-sub { font-size: 13px; color: var(--sgcb-ink-soft); }
.ws-card-link { font-size: 13px; }
.ws-empty { margin: 4px 0; font-size: 14px; color: var(--sgcb-ink-soft); }
.ws-code { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--sgcb-border-subtle); font-family: var(--font-mono); font-size: 11px; color: var(--sgcb-ink); }

.ws-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--sgcb-border-subtle); }
.ws-bar-fill { display: block; height: 100%; }
.is-muted.ws-bar-fill, .ws-swatch.is-muted { background: #9aa8b6; }
.is-soft.ws-bar-fill, .ws-swatch.is-soft, .ws-col-bar.is-soft { background: #8fb3dc; }
.is-primary.ws-bar-fill, .ws-swatch.is-primary, .ws-col-bar.is-primary { background: var(--sgcb-accent); }
.is-success.ws-bar-fill, .ws-swatch.is-success { background: #2f8a57; }
.ws-swatch.is-empty { background: var(--sgcb-border-subtle); border: 1px solid var(--sgcb-border-strong); }

.ws-funil { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ws-funil-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 40px; align-items: center; gap: 10px; padding: 5px 4px; border-radius: var(--radius-sm); color: var(--sgcb-ink); text-decoration: none; font-size: 13px; }
.ws-funil-row:hover { background: var(--sgcb-surface-hover); }
.ws-funil-num { text-align: right; font-variant-numeric: tabular-nums; }

.ws-task { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--sgcb-border-subtle); color: var(--sgcb-ink); text-decoration: none; }
.ws-task:first-of-type { border-top: 0; }
.ws-task:hover { background: var(--sgcb-surface-hover); }
.ws-task-count { min-width: 42px; padding: 3px 0; border-radius: var(--radius-sm); background: var(--sgcb-warning-bg); color: var(--sgcb-warning-text); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ws-task-count.is-urgent { background: var(--sgcb-danger-bg); color: var(--sgcb-danger-text); }
.ws-task-text { flex: 1; display: grid; }
.ws-task-text strong { font-size: 14px; }
.ws-task-text small { font-size: 12px; color: var(--sgcb-ink-soft); }
.ws-task-arrow { color: var(--sgcb-ink-soft); }

.ws-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--sgcb-ink-soft); }
.ws-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ws-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.ws-prod { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ws-prod-row { display: grid; grid-template-columns: minmax(160px, 240px) 1fr 84px; align-items: center; gap: 12px; font-size: 13px; }
.ws-prod-row .ws-bar { height: 16px; }
.ws-prod-num { text-align: right; color: var(--sgcb-ink-soft); font-variant-numeric: tabular-nums; }

.ws-marco { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--sgcb-border-subtle); font-size: 14px; }
.ws-marco:first-of-type { border-top: 0; }
.ws-marco-data { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sgcb-ink-soft); }
.ws-marco-data.is-danger { color: var(--sgcb-danger-text); }
.ws-marco-data.is-info { color: var(--sgcb-info-text); }
.ws-pill { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); background: var(--sgcb-border-subtle); color: var(--sgcb-ink-soft); white-space: nowrap; }
.ws-pill.is-danger { background: var(--sgcb-danger-bg); color: var(--sgcb-danger-text); }
.ws-pill.is-info { background: var(--sgcb-info-bg); color: var(--sgcb-info-text); }

.ws-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 170px; }
.ws-col { display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
.ws-col-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--sgcb-border-strong); }
.ws-col-bar { width: min(14px, 40%); border-radius: 2px 2px 0 0; }
.ws-col-label { font-size: 11px; color: var(--sgcb-ink-soft); text-align: center; }
.ws-fin-totais { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--sgcb-ink-soft); font-variant-numeric: tabular-nums; }
.ws-fin-totais strong { color: var(--sgcb-ink); }

@media (max-width: 640px) {
  .ws-title { font-size: 22px; }
  .ws-kpi-money { font-size: 18px; }
  .ws-funil-row { grid-template-columns: 1fr 34px; }
  .ws-funil-row .ws-bar { grid-column: 1 / -1; grid-row: 2; }
  .ws-prod-row { grid-template-columns: 1fr 70px; }
  .ws-prod-row .ws-bar { grid-column: 1 / -1; grid-row: 2; }
  .ws-head-actions, .ws-head-actions form, .ws-head-actions .button { width: 100%; }
}

/* Aviso de recorte pela entidade em contexto */
.sgcb-context-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--sgcb-info-border); border-radius: var(--radius-md); background: var(--sgcb-info-bg); color: var(--sgcb-info-text); font-size: 14px; }
.sgcb-context-filter form { margin: 0; }
.sgcb-context-filter .sgcb-context-filter-clear { height: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--sgcb-info-border); border-radius: var(--radius-sm); background: var(--sgcb-surface); color: var(--sgcb-info-text); font-size: 13px; }
.sgcb-context-filter .sgcb-context-filter-clear:hover { background: var(--sgcb-surface-hover); color: var(--sgcb-info-text); }


/* Foco visível sobre fundos escuros (sidebar, drawer, cabeçalhos navy) */
.sgcb-sidebar a:focus-visible,
.sgcb-sidebar button:focus-visible,
.sgcb-drawer a:focus-visible,
.sgcb-drawer button:focus-visible {
  outline-color: var(--sgcb-focus-ring-dark) !important;
}

/* ==========================================================================
   ONDA 3 — Componentes padronizados
   ========================================================================== */

/* Cabeçalho de página (.page-head, .title-row e shared/_page_header.html) */
.page-head,
.title-row,
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.page-head h1,
.title-row h1,
.page-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sgcb-ink);
}
.page-head > div > .muted,
.title-row > div > .muted,
.page-head-subtitle,
.page-header .subtitle {
  margin: 4px 0 0;
  max-width: 72ch;
  font-size: 14px;
  color: var(--sgcb-ink-soft);
}
.eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sgcb-ink-soft);
}
@media (max-width: 640px) {
  .page-head h1,
  .title-row h1,
  .page-header h1 { font-size: 22px; }
}

/* Selos de status: todas as variantes usadas nos templates, numa só paleta */
.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-full);
  background: var(--sgcb-canvas);
  color: var(--sgcb-ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
.badge.success, .badge.badge-success,
.status-pill.complete, .status-pill.status-success {
  background: var(--sgcb-success-bg); border-color: var(--sgcb-success-border); color: var(--sgcb-success-text);
}
.badge.warning, .badge.badge-warning,
.status-pill.progress, .status-pill.status-warning {
  background: var(--sgcb-warning-bg); border-color: var(--sgcb-warning-border); color: var(--sgcb-warning-text);
}
.badge.danger, .badge.danger-badge, .badge.badge-danger,
.status-pill.attention, .status-pill.excess, .status-pill.status-danger {
  background: var(--sgcb-danger-bg); border-color: var(--sgcb-danger-border); color: var(--sgcb-danger-text);
}
.badge.info, .badge.badge-info, .badge.primary {
  background: var(--sgcb-info-bg); border-color: var(--sgcb-info-border); color: var(--sgcb-info-text);
}
.badge.neutral, .badge.badge-secondary, .badge.muted,
.status-pill.not-started, .status-pill.status-neutral {
  background: var(--sgcb-canvas); border-color: var(--sgcb-border); color: var(--sgcb-ink-soft);
}

/* Estado vazio */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: var(--space-4) 0;
  padding: 32px 20px;
  border: 1px dashed var(--sgcb-border-strong);
  border-radius: var(--radius-md);
  background: var(--sgcb-canvas-subtle);
  text-align: center;
}
.empty-state-icon { width: 36px; height: 36px; color: var(--sgcb-ink-muted); }
.empty-state-title { font-size: 15px; color: var(--sgcb-ink); }
.empty-state-text { max-width: 440px; margin: 0 0 8px; font-size: 13px; color: var(--sgcb-ink-soft); }

/* Diálogo de confirmação (static/js/sgcb_confirmacao.js) */
.sgcb-confirmacao {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--sgcb-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--sgcb-ink);
}
.sgcb-confirmacao::backdrop { background: rgba(15, 26, 42, 0.45); }
.sgcb-confirmacao-corpo { padding: 22px 22px 8px; }
.sgcb-confirmacao-titulo { margin: 0; font-size: 18px; line-height: 1.3; }
.sgcb-confirmacao-detalhe { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--sgcb-ink-soft); }
.sgcb-confirmacao-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: 16px 22px 20px; }
.sgcb-confirmacao .button.is-danger { background-color: var(--sgcb-danger-text); }
.sgcb-confirmacao .button.is-danger:hover { background-color: #821C15; }
@media (max-width: 480px) {
  .sgcb-confirmacao-acoes { flex-direction: column-reverse; }
  .sgcb-confirmacao-acoes .button { width: 100%; }
}

/* O atributo hidden sempre esconde, mesmo em elementos com display definido por classe (ex.: .button). */
[hidden] { display: none !important; }

/* ==========================================================================
   ONDA 4 — Componentes reutilizáveis para a limpeza de estilos inline
   ========================================================================== */

/* Botões: tamanho compacto e tons semânticos */
.button.small, button.small { height: auto; min-height: 34px; padding: 0 12px; font-size: 13px; }
.button.is-success { background-color: #1E7A4E; color: #fff; }
.button.is-success:hover { background-color: #17613E; color: #fff; }
.button.is-danger { background-color: var(--sgcb-danger-text); color: #fff; }
.button.is-danger:hover { background-color: #821C15; color: #fff; }

/* Barra de progresso */
.sgcb-progress { width: 100%; height: 10px; overflow: hidden; border-radius: var(--radius-full); background: var(--sgcb-border-subtle); }
.sgcb-progress-fill { height: 100%; border-radius: var(--radius-full); background: #2F8A57; transition: width .3s ease; }

/* Grade de números por situação */
.sgcb-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sgcb-stat { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--sgcb-border); border-radius: var(--radius-md); background: var(--sgcb-canvas-subtle); text-align: center; }
.sgcb-stat-label { font-size: 12px; font-weight: 600; color: var(--sgcb-ink-soft); }
.sgcb-stat-value { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--sgcb-ink); }
.sgcb-stat.is-info { background: var(--sgcb-info-bg); border-color: var(--sgcb-info-border); }
.sgcb-stat.is-info :is(.sgcb-stat-label, .sgcb-stat-value) { color: var(--sgcb-info-text); }
.sgcb-stat.is-warning { background: var(--sgcb-warning-bg); border-color: var(--sgcb-warning-border); }
.sgcb-stat.is-warning :is(.sgcb-stat-label, .sgcb-stat-value) { color: var(--sgcb-warning-text); }
.sgcb-stat.is-success { background: var(--sgcb-success-bg); border-color: var(--sgcb-success-border); }
.sgcb-stat.is-success :is(.sgcb-stat-label, .sgcb-stat-value) { color: var(--sgcb-success-text); }
.sgcb-stat.is-danger { background: var(--sgcb-danger-bg); border-color: var(--sgcb-danger-border); }
.sgcb-stat.is-danger :is(.sgcb-stat-label, .sgcb-stat-value) { color: var(--sgcb-danger-text); }

/* Filtros em pílula */
.sgcb-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.sgcb-chip { height: auto; min-height: 34px; padding: 0 12px; border: 1px solid var(--sgcb-border-strong); border-radius: var(--radius-full); background: var(--sgcb-surface); color: var(--sgcb-ink); font-size: 13px; font-weight: 500; cursor: pointer; }
.sgcb-chip:hover { background: var(--sgcb-surface-hover); color: var(--sgcb-ink); }
.sgcb-chip.is-active, .sgcb-chip[aria-pressed="true"] { border-color: var(--sgcb-ink); background: var(--sgcb-ink); color: #fff; font-weight: 600; }

/* Tabela padrão */
.sgcb-table { width: 100%; border-collapse: collapse; }
.sgcb-table thead tr { background: var(--sgcb-canvas-subtle); border-bottom: 2px solid var(--sgcb-border); }
.sgcb-table th { padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--sgcb-ink-soft); text-align: left; }
.sgcb-table td { padding: 12px 16px; border-bottom: 1px solid var(--sgcb-border-subtle); font-size: 13px; vertical-align: middle; }
.sgcb-table tbody tr:hover { background: var(--sgcb-surface-hover); }
.sgcb-table .is-num { text-align: right; white-space: nowrap; }

/* Menu suspenso de ação (<details>) */
.sgcb-popover { position: relative; display: inline-block; }
.sgcb-popover > summary { list-style: none; user-select: none; cursor: pointer; }
.sgcb-popover > summary::-webkit-details-marker { display: none; }
.sgcb-popover-card { position: absolute; top: calc(100% + 6px); right: 0; z-index: 100; display: grid; gap: 14px; width: 290px; padding: 14px; border: 1px solid var(--sgcb-border); border-radius: var(--radius-md); background: var(--sgcb-surface); box-shadow: var(--shadow-lg); text-align: left; white-space: normal; }
.sgcb-popover-card form { display: grid; gap: 8px; margin: 0; }
.sgcb-popover-bloco + .sgcb-popover-bloco { padding-top: 14px; border-top: 1px solid var(--sgcb-border-subtle); }
.sgcb-popover-titulo, .sgcb-popover-label { display: block; font-size: 13px; font-weight: 600; color: var(--sgcb-ink); }
.sgcb-popover-titulo.is-danger { color: var(--sgcb-danger-text); }
.sgcb-popover-ajuda { margin: 0; font-size: 12px; color: var(--sgcb-ink-soft); }
.sgcb-popover-submit { width: 100%; }

/* Execução da banca */
.ex-tags { margin-top: 6px; }
.ex-painel { padding: 20px; }
.ex-progresso { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--sgcb-border-subtle); }
.ex-progresso-numeros { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 4px; }
.ex-progresso-valor { font-size: 32px; color: var(--sgcb-ink); font-variant-numeric: tabular-nums; }
.ex-progresso-total { font-size: 16px; color: var(--sgcb-ink-soft); }
.ex-progresso-barra-wrap { flex: 1; min-width: 240px; max-width: 400px; }
.ex-progresso-escala { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--sgcb-ink-soft); }
.ex-itens { padding: 0; overflow: visible; }
.ex-itens-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sgcb-border); }
.ex-itens-head h2 { margin: 0; font-size: 18px; }
.ex-tabela-wrap { min-height: 250px; overflow-x: auto; }
.ex-item-id { font-size: 14px; font-weight: 600; color: var(--sgcb-ink); }
.ex-data { font-weight: 500; color: var(--sgcb-ink); }
.ex-data.is-success { color: var(--sgcb-success-text); font-weight: 600; }
.ex-data.is-info { color: var(--sgcb-info-text); }
.ex-bloco { display: block; }
.ex-motivo { font-weight: 600; color: var(--sgcb-danger-text); }
.ex-acoes { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ex-acoes form { margin: 0; }
.ex-vazio { padding: 36px 20px; font-size: 14px; text-align: center; }

/* Cronograma do processo: tabela larga + formulário lateral */
.cronograma-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.cronograma-novo { max-width: 760px; }
.cronograma-marcos { min-width: 0; }
.cronograma-marcos .table-wrap { overflow-x: auto; }

/* Cabeçalho de seção dentro de cartões: título e contador na mesma linha */
.card > .title-row { align-items: baseline; margin-bottom: var(--space-3); }
.card > .title-row h2 { margin: 0; }

/* Evita "← Voltar" duplicado: o retorno genérico some quando a página já tem o seu. */
.sgcb-content:has(.page-head .back-link, .title-row .back-link) > .sgcb-breadcrumbs-retorno { display: none; }

/* Ícone das mensagens do sistema */
.msg > svg { width: 18px; height: 18px; flex: none; }

/* Shell (antes inline no base.html) */
.quick-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sgcb-icon-18 { width: 18px; height: 18px; }
.sgcb-icon-20 { width: 20px; height: 20px; }
.sgcb-user-box-sidebar { font-size: 12px; color: #bed2e2; }
.sgcb-user-box-drawer { font-size: 13px; }
.sgcb-logout-form { margin: 0; }
.sgcb-drawer-brand { justify-content: space-between; }
.button.ghost.sgcb-logout-sidebar { height: 32px; min-height: 32px; padding: 4px 8px; font-size: 11px; color: #dbe9fa; }
.button.ghost.sgcb-logout-drawer { padding: 6px 12px; font-size: 12px; color: #fff; }

/* --------------------------------------------------------------------------
   Pontos de quebra oficiais (max-width): 480 celular pequeno · 640 celular ·
   768 tablet · 860 recolhimento da sidebar · 960 tablet largo · 1200 desktop.
   Use apenas estes valores em CSS novo (CSS não aceita variável em @media).
   -------------------------------------------------------------------------- */

/* Indicadores: apresentacao e distribuicao consistentes. */
#sgcb .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi-card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.kpi-label { display: block; }
.kpi-value { display: block; margin-top: 8px; }
:is(.summary-grid article span, .kpi-label, .ws-kpi-label, .sgcb-stat-label, .home-metrics span) { font-size: 13px; color: var(--sgcb-ink-soft); }
:is(.summary-grid article strong, .kpi-value, .ws-kpi-value, .sgcb-stat-value, .home-metrics strong) { font-size: 26px; font-weight: 600; }
:is(.summary-grid, .kpi-grid, .ws-kpis, .sgcb-stat-grid, .home-metrics) .value-sm,
.ws-kpi-value.ws-kpi-money { font-size: 18px; }
#sgcb :is(.summary-grid article, .kpi-card, .ws-kpi, .sgcb-stat, .home-metrics > div).is-zero :is(strong, .kpi-value, .ws-kpi-value, .sgcb-stat-value) { color: var(--sgcb-ink-soft); font-weight: 500; }

@media (min-width: 1100px) {
  /* Colunas pelo número de cartões, para não sobrar 1–2 cartões numa linha:
     7–8 → 4 colunas; 9–10 → 5; 11–12 → 6. */
  #sgcb :is(.summary-grid, .kpi-grid, .ws-kpis, .sgcb-stat-grid, .sgcb-summary-grid):is(:has(> :nth-child(7):last-child), :has(> :nth-child(8):last-child)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #sgcb :is(.summary-grid, .kpi-grid, .ws-kpis, .sgcb-stat-grid, .sgcb-summary-grid):is(:has(> :nth-child(9):last-child), :has(> :nth-child(10):last-child)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #sgcb :is(.summary-grid, .kpi-grid, .ws-kpis, .sgcb-stat-grid, .sgcb-summary-grid):is(:has(> :nth-child(11):last-child), :has(> :nth-child(12):last-child)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Retorno ao ponto de origem: a linha âncora não fica sob o cabeçalho fixo. */
tr[id^="especialidade-"] { scroll-margin-top: 110px; }

