/* ==============================================================
   WIREFRAME v2 — DETRAN-ES (FIEL ao site real)
   Tokens extraídos de htmls/site.css + es-layout-bs5.css
     - Header gradiente: linear-gradient(to right, #287b99, #0066cc)
     - Footer sólido:    #287b99
     - Navbar:           #0372A2
     - es-color-dark-2:  #007DB3 (azul botões / títulos)
     - es-color-dark-3:  #F06292 (rosa — botão Voltar)
     - es-color-dark-4:  #00796B (verde escuro — ícones)
     - es-bg-adm:        #ECF0F5 (azul clarinho — bg cards)
     - Bootstrap 5.3 + Open Sans + FontAwesome 6 + Bootstrap Icons
   ============================================================== */

:root {
  /* ===== ES Design System (reais) ===== */
  --es-base:        #333333;
  --es-dark-1:      #5C5C5C;  /* cinza */
  --es-dark-2:      #007DB3;  /* azul (primary) */
  --es-dark-3:      #F06292;  /* rosa */
  --es-dark-4:      #00796B;  /* esverdeado */
  --es-light-1:     #FFFFFF;
  --es-light-2:     #f5f5f5;
  --es-light-3:     #FFFDE7;
  --es-light-4:     #E1F5FE;
  --es-light-5:     #FCE4EC;

  --es-header-grad: linear-gradient(to right, #287b99, #0066cc);
  --es-footer:      #287b99;
  --es-navbar:      #0372A2;

  --es-bg-section:  #ECF0F5;  /* digital-es-section-color-base */
  --es-bg-card-hd:  #ECF0F5;

  /* Wireframe-only helpers */
  --wf-line:        #d6dde2;
  --wf-muted:       #6c757d;
  --wf-text:        #212529;
  --wf-success:     #198754;
  --wf-warn:        #ffc107;
  --wf-danger:      #dc3545;
  --wf-radius:      .375rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Open Sans', -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--wf-text);
  background: var(--es-bg-section);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   ANOTAÇÕES DIDÁTICAS DO WIREFRAME
   ============================================================ */
.wf-legend {
  background: #fffbe6;
  border: 1px solid #e0c97a;
  padding: 12px 16px;
  margin: 14px auto;
  max-width: 1320px;
  font-size: 12.5px;
  color: #665;
  line-height: 1.6;
  border-radius: var(--wf-radius);
}
.wf-legend strong { color: #553; }
.wf-legend code {
  background: #f5edc6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
}

.wf-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .5px;
  font-weight: 700;
  text-transform: uppercase;
  background: #d3e9ff;
  color: #14457a;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 8px;
}

.wf-variant-stack > .wf-variant {
  border: 1px dashed #b3c7d4;
  border-radius: 3px;
  padding: 18px 16px 14px;
  margin-bottom: 16px;
  background: #fbfdff;
  position: relative;
}
.wf-variant-stack > .wf-variant::before {
  content: attr(data-variant);
  position: absolute; top: -10px; left: 14px;
  background: #fff; color: #14457a;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  padding: 1px 8px; border: 1px solid #b3c7d4; border-radius: 10px;
  text-transform: uppercase;
}

/* ============================================================
   HEADER (es-header) — gradiente real do site
   ============================================================ */
.es-header {
  background: var(--es-header-grad);
  padding: 0;
  width: 100%;
}
.es-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}
.es-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100px;
  padding: 8px 0;
}
.es-header .sistema-area img {
  max-height: 80px;
  width: auto;
  display: block;
}
.es-header .logo-goves img {
  max-height: 70px;
  width: auto;
  display: block;
}

/* === Hamburger (visível só em mobile) === */
.navbar-toggler {
  display: none;
  background: transparent;
  border: 1.5px solid #fff;
  border-radius: 6px;
  padding: 8px 10px;
  width: 46px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.navbar-toggler span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.navbar-toggler:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   NAVBAR (es-navbar)
   ============================================================ */
.es-navbar {
  background: var(--es-navbar);
  color: #fff;
}
.es-navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}
.es-navbar .nav-list {
  display: flex; gap: 0;
  list-style: none; margin: 0; padding: 0;
}
.es-navbar .nav-list a {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; text-decoration: none;
  padding: 12px 16px;
  font-size: 14px;
}
.es-navbar .nav-list a.active,
.es-navbar .nav-list a:hover { background: rgba(255,255,255,.08); }
.es-nav-end {
  display: flex; align-items: center; gap: 14px;
  color: #fff; font-size: 13.5px;
}
.es-nav-end .user { display: inline-flex; align-items: center; gap: 6px; }
.es-nav-end .btn-sair {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid #fff;
  color: #fff; padding: 5px 12px;
  border-radius: var(--wf-radius);
  font-size: 13px; cursor: pointer;
  text-decoration: none;
}
.es-nav-end .btn-sair:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   SHELL / SECTION
   ============================================================ */
.es-section {
  padding: 24px 0;
}
.shell {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* === Botão voltar (rosa, fa-arrow-circle-left) === */
.botao-voltar {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--es-dark-3);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  margin: 12px 0 14px;
  cursor: pointer;
  background: transparent; border: 0;
  white-space: nowrap;
}
.botao-voltar i {
  font-size: 28px;
  line-height: 1;
  color: var(--es-dark-3);
}
.botao-voltar:hover,
.botao-voltar:hover i,
.botao-voltar:hover span {
  text-decoration: none;
  color: var(--es-dark-3);
  cursor: pointer;
  opacity: .85;
}

/* === Linha "Voltar + Título" — Voltar à esquerda, título centralizado === */
.page-title-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 12px 0 22px;
  padding: 28px 0;
}
.page-title-row .botao-voltar {
  margin: 0;
  justify-self: start;
}
.page-title-row .titulo {
  font-size: 22px;
  font-weight: 700;
  color: var(--es-dark-2);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  grid-column: 2;
}

/* === Page title === */
.es-main-title-2 {
  text-align: center;
  margin: 4px 0 22px;
}
.es-main-title-2 .titulo {
  font-size: 28px;
  font-weight: 700;
  color: var(--es-dark-2);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ============================================================
   CARD (Bootstrap-like)
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  margin-bottom: 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card-feature .card-title-bar {
  background: var(--es-bg-card-hd);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--wf-line);
  border-radius: var(--wf-radius) var(--wf-radius) 0 0;
}
.card-feature .card-title-bar .left {
  display: flex; align-items: center; gap: 14px;
}
.card-feature .card-title-bar .left .ico {
  font-size: 32px;
  color: var(--es-dark-4);
}
/* Dimensão fiel ao site original — ícone do card-title-bar = 35×42 */
.card-feature .card-title-bar .left > i {
  width: 35px;
  height: 42px;
  font-size: 35px;
  line-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-feature .card-title-bar .left .lbl {
  display: flex; flex-direction: column;
}
.card-feature .card-title-bar .left .lbl .top {
  font-size: 16px; font-weight: 600; color: var(--wf-text);
}
.card-feature .card-title-bar .left .lbl .bot {
  font-size: 22px; font-weight: 700; color: var(--es-dark-1);
}
.card-body { padding: 16px 18px; }

/* Accordion: barra de título é clicável para alternar abrir/fechar.
   Quando .is-collapsed: esconde o body, achata o cantinho da barra e
   gira o chevron 180°. */
.card-feature .card-title-bar {
  cursor: pointer;
  user-select: none;
}
.card-feature .card-title-bar:focus-visible {
  outline: 2px solid var(--es-dark-2);
  outline-offset: -2px;
}
.card-feature .card-title-bar i.fa-chevron-up {
  transition: transform .2s ease;
}
.card-feature.is-collapsed .card-title-bar {
  border-bottom: 0;
  border-radius: var(--wf-radius);
}
.card-feature.is-collapsed .card-title-bar i.fa-chevron-up {
  transform: rotate(180deg);
}
.card-feature.is-collapsed .card-body {
  display: none;
}

.card .small-info {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--wf-muted); font-style: italic;
  margin-bottom: 10px;
}
.card .small-info i { color: var(--es-dark-2); }

/* ============================================================
   CARDS DE VEÍCULO (placa estilo Mercosul)
   ============================================================ */
.veiculos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.item-veiculo {
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  padding: 14px 14px 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}
.item-veiculo:hover {
  border-color: var(--es-dark-2);
  box-shadow: 0 4px 14px rgba(0, 125, 179, .12);
}
.item-veiculo .row-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.item-veiculo .icone-veiculo i {
  font-size: 36px;
  color: var(--es-dark-1);
}

/* Placa Mercosul (tarjeta azul + número) */
.placa.estilo-mercosul {
  display: inline-flex;
  flex-direction: column;
  border: 1.5px solid #111;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  min-width: 110px;
}
.placa .tarjeta {
  background: linear-gradient(180deg, #1e4ea8 0%, #163a7e 100%);
  color: #fff;
  font-size: 8px;
  text-align: center;
  padding: 2px 0 1px;
  font-weight: 700;
  letter-spacing: .5px;
}
.placa .tarjeta::after {
  content: "MERCOSUL · BRASIL";
}
.placa .numeracao {
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  padding: 4px 6px 5px;
  letter-spacing: 1.5px;
  color: #111;
  background: #fff;
}

.item-veiculo .marca-modelo {
  font-size: 13px; font-weight: 600; color: var(--wf-text);
  margin-bottom: 2px;
}
.item-veiculo .ano {
  font-size: 12.5px; color: var(--wf-muted);
  margin-bottom: 4px;
}
.item-veiculo .icone-proprietario {
  font-size: 11.5px; font-style: italic; color: var(--es-dark-1);
}
.item-veiculo .icone-chave { color: var(--es-dark-1); margin-right: 4px; }
.item-veiculo .seta-clicavel {
  position: absolute; right: 10px; bottom: 10px;
  color: var(--wf-muted); font-size: 14px;
}

/* === Empty state do hub (sem veículos cadastrados) === */
.empty-veiculos {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px 48px;
  gap: 14px;
}
.empty-veiculos .empty-ico {
  font-size: 64px;
  color: #c2cfd6;
  margin-bottom: 4px;
}
.empty-veiculos .empty-titulo {
  font-size: 22px;
  font-weight: 700;
  color: var(--es-dark-2);
  margin: 0;
  letter-spacing: .2px;
}
.empty-veiculos .empty-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--wf-muted);
  max-width: 440px;
  margin: 0 0 8px;
}
.btn-lg {
  padding: 10px 22px;
  font-size: 15px;
}

/* ============================================================
   BOTÕES (Bootstrap-like, cores reais ES)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--wf-radius);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
}
.btn-primary {
  background: var(--es-dark-2);
  border-color: var(--es-dark-2);
  color: #fff;
}
.btn-primary:hover { background: #006799; border-color: #006799; }
.btn-primary:disabled, .btn-primary.disabled {
  background: #b9c8d3; border-color: #b9c8d3; cursor: not-allowed;
}
.btn-success {
  background: var(--es-dark-4);
  border-color: var(--es-dark-4);
  color: #fff;
}
.btn-success:hover { background: #00665a; border-color: #00665a; }
.btn-danger {
  background: var(--wf-danger);
  border-color: var(--wf-danger);
  color: #fff;
}
.btn-outline-secondary {
  background: transparent;
  border-color: #6c757d;
  color: #6c757d;
}
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }
.btn-close {
  background: transparent; border: 0;
  font-size: 18px; color: var(--wf-muted);
  cursor: pointer; padding: 0; line-height: 1;
}

/* ============================================================
   MODAL (Bootstrap-like)
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 1040;
}
.modal {
  position: relative;
  z-index: 1050;
  margin: 28px auto;
  max-width: 720px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  overflow: hidden;
}
.modal-header {
  background: var(--es-light-2);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--wf-line);
}
.modal-header .modal-title {
  font-size: 16px; font-weight: 700;
  color: var(--wf-text); margin: 0;
}
.modal-body { padding: 24px 22px; }
.modal-footer {
  padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--wf-line);
  gap: 12px; flex-wrap: wrap;
}

/* === Form === */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-row.cols-1 { grid-template-columns: 1fr; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--wf-text);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--wf-danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  font-family: inherit;
  letter-spacing: .5px;
}
.form-control:focus {
  outline: 0;
  border-color: var(--es-dark-2);
  box-shadow: 0 0 0 .2rem rgba(0, 125, 179, .25);
}
.form-control.is-invalid {
  border-color: var(--wf-danger);
  background: #fff5f4;
}
.invalid-feedback {
  display: none;             /* só aparece quando o input vizinho tem .is-invalid */
  font-size: 12px;
  color: var(--wf-danger);
  margin-top: 4px;
}
/* Mostra a mensagem só quando o input correspondente foi marcado is-invalid
   (em qualquer ordem dentro do mesmo .form-group, via combinação de selectors) */
.is-invalid ~ .invalid-feedback,
.form-control.is-invalid + .invalid-feedback {
  display: block;
}
.alert {
  padding: 11px 14px;
  border-radius: var(--wf-radius);
  font-size: 13px;
  margin-top: 14px;
}
.alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}
.alert-warning {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #664d03;
}

/* ============================================================
   CLOUDFLARE TURNSTILE WIDGET (fiel ao original)
   ============================================================ */
.turnstile-widget {
  /* Sempre ocupa o slot — visibility:hidden preserva o espaço,
     evitando que os botões à direita "saltem" quando o widget aparece. */
  display: inline-flex;
  visibility: hidden;
  width: 300px;
  min-height: 65px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px 14px;
  align-items: center;
  gap: 12px;
  font-family: 'Open Sans', -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: #333;
  box-sizing: border-box;
}
.turnstile-widget.is-show { visibility: visible; }

.turnstile-check {
  width: 24px;
  height: 24px;
  border: 1px solid #c1c1c1;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s, border-color .2s;
}

/* Estado: verificando (spinner laranja girando) */
.turnstile-widget.is-verifying .turnstile-check {
  border-color: #f6821f;
  background: #fff;
}
.turnstile-widget.is-verifying .turnstile-check::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid #f6821f;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tns-spin .9s linear infinite;
}
@keyframes tns-spin { to { transform: rotate(360deg); } }

/* Estado: sucesso (check verde) */
.turnstile-widget.is-success .turnstile-check {
  background: #0ab46e;
  border-color: #0ab46e;
}
.turnstile-widget.is-success .turnstile-check::after {
  content: "";
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

/* Estado: erro (X vermelho) */
.turnstile-widget.is-error .turnstile-check {
  background: #d83b01;
  border-color: #d83b01;
}
.turnstile-widget.is-error .turnstile-check::before {
  content: "!";
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.turnstile-label {
  flex: 1;
  font-size: 13.5px;
  color: #333;
  line-height: 1.2;
}
.turnstile-widget.is-success .turnstile-label { color: #444; }

.turnstile-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.turnstile-brand .brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #f6821f;
  letter-spacing: .2px;
  line-height: 1;
}
.turnstile-brand .brand-mark i {
  font-size: 14px;
  color: #f6821f;
}
.turnstile-brand .brand-links {
  font-size: 9.5px;
  color: #999;
  font-weight: 400;
  letter-spacing: .1px;
}
.turnstile-brand .brand-links a {
  color: inherit;
  text-decoration: none;
}
.turnstile-brand .brand-links a:hover { text-decoration: underline; }

/* === Form-check === */
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px;
  margin: 12px 0;
}
.form-check input { width: 16px; height: 16px; }
.form-check label { font-weight: 700; color: var(--wf-text); cursor: pointer; }
.form-check label .req { color: var(--wf-danger); margin-left: 2px; }

/* ============================================================
   TABELA DE DÉBITOS
   ============================================================ */
.dt-select-row {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 0 14px;
  flex-wrap: wrap;
}
.dt-select-row .label-sel {
  font-size: 13px; font-weight: 600; color: var(--wf-text);
}

/* Toolbar nova — seleção em massa + total + emitir, fica no topo do card */
.dt-toolbar {
  display: flex; align-items: center; gap: 14px;
  background: #f7f9fa;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  padding: 12px 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dt-toolbar .label-sel { font-weight: 600; font-size: 13px; color: var(--wf-text); }
.dt-toolbar .form-select { min-width: 280px; }
.dt-toolbar .total-sel { margin-left: auto; }

/* Sub-seção por categoria (Licenciamento · IPVA · Multas) */
.dt-section { margin-top: 18px; }
.dt-section:first-of-type { margin-top: 0; }
.dt-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--es-dark-2);
  padding: 6px 4px 8px;
  border-bottom: 1px dashed var(--wf-line);
  margin-bottom: 4px;
}
.dt-section-head.is-empty { color: var(--wf-muted); font-weight: 600; }
.dt-section-count {
  font-size: 11px; font-weight: 700;
  background: #eef2f6; color: var(--wf-muted);
  padding: 2px 9px; border-radius: 999px;
  letter-spacing: .3px;
}
.dt-section-head.is-empty .dt-section-count { background: transparent; }
.dt-section .empty-cat {
  font-size: 12.5px; color: var(--wf-muted);
  padding: 10px 4px; font-style: italic;
}

.form-select {
  appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237b8a94' d='M6 8 0 0h12z'/></svg>") no-repeat right 10px center;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  padding: 7px 32px 7px 12px;
  font-size: 13.5px;
  color: var(--wf-text);
  min-width: 240px;
  cursor: pointer;
  font-family: inherit;
}
.form-select.is-active { border-color: var(--es-dark-2); color: var(--es-dark-2); font-weight: 600; }
.total-sel { font-size: 13.5px; color: var(--wf-text); margin-left: auto; }
.total-sel b { color: var(--es-dark-2); font-size: 15px; }

.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tabela thead th {
  background: #fafbfc;
  text-align: right;
  padding: 10px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--wf-muted);
  font-weight: 700;
  letter-spacing: .4px;
  border-bottom: 1px solid var(--wf-line);
  white-space: nowrap;
}
.tabela thead th:first-child,
.tabela thead th.text-left { text-align: left; }
.tabela tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef1f3;
  text-align: right;
  vertical-align: middle;
}
.tabela tbody td:first-child,
.tabela tbody td.text-left { text-align: left; }
.tabela tbody tr.linha { cursor: pointer; }
.tabela tbody tr.linha:nth-child(even) { background: #fafbfc; }
.tabela tbody tr.linha.is-checked { background: #e8f4fb; }
.tabela tbody tr.linha.disabled { cursor: not-allowed; opacity: .85; }
.tabela .check { width: 24px; }
.tabela .venc-late { color: var(--wf-danger); font-weight: 600; }
.tabela tfoot td {
  padding: 12px 10px;
  text-align: right;
  font-weight: 700;
  color: var(--es-dark-2);
  border-top: 2px solid var(--wf-line);
  background: #fafbfc;
}

/* === Empty states === */
.empty-ok {
  display: flex; align-items: center; gap: 10px;
  background: #d1e7dd;
  border-left: 4px solid var(--wf-success);
  padding: 12px 16px;
  color: #0f5132;
  font-size: 13.5px;
  border-radius: var(--wf-radius);
}
.empty-ok .ico { color: var(--wf-success); font-size: 18px; }

.alert-pre {
  background: #fff3cd;
  border-left: 4px solid var(--wf-warn);
  padding: 12px 14px;
  font-size: 13px;
  color: #664d03;
  border-radius: var(--wf-radius);
  margin: 4px 0 14px;
  line-height: 1.55;
}
.alert-pre b { color: #533f03; }

/* === Item lista (infrações/multas/recursos) === */
.item-row {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr 1fr auto;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  margin-bottom: 10px;
  background: #fff;
  font-size: 12.5px;
  align-items: center;
}
.item-row .col-label {
  font-size: 10.5px;
  color: var(--wf-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}
.item-row .col-val { font-weight: 600; color: var(--wf-text); }

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-open    { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }
.badge-aceito  { background: #d1e7dd; color: #0f5132; border: 1px solid #a3cfbb; }
.badge-pend    { background: #f8d7da; color: #842029; border: 1px solid #f1aeb5; }

/* === Carimbo CANCELADO === */
.stamp {
  display: inline-block;
  border: 2px solid var(--wf-danger);
  color: var(--wf-danger);
  padding: 6px 14px;
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 14px;
  transform: rotate(-6deg);
  border-radius: 2px;
  text-transform: uppercase;
}
.stamp-info {
  display: inline-block;
  border: 1.5px dashed var(--wf-muted);
  color: var(--wf-muted);
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 2px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* Carimbo "Não tem valor como declaração de Nada Consta" — imagem real
   A PNG original é quadrada (1181×1181) com bastante área transparente.
   Usar object-fit:cover com aspect-ratio achatada recorta para mostrar só
   o conteúdo visível (faixa horizontal central) sem distorcer proporções. */
.nada-consta-stamp {
  display: block;
  width: 240px;
  height: 56px;
  object-fit: cover;
  object-position: center;
  opacity: .85;
}

/* === Grid Dados do Veículo === */
.dados-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
}
.dados-grid .field {
  display: flex; flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #eef1f3;
  padding-bottom: 8px;
}
.dados-grid .field .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--wf-muted);
  font-weight: 700;
}
.dados-grid .field .val {
  font-size: 13.5px;
  color: var(--wf-text);
  font-weight: 600;
}
.dados-grid .field.full { grid-column: 1 / -1; }
.dados-grid .field .val.warn { color: var(--wf-danger); }
.dados-grid .field .val.ok { color: var(--wf-success); }

/* ============================================================
   DUA GERADA (fiel ao htmls/duagerada-atualizada.html)
   ============================================================ */
.dua-container {
  max-width: 700px;
  margin: 24px auto;
  background: #fff;
  /* Borda azul Bootstrap primary (#0d6efd / rgba(13,110,253,1)) — fiel ao oficial */
  border: 2px solid rgba(13, 110, 253, 1);
  border-radius: var(--wf-radius);
  padding: 22px 32px 28px;       /* padding-top dá espaço pro pill straddling */
  text-align: center;
  position: relative;             /* contexto de posicionamento do pill */
}

/* Pill "E-DUA" — colado/centralizado SOBRE a borda azul superior do card,
   reproduz fielmente a técnica do oficial:
     position-absolute + start-50 + translate-middle (transform: translate(-50%,-50%))
   posicionado relativo ao .dua-container (e não ao wrap). */
.dua-pill-wrap {
  position: static;
  height: 0;                      /* não ocupa espaço vertical */
  pointer-events: none;
}
.dua-pill {
  position: absolute;
  top: 0;                         /* topo da padding-box do container, logo abaixo da borda */
  left: 50%;
  transform: translateX(-50%);    /* só centraliza horizontalmente — pill fica COLADO abaixo da borda, sem sobrepô-la */
  /* Mesmo azul Bootstrap primary do oficial (#0d6efd) */
  background: rgba(13, 110, 253, 1) !important;
  color: #fff;
  padding: 2px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  z-index: 2;
  pointer-events: auto;
}

/* Check icon — pequeno e cinza, igual ao .icon do oficial
   Aplicado tanto via .dua-check (legado) quanto via .icon (oficial) */
.dua-check,
.dua-container > i.icon,
.dua-container > .bi.icon {
  color: #6c757d;
  margin: 10px 0 6px;
  display: block;
}

/* Separador horizontal abaixo do botão Download */
.hr-after-btn {
  border: 0;
  border-top: 1px solid var(--wf-line);
  margin: 4px auto 18px;
  max-width: 100%;
  opacity: .9;
}

/* Borda superior fina no wrapper .my-3 dos bancos conveniados — divisor visual */
.dua-container > .my-3 {
  border-top: 1px solid var(--wf-line);
}

/* QR Code — imagem real (URL via api.qrserver.com) */
.qr-img {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
/* Hierarquia semântica fiel ao layout oficial:
     h2 título · h6 número · h4 vencimento · h4 valor (Bootstrap heading scale) */
/* h2 "DUA GERADO COM SUCESSO" — fiel à computed style do oficial */
h2.dua-titulo {
  font-family: 'Open Sans', -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.325rem + .9vw);   /* H2 fluid Bootstrap (~21px → ~33px) */
  font-weight: 500;
  line-height: 1.2;
  --bs-dark-rgb: 33, 37, 41;
  --bs-text-opacity: 1;
  color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
  text-align: center !important;
  margin: 0 0 .5rem;
}
@media (min-width: 1200px) {
  h2.dua-titulo { font-size: 2rem; }   /* Bootstrap fixa em 2rem em ≥xl */
}
/* h6 "DUA Nº ..." — fiel à computed style do oficial
   wrapper: <div class="fw-bold text-dark"> (text-align center, color dark, fw-bold)
   h6: font-size 1rem, font-weight 500, line-height 1.2, margin 0 0 .5rem */
h6.dua-num {
  font-family: 'Open Sans', -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  --bs-dark-rgb: 33, 37, 41;
  --bs-text-opacity: 1;
  color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
  text-align: center !important;
  margin: 0 0 .5rem;
}
/* h4 "Pagamento até..." e h4 "R$ ..." — fiel à computed style oficial:
   wrappers <div class="fw-bold ..."> e <div class="text-dark fw-bold">,
   h4: font-size calc(1.275rem + .3vw) (H4 fluid Bootstrap),
       font-weight 500, line-height 1.2, margin 0 0 .5rem, text-align center */
h4.dua-vencimento,
h4.dua-valor {
  font-family: 'Open Sans', -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(1.275rem + .3vw);     /* H4 fluid Bootstrap (~21px → ~25px) */
  font-weight: 500;
  line-height: 1.2;
  --bs-dark-rgb: 33, 37, 41;
  --bs-text-opacity: 1;
  color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
  text-align: center !important;
  margin: 0 0 .5rem;
}
@media (min-width: 1200px) {
  h4.dua-vencimento, h4.dua-valor { font-size: 1.5rem; }   /* Bootstrap fixa em 1.5rem em ≥xl */
}

/* manter espaçamento extra do wrapper "fw-bold my-3" do oficial entre
   o número da DUA e o vencimento (margin-y: 1rem cada lado) */
h4.dua-vencimento { margin-top: 1rem; }
h4.dua-valor {
  margin: 0 0 22px;
  line-height: 1.25;
}
.dua-section-label {
  font-size: 18px;            /* fs-5 do Bootstrap */
  font-weight: 700;
  color: var(--wf-text);
  margin: 22px 0 14px;
  display: flex; gap: 8px; justify-content: center; align-items: center;
}
.dua-section-label i { color: var(--wf-text); }

.qr-box {
  width: 240px; height: 240px;
  margin: 6px auto 4px;
  border: 1px solid var(--wf-line);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
}

/* Linha "copia-cola" / código de barras */
.copy-row {
  display: flex; gap: 8px; align-items: stretch;
  margin: 14px auto 4px;
  max-width: 640px;
}
/* Funciona tanto como <input> quanto como <div> com <span> dentro
   (estrutura fiel ao oficial: div.border-2.border-primary.text-truncate > span) */
.copy-row .copy-input,
.copy-row .copy-input span {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--wf-text);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-row .copy-input {
  flex: 1;
  padding: 8px 12px;
  /* Mesma borda azul Bootstrap primary do oficial (#0d6efd) */
  border: 2px solid rgba(13, 110, 253, 1);
  border-radius: var(--wf-radius);
  background: #fff;
  min-width: 0;
}
.copy-row .copy-input span { padding: 0; border: 0; }

.copy-btn {
  background: transparent;
  color: #6c757d;
  border: 1px solid #6c757d;
  padding: 0 12px;
  border-radius: .5rem;             /* rounded-3 do Bootstrap */
  cursor: pointer;
  font-size: 18px;
  min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.copy-btn:hover { background: #6c757d; color: #fff; }
.copy-btn.is-copied { background: var(--wf-success); color: #fff; border-color: var(--wf-success); }
.copy-btn.is-copied:hover { background: var(--wf-success); }
.rounded-3 { border-radius: .5rem; }

/* Microcopy abaixo do copia-cola — "Texto copiado…" em verde */
.copy-feedback {
  text-align: left;
  max-width: 640px;
  margin: 4px auto 0;
  color: #0f5132;
  font-size: 13px;
  font-weight: 600;
  padding-left: 4px;
}
.copy-feedback i { margin-right: 4px; }

.linha-digitavel {
  font-size: 16px;
  font-weight: 600;
  color: var(--wf-text);
  letter-spacing: 1px;
  margin: 14px 0;
  text-align: center;
  font-family: ui-monospace, monospace;
}

/* Estrutura "Bancos conveniados" fiel ao oficial:
     div.bancos-section (my-3) > div.bancos-divider (border-top border-dark) > p.bancos-titulo (fs-4) */
.bancos-section {
  margin: 18px 0 12px;
}
.bancos-divider {
  border-top: 1px solid #212529;        /* border-top border-dark do Bootstrap */
}
.bancos-titulo {
  font-size: 24px;                       /* fs-4 do Bootstrap (1.5rem) */
  font-weight: 700;
  color: var(--wf-text);
  text-align: center;
  margin: 16px 0;
}

/* Imagem de bancos (estrutura fiel ao oficial: <img class="bancos-conveniados img-fluid">) */
.bancos-conveniados {
  display: block;
  margin: 8px auto 0;
}
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Botão "Download DUA" — link <a id="btnPrint" class="btn btn-primary">
   estilizado como btn-primary do Bootstrap com cor ES (#007DB3) */
#btnPrint {
  display: inline-block;
  text-align: center;
}
.my-4 {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Compatibilidade legada (caso classes antigas ainda apareçam) */
.divider-bancos { border: 0; border-top: 1px solid #212529; margin: 18px 0 0; }
.bancos-logos { display: flex; justify-content: center; align-items: center; margin-top: 8px; }
.bancos-conveniados-img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* ============================================================
   FOOTER (es-footer)
   ============================================================ */
.es-footer {
  background: var(--es-footer);
  color: #fff;
  padding: 28px 0;
  margin-top: auto;
}
.es-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.es-footer-col {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  text-align: center;
  flex: 1; min-width: 200px;
}
.es-footer-col img { max-height: 80px; width: auto; opacity: .98; }
.es-footer-col .lbl-prodest {
  font-size: 12px; color: rgba(255,255,255,.85);
}

/* ============================================================
   LOADER (overlay azul)
   ============================================================ */
.loader-container {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(32, 115, 169, .6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.loader-container.is-show { display: flex; }
.spinner-border {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wf-spin .8s linear infinite;
}
@keyframes wf-spin { to { transform: rotate(360deg); } }

/* ============================================================
   HELPERS (utilitários Bootstrap-like)
   ============================================================ */
.muted { color: var(--wf-muted); }
.text-center { text-align: center; }

/* Empty state centralizado dos cards secundários */
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
/* Zera margens nativas do <p> dentro do empty state — sem isso o
   margin-top default do navegador empurra o texto pra baixo e ele
   parece "desencontrado" do ícone, mesmo com align-items:center. */
.empty-state-icon + p,
.empty-state-icon ~ p {
  margin: 0;
  line-height: 1.2;
}
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.flex-row { display: flex; gap: 10px; align-items: center; }

/* Display + flex helpers (Bootstrap-like) */
.d-inline-flex { display: inline-flex; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }

/* Spacing */
.gap-2 { gap: .5rem; }
.gap-3 { gap: 1rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.me-2 { margin-right: .5rem; }
.me-3 { margin-right: 1rem; }
.ms-2 { margin-left: .5rem; }
.ms-3 { margin-left: 1rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* Tipografia (font-size escala Bootstrap-like) */
.fs-1 { font-size: 2.5rem; line-height: 1; }
.fs-2 { font-size: 2rem;   line-height: 1.1; }
.fs-3 { font-size: 1.75rem; line-height: 1.15; }
.fs-4 { font-size: 1.5rem;  line-height: 1.2; }
.fs-5 { font-size: 1.25rem; line-height: 1.25; }
.fs-6 { font-size: 1rem;    line-height: 1.4; }
.fw-semibold { font-weight: 600; }
.fw-bold     { font-weight: 700; }

/* Cores de texto (Bootstrap-like, mapeadas pro design system ES) */
.text-success { color: var(--es-dark-4) !important; }
.text-muted   { color: var(--wf-muted)  !important; }
.text-danger  { color: var(--wf-danger) !important; }
.text-primary { color: var(--es-dark-2) !important; }

/* Ícone com leve "negrito" (do site original — busca.html .icone-negrito) */
.icone-negrito { -webkit-text-stroke: .2px; }

/* Print-friendly */
@media print {
  .wf-legend, .wf-tag, .wf-variant-stack > .wf-variant::before { display: none !important; }
  .wf-variant-stack > .wf-variant { border: 0; padding: 0; background: transparent; }
  body { background: #fff; }
}

/* ============================================================
   RESPONSIVO MOBILE (≤ 768px) — fiel às capturas em interfaces/mobile/
   ============================================================ */
@media (max-width: 768px) {

  /* === Header compacto: logo pequena + hamburger; brasão escondido === */
  .es-header { background: var(--es-header-grad); }
  /* Container com respiro lateral mais generoso no mobile (era 16px) */
  .es-container { padding-left: 16px; padding-right: 16px; }
  /* Header-row com padding lateral próprio para o hamburger não colar na borda */
  .es-header-row {
    min-height: 64px;
    padding: 8px 12px;            /* 12px lateral extra além dos 16px do container */
    flex-wrap: nowrap;
    gap: 12px;
  }
  .es-header .sistema-area img { max-height: 40px; }
  .es-header .logo-goves { display: none; }
  .navbar-toggler {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 4px;            /* respiro adicional na borda direita */
  }

  /* === Navbar (Site DETRAN ES) escondida no mobile (atrás do hamburger) === */
  .es-navbar { display: none; }

  /* === Page title row: título centralizado ocupando linha cheia,
         Voltar embaixo à esquerda (rosa, redondo, igual à captura) === */
  .page-title-row {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 6px;
    margin: 14px 0 14px;
    padding: 0 4px;
  }
  .page-title-row .botao-voltar {
    order: 2;
    align-self: flex-start;
    font-size: 0;            /* esconde o texto "Voltar" */
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--es-dark-3);
    color: #fff;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .page-title-row .botao-voltar i {
    font-size: 22px;
    color: #fff;
    line-height: 1;
  }
  .page-title-row .titulo {
    order: 1;
    font-size: 17px;
    width: 100%;
    text-align: center;
    line-height: 1.3;
    grid-column: auto;
  }

  /* Quando tela tiver título solto (sem .page-title-row) */
  .es-main-title-2 .titulo { font-size: 20px; }

  /* === Shell mais estreito === */
  .shell { padding: 0 12px 32px; }
  .es-section { padding: 14px 0; }

  /* === Card-feature title bar mais compacto === */
  .card-feature .card-title-bar { padding: 10px 14px; }
  .card-feature .card-title-bar .left { gap: 10px; }
  .card-feature .card-title-bar .left > i {
    width: 26px; height: 30px;
    font-size: 24px;
    line-height: 30px;
  }
  .card-feature .card-title-bar .left .lbl .top { font-size: 15px; }
  .card-body { padding: 14px; }

  /* === Dados do Veículo: 1 coluna, label em cima do valor === */
  .dados-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .dados-grid .field {
    border-bottom: 1px solid #eef1f3;
    padding: 8px 0;
    gap: 1px;
  }
  .dados-grid .field .lbl {
    font-size: 12px;
    color: var(--wf-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
  }
  .dados-grid .field .val { font-size: 15px; font-weight: 700; }
  .dados-grid .field.full,
  .dados-grid .field[style*="grid-column"] { grid-column: 1 !important; }

  .nada-consta-stamp { max-width: 240px; margin: 12px auto 0; }
  .stamp { transform: rotate(-4deg); font-size: 12px; padding: 4px 10px; }

  /* === Tabela de débitos vira lista de "cards" empilhados === */
  .tabela thead { display: none; }
  .tabela tbody, .tabela tfoot { display: block; }
  .tabela tbody tr.linha {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--wf-line);
    background: transparent !important;
  }
  .tabela tbody tr.linha.is-checked { background: #e8f4fb !important; }
  .tabela tbody td {
    display: block;
    padding: 1px 0;
    border: 0;
    text-align: left;
    font-size: 13.5px;
  }
  .tabela tbody td.check {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    width: auto;
  }
  /* Linha 1: checkbox + descrição lado a lado */
  .tabela tbody tr.linha td.check + td.text-left {
    display: inline;
    font-weight: 600;
  }
  /* Linha 2: vencimento com label "Vencimento:" */
  .tabela tbody tr.linha td:nth-child(3)::before {
    content: "Vencimento: ";
    font-weight: 600;
    color: var(--wf-text);
  }
  .tabela tbody tr.linha td:nth-child(3) {
    font-weight: 600;
    margin-top: 4px;
  }
  /* Última coluna (Atual) em destaque */
  .tabela tbody tr.linha td:last-child {
    font-size: 15px;
    font-weight: 700;
    color: var(--es-dark-2);
    margin-top: 4px;
  }
  .tabela tfoot tr { display: block; }
  .tabela tfoot td {
    display: block;
    text-align: right;
    padding: 12px 6px;
    border-top: 2px solid var(--wf-line);
  }

  /* === dt-select-row empilha === */
  .dt-select-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .dt-select-row .label-sel { text-align: center; }
  .form-select { min-width: 0; width: 100%; font-size: 15px; padding: 10px 32px 10px 12px; }
  .total-sel { margin-left: 0; text-align: right; }
  .dt-select-row .btn { width: 100%; justify-content: center; }

  /* === Item-row (infrações/multas/recursos) já era 1col, ajustar === */
  .item-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  .item-row > div:last-child { display: flex; justify-content: flex-start; }

  /* === Form (modal) === */
  .form-row { grid-template-columns: 1fr; }

  /* === Modal full-screen === */
  .modal {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    min-height: 100vh;
    box-shadow: none;
  }
  .modal-header { padding: 14px 16px; }
  .modal-header .modal-title { font-size: 15px; }
  .modal-body { padding: 16px; }
  .modal-footer {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .modal-footer .turnstile-widget {
    width: 100%;
    max-width: 100%;
    align-self: center;
  }
  .modal-footer .flex-row {
    width: 100%;
    justify-content: stretch;
  }
  .modal-footer .flex-row .btn {
    flex: 1;
    justify-content: center;
  }
  /* Backdrop simulado das variantes vira full-bleed */
  .wf-variant > div[style*="rgba(0,0,0"] {
    padding: 0 !important;
    background: transparent !important;
  }

  /* === wf-variant-stack: variants ocupam tela cheia === */
  .wf-variant {
    padding: 18px 8px 8px;
    margin-bottom: 18px;
  }
  .wf-variant::before {
    font-size: 9.5px;
    max-width: calc(100% - 28px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* === DUA gerada — mobile (padrão alinhado à pág. 02) === */
  .dua-pill { font-size: 10px; padding: 3px 12px; }
  .dua-container {
    padding: 24px 14px 18px;
    margin: 6px auto 18px;
    max-width: 100%;
    border-width: 1.5px;
  }
  .dua-check { font-size: 44px; margin: 8px 0 4px; }
  h2.dua-titulo  { font-size: 19px; margin: 4px 0 8px; }
  h6.dua-num     { font-size: 13px; margin: 0 0 12px; }
  h4.dua-vencimento { font-size: 17px; margin: 12px 0 6px; }
  h4.dua-valor   { font-size: 20px; margin-bottom: 14px; }
  .dua-section-label { font-size: 14px; line-height: 1.35; padding: 0 8px; margin: 16px 0 12px; }
  .qr-box { width: 200px; height: 200px; padding: 6px; }
  .qr-box svg { width: 180px !important; height: 180px !important; }
  .copy-row { max-width: 100%; gap: 6px; margin: 12px 0 4px; }
  .copy-row .copy-input,
  .copy-row .copy-input span { font-size: 11px; }
  .copy-row .copy-input { padding: 8px 10px; border-width: 1.5px; }
  .copy-btn { min-width: 40px; font-size: 16px; }
  .copy-feedback { font-size: 12px; }
  .bancos-section { margin: 14px 0 8px; }
  .bancos-titulo { font-size: 18px; margin: 12px 0; }
  .dua-container .btn { width: 100%; justify-content: center; }
  .wf-tag { font-size: 9.5px; padding: 2px 6px; }

  /* === Empty state do hub === */
  .empty-veiculos { padding: 36px 12px 32px; gap: 10px; }
  .empty-veiculos .empty-ico { font-size: 52px; }
  .empty-veiculos .empty-titulo { font-size: 18px; }
  .empty-veiculos .empty-desc { font-size: 13px; }
  .btn-lg { padding: 10px 18px; font-size: 14px; width: 100%; justify-content: center; }

  /* === Footer empilhado === */
  .es-footer { padding: 22px 0; }
  .es-footer-row { flex-direction: column; gap: 18px; }
  .es-footer-col { min-width: 0; width: 100%; }
  .es-footer-col img { max-height: 60px; }

  /* === Legenda (wireframe) === */
  .wf-legend { font-size: 12px; padding: 10px 14px; margin: 12px 0; }
}

/* ============================================================
   BREAKPOINT XS (≤ 480px) — ajustes adicionais para celulares pequenos
   ============================================================ */
@media (max-width: 480px) {
  .page-title-row .titulo { font-size: 15px; }
  .qr-box { width: 180px; height: 180px; }
  .qr-box svg { width: 160px !important; height: 160px !important; }
  .dua-container { padding: 20px 12px 16px; }
  .es-header .sistema-area img { max-height: 34px; }
  .navbar-toggler { width: 40px; height: 36px; padding: 6px 8px; }
}
