/* ===================================================
   HIKARI SHOUJI - 運行管理オンラインフォーム
   Estilo Oficial (Tela + Impressão A4 Perfeita)
=================================================== */

:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --success: #059669;
  --bg-page: #f1f5f9;
  --card-bg: #ffffff;
  --border-color: #333333;
  --border-light: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --table-head-bg: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Barra Superior Retrátil (Oculto por Padrão para não Cobrir a Tela) */
.collapsible-top-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.collapsible-menu-body {
  display: none;
  background: #0f172a;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.45);
  border-bottom: 2px solid #334155;
}

.collapsible-menu-body.open {
  display: block;
  animation: slideDownMenu 0.22s ease-out;
}

@keyframes slideDownMenu {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-drawer-toggle-handle {
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}

.btn-drawer-toggle {
  pointer-events: auto;
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #334155;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 5px 22px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
  user-select: none;
}

.btn-drawer-toggle:hover {
  background: #1e293b;
  color: #ffffff;
  transform: translateY(1px);
}

/* Barra Superior de Ações (Web) */
.web-navbar {
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.web-navbar .logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  color: #f8fafc;
}

.web-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-dark { background: #334155; color: #fff; }
.btn-dark:hover { background: #475569; }
.btn-outline { background: transparent; border: 1px solid #94a3b8; color: #f8fafc; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: #dc2626; color: #fff; }

/* Abas de Navegação */
.nav-tabs {
  display: flex;
  gap: 8px;
  background: #1e293b;
  padding: 8px 20px;
}

.tab-link {
  padding: 8px 18px;
  border-radius: 6px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.tab-link.active, .tab-link:hover {
  background: #3b82f6;
  color: #ffffff;
}

/* Container do Formulário A4 */
.sheet-container {
  max-width: 820px;
  margin: 10px auto 30px;
  padding: 0 10px;
}

.a4-sheet {
  background: #ffffff;
  padding: 30px 40px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border-radius: 4px;
  margin-bottom: 40px;
  color: #000;
}

.jp-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}

.table-swipe-hint {
  display: none;
}

@media screen and (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
  }
  .sheet-container {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 4px auto 16px !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .a4-sheet {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 6px !important;
    margin: 0 auto !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .jp-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 8px !important;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
  }
  .table-swipe-hint {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 10px;
    color: #64748b;
    margin: 2px 2px 4px;
    font-weight: 600;
  }
  .chart-circle-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }
  .chart-circle-area {
    width: min(220px, 70vw) !important;
    height: min(220px, 70vw) !important;
    max-width: 85vw !important;
    margin: 0 auto !important;
    border: 2px dashed #0f172a !important;
    border-radius: 50% !important;
    background-color: #f8fafc !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 8px !important;
    overflow: hidden !important;
    position: relative !important;
  }
  .chart-circle-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
  }
  .chart-circle-title div {
    font-size: 8.5px !important;
    color: #475569 !important;
  }
  .chart-circle-note {
    font-size: 7.5px !important;
    line-height: 1.15 !important;
    color: #64748b !important;
    max-width: 90% !important;
    margin-bottom: 4px !important;
  }
  .btn-tacho-upload {
    margin-top: 4px !important;
    padding: 4px 10px !important;
    font-size: 10.5px !important;
    border-radius: 20px !important;
    background: #2563eb !important;
    color: #fff !important;
    font-weight: bold !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(37,99,235,0.3) !important;
  }
  .meter-input {
    width: 62px !important;
    font-size: 11px !important;
  }
  .t-digit {
    width: 28px !important;
    font-size: 11.5px !important;
  }
  .t-range {
    width: 48px !important;
    font-size: 11.5px !important;
  }
  .jp-table th, .jp-table td {
    padding: 4px 3px !important;
    font-size: 11px !important;
  }
  .sub-pt {
    font-size: 8px !important;
  }
  .web-navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }
  .web-navbar .nav-actions {
    justify-content: center;
  }
  .nav-tabs {
    flex-direction: column;
    padding: 6px 10px;
  }
  .tab-link {
    text-align: center;
  }
}

/* Componentes Visuais do Formulário */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.badge-title {
  background-color: #888888;
  color: #ffffff;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2px;
  display: inline-block;
}

.company-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  background-color: #000000;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  text-align: center;
  font-family: 'Arial Black', Impact, sans-serif;
  line-height: 1;
}

.logo-box .brand {
  font-size: 20px;
  letter-spacing: 1px;
}

.logo-box .sub {
  font-size: 8px;
  letter-spacing: 3px;
  border-top: 1px solid #666;
  padding-top: 2px;
  margin-top: 2px;
}

.company-name-jp {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
}

.company-name-jp small {
  display: block;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0;
}

/* Blocos de Carimbo / Hanko */
.stamp-boxes-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stamp-boxes {
  display: flex;
  border: 1px solid #000;
}

.stamp-box {
  width: 75px;
  border-right: 1px solid #000;
  text-align: center;
}

.stamp-box:last-child {
  border-right: none;
}

.stamp-box .stamp-label {
  font-size: 11px;
  border-bottom: 1px solid #000;
  padding: 3px 0;
  background: #f3f3f3;
  font-weight: bold;
}

.stamp-box .stamp-area {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-info-text {
  font-size: 10px;
  text-align: right;
  margin-top: 5px;
  line-height: 1.3;
}

/* Tabelas com Bordas Japonesas Oficiais */
.jp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}

.jp-table th, .jp-table td {
  border: 1px solid #000;
  padding: 5px 8px;
  vertical-align: middle;
}

.jp-table th {
  background-color: #f0f0f0;
  font-weight: bold;
  text-align: center;
}

.jp-table input[type="text"], 
.jp-table input[type="number"], 
.jp-table input[type="date"], 
.jp-table input[type="time"],
.jp-table select, 
.jp-table textarea {
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 13px;
  font-family: inherit;
  background-color: #ffffff;
}

.jp-table input:focus, .jp-table select:focus, .jp-table textarea:focus {
  outline: 2px solid #2563eb;
  background-color: #eff6ff;
}

.center { text-align: center; }
.right { text-align: right; }
.bold { font-weight: bold; }

/* Círculo do Disco de Tacógrafo com Upload Circular (Sheet 2) */
.chart-circle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
  width: 100%;
}

.chart-circle-area {
  margin: 10px auto;
  width: 250px;
  height: 250px;
  border: 2px dashed #475569;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  box-sizing: border-box;
}

.tachograph-cropped-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tachograph-overlay-actions {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.btn-tacho-act {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.15s ease;
}

.btn-tacho-act:hover {
  background: rgba(15, 23, 42, 1);
  transform: scale(1.05);
}

.btn-tacho-del {
  background: rgba(220, 38, 38, 0.85);
}

.btn-tacho-del:hover {
  background: rgba(220, 38, 38, 1);
}

.btn-tacho-upload {
  margin-top: 10px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 4px rgba(37,99,235,0.25);
  transition: all 0.15s ease;
}

.btn-tacho-upload:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.chart-circle-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #0f172a;
}

.chart-circle-note {
  font-size: 9px;
  line-height: 1.35;
  color: #334155;
}

/* Checklist de carga */
.cargo-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 11px;
}

.cargo-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cargo-item input[type="checkbox"] {
  cursor: pointer;
}

/* Seções de instrução */
.section-badge-title {
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  background: #f0f0f0;
  border: 1px solid #000;
  padding: 4px;
  margin-top: 10px;
}

.sub-pt {
  display: block;
  font-size: 9px;
  font-weight: normal;
  color: #475569;
  line-height: 1.15;
  margin-top: 1px;
}

/* Mensagens de Sucesso / Alertas */
.alert-box {
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 14px;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }

/* Captura Inteligente de Localização Direto na Célula & Cálculo de Rota */
.geo-cell-box {
  display: inline-flex;
  align-items: center;
  width: 100%;
  position: relative;
  gap: 3px;
}

.geo-input-cell {
  width: 100% !important;
  flex: 1;
}

.btn-geo-cell {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #2563eb;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-geo-cell:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: scale(1.08);
}

.route-distance-bar {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 8px 14px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #166534;
  flex-wrap: wrap;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Modal de Captura Inteligente (Mapa / GPS por Célula) */
.geo-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.geo-modal-card {
  background: #ffffff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.geo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.btn-gps-hero {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 6px -1px rgba(37,99,235,0.25);
  transition: transform 0.15s ease;
}

.btn-gps-hero:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.geo-modal-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
}

.geo-status-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
}

.geo-resolved-card {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.geo-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

/* Área e Botões de Assinatura com o Dedo (Touch) */
.signature-box-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
}

.signature-img-preview {
  max-height: 42px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.btn-touch-sign {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.btn-touch-sign:hover {
  background: #1d4ed8;
}

.btn-touch-edit {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  margin-top: 3px;
}

.btn-touch-edit:hover {
  background: #e2e8f0;
}

/* Modal da Assinatura Touch (Celular e PC) */
.signature-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.signature-modal-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.signature-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.signature-canvas-wrapper {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #fafafa;
  position: relative;
  touch-action: none;
  margin-bottom: 15px;
}

.signature-canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: 180px;
  border-radius: 6px;
  cursor: crosshair;
}

.signature-hint {
  position: absolute;
  bottom: 8px;
  left: 10px;
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}

.signature-modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* Impressão da Assinatura e Células */
@media print {
  .collapsible-top-wrapper,
  .collapsible-menu-body,
  .menu-drawer-toggle-handle,
  .btn-drawer-toggle,
  .geo-panel,
  .btn-geo-cell,
  .route-distance-bar,
  .geo-modal-overlay,
  .btn-touch-sign,
  .btn-touch-edit,
  .signature-modal-overlay {
    display: none !important;
  }

  .signature-box-container {
    height: 38px !important;
    min-height: 38px !important;
  }

  .signature-img-preview {
    max-height: 36px !important;
    max-width: 90% !important;
    object-fit: contain !important;
    display: block !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Células de Horário Profissionais (Tela + Impressão) */
.time-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.t-digit {
  width: 32px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 3px 2px !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  letter-spacing: 0.5px;
}

.t-range {
  width: 62px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 3px 4px !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  letter-spacing: 0.5px;
}

.t-lbl {
  font-weight: 700;
  font-size: 12px;
  color: #1e293b;
  margin: 0 1px;
}

/* ===================================================
   CONFIGURAÇÃO DE IMPRESSÃO A4 (EXATA COMO NO PAPEL - 1 FOLHA ÚNICA PREENCHENDO A PÁGINA INTEIRA)
=================================================== */
@page {
  size: A4 portrait;
  margin: 5mm 8mm 5mm 8mm;
}

@media print {
  html, body {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .web-navbar,
  .nav-tabs,
  .quick-fill-panel,
  .no-print,
  .btn,
  .alert-box {
    display: none !important;
  }

  .sheet-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .jp-table-wrapper {
    overflow: visible !important;
    width: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .table-swipe-hint {
    display: none !important;
  }

  .a4-sheet {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
  }

  .nippo-header {
    margin-bottom: 3px !important;
  }

  .nippo-title {
    font-size: 15pt !important;
    margin-bottom: 2px !important;
    line-height: 1.15 !important;
  }

  .nippo-title div {
    font-size: 8.5pt !important;
    margin-top: 1px !important;
  }

  .jp-table {
    margin-top: 3px !important;
  }

  .jp-table th, .jp-table td {
    padding: 2.8px 4.5px !important;
    font-size: 7.8pt !important;
    line-height: 1.18 !important;
  }

  .jp-table th {
    background-color: #f2f2f2 !important;
  }

  .jp-table input,
  .jp-table select,
  .jp-table textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 8.2pt !important;
    color: #000 !important;
    line-height: 1.15 !important;
  }

  .jp-table textarea {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 34px !important;
    resize: none !important;
  }

  .badge-title {
    background-color: #777777 !important;
    padding: 4px 14px !important;
    font-size: 13pt !important;
  }

  .stamp-box .stamp-label {
    background-color: #f2f2f2 !important;
    font-size: 7.5pt !important;
    padding: 1.5px 0 !important;
  }

  .stamp-box .stamp-area {
    height: 42px !important;
  }

  .company-info-text {
    font-size: 7.5pt !important;
    margin-top: 1px !important;
    line-height: 1.15 !important;
  }

  .sub-pt {
    display: block !important;
    font-size: 6.2pt !important;
    color: #333333 !important;
    font-weight: normal !important;
    line-height: 1.05 !important;
    margin-top: 0 !important;
  }

  /* Círculo do disco para colar o tacógrafo original (Preenche harmoniosamente a folha) */
  .chart-circle-area {
    width: 195px !important;
    height: 195px !important;
    margin: 6px auto !important;
    padding: 0 !important;
    border: 1.8px dashed #000 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .tachograph-cropped-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .btn-tacho-upload,
  .tachograph-overlay-actions {
    display: none !important;
  }

  .chart-circle-title {
    font-size: 11pt !important;
    margin-bottom: 2px !important;
  }

  .chart-circle-title div {
    font-size: 7.5pt !important;
  }

  .chart-circle-note {
    font-size: 6.8pt !important;
    line-height: 1.15 !important;
  }

  .cargo-work-grid {
    gap: 1.5px 6px !important;
    font-size: 7.5pt !important;
  }

  .section-badge-title {
    font-size: 8.5pt !important;
    padding: 2px !important;
    margin-top: 4px !important;
  }

  /* Impressão dos Horários Nítida e Sem Cortes */
  .time-cell {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
  }

  .t-digit {
    border: none !important;
    background: transparent !important;
    width: 24px !important;
    font-size: 9pt !important;
    font-weight: 800 !important;
    color: #000 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .t-range {
    border: none !important;
    background: transparent !important;
    width: 48px !important;
    font-size: 9pt !important;
    font-weight: 800 !important;
    color: #000 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .t-lbl {
    font-size: 8.5pt !important;
    font-weight: 700 !important;
    color: #000 !important;
  }
}

/* ===================================================
   PAINEL ADMIN: AUDITORIA DETALHADA DE ROTAS E TRECHOS
=================================================== */
.audit-panel-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  margin: 10px 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.audit-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audit-meta-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #334155;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.audit-table th, .audit-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.audit-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.audit-table tr:hover td {
  background: #f8fafc;
}

.leg-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-weight: 800;
  font-size: 11px;
}

.address-jp-full {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
  line-height: 1.25;
}

.address-place-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 12px;
}
