/* Show it is fixed to the top */
body {
  padding-top: 57px;
  padding-bottom: 57px;
}

/* Fixa o footer no final da pÃ¡gina */
footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding-bottom: 0rem; /* ajuste o valor de acordo com a sua necessidade */
}

.dropdown-menu {
  display: none; /* Esconde o sub-menu por padrão */
}

.nav-item:hover .dropdown-menu {
  display: block; /* Mostra o sub-menu ao passar o mouse */
}

.container{
  max-width: 100%!important;
}

.bg-blue {
  background-color: #3c5d95 !important;
}

/* ---- Formulário de atendimento multi-etapas ---- */
.step-indicator {
  transition: all 0.2s ease-in-out;
  border: 1px solid #e9ecef;
  background-color: #f8f9fa;
}

.step-indicator.active {
  border-color: #0d6efd;
  background: linear-gradient(135deg, rgba(13,110,253,0.1), rgba(13,110,253,0.25));
  box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.15);
}

.step-indicator.active .fw-bold,
.step-indicator.active small {
  color: #0d6efd;
}

.step-pane {
  animation: fadeIn 120ms ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lista-disponiveis,
.lista-selecionados {
  min-height: 260px;
  max-height: 360px;
  overflow-y: auto;
}

.procedimento-item,
.procedimento-disponivel {
  cursor: grab;
}

.procedimento-item:active,
.procedimento-disponivel:active {
  cursor: grabbing;
}

.procedimento-item .cid-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
}

#resultado_busca {
  z-index: 1050;
  max-height: 280px;
  overflow-y: auto;
}

.card[data-lado] .card-body {
  background-color: #fdfdff;
}

.card[data-lado] .list-group-item {
  border-radius: 0.35rem;
}

.cid-input {
  width: 80px;
  text-transform: uppercase;
}

/* ---- Shared system list layout ---- */
.atendimentos-page {
  --at-border: #d8dee8;
  --at-muted: #667085;
  --at-ink: #1f2937;
  --at-soft: #f6f8fb;
  padding-bottom: 4rem;
}

.atendimentos-header,
.atendimentos-filter,
.atendimentos-table-shell {
  background: #fff;
  border: 1px solid var(--at-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .06);
}

.atendimentos-header {
  padding: 1rem 1.25rem;
}

.atendimentos-title {
  color: var(--at-ink);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0;
}

.atendimentos-subtitle {
  color: var(--at-muted);
  font-size: .875rem;
  margin: .15rem 0 0;
}

.atendimento-metric {
  border-left: 1px solid var(--at-border);
  min-width: 8.5rem;
  padding-left: 1rem;
}

.atendimento-metric span {
  color: var(--at-muted);
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.atendimento-metric strong {
  color: var(--at-ink);
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.atendimentos-filter {
  padding: 1rem;
}

.filter-heading {
  min-width: 0;
}

.atendimentos-filter .form-label {
  color: #344054;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: .3rem;
}

.atendimentos-filter .form-control,
.atendimentos-filter .form-select,
.atendimentos-filter .select2-selection {
  min-height: 40px;
}

.filter-actions {
  gap: .75rem;
  min-width: 190px;
}

.filter-actions .btn {
  min-height: 40px;
  min-width: 88px;
  white-space: nowrap;
}

.atendimentos-table-shell {
  -ms-overflow-style: none;
  overflow: hidden;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.atendimentos-table-shell::-webkit-scrollbar {
  background: transparent;
  display: none;
  height: 0;
  width: 0;
}

.atendimentos-table {
  margin-bottom: 0;
  min-width: 900px;
}

.atendimentos-table thead th {
  background: var(--at-soft);
  color: #475467;
  font-size: .74rem;
  letter-spacing: 0;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.atendimentos-table tbody td {
  border-color: #edf1f7;
  vertical-align: middle;
}

.mapa-wide-table {
  min-width: 1500px;
}

.mapa-form-table {
  min-width: 1680px;
}

.mapa-form-table-shell {
  -webkit-overflow-scrolling: touch;
}

.mapa-form-table tbody td {
  vertical-align: top;
}

.mapa-form-table .form-control,
.mapa-form-table .form-select {
  min-width: 0;
}

.status-publico-purple {
  background: #6f42c1;
  color: #fff;
}

.auditoria-history {
  background: #fff;
  border: 1px solid var(--at-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 41, 55, .06);
  overflow: hidden;
}

.auditoria-history-header {
  align-items: center;
  background: var(--at-soft);
  border-bottom: 1px solid var(--at-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.auditoria-history-header h4 {
  color: var(--at-ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.auditoria-history-header p {
  font-size: .875rem;
}

.auditoria-history-count {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  min-width: 7rem;
  padding: .65rem .85rem;
  text-align: right;
}

.auditoria-history-count span {
  color: var(--at-muted);
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auditoria-history-count strong {
  color: var(--at-ink);
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}

.auditoria-timeline {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.25rem 1.25rem 3.25rem;
  position: relative;
}

.auditoria-timeline::before {
  background: #d8dee8;
  bottom: 1.75rem;
  content: "";
  left: 2rem;
  position: absolute;
  top: 1.75rem;
  width: 2px;
}

.auditoria-timeline-item {
  margin-bottom: 1rem;
  position: relative;
}

.auditoria-timeline-item:last-child {
  margin-bottom: 0;
}

.auditoria-timeline-marker {
  align-items: center;
  background: #eef2f7;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #d8dee8;
  color: #475467;
  display: flex;
  height: 2.05rem;
  justify-content: center;
  left: -2.28rem;
  position: absolute;
  top: .75rem;
  width: 2.05rem;
  z-index: 1;
}

.auditoria-timeline-card {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: .95rem 1rem;
}

.auditoria-timeline-top {
  align-items: flex-start;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
}

.auditoria-timeline-title {
  align-items: center;
  color: var(--at-ink);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.auditoria-origin-chip {
  background: #eef2f7;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: #475467;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .5rem;
}

.auditoria-timeline-date {
  color: var(--at-muted);
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

.auditoria-timeline-meta {
  align-items: center;
  color: var(--at-muted);
  display: flex;
  font-size: .82rem;
  gap: .35rem;
  margin-top: .3rem;
}

.auditoria-timeline-text {
  color: #344054;
  line-height: 1.5;
  margin-top: .75rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.auditoria-timeline-ajuste .auditoria-timeline-marker {
  background: #fff7e6;
  box-shadow: 0 0 0 1px #f1c36d;
  color: #9a6700;
}

.auditoria-timeline-revisao .auditoria-timeline-marker {
  background: #eef4ff;
  box-shadow: 0 0 0 1px #9bb8ee;
  color: #315a9f;
}

.auditoria-timeline-coordenador .auditoria-timeline-marker {
  background: #eef6ff;
  box-shadow: 0 0 0 1px #91c7ed;
  color: #12659b;
}

.auditoria-timeline-conclusao .auditoria-timeline-marker {
  background: #eaf7ef;
  box-shadow: 0 0 0 1px #8ccca5;
  color: #1d7a43;
}

.auditoria-history-empty {
  align-items: center;
  color: var(--at-muted);
  display: flex;
  gap: .85rem;
  padding: 1.25rem;
}

.auditoria-history-empty > i {
  align-items: center;
  background: #eef2f7;
  border-radius: 50%;
  color: #475467;
  display: flex;
  flex: 0 0 auto;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.auditoria-history-empty strong,
.auditoria-history-empty span {
  display: block;
}

.auditoria-history-empty strong {
  color: var(--at-ink);
}

.auditoria-role-tabs .nav-link {
  align-items: center;
  display: inline-flex;
  gap: .4rem;
}

.auditoria-role-content {
  background: #fff;
}

.auditoria-role-toolbar {
  align-items: center;
  background: var(--at-soft);
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .75rem 1rem;
}

.auditoria-role-summary {
  color: var(--at-muted);
  font-size: .82rem;
  font-weight: 700;
}

.auditoria-picker {
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  overflow: hidden;
}

.auditoria-picker-header {
  align-items: center;
  background: #f9fafb;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .65rem .8rem;
}

.auditoria-picker-header strong {
  color: var(--at-ink);
  font-size: .9rem;
}

.auditoria-picker-header span {
  color: var(--at-muted);
  font-size: .76rem;
  font-weight: 700;
}

.auditoria-picker-list {
  display: grid;
  gap: .25rem;
  max-height: 220px;
  overflow-y: auto;
  padding: .5rem;
}

.auditoria-picker-option {
  align-items: flex-start;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: flex;
  gap: .55rem;
  line-height: 1.25;
  margin: 0;
  min-height: 34px;
  padding: .45rem .5rem;
}

.auditoria-picker-option:hover {
  background: #f6f8fb;
}

.auditoria-picker-option .form-check-input {
  flex: 0 0 auto;
  margin-top: .1rem;
}

.auditoria-final-review {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
}

.auditoria-final-copy,
.auditoria-final-form {
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 1rem;
}

.auditoria-final-copy {
  background: #f9fafb;
}

.auditoria-final-copy h5 {
  color: var(--at-ink);
  font-weight: 700;
  margin-bottom: .4rem;
}

.auditoria-final-copy p {
  color: var(--at-muted);
  margin-bottom: 1rem;
}

.auditoria-final-stats {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.auditoria-final-stats div {
  background: #f6f8fb;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: .75rem;
}

.auditoria-final-stats span {
  color: var(--at-muted);
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auditoria-final-stats strong {
  color: var(--at-ink);
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.auditoria-final-confirm {
  background: #f6f8fb;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: .75rem .75rem .75rem 2.25rem;
}

.auditoria-ready-steps {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.auditoria-ready-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.auditoria-ready-step {
  align-items: center;
  border: 1px solid #e5e9f0;
  border-radius: 999px;
  color: #475467;
  display: inline-flex;
  font-size: .88rem;
  font-weight: 700;
  gap: .4rem;
  min-height: 36px;
  padding: .35rem .75rem;
}

.auditoria-ready-step i {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.auditoria-ready-step.is-complete {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.auditoria-ready-step.is-complete i {
  background: #17a05d;
  color: #fff;
}

.auditoria-ready-step.is-current {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.auditoria-ready-step.is-current i {
  background: #2563eb;
  color: #fff;
}

.auditoria-header-status {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: .2rem;
}

.auditoria-header-status span {
  color: var(--at-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.auditoria-header-status .badge {
  padding: .45rem .6rem;
}

@media (max-width: 991.98px) {
  .atendimento-metric {
    border-left: 0;
    min-width: 7rem;
    padding-left: 0;
  }
}

@media (max-width: 575.98px) {
  .atendimentos-page {
    padding-left: .5rem !important;
    padding-right: .5rem !important;
  }

  .atendimentos-header,
  .atendimentos-filter {
    padding: .9rem;
  }

  .filter-heading {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .filter-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    width: 100%;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .atendimentos-table-shell {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
  }

  .atendimentos-table-shell::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(31, 41, 55, .12));
    content: "";
    height: 100%;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
  }

  .auditoria-history-header,
  .auditoria-timeline-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .auditoria-history-count {
    text-align: left;
    width: 100%;
  }

  .auditoria-timeline {
    padding: 1rem 1rem 1rem 2.75rem;
  }

  .auditoria-timeline::before {
    left: 1.55rem;
  }

  .auditoria-timeline-marker {
    left: -2.05rem;
  }

  .auditoria-timeline-date {
    white-space: normal;
  }

  .auditoria-role-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .auditoria-final-review {
    grid-template-columns: 1fr;
  }
}
