.process-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.process-modal-dialog {
  max-width: 90vw;
  width: 90vw;
}

.process-modal {
  min-height: 90vh;
}

.process-modal-tabs {
  margin-bottom: 0;
}

.process-form {
  padding: 0;
}

.process-modal .tab-content > form > .tab-pane {
  display: none;
}

.process-modal .tab-content > form > .tab-pane.active,
.process-modal .tab-content > form > .tab-pane.show {
  display: block;
}

.process-modal .tab-content .process-tab-pane {
  padding: 1.5rem 1.5rem 3rem;
}

.process-controls {
  justify-content: flex-end;
}

.process-search {
  min-width: 240px;
}

.process-search .input-group-text {
  border-radius: 0.9rem 0 0 0.9rem;
  border: 1px solid rgba(93, 44, 200, 0.2);
  background: rgba(93, 44, 200, 0.08);
  color: var(--cethro-primary);
}

.process-search .form-control {
  border-radius: 0 0.9rem 0.9rem 0;
  border: 1px solid rgba(93, 44, 200, 0.2);
}

.process-filter {
  min-width: 190px;
  border-radius: 0.9rem;
}

.process-table thead th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--cethro-muted);
  border-bottom: 1px solid rgba(93, 44, 200, 0.15);
}

.process-table tbody tr {
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.process-table tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(41, 29, 94, 0.12);
}

.process-table td {
  vertical-align: middle;
  border-top: 1px solid rgba(93, 44, 200, 0.1);
  font-size: 0.92rem;
}

.process-id {
  font-weight: 600;
  color: var(--cethro-primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.status-pill i {
  font-size: 1rem;
}

.status-pill:hover,
.status-pill:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(93, 44, 200, 0.18);
}

.status-pill--parado {
  background: rgba(244, 91, 105, 0.12);
  color: #f45b69;
  border-color: rgba(244, 91, 105, 0.3);
}

.status-pill--em-andamento {
  background: rgba(255, 188, 66, 0.14);
  color: #d68000;
  border-color: rgba(255, 188, 66, 0.35);
}

.status-pill--concluido {
  background: rgba(76, 201, 103, 0.16);
  color: #389d5a;
  border-color: rgba(76, 201, 103, 0.35);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.8rem;
  padding: 0.3rem 0.65rem;
  font-weight: 500;
  font-size: 0.8rem;
}

.status-chip i {
  font-size: 0.9rem;
}

.status-chip--pending {
  background: rgba(93, 44, 200, 0.1);
  color: var(--cethro-muted);
}

.status-chip--progress {
  background: rgba(255, 188, 66, 0.15);
  color: #d68000;
}

.status-chip--completed {
  background: rgba(76, 201, 103, 0.18);
  color: #2f9152;
}

.analysis-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.analysis-badge span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 0.75rem;
}

.analysis-badge small {
  color: var(--cethro-muted);
  font-size: 0.72rem;
}

.analysis-badge--nao-iniciada span {
  background: rgba(93, 44, 200, 0.08);
  color: var(--cethro-muted);
}

.analysis-badge--em-analise span {
  background: rgba(44, 146, 228, 0.14);
  color: #1668b7;
}

.analysis-badge--em-revisao span {
  background: rgba(244, 91, 105, 0.12);
  color: #c0394f;
}

.analysis-badge--concluida span {
  background: rgba(76, 201, 103, 0.18);
  color: #2f9152;
}

.risk-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

.risk-cell .risk-score {
  font-size: 1.15rem;
  color: var(--cethro-primary);
}

.risk-cell .risk-status {
  font-size: 0.78rem;
  color: var(--cethro-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn-sm {
  width: 34px;
  height: 34px;
  border-radius: 0.75rem;
  border: 1px solid rgba(93, 44, 200, 0.18);
  background: rgba(93, 44, 200, 0.08);
  color: var(--cethro-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed) ease, background var(--transition-speed) ease;
}

.icon-btn-sm:hover {
  background: rgba(93, 44, 200, 0.18);
  transform: translateY(-1px);
}

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-decoration: none;
}

.process-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--cethro-muted);
}

.process-empty-state i {
  font-size: 2rem;
  color: var(--cethro-primary);
}

.process-form .form-text {
  font-size: 0.75rem;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.switch-field .form-check {
  margin-bottom: 0;
}

.help-icon {
  padding: 0;
  color: var(--cethro-primary);
}

.additional-people-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.additional-person-card {
  border: 1px dashed rgba(93, 44, 200, 0.2);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(93, 44, 200, 0.04);
  transition: border-color var(--transition-speed) ease, background var(--transition-speed) ease;
}

.additional-person-card:hover {
  border-color: rgba(93, 44, 200, 0.45);
  background: rgba(93, 44, 200, 0.08);
}

.results-wrapper {
  display: flex;
  gap: 2rem;
  padding: 2rem;
}

.results-sidebar {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card {
  border: 1px solid rgba(93, 44, 200, 0.15);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(93, 44, 200, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.result-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.result-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--cethro-muted);
}

.result-score {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cethro-primary);
}

.result-summary {
  font-size: 0.88rem;
  color: var(--cethro-text);
  margin-bottom: 0;
}

.results-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.commentary-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-card {
  border: 1px solid rgba(93, 44, 200, 0.15);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(93, 44, 200, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-card textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comment-card-header .badge {
  font-weight: 600;
  font-size: 0.75rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--cethro-muted);
}

.tab-navigation {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tab-navigation .btn {
  min-width: 120px;
}

.result-toggle {
  color: var(--cethro-primary);
}

.result-toggle:hover {
  color: var(--cethro-primary);
  text-decoration: underline;
}

.decision-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.decision-field .form-label {
  font-weight: 600;
  color: var(--cethro-text);
  margin-bottom: 0;
}

.decision-group.btn-group {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.decision-group .btn {
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.history-panel {
  border: 1px dashed rgba(93, 44, 200, 0.28);
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(93, 44, 200, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  border: 1px solid rgba(93, 44, 200, 0.18);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: var(--cethro-surface);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-item-header i {
  font-size: 1.1rem;
  color: var(--cethro-primary);
}

.history-item-meta {
  font-size: 0.78rem;
  color: var(--cethro-muted);
}

.history-item-message {
  margin: 0;
  font-size: 0.9rem;
}

.history-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.7rem;
  background: rgba(93, 44, 200, 0.1);
  color: var(--cethro-primary);
  font-size: 0.78rem;
}

.history-empty {
  border: 1px dashed rgba(93, 44, 200, 0.25);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
}

.history-empty i {
  font-size: 2.2rem;
  color: rgba(93, 44, 200, 0.35);
}

.history-form {
  border: 1px solid rgba(93, 44, 200, 0.15);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(93, 44, 200, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-form-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.risk-stack {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.risk-item .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cethro-muted);
}

.risk-item .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cethro-primary);
}

.cta-stack {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.revisor-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.conference-list,
.reviewer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.conference-item,
.reviewer-item {
  border: 1px solid rgba(93, 44, 200, 0.18);
  border-radius: 0.85rem;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.conference-item label,
.reviewer-item label {
  margin-bottom: 0;
  cursor: pointer;
  flex: 1;
}

@media (max-width: 1199.98px) {
  .process-modal-dialog {
    max-width: 95vw;
    width: 95vw;
  }

  .results-wrapper {
    flex-direction: column;
  }

  .results-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .results-sidebar .result-card {
    flex: 1 1 240px;
  }
}

@media (max-width: 767.98px) {
  .process-modal-dialog {
    width: 100%;
    max-width: 100%;
    margin: 1rem auto;
  }

  .decision-group .btn {
    flex: 1 1 120px;
  }

  .process-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .process-search {
    flex: 1 1 100%;
  }

  .process-filter {
    width: 100%;
  }

  .results-wrapper {
    padding: 1.5rem;
  }

  .history-form-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .results-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .risk-stack {
    width: 100%;
  }

  .cta-stack {
    width: 100%;
    justify-content: flex-start;
  }
}

[data-bs-theme="dark"] .status-pill--parado {
  background: rgba(244, 91, 105, 0.24);
  color: #ff9aa6;
}

[data-bs-theme="dark"] .status-pill--em-andamento {
  background: rgba(255, 188, 66, 0.25);
  color: #ffce73;
}

[data-bs-theme="dark"] .status-pill--concluido {
  background: rgba(76, 201, 103, 0.26);
  color: #71ff9a;
}

.risk-summary-card {
  border: 1px solid rgba(93, 44, 200, 0.18);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(93, 44, 200, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.risk-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.risk-summary-label {
  font-weight: 600;
  color: var(--cethro-text);
}

.risk-summary-input {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.risk-summary-input .form-control {
  width: 80px;
  text-align: right;
  padding: 0.3rem 0.6rem;
}

.risk-summary-unit {
  font-weight: 600;
  color: var(--cethro-muted);
}

.risk-factors-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.risk-factor {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.risk-factor .form-check-input {
  margin-top: 0.3rem;
}

.risk-factor-text {
  color: var(--cethro-text);
  line-height: 1.4;
}

[data-bs-theme="dark"] .risk-summary-card {
  background: rgba(36, 36, 54, 0.9);
  border-color: rgba(93, 44, 200, 0.4);
}

[data-bs-theme="dark"] .result-card {
  background: rgba(93, 44, 200, 0.18);
}

[data-bs-theme="dark"] .comment-card,
[data-bs-theme="dark"] .history-panel {
  background: rgba(36, 36, 54, 0.9);
  border-color: rgba(93, 44, 200, 0.35);
}

[data-bs-theme="dark"] .comment-card-header .badge.text-muted {
  background: rgba(93, 44, 200, 0.25);
  color: var(--cethro-primary);
}

[data-bs-theme="dark"] .history-item {
  background: rgba(36, 36, 54, 0.9);
}

[data-bs-theme="dark"] .history-empty {
  background: rgba(36, 36, 54, 0.6);
}

[data-bs-theme="dark"] .history-form {
  background: rgba(36, 36, 54, 0.75);
}
