
:root {
  --bg: #f3f7fc;
  --panel: #ffffff;
  --primary: #0c3f78;
  --primary-2: #1a5da5;
  --border: #d7e3f1;
  --text: #12325a;
  --muted: #6b86a8;
  --success-bg: #edf9f2;
  --warn-bg: #fff9e8;
  --danger-bg: #fff2f2;
  --info-bg: #eef7fa;
  --shadow: 0 8px 24px rgba(13, 52, 106, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
body.app-body { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--primary); color: #fff; height: 76px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 22px; box-shadow: var(--shadow);
}
.clock { font-size: 24px; font-weight: 800; letter-spacing: 1px; }

.topbar-brand {
  background: rgba(255,255,255,.98);
  border-radius: 18px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(12,63,120,.12), 0 8px 24px rgba(13,52,106,.08);
}
.topbar-logo {
  display: block;
  height: 44px;
  width: auto;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.topbar-logout-btn {
  min-width: auto;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.topbar-logout-btn:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
}
.topbar-logout-btn:active {
  transform: translateY(0);
}
.sidebar-logo {
  display: block;
  width: min(100%, 180px);
  height: auto;
  margin: 4px auto;
}
.logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
}
.brand-chip {
  background: rgba(255,255,255,.96); color: var(--primary); border-radius: 16px; padding: 10px 16px;
  display: inline-flex; align-items: center; gap: 10px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(12,63,120,.1);
}
.brand-mark {
  width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #0ea5a8, #1d4ed8);
}
.app-shell { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 76px); }
.sidebar {
  background: #eef4fb; border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 76px; height: calc(100vh - 76px);
}
.logo-panel {
  display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px 10px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.logo-title { font-weight: 900; font-size: 28px; color: var(--primary); line-height: 1; }
.logo-sub { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; margin-top: 4px; }
.nav-list { display: grid; gap: 10px; }
.nav-link {
  border: 1px solid #cddcef; background: #fff; color: var(--text); border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; font-weight: 700;
}
.nav-link.active { background: #dfeefe; border-color: #a7c6ef; color: var(--primary); }
.nav-link .icon { width: 18px; text-align: center; opacity: .8; }
.content { padding: 18px; }
.page-head {
  background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 18px 22px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.page-title { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.page-title h1 { margin: 0; font-size: 32px; }
.page-subtitle { color: var(--muted); font-weight: 600; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 18px; box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 12px; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 16px; }
.grid.secondary { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; }
.kpi { min-height: 118px; }
.kpi .label { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 15px; margin-bottom: 18px; }
.kpi .value { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.kpi .sub { color: var(--muted); font-weight: 600; }
.kpi.warn { background: var(--warn-bg); }
.kpi.danger { background: var(--danger-bg); }
.kpi.info { background: var(--info-bg); }
.kpi.success { background: var(--success-bg); }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  border: 1px solid #c9dcf4; background: #fff; color: var(--muted); border-radius: 999px; padding: 11px 16px; font-weight: 800; cursor: pointer;
}
.pill.active { background: linear-gradient(180deg, #1db4d8, #1c5fb6); color: #fff; border-color: transparent; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; border: 1px solid #c9dcf4; border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--text);
}
textarea.input { min-height: 88px; resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 800; cursor: pointer; min-width: 160px;
}
.btn-primary { background: linear-gradient(180deg, #16b0d5, #1060b0); color: #fff; }
.btn-secondary { background: #edf4fc; color: var(--primary); border: 1px solid #cfe0f4; }
.note-box {
  border: 1px dashed #c6d8ef; background: #fbfdff; border-radius: 18px; padding: 16px; color: var(--muted); font-weight: 600;
}
.list { display: grid; gap: 12px; }
.item-card {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; border: 1px solid var(--border); border-radius: 18px; background: #fff; padding: 16px;
}
.item-title { font-size: 20px; font-weight: 900; }
.item-subtitle { color: var(--muted); font-weight: 700; margin-top: 4px; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 16px; margin-top: 12px; }
.item-route, .item-notes { margin-top: 10px; }
.item-actions { display: grid; align-content: start; gap: 8px; }
.btn-sm { min-width: 110px; padding: 10px 12px; border-radius: 12px; font-weight: 800; cursor: pointer; }
.btn-edit { background: #ecf6ff; color: #0d63b0; border: 1px solid #cfe5fb; }
.btn-delete { background: #fff1f1; color: #b42318; border: 1px solid #ffd3d0; }
.empty-state {
  border: 1px dashed #cadbf0; border-radius: 18px; padding: 24px; text-align: center; color: var(--muted); background: #fbfdff; font-weight: 700;
}
.summary-line { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 14px; background: #f9fbff; padding: 14px 16px; font-weight: 800; }
.summary-line.alert-ok { background: #f6fbff; border-color: var(--border); }
.summary-line.alert-info { background: #eef8fd; border-color: #cfe7f5; }
.summary-line.alert-warn { background: #fff8e6; border-color: #f2df9e; }
.summary-line.alert-danger { background: #fff0f0; border-color: #f0b9b9; }
.dashboard-alert-line { align-items: center; }
.dashboard-alert-line .tag { margin-left: 0; margin-right: 8px; }
.muted { color: var(--muted); }
.stubs { display: grid; place-items: center; min-height: 260px; text-align: center; }
@media (max-width: 1200px) {
  .grid.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topbar { height: auto; min-height: 76px; padding: 14px 16px; gap: 12px; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .clock { font-size: 20px; }
  .topbar-logo { height: 38px; }
  .topbar-logout-btn { padding: 10px 14px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content { padding: 14px; }
  .form-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .span-2,.span-3,.span-4,.span-5,.span-6,.span-8,.span-12 { grid-column: auto; }
  .grid.kpis, .grid.secondary { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .item-card { grid-template-columns: 1fr; }
}


.section-stack { display: grid; gap: 16px; }
.inline-message { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-weight: 700; color: var(--muted); background: #f7fbff; border: 1px dashed #c8dcf1; }
.inline-message.success { background: var(--success-bg); color: #12603d; border-style: solid; }
.inline-message.warn { background: var(--warn-bg); color: #8d6a00; border-style: solid; }
.inline-message.error { background: var(--danger-bg); color: #9e2121; border-style: solid; }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; margin-left: 8px; }
.tag-positive { background: #e8f8ef; color: #13784e; }
.tag-warn { background: #fff6d8; color: #8c6b00; }
.tag-danger { background: #ffe8e8; color: #a22020; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .page-head, .toolbar-actions, .actions-row, .item-actions, .btn, .pills, .toolbar .field:not(.print-keep) { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .card, .item-card { box-shadow: none; border: 1px solid #ddd; }
  body, html { background: #fff; }
  .print-only { display: block; margin-bottom: 16px; }
}


.icon-svg { width: 18px; height: 18px; display: block; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-link .icon, .page-head-icon, .label-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 9px; flex: 0 0 26px;
  background: #eef4ff; color: var(--primary-2); border: 1px solid #d4e1f3;
}
.nav-link.active .icon {
  background: linear-gradient(180deg, #eef6ff, #dcecff);
  border-color: #b8d0ef;
  color: var(--primary);
}
.page-head-icon {
  width: 42px; height: 42px; border-radius: 12px; background: #f2f7ff; color: var(--primary);
}
.page-head-icon .icon-svg { width: 22px; height: 22px; }
.kpi .label { gap: 10px; }
.label-icon {
  width: 24px; height: 24px; border-radius: 8px; background: #f4f8ff; color: var(--primary-2);
}
.kpi.warn .label-icon { background: #fff3cf; color: #b7791f; }
.kpi.danger .label-icon { background: #ffe5e5; color: #c24141; }
.kpi.success .label-icon { background: #e7f8ee; color: #118a57; }
.kpi.info .label-icon { background: #e7f5fb; color: #0d7aa5; }
.label-text { line-height: 1.2; }


.ui-icon { display:inline-flex; align-items:center; justify-content:center; }
.ui-icon svg { width:100%; height:100%; display:block; }
.nav-link .ui-icon {
  width: 28px; height: 28px; padding: 6px; border-radius: 10px;
  background: linear-gradient(180deg, #f6fbff 0%, #e4eefb 100%);
  color: var(--primary); border: 1px solid rgba(12,63,120,.12); flex: 0 0 auto;
}
.nav-link.active .ui-icon { background: linear-gradient(180deg, #eaf4ff 0%, #cfe3fb 100%); }
.page-title-icon {
  width: 44px; height: 44px; padding: 10px; border-radius: 14px;
  background: linear-gradient(180deg, #eef6ff 0%, #dceafb 100%);
  color: var(--primary); border: 1px solid rgba(12,63,120,.12);
}
.kpi-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom: 16px; }
.kpi .label { margin-bottom: 0; display:flex; align-items:center; gap:10px; }
.kpi-icon {
  width: 32px; height: 32px; padding: 7px; border-radius: 11px;
  background: linear-gradient(180deg, #f7fbff 0%, #e7eff9 100%);
  color: var(--primary); border: 1px solid rgba(12,63,120,.10); flex:0 0 auto;
}
.analysis-kpi .kpi-head { align-items:center; }
.kpi-action {
  display:inline-flex; align-items:center; gap:8px; border:1px solid #d4e2f2; background:#f8fbff; color:var(--primary);
  border-radius:999px; padding:8px 12px; font-weight:800; cursor:pointer;
}
.kpi-action .ui-icon { width:16px; height:16px; }
.dashboard-toolbar { justify-content:space-between; align-items:flex-start; gap:16px; }
.dashboard-filter-controls { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.dashboard-mode-field, .historico-mode-field { min-width: 180px; max-width: 220px; }
.historico-toolbar { align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.historico-filter-controls { display:grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap:16px; flex:1 1 auto; }
.dashboard-filter-box { min-width:340px; max-width:540px; }
.dashboard-date-field { margin-top:10px; max-width:280px; }
.dashboard-period-selects { display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; }
.dashboard-month-field, .dashboard-year-field { max-width: 200px; min-width: 160px; }
.dashboard-date-field[hidden], .dashboard-month-field[hidden], .dashboard-year-field[hidden] { display:none !important; }
.historico-date-field[hidden], .historico-month-field[hidden], .historico-year-field[hidden], .relatorio-date-field[hidden], .relatorio-month-field[hidden], .relatorio-year-field[hidden] { display:none !important; }
.dashboard-period-box {
  min-width: 250px; padding: 14px 16px; border:1px solid var(--border); border-radius:18px; background:#f9fbff;
}
.dashboard-period-title { font-size:13px; font-weight:800; color:var(--muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:.04em; }
.dashboard-primary-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); gap:18px; }
.dashboard-primary-grid .kpi, .dashboard-secondary-grid .kpi { min-height: 150px; display:flex; flex-direction:column; justify-content:space-between; }
.dashboard-primary-grid .kpi .sub, .dashboard-secondary-grid .kpi .sub { line-height: 1.35; }
.dashboard-secondary-grid { grid-template-columns: repeat(5, minmax(170px, 1fr)); gap:18px; }
.relatorio-kpis-grid { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
.relatorio-toolbar { align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.relatorio-filter-controls { display:grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap:16px; flex:1 1 auto; }
.relatorio-mode-field { min-width: 180px; max-width: 220px; }
.day-summary { margin-top: 16px; }
.section-head { margin-bottom: 12px; }
.section-head h3 { margin: 0 0 6px; }
.section-head p { margin: 0; }
.day-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-foot-grid { margin-top: 16px; display:grid; gap:16px; }
.dashboard-info-card .summary-line { margin-top: 12px; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 26, 51, .52); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 24px; border:1px solid var(--border);
  box-shadow: 0 24px 60px rgba(10,34,65,.22); padding: 22px;
}
.modal-open { overflow: hidden; }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 16px; }
.modal-title-row { display:flex; align-items:center; gap:10px; }
.modal-title-row .ui-icon { width:24px; height:24px; color:var(--primary); }
.modal-title-row h3 { margin:0; }
.modal-close {
  border:1px solid #d8e3f3; background:#f8fbff; color:var(--primary); width:38px; height:38px; border-radius:12px; cursor:pointer; font-size:22px; line-height:1;
}
.analysis-summary {
  display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; padding: 14px 16px; border-radius: 16px; background:#f9fbff; border:1px solid var(--border); margin-bottom:14px;
}
.analysis-list { display:grid; gap:10px; }
.analysis-row {
  display:grid; grid-template-columns: 1.1fr .8fr .8fr; gap:10px; align-items:center; padding: 12px 14px; border-radius:16px; background:#fff; border:1px solid var(--border);
}
.analysis-row.total { background:#f7fbff; }
.analysis-row.grand-total { background: var(--success-bg); }
.modal-actions { margin-top: 16px; display:flex; justify-content:flex-end; }
@media (max-width: 1200px) {
  .dashboard-primary-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .dashboard-secondary-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .historico-filter-controls { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .relatorio-kpis-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .relatorio-filter-controls { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-primary-grid, .dashboard-secondary-grid, .day-kpis { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .dashboard-filter-box { min-width: 100%; max-width: 100%; }
  .dashboard-period-box { width: 100%; }
  .dashboard-filter-controls, .dashboard-period-selects { flex-direction: column; }
  .dashboard-mode-field, .dashboard-month-field, .dashboard-year-field, .dashboard-date-field { min-width: 100%; max-width: 100%; }
  .historico-filter-controls, .relatorio-filter-controls { grid-template-columns: 1fr; }
  #historico-date-field, #historico-month-field, #historico-year-field, #relatorio-date-field, #relatorio-month-field, #relatorio-year-field { min-width: 100%; max-width: 100%; }
  .relatorio-kpis-grid { grid-template-columns: 1fr; }
  .analysis-summary { grid-template-columns: 1fr; }
  .analysis-row { grid-template-columns: 1fr; }
  .modal-card { width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0; align-self: end; max-height: 88vh; }
  .modal-backdrop { align-items: end; padding: 0; }
}

.print-report-header {
  display: none;
}
.print-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.print-logo {
  width: 120px;
  height: auto;
  display: block;
}
.print-brand-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}
.print-brand-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.print-meta {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  gap: 4px;
}

@page {
  size: A4;
  margin: 10mm 9mm;
}

@media print {
  html, body {
    font-size: 11px;
    line-height: 1.25;
    background: #fff !important;
    color: #12325a;
  }
  .sidebar, .topbar, .page-head, .toolbar-actions, .actions-row, .item-actions, .btn, .toolbar .field:not(.print-keep),
  .dashboard-toolbar, .historico-toolbar, .relatorio-toolbar, .kpi-action, .note-box {
    display: none !important;
  }
  .app-shell, .content, .section-stack {
    display: block !important;
    padding: 0 !important;
    min-height: auto !important;
  }
  .card {
    border: 1px solid #d8e2ee !important;
    box-shadow: none !important;
    border-radius: 14px !important;
    padding: 8px 10px !important;
    break-inside: auto;
    page-break-inside: auto;
    margin-bottom: 8px !important;
  }
  .print-only.print-report-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #d9e4f2;
  }
  .grid.secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-top: 8px !important;
  }
  .relatorio-kpis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .kpi {
    min-height: auto !important;
    padding: 8px 10px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .kpi .label {
    font-size: 12px !important;
    margin-bottom: 8px !important;
    gap: 6px !important;
  }
  .kpi-icon, .label-icon, .nav-link .ui-icon, .page-title-icon {
    width: 18px !important;
    height: 18px !important;
    padding: 2px !important;
    border-radius: 6px !important;
  }
  .kpi .value {
    font-size: 15px !important;
    margin-bottom: 4px !important;
  }
  .kpi .sub {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
  .summary-line {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px 8px;
    padding: 8px 10px !important;
    font-size: 10.5px !important;
  }
  .item-card {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 6px !important;
  }
  .item-title {
    font-size: 14px !important;
    margin-bottom: 1px;
  }
  .item-subtitle {
    font-size: 10px !important;
    margin-top: 0 !important;
  }
  .tag {
    font-size: 10px !important;
    padding: 3px 8px !important;
    margin-left: 0 !important;
    margin-right: 8px !important;
  }
  .item-grid {
    margin-top: 4px !important;
    gap: 2px 10px !important;
    font-size: 10px !important;
  }
  .item-route, .item-notes {
    margin-top: 4px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }
  .list {
    display: grid !important;
    gap: 6px !important;
  }
  h1, h2, h3 {
    margin: 0 0 6px !important;
  }
  section, article, div {
    break-inside: auto;
    page-break-inside: auto;
  }
  #historico-page > section:last-of-type,
  #relatorios-page > section:last-of-type,
  #historico-lista,
  #relatorio-resumo,
  .list {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  #historico-page > section:last-of-type h2,
  #relatorios-page > section:last-of-type h2 {
    break-after: avoid;
    page-break-after: avoid;
  }
}


.card-soft { background: #fbfdff; border: 1px solid #dbe7f4; }
.logo-preview-box {
  min-height: 120px; border: 1px dashed #c8d8ea; border-radius: 18px; background: #f8fbff;
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.logo-preview { max-width: 100%; max-height: 92px; object-fit: contain; display: block; }
.checkbox-inline { display:flex; align-items:center; gap:10px; font-weight:700; }
.checkbox-inline input { width: 18px; height: 18px; }
.rentabilidade-legend .tag { margin-left: 0; }
.legend-grid {
  display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px;
}
.legend-item {
  border:1px solid var(--border); border-radius: 16px; padding: 14px; background: #fbfdff; display:grid; gap:8px;
}
.legend-rule {
  border-top: 1px dashed #d4dfec; padding-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.45;
}
.item-status-reason {
  margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 700;
}
@media (max-width: 900px) {
  .legend-grid { grid-template-columns: 1fr; }
}
@media print {
  .rentabilidade-legend {
    break-inside: avoid; page-break-inside: avoid;
  }
  .legend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; margin-bottom: 8px !important;
  }
  .legend-item {
    padding: 8px 10px !important; border-radius: 12px !important; font-size: 10px !important;
  }
  .legend-rule {
    font-size: 10px !important; padding-top: 8px !important;
  }
  .item-status-reason {
    font-size: 10px !important; margin-top: 4px !important;
  }
}


.auth-screen, .auth-entry-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(22,176,213,.12), transparent 32%), var(--bg);
}
.auth-shell, .auth-entry-shell {
  width: min(100%, 980px);
  display: grid;
  place-items: center;
}
.auth-card, .auth-entry-card {
  width: min(100%, 560px);
}
.auth-brand-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
}
.auth-brand-logo {
  width: 110px;
  height: auto;
  display: block;
}
.auth-overline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.auth-card h1, .auth-entry-card h1 {
  margin: 0 0 8px;
  font-size: 32px;
}
.auth-subtitle {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}
.auth-form .btn {
  min-width: 180px;
}
.auth-actions {
  margin-top: 16px;
}
.auth-tips {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.auth-entry-card {
  text-align: center;
}
.auth-entry-card .auth-brand-logo {
  margin: 0 auto 12px;
}
@media (max-width: 700px) {
  .auth-screen, .auth-entry-body {
    padding: 16px;
  }
  .auth-card, .auth-entry-card {
    width: 100%;
  }
  .auth-brand-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .auth-brand-logo {
    margin: 0 auto;
    width: 96px;
  }
  .auth-card h1, .auth-entry-card h1 {
    font-size: 28px;
  }
  .auth-form .btn {
    width: 100%;
    min-width: 100%;
  }
}


/* === Auth SaaS / estilo inspirado no Meu Manager === */
.auth-saas-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(17, 98, 176, .12), transparent 25%),
    radial-gradient(circle at 85% 10%, rgba(29, 180, 216, .10), transparent 28%),
    linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
}
.auth-saas-topbar {
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-saas-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}
.auth-saas-wordmark strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}
.auth-saas-wordmark span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  margin-top: 2px;
}
.auth-saas-top-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(13, 47, 94, .08);
}
.auth-saas-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-mini-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(12, 63, 120, .10);
  background: rgba(255,255,255,.86);
  color: var(--primary);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(13, 47, 94, .05);
}
.auth-saas-signature {
  height: 54px;
  width: auto;
  border-radius: 16px;
  background: #fff;
  padding: 8px 12px;
  box-shadow: 0 16px 32px rgba(13, 47, 94, .08);
}
.auth-saas-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 22px auto 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
  gap: 28px;
  align-items: stretch;
}
.auth-saas-hero {
  padding: 34px 10px 10px;
}
.auth-saas-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(12, 63, 120, .12);
  background: rgba(255,255,255,.9);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 10px 14px;
  box-shadow: 0 12px 30px rgba(13, 47, 94, .05);
}
.auth-saas-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: #0c2c56;
}
.auth-saas-lead {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
  color: #4f6b8a;
  margin: 0;
}
.auth-saas-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}
.auth-highlight-card,
.auth-feature-item {
  border: 1px solid rgba(12, 63, 120, .10);
  background: rgba(255,255,255,.88);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(13, 47, 94, .07);
}
.auth-highlight-card {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}
.auth-highlight-card strong,
.auth-feature-item strong {
  color: #0c2c56;
  font-size: 16px;
}
.auth-highlight-card span,
.auth-feature-item span {
  color: #58708d;
  font-weight: 600;
  line-height: 1.45;
}
.auth-dashboard-preview {
  margin-top: 24px;
}
.preview-window {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(12, 63, 120, .10);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 28px 64px rgba(13, 47, 94, .12);
}
.preview-window-bar {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid #e9f0f7;
}
.preview-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d9e4f0;
}
.preview-window-body {
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 360px;
}
.preview-sidebar {
  background: linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
  border-right: 1px solid #e5edf6;
  padding: 22px 16px;
}
.preview-sidebar-logo {
  height: 82px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border: 1px solid #dde8f4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  margin-bottom: 20px;
}
.preview-sidebar-link {
  height: 42px;
  border-radius: 14px;
  background: #eaf1f9;
  margin-bottom: 10px;
}
.preview-sidebar-link.active {
  background: linear-gradient(180deg, #1bb2d5, #115fad);
}
.preview-content {
  padding: 24px;
}
.preview-heading {
  width: 52%;
  height: 18px;
  border-radius: 999px;
  background: #dfe9f4;
  margin-bottom: 18px;
}
.preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.preview-kpi {
  border: 1px solid #e4ecf6;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(12, 63, 120, .04);
}
.preview-kpi small {
  color: #6d83a0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.preview-kpi strong {
  color: #0f3f78;
  font-size: 20px;
}
.preview-chart {
  margin-top: 18px;
  height: 120px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  border: 1px solid #e3ebf6;
}
.preview-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 88px;
  margin-top: 18px;
}
.preview-bars span {
  flex: 1 1 auto;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #1ab1d4, #114f95);
  opacity: .92;
}
.preview-bars span:nth-child(1) { height: 34px; }
.preview-bars span:nth-child(2) { height: 52px; }
.preview-bars span:nth-child(3) { height: 46px; }
.preview-bars span:nth-child(4) { height: 68px; }
.preview-bars span:nth-child(5) { height: 54px; }
.preview-bars span:nth-child(6) { height: 78px; }
.preview-bars span:nth-child(7) { height: 60px; }
.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.auth-feature-item {
  padding: 18px 18px 16px;
  display: grid;
  gap: 8px;
}
.auth-saas-panel {
  align-self: center;
  border: 1px solid rgba(12, 63, 120, .10);
  background: rgba(255,255,255,.92);
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 30px 70px rgba(13, 47, 94, .14);
  backdrop-filter: blur(12px);
}
.auth-panel-head h2 {
  margin: 6px 0 8px;
  font-size: 32px;
  color: #0c2c56;
}
.auth-panel-head p {
  margin: 0;
  color: #5d7390;
  line-height: 1.6;
  font-weight: 600;
}
.auth-status-box {
  margin-top: 18px;
}
.auth-panel-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.auth-panel-actions {
  margin-top: 6px;
}
.auth-panel-actions .btn {
  flex: 1 1 0;
  min-width: 0;
}
.auth-panel-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #dfe8f3, transparent);
  margin: 24px 0 18px;
}
.auth-panel-mini-list {
  display: grid;
  gap: 12px;
}
.auth-entry-pro-shell {
  width: min(100%, 620px);
  display: grid;
  place-items: center;
}
.auth-entry-pro-card {
  width: min(100%, 520px);
  padding: 34px 28px;
  border-radius: 28px;
  border: 1px solid rgba(12, 63, 120, .10);
  background: rgba(255,255,255,.94);
  box-shadow: 0 30px 70px rgba(13, 47, 94, .12);
  text-align: center;
}
.auth-entry-pro-logo {
  width: 90px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
}
.auth-entry-pro-card h1 {
  margin: 8px 0 10px;
  color: #0c2c56;
  font-size: 34px;
}
.auth-entry-pro-card p {
  margin: 0;
  color: #607893;
  font-weight: 600;
  line-height: 1.6;
}
.auth-entry-loader {
  margin: 22px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-entry-loader span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1ab1d4, #115fac);
  animation: authPulse 1.2s infinite ease-in-out;
}
.auth-entry-loader span:nth-child(2) { animation-delay: .15s; }
.auth-entry-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes authPulse {
  0%, 80%, 100% { transform: scale(.8); opacity: .45; }
  40% { transform: scale(1); opacity: 1; }
}
@media (max-width: 1120px) {
  .auth-saas-shell {
    grid-template-columns: 1fr;
  }
  .auth-saas-hero {
    padding: 18px 0 0;
  }
  .auth-saas-panel {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 780px) {
  .auth-saas-topbar,
  .auth-saas-shell {
    width: min(100%, calc(100% - 24px));
  }
  .auth-saas-topbar {
    margin-top: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .auth-saas-top-actions {
    justify-content: space-between;
  }
  .auth-saas-cta-row,
  .auth-feature-grid,
  .preview-kpis {
    grid-template-columns: 1fr;
  }
  .preview-window-body {
    grid-template-columns: 1fr;
  }
  .preview-sidebar {
    display: none;
  }
  .auth-saas-panel {
    padding: 22px 18px;
    border-radius: 24px;
  }
  .auth-panel-head h2 {
    font-size: 28px;
  }
}
@media (max-width: 560px) {
  .auth-saas-hero h1 {
    font-size: 34px;
  }
  .auth-saas-lead {
    font-size: 15px;
  }
  .auth-panel-actions {
    flex-direction: column;
  }
  .auth-panel-actions .btn {
    width: 100%;
  }
  .auth-saas-signature {
    height: 46px;
    padding: 6px 10px;
  }
}




.print-pages-container { display: none; }
.print-measure-container .grid.secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-top: 8px !important;
}
.print-measure-container .relatorio-kpis-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.print-measure-container .kpi {
  min-height: auto !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  break-inside: avoid;
  page-break-inside: avoid;
}
.print-measure-container .kpi .label {
  font-size: 12px !important;
  margin-bottom: 8px !important;
  gap: 6px !important;
}
.print-measure-container .kpi-icon,
.print-measure-container .label-icon,
.print-measure-container .nav-link .ui-icon,
.print-measure-container .page-title-icon {
  width: 18px !important;
  height: 18px !important;
  padding: 2px !important;
  border-radius: 6px !important;
}
.print-measure-container .kpi .value {
  font-size: 15px !important;
  margin-bottom: 4px !important;
}
.print-measure-container .kpi .sub {
  font-size: 10px !important;
  line-height: 1.2 !important;
}
.print-measure-container .summary-line {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 8px;
  padding: 8px 10px !important;
  font-size: 10.5px !important;
}
.print-measure-container .item-card {
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 0 !important;
}
.print-measure-container .item-title {
  font-size: 14px !important;
  line-height: 1.15 !important;
  margin-bottom: 1px;
}
.print-measure-container .item-subtitle {
  font-size: 10px !important;
  margin-top: 0 !important;
  line-height: 1.2 !important;
}
.print-measure-container .item-status-reason {
  font-size: 10px !important;
  line-height: 1.2 !important;
  margin-top: 2px !important;
}
.print-measure-container .tag {
  font-size: 10px !important;
  padding: 3px 8px !important;
  margin-left: 0 !important;
  margin-right: 8px !important;
}
.print-measure-container .item-grid {
  margin-top: 4px !important;
  gap: 2px 10px !important;
  font-size: 10px !important;
}
.print-measure-container .item-route,
.print-measure-container .item-notes {
  margin-top: 4px !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}
.print-measure-container .list {
  display: grid !important;
  gap: 6px !important;
}
.print-measure-container .print-page-header {
  gap: 14px;
  padding-bottom: 10px;
}
.print-measure-container .print-page-brand {
  gap: 12px;
}
.print-measure-container .print-logo {
  width: 96px;
}
.print-measure-container .print-brand-title {
  font-size: 18px;
}
.print-measure-container .print-meta {
  gap: 4px;
  font-size: 12px;
}
.print-measure-container .print-page-content {
  gap: 8px;
}
.print-measure-container .print-page-footer {
  padding-top: 6px;
  font-size: 11px;
}
.print-page-sheet {
  width: 186mm;
  min-height: 265mm;
  box-sizing: border-box;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  break-after: page;
  page-break-after: always;
}
.print-page-sheet:last-child {
  break-after: auto;
  page-break-after: auto;
}
.print-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d7e2ee;
}
.print-page-brand { display: flex; align-items: center; gap: 16px; }
.print-page-content {
  display: grid;
  align-content: start;
  gap: 12px;
}
.print-page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid #d7e2ee;
  font-size: 12px;
  color: #39557c;
}
.print-page-footer-right { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.print-title-card h2 { margin: 0; }

.relatorio-toolbar .btn { display: inline-flex; align-items: center; gap: 8px; }
.btn-inline-icon { width: 18px; height: 18px; }
.relatorio-kpis-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.print-report-header {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #d7e2ee;
}
.print-brand { display: flex; align-items: center; }
.print-meta { display: grid; gap: 6px; text-align: right; font-weight: 800; color: var(--primary); }
.print-report-footer {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #39557c;
}
.print-report-footer-right { display: inline-flex; align-items: center; gap: 12px; }
@media (max-width: 1200px) {
  .relatorio-kpis-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .relatorio-kpis-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
@media print {
  @page { margin: 14mm 12mm 18mm; }
  .note-box, #relatorio-periodo-legenda { display: block !important; }
  #btn-pdf-relatorio, .toolbar-actions { display: none !important; }
  .print-report-header { display: flex !important; }
  .print-report-footer {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12mm 0;
    border-top: 1px solid #d7e2ee;
    background: #fff;
  }
  .content { padding-bottom: 44px; }
  .relatorio-kpis-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  body.printing-custom-pdf .topbar,
  body.printing-custom-pdf .app-shell,
  body.printing-custom-pdf > .print-only,
  body.printing-custom-pdf .print-report-header,
  body.printing-custom-pdf .print-report-footer {
    display: none !important;
  }
  body.printing-custom-pdf .print-pages-container {
    display: block !important;
  }
}


.page-menu-btn {
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #d4e1f3;
  background: linear-gradient(180deg, #eef6ff, #dcecff);
  color: var(--primary-2);
  cursor: pointer;
  flex: 0 0 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-menu-btn svg { width: 100%; height: 100%; }

.topbar-menu-btn {
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
}
.topbar-menu-btn svg { width: 100%; height: 100%; }
.sidebar-backdrop {
  position: fixed;
  inset: 76px 0 0 0;
  background: rgba(6, 22, 48, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 40;
}
body.sidebar-mobile-open .sidebar-backdrop {
  opacity: 1;
  visibility: visible;
}
.nav-text { white-space: nowrap; }
.section-title-row {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.small-text { font-size: 13px; }
.btn-small, .btn-sm.btn-secondary {
  min-width: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}
.vehicle-list {
  display: grid;
  gap: 12px;
}
.vehicle-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.vehicle-item.is-active {
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  border-color: #b9d1ef;
}
.vehicle-item-head {
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 18px;
}
.vehicle-item-meta {
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}
.vehicle-item-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-content:start;
  justify-content:flex-end;
}
.vehicle-editor {
  border-top: 1px dashed #c8d8ec;
  padding-top: 14px;
}
body.sidebar-collapsed .app-shell {
  grid-template-columns: 96px 1fr;
}
body.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}
body.sidebar-collapsed .logo-panel {
  padding: 14px 8px;
}
body.sidebar-collapsed .sidebar-logo {
  max-width: 56px;
}
body.sidebar-collapsed .nav-link {
  justify-content: center;
  padding: 14px 10px;
}
body.sidebar-collapsed .nav-text {
  display: none;
}
body.sidebar-collapsed .nav-link .ui-icon {
  margin: 0;
}
@media (max-width: 900px) {
  .page-menu-btn { width: 42px; height: 42px; flex-basis: 42px; }
  .topbar-menu-btn { order: -1; }
  .sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    width: min(300px, 82vw);
    height: calc(100vh - 76px);
    z-index: 50;
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: 0 18px 38px rgba(4, 27, 62, .18);
  }
  body.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }
  .vehicle-item {
    grid-template-columns: 1fr;
  }
  .vehicle-item-actions {
    justify-content:flex-start;
  }
}


.custos-report-controls { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.custos-report-kpis { margin-top: 16px; }
.custos-diagnostico-card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: #f9fbff;
}
.custos-diagnostico-card.success { background: var(--success-bg); border-color: #cfe8dc; }
.custos-diagnostico-card.warn { background: var(--warn-bg); border-color: #f2df9e; }
.custos-diagnostico-card.danger { background: var(--danger-bg); border-color: #f0b9b9; }
.custos-diagnostico-card.info { background: #eef8fd; border-color: #cfe7f5; }
.custos-diagnostico-head h3 { margin: 10px 0 6px; font-size: 24px; }
.custos-diagnostico-head p { margin: 0; color: var(--text); font-weight: 700; line-height: 1.45; }
.custos-diagnostico-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.custos-report-columns { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; margin-top: 16px; align-items: start; }
.custos-report-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfdff;
  padding: 16px;
}
.custos-report-panel h3 { margin: 0 0 14px; font-size: 18px; }
.item-card-report .item-title { font-size: 18px; }
.item-actions-report { justify-items: end; }
.report-value { font-size: 18px; color: var(--primary); }
@media (max-width: 1200px) {
  .custos-report-controls { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .custos-report-columns { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .custos-diagnostico-grid,
  .custos-report-controls,
  .custos-report-columns { grid-template-columns: 1fr; }
}


.accordion-card { padding: 0; overflow: hidden; }
.accordion-toggle { width: 100%; border: 0; background: transparent; padding: 18px; display: flex; justify-content: space-between; align-items: center; text-align: left; cursor: pointer; font: inherit; }
.accordion-toggle strong { display: block; font-size: 18px; }
.accordion-toggle small { display: block; color: var(--muted); margin-top: 4px; }
.accordion-arrow { font-size: 22px; color: var(--primary); }
#ganhos-extras-body { padding: 0 18px 18px; border-top: 1px solid var(--border); }
.item-card-extra { border-color: #d8e7f7; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.tag-info-inline { background: #e8f2ff; color: #1155a3; }
.dashboard-secondary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) { .dashboard-secondary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dashboard-secondary-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }


.dashboard-primary-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.relatorio-kpis-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.historico-kpis-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) {
  .dashboard-primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .relatorio-kpis-grid, .historico-kpis-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-primary-grid, .relatorio-kpis-grid, .historico-kpis-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}


.dashboard-fuel-grid { margin-top: 16px; display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; }
.fuel-panel { display:flex; flex-direction:column; gap:14px; }
.fuel-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:0; }
.fuel-summary-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
.fuel-summary-item { padding:14px 16px; border:1px solid var(--border); border-radius:18px; background:#fbfdff; }
.fuel-summary-item span { display:block; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:8px; }
.fuel-summary-item strong { display:block; font-size:20px; color:var(--primary); line-height:1.2; }
.fuel-chart { min-height: 270px; border:1px solid var(--border); border-radius:22px; background:linear-gradient(180deg, #fcfdff 0%, #f5f9ff 100%); padding:18px 16px 16px; position:relative; overflow:hidden; }
.fuel-chart-bars { height:100%; display:grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap:12px; align-items:end; }
.fuel-bar { min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; height:100%; }
.fuel-bar-track { height:170px; width:100%; border-radius:16px; background:rgba(15, 74, 138, .08); border:1px solid rgba(15,74,138,.08); display:flex; align-items:flex-end; justify-content:center; padding:6px; }
.fuel-bar-fill { width:100%; min-height:12px; border-radius:12px; background:linear-gradient(180deg, #2f7ad8 0%, #0f4a8a 100%); box-shadow: 0 10px 22px rgba(15,74,138,.16); }
.fuel-bar-fill.consumption { background:linear-gradient(180deg, #42b883 0%, #1e7f57 100%); box-shadow: 0 10px 22px rgba(30,127,87,.18); }
.fuel-bar-label, .fuel-bar-meta { width:100%; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fuel-bar-label { font-size:12px; font-weight:800; color:#35506e; }
.fuel-bar-meta { font-size:12px; color:var(--muted); }
.fuel-chart-empty { min-height:220px; display:flex; align-items:center; justify-content:center; text-align:center; color:var(--muted); font-weight:700; padding:20px; }
.fuel-chart-footer { font-size:13px; color:var(--muted); }
@media (max-width: 1200px) { .dashboard-fuel-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .fuel-summary-grid { grid-template-columns: 1fr; } .fuel-chart-bars { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap:10px; } .fuel-chart { min-height: 250px; } .fuel-bar-track { height:150px; } }

/* Dashboard premium refresh */
.page-head-premium .page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.dashboard-premium-shell {
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(15,74,138,.07), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fd 100%);
  box-shadow: 0 24px 52px rgba(11, 40, 78, .08);
}
.dashboard-premium-top {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .95fr);
  gap: 18px;
  margin-bottom: 22px;
}
.dashboard-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  min-height: 280px;
  background: linear-gradient(135deg, #0b2340 0%, #0f4a8a 56%, #1f6dc3 100%);
  color: #fff;
  box-shadow: 0 24px 52px rgba(10, 34, 65, .22);
}
.dashboard-hero-card::before {
  content: "";
  position: absolute;
  inset: auto -90px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  filter: blur(1px);
}
.dashboard-hero-card::after {
  content: "";
  position: absolute;
  inset: -60px auto auto -60px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}
.dashboard-hero-card > * { position: relative; z-index: 1; }
.dashboard-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.dashboard-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 900;
}
.dashboard-hero-card h2 {
  margin: 14px 0 6px;
  font-size: 30px;
  line-height: 1.05;
  color: #fff;
}
.dashboard-hero-card p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-weight: 600;
}
.dashboard-health-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  color: #fff;
  white-space: nowrap;
}
.dashboard-health-pill.is-positive { background: rgba(56, 201, 125, .16); color: #dbffe9; border-color: rgba(56, 201, 125, .22); }
.dashboard-health-pill.is-warning { background: rgba(255, 187, 76, .16); color: #fff4d6; border-color: rgba(255, 187, 76, .24); }
.dashboard-health-pill.is-danger { background: rgba(255, 98, 98, .16); color: #ffe1e1; border-color: rgba(255, 98, 98, .22); }
.dashboard-health-pill.is-neutral { background: rgba(255,255,255,.1); color: #eef5ff; }
.dashboard-hero-money-wrap {
  margin-top: 24px;
  display: grid;
  gap: 8px;
}
.dashboard-hero-money-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: rgba(255,255,255,.72);
}
.dashboard-hero-money {
  font-size: clamp(34px, 5vw, 54px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -.03em;
}
.dashboard-hero-summary {
  max-width: 620px;
  font-size: 14px;
}
.dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.dashboard-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}
.dashboard-hero-stat span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
  color: rgba(255,255,255,.7);
  margin-bottom: 8px;
}
.dashboard-hero-stat strong {
  display: block;
  font-size: 18px;
  line-height: 1.18;
  color: #fff;
}
.dashboard-control-card,
.premium-panel,
.premium-info-card {
  border-radius: 24px;
  border: 1px solid rgba(12, 63, 120, .09);
  box-shadow: 0 14px 32px rgba(12, 44, 82, .06);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.dashboard-control-card {
  display: grid;
  gap: 18px;
  align-self: stretch;
}
.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dashboard-card-head h3,
.dashboard-section-heading h3 {
  margin: 6px 0 6px;
}
.dashboard-section-eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: var(--primary);
}
.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-filter-grid .field {
  margin: 0;
  min-width: 0;
  max-width: none;
}
.dashboard-control-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-control-chip {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f6f9fe;
  border: 1px solid rgba(12,63,120,.08);
}
.dashboard-control-chip span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--muted);
}
.dashboard-control-chip strong {
  display: block;
  line-height: 1.4;
  font-size: 15px;
  color: var(--text);
}
.dashboard-control-chip-wide { grid-column: 1 / -1; }
.dashboard-section-block {
  margin-top: 22px;
}
.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.dashboard-section-heading.compact {
  margin-bottom: 10px;
}
.dashboard-primary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-secondary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.premium-kpi {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 164px;
  padding: 18px;
  border: 1px solid rgba(12,63,120,.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(11,40,78,.06);
}
.premium-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(15,74,138,.95), rgba(57,132,221,.55));
}
.premium-kpi.success::before { background: linear-gradient(90deg, #0d915d, #51d39c); }
.premium-kpi.warn::before { background: linear-gradient(90deg, #d48a12, #ffc866); }
.premium-kpi.danger::before { background: linear-gradient(90deg, #cb4141, #ff8c8c); }
.premium-kpi.info::before { background: linear-gradient(90deg, #1769b5, #66b3ff); }
.premium-kpi .value {
  font-size: clamp(24px, 2vw, 30px);
  letter-spacing: -.02em;
}
.premium-kpi .sub {
  min-height: 38px;
}
.dashboard-foot-grid-premium {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-reading-list {
  display: grid;
  gap: 12px;
}
.dashboard-reading-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f6f9fe;
  border: 1px solid rgba(12,63,120,.08);
}
.dashboard-reading-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  color: var(--muted);
}
.dashboard-reading-item strong {
  font-size: 15px;
  line-height: 1.45;
}
.dashboard-hero-card.is-positive { box-shadow: 0 24px 52px rgba(10, 34, 65, .22), 0 0 0 1px rgba(56,201,125,.08) inset; }
.dashboard-hero-card.is-warning { box-shadow: 0 24px 52px rgba(10, 34, 65, .22), 0 0 0 1px rgba(255,187,76,.08) inset; }
.dashboard-hero-card.is-danger { box-shadow: 0 24px 52px rgba(10, 34, 65, .22), 0 0 0 1px rgba(255,98,98,.12) inset; }
.dashboard-hero-card.is-neutral { box-shadow: 0 24px 52px rgba(10, 34, 65, .22); }
.dashboard-fuel-grid {
  margin-top: 22px;
}
.fuel-panel.premium-panel {
  padding: 20px;
}
.fuel-summary-item {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.fuel-chart {
  border-radius: 24px;
  background: linear-gradient(180deg, #fdfefe 0%, #f2f7fe 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
@media (max-width: 1280px) {
  .dashboard-premium-top { grid-template-columns: 1fr; }
  .dashboard-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dashboard-primary-grid, .dashboard-secondary-grid, .dashboard-foot-grid-premium { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .dashboard-premium-shell { padding: 18px; border-radius: 22px; }
  .dashboard-hero-card,
  .dashboard-control-card,
  .premium-panel,
  .premium-info-card,
  .premium-kpi { border-radius: 20px; }
  .dashboard-filter-grid,
  .dashboard-control-snapshot,
  .dashboard-hero-stats,
  .dashboard-primary-grid,
  .dashboard-secondary-grid,
  .dashboard-foot-grid-premium,
  .fuel-summary-grid,
  .day-kpis { grid-template-columns: 1fr; }
  .dashboard-health-pill { white-space: normal; text-align: center; }
  .dashboard-section-heading,
  .dashboard-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }
}


.platform-launcher-card {
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(15,74,138,.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 34px rgba(11,40,78,.06);
}
.platform-launcher-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.platform-launcher-head h2 {
  margin:0 0 6px;
}
.platform-launcher-head p {
  margin:0;
  color:var(--muted);
  font-weight:600;
}
.platform-launcher-mini-note {
  padding:12px 14px;
  border-radius:16px;
  background:#f4f8fe;
  border:1px solid rgba(12,63,120,.08);
  color:#35506e;
  font-size:12px;
  line-height:1.45;
  font-weight:700;
  max-width:320px;
}
.platform-launcher-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}
.platform-launcher-btn {
  appearance:none;
  border:1px solid rgba(12,63,120,.10);
  background:linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-radius:22px;
  padding:18px;
  display:flex;
  align-items:center;
  gap:16px;
  text-align:left;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  box-shadow:0 12px 28px rgba(11,40,78,.05);
}
.platform-launcher-btn:hover {
  transform:translateY(-1px);
  box-shadow:0 16px 30px rgba(11,40,78,.08);
}
.platform-launcher-btn.is-active {
  border-color:rgba(15,74,138,.26);
  box-shadow:0 20px 38px rgba(11,40,78,.10), 0 0 0 1px rgba(15,74,138,.06) inset;
}
.platform-launcher-btn.is-uber.is-active {
  background:linear-gradient(180deg, #f6fbff 0%, #eef6ff 100%);
}
.platform-launcher-btn.is-ifood.is-active {
  background:linear-gradient(180deg, #fff8f4 0%, #fff1e7 100%);
  border-color:rgba(194,96,35,.24);
}
.platform-launcher-icon {
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:20px;
  letter-spacing:-.03em;
  color:#fff;
  background:linear-gradient(180deg, #0f4a8a 0%, #2f7ad8 100%);
  box-shadow:0 12px 24px rgba(15,74,138,.18);
}
.platform-launcher-btn.is-ifood .platform-launcher-icon {
  background:linear-gradient(180deg, #d4541d 0%, #f08a3a 100%);
  box-shadow:0 12px 24px rgba(208,97,35,.18);
}

.platform-launcher-icon-image {
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(238,29,45,.18);
}
.platform-launcher-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
.ifood-title-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ifood-inline-logo {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(238,29,45,.16);
}
.kpi-actionable {
  position: relative;
}
.kpi-link-action {
  margin-top: 12px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f0c79b;
  background: #fff7ef;
  color: #b95f1a;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.kpi-link-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(185,95,26,.10);
  background: #fff3e6;
}
.kpi-link-action[hidden] {
  display: none !important;
}
.btn-complete {
  background: #fff7ef;
  color: #b95f1a;
  border: 1px solid #f0c79b;
}
.form-attention {
  animation: formPulseAttention 1.8s ease;
}
@keyframes formPulseAttention {
  0% { box-shadow: 0 0 0 0 rgba(212,84,29,.22); }
  100% { box-shadow: 0 0 0 16px rgba(212,84,29,0); }
}

.platform-launcher-copy {
  display:grid;
  gap:6px;
  min-width:0;
}
.platform-launcher-copy strong {
  display:block;
  font-size:18px;
}
.platform-launcher-copy small {
  display:block;
  color:var(--muted);
  line-height:1.45;
  font-size:13px;
}
#plataforma-atalho-status {
  margin-top:14px;
}
@media (max-width: 900px) {
  .platform-launcher-head,
  .platform-launcher-grid {
    grid-template-columns:1fr;
  }
  .platform-launcher-head {
    flex-direction:column;
  }
  .platform-launcher-mini-note {
    max-width:none;
  }
  .platform-launcher-grid {
    display:grid;
  }
}


.ifood-quick-card {
  border: 1px solid rgba(194,96,35,.16);
  background: linear-gradient(180deg, #fff9f4 0%, #fffdfb 100%);
  box-shadow: 0 18px 34px rgba(208,97,35,.06);
}
.ifood-quick-head {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:14px;
}
.ifood-quick-head h2 {
  margin:0 0 6px;
}
.ifood-quick-head p {
  margin:0;
  color:var(--muted);
  font-weight:600;
}
.ifood-quick-badge {
  padding:10px 14px;
  border-radius:999px;
  background:rgba(240,138,58,.10);
  color:#ad4f14;
  border:1px solid rgba(194,96,35,.14);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.ifood-quick-grid {
  align-items:end;
}
#ifood-km-calculado {
  font-weight:800;
  color:#8f420f;
  background:#fff7f1;
}
@media (max-width: 900px) {
  .ifood-quick-head {
    flex-direction:column;
  }
  .ifood-quick-badge {
    white-space:normal;
  }
}

/* === v14 | atalhos rápidos centralizados === */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
}
.topbar-actions {
  justify-self: end;
}
.topbar-shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quick-launch-btn {
  min-width: 112px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.quick-launch-btn:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
}
.quick-launch-btn:active {
  transform: translateY(0);
}
.quick-launch-btn .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.quick-launch-copy {
  display: grid;
  text-align: left;
  line-height: 1.05;
}
.quick-launch-copy strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
}
.quick-launch-copy small {
  font-size: 10px;
  opacity: .85;
  font-weight: 700;
}
.quick-launch-modal-card {
  width: min(1280px, 100%);
  height: min(92vh, 960px);
  padding: 0;
  overflow: hidden;
}
.quick-launch-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fbff;
}
.quick-launch-modal-head h3 {
  margin: 0;
}
.quick-launch-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.quick-launch-frame {
  width: 100%;
  height: calc(100% - 78px);
  border: 0;
  display: block;
  background: #fff;
}
.launch-center-card {
  padding: 22px;
}
.launch-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.launch-center-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}
.launch-center-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #edf6ff, #dcecff);
  color: var(--primary);
  font-weight: 900;
  border: 1px solid #cce0f8;
}
.launch-modal-card {
  width: min(920px, 100%);
}
.launch-modal-wide {
  width: min(1100px, 100%);
}
.modal-preview-grid {
  margin-top: 18px;
}
.modal-preview-note {
  margin-top: 18px;
}
body.embedded-launch {
  background: #fff;
}
body.embedded-launch .app-shell {
  display: block;
  min-height: auto;
}
body.embedded-launch .content {
  padding: 0;
}
body.embedded-launch .modal-card {
  max-height: calc(100vh - 28px);
}
body.embedded-launch .modal-backdrop {
  position: static;
  inset: auto;
  background: transparent;
  display: block;
  padding: 12px;
}
body.embedded-launch .modal-backdrop[hidden] {
  display: none !important;
}
body.embedded-launch .modal-card {
  margin: 0 auto;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }
  .clock {
    justify-self: start;
  }
  .topbar-shortcuts {
    justify-self: stretch;
    justify-content: center;
  }
  .topbar-actions {
    justify-self: stretch;
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 900px) {
  .topbar-shortcuts {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }
  .quick-launch-btn {
    min-width: 104px;
    flex: 0 0 auto;
  }
  .quick-launch-modal-card {
    width: 100%;
    height: 96vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .quick-launch-frame {
    height: calc(100% - 84px);
  }
}


/* Central de lançamento premium - campo de colagem inteligente */
.quick-launch-btn {
  background: linear-gradient(180deg, #ffffff, #eef6ff);
  color: var(--primary);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 10px 24px rgba(0, 31, 72, .14);
}
.quick-launch-btn:hover {
  background: #ffffff;
  border-color: rgba(255,255,255,.9);
}
.quick-launch-img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.quick-launch-copy strong {
  color: var(--primary);
}
.quick-launch-copy small {
  color: #456895;
  opacity: 1;
}
.central-paste-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #cfe1f7;
  background: linear-gradient(180deg, #ffffff, #f5faff);
  box-shadow: 0 12px 34px rgba(0, 31, 72, .07);
}
.central-paste-textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.45;
}
.central-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.central-actions-row .btn {
  min-height: 40px;
}
.btn-ghost {
  background: transparent;
  border: 1px dashed #b7cbe4;
  color: var(--primary);
}
@media (max-width: 720px) {
  .quick-launch-btn { min-width: 94px; padding: 8px 9px; }
  .quick-launch-img { width: 36px; height: 36px; border-radius: 10px; }
  .central-actions-row .btn { width: 100%; justify-content: center; }
}


/* === FIX UX FINAL: popups rápidos sem barras/ícones dentro do iframe === */
html.embedded-launch,
html.embedded-launch body,
body.embedded-launch {
  background: transparent !important;
  overflow: hidden !important;
}

html.embedded-launch .topbar,
html.embedded-launch .app-shell,
html.embedded-launch .sidebar,
html.embedded-launch .page-head,
html.embedded-launch .section-stack,
body.embedded-launch .topbar,
body.embedded-launch .app-shell,
body.embedded-launch .sidebar,
body.embedded-launch .page-head,
body.embedded-launch .section-stack {
  display: none !important;
}

html.embedded-launch .modal-backdrop,
body.embedded-launch .modal-backdrop {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  min-height: auto !important;
  background: transparent !important;
  display: block !important;
  padding: 0 !important;
}

html.embedded-launch .modal-backdrop[hidden],
body.embedded-launch .modal-backdrop[hidden] {
  display: none !important;
}

html.embedded-launch .modal-card,
body.embedded-launch .modal-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  max-height: calc(100vh - 4px) !important;
  overflow: auto !important;
}

html.embedded-launch .modal-title-row .ui-icon,
body.embedded-launch .modal-title-row .ui-icon {
  display: none !important;
}

#quick-launch-modal .quick-launch-modal-head {
  display: none !important;
}

#quick-launch-modal .quick-launch-modal-card {
  padding: 0 !important;
  overflow: hidden !important;
}

#quick-launch-modal .quick-launch-frame {
  border: 0 !important;
  width: 100% !important;
  min-height: 520px !important;
  background: transparent !important;
}

/* KM por aplicativo - Controle diário */
.soft-note {
  background: rgba(238, 247, 250, 0.72);
  border-style: dashed;
  margin: 0;
}
.platform-km-summary {
  display: grid;
  gap: 10px;
}
.platform-km-row,
.platform-km-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}
.platform-km-row {
  box-shadow: 0 6px 18px rgba(13, 52, 106, 0.05);
}
.platform-km-main {
  display: grid;
  gap: 3px;
}
.platform-km-main strong {
  font-size: 15px;
  color: var(--text);
}
.platform-km-main span {
  color: var(--muted);
  font-size: 12px;
}
.platform-km-value {
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
}
.platform-km-total {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.platform-km-total strong {
  font-size: 17px;
}
@media (max-width: 720px) {
  .platform-km-row,
  .platform-km-total {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* === v19 | limpeza premium e menos duplicidade === */
:root { --panel-soft: #f8fbff; --ring: rgba(12, 63, 120, .10); }
.page-head { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.page-title h1 { letter-spacing: -.02em; }
.page-subtitle { margin-top: 4px; line-height: 1.45; }
.card { box-shadow: 0 10px 28px rgba(13,52,106,.06); }
.kpi { min-height: 108px; }
.kpi .label { margin-bottom: 12px; color: var(--primary); }
.kpi .value { letter-spacing: -.03em; }
.kpi .sub { line-height: 1.25; }
.dashboard-main-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-secondary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.launch-clean-card { overflow: hidden; }
.launch-choice-grid { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:14px; margin-top:18px; }
.launch-choice-btn { min-width:0; min-height:96px; display:grid; grid-template-columns:auto 1fr; grid-template-areas:"icon title" "icon sub"; align-items:center; text-align:left; gap:4px 12px; border-radius:20px; padding:16px; }
.launch-choice-btn .ui-icon { grid-area:icon; width:24px; height:24px; }
.launch-choice-btn strong { grid-area:title; font-size:17px; }
.launch-choice-btn small { grid-area:sub; font-size:12px; font-weight:700; opacity:.82; line-height:1.25; }
.compact-record-card { grid-template-columns:1fr auto; border-color:rgba(12,63,120,.10); background:linear-gradient(180deg,#fff 0%,#fbfdff 100%); }
.compact-metrics { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:10px; margin-top:12px; }
.compact-metrics span { display:grid; gap:3px; padding:10px 12px; border:1px solid rgba(12,63,120,.08); border-radius:14px; background:var(--panel-soft); }
.compact-metrics small { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.compact-metrics strong { font-size:15px; color:var(--text); }
.record-details { margin-top:12px; }
.record-details summary { cursor:pointer; color:var(--primary); font-weight:900; list-style:none; display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:#eef6ff; border:1px solid #cfe0f4; }
.record-details summary::-webkit-details-marker { display:none; }
.record-details[open] summary { margin-bottom:12px; }
.optional-costs-box { border:1px dashed #c6d8ef; border-radius:18px; padding:12px; background:#fbfdff; }
.optional-costs-box summary { cursor:pointer; font-weight:900; color:var(--primary); padding:6px 2px; }
.optional-costs-box .soft-note { margin:10px 0 12px; }
.optional-costs-grid { margin-top:0; }
.cost-topbar { justify-content:space-between; align-items:end; }
.cost-nav-pills { display:flex; flex-wrap:wrap; gap:10px; }
.cost-nav-pills a { display:inline-flex; align-items:center; min-height:42px; padding:10px 14px; border-radius:999px; background:#eef6ff; border:1px solid #cfe0f4; color:var(--primary); font-weight:900; text-decoration:none; }
.module-card { scroll-margin-top:96px; }
.compact-help-card .legend-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:1200px) { .dashboard-main-grid, .dashboard-secondary-grid, .launch-choice-grid, .compact-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) { .dashboard-main-grid, .dashboard-secondary-grid, .launch-choice-grid, .compact-metrics, .compact-help-card .legend-grid { grid-template-columns:1fr; } .compact-record-card{grid-template-columns:1fr;} .launch-choice-btn{min-height:82px;} }
