@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");

:root {
  --z-modal: 2147483000;
  /* bem alto */
  --z-modal-content: 2147483001;
  --z-swal: 2147483200;
}

html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #f4f4f4;
}

#header {
  background: linear-gradient(100deg, #00a195, #008575);

  color: white;
  text-align: center;
  padding: 30px 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#footer {
  background: #e4ebeb;

  color: white;
  text-align: center;
  padding: 26px 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#logo_etufor {
  height: 58px;
  width: auto;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.2));
}


#logo_cipetran {
  height: 50px;
  border: 0;
  image-rendering: auto;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.2));
}

.page-wrapper {
  min-height: 100vh;
  /* 100% da altura da viewport */
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  /* ocupa todo o espaço disponível, empurrando o footer para o final */
}

#user-info {
  position: absolute;
  top: 5px;
  right: 15px;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px;
}

.user-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.icon-person {
  font-size: 16px !important;
}

#logout {
  text-decoration: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#login-link {
  text-decoration: none;
  color: white;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-senha {
  color: #00a195;
  font-size: 20px;
  cursor: pointer;
}

#logo-etufor {
  position: absolute;
  top: 5px;
  left: 15px;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px;
}

#content,
#login-container,
#consulta-container,
#vistoria-container {
  min-width: 88%;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

h1,
h2 {
  text-align: center;
}

label {
  display: block;
  font-weight: bold;
  margin: 10px 0 5px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  font-size: 15px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #00a195;
  box-shadow: 0 0 0 0.2rem rgba(0, 161, 149, 0.25);
}

button,
.btn-voltar,
.btn-cancelar,
.btn-remove,
.btn-crop {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: none;
  background-color: #00a195;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0, 161, 149, 0.2);
}

button:hover {
  background-color: #008575;
  transform: scale(1.02);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.abrir-laudo-btn {
  background-color: #28a745;
}

.abrir-laudo-btn:hover {
  background-color: #218838;
}

.btn-cancelar {
  background-color: #dc3545;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

.btn-cancelar:hover {
  background-color: #c82333;
  transform: scale(1.02);
}

.btn-voltar {
  background-color: #6c757d;
  display: inline-block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

.btn-voltar:hover {
  background-color: #5a6268;
  transform: scale(1.02);
}

.btn-remove {
  display: none;
  background-color: #e74c3c;
}

.btn-remove:hover {
  background-color: #c0392b;
}

.btn-crop {
  display: none;
}

.error-message,
.success-message {
  text-align: center;
  font-weight: bold;
}

.error-message {
  color: red;
}

.success-message {
  color: green;
}

table {
  width: 100%;
  margin-top: 20px;
  border-collapse: separate;
  /* Necessário para bordas arredondadas */
  border-spacing: 0;
  background-color: white;
  border-radius: 12px 12px 0 0;
  /* Arredonda só o topo */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th,
td {
  padding: 12px 10px;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

th {
  background-color: #00a195;

  color: white;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #00a195;

  color: white;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 10px;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
}

/* Bordas arredondadas só nos cantos superiores do cabeçalho */
thead th:first-child {
  border-top-left-radius: 12px;
}

thead th:last-child {
  border-top-right-radius: 12px;
}

/* Corpo da tabela */
tbody td {
  padding: 12px 10px;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

tr:nth-child(even) {
  background-color: #f4f4f4;
}

/* Tabela para telas grandes */
.responsive-table {
  display: block;
}

/* Cards para telas pequenas */
.responsive-table-mobile {
  display: none;
}

/* Media Query para telas pequenas (ex: celular) */
@media (max-width: 1024px) {
  #header {
    padding: 30px 8px 10px;
  }

  #login-link {
    top: 5px;
    right: 10px;
    font-size: 12px;
  }

  #footer {
    padding: 18px 0;
  }

  #logo_etufor {
    height: 28px;
  }

  #logo_cipetran {
    height: 24px;
  }

  h1,
  h2 {
    font-size: 18px;
  }

  label {
    font-size: 14px;
  }

  input[type="text"],
  input[type="password"],
  button {
    font-size: 14px;
  }

  table th,
  table td {
    font-size: 12px;
    padding: 5px;
  }

  .responsive-table {
    display: none;
  }

  .responsive-table-mobile {
    display: block;
  }

  .laudo-item {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 12px;
    transition: background-color 0.3s ease;
    /* Efeito suave de fundo */
  }

  .btn-cancelar,
  .btn-voltar {
    font-size: 12px;
    padding: 12px;
  }
}

/* Estilo das abas */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

.tab {
  padding: 10px 15px;
  background-color: #f2f2f2;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  flex: 1 1 150px;
  text-align: center;
  min-width: 130px;
  white-space: normal;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tab.active {
  background-color: #00a195;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 161, 149, 0.15);
}

.tab-content {
  display: none;
  border: 1px solid #ddd;
  border-top: none;
  padding: 20px;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
  display: block;
}

/* Responsividade das abas */
@media (max-width: 1024px) {
  .tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tab {
    flex: 1 1 100%;
    min-width: unset;
    font-size: 1rem;
    padding: 12px 10px;
  }
}

.vistoria-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vistoria-card {
  display: flex;
  align-items: flex-start;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 1rem;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.vistoria-card:hover {
  border-color: #888;
}

.vistoria-card.selected {
  border-color: #00a195;
  background-color: #bff3ec;
}

.vistoria-card input[type="radio"] {
  margin-top: 6px;
}

.vistoria-content {
  flex: 1;
}

.vistoria-info {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}

.gps-link {
  color: #00a195;
  text-decoration: none;
  font-size: 1.2rem;
  margin-left: auto;
  margin-top: 4px;
}

.gps-link:hover {
  color: #008575;
}

.info-message {
  background-color: #e0f9f6;
  color: #00a195;
  font-weight: bold;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid #94e2d6;
}

button .material-icons,
.btn-voltar .material-icons {
  vertical-align: middle;
  margin-right: 4px;
}

.tab-inner {
  display: flex;
  align-items: center;
  /* alinha verticalmente */
  justify-content: center;
  /* centraliza horizontalmente */
  gap: 6px;
  /* espaço entre ícone e texto */
  height: 100%;
}

.tab-inner .material-icons {
  line-height: 1;
  /* evita desalinhamento */
  display: flex;
  align-items: center;
  vertical-align: middle;
}

.menu-nav {
  background-color: #006e62;
  overflow: hidden;
}

.menu-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.menu-list li {
  flex: 1 1 auto;
  text-align: center;
}

.menu-list a {
  display: block;
  color: white;
  text-align: center;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: bold;
}

.menu-list a:hover {
  background-color: #068a7a;
}

.menu-list a.active {
  background-color: #019386;
  color: white;
  font-weight: bold;
}

.menu-nav .menu-list a .tab-inner {
  font-size: 14px;
}

.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 12px;
  position: fixed;
  z-index: 9991;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}

.modal {
  display: none;
  position: fixed;
  /* cobre a viewport toda */
  inset: 0;
  /* equivale a top/left/right/bottom = 0 */
  z-index: var(--z-modal);
  /* ↑ acima dos preloads (9999) */
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, .5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  /* cria contexto próprio */
  z-index: var(--z-modal-content);
  background-color: #fefefe;
  padding: 20px;
  border-radius: 12px;
  max-width: min(900px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  margin: 20px auto 15px;
}

@keyframes animarModal {
  from {
    top: -300px;
    opacity: 0;
  }

  to {
    top: 0;
    opacity: 1;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

.linha-agendamento {
  background-color: #fff;
  /* Cor de fundo padrão */
  transition: background-color 0.3s ease;
  /* Efeito de transição suave ao passar o mouse */
}

.linha-agendamento td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.btn-modal-detalhamento {
  text-decoration: none;
}

details {
  border: 1px solid #aaa;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

details table {
  width: 100%;
  border-collapse: collapse;
}

/* Só impede quebra na célula das opções */
details table td.options {
  white-space: nowrap;
}

/* Espaçamento entre os radios */
details table input[type="radio"] {
  margin-right: 5px;
  /* espaço entre botão e texto */
  margin-left: 15px;
  /* separação entre opções */
}

/* Remove a margem extra do primeiro radio */
details table td input[type="radio"]:first-child {
  margin-left: 0;
}

summary {
  font-size: 16px;
  /* aumenta o texto */
  font-weight: bold;
  cursor: pointer;
  padding: 5px 0;
}

.foto-section {
  border: 2px solid #ccc;
  padding: 20px;
  border-radius: 12px;
  margin-top: 30px;
  margin-bottom: 30px;
  background-color: #f9f9f9;
}

.foto-section h3 {
  margin-top: 0;
  text-align: center;
  font-size: 1.5em;
  color: #333;
}

.foto-container {
  margin-bottom: 20px;
}

.foto-preview {
  max-width: 200px;
  display: none;
  margin-top: 5px;
  margin-bottom: 5px;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 12px;
  background: white;
}

.foto-view {
  max-width: 100%;
  display: none;
  margin-top: 5px;
  margin-bottom: 5px;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 12px;
  background: white;
}

.foto-crop {
  max-width: 100%;
  margin: 5px;
  border: 1px solid #ccc;
  padding: 5px;
  border-radius: 12px;
  background: white;
}

textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 16px;
  resize: vertical;
}

#observacoes-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #666;
  margin-top: -8px;
  margin-bottom: 10px;
}

#preload-envio {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  /* fundo semi-transparente */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#preload-envio-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  font-family: "Inter", "Segoe UI", sans-serif;
}

#preload-gps {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  /* fundo semi-transparente */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#preload-gps-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  font-family: "Inter", "Segoe UI", sans-serif;
}

#preload-redimensionar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  /* fundo semi-transparente */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#preload-redimensionar-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  font-family: "Inter", "Segoe UI", sans-serif;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #00a195;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d9534f;
  /* Vermelho para "reprovado" */
  transition: 0.4s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: #5cb85c;
  /* Verde para "aprovado" */
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(24px);
}

/* Tooltip opcional (para feedback visual) */
.toggle-switch[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -32px;
  left: 0;
  background-color: #333;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 12px;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1000;
}

.toggle-switch input:disabled+.toggle-slider {
  pointer-events: none;
  background-color: #4caf50;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Corrigido: movimentação mantida mesmo desabilitado e marcado */
.toggle-switch input:checked:disabled+.toggle-slider {
  background-color: #5cb85c !important;
}

.toggle-switch input:checked:disabled+.toggle-slider:before {
  transform: translateX(24px);
}

/* Ajuste quando o toggle estiver mais centralizado (opcional com media query ou JS) */
@media (min-width: 500px) {
  .toggle-switch[data-tooltip]:hover::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Apenas checkboxes da página de vistoria */
.pagina-vistoria .responsive-table input[type="checkbox"] {
  /* estilo desktop */
}

@media (max-width: 1023px) {
  .responsive-table {
    display: none;
  }

  .responsive-table-mobile {
    display: block;
  }
}

@media (min-width: 1024px) {
  .responsive-table {
    display: block;
  }

  .responsive-table-mobile {
    display: none;
  }
}

.nao-conforme-section {
  border: 2px solid #ccc;
  padding: 20px;
  border-radius: 12px;
  margin-top: 30px;
  margin-bottom: 30px;
  background-color: #f9f9f9;
}

.nao-conforme-section h3 {
  margin-top: 0;
  text-align: center;
  font-size: 1.5em;
  color: #333;
}

.nao-conforme-container {
  margin-bottom: 20px;
}

.centralizado {
  align-items: center;
  /* Centraliza verticalmente */
  justify-content: center;
  /* Opcional: centraliza horizontalmente */
}

.resumo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 1.5em;
}

.resumo-card {
  background-color: #f8f9fa;
  border-left: 5px solid #00a195;
  padding: 1em;
  border-radius: 0.5em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
}

.resumo-card h4 {
  margin: 0 0 0.2em 0;
  font-size: 1em;
  color: #333;
}

.resumo-card span {
  font-size: 1.1em;
  font-weight: bold;
  color: #00a195;
}

.btn-top {
  position: fixed;
  bottom: 10px;
  right: 20px;
  background-color: #00a195;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  display: none;
  /* escondido inicialmente */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}

.btn-top:hover {
  background-color: #008575;
}

.btn-girar {
  background-color: #00a195;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
}


.span-icons {
  display: flex;
  gap: 16px;
  /* ajuste o valor conforme necessário */
  font-size: 0;
}

.icon-laudo,
.icon-selo,
.icon-pagamento,
.icon-agendamento,
.icon-vistoriar,
.icon-emissao {
  display: inline-block;
  width: 60px;
  height: 60px;
  background-color: #00a195;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  text-decoration: none;
}

.icon-laudo {
  -webkit-mask-image: url("laudo.svg");
  mask-image: url("laudo.svg");
}

.icon-selo {
  -webkit-mask-image: url("selo.svg");
  mask-image: url("selo.svg");
}

.icon-pagamento {
  -webkit-mask-image: url("pagamento.svg");
  mask-image: url("pagamento.svg");
}

.icon-agendamento {
  -webkit-mask-image: url("agendamento.svg");
  mask-image: url("agendamento.svg");
}

.icon-vistoriar {
  width: 94.3px;
  -webkit-mask-image: url("vistoriar.svg");
  mask-image: url("vistoriar.svg");
}

.icon-emissao {
  -webkit-mask-image: url("emissao.svg");
  mask-image: url("emissao.svg");
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .85em;
  font-weight: 600
}

.status-fechada {
  background: #eef;
  color: #223
}

.status-paga {
  background: #e9f7ef;
  color: #234
}

.status-cancelada {
  background: #fdecea;
  color: #522
}

.actions button {
  width: auto;
  display: inline-block;
  margin-right: .3rem;
  margin-bottom: .3rem
}

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

.modal .responsive-table {
  display: block !important;
  max-height: 65vh;
  overflow: auto;
}

.modal .responsive-table table {
  width: 100%;
  border-collapse: collapse;
}

/* ===== Modal de Laudos (melhorias mobile) ===== */
.modal .modal-table {
  display: block !important;
  max-height: 70vh;
  /* rola dentro do modal */
  overflow: auto;
  border-radius: 10px;
}

/* tabela */
.modal .modal-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  /* permite controlar largura das colunas */
  font-size: 14px;
}

/* cabeçalho fixo */
.modal .modal-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #06a092;
  /* sua cor do cabeçalho */
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 10px 8px;
}

/* células */
.modal .modal-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

/* zebra */
.modal .modal-table tbody tr:nth-child(odd) {
  background: #fafafa;
}

/* larguras e alinhamentos por coluna */
.modal .col-id {
  width: 58px;
  text-align: right;
}

.modal .col-local {
  width: 44%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal .col-placa {
  width: 18%;
  text-align: center;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.modal .col-emissao {
  width: 18%;
  text-align: center;
  white-space: nowrap;
}

.modal .col-mod {
  width: 12%;
  text-align: center;
  white-space: nowrap;
}

/* telas muito estreitas: dá mais espaço ao Local e permite rolar horizontalmente se faltar */
@media (max-width: 420px) {
  .modal .modal-table {
    max-height: 65vh;
  }

  .modal .modal-table table {
    overflow-x: auto;
    display: block;
  }

  .modal .col-local {
    width: 52%;
  }
}

.modal-content {
  max-width: 92vw;
  /* antes 80; dá mais folga */
}

.modal .modal-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  /* <- antes estava fixed; deixa o browser distribuir melhor */
  font-size: 14px;
}

.modal .col-local {
  width: auto;
  /* libera */
  white-space: normal;
  /* pode quebrar */
  overflow: visible;
  text-overflow: clip;
}

.modal .col-placa {
  min-width: 86px;
  /* reserva um pouquinho */
  text-align: center;
  white-space: nowrap;
  /* placa fica inteira */
}

.modal .col-emissao {
  white-space: nowrap;
}

.modal .col-mod {
  white-space: nowrap;
}

@media (max-width: 420px) {

  .modal .modal-table thead th,
  .modal .modal-table td {
    padding: 8px 6px;
    font-size: 13px;
  }
}

/* Utilitários de visibilidade */
.only-mobile {
  display: inherit;
}

.only-desktop {
  display: inherit;
}

@media (max-width: 768px) {
  .only-mobile {
    display: inherit;
  }

  /* mostra no mobile */
  .only-desktop,
  details.only-desktop {
    display: none !important;
    /* esconde no mobile */
  }
}

@media (min-width: 769px) {
  .only-mobile {
    display: none !important;
  }

  /* esconde no desktop */
  .only-desktop {
    display: inherit;
  }

  /* mostra no desktop */
}

.empty-state {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #f6f7f9;
  border: 1px solid #e3e6ea;
  border-radius: 12px;
  padding: 12px 14px;
  color: #445;
  margin: 10px 0 4px;
  font-size: .95rem;
}

.empty-state .material-icons {
  font-size: 20px;
  opacity: .8;
}

/* Desktop: esconder por padrão */
@media (min-width: 769px) {

  .btn-open-laudos,
  .btn-open-laudos-gerar {
    display: none !important;
  }

  /* Desktop: mostrar SOMENTE na aba CONSULTAR */
  #tab-consultar .btn-open-laudos {
    display: inline-block !important;
  }
}

/* Mobile (<=768px): mostrar normalmente em ambas as abas */
@media (max-width: 768px) {

  .btn-open-laudos,
  .btn-open-laudos-gerar {
    display: inline-block !important;
  }
}

.swal2-container {
  z-index: var(--z-swal) !important;
}

.nota {
  border-left: 3px solid #0aa294;
  padding: 8px 10px;
  background: #f8fffe;
}

.mt10 {
  margin-top: 10px
}

.item-extra {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 8px;
  margin-bottom: 6px;
}

.item-extra input {
  padding: 4px;
}

.item-extra button {
  cursor: pointer;
}



.btn-add {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

#extras-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.extra-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.extra-pill {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.extra-pill em {
  opacity: .8;
}

.btn-del {
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
}

.extra-total {
  margin-top: 10px;
}

/* Itens extras: botões não podem herdar o estilo global */
.extra-form .btn-add,
.extra-row .btn-del {
  width: auto !important;
  margin: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Botão adicionar: mantém “cara” do sistema mas sem 100% */
.extra-form .btn-add {
  background-color: #00a195;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.extra-form .btn-add:hover {
  background-color: #008575;
}

/* Botão excluir: pequeno, vermelho e discreto */
.extra-row .btn-del {
  background: #e74c3c !important;
  color: #fff !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
}

.extra-row .btn-del:hover {
  background: #c0392b !important;
}

.extra-negativo {
  border-color: #e74c3c;
  background: #fdecea;
}

.extra-negativo span {
  color: #c0392b;
  font-weight: 600;
}

.mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 8px 0;
}

.mobile-grid .lbl {
  display: block;
  font-size: 0.75rem;
  color: #666;
}

.mobile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* =========================================================
   ITENS EXTRAS — FIX DEFINITIVO (coloque NO FIM do CSS)
   Objetivo:
   - Desktop: grid (4 colunas)
   - Mobile: 1 campo por linha + botão 100%
   ========================================================= */

/* base: mantém o grid no desktop/tablet grande */
.extra-form {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1.2fr 2fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px;
}

/* inputs dentro do extra-form: não estourar */
.extra-form input {
  width: 100%;
  margin-bottom: 6px !important;
  /* evita espaçamento duplicado */
}

/* botão adicionar: não herdar botão 100% global */
.extra-form .btn-add {
  width: auto !important;
  margin: 0 !important;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: none !important;
  transform: none !important;
}

/* ================= MOBILE: 1 campo por linha ================= */
@media (max-width: 768px) {
  .extra-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .extra-form input {
    width: 100% !important;
  }

  .extra-form .btn-add {
    width: 100% !important;
    margin-top: 5px !important;
    font-size: 1rem;
  }
}

/* botão excluir já está ok, mas reforça */
.extra-row .btn-del {
  width: auto !important;
  margin: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}