:root {
  --font-family: "Montserrat", sans-serif;
  --navy: #061d49;
  --navy-2: #0a2d68;
  --red: #d90816;
  --red-dark: #b90611;
  --ink: #13213b;
  --muted: #66758e;
  --line: #dce4ef;
  --canvas: #f3f6fb;
  --paper: #ffffff;
  --shadow: 0 8px 24px rgba(7, 31, 76, .08);
}

[hidden] {
  display: none !important;
}

body {
  background: radial-gradient(circle at 85% 0, #e9eef8 0, transparent 24rem), var(--canvas);
  font-family: var(--font-family);
}

.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #041535 100%);
  box-shadow: 8px 0 30px rgba(4, 21, 53, .12);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 6px 10px 22px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.brand strong {
  letter-spacing: .5px;
}

.sidebar p {
  font-weight: 700;
  letter-spacing: 1.25px;
}

.nav-link {
  border-left: 3px solid transparent;
  margin: 2px 0;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-link:hover,
.nav-link.active {
  border-left-color: var(--red);
  background: rgba(255, 255, 255, .93);
}

.content {
  padding: 34px clamp(20px, 3vw, 46px);
}

.topbar {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(185, 197, 215, .7);
}

.topbar h1 {
  color: var(--navy);
  letter-spacing: -.6px;
}

.section-head h2 {
  color: var(--navy);
  letter-spacing: -.35px;
}

.section-head {
  padding: 2px 0 4px;
}

.section-head p {
  max-width: 760px;
  line-height: 1.45;
}

.stat-grid article,
.panel,
.form-panel,
.print-document {
  border-color: rgba(209, 219, 233, .9);
  box-shadow: var(--shadow);
}

.stat-grid article {
  position: relative;
  overflow: hidden;
  min-height: 112px;
}

.stat-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--red), #ee3340);
}

.stat-grid strong {
  color: var(--navy);
  letter-spacing: -1px;
}

.stat-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.panel,
.form-panel {
  margin-bottom: 20px;
}

.settlement-trips {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settlement-trips h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 16px;
}

.form-panel {
  border-top: 3px solid var(--navy-2);
}

.form-panel .form-actions {
  padding-top: 4px;
  border-top: 1px solid #edf1f7;
}

.panel-head {
  margin-bottom: 8px;
}

.primary,
.secondary,
.text-button {
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(7, 31, 76, .14);
}

.primary:hover {
  background: var(--red-dark);
}

.primary:focus-visible,
.secondary:focus-visible,
.text-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.delivery-row input,
.delivery-row select {
  border-color: #c5d0df;
  min-height: 43px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.delivery-row input:focus,
.delivery-row select:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(10, 45, 104, .08);
}

th {
  background: #f7f9fc;
  color: #52617a;
  white-space: nowrap;
}

tbody tr {
  transition: background .12s ease;
}

tbody tr:hover {
  background: #f8faff;
}

td:last-child {
  white-space: nowrap;
}

.table-wrap table {
  min-width: 680px;
}

.status {
  border: 1px solid #d4deec;
  background: #edf3fb;
}

.empty {
  border-radius: 9px;
}

dialog {
  border: 1px solid rgba(209, 219, 233, .9);
  box-shadow: 0 24px 70px rgba(5, 25, 61, .3);
}

dialog header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.print-document {
  border-top: 5px solid var(--navy);
}

.catalog-status {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 9px;
  line-height: 1.45;
}

.catalog-warning {
  color: #8a3412;
  background: #fff7ed;
  border-color: #fdba74;
}

.catalog-ok {
  color: #166534;
  background: #f0fdf4;
  border-color: #86efac;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none !important;
}

.clean-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.danger-link {
  color: #b91c1c;
}

.field-feedback {
  color: #52617a;
  font-weight: 400;
  line-height: 1.35;
}

.cargo-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cargo-section .panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.cargo-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.cargo-row label,
.delivery-products label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.cargo-row input,
.cargo-row select,
.delivery-products input {
  width: 100%;
  min-height: 43px;
  border: 1px solid #c5d0df;
  border-radius: 7px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

.delivery-card {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}

.delivery-card .delivery-row {
  grid-template-columns: minmax(190px, 1.4fr) minmax(190px, 1.2fr) minmax(200px, 1.4fr) auto;
  padding-top: 0;
}

.delivery-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 13px;
}

@media (max-width: 780px) {
  .cargo-row,
  .delivery-card .delivery-row,
  .delivery-products { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .content { padding-inline: 22px; }
}

@media (max-width: 780px) {
  .app-shell { grid-template-columns: 150px minmax(0, 1fr); }
  .brand img { width: 40px; height: 40px; }
  .content { padding: 18px 14px; }
  .stat-grid article { min-height: 92px; }
  .topbar { align-items: flex-start; }
  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .primary,
  .section-head .secondary { align-self: flex-start; }
  .form-actions { flex-wrap: wrap; }
}

@media print {
  .panel,
  .print-document { box-shadow: none; }
}

/* Visual corporativo claro validado no protótipo de setembro/2026. */
.app-shell { display: block; }
.sidebar { position: sticky; z-index: 50; top: 0; height: auto; min-height: 0; display: flex; flex-direction: row; align-items: center; gap: 22px; padding: 12px clamp(18px,3vw,42px) 0; overflow: visible; background: rgba(255,255,255,.97); color: var(--navy); border-bottom: 1px solid var(--line); box-shadow: 0 7px 24px rgba(7,31,76,.06); backdrop-filter: blur(12px); }
.brand { flex: 0 0 auto; padding: 0 18px 12px 0; border: 0; background: transparent; color: var(--navy); cursor: pointer; font: inherit; text-align: left; }
.brand .brand-copy { color: var(--navy); }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.brand:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 6px; }
.brand img { width: 64px; height: 64px; }
.brand span { color: var(--muted); }
.sidebar nav { display: flex; align-items: flex-end; gap: 2px; flex: 1; min-width: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.sidebar p { flex: 0 0 auto; align-self: center; margin: 0 8px 12px 18px; color: #8490a3; font-size: 9px; }
.sidebar p:first-child { margin-left: 0; }
.nav-link { flex: 0 0 auto; width: auto; margin: 0; padding: 15px 11px 13px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #4f5f77; white-space: nowrap; }
.nav-link:hover { transform: none; background: #f5f7fb; color: var(--navy); }
.nav-link.active { border: 0; border-bottom: 3px solid var(--red); background: transparent; color: var(--navy); }
.sidebar > small { display: none; }
.content { max-width: 1320px; margin: 0 auto; padding: 28px 30px 70px; }
.topbar { margin-bottom: 24px; }
.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dashboard-intro span { color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.dashboard-intro h2 { margin: 5px 0 4px; color: var(--navy); font-size: 25px; }
.dashboard-intro p,.dashboard-chart-panel .panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.dashboard-four { gap: 0 !important; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.dashboard-four article { min-height: 126px; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.dashboard-four article:first-child { border-left: 0; }
.dashboard-four article::before { display: none; }
.dashboard-charts { display: grid; grid-template-columns: 1.45fr .85fr; gap: 18px; margin-top: 20px; }
.dashboard-chart-panel { min-height: 310px; }
.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: 11px; font-weight: 700; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.chart-legend .revenue { background: var(--navy-2); }.chart-legend .expense { background: var(--red); }
.dashboard-bars { display: grid; grid-template-columns: repeat(6,minmax(38px,1fr)); align-items: end; gap: 14px; min-height: 215px; padding-top: 20px; border-bottom: 1px solid var(--line); }
.month-bar { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 4px; height: 190px; position: relative; }
.month-bar i { align-self: end; min-height: 3px; border-radius: 5px 5px 0 0; background: linear-gradient(#315f9f,var(--navy)); }
.month-bar i.expense { background: linear-gradient(#ed4b57,var(--red)); }
.month-bar > .month-label { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); color: var(--muted); font-size: 10px; }
.station-ranking { display: grid; gap: 15px; padding-top: 14px; }
.station-row { display: grid; grid-template-columns: minmax(90px,1fr) 1.5fr auto; align-items: center; gap: 11px; font-size: 12px; }
.station-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station-track { height: 9px; overflow: hidden; border-radius: 99px; background: #edf1f6; }
.station-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--navy),#3f76b8); }
.dashboard-lower { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; margin-top: 20px; }

/* Login escuro da opção C. */
.auth-gate { background: radial-gradient(circle at 18% 8%,#174d9966 0,transparent 32rem),radial-gradient(circle at 85% 92%,#d9081635 0,transparent 26rem),#06183b; }
.auth-card { color: #fff; background: rgba(10,38,84,.94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 90px rgba(0,0,0,.48); backdrop-filter: blur(15px); }
.auth-brand { border-color: rgba(255,255,255,.14); }.auth-brand strong,.auth-step h1 { color: #fff; }.auth-brand span,.auth-step p,.auth-note { color: #bdcce4; }
.auth-step label { color: #edf3ff; }.auth-step input { color: var(--ink); background: #fff; border-color: rgba(255,255,255,.35); }
.auth-card .text-button { color: #c4d9ff; }.auth-card .secondary { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }

@media(max-width:1000px){.sidebar{align-items:flex-start;flex-direction:column;gap:0;padding-bottom:0}.brand{padding-bottom:8px}.sidebar nav{width:100%}.content{padding-inline:22px}.dashboard-charts,.dashboard-lower{grid-template-columns:1fr}}
@media(max-width:780px){.sidebar{position:relative;padding:12px 14px 0}.sidebar p{display:none}.nav-link{padding:12px 10px 10px}.content{padding:18px 14px 70px}.dashboard-intro{align-items:flex-start;flex-direction:column}.dashboard-four article{border-left:0;border-top:1px solid var(--line)}.dashboard-four article:first-child{border-top:0}.dashboard-bars{gap:7px}.chart-legend{flex-direction:column;gap:5px}}

/* Navegação em dois níveis: áreas principais e subcategorias. */
.sidebar { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; column-gap: 28px; padding-bottom: 0; }
.sidebar nav { display: block; width: 100%; overflow: hidden; }
.main-navigation { display: flex; align-items: center; gap: 5px; min-height: 48px; overflow-x: auto; }
.menu-group { flex: 0 0 auto; padding: 14px 15px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #52617a; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.menu-group:hover { color: var(--navy); background: #f6f8fb; }
.menu-group.active { color: var(--navy); border-bottom-color: var(--red); }
.sub-navigation { min-height: 43px; border-top: 1px solid #edf1f6; }
.sub-navigation > div { display: flex; align-items: center; gap: 5px; overflow-x: auto; }
.sub-navigation > div[hidden] { display: none; }
.sub-navigation .nav-link { padding: 11px 12px 10px; border: 0; border-bottom: 2px solid transparent; color: #66758e; font-size: 13px; }
.sub-navigation .nav-link:hover { background: #f6f8fb; }
.sub-navigation .nav-link.active { border-bottom-color: var(--red); color: var(--navy); background: #f8faff; }
.topbar { min-height: 48px; justify-content: flex-end; margin-bottom: 18px; padding-bottom: 12px; }
.topbar > div:first-child { display: none; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 42px; padding: 18px 0 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.app-footer > div { display: flex; align-items: center; gap: 10px; }
.footer-version { color: #7b8799; font-size: 11px; }
.app-footer .sync-status { padding: 6px 10px; font-size: 11px; cursor: pointer; }
@media(max-width:1000px){.sidebar{display:block}.brand{display:none}.main-navigation{width:100%}}

/* Acabamento uniforme das telas internas. */
body:has(.auth-gate:not([hidden])) { overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.view > .section-head { margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.view > .section-head h2 { font-size: clamp(21px,2vw,26px); }
.view > .section-head p { margin-top: 6px; }
.view > .section-head > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
.panel h2,.form-panel h2 { color: var(--navy); letter-spacing: -.2px; }
.form-panel > h2 { margin: 0 0 18px; font-size: 18px; }
.form-panel { padding: clamp(18px,2.2vw,26px); }
.form-grid { gap: 18px 16px; }
.form-grid label { color: #263752; line-height: 1.25; }
.form-grid textarea { resize: vertical; min-height: 88px; }
.form-actions { align-items: center; }
.primary,.secondary { min-height: 42px; }
.table-wrap { overflow-x: auto; overflow-y: hidden; border-radius: 13px; }
.table-wrap table { min-width: 680px; }
.table-wrap thead { position: sticky; top: 0; z-index: 1; }
.table-wrap th { padding-block: 13px; background: #f4f7fb; }
.table-wrap td { vertical-align: middle; line-height: 1.4; }
.table-wrap td:last-child { text-align: right; }
.table-wrap td:last-child .text-button:not([role="menuitem"]) { margin-left: 2px; }
.freight-config .panel-head { margin-bottom: 16px; flex-wrap: wrap; }
.freight-config .panel-head p { max-width: 720px; margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.freight-config .table-wrap table { min-width: 850px; }
.freight-config .table-wrap th,.freight-config .table-wrap td { padding: 9px; }
.freight-config .table-wrap input,.freight-config .table-wrap select,.freight-config textarea { width: 100%; min-height: 40px; border: 1px solid #c7d2e1; border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); font: inherit; }
.freight-config .table-wrap td:nth-child(2) { min-width: 200px; }
.freight-config .table-wrap td:nth-child(4) { min-width: 150px; }
.freight-config > label { display: block; margin-top: 20px; font-weight: 700; }
.freight-config textarea { display: block; margin-top: 8px; min-height: 110px; resize: vertical; }
.clean-list li { min-height: 52px; }
.two-panels > .panel { min-width: 0; }
.empty { min-height: 76px; display: grid; place-items: center; line-height: 1.5; background: linear-gradient(135deg,#fbfcfe,#f5f8fc); }
.panel > .empty { margin: 4px -4px -4px; }
dialog { max-height: calc(100vh - 32px); overflow: auto; }
dialog header { position: sticky; top: -20px; z-index: 2; background: #fff; }
dialog header button { width: 38px; height: 38px; border-radius: 50%; color: var(--muted); }
dialog header button:hover { background: #f0f3f8; color: var(--navy); }
.sync-panel { align-items: center; }
.app-footer { margin-bottom: 8px; }
#documents .table-wrap .panel-head { align-items: flex-end; margin: 0; padding: 20px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#fff,#f7f9fd); }
#documents .table-wrap .panel-head h2 { flex: 1 1 260px; min-width: 220px; margin: 0; font-size: 19px; line-height: 1.25; white-space: normal; }
#documents .table-wrap .panel-head > div { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#document-group-filter,#document-truck-filter,#document-status-filter { min-width: 180px; min-height: 42px; padding: 9px 36px 9px 12px; border: 1px solid #c7d2e1; border-radius: 9px; background-color: #fff; color: var(--ink); font: inherit; font-size: 13px; box-shadow: 0 2px 7px rgba(7,31,76,.05); cursor: pointer; }
#document-group-filter:focus,#document-truck-filter:focus,#document-status-filter:focus { border-color: var(--navy-2); outline: 3px solid rgba(10,45,104,.08); outline-offset: 1px; }

@media(max-width:780px){
  .content{padding:16px 12px 56px}
  .main-navigation{gap:0}
  .menu-group{padding:12px 11px 10px;font-size:13px}
  .sub-navigation{min-height:40px}
  .sub-navigation .nav-link{padding:10px 9px 9px;font-size:12px}
  .view > .section-head{gap:14px;padding-bottom:13px}
  .view > .section-head > button,.view > .section-head > div:last-child:not(:first-child){align-self:stretch}
  .view > .section-head > button{width:100%}
  .view > .section-head > div:last-child:not(:first-child) > button{flex:1}
  .form-actions{justify-content:stretch}
  .form-actions > button{flex:1}
  .table-wrap{margin-inline:-2px}
  .two-panels{gap:14px}
  .app-footer{justify-content:space-between}
  #documents .table-wrap .panel-head{align-items:stretch;padding:17px 16px}
  #documents .table-wrap .panel-head > div{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #document-group-filter,#document-truck-filter,#document-status-filter{width:100%;min-width:0}
}
@media(max-width:520px){#documents .table-wrap .panel-head > div{grid-template-columns:1fr}}
@media(max-width:520px){
  body .auth-gate{padding:16px}
  .auth-gate .auth-card{width:min(460px,calc(100vw - 32px));padding:22px}
  .auth-brand img{width:54px;height:54px}
  .auth-brand strong{font-size:21px}
  .auth-step h1{font-size:23px}
  .main-navigation{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .menu-group{scroll-snap-align:start}
}

/* Viagens: mesa de operações aprovada no protótipo A. */
#trip-entry-form > h2 { margin: 0 0 6px; font-size: 22px; }
#trip-entry-form > .trip-form-intro { margin: 0 0 24px; color: var(--muted); }
#trips .trip-metric { width: min(340px, 100%); margin-bottom: 20px; padding: 15px 18px; }
#trips .trip-metric span { display: block; color: var(--muted); font-size: 14px; }
#trips .trip-metric strong { display: block; margin-top: 4px; color: var(--navy); font-size: 26px; }
#trips .trip-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
#trips .trip-toolbar input,#trips .trip-toolbar select { min-height: 42px; border: 1px solid #c7d2e1; border-radius: 9px; padding: 9px 12px; background: #fff; color: var(--ink); font: inherit; }
#trips .trip-toolbar input { width: min(330px, 100%); }
#trips .trip-toolbar small { margin-left: auto; color: var(--muted); }
#trips .trip-table table { min-width: 1060px; }
#trips .trip-table th { padding: 11px 13px; font-size: 10.5px; letter-spacing: .65px; }
#trips .trip-table td { padding: 11px 13px; font-size: 12.5px; line-height: 1.3; }
#trips .trip-table td:nth-child(3) { max-width: 200px; }
#trips .trip-date,#trips .trip-numeric,#trips .trip-money { white-space: nowrap; }
#trips .trip-table strong,#trips .trip-money { color: var(--navy); font-weight: 800; }
#trips .trip-table tr:hover td { background: #fbfcff; }
#trips .trip-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
#trips .trip-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#trips .trip-status.route { background: #e8f1ff; color: #2759a2; }
#trips .trip-status.wait { background: #fff2dd; color: #a76010; }
#trips .trip-status.done { background: #e8f8ef; color: #15794c; }
#trips .trip-status.issue { background: #fff0f1; color: #b51b2b; }
#trips .trip-detail-button:not([role="menuitem"]) { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 10px; border: 1px solid #ccd8e7; border-radius: 8px; background: #f8fafd; color: var(--navy); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
#trips .trip-detail-button:not([role="menuitem"]):hover { background: #eaf1fb; border-color: #a9bfdc; }
#trips .trip-detail-button:not([role="menuitem"]) span { font-size: 18px; line-height: 1; }
@media(max-width:780px){#trips .trip-toolbar small{width:100%;margin-left:0}#trips .trip-toolbar input{flex:1 1 100%}}

/* Financeiro: mesma linguagem compacta da proposta A, sem alterar os documentos para impressão. */
:is(#receivables,#expenses,#driver-settlements,#closings,#reports) > :is(.panel,.form-panel) { border-radius: 17px; }
:is(#receivables,#expenses) .stat-grid article { min-height: 108px; border-radius: 16px; }
:is(#receivables,#expenses) .stat-grid article:nth-child(2)::before { background: #d18a27; }
:is(#receivables,#expenses) .stat-grid article:nth-child(3)::before { background: var(--navy-2); }
:is(#receivables,#expenses) .stat-grid strong { font-size: 28px; }
.finance-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.finance-toolbar :is(input,select) { min-height: 43px; border: 1px solid #c7d2e1; border-radius: 9px; padding: 9px 12px; background: #fff; color: var(--ink); font: inherit; }
.finance-toolbar input { width: min(310px,100%); }
.finance-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.finance-panel-head h2 { margin: 0; font-size: 18px; }
.finance-panel-head small { color: var(--muted); font-size: 12px; }
#driver-settlements > .table-wrap > h2,#closings > .table-wrap > h2 { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 18px; }
#driver-settlement-preview:not(.empty) { padding: 24px; }
#driver-settlement-preview:not(.empty) > h2 { font-size: 20px; }
#closing-preview:not(.empty),#report-preview:not(.empty) { border-radius: 17px; box-shadow: var(--shadow); }
.finance-table table { min-width: 850px; }
#receivables .finance-table table { min-width: 1080px; }
:is(#receivables,#expenses,#driver-settlements,#closings) .table-wrap th { padding: 12px 13px; font-size: 10.5px; letter-spacing: .65px; }
:is(#receivables,#expenses,#driver-settlements,#closings) .table-wrap td { padding: 12px 13px; font-size: 12.5px; }
:is(#receivables,#expenses,#driver-settlements,#closings) .table-wrap tbody tr:hover td { background: #fbfcff; }
.finance-money { color: var(--navy); font-weight: 800; white-space: nowrap; }
.finance-quiet { color: var(--muted); font-size: 12px; }
.finance-action { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.finance-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.finance-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.finance-status.late { color: #b51b2b; background: #fff0f1; }
.finance-status.soon { color: #9c6017; background: #fff2dd; }
.finance-status.partial { color: #2759a2; background: #e8f1ff; }
.finance-status.paid { color: #15794c; background: #e8f8ef; }
.finance-history { margin-top: 5px; color: var(--muted); font-size: 11px; }
.finance-history summary { cursor: pointer; color: var(--navy-2); }
.finance-history > div { min-width: 190px; padding: 5px 0; line-height: 1.45; }
.finance-history .text-button:not([role="menuitem"]) { padding: 2px 4px; font-size: 11px; }
@media(max-width:780px){.finance-toolbar :is(input,select){flex:1 1 100%;width:100%}.finance-panel-head{padding:15px}}

/* Acabamento das demais páginas, seguindo os cartões e tabelas da opção A. */
.content { max-width: 1480px; }
.view > .section-head h2 { font-size: clamp(24px,2.2vw,30px); }
.view > .section-head p { font-size: 15px; }
.view > :is(.panel,.form-panel),#bases .two-panels > .panel { border-radius: 17px; }
.dashboard-intro { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dashboard-intro h2 { font-size: clamp(25px,2.3vw,31px); }
.dashboard-intro p { font-size: 15px; }
.dashboard-four { gap: 14px !important; overflow: visible; border: 0; background: transparent; }
.dashboard-four article { min-height: 116px; border: 1px solid var(--line); border-left: 4px solid var(--navy-2); border-radius: 16px; box-shadow: var(--shadow); }
.dashboard-four article:first-child { border-left: 4px solid var(--navy-2); }
.dashboard-four article:nth-child(2) { border-left-color: var(--red); }
.dashboard-four article:nth-child(3) { border-left-color: #d18a27; }
.dashboard-four article:nth-child(4) { border-left-color: #168059; }
.dashboard-four strong { font-size: clamp(22px,2vw,29px); }
.dashboard-chart-panel,.dashboard-lower > .panel { border-radius: 17px; }
.dashboard-chart-panel .panel-head,.dashboard-lower .panel-head { gap: 12px; }
.dashboard-lower .panel-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dashboard-lower .panel-head h2 { margin: 0; }
.dashboard-lower .panel-head .text-button,.dashboard-chart-panel .panel-head .text-button { white-space: nowrap; }

:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap table { min-width: 760px; }
#clients > .table-wrap table { min-width: 540px; }
#stations > .table-wrap table,#drivers > .table-wrap table { min-width: 980px; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap th { padding: 12px 13px; font-size: 10.5px; letter-spacing: .65px; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap td { padding: 12px 13px; font-size: 12.5px; line-height: 1.4; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap td strong { color: var(--navy); font-size: 13px; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap td small { color: var(--muted); font-size: 11px; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap { scrollbar-width: thin; scrollbar-color: #c4d2e5 transparent; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap::-webkit-scrollbar { height: 7px; }
:is(#clients,#stations,#trucks,#drivers,#maintenance,#documents) > .table-wrap::-webkit-scrollbar-thumb { border-radius: 8px; background: #c4d2e5; }
:is(#clients,#stations,#trucks,#drivers,#bases,#maintenance,#documents) :is(td:last-child,.clean-list li > span:last-child) .text-button:not([role="menuitem"]) { min-height: 32px; margin: 2px 3px 2px 0; padding: 5px 9px; border: 1px solid #ccd8e7; border-radius: 8px; background: #f8fafd; font-size: 11.5px; white-space: nowrap; }
:is(#clients,#stations,#trucks,#drivers,#bases,#maintenance,#documents) :is(td:last-child,.clean-list li > span:last-child) .text-button:not([role="menuitem"]):hover { border-color: #a9bfdc; background: #eaf1fb; }
:is(#clients,#stations,#trucks,#drivers,#bases,#maintenance,#documents) .danger-link:not([role="menuitem"]) { color: #ad1930; }
:is(#clients,#stations,#trucks,#drivers,#bases,#maintenance,#documents) .danger-link:not([role="menuitem"]):hover { border-color: #e6a2ad !important; background: #fff0f2 !important; }
#bases .two-panels { align-items: start; }
#bases .two-panels > .panel { padding: 0; overflow: hidden; }
#bases .two-panels > .panel h2 { margin: 0; padding: 19px 21px; border-bottom: 1px solid var(--line); font-size: 18px; }
#bases .clean-list { padding: 0 20px; }
#bases .clean-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; font-size: 13px; }
#bases .clean-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#bases .clean-list li > span:last-child { flex: 0 0 auto; }
#bases .panel > .empty { margin: 0; }

:is(#maintenance,#documents) .stat-grid article { min-height: 108px; border-radius: 16px; }
:is(#maintenance,#documents) .stat-grid article:nth-child(2)::before { background: #d18a27; }
:is(#maintenance,#documents) .stat-grid article:nth-child(3)::before { background: var(--navy-2); }
:is(#maintenance,#documents) .stat-grid strong { font-size: 28px; }
#maintenance-form .form-grid > label:first-child select { font-weight: 700; }
#maintenance .table-wrap td:nth-child(3) { max-width: 260px; color: #52617a; }
#maintenance .table-wrap td:nth-child(4) { color: var(--navy); font-weight: 800; white-space: nowrap; }
#documents .table-wrap .panel-head { background: #fff; }
#documents .table-wrap td:nth-child(3) { min-width: 180px; }

#settings > :is(.panel,.form-panel) { padding: clamp(19px,2.2vw,26px); }
#settings .sync-panel { display: flex; justify-content: space-between; gap: 20px; border-left: 4px solid var(--navy-2); }
#settings .sync-panel h2 { margin: 11px 0 4px; font-size: 18px; }
#settings .sync-panel p { margin: 0; color: var(--muted); line-height: 1.45; }
#settings .sync-panel .form-actions { margin: 0; flex: 0 0 auto; }
#settings #administrator-form { background: #fbfcff; }
#settings #administrator-form p,#settings .backup-panel p { max-width: 780px; color: var(--muted); line-height: 1.5; }
#settings #company-form > h2 { margin: 0 0 20px; font-size: 18px; }
#settings .backup-panel .panel-head { align-items: flex-start; }
#settings .backup-panel .form-actions { margin-top: 16px; }
@media(max-width:780px){
  .dashboard-four article,.dashboard-four article:first-child { border: 1px solid var(--line); border-left: 4px solid var(--navy-2); }
  .dashboard-four article:nth-child(2) { border-left-color: var(--red); }
  .dashboard-four article:nth-child(3) { border-left-color: #d18a27; }
  .dashboard-four article:nth-child(4) { border-left-color: #168059; }
  .dashboard-intro .primary { width: 100%; }
  #settings .sync-panel { flex-direction: column; align-items: stretch; }
  #settings .sync-panel .form-actions { justify-content: flex-start; }
  #settings .backup-panel .form-actions { flex-wrap: wrap; }
  #settings .backup-panel .form-actions > button { flex: 1 1 180px; }
}
@media(max-width:520px){#bases .clean-list li { display: block; }#bases .clean-list li > span:last-child { display: block; margin-top: 8px; }}

/* A impressão contém somente o documento comercial ativo. */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .auth-gate,
  .sidebar,
  .topbar,
  .section-head,
  .form-panel,
  .app-footer,
  .no-print,
  dialog { display: none !important; }
  .app-shell,
  .content { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .view { display: none !important; }
  .view.active { display: block !important; }
  .view.active > *:not(.print-document) { display: none !important; }
  .view.active > .print-document { display: block !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  .print-document tr { break-inside: avoid; }
}
/* Seleções compactas, sem herdar largura e padding dos campos de formulário. */
#closing-station-picker { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #f8faff; }
.station-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.station-picker-head strong { font-size: 13px; }
.station-picker-head strong small { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); }
.station-picker-head .text-button { font-size: 12px; }
#closing-station-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
#closing-station-options .closing-station-option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 400; }
#closing-station-options .closing-station-option:has(:checked) { border-color: #becde3; background: #edf3fc; }
#closing-station-options .closing-station-option span { overflow-wrap: anywhere; }
#closing-station-picker > small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
#closing-station-options input[type="checkbox"], .closing-trip-option input[type="checkbox"] { appearance: auto; width: 17px; height: 17px; min-height: 0; flex: 0 0 17px; padding: 0; margin: 0; accent-color: var(--navy); cursor: pointer; }
.closing-selection { padding: 0 0 22px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.closing-selection h3 { margin: 0 0 7px; color: var(--navy); }
.closing-selection p { color: var(--muted); font-size: 13px; }
.closing-trip-options { max-height: 320px; overflow-y: auto; }
.closing-trip-option { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 2px; cursor: pointer; font-size: 13px; }
.closing-trip-option span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.closing-trip-option small { display: block; margin-top: 4px; color: var(--muted); }
.closing-trip-option b { white-space: nowrap; }
#trip-custom-range[hidden] { display: none; }
#trip-custom-range label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
#trip-period-error { color: var(--red); font-size: 13px; }
@media(max-width:780px) {
  #closing-station-options { grid-template-columns: 1fr; }
  #trips #trip-custom-range input { width: 100%; }
  #trip-custom-range label { flex: 1; min-width: 135px; }
  .closing-trip-option { flex-wrap: wrap; }
  .closing-trip-option b { padding-left: 29px; }
}
.expense-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#expense-details-dialog { width: min(680px, calc(100vw - 32px)); padding: 24px; }
#expense-details-dialog header { gap: 12px; }
#expense-details-dialog header h2 { margin: 0; font-size: 20px; line-height: 1.35; }
#expense-details-title { overflow-wrap: anywhere; }
.expense-detail-amount { margin: 20px 0; color: var(--navy); font-size: 28px; font-weight: 800; }
.expense-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 0; }
.expense-detail-grid dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.expense-detail-grid dd { margin: 0; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.expense-detail-notes { margin-top: 22px; padding: 16px; background: #f3f6fb; border: 1px solid var(--line); border-radius: 12px; }
.expense-detail-notes h3 { margin: 0 0 10px; font-size: 14px; }
.expense-detail-notes p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
@media (max-width: 520px) { .expense-detail-grid { grid-template-columns: 1fr; } }
.row-actions { display: inline-flex; vertical-align: middle; }
.row-actions-trigger { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--navy); font: 700 24px/1 var(--font-family); cursor: pointer; }
.row-actions-trigger:hover,.row-actions-trigger[aria-expanded="true"] { background: #eef3fa; border-color: #a9bbd6; }
.row-actions-trigger:focus-visible,.row-actions-menu > button:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }
.row-actions-menu { position: fixed; inset: auto; margin: 0; width: min(224px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 12px 36px #061d4929; }
.row-actions-menu:popover-open { display: grid; gap: 3px; }
.row-actions-menu > button { display: block; width: 100%; margin: 0; padding: 11px 12px; min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--navy); text-align: left; white-space: normal; font: 600 13px/1.4 var(--font-family); cursor: pointer; }
.row-actions-menu > button:hover,.row-actions-menu > button:focus-visible { background: #f0f4fa; transform: none; box-shadow: none; }
.row-actions-menu > button.danger-link { color: var(--red-dark); }
.row-actions-menu > button:disabled { opacity: .5; cursor: default; }
.row-actions-menu .trip-detail-button span { display: none; }
@media print { .row-actions,.row-actions-menu { display: none !important; } }

/* A mesma família alcança os controles nativos e documentos impressos. */
html,button,input,select,textarea,option,dialog,code,pre { font-family: var(--font-family); }
.document-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.document-status::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.document-status.valid { background: #e0f4e9; color: #11643a; border-color: #79bd96; }
.document-status.expired { background: #fde5e7; color: #a31227; border-color: #e9909c; }
.document-status.urgent { background: #ffeadb; color: #9a3b00; border-color: #e3955e; }
.document-status.soon { background: #fff0c2; color: #854900; border-color: #dba549; }
.document-status.watch { background: #e5efff; color: #174b95; border-color: #8eafe2; }
.document-status.neutral { background: #eef1f5; color: #52617a; border-color: #bbc5d3; }
@media print { .document-status { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

.document-type-toolbar { display:flex; gap:8px; flex-wrap:wrap; }
#document-types-dialog { width:min(760px,calc(100vw - 32px)); max-height:85vh; padding:24px; overflow:auto; }
#document-types-dialog header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#document-types-dialog label { display:grid; gap:8px; }
#document-types-dialog table { min-width:420px; width:100%; }
#document-types-dialog td:first-child { overflow-wrap:anywhere; }
#document-type-editor { margin-top:20px; padding:16px; background:#f4f7fc; border:1px solid #d5dfef; border-radius:12px; }
#document-type-editor[hidden], #document-types-dialog label[hidden] { display:none; }
#document-type-error { color:#b42318; }
#document-types-feedback { color:#17633b; }

#document-types-dialog input:not([type="hidden"]), #document-types-dialog select { width:100%; padding:12px; border:1px solid #c3d2e8; border-radius:9px; background:white; color:#0b2149; font:inherit; }
#document-types-dialog > header { position:static; }

/* Indicadores mantêm a altura independentemente do nome do documento. */
#dashboard-document-alerts:not(.empty) { margin-top:8px; }
#dashboard-document-alerts .alert-line { display:flex; align-items:center; gap:12px; text-align:left; }
#dashboard-document-alerts .alert-line > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.document-status { align-self:center; flex-shrink:0; }
.month-tooltip { display:none; position:absolute; z-index:5; left:50%; transform:translateX(-50%); bottom:calc(100% + 8px); width:230px; padding:12px; border:1px solid var(--line); border-radius:10px; background:white; color:var(--ink); box-shadow:var(--shadow); font-size:12px; line-height:1.7; pointer-events:none; }
.month-tooltip strong { display:block; font-size:13px; }
.month-tooltip .month-result { margin-top:5px; padding-top:5px; border-top:1px solid var(--line); font-weight:700; }
.month-bar:hover > .month-tooltip,.month-bar:focus > .month-tooltip { display:block; }
.month-bar:focus-visible { outline:2px solid var(--navy-2); outline-offset:5px; border-radius:5px; }
.month-bar:first-child .month-tooltip { left:0; transform:none; }
.month-bar:last-child .month-tooltip { left:auto; right:0; transform:none; }
@media(max-width:480px) { #dashboard-document-alerts .alert-line { align-items:flex-start; flex-direction:column; } #dashboard-document-alerts .document-status { align-self:flex-start; } .month-tooltip { width:190px; font-size:11px; } }

.pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; background:#fff; }
.pagination[hidden] { display:none; }
.pagination label,.pagination-buttons { display:flex; align-items:center; gap:10px; }
.pagination select { padding:8px 28px 8px 10px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; font:inherit; }
.pagination .secondary { padding:8px 12px; font-size:12px; }
.pagination button:disabled { opacity:.45; cursor:default; }
.pagination-count { white-space:nowrap; }
.pagination-buttons { flex-wrap:wrap; justify-content:center; }
.view table,.clean-list { scroll-margin-top:200px; }
@media(max-width:600px) { .pagination { justify-content:center; padding:14px 10px; } .pagination-buttons { width:100%; } }
@media print { .pagination { display:none!important; } }

#document-truck-filter:disabled { opacity:.55; cursor:default; }

#expense-form [hidden] { display:none; }
#expense-schedule-summary { margin:0; color:var(--muted); font-size:13px; }
#expenses-status-filter { padding:10px; border:1px solid var(--line); border-radius:8px; background:white; font:inherit; color:var(--ink); }
#recurring-end-error { color:#a31227; }

.expense-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; gap:12px; }
.expense-filters label { display:grid; flex:1 1 175px; gap:6px; color:var(--ink); font-size:12px; font-weight:600; }
.expense-filters input,.expense-filters select { width:100%; min-width:0; min-height:42px; border:1px solid var(--line); border-radius:8px; background:white; padding:10px; font:inherit; color:var(--ink); }
#expenses-filter-error,#expense-edit-error { color:#a31227; }

.expense-filters > button { min-height:42px; }
@media(max-width:780px) { .expense-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { .expense-filters { grid-template-columns:1fr; } }

.negative-value { color:#b42318; }
.metric-note { color:var(--muted); font-size:12px; line-height:1.6; }
.cash-report-table td:nth-child(2) { white-space:nowrap; font-weight:700; }
.cash-result-row { background:#f0f5fc; font-weight:700; }

.heading-with-help,.metric-heading { display:flex; align-items:center; gap:9px; }
.heading-with-help h2 { margin:0; }
.context-help { position:relative; display:inline-block; vertical-align:middle; flex:0 0 auto; font-size:12px; font-weight:400; color:var(--ink); text-align:left; }
.context-help > summary { display:grid; place-items:center; list-style:none; width:24px; height:24px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:white; font:600 12px/1 var(--font-family); cursor:pointer; }
.context-help > summary::-webkit-details-marker { display:none; }
.context-help > summary:focus-visible { outline:2px solid var(--navy-2); outline-offset:3px; }
.help-content { position:absolute; z-index:20; top:calc(100% + 6px); right:0; width:min(300px,70vw); padding:14px; border:1px solid var(--line); border-radius:10px; background:white; box-shadow:var(--shadow); line-height:1.6; white-space:pre-line; }
.form-panel > .context-help,.heading-with-help > .context-help { margin-bottom:8px; }
.form-panel > .context-help .help-content,.heading-with-help > .context-help .help-content { left:0; right:auto; }
#trip-catalog-status[hidden] { display:none; }
@media print { .context-help { display:none!important; } }

.heading-with-help { position:relative; }
.heading-with-help > .context-help { position:static; }
.dashboard-four article { overflow:visible; }
.print-document > .heading-with-help { margin-top:24px; margin-bottom:8px; }

/* Fechamentos compactos mantêm todas as entregas para conferência. */
.closing-document table th,.closing-document table td { padding:6px 8px; font-size:11px; line-height:1.35; }
.closing-document .pdf-title { margin-top:14px; font-size:20px; }
.closing-document .pdf-header { padding-bottom:8px; }
.closing-document .pdf-header small { font-size:10px; }
.closing-document .pdf-brand img { width:48px; height:48px; }
.closing-document > p { font-size:11px; margin:8px 0 12px; }
.closing-document .pdf-total { margin-top:12px; font-size:15px; }
@media print {
  .closing-document thead { display:table-header-group; }
  .closing-document tr,.closing-document .pdf-total { break-inside:avoid; }
  .closing-document td { overflow-wrap:anywhere; }
}

.closing-format { display:flex; justify-content:flex-end; margin:12px 0; font-size:13px; }
.closing-format select { font:inherit; color:var(--navy); background:#fff; border:1px solid var(--line); border-radius:7px; padding:8px; }

.document-date { display:inline-block; white-space:nowrap; overflow-wrap:normal; word-break:normal; font-variant-numeric:tabular-nums; }
@media print {
  .print-document { width:100%; max-width:none; overflow:visible; border-radius:0; }
  .print-document .pdf-header { break-inside:avoid; }
  .print-document h2,.print-document h3 { break-after:avoid; }
  .print-document thead { display:table-header-group; }
  .print-document tfoot { display:table-row-group; }
  .print-document th,.print-document td { padding:7px 8px; font-size:10px; line-height:1.4; }
  .print-document .document-date { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
  .closing-document td:first-child:has(.document-date) { width:23mm; }
}

#fleet-unclassified { margin:12px 18px; color:var(--muted); font-size:13px; }
#fleet-unclassified:empty { display:none; }
#trip-tractor-note { font-weight:400; color:var(--muted); }
