/* Módulo AHP — conteúdo SIGMA adaptado ao visual SLT (app.css) */

/* ---- Hierarquização: utilidades de layout ---- */
.hier-subcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hier-subcard-header > .ahp-help-text { margin: 0; }
.hier-actions-bar { display: flex; justify-content: space-between; align-items: center; }
.hier-actions-end { display: flex; justify-content: flex-end; gap: 8pt; }
.hier-btn-group { display: flex; gap: 8pt; }
.hier-toolbar { display: flex; gap: 8pt; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.hier-scroll-x { overflow-x: auto; }
.hier-full-table { width: 100%; }
.hier-th-checkbox { width: 40px; }
.hier-criterios-table { margin-top: 8pt; overflow-x: auto; }
.hier-mt-8 { margin-top: 8pt; }
.hier-sucesso-box { background: #e8f5e9; }
.hier-sucesso-box .hier-sucesso__icon { color: #2e7d32; }
.hier-sucesso-box .hier-sucesso__text { color: #2e7d32; }

html.ahp-auth-pending body {
  visibility: hidden;
}

.ahp-module-page .admin-session-bar-inner {
  max-width: none;
  width: 90%;
}

.ahp-module-page .app-main.ahp-main {
  max-width: none;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.ahp-page-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  color: var(--pli-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ahp-page-desc {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--pli-muted);
  line-height: 1.6;
  max-width: 820px;
  text-align: left;
}

.ahp-module-page .ahp-step-intro,
.ahp-module-page .app-main.ahp-main > .card:first-child {
  text-align: center;
}

.ahp-module-page .ahp-breadcrumb {
  justify-content: center;
}

.ahp-module-page .ahp-page-title {
  justify-content: center;
}

.ahp-module-page .ahp-info-note {
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

.ahp-module-page .ahp-info-note i {
  margin-top: 0;
  line-height: 1.55;
}

.ahp-module-page .ahp-section-label {
  justify-content: flex-start;
  text-align: left;
}

.ahp-module-page .info-card-content {
  text-align: center;
}

.ahp-module-page .ahp-step-title {
  justify-content: flex-start;
  text-align: left;
}

.ahp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--pli-muted);
}

.ahp-breadcrumb a {
  font-weight: 600;
  text-decoration: none;
}

.ahp-breadcrumb-sep {
  opacity: 0.45;
  font-size: 0.7rem;
}

.ahp-breadcrumb-current {
  color: var(--pli-deep);
  font-weight: 700;
}

.ahp-info-note {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--pli-radius);
  background: rgba(17, 101, 147, 0.08);
  border: 1px solid rgba(17, 101, 147, 0.12);
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
}

.ahp-info-note i {
  flex-shrink: 0;
  color: var(--pli-blue);
  margin-top: 0;
  line-height: 1.55;
  font-size: 0.875rem;
}

.ahp-info-note span {
  flex: 1;
  text-align: justify;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.ahp-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: -1.25rem -1.5rem 1rem;
  padding: 0.75rem 1.5rem;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--pli-deep);
  border-radius: var(--pli-radius) var(--pli-radius) 0 0;
}

.ahp-section-label i {
  font-size: 0.9rem;
  color: var(--pli-green);
}

.ahp-section-index-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--pli-green), var(--pli-blue));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.ahp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.ahp-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.15rem;
  border-radius: var(--pli-radius);
  border: 1px solid var(--pli-border);
  background: #f7f9fb;
  box-shadow: var(--pli-shadow);
  text-align: center;
}

.ahp-summary-card__icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(62, 194, 110, 0.18), rgba(17, 101, 147, 0.14));
  color: var(--pli-blue);
  font-size: 1.1rem;
}

.ahp-summary-card h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--pli-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.ahp-summary-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
}

.ahp-features-grid,
.ahp-process-grid,
.ahp-info-highlights,
.ahp-method-grid,
.ahp-tipo-grid {
  display: grid;
  gap: 1rem;
}

.ahp-features-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ahp-process-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ahp-info-highlights {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}

.ahp-method-grid,
.ahp-tipo-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ahp-feature-card,
.ahp-process-card,
.ahp-info-item,
.ahp-method-card {
  padding: 1.15rem;
  border-radius: var(--pli-radius);
  border: 1px solid var(--pli-border);
  background: var(--pli-white);
  box-shadow: var(--pli-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ahp-feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 194, 110, 0.18), rgba(17, 101, 147, 0.14));
  color: var(--pli-blue);
  font-size: 1.25rem;
}

.ahp-feature-card h3,
.ahp-process-card h3,
.ahp-method-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--pli-deep);
}

.ahp-feature-card p,
.ahp-process-card p,
.ahp-info-item p,
.ahp-method-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
}

.ahp-process-card {
  position: relative;
  overflow: hidden;
}

.ahp-process-number {
  width: 36px;
  height: 36px;
  margin: 0 0 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pli-green), var(--pli-blue));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.ahp-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  justify-content: center;
}

/* ---- Navegação por fase (3 fases do módulo) ---- */
.ahp-phase-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem;
}

.ahp-phase {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius, 8px);
  background: #fff;
  text-decoration: none;
  color: var(--pli-muted);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.ahp-phase:hover {
  border-color: var(--pli-blue);
  box-shadow: 0 4px 12px rgba(17, 101, 147, 0.18);
  transform: translateY(-2px);
}

.ahp-phase-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pli-blue);
}

.ahp-phase-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pli-deep);
}

.ahp-phase.active {
  border-color: rgba(42, 163, 88, 0.45);
  background: linear-gradient(135deg, rgba(42, 163, 88, 0.1), rgba(17, 101, 147, 0.08));
}

.ahp-phase.active .ahp-phase-num {
  color: var(--pli-green);
}

@media (max-width: 640px) {
  .ahp-phase-nav {
    grid-template-columns: 1fr;
  }
}

.hier-phase-navigation {
  display: grid;
  gap: 0.1rem;
  margin-bottom: 0.4rem;
}

.hier-link-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--pli-border);
}

.hier-link-bar a {
  padding: 0.25rem 0.75rem;
  color: var(--pli-deep);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.hier-link-bar a:hover,
.hier-link-bar a.active {
  color: var(--pli-green);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.hier-link-bar--tools a {
  color: var(--pli-muted);
  font-size: 0.76rem;
}

.geoespacial-phase-navigation {
  padding: 0.2rem clamp(0.75rem, 3vw, 2rem) 0;
  background: #fff;
}

.geoespacial-phase-navigation .hier-phase-navigation {
  max-width: 1280px;
  margin-inline: auto;
}

@media (max-width: 640px) {
  .hier-link-bar {
    justify-content: center;
    text-align: center;
  }

  .hier-link-bar a {
    padding: 0.22rem 0.4rem;
  }
}

.ahp-progress {
  margin-bottom: 1rem;
}

.ahp-progress-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.ahp-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.35rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #f7f9fb;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pli-muted);
  text-align: center;
}

a.ahp-progress-step {
  text-decoration: none;
  color: var(--pli-muted);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

a.ahp-progress-step:hover {
  border-color: var(--pli-blue);
  box-shadow: 0 4px 12px rgba(17, 101, 147, 0.18);
  transform: translateY(-2px);
}

.ahp-progress-circle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(17, 101, 147, 0.12);
  color: var(--pli-blue);
  font-weight: 800;
  font-size: 0.85rem;
}

.ahp-progress-step.active,
.ahp-progress-step.completed {
  border-color: rgba(42, 163, 88, 0.35);
  color: var(--pli-deep);
}

.ahp-progress-step.active .ahp-progress-circle,
.ahp-progress-step.completed .ahp-progress-circle {
  background: linear-gradient(135deg, var(--pli-green), var(--pli-blue));
  color: #fff;
}

.ahp-step-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--pli-deep);
}

.ahp-step-number {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pli-green), var(--pli-blue));
  color: #fff;
  font-weight: 800;
}

.ahp-info-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  text-align: center;
}

.ahp-info-card-header i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 194, 110, 0.18), rgba(17, 101, 147, 0.14));
  color: var(--pli-blue);
  font-size: 1.15rem;
}

.ahp-info-card-header h2,
.ahp-info-card-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--pli-deep);
}

.ahp-info-item {
  gap: 0.65rem;
}

.ahp-info-item i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(62, 194, 110, 0.14);
  color: var(--pli-green-dark);
}

.ahp-info-item strong {
  color: var(--pli-deep);
}

.ahp-recommendation,
.ahp-instructions {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--pli-radius);
  background: rgba(17, 101, 147, 0.08);
  border: 1px solid rgba(17, 101, 147, 0.1);
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
}

.ahp-recommendation i,
.ahp-instructions i {
  color: var(--pli-blue);
  margin-top: 0.1rem;
}

.ahp-recommendation__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ahp-recommendation__head i {
  margin-top: 0;
}

.ahp-recommendation__head strong {
  color: var(--pli-deep);
}

/* Card de mensagem padrão: empilha o conteúdo e ocupa a largura do card */
.secao-collab-email-draft-card {
  flex-direction: column;
  gap: 0.5rem;
}

.secao-collab-email-draft-card .c-form-group,
.secao-collab-email-draft-card .c-form-control {
  width: 100%;
}

.secao-collab-email-draft-card .c-form-control {
  resize: vertical;
}

.ahp-method-choice-row {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.ahp-method-choice-row .ahp-method-choice {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

.ahp-method-choice {
  padding: 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #fafbfc;
}

.ahp-method-choice-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.ahp-method-choice-header label {
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ahp-method-content--hidden {
  display: none;
}

.ahp-upload-steps {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.ahp-upload-step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #fff;
}

.ahp-upload-step__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ahp-upload-step__head strong {
  font-size: 0.95rem;
  color: var(--pli-deep);
}

.ahp-upload-step .step-content {
  padding-left: calc(36px + 0.75rem);
}

.ahp-step-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pli-green), var(--pli-blue));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.ahp-template-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.ahp-template-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 46px;
  width: 100%;
  padding: 0 20px;
  border: 1px solid rgba(17, 101, 147, 0.45);
  border-radius: 14px;
  background: transparent;
  color: var(--pli-blue);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ahp-template-download-btn:hover {
  background: transparent;
  color: var(--pli-blue);
  text-decoration: none;
  transform: translateY(-2px);
}

.ahp-upload-select-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 14px;
  background: #e8edf2;
  color: var(--pli-deep);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ahp-upload-select-btn:hover {
  transform: translateY(-2px);
  background: #dfe7ee;
}

/* Select de configuração salva — visual igual ao botão de upload */
#cfg-saved-select {
  width: 100%;
  min-height: 46px;
  padding: 0 2.2rem 0 1rem;
  background: #e8edf2;
  color: var(--pli-blue);
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23116593' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 10px 7px;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

#cfg-saved-select:hover {
  background-color: #dfe7ee;
}

#cfg-saved-select:focus {
  outline: 2px solid rgba(17, 101, 147, 0.3);
  outline-offset: 2px;
}

#cfg-saved-select option {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pli-text);
  background: #fff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ahp-selected-file {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--pli-radius);
  background: rgba(62, 194, 110, 0.12);
  color: var(--pli-deep);
  font-size: 0.875rem;
}

.ahp-method-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ahp-method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(28, 61, 89, 0.12);
}

.ahp-method-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 194, 110, 0.18), rgba(17, 101, 147, 0.14));
  color: var(--pli-blue);
  font-size: 1.35rem;
}

.ahp-method-example {
  width: 100%;
  height: auto;
  border-radius: var(--pli-radius);
  border: 1px solid var(--pli-border);
  margin: 0.65rem 0;
}

.ahp-method-features,
.method-features,
.ahp-info-list,
.info-list {
  margin: 0.65rem auto 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--pli-muted);
  text-align: center;
  list-style: none;
}

.ahp-method-features li,
.method-features li,
.ahp-info-list li,
.info-list li {
  margin-bottom: 0.35rem;
}

.ahp-method-features li i,
.method-features li i,
.ahp-info-list li i,
.info-list li i {
  margin-right: 0.35rem;
  color: var(--pli-green-dark);
}

.ahp-module-page .method-option-header,
.ahp-module-page .method-option-body,
.ahp-module-page .method-option-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ahp-module-page .method-option-footer {
  margin-top: 0.75rem;
}

.ahp-module-page .ahp-recommendation,
.ahp-module-page .ahp-instructions {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.ahp-module-page .info-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 0.875rem;
}

.ahp-module-page .ahp-method-choice,
.ahp-module-page .method-content,
.ahp-module-page .ahp-upload-step,
.ahp-module-page .step-content,
.ahp-module-page .upload-area {
  text-align: left;
}

.ahp-module-page .method-content .c-form-group,
.ahp-module-page .upload-area {
  max-width: 520px;
  margin-left: 0;
  margin-right: 0;
}

.ahp-collab-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
}

.ahp-collab-inline .c-form-control {
  min-width: 0;
  width: 100%;
}

.ahp-collab-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: end;
}

.ahp-collab-grid2 .c-form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 0;
}

.ahp-collab-deadline-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
}

.ahp-collab-deadline-inline .c-form-control {
  min-width: 0;
  width: 100%;
  height: 2.5rem;
  box-sizing: border-box;
}

#collab-email-input.c-form-control {
  height: 2.5rem;
  box-sizing: border-box;
}

.ahp-collab-add-btn {
  width: 2.65rem;
  min-width: 2.65rem;
  height: 100%;
  min-height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--pli-border);
  background: #fff;
  color: var(--pli-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ahp-collab-add-btn:hover {
  border-color: var(--pli-blue);
  background: rgba(17, 101, 147, 0.06);
}

.ahp-collab-add-btn:focus-visible {
  outline: 2px solid rgba(17, 101, 147, 0.35);
  outline-offset: 1px;
}

.ahp-collab-chk-col {
  width: 2.2rem;
  text-align: center;
}

.ahp-collab-table .collab-row-chk {
  cursor: pointer;
  accent-color: var(--pli-blue);
  width: 1rem;
  height: 1rem;
}

.ahp-collab-table-wrap {
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  overflow: hidden;
}

.ahp-collab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ahp-collab-table thead th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: #f4f7fb;
  color: var(--pli-deep);
  border-bottom: 1px solid var(--pli-border);
  white-space: nowrap;
}

.ahp-collab-table tbody td {
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(17, 101, 147, 0.1);
  color: var(--pli-muted);
}

.ahp-collab-table tbody tr:first-child td {
  border-top: none;
}

.ahp-collab-row-empty td {
  text-align: center;
  color: var(--pli-muted);
  font-style: italic;
}

.ahp-collab-row-valid td {
  background: rgba(42, 163, 88, 0.06);
}

.ahp-collab-row-new td {
  box-shadow: inset 0 0 0 9999px rgba(42, 163, 88, 0.12);
}

.ahp-collab-valid-dot {
  color: #17803a;
  font-size: 0.72rem;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .ahp-collab-grid2 {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

/* A seção de carregamento da configuração ocupa a largura inteira do card. */
.ahp-module-page .ahp-config-loader .method-content .c-form-group,
.ahp-module-page .ahp-config-loader .upload-area {
  max-width: none;
}

.ahp-module-page .ahp-template-buttons {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.ahp-module-page .ahp-template-download-btn {
  box-shadow: none;
}

.ahp-module-page .ahp-template-download-btn:hover {
  filter: none;
}

.ahp-module-page .upload-area {
  display: grid;
  gap: 0.875rem;
  max-width: none;
}

.ahp-module-page .upload-area .file-info {
  margin-top: 0;
}

.ahp-module-page .info-box__content {
  min-width: 0;
}

.ahp-module-page .info-box__content strong {
  display: block;
  margin-bottom: 0.5rem;
}

.ahp-module-page .info-list {
  margin: 0;
  padding-left: 1.125rem;
  text-align: left;
  list-style: disc;
}

.ahp-module-page .info-list li {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

.ahp-module-page .info-list li:last-child {
  margin-bottom: 0;
}

.ahp-module-page .ahp-method-choice-header,
.ahp-module-page .ahp-step-title {
  justify-content: flex-start;
}

.ahp-module-page .ahp-step-title .ahp-step-number {
  margin-left: 0;
}

.ahp-tipo-card {
  position: relative;
  padding: 1.25rem;
  border: 2px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: var(--pli-white);
  box-shadow: var(--pli-shadow);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ahp-tipo-card:hover {
  border-color: rgba(17, 101, 147, 0.35);
}

/* Variante compacta: ícone + título lado a lado, altura reduzida (Destino). */
.ahp-tipo-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ahp-tipo-card--compact {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.ahp-tipo-card--compact .ahp-tipo-card__icon {
  width: 38px;
  height: 38px;
  margin: 0;
  flex: none;
  font-size: 1.05rem;
}

.ahp-tipo-card--compact h3 {
  margin: 0;
  font-size: 0.95rem;
}

/* Texto de ajuda padronizado: ocupa a largura toda do card, quebra só se
   necessário (logo abaixo do título da seção/subseção). */
.ahp-help-text {
  max-width: none;
  width: 100%;
  text-align: left;
}

/* Elementos do escopo: ritmo vertical uniforme entre blocos; o rótulo já fica
   colado ao seu input (c-form-label tem margin-bottom 0.35rem). */
.ahp-escopo-fields > .ahp-escopo-grid,
.ahp-escopo-fields > .c-form-group {
  margin-bottom: 1.1rem;
}

.ahp-escopo-fields > .c-form-group:last-child {
  margin-bottom: 0;
}

.ahp-tipo-card.selected {
  border-color: var(--pli-blue);
  box-shadow: 0 0 0 3px rgba(17, 101, 147, 0.12);
}

.ahp-tipo-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ahp-tipo-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 194, 110, 0.18), rgba(17, 101, 147, 0.14));
  color: var(--pli-blue);
  font-size: 1.25rem;
}

.ahp-tipo-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--pli-deep);
}

.ahp-tipo-card ul {
  margin: 0.65rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
  list-style: none;
  text-align: center;
}

.ahp-tipo-card ul li {
  margin-bottom: 0.35rem;
}

.ahp-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.ahp-final-actions-row {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
}

.ahp-final-actions-row .btn {
  white-space: nowrap;
}

.ahp-step3-continue {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.ahp-save-names-feedback {
  margin: 0.75rem 0 0;
  min-height: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--pli-text-muted, #64748b);
}

.ahp-save-names-feedback.is-success {
  color: var(--pli-success, #15803d);
}

.ahp-save-names-feedback.is-error {
  color: var(--pli-error, #b91c1c);
}

.ahp-form-actions .btn i {
  margin-right: 0.35rem;
}

.ahp-form-actions .btn i.icon-right {
  margin-right: 0;
  margin-left: 0.35rem;
}

.ahp-criteria-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

@media (max-width: 768px) {
  .ahp-criteria-inputs {
    grid-template-columns: 1fr;
  }
}

.ahp-comparison-content {
  display: grid;
  gap: 1rem;
}

.ahp-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  overflow: hidden;
  background: #fff;
}

.ahp-matrix-table th,
.ahp-matrix-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--pli-border);
  border-right: 1px solid var(--pli-border);
  text-align: center;
  font-size: 0.8125rem;
}

.ahp-matrix-table th:last-child,
.ahp-matrix-table td:last-child {
  border-right: none;
}

.ahp-matrix-table tr:last-child th,
.ahp-matrix-table tr:last-child td {
  border-bottom: none;
}

.ahp-matrix-table thead th {
  background: linear-gradient(135deg, var(--pli-deep), var(--pli-blue));
  color: #fff;
}

.ahp-matrix-table select {
  min-width: 72px;
  padding: 0.35rem;
  font-size: 0.8125rem;
}

.ahp-saaty-image {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: var(--pli-radius);
  border: 1px solid var(--pli-border);
  margin-top: 0.75rem;
}

.ahp-notification {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: var(--pli-radius);
  color: #fff;
  box-shadow: var(--pli-shadow);
  font-size: 0.875rem;
  animation: ahpSlideIn 0.3s ease-out;
}

.ahp-notification--success {
  background: linear-gradient(135deg, #1f8b46, var(--pli-green-dark));
}

.ahp-notification--error {
  background: linear-gradient(135deg, #b4372b, var(--pli-error));
}

.ahp-notification--info {
  background: linear-gradient(135deg, var(--pli-blue), var(--pli-navy));
}

@keyframes ahpSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .ahp-progress-bar {
    grid-template-columns: 1fr;
  }

  .ahp-upload-step .step-content {
    padding-left: 0;
  }

  .ahp-matrix-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Aliases SIGMA → SLT (páginas de etapa adaptadas) */
.ahp-step-section.card {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #b7c7d8;
  background: #fff;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
}

.ahp-step-header {
  margin: 0;
}

.ahp-section-body .ahp-section {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.ahp-section-body .ahp-section.ahp-subcard {
  padding: 1rem;
  border: 2px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #e7f0f7;
  box-shadow: var(--pli-shadow);
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.ahp-section-body .info-card {
  margin: 0; /* gap do section-body controla espaçamento */
  padding: 1.25rem 1.4rem;
  border: 1.5px solid #c9d6e2;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.06);
  background: #fff;
}

.ahp-section-body .info-card.ahp-subcard {
  padding: 1rem;
  border: 2px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #e7f0f7;
  box-shadow: var(--pli-shadow);
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.c-form-group {
  margin-bottom: 1rem;
}

.c-form-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--pli-navy);
}

.c-form-control {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--pli-border);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.form-help {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--pli-muted);
  margin-top: 0.25rem;
}

.form-desc {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--pli-muted);
  line-height: 1.5;
}

.info-card {
  margin-bottom: 0; /* margens controladas pelo gap do container pai */
  border: 1.5px solid #c9d6e2;
  border-radius: 14px;
  background: #fff;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 2px 8px rgba(13, 59, 102, 0.06);
}

.info-card--spaced {
  margin-top: 0; /* gap do container substitui esta margem */
}

.info-card-content {
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.6;
}

.method-content {
  font-size: 0.875rem;
  color: var(--pli-muted);
}

.method-content--hidden {
  display: none;
}

.info-box {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem;
  margin-top: 0.65rem;
  border-radius: var(--pli-radius);
  background: rgba(17, 101, 147, 0.08);
  font-size: 0.875rem;
  color: var(--pli-muted);
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-info {
  min-height: 1.25rem;
  margin-top: 0.5rem;
}

.saaty-description {
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.saaty-description--highlight {
  background: #eef4fb;
  border-left: 3px solid var(--pli-blue);
  border-radius: 0 8px 8px 0;
  padding: 0.55rem 0.85rem;
  color: var(--pli-navy);
  margin-top: 0;
}

/* ======================================================
   Referência visual da Escala de Saaty — bidirecional
   1 no centro | recíprocos à esquerda | positivos à direita
   ====================================================== */
.saaty-ref-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

/* Labels acima da barra: B ← ... → A */
.saaty-ref-labels-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.saaty-ref-pole {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pli-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1;
}

.saaty-ref-pole--left i { color: #c0392b; }
.saaty-ref-pole--right i { color: var(--pli-blue); }

/* Barra: ocupa 100% da largura */
.saaty-ref-bar {
  width: 100%;
  position: relative;
}

/* Gradiente bicolor: vermelho esquerda, branco centro, azul direita */
.saaty-ref-gradient {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 10px;
  background: linear-gradient(to right,
    #7b1a1a 0%,
    #c0392b 18%,
    #f4a7a0 40%,
    #f5f5f5 50%,
    #a9cdec 60%,
    #2f6fad 82%,
    #0d3b66 100%
  );
  /* borda bicolor: vermelho à esquerda do centro, azul à direita */
  border-width: 1px;
  border-style: solid;
  border-image: linear-gradient(to right,
    #8b1a1a 0%, #c0392b 48%,
    #2f6fad 52%, #0d3b66 100%
  ) 1;
  z-index: 0;
}

/* Seta esquerda (vermelha) e direita (azul) */
.saaty-ref-gradient::before,
.saaty-ref-gradient::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
}
.saaty-ref-gradient::before {
  left: -13px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 13px solid #7b1a1a;
}
.saaty-ref-gradient::after {
  right: -13px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 13px solid #0d3b66;
}

/* Ticks: mesmo grid dos cards → alinhamento perfeito */
.saaty-ref-ticks {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: 0.2rem;
  position: relative;
  z-index: 1;
  padding: 4px 0;
}

/* Tick base: sem posicionamento absoluto, centralizado na célula do grid */
.saaty-ref-tick {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  font-size: 0.58rem;
  font-weight: 800;
  font-family: "Montserrat", Verdana, sans-serif;
  border: 1.5px solid rgba(0,0,0,0.18);
  line-height: 1;
  white-space: nowrap;
  position: relative; z-index: 2;
}

/* Centro "1" — maior */
.saaty-ref-tick--center {
  width: 24px; height: 24px;
  font-size: 0.75rem;
  border: 2px solid rgba(0,0,0,0.25);
}

/* Background dos ticks = cor do degradê na posição correspondente */
.saaty-ref-tick:nth-child(1)  { background: #7b1a1a; color: #fff; }
.saaty-ref-tick:nth-child(2)  { background: #8b2020; color: #fff; }
.saaty-ref-tick:nth-child(3)  { background: #9e2a2a; color: #fff; }
.saaty-ref-tick:nth-child(4)  { background: #b43232; color: #fff; }
.saaty-ref-tick:nth-child(5)  { background: #c0392b; color: #fff; }
.saaty-ref-tick:nth-child(6)  { background: #d45b50; color: #fff; }
.saaty-ref-tick:nth-child(7)  { background: #e07e75; color: #333; }
.saaty-ref-tick:nth-child(8)  { background: #eca79e; color: #333; }
.saaty-ref-tick:nth-child(9)  { background: #f5f5f5; color: #333; }
.saaty-ref-tick:nth-child(10) { background: #a9cdec; color: #333; }
.saaty-ref-tick:nth-child(11) { background: #8fbde2; color: #333; }
.saaty-ref-tick:nth-child(12) { background: #74add8; color: #333; }
.saaty-ref-tick:nth-child(13) { background: #5a9cce; color: #fff; }
.saaty-ref-tick:nth-child(14) { background: #408bc4; color: #fff; }
.saaty-ref-tick:nth-child(15) { background: #2f7ab8; color: #fff; }
.saaty-ref-tick:nth-child(16) { background: #2065a0; color: #fff; }
.saaty-ref-tick:nth-child(17) { background: #0d3b66; color: #fff; }

/* Grid de 17 cards */
.saaty-ref-cards {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: 0.2rem;
}

/* Base de todos os cards */
.saaty-ref-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.1rem 0.35rem;
  border-radius: 8px;
  border: 1.5px solid rgba(0,0,0,0.14);
  text-align: center;
  transition: filter 0.15s, box-shadow 0.15s;
}

.saaty-ref-card:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

/* Background dos cards = cor do degradê na posição correspondente */
.saaty-ref-card--recip[data-val="r9"] { background: #7b1a1a; }
.saaty-ref-card--recip[data-val="r8"] { background: #8b2020; }
.saaty-ref-card--recip[data-val="r7"] { background: #9e2a2a; }
.saaty-ref-card--recip[data-val="r6"] { background: #b43232; }
.saaty-ref-card--recip[data-val="r5"] { background: #c0392b; }
.saaty-ref-card--recip[data-val="r4"] { background: #d45b50; }
.saaty-ref-card--recip[data-val="r3"] { background: #e07e75; }
.saaty-ref-card--recip[data-val="r2"] { background: #eca79e; }
.saaty-ref-card--center              { background: #f5f5f5; }
.saaty-ref-card[data-val="2"]        { background: #a9cdec; }
.saaty-ref-card[data-val="3"]        { background: #8fbde2; }
.saaty-ref-card[data-val="4"]        { background: #74add8; }
.saaty-ref-card[data-val="5"]        { background: #5a9cce; }
.saaty-ref-card[data-val="6"]        { background: #408bc4; }
.saaty-ref-card[data-val="7"]        { background: #2f7ab8; }
.saaty-ref-card[data-val="8"]        { background: #2065a0; }
.saaty-ref-card[data-val="9"]        { background: #0d3b66; }

/* Texto claro em fundos escuros */
.saaty-ref-card--recip[data-val="r9"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r9"] .saaty-ref-label,
.saaty-ref-card--recip[data-val="r8"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r8"] .saaty-ref-label,
.saaty-ref-card--recip[data-val="r7"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r7"] .saaty-ref-label,
.saaty-ref-card--recip[data-val="r6"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r6"] .saaty-ref-label,
.saaty-ref-card--recip[data-val="r5"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r5"] .saaty-ref-label,
.saaty-ref-card--recip[data-val="r4"] .saaty-ref-num,
.saaty-ref-card--recip[data-val="r4"] .saaty-ref-label { color: #fff; }

.saaty-ref-card[data-val="5"] .saaty-ref-num,
.saaty-ref-card[data-val="5"] .saaty-ref-label,
.saaty-ref-card[data-val="6"] .saaty-ref-num,
.saaty-ref-card[data-val="6"] .saaty-ref-label,
.saaty-ref-card[data-val="7"] .saaty-ref-num,
.saaty-ref-card[data-val="7"] .saaty-ref-label,
.saaty-ref-card[data-val="8"] .saaty-ref-num,
.saaty-ref-card[data-val="8"] .saaty-ref-label,
.saaty-ref-card[data-val="9"] .saaty-ref-num,
.saaty-ref-card[data-val="9"] .saaty-ref-label { color: #fff; }

.saaty-ref-num {
  font-size: 0.9rem;
  font-weight: 800;
  font-family: "Montserrat", Verdana, sans-serif;
  color: #333;
  line-height: 1;
}

/* =====================================================
   Bloco de exemplo didático da Escala de Saaty
   ===================================================== */
/* Subcards internos da seção de Escala de Saaty */
.saaty-inner-card {
  background: #fff;
  border: 1.5px solid #c9d6e2;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.saaty-inner-card:last-child {
  margin-bottom: 0;
}

.saaty-inner-card--texto {
  border-left: 4px solid var(--pli-blue);
}

.saaty-inner-card--escala {
  background: #f8fafc;
  border-color: #b7c7d8;
}

.saaty-inner-card--exemplo {
  padding: 0;
  overflow: hidden;
  border-color: #c9d6e2;
}

.saaty-example-box {
  background: #fff;
  box-shadow: none;
  border: none;
  border-radius: 0;
}

.saaty-example-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: var(--pli-deep);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "Montserrat", Verdana, sans-serif;
  letter-spacing: 0.02em;
}

/* Quando personalizado com dados reais da config */
.saaty-example-box--personalizado .saaty-example-title {
  background: var(--pli-green, #2e7d32);
}

.saaty-example-title i { color: #ffd54f; font-size: 0.95rem; }

.saaty-example-body {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Linha de critérios A vs B */
.saaty-example-crits {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.saaty-ex-crit {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.saaty-ex-crit--a {
  background: #dce8f4;
  color: #0d3b66;
  border: 1.5px solid #2f6fad;
}

.saaty-ex-crit--b {
  background: #fce8e6;
  color: #7b1a1a;
  border: 1.5px solid #c0392b;
}

.saaty-ex-versus {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--pli-muted);
  flex-shrink: 0;
}

/* Pergunta guia */
.saaty-example-q {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pli-navy);
  background: #f5f8fb;
  border-left: 3px solid var(--pli-blue);
  border-radius: 0 6px 6px 0;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
}

.saaty-example-q i { color: var(--pli-blue); margin-right: 0.3rem; }

/* Forçar inline em toda a área do exemplo e nota — app.css pode ter strong{display:block} */
.saaty-example-box strong,
.saaty-example-box em,
.saaty-example-box span,
.saaty-ref-note strong,
.saaty-ref-note em,
.saaty-description strong,
.saaty-description em,
.saaty-ref-note i {
  display: inline !important;
}

.saaty-example-q--2 {
  background: #f9f5fb;
  border-left-color: #7e57c2;
}
.saaty-example-q--2 i { color: #7e57c2; }

/* Breadcrumb de escopo */
.saaty-example-escopo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.75rem;
  background: #eef3f8;
  border: 1px solid #c9d6e2;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.1rem;
}
.saaty-ex-escopo-label {
  font-weight: 700;
  color: var(--pli-muted);
  white-space: nowrap;
}
.saaty-ex-escopo-frase {
  font-style: italic;
  color: var(--pli-deep);
  font-weight: 600;
}

/* Linhas de resposta — flex coluna (estrutura por pares) */
.saaty-example-answers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* = 1: ocupa largura total */
.saaty-ans--full {
  width: 100%;
}

/* Cabeçalho das colunas Maior | Menor */
.saaty-ans-col-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.saaty-ans-col-head span:first-child {
  color: #1565c0;
  background: #e3f0fb;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.saaty-ans-col-head span:last-child {
  color: #c0392b;
  background: #fdecea;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

/* Par de respostas: positivo + recíproco lado a lado */
.saaty-ans-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.saaty-ans-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.saaty-ans--equal  { background: #f5f5f5; border-color: #ddd; }
.saaty-ans--low    { background: #f0f5fb; border-color: #c9d6e2; }
.saaty-ans--mid    { background: #e8f0f8; border-color: #a9c0d8; }
.saaty-ans--high   { background: #dde8f4; border-color: #7da5c8; }
.saaty-ans--recip  { background: #fdf2f1; border-color: #e8a09a; }

.saaty-ans-badge {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  display: block;
  line-height: 2.6rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: "Montserrat", Verdana, sans-serif;
  padding: 0;
  box-sizing: border-box;
}

.saaty-ans-badge--equal { background: #e0e0e0; color: #333; border: 1.5px solid #bbb; }
.saaty-ans-badge--low   { background: #dce8f4; color: #0d3b66; border: 1.5px solid #2f6fad; }
.saaty-ans-badge--mid   { background: #2f6fad; color: #fff; border: 1.5px solid #1a4f8a; }
.saaty-ans-badge--high  { background: #0d3b66; color: #fff; border: 1.5px solid #061e33; }
.saaty-ans-badge--recip { background: #c0392b; color: #fff; border: 1.5px solid #8b1a1a; font-size: 0.65rem; }

.saaty-ans-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--pli-navy);
  line-height: 1.45;
}

/* Bloco 1: direção (maior / menor / igual importância relativa) */
.saaty-ans-direcao {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}
.saaty-ans-direcao i { font-size: 0.7rem; }
.saaty-ans-direcao--maior  { background: #e3f0fb; color: #1565c0; }
.saaty-ans-direcao--menor  { background: #fdecea; color: #c0392b; }
.saaty-ans-direcao--igual  { background: #f5f5f5; color: #555; }

/* Bloco 2: magnitude (texto da resposta) */
.saaty-ans-magnitude {
  font-size: 0.78rem;
  color: var(--pli-navy);
  font-style: italic;
}

/* Medidas (fração, decimal, %) */
.saaty-ans-measures {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.saaty-ans-m {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Montserrat", Verdana, sans-serif;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}

.saaty-ans-m--frac { background: #e8f0f8; color: #0d3b66; border: 1px solid #c9d6e2; }
.saaty-ans-m--dec  { background: #e8f4ec; color: #1a5e2a; border: 1px solid #b2d4b8; }
.saaty-ans-m--pct  { background: #fdf2e9; color: #7d3c0a; border: 1px solid #f0c090; }

/* Dica final */
.saaty-example-tip {
  margin: 0;
  font-size: 0.76rem;
  color: var(--pli-muted);
  background: #fffbe6;
  border: 1px solid #f0d060;
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.saaty-example-tip i { color: #d4a017; flex-shrink: 0; margin-top: 0.1rem; }

.saaty-ref-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--pli-muted);
  line-height: 1.25;
  text-align: center;
}

/* Nota sobre recíprocos */
.saaty-ref-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--pli-muted);
  background: #f5f8fb;
  border: 1px solid #dde6ef;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.saaty-ref-note i { color: var(--pli-blue); flex-shrink: 0; }

@media (max-width: 900px) {
  .saaty-ref-cards { grid-template-columns: repeat(9, 1fr); gap: 0.2rem; }
  .saaty-ref-card--recip { display: none; }
  .saaty-ref-card--center { display: flex; }
}
@media (max-width: 560px) {
  .saaty-ref-cards { grid-template-columns: repeat(5, 1fr); }
  .saaty-ref-bar-row { flex-direction: column; }
  .saaty-ref-pole { width: 100%; }
}

.instructions-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--pli-muted);
}

.ahp-info-note.card {
  box-shadow: none;
  margin: 0 0 1rem;
}

/* Espacamento vertical entre o titulo da etapa e o info-note (dobro do padrao). */
.ahp-step-intro .ahp-info-note,
.ahp-step-intro .ahp-info-note.card {
  margin-top: 0.7rem;
}

/* Alinhamento padronizado do discurso nos info-note das introducoes de etapa. */
.ahp-module-page .ahp-step-intro .ahp-info-note {
  justify-content: flex-start;
  align-items: flex-start;
  text-align: justify;
}

.ahp-module-page .ahp-step-intro .ahp-info-note i {
  margin-top: 0;
  line-height: 1.55;
}

.ahp-step-intro .ahp-info-note span {
  text-align: justify;
}

.ahp-progress.card {
  padding: 1rem;
}

/* Matriz de premissas e critérios (Etapa 3) */
.ahp-matriz-panel-root {
  margin-top: 0.25rem;
}

.ahp-matriz-panel {
  display: grid;
  gap: 1rem;
}

.ahp-matriz-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.ahp-matriz-meta__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.95rem 0.85rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #f7f9fb;
  color: var(--pli-muted);
}

.ahp-matriz-meta__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.ahp-matriz-meta__head i {
  color: var(--pli-blue);
}

.ahp-matriz-meta__title {
  font-weight: 700;
  color: var(--pli-deep);
  font-size: 1.05rem;
  line-height: 1.2;
}

.ahp-matriz-meta__value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pli-muted);
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
}

.ahp-matriz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.ahp-matriz-toolbar label {
  margin: 0;
  font-size: 0.8125rem;
}

.ahp-matriz-filter {
  max-width: 280px;
  min-height: 0;
  padding: 0.45rem 0.65rem;
}

.ahp-matriz-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #fff;
}

.ahp-matriz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.ahp-matriz-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.65rem 0.75rem;
  text-align: left;
  background: linear-gradient(135deg, var(--pli-deep), var(--pli-blue));
  color: #fff;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ahp-matriz-table tbody td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--pli-border);
  vertical-align: top;
  line-height: 1.45;
}

.ahp-matriz-table tbody tr:hover {
  background: #f7fafc;
}

.ahp-matriz-table tbody tr[hidden] {
  display: none;
}

.ahp-matriz-dim {
  font-weight: 600;
  color: var(--pli-navy);
  white-space: nowrap;
}

.ahp-matriz-premissa,
.ahp-matriz-metricas,
.ahp-matriz-fonte {
  min-width: 160px;
  max-width: 320px;
}

.ahp-matriz-relacao {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(17, 101, 147, 0.1);
  color: var(--pli-blue);
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}

.ahp-matriz-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ahp-matriz-badge--sim {
  background: rgba(42, 163, 88, 0.15);
  color: var(--pli-green-dark);
}

.ahp-matriz-badge--nao {
  background: #eef1f4;
  color: var(--pli-muted);
}

.ahp-matriz-empty {
  text-align: center;
  padding: 2rem 1.25rem;
  border: 1px dashed var(--pli-border);
  border-radius: var(--pli-radius);
  background: #fafbfc;
}

.ahp-matriz-empty__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(17, 101, 147, 0.1);
  color: var(--pli-blue);
  font-size: 1.35rem;
}

.ahp-matriz-empty h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--pli-deep);
}

.ahp-matriz-empty p {
  margin: 0 auto 1rem;
  max-width: 520px;
  font-size: 0.875rem;
  color: var(--pli-muted);
  line-height: 1.55;
}

.ahp-matriz-empty__actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

@media (max-width: 768px) {
  .ahp-matriz-meta {
    grid-template-columns: 1fr 1fr;
  }

  .ahp-matriz-filter {
    max-width: 100%;
    width: 100%;
  }
}

/* ===========================================================
   Escala de Saaty deslizante (Etapa 4 — Formulário 4.2)
   =========================================================== */

/* ===========================================================
   Métricas instantâneas (Etapa 4 — RC, IC, λmáx)
   =========================================================== */
.ahp-live-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  width: 100%;
  margin: 0.25rem 0 1.1rem;
}

@media (max-width: 768px) {
  .ahp-live-metrics {
    grid-template-columns: 1fr;
  }
}

.ahp-metric-card {
  border: 1.5px solid var(--pli-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  text-align: center;
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ahp-metric-card__label {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.ahp-metric-card__value {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.3rem 0 0.15rem;
  line-height: 1.1;
}

.ahp-metric-card__sub {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.ahp-live-metrics.is-initial .ahp-metric-card {
  border-color: rgba(21, 101, 192, 0.4);
  background: rgba(21, 101, 192, 0.06);
  color: var(--pli-blue);
}

.ahp-live-metrics.is-success .ahp-metric-card {
  border-color: rgba(46, 160, 67, 0.45);
  background: rgba(46, 160, 67, 0.08);
  color: #1a7f37;
}

.ahp-live-metrics.is-failure .ahp-metric-card {
  border-color: rgba(207, 34, 46, 0.45);
  background: rgba(207, 34, 46, 0.08);
  color: #b42318;
}

/* ===========================================================
   Matriz de Comparação Pareada (Etapa 4 — Formulário 4.2)
   =========================================================== */
.matrix-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.matrix-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.matrix-table th,
.matrix-table td {
  height: 64px;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #c9d6e2;
  font-size: 0.85rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Cabeçalhos de critérios (linhas e colunas) com delimitação destacada */
.matrix-table .matrix-head {
  background: var(--pli-deep);
  color: #fff;
  font-weight: 700;
  border-color: #06283d;
}

.matrix-table .matrix-corner {
  background: transparent;
  border-color: #c9d6e2;
}

/* Fundo padrão das células de dados */
.matrix-table tbody td {
  background: #fff;
}

/* Célula da diagonal principal — azul mais claro que os cabeçalhos */
.matrix-table .matrix-cell--diagonal {
  background: var(--pli-blue);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.matrix-table .matrix-cell--input select {
  width: 100%;
  height: 38px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--pli-deep);
  text-align: center;
  cursor: pointer;
}

.matrix-table .matrix-cell--input select:focus {
  outline: none;
  box-shadow: none;
}

:root {
  --saaty-w: 740px;
}

.saaty-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1.1rem 1.25rem;
  padding: 0.75rem 0 0.5rem;
}

@media (max-width: 900px) {
  .saaty-form {
    grid-template-columns: 1fr;
  }
}

.saaty-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 1.1rem 1.15rem 1rem;
  background: #fff;
  border: 1.5px solid #c9d6e2;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(13, 59, 102, 0.07);
}

.saaty-pair:hover {
  border-color: var(--pli-blue, #1565c0);
  box-shadow: 0 5px 16px rgba(21, 101, 192, 0.14);
}

.saaty-pair--filled {
  border-left: 4px solid #197c89;
}

.saaty-pair--equal {
  border-left: 4px solid #94a3b8;
}

.saaty-pair--touched {
  box-shadow: 0 4px 14px rgba(25, 124, 137, 0.13);
}

.saaty-widget {
  width: 100%;
}

/* Área interativa da escala */
.saaty-scale {
  position: relative;
  width: 100%;
  height: 80px;
  outline: none;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.saaty-scale:focus-visible {
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.3);
  border-radius: 10px;
}

/* Seta de duas pontas */
.saaty-arrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 8px;
  background: #a9cdec;
  border: 1px solid #2f6fad;
  border-radius: 4px;
}

.saaty-arrow::before,
.saaty-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.saaty-arrow::before {
  left: -16px;
  border-right: 16px solid #a9cdec;
}

.saaty-arrow::after {
  right: -16px;
  border-left: 16px solid #a9cdec;
}

/* Trilho interno: define a faixa 0–100% (recuado das pontas da seta) */
.saaty-rail {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 24px;
  height: 0;
}

/* Graduações + rótulos (acima da seta) */
.saaty-tick {
  position: absolute;
  bottom: -2px;
  transform: translateX(-50%);
  width: 50px;
  text-align: center;
  pointer-events: none;
}

.saaty-tick-val {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.1;
  color: var(--pli-deep, #0d3b66);
}

.saaty-tick-desc {
  display: block;
  font-size: 0.56rem;
  line-height: 1.05;
  color: #5f6f7e;
}

.saaty-tick-mark {
  display: block;
  width: 2px;
  height: 10px;
  margin: 2px auto 0;
  background: #2f6fad;
}

/* Seletor retangular */
.saaty-handle {
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  width: 22px;
  height: 26px;
  background: var(--pli-blue, #1565c0);
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.32);
  cursor: grab;
  z-index: 4;
  transition: left 0.08s ease;
}

.saaty-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
}

.saaty-scale--active .saaty-handle {
  cursor: grabbing;
  transition: none;
}

/* Direção menos/mais importante */
.saaty-dir {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7a88;
}

/* Critérios lado a lado (abaixo da seta) */
.saaty-criteria {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.saaty-crit {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
  border-radius: 10px;
  border: 2px solid transparent;
}

.saaty-crit__name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saaty-crit__tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
}

.saaty-crit--left {
  text-align: left;
  justify-content: flex-start;
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.35);
  color: var(--pli-blue, #1565c0);
}

.saaty-crit--left .saaty-crit__tag {
  background: var(--pli-blue, #1565c0);
}

.saaty-crit--right {
  text-align: right;
  flex-direction: row-reverse;
  justify-content: flex-start;
  background: rgba(194, 65, 12, 0.08);
  border-color: rgba(194, 65, 12, 0.35);
  color: #c2410c;
}

.saaty-crit--right .saaty-crit__tag {
  background: #c2410c;
}

.saaty-vs {
  flex: 0 0 auto;
  align-self: center;
  font-style: italic;
  font-weight: 700;
  font-size: 0.8rem;
  color: #8a97a3;
}

/* Leitura textual da seleção */
.saaty-readout {
  width: 100%;
  max-width: 100%;
  min-height: 1.2em;
  margin-top: 0.5rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  border-radius: 10px;
  border: 1.5px solid transparent;
}

.saaty-readout--eq {
  color: #45525f;
  background: #eef2f6;
  border-color: #d3dde6;
}

.saaty-readout--pos {
  color: var(--pli-blue, #1565c0);
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.3);
}

.saaty-readout--neg {
  color: #c2410c;
  background: rgba(194, 65, 12, 0.08);
  border-color: rgba(194, 65, 12, 0.3);
}

.saaty-reciprocal {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd8e3;
  border-radius: 10px;
  background: #f7fafc;
  color: #31445a;
  font-size: 0.76rem;
}

.saaty-reciprocal__label {
  font-weight: 800;
  color: #183b55;
}

.saaty-reciprocal__value {
  min-width: 3.2rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d3dde6;
  font-weight: 900;
  text-align: center;
}

.saaty-reciprocal__text {
  grid-column: 1 / -1;
  color: #536778;
}

.saaty-reciprocal.is-positive {
  border-color: rgba(21, 101, 192, 0.35);
  background: rgba(21, 101, 192, 0.06);
}

.saaty-reciprocal.is-negative {
  border-color: rgba(194, 65, 12, 0.35);
  background: rgba(194, 65, 12, 0.06);
}

.saaty-reciprocal.is-equal {
  border-color: #d3dde6;
  background: #eef2f6;
}

.saaty-reciprocal.is-updated {
  animation: saatyReciprocalPulse 0.42s ease-out;
}

@keyframes saatyReciprocalPulse {
  0% { box-shadow: 0 0 0 0 rgba(25, 124, 137, 0.34); }
  100% { box-shadow: 0 0 0 9px rgba(25, 124, 137, 0); }
}

.ahp-collab-reciprocal-hint {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #d7e2eb;
  background: #f8fbfd;
  color: #40566a;
  font-size: 0.88rem;
}

.ahp-collab-reciprocal-hint.is-ok {
  border-color: rgba(34, 131, 93, 0.3);
  background: rgba(34, 131, 93, 0.08);
}

.ahp-collab-reciprocal-hint.is-warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.08);
}

/* ===========================================================
   Etapa 6 — Priorização das alternativas
   =========================================================== */
.a6-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.a6-row input[type="text"] {
  flex: 1;
  min-width: 240px;
}

.a6-alt-list,
.a6-objetos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.a6-alt-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: #f3f6f9;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  font-weight: 600;
}

.a6-del {
  border: none;
  background: transparent;
  color: #c2410c;
  cursor: pointer;
  font-size: 1rem;
}

.a6-objeto {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.9rem;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  cursor: pointer;
}

.a6-objeto input {
  margin-top: 0.25rem;
}

.a6-warn {
  padding: 0.8rem 1rem;
  background: #fdecea;
  border: 1.5px solid #c82333;
  border-radius: 8px;
  color: #a71d2a;
}

.a6-crit-block {
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #d8e0e8;
}

.a6-crit-block h4 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  color: var(--pli-deep, #0d3b66);
}

.a6-crit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--pli-blue, #1565c0);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.a6-recip {
  background: #f3f6f9;
  color: #5f6f7e;
  text-align: center;
}

.a6-cr {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.a6-cr--ok {
  color: #1e7e34;
}

.a6-cr--bad {
  color: #c2410c;
}

.a6-bar {
  background: #eef1f4;
  border: 1px solid #e0e4e9;
  border-radius: 6px;
  height: 18px;
  overflow: hidden;
  min-width: 120px;
}

.a6-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pli-azul-principal, #1565c0), var(--pli-verde-principal, #2e9e5b));
  border-radius: 6px;
}

.a6-rank--gold td {
  background: rgba(255, 196, 0, 0.14);
}

.a6-rank--top td {
  background: rgba(21, 101, 192, 0.06);
}

.a6-homolog-badge,
#a6-homolog-status {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #1e7e34;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.a6-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(40px);
  background: #0d3b66;
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 90vw;
}

.a6-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.a6-toast--error {
  background: #c82333;
}

/* Campos de formulário da Etapa 5 (Configuração Multicritério) */
.ahp-field {
  margin-bottom: 1rem;
}

.ahp-field label {
  display: block;
  font-weight: 600;
  color: var(--pli-deep, #003b5a);
  margin-bottom: 0.35rem;
}

.ahp-field input,
.ahp-field textarea,
.ahp-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cdd6df;
  border-radius: 8px;
  font: inherit;
  color: #1f2a36;
  background: #fff;
}

.ahp-field input:focus,
.ahp-field textarea:focus,
.ahp-field select:focus {
  outline: none;
  border-color: var(--pli-blue, #116593);
  box-shadow: 0 0 0 3px rgba(17, 101, 147, 0.15);
}

/* ===========================================================================
   Tipo de análise: cabeçalho + universo do portfólio
   =========================================================================== */
.ahp-module-page .is-hidden {
  display: none !important;
}

/* Garante largura plena dos campos do cabeçalho/refino nestas seções */
.ahp-module-page #portfolio-section .c-form-group,
.ahp-module-page #form-tipo-analise > .card > .c-form-group {
  max-width: 640px;
}

.ahp-escopo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem 1rem;
}

.ahp-escopo-grid .c-form-group {
  margin-bottom: 0;
}

.ahp-escopo-grid input[id$="-custom"] {
  margin-top: 0.5rem;
}

/* Minicard de elemento do escopo: campo + texto de ajuda, numa caixa enxuta. */
.ahp-mini-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: var(--pli-white);
}

.ahp-mini-card.is-hidden {
  display: none;
}

/* Validação visual no card inteiro: quando o campo do minicard tem valor
   selecionado (ou um radio/checkbox marcado), o card recebe o mesmo destaque
   azul aplicado aos campos preenchidos. */
.ahp-mini-card:has(.field-filled),
.ahp-mini-card:has(input:checked) {
  border-color: #9fb8cc;
  background: #f4f8fb;
  box-shadow: inset 3px 0 0 var(--pli-blue);
}

/* Espaçamento padrão entre o(s) minicard(s) de objeto e os cards de destino. */
.ahp-escopo-grid + .ahp-tipo-grid {
  margin-top: 1.1rem;
}

.ahp-mini-card .c-form-label {
  margin-bottom: 0.35rem;
}

.ahp-mini-card .ahp-mini-help {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--pli-text-soft, #5a6b7b);
}

/* ---- Componente de Sugestões (3 versões geradas + ações) ---- */
.ahp-sugestoes {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--pli-border);
  border-radius: var(--pli-radius);
  background: var(--pli-bg-soft, #f7f9fb);
}

.ahp-sug-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--pli-blue);
}

.ahp-sug-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ahp-sug-item {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.ahp-sug-card {
  flex: 1;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: var(--pli-white);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ahp-sug-card:hover {
  border-color: var(--pli-blue);
}

.ahp-sug-item.selected .ahp-sug-card {
  border-color: var(--pli-blue);
  box-shadow: 0 0 0 3px rgba(17, 101, 147, 0.12);
}

.ahp-sug-item.confirmado .ahp-sug-card {
  border-color: var(--pli-green, #2e7d32);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.14);
}

.ahp-sug-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ahp-sug-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--pli-green, #2e7d32);
}

.ahp-sug-edit {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.ahp-sug-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.ahp-sug-actions .btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ahp-sug-confirm-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.9rem;
}

/* Linha de opção única (radio) Sim/Não. */
.ahp-radio-row {
  display: flex;
  gap: 1.2rem;
  margin: 0.35rem 0 0.6rem;
}

.ahp-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.92rem;
}

.ahp-dim-confirm-wrap {
  margin-top: 0.6rem;
}

/* Checkboxes de dimensões dos critérios. */
.ahp-dim-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-top: 0.4rem;
}

.ahp-dim-checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.ahp-dim-checks input {
  margin: 0;
}

/* Linha "Tipo de demanda/objeto selecionado: …" no topo do Universo da análise. */
.ahp-universo-objeto {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.ahp-universo-objeto strong {
  color: var(--c-primary, #1d4ed8);
}

/* Espaçamento entre o card "Incluir dimensões?" e o card da lista de dimensões. */
#mini-dimensoes-lista {
  margin-top: 0.9rem;
}

/* Lista de dimensões apenas para conferência (sem seletores). */
.ahp-dim-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}

.ahp-dim-list li {
  list-style: disc;
}

/* Link discreto (ex.: "Gerar novamente") ao lado do rótulo do objetivo. */
.ahp-link-btn {
  margin-left: 0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pli-blue);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ahp-link-btn:hover {
  text-decoration: underline;
}

/* Subseções dentro de um card (ex.: Universo populacional / amostral) */
/* Subcard: caixa com a mesma borda dos cards de "Destino da análise". */
.ahp-subcard {
  margin: 0;
  padding: 1rem;
  border: 2px solid var(--pli-border);
  border-radius: var(--pli-radius);
  background: #e7f0f7;
  box-shadow: var(--pli-shadow);
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.ahp-subcard + .ahp-subcard {
  margin-top: 0; /* gap do flex container controla o espaçamento */
}

/* Subtítulo de subseção: ícone + título, SEM cabeçalho preenchido. */
.ahp-subsection-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: -1rem -1rem 0.9rem;
  padding: 0.72rem 1rem;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(17, 101, 147, 0.4);
  border-bottom: 1px solid rgba(17, 101, 147, 0.35);
  border-radius: var(--pli-radius) var(--pli-radius) 0 0;
}

.ahp-subsection-title > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.ahp-subsection-title i {
  font-size: 0.9rem;
  color: var(--pli-green);
}

.ahp-subsection-num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pli-green);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1;
}

:not(.ahp-step-section--contexto) .ahp-subsection-title--roman {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
}

:not(.ahp-step-section--contexto) .ahp-subsection-num--roman {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--pli-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.ahp-subcard > .ahp-step-title:first-child,
.ahp-subcard > .ahp-info-card-header:first-child {
  margin: -1rem -1rem 0.9rem;
  padding: 0.72rem 1rem;
  background: rgba(17, 101, 147, 0.4);
  border-bottom: 1px solid rgba(17, 101, 147, 0.35);
  border-radius: var(--pli-radius) var(--pli-radius) 0 0;
  color: #fff;
}

.ahp-subcard > .ahp-step-title:first-child .ahp-step-number {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
  background: var(--pli-green);
}

.ahp-subcard > .ahp-info-card-header:first-child i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--pli-green);
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
}

.ahp-subcard > .ahp-info-card-header:first-child h2,
.ahp-subcard > .ahp-info-card-header:first-child h3 {
  color: #fff;
}

.ahp-step-section .ahp-section-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* token único: espaçamento entre subcards */
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.ahp-step-section--contexto .ahp-section-body {
  gap: 0;
}

.ahp-subcard .info-card-content,
.ahp-subcard .step-intro,
.ahp-subcard .ahp-page-desc {
  text-align: left;
}

.ahp-subcard .ahp-table-scroll,
.ahp-subcard .ahp-collab-table-wrap,
.ahp-subcard #comparisonContainer,
.ahp-subcard #results-conferencia,
.ahp-subcard #results-pesos,
.ahp-subcard #results-parecer,
.ahp-subcard #resultsExportContent,
.ahp-subcard #config-artefatos {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ahp-subcard .ahp-matrix-table {
  width: 100%;
}

.ahp-subcard .ahp-method-grid,
.ahp-subcard .ahp-tipo-grid,
.ahp-subcard .ahp-collab-grid2,
.ahp-subcard .ahp-criteria-inputs {
  width: 100%;
}

.ahp-subcard .ahp-method-card,
.ahp-subcard .ahp-info-item,
.ahp-subcard .ahp-mini-card {
  min-width: 0;
}

.ahp-subcard,
.ahp-subcard .info-card-content,
.ahp-subcard .ahp-info-highlights,
.ahp-subcard .ahp-method-grid,
.ahp-subcard .ahp-collab-grid2,
.ahp-subcard .ahp-criteria-inputs,
.ahp-subcard .ahp-recommendation,
.ahp-subcard .ahp-table-scroll,
.ahp-subcard .ahp-matrix-panel-root {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 768px) {
  .ahp-step-section.card {
    padding: 1rem;
  }

  .ahp-subcard {
    padding: 0.9rem;
  }

  .ahp-subsection-title {
    margin: -0.9rem -0.9rem 0.8rem;
    padding: 0.65rem 0.9rem;
  }
}

.ahp-block-gap-md {
  margin-bottom: 1rem;
}

/* Tipo de demanda ocupa a largura total do card */
#config-tipo-demanda {
  width: 100%;
}

/* Linha de filtro do universo amostral: campo + valor + remover */
.ahp-filtro-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

/* Cabeçalho de colunas das grades de filtro */
.ahp-filtro-head {
  margin-bottom: 0.25rem;
}

.ahp-filtro-head span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pli-muted, #64748b);
}

.ahp-valor-cell input[type="text"] {
  margin-top: 0.4rem;
}

.ahp-filtro-remove {
  border: 1px solid var(--pli-border);
  background: var(--pli-white);
  color: var(--pli-muted, #64748b);
  border-radius: var(--pli-radius);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

.ahp-filtro-remove:hover {
  color: #c0392b;
  border-color: #c0392b;
}

#add-filtro,
#add-logico {
  margin: 0.25rem 0 0.75rem;
}

/* Caixa de subseção interna (Filtro simples / lógicos / Resumo) */
.ahp-subsubcard {
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius);
  padding: 0.9rem 1rem;
  background: #fbfdff;
}

.ahp-subsubcard + .ahp-subsubcard {
  margin-top: 0.75rem;
}

/* Célula de valor: select único ou período (dois date inputs) */
.ahp-valor-cell {
  display: block;
}

.ahp-valor-cell select {
  width: 100%;
}

.ahp-valor-cell--data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

/* Subtítulo de subseção interna (Filtro simples / lógicos / Resumo) */
.ahp-subsubsection-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pli-muted, #475569);
}

.ahp-subsubsection-title i {
  color: var(--pli-green);
}

.ahp-subsubcard .ahp-subsubsection-title:first-child {
  margin-top: 0;
}

/* Etapa 1: uma única escala vertical para todos os níveis de conteúdo. */
.ahp-step1-config-page .ahp-main,
.ahp-step1-config-page #form-tipo-analise,
.ahp-step1-config-page .card-analise-de-portfolio-slt,
.ahp-step1-config-page #portfolio-section,
.ahp-step1-config-page #conferencia-artefato-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ahp-step1-config-page .ahp-main > *,
.ahp-step1-config-page #form-tipo-analise > *,
.ahp-step1-config-page .card-analise-de-portfolio-slt > *,
.ahp-step1-config-page #portfolio-section > *,
.ahp-step1-config-page #conferencia-artefato-section > * {
  margin-top: 0;
  margin-bottom: 0;
}

.ahp-step1-config-page .ahp-step-intro,
.ahp-step1-config-page .ahp-step-section.card,
.ahp-step1-config-page #form-tipo-analise > .card,
.ahp-step1-config-page #step1-nav-section {
  margin-bottom: 0;
}

.ahp-step1-config-page .card-analise-de-portfolio-slt > .ahp-subcard,
.ahp-step1-config-page #portfolio-section > .ahp-subcard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ahp-step1-config-page .ahp-escopo-fields > .ahp-escopo-grid,
.ahp-step1-config-page .ahp-escopo-fields > .ahp-mini-card,
.ahp-step1-config-page .ahp-escopo-fields > .ahp-sugestoes {
  margin-top: 0;
  margin-bottom: 0;
}

.ahp-step1-config-page .ahp-subsubcard {
  margin-top: 0;
  margin-bottom: 0;
}

/* Linha de filtro lógico: conector + campo + operador + valor + remover */
/* ---- Construtor do universo (grupos DNF) ---- */
.ahp-grupo-card {
  border: 1px solid var(--pli-border, #e2e8f0);
  border-radius: var(--pli-radius, 8px);
  background: #fafcff;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.5rem;
}

.ahp-grupo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.ahp-grupo-titulo {
  font-size: 0.85rem;
  color: var(--pli-deep, #0d3b66);
}

.ahp-grupo-titulo i {
  margin-right: 0.35rem;
}

.ahp-grupo-ou {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pli-blue, #116593);
  background: rgba(17, 101, 147, 0.1);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  margin: 0.1rem 0 0.6rem;
}

.ahp-cond-row {
  display: grid;
  grid-template-columns: 1fr 130px 1fr auto;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.ahp-grupo-add-cond {
  margin-top: 0.15rem;
}

.ahp-logico-row {
  display: grid;
  grid-template-columns: 80px 1fr 130px 1fr auto;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.ahp-conector-fixo {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pli-muted, #64748b);
  text-align: center;
}

/* Tabela de resumo da amostra */
.ahp-resumo-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
}

.ahp-resumo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ahp-resumo-table th,
.ahp-resumo-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--pli-border, #e2e8f0);
  text-align: left;
  white-space: nowrap;
}

.ahp-resumo-table thead th {
  background: var(--pli-deep, #0d3b66);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.ahp-resumo-table tbody tr:nth-child(even) {
  background: #f7fafc;
}

/* Coluna de seleção (incluir/excluir registro do universo). */
.ahp-resumo-table th.ahp-resumo-sel,
.ahp-resumo-table td.ahp-resumo-sel {
  width: 1%;
  text-align: center;
  white-space: nowrap;
}

.ahp-resumo-table td.ahp-resumo-sel input {
  cursor: pointer;
  margin: 0;
}

/* Linhas desmarcadas ficam esmaecidas/riscadas. */
.ahp-resumo-table tbody tr.is-excluido {
  opacity: 0.55;
  text-decoration: line-through;
}

.ahp-resumo-contagem {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: var(--pli-muted);
}

/* Container das ações (botão de confirmar) abaixo da tabela. */
.ahp-universo-acoes {
  margin-top: 0.85rem;
}

/* Título gerado automaticamente: somente leitura, com destaque suave */
.ahp-module-page #config-nome[readonly] {
  background: #f3f8fc;
  font-weight: 700;
  color: var(--pli-deep, #0d3b66);
  cursor: default;
}

.ahp-refino-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.ahp-refino-grid .c-form-group {
  margin-bottom: 0;
}

.ahp-universo-preview {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--pli-border, #c9d6e2);
  border-radius: 8px;
  background: #f3f8fc;
  font-size: 0.875rem;
  color: var(--pli-deep, #0d3b66);
  font-weight: 600;
}

.ahp-universo-preview i {
  color: var(--pli-blue, #116593);
}

/* ---- Confirmar universo de análise (resumo) ---- */
.ahp-universo-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.ahp-universo-confirm__ok {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.875rem;
  color: #15803d;
}

.ahp-universo-confirm__ok i {
  margin-right: 0.35rem;
}

/* ---- Editor da Tabela de Premissas e Critérios (step 3) ---- */
.ahp-matriz-table--edit tbody td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.ahp-matriz-edit-input {
  width: 100%;
  min-width: 7rem;
  font-size: 0.8125rem;
  padding: 0.4rem 0.5rem;
}

.ahp-matriz-table--edit td[data-col="premissa"] .ahp-matriz-edit-input,
.ahp-matriz-table--edit td[data-col="metricas"] .ahp-matriz-edit-input {
  min-width: 12rem;
}

.ahp-matriz-edit-actions,
.ahp-matriz-edit-actions-head {
  width: 2.5rem;
  text-align: center;
}

.ahp-matriz-row-remove {
  border: 1px solid var(--pli-border, #d6dee6);
  background: #fff;
  color: #b91c1c;
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.ahp-matriz-row-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.ahp-matriz-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ahp-matriz-edit-toolbar [data-role="save"] {
  margin-left: auto;
}

.ahp-matriz-edit-feedback {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
}

.ahp-matriz-edit-feedback.is-error {
  color: #b91c1c;
}

.ahp-matriz-edit-feedback.is-success {
  color: #15803d;
}

.ahp-matriz-edit-feedback.is-info {
  color: var(--pli-blue, #116593);
}

/* ------------------------------------------------------------------ */
/* Modais AHP — cabeçalho PLI + variantes success / warning / error   */
/* ------------------------------------------------------------------ */

.ahp-coerencia-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 59, 90, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.ahp-coerencia-modal {
  width: min(100%, 560px);
  max-height: min(90vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--pli-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.ahp-coerencia-modal__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 1.25rem;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--pli-deep);
  border-radius: var(--pli-radius) var(--pli-radius) 0 0;
}

.ahp-coerencia-modal__head i {
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--pli-green);
}

.ahp-coerencia-modal__body {
  padding: 1.25rem 1.35rem 1.35rem;
  overflow-y: auto;
}

.ahp-coerencia-modal__intro {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  text-align: left;
}

.ahp-coerencia-modal__list {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem 0.85rem 1.35rem;
  border-radius: var(--pli-radius);
  border: 1px solid var(--pli-border);
  background: #f7f9fb;
  line-height: 1.65;
  font-size: 0.875rem;
  text-align: left;
}

.ahp-coerencia-modal__list li + li {
  margin-top: 0.5rem;
}

.ahp-coerencia-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Variante: aviso (amarelo / laranja) */
.ahp-modal--warning .ahp-coerencia-modal__intro {
  color: #7a4e00;
}

.ahp-modal--warning .ahp-coerencia-modal__list {
  border-color: #f0c36d;
  background: #fff8e6;
}

.ahp-modal--warning .ahp-coerencia-modal__list strong {
  color: #b45309;
}

.ahp-modal--warning .ahp-modal-btn--confirm {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: #c2410c;
  color: #fff;
}

.ahp-modal--warning .ahp-modal-btn--confirm:hover {
  filter: brightness(1.05);
}

.ahp-modal--warning .ahp-modal-btn--cancel {
  border-color: #d97706;
  color: #92400e;
}

/* Variante: sucesso (verde PLI) */
.ahp-modal--success .ahp-coerencia-modal__intro {
  color: #14532d;
}

.ahp-modal--success .ahp-coerencia-modal__list {
  border-color: rgba(62, 194, 110, 0.45);
  background: #e7f6ec;
}

.ahp-modal--success .ahp-coerencia-modal__list strong {
  color: var(--pli-green-dark, #2aa358);
}

.ahp-modal--success .ahp-modal-btn--confirm {
  background: linear-gradient(135deg, var(--pli-green), var(--pli-green-dark, #2aa358));
  border-color: var(--pli-green-dark, #2aa358);
  color: #fff;
}

.ahp-modal--success .ahp-modal-btn--cancel {
  border-color: var(--pli-green);
  color: #166534;
}

/* Variante: fracasso (vinho / vermelho) */
.ahp-modal--error .ahp-coerencia-modal__intro {
  color: #7f1d1d;
}

.ahp-modal--error .ahp-coerencia-modal__list {
  border-color: #fca5a5;
  background: #fdecea;
}

.ahp-modal--error .ahp-coerencia-modal__list strong {
  color: #991b1b;
}

.ahp-modal--error .ahp-modal-btn--confirm {
  background: linear-gradient(135deg, #c0392b, #991b1b);
  border-color: #7f1d1d;
  color: #fff;
}

.ahp-modal--error .ahp-modal-btn--cancel {
  border-color: #c0392b;
  color: #991b1b;
}

/* Parecer de coerência (Etapa 6 — reutiliza lista do modal) */
.ahp-parecer-alertas .ahp-coerencia-aviso {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--pli-radius);
  border: 1px solid #f0c36d;
  background: #fff8e6;
  color: #7a4e00;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
}

.ahp-parecer-alertas .ahp-coerencia-aviso i {
  color: #d97706;
  margin-top: 0.15rem;
}

.ahp-parecer-alertas .ahp-coerencia-modal__list {
  margin-bottom: 0;
}

.ahp-module-page .btn-success {
  background: linear-gradient(135deg, var(--pli-green), var(--pli-green-dark, #2aa358));
  border-color: var(--pli-green-dark, #2aa358);
  color: #fff;
}

.ahp-module-page .btn-success:hover:not(:disabled) {
  filter: brightness(1.05);
}

.ahp-module-page .btn-success:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ahp-diagnostico-panel:not(.is-hidden) {
  margin-top: 1.25rem;
}

/* Espaçamento interno dos host divs das subseções */
.ahp-results-output {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* cfg-loaded-summary: espaço acima quando exibido */
#cfg-loaded-summary:not(.is-hidden) {
  margin-top: 0.85rem;
}

#resultsContent.ahp-results-output {
  display: block;
  width: 100%;
}

.ahp-etapa6-block {
  width: 100%;
}

.ahp-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.ahp-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}

.ahp-metricas-complemento {
  margin-top: 0.5rem;
}

.ahp-diagnostico-falha {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(207, 34, 46, 0.2);
}

.ahp-method-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ahp-method-card--radio {
  cursor: pointer;
  position: relative;
}

.ahp-method-card--radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ahp-method-card.is-selected,
.ahp-method-card--radio:has(input:checked) {
  outline: 2px solid var(--pli-green, #34a853);
  outline-offset: 2px;
}

.ahp-method-card.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

.ahp-colaborativa-page .app-main {
  max-width: 960px;
  margin: 0 auto;
}

.ahp-contexto-personalizado {
  margin-bottom: 1rem;
}

.info-card-content > .ahp-contexto-personalizado {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.ahp-contexto-personalizado .ahp-contexto-intro {
  margin: 0.35rem 0 0;
}

.ahp-contexto-checklist-host {
  margin-top: 1rem;
}

/* ── Grid de métricas 3×2 ── */
.ctx-checklist-wrapper {
  padding: 0.25rem 0 0.5rem;
}

.ctx-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ctx-metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--pli-border);
  background: #f7f9fb;
}

.ctx-metric-card.is-ok   { border-left: 3px solid var(--pli-green, #34a853); }
.ctx-metric-card.is-warn { border-left: 3px solid #d97706; }
.ctx-metric-card.is-fail { border-left: 3px solid #dc2626; }

.ctx-metric-card__icon {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.ctx-metric-card.is-ok   .ctx-metric-card__icon { color: var(--pli-green, #34a853); }
.ctx-metric-card.is-warn .ctx-metric-card__icon { color: #d97706; }
.ctx-metric-card.is-fail .ctx-metric-card__icon { color: #dc2626; }

.ctx-metric-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pli-navy);
  line-height: 1.35;
}

.ctx-metric-card__detail {
  font-size: 0.78rem;
  color: var(--pli-muted);
  line-height: 1.4;
}

/* ── Parecer destacado ── */
.ctx-parecer {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  min-height: 64px;
}

.ctx-parecer.is-ok   { background: rgba(52, 168, 83, 0.1);  border: 1px solid rgba(52,168,83,0.25); }
.ctx-parecer.is-warn { background: rgba(217,119,6, 0.09);   border: 1px solid rgba(217,119,6,0.25); }
.ctx-parecer.is-fail { background: rgba(220,38,38, 0.07);   border: 1px solid rgba(220,38,38,0.2);  }

.ctx-parecer__icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.ctx-parecer.is-ok   .ctx-parecer__icon { color: #166534; }
.ctx-parecer.is-warn .ctx-parecer__icon { color: #92400e; }
.ctx-parecer.is-fail .ctx-parecer__icon { color: #991b1b; }

.ctx-parecer__msg {
  margin: 0;
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.5;
}
.ctx-parecer.is-ok   .ctx-parecer__msg { color: #166534; }
.ctx-parecer.is-warn .ctx-parecer__msg { color: #92400e; }
.ctx-parecer.is-fail .ctx-parecer__msg { color: #991b1b; }

@media (max-width: 720px) {
  .ctx-metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .ctx-metric-grid { grid-template-columns: 1fr; }
}

.ahp-contexto-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.ahp-contexto-checklist__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.ahp-contexto-checklist__item:last-child {
  border-bottom: none;
}

.ahp-contexto-checklist__item > i {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.ahp-contexto-checklist__item.is-ok > i {
  color: var(--pli-green, #34a853);
}

.ahp-contexto-checklist__item.is-warn > i {
  color: #d97706;
}

.ahp-contexto-checklist__item.is-fail > i {
  color: #dc2626;
}

.ahp-contexto-checklist__detail {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.15rem;
}

.ahp-contexto-checklist__ok,
.ahp-contexto-checklist__warn,
.ahp-contexto-checklist__blocker {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: left;
}

.ahp-contexto-checklist__ok {
  background: rgba(52, 168, 83, 0.1);
  color: #166534;
}

.ahp-contexto-checklist__warn {
  background: rgba(217, 119, 6, 0.1);
  color: #92400e;
}

.ahp-contexto-checklist__blocker {
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
}

/* Conferência de artefato — Etapa 1 */
.ahp-conferencia-artefato {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ahp-conf-group {
  border: 1px solid var(--pli-border);
  border-radius: var(--pli-radius, 8px);
  overflow: hidden;
  background: #fff;
}

.ahp-conf-group-title {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pli-deep);
  background: #f6f8fa;
  border-bottom: 1px solid var(--pli-border);
}

.ahp-conf-list {
  margin: 0;
  padding: 0;
}

.ahp-conf-item {
  display: grid;
  grid-template-columns: minmax(220px, 42%) 1fr;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pli-border);
  align-items: start;
}

.ahp-conf-item:last-child {
  border-bottom: none;
}

.ahp-conf-label {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--pli-text);
  text-align: left;
}

.ahp-conf-field-key {
  display: block;
  font-size: 0.5em;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--pli-muted, #64748b);
  line-height: 1.2;
}

.ahp-conf-field-name {
  display: block;
  font-size: 1em;
  font-weight: 700;
  color: var(--pli-deep);
  line-height: 1.35;
}

.ahp-conf-value,
.ahp-conf-value-wrap {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--pli-deep);
  word-break: break-word;
}

.ahp-conf-value.is-pending,
.ahp-conf-value--block.is-pending {
  color: var(--pli-muted, #64748b);
  font-style: italic;
}

.ahp-conf-value--block {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--pli-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-x: auto;
}

.ahp-conf-empty {
  margin: 0;
  color: var(--pli-muted, #64748b);
}

@media (max-width: 720px) {
  .ahp-conf-item {
    grid-template-columns: 1fr;
  }
}

/* ─── Título centrado do card de escala ─────────────────────── */
.saaty-escala-titulo {
  margin: 0 0 1rem;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  color: var(--pli-deep);
  letter-spacing: 0.01em;
}

/* ─── Subcards internos do example-box ──────────────────────── */
.saaty-ex-subcard {
  margin: 0.75rem 0;
  border-radius: 8px;
  border: 1.5px solid #c9d6e2;
  background: #fff;
  overflow: hidden;
}

.saaty-ex-subcard--contexto {
  border-left: 4px solid var(--pli-blue);
  padding: 0.85rem 1rem;
}

.saaty-ex-subcard--respostas {
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
}

/* ─── Bloco de contexto: escopo + critérios ─────────────────── */
.saaty-ex-contexto {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #c9d6e2;
}

.saaty-ex-contexto-linha {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.saaty-ex-contexto-label {
  font-weight: 700;
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pli-muted);
  flex-shrink: 0;
}

.saaty-ex-escopo-frase {
  font-style: italic;
  color: var(--pli-deep);
  font-weight: 500;
}

/* ─── Respostas: compactas e responsivas ─────────────────────── */
.saaty-ex-subcard--respostas .saaty-ans-magnitude {
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.saaty-ex-subcard--respostas .saaty-ans-text {
  min-width: 0;
  overflow: hidden;
}

.saaty-ex-subcard--respostas .saaty-ans-direcao {
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
}

.saaty-ex-subcard--respostas .saaty-ans-measures {
  margin-top: 0.3rem;
  gap: 0.3rem;
}

.saaty-ex-subcard--respostas .saaty-ans-m {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
}

.saaty-ex-subcard--respostas .saaty-ans-row {
  padding: 0.4rem 0.5rem;
  gap: 0.45rem;
}

.saaty-ex-subcard--respostas .saaty-ans-badge {
  width: 2.1rem;
  height: 2.1rem;
  font-size: 0.88rem;
  line-height: 2.1rem;
  flex-shrink: 0;
}

.saaty-ex-subcard--respostas .saaty-ans-pair {
  gap: 0.35rem;
}

.saaty-ex-subcard--respostas .saaty-ans-col-head {
  font-size: 0.65rem;
}

/* ─── Narrativa do subcard contexto ─────────────────────────── */
.saaty-ex-narrativa {
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--pli-deep);
  margin: 0 0 0.65rem;
}

.saaty-ex-narrativa--intro-q {
  font-style: italic;
  color: var(--pli-muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #c9d6e2;
}

/* ─── Título do subcard respostas ────────────────────────────── */
.saaty-ex-respostas-titulo {
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pli-muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ─── Sub-rótulo no badge de igualdade ───────────────────────── */
.saaty-ans-direcao-sub {
  font-weight: 400;
  font-size: 0.78em;
  color: var(--pli-muted);
}

/* ─── Narrativa do subcard contexto ─────────────────────────── */
.saaty-ex-narrativa {
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--pli-deep);
  margin: 0 0 0.65rem;
}

.saaty-ex-narrativa--intro-q {
  font-style: italic;
  color: var(--pli-muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #c9d6e2;
}

/* ─── Título do subcard respostas ────────────────────────────── */

/* --- Titulo centralizado dos subcards de exemplo ---------------------- */
.saaty-ex-subcard-titulo {
  font-family: "Montserrat", Verdana, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: var(--pli-deep);
  letter-spacing: 0.02em;
  padding: 0.6rem 1rem 0.75rem;
  margin: 0 -1rem 0.85rem;
  border-bottom: 1.5px solid #c9d6e2;
  background: rgba(30, 80, 140, 0.04);
}

.saaty-ex-subcard--respostas .saaty-ex-subcard-titulo {
  margin: -0.75rem -0.85rem 0.75rem;
  padding: 0.6rem 0.85rem 0.65rem;
}

/* --- Badge alinhado ao topo ------------------------------------------- */
.saaty-ex-subcard--respostas .saaty-ans-row {
  align-items: flex-start;
}

.saaty-ex-subcard--respostas .saaty-ans-badge {
  margin-top: 0.1rem;
}

/* --- Subsecao colapsavel ----------------------------------------------- */
.ahp-subsection-title--collapsible {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ahp-subsection-title--collapsible:hover {
  background: rgba(30, 80, 140, 0.05);
  border-radius: 6px;
}

.ahp-collapse-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--pli-muted);
  transition: transform 0.2s ease;
}

/* --- Espacamento entre subcards: margem explicita (belt-and-suspenders) */
/* garante espaco mesmo se o gap do flex nao for suficiente              */
.ahp-step-section .ahp-section-body > .ahp-subcard + .ahp-subcard,
.ahp-step-section .ahp-section-body > .info-card + .info-card,
.ahp-step-section .ahp-section-body > .ahp-subcard + .info-card,
.ahp-step-section .ahp-section-body > .info-card + .ahp-subcard {
  margin-top: 1.25rem;
}

/* --- Denominação (Step 1) ----------------------------------------- */
.ahp-denominacao-preview {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-alt, #f8f9fa);
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: 6px;
}
.ahp-denominacao-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ahp-denominacao-files li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--color-text-muted, #6c757d);
}
.ahp-denominacao-files code {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--color-primary, #0d6efd);
  word-break: break-all;
}

/* --- Denominação (Step 1) ----------------------------------------- */
.ahp-denominacao-preview {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface-alt, #f8f9fa);
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: 6px;
}
.ahp-denominacao-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ahp-denominacao-files li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--color-text-muted, #6c757d);
}
.ahp-denominacao-files code {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  color: var(--color-primary, #0d6efd);
  word-break: break-all;
}

/* ── Parecer Técnico-Científico ─────────────────────────────────────────── */
.ahp-parecer-wrapper { display: flex; flex-direction: column; gap: 0; }
.ahp-parecer-header { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.25rem; background: linear-gradient(135deg, var(--pli-deep, #003e6b), #005a9e); color: #fff; border-radius: 8px 8px 0 0; font-size: 0.95rem; }
.ahp-parecer-header .fas { font-size: 1.5rem; margin-top: 0.15rem; opacity: 0.9; }
.ahp-parecer-header small { opacity: 0.8; font-size: 0.8rem; }
.ahp-parecer-section { border: 1px solid #dee2e6; border-top: none; padding: 1.25rem; background: #fff; }
.ahp-parecer-section-title { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 700; color: var(--pli-deep, #003e6b); margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--pli-blue, #0d6efd); }
.ahp-parecer-num { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--pli-deep, #003e6b); color: #fff; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.ahp-parecer-subsection-title { font-size: 0.9rem; font-weight: 700; color: var(--pli-deep, #003e6b); margin: 1.25rem 0 0.5rem; border-left: 3px solid var(--pli-blue, #0d6efd); padding-left: 0.6rem; }
.ahp-parecer-info-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1rem; }
.ahp-parecer-info-table th { text-align: left; font-weight: 600; color: var(--pli-deep, #003e6b); padding: 0.35rem 0.75rem 0.35rem 0; width: 35%; white-space: nowrap; vertical-align: top; }
.ahp-parecer-info-table td { padding: 0.35rem 0; color: #333; }
.ahp-parecer-metricas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; padding: 0.75rem 1rem; background: #f0f4f8; border-radius: 6px; border: 1px solid #d0dce8; }
.ahp-parecer-metrica { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-width: 80px; }
.ahp-parecer-metrica-label { font-size: 0.72rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
.ahp-parecer-metrica-valor { font-size: 1rem; font-weight: 700; color: var(--pli-deep, #003e6b); }
.ahp-parecer-collab-list { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.ahp-parecer-collab-item { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; }
.ahp-parecer-collab-header { padding: 0.6rem 0.9rem; background: #f0f4f8; font-size: 0.9rem; border-bottom: 1px solid #dee2e6; }
.ahp-parecer-collab-email { color: #555; font-size: 0.85rem; margin-left: 0.25rem; }
.ahp-parecer-collab-inst { color: #777; font-size: 0.82rem; }
.ahp-parecer-collab-metrics { padding: 0.4rem 0.9rem; font-size: 0.85rem; background: #fff; border-bottom: 1px solid #eee; }
.ahp-parecer-collab-item .ahp-table-scroll { padding: 0.5rem 0.75rem 0.75rem; }
.ahp-parecer-agregacao { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.75rem 0; margin-bottom: 1rem; font-size: 0.9rem; }
.ahp-parecer-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 1.25rem; background: #f8fafc; border: 1px solid #dee2e6; border-top: none; border-radius: 0 0 8px 8px; }

/* Compatibilização visual do Bloco 2 (Processos/Fase 1/2/3): texto descritivo
   e de ajuda das seções em tamanho compacto uniforme (padrão de Processos). */
.fase-execucao-page .ahp-section-body .ahp-help-text,
.fase-execucao-page .ahp-section-body > p,
.fase1-page .ahp-section-body .ahp-help-text,
.fase1-page .ahp-section-body > p {
  font-size: 0.78rem;
}

/* Fase 1 — títulos do bloco operacional estavam sem estilo (grandes demais). */
.fase1-page .ahp-section-body .fase1-operational h3 {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}
.fase1-page .ahp-section-body .fase1-operational h4 {
  font-size: 0.78rem;
  margin: 0 0 0.35rem;
}
/* Mensagem de convite: mantém a apresentação de campo e permite abrir a URL. */
.collab-email-template {
  min-height: 12rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ahp-step-config-selector {
  margin: 1rem 0 1.35rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--pli-border, #d7e2eb);
  border-left: 4px solid var(--pli-blue, #116593);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 101, 147, 0.05), rgba(17, 101, 147, 0) 55%), #fff;
  box-shadow: 0 1px 3px rgba(16, 42, 67, 0.08);
}

.ahp-step-config-selector__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.ahp-step-config-selector__header i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  border-radius: 50%;
  background: var(--pli-blue, #116593);
  color: #fff;
  font-size: 0.95rem;
}

.ahp-step-config-selector__header strong {
  display: block;
  color: var(--pli-text, #1f2937);
  font-size: 0.98rem;
}

.ahp-step-config-selector__header p {
  margin: 0.2rem 0 0;
  color: var(--pli-text-secondary, #4b5563);
  font-size: 0.85rem;
}

.ahp-step-config-selector select#ahp-step-config-select {
  max-width: 640px;
  font-weight: 600;
  border-width: 2px;
}

.ahp-step-config-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-top: 0.85rem;
  color: var(--pli-text-secondary, #4b5563);
  font-size: 0.9rem;
}

.ahp-step-config-status strong {
  color: var(--pli-text, #1f2937);
  flex-basis: 100%;
  font-size: 0.95rem;
}

.ahp-step-config-status span {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--pli-blue, #116593);
  font-size: 0.78rem;
  font-weight: 600;
}

.ahp-step-config-status__avisos {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.ahp-step-config-status__aviso {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #f2d675;
  border-radius: 8px;
  background: #fff8e1;
  color: #7a5c00;
  font-size: 0.82rem;
  font-weight: 500;
}

.ahp-step-config-status__aviso i {
  margin-top: 0.1rem;
  color: #b8860b;
}

.ahp-criteria-origin { display:flex; align-items:center; gap:9px; margin:0 0 18px; padding:11px 13px; border:1px solid #d8e5ec; border-radius:10px; background:#f4f9fb; color:#4f687a; font-size:.86rem; }
.ahp-criteria-origin i { color:#197c89; }
.ahp-criteria-origin strong { color:#183b55; }
.ahp-excel-table-wrap,
.ahp-planilha-literal-wrap { width:100%; overflow-x:auto; border:1px solid #d7e2eb; border-radius:10px; background:#fff; }
.ahp-planilha-literal-table { min-width: 1200px; }
