/* style selectpicker */
.dropdown.bootstrap-select {width: 100% !important;}

.btn.dropdown-toggle.btn-light{
    background-color: white;
    display: block;
    width: 100%;
    padding: 0.8rem 2rem 0.8rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5rem;
    border: 1px solid #bec8d0;
    border-radius: 8px;
    color: black;
}

.btn.dropdown-toggle.disabled.btn-light {
    border: 1px solid #a3acb3;
    color: #5b6b79 !important;
    background-color: #f3f5f7 !important;
}

.dropdown.bootstrap-select.show-tick,
.dropdown.bootstrap-select.show-tick.dropup {
    width: 100% !important;
}

.btn.dropdown-toggle[data-id^="select_"] {
    background-color: white;
    display: block;
    width: 100%;
    padding: 0.8rem 2rem 0.8rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4rem;
    border: 1px solid #bec8d0;
    border-radius: 8px;
    color: black;
    
}

.btn.dropdown-toggle[data-id^="select_"] .filter-option-inner-inner {
    color: #495057 !important;
    font-size: 0.875rem !important;
}

.btn.dropdown-toggle[data-id^="select_"]:hover {
    background-color: #f3e5f5 !important;
    border-color: #673ab7 !important;
}

.btn.dropdown-toggle[data-id^="select_"]:focus {
    outline: none !important;
    border-color: #673ab7 !important;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(103, 58, 183, 0.25) !important;
            box-shadow: 0 0 0 0.2rem rgba(103, 58, 183, 0.25) !important;
}
/* style selectpicker */

#badge_dados, #badge_endereco, #badge_observacao, .badge_forms {
    position: relative;
    top: +10px;
    left: +10px;
    z-index: 100;
}

.border {
    border-radius: 10px;
}

#btn_hide, #btn_hide1, #btn_hide2{
    border-top-right-radius: 19px !important;
    border-bottom-right-radius: 19px !important;
}

/* Inicio Adaptações TAGIFY para estilo igual ao form-control */

.tagify__input {
    padding: 0.8rem 0.75rem!important;
    font-size: 0.875rem!important;
    font-weight: 400!important;
    line-height: 1.5!important;
    margin: 0rem!important;
    border: 0px!important;
}

.tagify{
    border-color: #bec8d0!important;
}

.item.dragging {
    opacity: 0.6;
  }
  .item.dragging :where(.details, i) {
    opacity: 0;
  }

/* Final Adaptações TAGIFY para estilo igual ao form-control */

/* Tooltips acima do modal (tema define .modal { z-index: 1081 } e .tooltip { 1080 }) */
body > .tooltip,
.tooltip.show {
  z-index: 20000 !important;
}


/* Avatar com iniciais (usado quando o usuário não tem foto) */
.avatar-iniciais {
  --avatar-size: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  background-color: var(--bs-primary, #4680ff);
  color: #fff;
  font-weight: 600;
  font-size: calc(var(--avatar-size) * 0.38);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
  overflow: hidden;
}
/* Sem nome disponível: mostra um ícone genérico de usuário */
.avatar-iniciais:empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55% 55%;
}


/* ==========================================================================
   Galeria de documentos do motorista/veículo (tela de motoristas)
   ADM: cartões editáveis (Substituir + campos). Empresa/Entidade: somente leitura.
   ========================================================================== */
.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.doc-readonly {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--bs-secondary-color, #5b6b79);
}
.doc-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  background: #f3f5f7;
  color: #5b6b79;
}
.doc-pill-ok { background: #e6f5ef; color: #1b7f5a; }
.doc-pill-warn { background: #fff4e0; color: #b96900; }
.doc-pill-bad { background: #fde8e8; color: #b42318; }

.doc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: #f3f5f7;
  font-size: 13px;
  color: #5b6b79;
}
.doc-summary strong { color: #1d2630; }

.doc-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #5b6b79;
}
.doc-section h6 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1d2630;
}
.doc-count { font-size: 12px; color: #5b6b79; }

.doc-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.doc-galeria + .doc-section { margin-top: 28px; }

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--bs-card-border-color, #e7eaee);
  border-radius: 10px;
  background: #fff;
}

.doc-thumb {
  position: relative;
  height: 160px;
  border-radius: 8px;
  border: 1px solid #e7eaee;
  background: #f3f5f7;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-thumb > a { display: block; width: 100%; height: 100%; }
.doc-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.doc-img-pdf {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 44px auto 0;
}
.doc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9aa6b2;
}
.doc-empty i { font-size: 28px; }

.doc-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  background: #f3f5f7;
  color: #5b6b79;
}
.doc-status i { font-size: 10px; }
.doc-status-ok { background: #e6f5ef; color: #1b7f5a; }
.doc-status-warn { background: #fff4e0; color: #b96900; }

.doc-dupla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.doc-dupla-item { display: flex; flex-direction: column; gap: 8px; }
.doc-dupla-item .doc-thumb { height: 110px; }
.doc-dupla-item .doc-actions { flex-direction: column; }
.doc-dupla-item .doc-btn { width: 100%; }

.doc-info { display: flex; flex-direction: column; gap: 2px; }
.doc-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1d2630;
}
.doc-meta {
  margin: 0;
  font-size: 12px;
  color: #5b6b79;
  overflow-wrap: anywhere;
}

.doc-field { display: flex; flex-direction: column; gap: 4px; }
.doc-field .form-label { margin: 0; font-size: 12px; font-weight: 500; }

.doc-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed #e7eaee;
  font-size: 13px;
}
.doc-kv span:first-child { color: #5b6b79; }
.doc-kv span:last-child { font-weight: 500; color: #1d2630; }

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.doc-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  white-space: nowrap;
}

.doc-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px -25px -25px;
  padding: 14px 25px;
  border-top: 1px solid #e7eaee;
  background: #fff;
  border-radius: 0 0 12px 12px;
}
.doc-savebar-note {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #5b6b79;
}
.doc-savebar-actions { display: flex; gap: 8px; }

/* --- Revisão individual de documentos (aprovado / reprovado / em análise) --- */
.doc-status-bad { background: #fde8e8; color: #b42318; }
.doc-status-info { background: #e8f0ff; color: #2f5fd0; }
.doc-decisao {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e7eaee;
}
.doc-motivo {
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fde8e8;
  color: #b42318;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.doc-summary-revisao {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.doc-summary-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.doc-summary-contagem strong { color: #1d2630; }
.doc-progress {
  height: 6px;
  border-radius: 999px;
  background: #e7eaee;
  overflow: hidden;
}
.doc-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #2ca87f;
  transition: width 0.3s ease;
}
.doc-hint { font-size: 12px; color: #5b6b79; }
