:root{--nav:#173858;--nav2:#234d78;--green:#14a77d;--green2:#dff6ef;--bg:#f3f6fa;--text:#102239;--muted:#68788b;--line:#dbe3ec;--danger:#b42318;--warn:#946200;--card:#fff}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer}
.top{background:linear-gradient(110deg,var(--nav),var(--nav2));color:#fff;display:flex;justify-content:space-between;align-items:center;padding:18px 4vw}.brand{display:flex;align-items:center;gap:14px}.brand b{display:block}.brand small{display:block;opacity:.82;margin-top:2px}.number{font-weight:900;font-size:1.35rem;background:#fff;color:var(--nav);padding:8px 11px;border-radius:12px}.ver{font-size:.8rem;opacity:.86}
nav{background:#fff;border-bottom:1px solid var(--line);padding:11px 4vw;display:flex;gap:8px;overflow:auto}.nav{border:0;background:transparent;color:var(--muted);padding:10px 14px;border-radius:9px;white-space:nowrap}.nav.active{background:var(--green2);color:#087052;font-weight:800}
main{max-width:1400px;margin:auto;padding:28px 4vw 55px}.view{display:none}.view.active{display:block}.headline{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:22px}.headline h1{margin:4px 0;font-size:clamp(1.8rem,3vw,2.5rem)}.headline p{margin:.3em 0;color:var(--muted)}.eyebrow{font-size:.72rem;letter-spacing:.13em;font-weight:900;color:var(--green)}
.primary,.secondary,.danger{border:0;border-radius:10px;padding:11px 16px;font-weight:800}.primary{background:var(--green);color:#fff}.secondary{background:#fff;color:var(--nav);border:1px solid var(--line)}.danger{background:#fff1f0;color:var(--danger);border:1px solid #ffd0cb}.full{width:100%;padding:14px}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.cards.compact{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.card,.panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 28px rgba(20,45,75,.07)}.card{padding:18px}.card span{color:var(--muted);font-size:.83rem}.card strong{display:block;font-size:1.55rem;margin-top:7px}.panel{padding:19px;margin-bottom:18px}.cols{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.panel-title small{color:var(--muted)}.link{border:0;background:transparent;color:var(--green);font-weight:800}
.table{overflow:auto}table{border-collapse:collapse;width:100%;min-width:760px}th,td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:.86rem}th{font-size:.73rem;color:var(--muted);text-transform:uppercase}
.step{display:flex;gap:15px}.stepno{min-width:34px;height:34px;border-radius:50%;background:var(--nav);color:#fff;display:grid;place-items:center;font-weight:900}.grow{width:100%}.step h2{margin:4px 0 7px}
.upload{display:flex;flex-direction:column;align-items:center;text-align:center;border:2px dashed #b9c6d4;border-radius:15px;padding:27px;background:#f9fbfd;margin-top:12px}.upload:hover{border-color:var(--green)}.upload input{display:none}.upload span{font-size:2rem}.upload small,.hint{color:var(--muted)}
.preview{margin-top:12px;display:flex;justify-content:center}.preview img{max-width:360px;max-height:420px;border-radius:10px;border:1px solid var(--line);object-fit:contain}.pdfbox{padding:20px;background:#f1f5f9;border-radius:10px}.hidden{display:none!important}
.ocr{margin-top:12px}.progress{height:9px;background:#e8eef4;border-radius:99px;overflow:hidden}.progress div{height:100%;width:0;background:var(--green);transition:width .2s}.ocrline{display:flex;justify-content:space-between;margin-top:7px;font-size:.82rem;color:var(--muted)}
.notice,.rule,.validation,.warning{padding:11px 13px;border-radius:9px;margin-top:11px}.notice{background:#edf5fb;color:#265678}.notice.ok{background:#e8f8f2;color:#087052}.notice.warn{background:#fff6de;color:#8a5b00}.rule{background:#f5f7fa;border-left:4px solid var(--nav)}.warning{background:#fff6de;color:#8a5b00;border:1px solid #ffe1a1}.validation{background:#f6f7f9;color:var(--muted)}.validation.ok{background:#e8f8f2;color:#087052}.validation.bad{background:#fff0ee;color:#a7352d}.meta{background:var(--green2);color:#087052;padding:10px 12px;border-radius:9px;margin-top:9px;font-weight:700}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px;margin-top:15px}.grid label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;font-weight:700}.grid .wide{grid-column:span 2}input,select{width:100%;padding:10px 11px;border:1px solid #cad5e1;border-radius:9px;background:#fff;color:var(--text);outline:none}input:focus,select:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(20,167,125,.12)}
.bars{min-height:150px;display:flex;flex-direction:column;gap:10px}.bars.empty{display:grid;place-items:center;color:var(--muted)}.bar{display:grid;grid-template-columns:115px 1fr 90px;gap:9px;align-items:center;font-size:.8rem}.track{height:10px;background:#edf1f5;border-radius:99px;overflow:hidden}.fill{height:100%;background:linear-gradient(90deg,var(--green),#46c8a2);border-radius:99px}.value{text-align:right;font-weight:800}
.filters{display:flex;gap:10px;margin-bottom:13px}.filters input{flex:1}.search{min-width:250px}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#edf3f8;color:var(--nav);font-size:.73rem;font-weight:800}
footer{display:flex;justify-content:space-between;gap:12px;padding:20px 4vw;background:#fff;border-top:1px solid var(--line);color:var(--muted);font-size:.76rem}
@media(max-width:880px){.cards{grid-template-columns:repeat(2,1fr)}.cols{grid-template-columns:1fr}}@media(max-width:620px){.ver{display:none}.headline{align-items:stretch;flex-direction:column}.grid{grid-template-columns:1fr}.grid .wide{grid-column:auto}.filters{flex-direction:column}.search{min-width:0}.preview img{max-width:100%}.cards{grid-template-columns:1fr 1fr}footer{flex-direction:column}}
.dupbox{margin-top:11px;padding:14px 16px;border-radius:10px;background:#fff0ee;color:#8f1f17;border:2px solid #f1a8a0;font-weight:650;line-height:1.45}.dupbox b{color:#7a160f}.dup-override{margin-top:10px;padding:12px 14px;border:1px solid #ffd0cb;background:#fff8f7;border-radius:10px}.dup-override .danger{margin-bottom:10px}.dup-reason-label{display:block;font-size:.82rem;font-weight:800;margin:4px 0 6px}.dup-override small{display:block;color:var(--muted);margin-top:6px}.primary:disabled{background:#9eb7ae;cursor:not-allowed;opacity:.78}

.ocr-debug{margin-top:12px;padding:12px 14px;border:1px solid #d6dee8;border-radius:12px;background:#fff}
.ocr-debug summary{cursor:pointer;color:#173b63}
#ocrRawText{width:100%;min-height:230px;margin-top:10px;padding:10px;border:1px solid #cbd5e1;border-radius:8px;font-family:Consolas,monospace;font-size:12px;white-space:pre;resize:vertical}

.d1-status{display:inline-block;margin-top:8px;padding:6px 10px;border-radius:999px;font-size:.76rem;font-weight:800}
.d1-status.loading{background:#fff6de;color:#8a5b00}
.d1-status.ok{background:#e8f8f2;color:#087052}
.d1-status.error{background:#fff0ee;color:#a7352d}

/* V3.18: status de sincronização explícito */

.receipt-link{
  display:inline-flex;align-items:center;justify-content:center;
  padding:7px 11px;border-radius:8px;
  background:#e8f8f2;color:#087052;font-weight:800;
  text-decoration:none;white-space:nowrap
}
.receipt-link:hover{text-decoration:underline}
.receipt-pending,.receipt-missing{font-size:.82rem;color:#6b7280}

.ai-result{margin-top:12px;padding:12px 14px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;color:#18324d}
.ai-title{font-size:1rem;margin-bottom:5px}.ai-summary{margin-bottom:8px}
.ai-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.ai-chip{font-size:.78rem;padding:5px 8px;border-radius:999px;border:1px solid transparent}
.ai-high{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.ai-medium{background:#fef3c7;color:#92400e;border-color:#fde68a}
.ai-low{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.ai-ok{color:#047857}.ai-warn{color:#a16207}.ai-bad{color:#b91c1c}
.ai-alerts{margin-top:7px;color:#8a3a16}.ai-usage{margin-top:8px;font-size:.78rem;color:#64748b}
.ai-fallback{background:#fff7ed;border-color:#fdba74}


/* V4.0 — Leitor Inteligente / integração controlada */
.v4-read-metrics{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.v4-read-metrics span{background:#eef3fb;border:1px solid #cbd7e8;border-radius:999px;padding:7px 10px;font-size:12px}
.v4-lock-summary{margin-top:12px;padding:12px 14px;border-radius:12px;border:1px solid #cbd5e1;background:#f8fafc;line-height:1.55}
.v4-lock-summary.v4-green{background:#effaf2;border-color:#9fd5ad;color:#135b2b}
.v4-lock-summary.v4-yellow{background:#fff8e8;border-color:#e7c36e;color:#805a00}
.v4-lock-summary.v4-red{background:#fff0ef;border-color:#eda9a3;color:#9f2119}
.v4-prepare{margin-top:14px;padding:14px;border-radius:12px;border:1px solid #a7d7b2;background:#f1fbf4}
.v4-prepared-title{font-weight:900;color:#176b31;margin-bottom:8px}
.v4-prepare pre{max-height:360px;overflow:auto;background:#0d1526;color:#e6edf7;padding:12px;border-radius:10px;white-space:pre-wrap;word-break:break-word}


/* V4.0.3 — litros por combustível e filtro automático por tipo */
.fuel-liters-card{min-height:118px}
.fuel-liters-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.fuel-liter-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:5px 0;border-top:1px solid rgba(17,47,82,.10)}
.fuel-liter-row:first-child{border-top:0}
.fuel-liter-row span{font-size:12px;line-height:1.25}
.fuel-liter-row strong{font-size:17px;white-space:nowrap}

.vehicle-type-card{appearance:none;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;border:1px solid var(--line);background:var(--card);transition:.15s ease}
.vehicle-type-card:hover{transform:translateY(-1px);border-color:#8aa7c7;box-shadow:0 3px 10px rgba(17,47,82,.08)}
.vehicle-type-card.active-type{outline:3px solid rgba(24,92,154,.16);border-color:#185c9a;background:#eef6ff}
.vehicle-search-box{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.vehicle-search-box .search{min-width:240px}
.compact-btn{padding:10px 13px}
.vehicle-filter-status{margin:-4px 0 12px;padding:9px 12px;border-radius:10px;background:#f3f7fb;color:#35506c;font-size:13px;border:1px solid #d9e3ee}

/* V4.0.4 — telemetria técnica recolhida */
.telemetry-admin{margin-top:12px;border:1px solid #d8e1eb;border-radius:12px;background:#f8fafc;padding:10px 12px}
.telemetry-admin summary{cursor:pointer;font-weight:700;color:#334155;user-select:none}
.telemetry-admin[open] summary{margin-bottom:8px}
.telemetry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px 14px}
.telemetry-grid span{font-size:.88rem;color:#475569;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px}
.telemetry-grid span.wide{grid-column:1/-1}


/* V4.1.2 — filtros analíticos e linhas clicáveis */
.dashboard-filter-tools{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:0 0 12px}
.dashboard-filter-tools .vehicle-filter-status{flex:1;margin:0}
.fuel-liter-row.dashboard-filter-item{width:100%;border:0;background:transparent;padding:7px 0;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;color:inherit;border-bottom:1px solid #e5ebf1;font:inherit}
.fuel-liter-row.dashboard-filter-item:last-child{border-bottom:0}
.fuel-liter-row.dashboard-filter-item:hover,.dashboard-bar:hover{filter:brightness(.98)}
.fuel-liter-row strong em{font-style:normal;color:#345;white-space:nowrap;margin-left:5px}
.dashboard-bar{width:100%;border:0;background:transparent;padding:0;margin:0;display:grid;grid-template-columns:minmax(105px,1.05fr) minmax(120px,2fr) minmax(86px,.7fr);gap:10px;align-items:center;text-align:left;color:inherit;font:inherit;cursor:pointer}
.dashboard-bar.active-filter,.fuel-liter-row.active-filter{outline:2px solid #1a8f76;outline-offset:2px;border-radius:8px}
.dashboard-bar .track{width:100%}
.dashboard-bar .value{text-align:right}
@media(max-width:760px){.dashboard-filter-tools{align-items:stretch;flex-direction:column}.dashboard-bar{grid-template-columns:minmax(90px,1fr) minmax(90px,1.4fr) minmax(78px,.7fr)}}

/* ==========================================================
   V4.1.3 — RESPONSIVIDADE MULTIDISPOSITIVO
   Exclusivamente visual: não altera regras, dados ou integrações.
   ========================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0;overflow-x:hidden}
img,svg,video,canvas{max-width:100%;height:auto}
button,input,select{max-width:100%}
.table{width:100%;max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.table::after{content:"";display:block;height:1px}
.panel,.card,.grow,.headline>*,.cols>*{min-width:0}

/* Notebook / tablet horizontal */
@media (max-width:1180px){
  main{padding:24px 3vw 48px}
  .top,nav,footer{padding-left:3vw;padding-right:3vw}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cards.compact{grid-template-columns:repeat(3,minmax(0,1fr))}
  .bar{grid-template-columns:minmax(100px,1fr) minmax(130px,2fr) minmax(82px,.7fr)}
  table{min-width:840px}
}

/* Tablet vertical */
@media (max-width:900px){
  .top{padding-top:14px;padding-bottom:14px;gap:12px}
  .brand{min-width:0}.brand>div{min-width:0}.brand b{line-height:1.15}.brand small{line-height:1.2}
  .ver{max-width:42%;text-align:right;line-height:1.25}
  nav{position:sticky;top:0;z-index:20;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  nav::-webkit-scrollbar{display:none}
  .nav{min-height:44px;padding:10px 15px}
  main{padding:22px 18px 44px}
  .headline{align-items:flex-start}
  .headline>div:last-child{max-width:100%}
  .cols{grid-template-columns:1fr}
  .cards.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .panel{padding:17px}
  .step{gap:12px}
  .preview img{max-width:min(100%,520px);max-height:56vh}
  .vehicle-search-box{width:100%;justify-content:flex-start}
  .vehicle-search-box .search{flex:1;min-width:220px}
  .dashboard-filter-tools{align-items:stretch;flex-direction:column}
  table{min-width:900px}
  #vehicles table{min-width:820px}
  #history table{min-width:1080px}
  #dashboard .panel table{min-width:860px}
}

/* Celular grande / tablet pequeno */
@media (max-width:680px){
  .top{flex-direction:column;align-items:flex-start;padding:12px 14px}
  .brand{width:100%;gap:10px}
  .number{font-size:1.05rem;padding:7px 9px;border-radius:10px}
  .brand b{font-size:.96rem}.brand small{font-size:.75rem}
  .ver{display:block;max-width:100%;text-align:left;font-size:.7rem}
  nav{padding:7px 10px;gap:5px}
  .nav{padding:9px 11px;font-size:.9rem}
  main{padding:17px 12px 34px}
  .headline{margin-bottom:16px;gap:12px;flex-direction:column;align-items:stretch}
  .headline h1{font-size:1.75rem;line-height:1.05}
  .headline p{font-size:.9rem;line-height:1.4}
  .headline button,.headline .primary,.headline .secondary,.headline .danger{width:100%;min-height:46px}
  .cards,.cards.compact{grid-template-columns:1fr}
  .card{padding:15px;border-radius:14px}.card strong{font-size:1.4rem}
  .panel{padding:14px;border-radius:14px;margin-bottom:14px}
  .panel-title{gap:8px;align-items:flex-start}.panel-title small{font-size:.72rem;text-align:right}
  .step{flex-direction:column;gap:8px}
  .stepno{min-width:32px;width:32px;height:32px}
  .step h2{font-size:1.28rem;margin-top:0}
  .upload{padding:22px 12px;min-height:150px;justify-content:center}
  .upload span{font-size:1.75rem}.upload b{font-size:.95rem}.upload small,.helper{font-size:.78rem}
  .preview img{width:auto;max-width:100%;max-height:52vh}
  .ocrline{font-size:.78rem}
  .grid{grid-template-columns:1fr;gap:11px}.grid .wide{grid-column:auto}
  .grid label{font-size:.8rem}
  input,select{font-size:16px;min-height:46px;padding:11px 12px}
  button,.primary,.secondary,.danger,.link{min-height:44px}
  .full{min-height:50px;padding:13px 12px}
  .filters{flex-direction:column;gap:8px}.filters input,.filters select{width:100%}
  .search,.vehicle-search-box .search{min-width:0;width:100%}
  .vehicle-search-box{display:grid;grid-template-columns:1fr;width:100%}
  .vehicle-search-box button{width:100%}
  .vehicle-filter-status{font-size:.78rem;line-height:1.35;margin-bottom:10px}
  .fuel-liter-row{align-items:flex-start}.fuel-liter-row strong{text-align:right;font-size:15px}
  .fuel-liter-row strong em{display:block;margin:2px 0 0;font-size:.78rem}
  .dashboard-bar{grid-template-columns:minmax(82px,1fr) minmax(72px,1.1fr) minmax(76px,.8fr);gap:7px;font-size:.74rem}
  .bars{min-height:100px}.bar{grid-template-columns:85px 1fr 76px;gap:7px;font-size:.75rem}
  .telemetry-admin{padding:10px}.v4-read-metrics{gap:7px}.v4-read-metrics span{width:100%}
  .telemetry-grid{grid-template-columns:1fr}
  .v4-prepare pre{font-size:.72rem;max-height:260px}
  .receipt-link{min-height:40px;padding:8px 10px}
  footer{padding:16px 12px;flex-direction:column;font-size:.7rem}

  /* Em telas estreitas, tabelas permanecem legíveis por rolagem horizontal. */
  .table{margin-left:-2px;margin-right:-2px;padding-bottom:6px;border-radius:10px;scrollbar-width:thin}
  table{font-size:.82rem}
  th,td{padding:10px 9px;white-space:nowrap}
  td:nth-child(4){white-space:normal;min-width:180px}
  #vehicles table{min-width:800px}
  #history table{min-width:1080px}
  #dashboard .panel table{min-width:820px}
}

/* Celular compacto */
@media (max-width:430px){
  .top{padding:10px 11px}
  .number{font-size:1rem}
  nav{padding-left:7px;padding-right:7px}
  .nav{font-size:.84rem;padding:8px 9px}
  main{padding:14px 9px 30px}
  .headline h1{font-size:1.58rem}
  .eyebrow{font-size:.66rem}
  .card,.panel{border-radius:12px}
  .card{padding:13px}.card span{font-size:.78rem}.card strong{font-size:1.3rem}
  .panel{padding:12px}
  .step h2{font-size:1.18rem}
  .notice,.rule,.validation,.warning,.dupbox,.v4-lock-summary,.v4-prepare{font-size:.84rem;line-height:1.42}
  .dashboard-bar{grid-template-columns:minmax(75px,1fr) minmax(60px,.9fr) minmax(72px,.8fr);gap:5px}
  .dashboard-bar .value{font-size:.72rem}
  .track{height:8px}
  .fuel-liter-row.dashboard-filter-item{gap:8px}
  .fuel-liter-row.dashboard-filter-item span{max-width:45%}
  .fuel-liter-row.dashboard-filter-item strong{font-size:14px}
}

/* Toque: evita depender de hover e oferece alvos confortáveis. */
@media (hover:none) and (pointer:coarse){
  button,.nav,.receipt-link,.vehicle-type-card,.dashboard-bar,.dashboard-filter-item{touch-action:manipulation}
  .vehicle-type-card:hover,.dashboard-bar:hover,.fuel-liter-row.dashboard-filter-item:hover{transform:none;filter:none}
}


/* ==========================================================
   V4.1.3A — CORREÇÃO MOBILE DE DUAS ÁREAS DO DASHBOARD
   Exclusivamente visual. Em celular, converte somente:
   - Resumo por posto e combustível
   - Últimos lançamentos
   em cartões empilhados, sem rolagem horizontal.
   ========================================================== */
@media (max-width:680px){
  #dashboard .mobile-card-table{
    overflow:visible;
    margin:0;
    padding:0;
    border-radius:0;
  }
  #dashboard .mobile-card-table table{
    min-width:0 !important;
    width:100%;
    display:block;
    font-size:.84rem;
  }
  #dashboard .mobile-card-table thead{
    display:none;
  }
  #dashboard .mobile-card-table tbody{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    width:100%;
  }
  #dashboard .mobile-card-table tr{
    display:block;
    width:100%;
    padding:10px 12px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    box-shadow:0 1px 2px rgba(17,47,82,.04);
  }
  #dashboard .mobile-card-table td{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    width:100%;
    min-width:0 !important;
    padding:6px 0;
    border:0;
    border-bottom:1px solid #edf1f5;
    white-space:normal !important;
    text-align:right;
    overflow-wrap:anywhere;
  }
  #dashboard .mobile-card-table td:last-child{
    border-bottom:0;
  }
  #dashboard .mobile-card-table td::before{
    flex:0 0 43%;
    text-align:left;
    font-size:.72rem;
    line-height:1.3;
    font-weight:800;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.02em;
  }
  #dashboard .mobile-card-table td[colspan]{
    display:block;
    text-align:center;
    color:var(--muted);
    border-bottom:0;
  }
  #dashboard .mobile-card-table td[colspan]::before{content:none}

  #dashboard .station-fuel-mobile td:nth-child(1)::before{content:"Posto"}
  #dashboard .station-fuel-mobile td:nth-child(2)::before{content:"Combustível"}
  #dashboard .station-fuel-mobile td:nth-child(3)::before{content:"Abastecimentos"}
  #dashboard .station-fuel-mobile td:nth-child(4)::before{content:"Litros"}
  #dashboard .station-fuel-mobile td:nth-child(5)::before{content:"Valor total"}
  #dashboard .station-fuel-mobile td:nth-child(6)::before{content:"Preço médio/L"}
  #dashboard .station-fuel-mobile td:nth-child(7)::before{content:"Ticket médio"}

  #dashboard .recent-mobile td:nth-child(1)::before{content:"Data"}
  #dashboard .recent-mobile td:nth-child(2)::before{content:"Veículo"}
  #dashboard .recent-mobile td:nth-child(3)::before{content:"Combustível"}
  #dashboard .recent-mobile td:nth-child(4)::before{content:"Litros"}
  #dashboard .recent-mobile td:nth-child(5)::before{content:"Posto"}
  #dashboard .recent-mobile td:nth-child(6)::before{content:"Total"}

  #dashboard .mobile-card-table td:first-child{
    padding-top:2px;
  }
  #dashboard .mobile-card-table td:first-child,
  #dashboard .mobile-card-table td:last-child{
    font-weight:700;
  }
}


/* ==========================================================
   V4.1.3B — CARTÕES MOBILE NAS ABAS VEÍCULOS E HISTÓRICO
   Exclusivamente visual. Mantém tabelas normais em telas > 680px.
   ========================================================== */
@media (max-width:680px){
  #vehicles .table,
  #history .table{
    overflow:visible;
    margin:0;
    padding:0;
    border-radius:0;
  }
  #vehicles .table table,
  #history .table table{
    min-width:0 !important;
    width:100%;
    display:block;
    font-size:.84rem;
  }
  #vehicles .table thead,
  #history .table thead{
    display:none;
  }
  #vehicles .table tbody,
  #history .table tbody{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    width:100%;
  }
  #vehicles .table tr,
  #history .table tr{
    display:block;
    width:100%;
    padding:10px 12px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    box-shadow:0 1px 2px rgba(17,47,82,.04);
  }
  #vehicles .table td,
  #history .table td{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    width:100%;
    min-width:0 !important;
    padding:6px 0;
    border:0;
    border-bottom:1px solid #edf1f5;
    white-space:normal !important;
    text-align:right;
    overflow-wrap:anywhere;
  }
  #vehicles .table td:last-child,
  #history .table td:last-child{
    border-bottom:0;
  }
  #vehicles .table td::before,
  #history .table td::before{
    flex:0 0 42%;
    text-align:left;
    font-size:.71rem;
    line-height:1.3;
    font-weight:800;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.02em;
  }
  #vehicles .table td[colspan],
  #history .table td[colspan]{
    display:block;
    text-align:center;
    color:var(--muted);
    border-bottom:0;
  }
  #vehicles .table td[colspan]::before,
  #history .table td[colspan]::before{content:none}

  #vehicles .table td:nth-child(1)::before{content:"Placa"}
  #vehicles .table td:nth-child(2)::before{content:"Tipo"}
  #vehicles .table td:nth-child(3)::before{content:"Situação"}
  #vehicles .table td:nth-child(4)::before{content:"Abastecimentos"}
  #vehicles .table td:nth-child(5)::before{content:"Litros"}
  #vehicles .table td:nth-child(6)::before{content:"Gasto total"}

  #history .table td:nth-child(1)::before{content:"Data/hora"}
  #history .table td:nth-child(2)::before{content:"Veículo"}
  #history .table td:nth-child(3)::before{content:"Tipo"}
  #history .table td:nth-child(4)::before{content:"Posto"}
  #history .table td:nth-child(5)::before{content:"Combustível"}
  #history .table td:nth-child(6)::before{content:"Litros"}
  #history .table td:nth-child(7)::before{content:"R$/L"}
  #history .table td:nth-child(8)::before{content:"Total"}
  #history .table td:nth-child(9)::before{content:"Controle"}
  #history .table td:nth-child(10)::before{content:"Cupom"}

  #vehicles .table td:first-child,
  #history .table td:nth-child(2),
  #history .table td:nth-child(8){
    font-weight:800;
  }
  #history .receipt-link{
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 12px;
  }
}
