/* Componentes reutilizaveis.
   Cards, panels, tabelas, botoes, badges, modais, abas, toolbars e widgets de pagina ficam aqui. */

/* =======================
   Componentes Compartilhados
======================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 18px;
}

.card h1 {
  margin-top: 0;
}

.alert {
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 10px 12px;
}

.alert-error {
  background: var(--danger-soft);
  border: 1px solid #e7b7b7;
  color: var(--danger);
}

.alert-success {
  background: var(--brand-soft);
  border: 1px solid #b7d6c9;
  color: var(--brand);
}

.app-footer {
  border-top: 1px solid rgba(20, 32, 43, 0.08);
  margin-top: 10px;
  padding: 10px 20px 14px;
}

.app-footer__text {
  color: rgba(20, 32, 43, 0.62);
  font-size: 11px;
  margin: 0 auto;
  max-width: var(--max-page);
  text-align: center;
}

.app-footer__brand {
  display: inline-flex;
  margin: 0 2px;
  vertical-align: text-bottom;
}

.app-footer__icon {
  color: rgba(20, 32, 43, 0.72);
  height: 13px;
  width: 13px;
}

.page {
  margin: 0 auto;
  max-width: var(--max-page);
  padding: 20px 20px 34px;
  width: 100%;
}

.page--narrow {
  max-width: 1120px;
}

.page--medium {
  max-width: 1320px;
}

.page--listagem-ampla {
  max-width: 1440px;
}

.page-header {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-title {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  margin: 4px 0 0;
}

.page-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.page-kicker,
.back-link {
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--brand);
}

.breadcrumbs {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
  margin: 0 0 8px;
}

.breadcrumbs__link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumbs__link:hover {
  text-decoration: underline;
}

.breadcrumbs__current {
  color: var(--text-soft);
  font-weight: 600;
}

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: hidden;
  transition: border-color var(--transition);
}

.panel + .panel,
.section-stack > * + * {
  margin-top: 14px;
}

.panel--accent {
  border-top: 2px solid var(--brand);
}

.panel__header {
  align-items: center;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
}

.panel__body {
  min-width: 0;
  padding: 14px 16px;
}

.panel__actions {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 16px;
}

.panel *,
.section-block *,
.metric-card *,
.resource-card *,
.accordion__item *,
.modal__dialog * {
  min-width: 0;
}

.panel input,
.panel select,
.panel textarea,
.panel button,
.panel .btn,
.panel .file-input,
.section-block input,
.section-block select,
.section-block textarea,
.section-block button,
.section-block .btn,
.section-block .file-input,
.modal__dialog input,
.modal__dialog select,
.modal__dialog textarea,
.modal__dialog button,
.modal__dialog .btn {
  max-width: 100%;
}

.panel__footer {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
}

.panel__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.panel__description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.section-block {
  min-width: 0;
}

.section-block + .section-block,
.section-block + .panel,
.panel + .section-block {
  margin-top: 14px;
}

.section-block__header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.section-block__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.section-block__description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.grid-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.grid-metrics--four-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-metrics--four-compact .metric-card {
  padding: 12px;
}

.grid-two,
.grid-three,
.grid-four {
  display: grid;
  gap: 10px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-four + .panel {
  margin-top: 10px;
}

.metric-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
  padding: 14px;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}

.metric-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.metric-card::before {
  background: var(--brand);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.metric-card--success::before { background: #1d7b5c; }
.metric-card--warning::before { background: var(--warning); }
.metric-card--danger::before { background: var(--danger); }
.metric-card--info::before { background: var(--info); }

.metric-card__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 2px 0 0;
  text-transform: uppercase;
}

.metric-card__value {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  margin: 8px 0 0;
}

.metric-card__hint {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
}

.card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}

.resource-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.resource-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.resource-card__footer {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  padding: 12px 14px;
}

.resource-card__title {
  color: var(--text);
  font-size: 15px;
  margin: 0;
}

.resource-card__text {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.resource-card__text a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meta-box {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.meta-box__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.meta-box__value {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin: 5px 0 0;
}

.dashboard-tech-kpis {
  margin-bottom: 14px;
}

.dashboard-tech-summary {
  margin-top: 4px;
}

.dashboard-tech-summary-grid {
  gap: 14px;
}


.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table-wrap--producers {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entity-producers-panel .panel__header {
  align-items: center;
  gap: 12px;
}

.entity-producers-panel .panel__description {
  margin-top: 3px;
}

.entity-producers-export {
  flex: 0 0 auto;
}

.entity-producers-table {
  table-layout: fixed;
}

.entity-producers-table th,
.entity-producers-table td {
  padding: 10px 12px;
}

.entity-producers-table th:nth-child(1),
.entity-producers-table td:nth-child(1) {
  width: 16%;
}

.entity-producers-table th:nth-child(2),
.entity-producers-table td:nth-child(2) {
  width: 13%;
}

.entity-producers-table th:nth-child(3),
.entity-producers-table td:nth-child(3) {
  width: 12%;
}

.entity-producers-table th:nth-child(4),
.entity-producers-table td:nth-child(4) {
  width: 13%;
}

.entity-producers-table th:nth-child(5),
.entity-producers-table td:nth-child(5) {
  width: 16%;
}

.entity-producers-table th:nth-child(6),
.entity-producers-table td:nth-child(6),
.entity-producers-table th:nth-child(7),
.entity-producers-table td:nth-child(7) {
  text-align: center;
  width: 10%;
}

.entity-producers-table th:nth-child(8),
.entity-producers-table td:nth-child(8) {
  text-align: center;
  width: 10%;
}

.entity-producers-table__name {
  line-height: 1.25;
}

.entity-producers-table__actions .table-actions-inline {
  flex-wrap: nowrap;
}

.data-table {
  border-collapse: collapse;
  color: var(--text-soft);
  font-size: 13px;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.data-table--wide {
  min-width: 0;
}

.data-table th {
  background: var(--brand);
  border-bottom: 1px solid var(--brand-strong);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 9px 12px;
  text-align: left;
  text-transform: uppercase;
  white-space: normal;
  word-break: break-word;
}

.data-table th .th-sort-btn {
  color: inherit;
}

.data-table td {
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
  padding: 10px 12px;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

.data-table > tbody > tr:nth-child(even) > td {
  background: var(--surface-zebra) !important;
}

.data-table > tbody > tr:hover > td {
  background: var(--brand-soft) !important;
}

.data-table__main {
  color: var(--text);
  font-weight: 700;
}

.data-table__muted {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.data-table__actions {
  text-align: right;
  white-space: normal;
}

.data-table__cell--center {
  text-align: center;
}

.data-table__cell--name {
  min-width: 300px;
  width: 42%;
}

.table-actions-inline {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.table-actions-inline form {
  margin: 0;
}

.form,


.fill-bars-chart {
    width: 100%;
    min-height: 300px;
}

.rich-question {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.rt-p {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.rt-p:last-child {
  margin-bottom: 0;
}

.rt-h2,
.rt-h3 {
  margin: 2px 0 8px;
}

.rt-h2 {
  font-size: 15px;
}

.rt-h3 {
  font-size: 14px;
}

.rt-list {
  margin: 0 0 8px 18px;
  padding: 0;
}

.rt-quote {
  border-left: 3px solid var(--border-strong);
  color: var(--muted);
  margin: 4px 0 10px;
  padding: 4px 10px;
}

.rt-rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.rt-color--verde { color: #1f7a5c; }
.rt-color--azul { color: #1d4e89; }
.rt-color--laranja { color: #b25b17; }
.rt-color--vermelho { color: #9e2a2b; }
.rt-color--neutro { color: #4b5563; }

.btn {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  line-height: 1.25;
  min-height: 32px;
  padding: 6px 11px;
  text-align: center;
  text-decoration: none;
  user-select: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  box-shadow: none;
  vertical-align: middle;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-strong);
}

.btn--success {
  background: #1f7a5c;
  color: #fff;
}

.btn--success:hover {
  background: #17634a;
}

.btn--warning {
  background: var(--warning);
  color: #fff;
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.btn--archive {
  background: var(--warning-soft);
  border: 1px solid #efcf9f;
  color: #8a5100;
}

.btn--archive:hover {
  background: #fbe5bf;
  border-color: #e3bc80;
}

.btn--secondary {
  background: #fafafa;
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.btn--secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
}

.btn--ghost {
  background: transparent;
  color: var(--brand);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  background: #d7dee4;
  border-color: transparent;
  color: #657686;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

.btn[disabled]:hover,
.btn.is-disabled:hover,
.btn[disabled]:active,
.btn.is-disabled:active {
  background: #d7dee4;
  color: #657686;
  transform: none;
}

.btn.is-loading {
  position: relative;
}

.btn.is-loading::after {
  animation: spin var(--motion-base) linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 12px;
  width: 12px;
}

.btn--compact {
  min-height: 28px;
  padding: 4px 8px;
  line-height: 1.15;
  white-space: nowrap;
}

.btn--icon {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  position: relative;
}

.btn__icon {
  flex: 0 0 auto;
  height: 13px;
  width: 13px;
}

.btn--icon-only {
  justify-content: center;
  height: 30px;
  min-width: 30px;
  padding: 4px;
  width: 30px;
}

.btn--icon-only.btn--primary {
  background: rgba(11, 61, 46, 0.08);
  border-color: rgba(11, 61, 46, 0.2);
  color: var(--brand);
}

.btn--icon-only.btn--primary:hover {
  background: rgba(11, 61, 46, 0.13);
  border-color: rgba(11, 61, 46, 0.32);
  color: var(--brand-strong);
}

.btn--icon-only.btn--success {
  background: rgba(31, 122, 92, 0.1);
  border-color: rgba(31, 122, 92, 0.22);
  color: #17634a;
}

.btn--icon-only.btn--success:hover {
  background: rgba(31, 122, 92, 0.16);
  border-color: rgba(31, 122, 92, 0.35);
}

.btn--icon-only.btn--warning {
  background: rgba(179, 107, 0, 0.1);
  border-color: rgba(179, 107, 0, 0.24);
  color: #915600;
}

.btn--icon-only.btn--danger {
  background: rgba(158, 42, 43, 0.1);
  border-color: rgba(158, 42, 43, 0.24);
  color: var(--danger);
}

.btn--icon-only.btn--danger:hover {
  background: rgba(158, 42, 43, 0.16);
  border-color: rgba(158, 42, 43, 0.34);
}

.btn--icon-only.btn--archive {
  background: rgba(179, 107, 0, 0.1);
  border-color: rgba(179, 107, 0, 0.24);
  color: #8a5100;
}

.table-actions-inline {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.table-actions-inline form {
  display: inline-flex;
  margin: 0;
}

.table-actions-inline--acoes {
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  min-width: 126px;
  width: 100%;
}

.table-actions-inline--acoes .btn {
  height: 28px;
  min-height: 28px;
  width: 28px;
}

.table-actions-inline--acoes .status-form-icon {
  height: 28px;
  width: 28px;
}

.table-actions-inline--usuarios {
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: 116px;
  width: 100%;
}

.table-actions-inline--usuarios form {
  display: inline-flex;
  margin: 0;
}

.table-actions-inline--usuarios .btn {
  height: 28px;
  min-height: 28px;
  width: 28px;
}

.actions--docs .btn {
  font-size: 12px;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  white-space: normal;
  width: 100%;
}

.actions--docs {
  flex-wrap: wrap;
  gap: 6px;
}

.actions--docs .btn--compact {
  min-height: 28px;
  padding: 4px 7px;
}

.biblioteca-table-wrap {
  overflow: visible;
}

.biblioteca-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.biblioteca-table th:nth-child(1),
.biblioteca-table td:nth-child(1) {
  width: 31%;
}

.biblioteca-table th:nth-child(2),
.biblioteca-table td:nth-child(2) {
  width: 13%;
}

.biblioteca-table th:nth-child(3),
.biblioteca-table td:nth-child(3) {
  width: 10%;
}

.biblioteca-table th:nth-child(4),
.biblioteca-table td:nth-child(4) {
  width: 15%;
}

.biblioteca-table th:nth-child(5),
.biblioteca-table td:nth-child(5) {
  width: 11%;
}

.biblioteca-table th:nth-child(6),
.biblioteca-table td:nth-child(6) {
  width: 20%;
}

.biblioteca-table .data-table__actions,
.biblioteca-table td:nth-child(6) {
  white-space: normal;
  vertical-align: top;
}

.biblioteca-doc-name {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.entity-info-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entity-info-section {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.entity-info-section--full {
  margin-top: 14px;
}

.entity-info-section__header {
  margin-bottom: 12px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  gap: 3px;
}

.info-list dt {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.info-list dd {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}

.data-table--representantes th:nth-child(1),
.data-table--representantes td:nth-child(1) {
  width: 28%;
}

.data-table--representantes th:nth-child(2),
.data-table--representantes td:nth-child(2) {
  width: 16%;
}

.data-table--representantes th:nth-child(3),
.data-table--representantes td:nth-child(3) {
  width: 28%;
}

.data-table--representantes th:nth-child(4),
.data-table--representantes td:nth-child(4) {
  width: 14%;
}

.data-table--representantes th:nth-child(5),
.data-table--representantes td:nth-child(5) {
  width: 14%;
}

.btn[data-tooltip]:not([data-ui-tooltip-bound])::before {
  background: rgba(20, 32, 43, 0.94);
  border-radius: var(--radius-xs);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 600;
  left: 50%;
  line-height: 1.3;
  max-width: 220px;
  opacity: 0;
  padding: 6px 8px;
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
  z-index: 300;
}

.btn[data-tooltip]:not([data-ui-tooltip-bound]):hover::before,
.btn[data-tooltip]:not([data-ui-tooltip-bound]):focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ui-tooltip-floating {
  background: rgba(20, 32, 43, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  max-width: min(260px, calc(100vw - 24px));
  opacity: 0;
  padding: 6px 9px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  transform: translateY(3px);
  transition: opacity var(--motion-fast) var(--easing-standard), transform var(--motion-fast) var(--easing-standard);
  white-space: normal;
  z-index: 1000;
}

.ui-tooltip-floating.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.status-badge--success,
.status-aprovada,
.status-ativo,
.status-publicado, .status-aprovado {
  background: #e4f2ec;
  color: #126143;
}

.status-badge--info,
.status-submetida,
.status-em-analise {
  background: var(--info-soft);
  color: var(--info);
}

.status-anexado {
  background: #e3edf7;
  color: #1d4f7a;
}

.status-badge--warning,
.status-rascunho,
.status-ajuste-solicitado,
.status-aguardando-finalizacao,
.status-pendente {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-badge--danger,
.status-rejeitada,
.status-inativo,
.status-cancelado {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge--neutral,
.status-indefinido,
.status-encerrado {
  background: #edf1f4;
  color: var(--text-soft);
}

.status-form-icon {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: var(--radius-xs);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.status-form-icon svg {
  height: 14px;
  width: 14px;
}

.status-form-icon--empty {
  color: #8a97a5;
}

.status-form-icon--complete {
  color: #1d7b5c;
}

.status-form-icon--progress {
  color: #a76200;
}

.status-form-icon--error {
  color: #b03a3c;
}

.list-stack {
  display: grid;
  gap: 8px;
}

.document-section__list {
  gap: 10px;
}

.list-row {
  align-items: flex-start;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 11px 12px;
  transition: background var(--transition), border-color var(--transition);
}

.list-row > :first-child {
  flex: 1 1 260px;
  min-width: 0;
}

.list-row > .form-stack,
.list-row > form,
.list-row > .actions {
  min-width: 0;
}

.list-row > .form-stack,
.list-row > form {
  flex: 1 1 640px;
}

.list-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.list-row__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.list-row__meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 4px 0 0;
}

.list-row__meta--edital-texto {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.document-review-row {
  position: relative;
}

.document-review-row--attention {
  background: #fffefa;
  border-color: #ead9ad;
}

.document-review-row--attention:hover {
  background: #fff8e5;
  border-color: #d4ad5c;
}

.document-review-row--attention::before {
  background: var(--warning);
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}

.document-review-row--resolved {
  background: #fbfcfb;
  border-color: #e4e8e5;
}

.document-review-row--resolved:hover {
  background: #f6f8f6;
  border-color: #d7ddd9;
}

.document-review-row--resolved .document-review-row__title {
  color: var(--text-soft);
  font-weight: 500;
}

.document-review-row--resolved .document-review-row__meta,
.document-review-row--resolved .document-review-row__link {
  color: #8b9690;
  font-weight: 500;
}

.document-review-row--resolved .status-badge {
  opacity: .72;
}

.document-review-row--resolved .document-review-row__action {
  opacity: .76;
}

.document-review-row--resolved .document-review-row__action:hover,
.document-review-row--resolved .document-review-row__action:focus-visible {
  opacity: 1;
}

.document-review-row__missing {
  color: var(--danger);
  font-weight: 700;
}

.accordion {
  display: grid;
  gap: 8px;
}

.accordion__item {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
}

.accordion__summary {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  font-weight: 700;
  list-style: none;
  min-height: 42px;
  padding: 11px 12px;
  position: relative;
  user-select: none;
}

.accordion__summary::-webkit-details-marker {
  display: none;
}

.accordion__summary::marker {
  content: "";
}

.accordion__summary::after {
  border-color: var(--muted);
  border-style: solid;
  border-width: 0 2px 2px 0;
  content: "";
  flex: 0 0 auto;
  height: 8px;
  margin-left: auto;
  transform: rotate(45deg);
  transition: transform var(--transition), border-color var(--transition);
  width: 8px;
}

.accordion__summary:hover::after,
.accordion__summary:focus-visible::after {
  border-color: var(--brand);
}

.accordion__summary:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(11, 61, 46, 0.15);
  outline: none;
}

.accordion__body {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 12px 14px 14px;
  transition: max-height var(--motion-slow) var(--easing-standard), opacity var(--motion-base) var(--easing-standard);
}

.accordion__item[open] .accordion__body {
  max-height: 600px;
  opacity: 1;
}

.accordion__item[open] .accordion__summary::after {
  transform: rotate(-135deg);
}

.tabs {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
}

.tabs__item {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: var(--radius-xs);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 34px;
  padding: 8px 11px;
  text-align: center;
  text-decoration: none;
  user-select: none;
}

.tabs__item.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.tabs__item:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
  outline: none;
}

.modal {
  align-items: center;
  background: rgba(11, 18, 24, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: var(--z-modal);
  opacity: 1;
  transition: opacity var(--motion-base) var(--easing-standard);
}

.modal.is-hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal__dialog {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 720px;
  overflow: hidden;
  width: 100%;
  transform: scale(1);
  transition: transform var(--motion-base) var(--easing-standard), opacity var(--motion-base) var(--easing-standard);
}

.modal.is-hidden .modal__dialog {
  opacity: 0;
  transform: scale(0.98);
}

.modal__dialog--small {
  max-width: 480px;
}

.modal__dialog--docs {
  max-width: 980px;
}

.docs-upload-grid {
  align-items: end;
}

.docs-upload-actions {
  justify-content: space-between;
}

.doc-upload-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-upload-form {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.doc-entity-accordion {
  gap: 12px;
}

.doc-entity-accordion__summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.doc-entity-accordion__summary::after {
  margin-left: 4px;
}

.doc-entity-accordion__title {
  flex: 1 1 260px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.doc-entity-accordion__status {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 8px;
}

.status-form-icon--edit {
  background: #fff;
  color: var(--brand);
  height: 26px;
  width: 26px;
}

.status-form-icon--edit:hover,
.status-form-icon--edit:focus-visible,
.status-form-icon--edit.is-active {
  background: var(--brand-soft);
}

.doc-entity-accordion .accordion__item.is-editing {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.10);
}

.doc-entity-accordion .accordion__item.is-editing .doc-upload-form--inline {
  background: #f7fbf9;
  border-color: var(--brand);
}

.doc-entity-accordion__body {
  gap: 16px;
  padding: 16px 14px;
}

.doc-entity-accordion__motivo {
  margin: 0;
}

.doc-entity-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 0.8fr);
}

.doc-upload-row td {
  background: #fbfcfd;
}

.biblioteca-table td:nth-child(4),
.biblioteca-table td:nth-child(5) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.biblioteca-table td:nth-child(6) .btn {
  min-width: 92px;
}

@media (max-width: 920px) {
  .entity-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-entity-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-upload-form__row--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.link-button {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.link-button:focus-visible {
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
  outline: none;
}

.entity-workspace {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-top: 2px solid var(--brand);
  border-radius: var(--radius-md);
  box-shadow: none;
  display: block;
  margin-top: 14px;
  padding: 16px;
}

.entity-workspace--tecnico {
  margin-top: 12px;
}

.entity-workspace__body {
  min-width: 0;
}

.entity-workspace .entity-pill-pane > .panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.entity-workspace .entity-pill-pane > .panel + .panel {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}

.entity-workspace .entity-pill-pane > .panel > .panel__header {
  background: transparent;
  padding: 0 0 12px;
}

.entity-workspace .entity-pill-pane > .panel > .panel__body,
.entity-workspace .entity-pill-pane > .panel > form.panel__body {
  padding: 14px 0 0;
}

.entity-pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  max-width: 100%;
}

.entity-pill {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-sizing: border-box;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 32px;
  padding: 7px 12px;
  text-align: center;
  user-select: none;
}

.entity-pill:hover:not(.is-active) {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text);
}

.entity-pill.is-active {
  background: var(--brand);
  border-color: var(--brand-strong);
  color: #ffffff;
}

.entity-pill.is-active:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.entity-pill:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.15);
  outline: none;
}

.entity-pill-pane {
  padding-top: 14px;
}

.entity-pill-pane[hidden] {
  display: none !important;
}

.pagination-inline {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

.table-footer {
  align-items: center;
  margin-top: 12px;
}

.letter-filter-strip {
  justify-content: flex-start;
}

.kpi-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.progress-stack {
  display: grid;
  gap: 10px;
}

.progress-item__meta {
  display: flex;
  font-size: 13px;
  justify-content: space-between;
}

.progress-item__bar {
  background: #e4e7ec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-item__fill {
  height: 100%;
}

.progress-item__fill--success {
  background: #12b76a;
}

.progress-item__fill--danger {
  background: #f04438;
}

.progress-item__fill--warning {
  background: #f79009;
}

.import-progress {
  background: #e4e7ec;
  border-radius: 999px;
  height: 10px;
  margin: 10px 0;
  overflow: hidden;
}

.import-progress__bar {
  background: #12b76a;
  height: 100%;
  transition: width var(--motion-base) var(--easing-standard);
  width: 0;
}

.import-progress__summary {
  color: var(--text-soft);
}

.tecnico-toolbar {
  align-items: end;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px;
}

.tecnico-toolbar--single-line {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tecnico-toolbar--single-line .tecnico-toolbar__search,
.tecnico-toolbar--single-line .tecnico-toolbar__tipo,
.tecnico-toolbar--single-line .tecnico-toolbar__actions {
  min-width: 0;
}

.tecnico-toolbar--single-line .tecnico-toolbar__actions {
  align-items: flex-end;
  justify-content: flex-end;
}

.panel--sticky-toolbar {
  position: sticky;
  top: 62px;
  z-index: 25;
}

.panel--sticky-toolbar + .grid-four {
  margin-top: 12px;
}

.stats-tabs-panel {
  margin-top: 12px;
}

.grid-four + .panel--sticky-toolbar {
  margin-top: 12px;
}

.panel--sticky-toolbar + .stats-tabs-panel {
  margin-top: 12px;
}

.stats-tabs-content {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.stats-tab-pane {
  display: none;
}

.stats-tab-pane.is-active {
  display: block;
}

.stats-tab-pane .panel {
  margin-top: 0;
}

.panel--question-card {
  margin-top: 10px;
}

.question-excerpt {
  margin-top: 6px;
  max-width: 780px;
}

.tecnico-toolbar__search {
  flex: 1 1 320px;
  min-width: 260px;
}

.tecnico-toolbar__tipo {
  flex: 0 1 auto;
  min-width: 260px;
}

.tecnico-toolbar__actions {
  align-items: center;
  display: inline-flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.tecnico-toolbar .field__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tecnico-toolbar--entidades {
  align-items: flex-end;
  gap: 8px 10px;
}

.tecnico-toolbar--entidades .tecnico-toolbar__search {
  flex: 1 1 420px;
  max-width: 760px;
  min-width: 0;
}

.tecnico-toolbar--entidades .tecnico-toolbar__actions {
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}

.tecnico-toolbar--entidades .tecnico-toolbar__tipo {
  border-top: 1px solid var(--border);
  flex: 1 1 100%;
  margin-top: 2px;
  min-width: 0;
  padding-top: 8px;
}

.tecnico-toolbar--listagem-ampla {
  display: grid;
  gap: 8px 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tecnico-toolbar--listagem-ampla .tecnico-toolbar__search {
  grid-column: span 2;
  max-width: none;
}

.tecnico-toolbar--listagem-ampla .tecnico-toolbar__actions {
  grid-column: span 2;
  justify-content: flex-end;
}

.tecnico-toolbar--listagem-ampla .tecnico-toolbar__tipo {
  border-top: 0;
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 0;
}

#tabela-entidades th,
#tabela-entidades td,
#tabela-produtores th,
#tabela-produtores td {
  text-align: center;
}

#tabela-entidades .th-sort-btn,
#tabela-produtores .th-sort-btn {
  justify-content: center;
  text-align: center;
}

#tabela-entidades th:first-child,
#tabela-entidades td.data-table__cell--name,
#tabela-produtores th:first-child,
#tabela-produtores td.data-table__cell--name {
  text-align: left;
}

#tabela-entidades th:first-child .th-sort-btn,
#tabela-produtores th:first-child .th-sort-btn {
  justify-content: flex-start;
  text-align: left;
}

@media (max-width: 1080px) {
  .tecnico-toolbar--listagem-ampla {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tecnico-toolbar--listagem-ampla .tecnico-toolbar__search,
  .tecnico-toolbar--listagem-ampla .tecnico-toolbar__actions {
    grid-column: span 2;
  }
}

.tecnico-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tecnico-accordion__summary {
  background: var(--surface-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.tecnico-accordion__content {
  padding: 10px;
}

.geo-map {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 460px;
  overflow: hidden;
  width: 100%;
}

.geo-map--tall {
  height: 620px;
}

.data-table--docs-upload th:nth-child(1),
.data-table--docs-upload td:nth-child(1) {
  width: 28%;
}

.data-table--docs-upload th:nth-child(2),
.data-table--docs-upload td:nth-child(2) {
  width: 14%;
}

.data-table--docs-upload th:nth-child(3),
.data-table--docs-upload td:nth-child(3) {
  width: 18%;
}

.data-table--docs-upload th:nth-child(4),
.data-table--docs-upload td:nth-child(4) {
  width: 40%;
}

.data-table--docs-upload td:nth-child(4) {
  vertical-align: top;
}

.data-table--entidades th:nth-child(1),
.data-table--entidades td:nth-child(1) {
  width: 52%;
}

.data-table--entidades th:nth-child(2),
.data-table--entidades td:nth-child(2) {
  width: 20%;
}

.data-table--entidades th:nth-child(3),
.data-table--entidades td:nth-child(3) {
  width: 14%;
}

.data-table--entidades th:nth-child(4),
.data-table--entidades td:nth-child(4) {
  width: 14%;
}

.map-actions-toolbar {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.map-actions-toolbar__downloads {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-download-btn {
  border-radius: var(--radius-xs);
  min-height: 34px;
  min-width: 56px;
  padding: 6px 10px;
}

.geo-tooltip--dark {
  background: #16222c;
  border: 1px solid #42586b;
  border-radius: 8px;
  color: #d6e3ef;
}

.geo-tooltip--dark:before {
  border-top-color: #16222c !important;
}

.grid-four .metric-card {
  padding: 14px;
}

.modal__header {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.modal__title {
  color: var(--text);
  font-size: 15px;
  margin: 0;
}

.modal__body {
  padding: 14px 16px;
}

.modal__footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px 14px;
}

.modal__close {
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  line-height: 1;
  width: 32px;
}

.modal__close:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.empty-state {
  align-items: center;
  background: var(--surface-raised);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  display: grid;
  justify-items: center;
  padding: 24px 18px;
  text-align: center;
}

.empty-state__title {
  color: var(--text-soft);
  font-weight: 700;
  margin: 0;
}

.empty-state__text {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}

.notice--info {
  background: var(--info-soft);
  border-left-color: var(--info);
  color: var(--info);
}

.notice--warning {
  background: var(--warning-soft);
  border-left-color: var(--warning);
  color: var(--warning);
}

.adjustment-alert {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 13px 15px;
}

.adjustment-alert__icon {
  align-items: center;
  background: rgba(180, 83, 9, 0.12);
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  line-height: 1;
  margin-top: -1px;
  width: 22px;
}

.adjustment-alert__text {
  color: var(--text);
  line-height: 1.45;
  margin: 0;
}

.adjustment-alert__text strong {
  color: var(--warning);
}

.notice--danger {
  background: var(--danger-soft);
  border-left-color: var(--danger);
  color: var(--danger);
}

.toast-container {
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: 380px;
  position: fixed;
  right: 18px;
  width: calc(100vw - 36px);
  z-index: var(--z-toast);
}

.toast {
  animation: toast-in var(--motion-base) var(--easing-standard) both;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}

.toast.is-leaving {
  animation: toast-out var(--motion-base) var(--easing-standard) both;
}

.toast--success { border-left-color: #1f7a5c; }
.toast--danger { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--info); }
.toast--success .toast__icon { color: #1f7a5c; }
.toast--danger .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--info); }
.toast__icon { flex: 0 0 auto; height: 18px; margin-top: 1px; width: 18px; }
.toast__message { color: var(--text-soft); flex: 1; font-size: 13px; margin: 0; }
.toast__close {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 2px;
}

.is-highlighted {
  animation: row-highlight 1200ms var(--easing-standard);
}

.skeleton {
  animation: skeleton-wave 1.3s linear infinite;
  background: linear-gradient(
    90deg,
    rgba(106, 123, 139, 0.16) 25%,
    rgba(106, 123, 139, 0.07) 37%,
    rgba(106, 123, 139, 0.16) 63%
  );
  background-size: 400% 100%;
  border-radius: var(--radius-xs);
  min-height: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .modal__dialog,
  .modal__dialog--small,
  .modal__dialog--docs {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .data-table {
    table-layout: auto;
    min-width: 600px;
  }
}

