/* TechMaint (manutenção da frota): só os tokens do sistema (tokens.css), para
   manter o mesmo visual nos dois temas. Página, árvore de equipamentos,
   horímetro, gráfico de uso e permissões do perfil. A troca de módulos usa o
   visual comum (layout.css e menu.css). */

/* Permissões de manutenção no cadastro de perfil */
.maintenance-permissions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 22px;
  margin: 4px 0 6px;
}

/* Menu da manutenção na barra lateral */
.maint-rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.maint-vessel-nav {
  display: grid;
  gap: 2px;
}
.maint-vessel-nav .nav-button {
  text-decoration: none;
}
.maint-vessel-nav .nav-button::before {
  display: none;
}
/* Bens: o título abre e recolhe a lista; a seta mostra o estado. */
.maint-vessels {
  display: grid;
  gap: 2px;
  margin-top: 18px;
}
.maint-vessels .maint-rail-heading {
  margin-bottom: 4px;
}
.maint-vessels-toggle,
.maint-vessel-type {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.maint-vessels-toggle {
  flex: 1;
  min-width: 0;
  min-height: 28px;
  padding: 0;
}
.maint-vessels-toggle::before,
.maint-vessel-type::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 120ms ease;
}
.maint-vessels-toggle[aria-expanded="true"]::before,
.maint-vessel-type[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
.maint-vessels:not(.is-open) .maint-vessels-body {
  display: none;
}
.maint-vessels-body {
  display: grid;
  gap: 6px;
}
.maint-vessel-search {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.maint-vessel-search[hidden] {
  display: none;
}
.maint-vessel-nav .admin-nav-item.is-collapsed {
  display: none;
}
/* Tipo da embarcação: título do grupo no menu; no celular, ao lado do nome. */
.maint-vessel-type {
  width: 100%;
  margin: 8px 0 2px;
  padding: 2px 12px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.maint-vessel-type:first-child {
  margin-top: 0;
}
.maint-vessel-type > span:first-of-type {
  flex: 1;
}
.maint-vessel-type-count {
  font-weight: 500;
  letter-spacing: 0;
}
.maint-vessel-kind {
  display: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.maint-vessel-empty {
  padding: 4px 12px;
  color: var(--faint);
  font-size: 13px;
}

/* Página */
.maint-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}
.maint-page[hidden] {
  display: none;
}
.maint-subtitle {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}
/* Título à esquerda e os botões da página à direita, na mesma linha. */
.maint-page .page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.maint-page .page-heading:has(+ .maint-subtitle) {
  margin-bottom: 0;
}
.maint-page .page-heading h1 {
  min-width: 0;
}
.maint-heading-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.maint-heading-actions:empty {
  display: none;
}
.panel-head:has(.maint-heading-actions),
.list-heading:has(.maint-heading-actions) {
  align-items: center;
}
.maint-loading {
  padding: 48px 0;
  color: var(--muted);
  text-align: center;
}

/* Cartões das embarcações no painel */
.vessel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.vessel-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.vessel-card:hover {
  border-color: var(--line-strong);
}
.vessel-card:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.vessel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.vessel-card h3 {
  margin: 0;
  font-size: 17px;
}
.vessel-card-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.vessel-card-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.vessel-card-numbers dd {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.vessel-card-foot {
  color: var(--faint);
  font-size: 12px;
}

/* Embarcação: árvore à esquerda, equipamento à direita */
.vessel-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}
.vessel-layout > * {
  min-width: 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.panel-head h2 {
  margin: 0;
  font-size: 17px;
}
.panel-body {
  padding: 14px 20px 20px;
}
.panel-stack {
  display: grid;
  gap: 20px;
}

.asset-tree {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 10px 8px;
}
.asset-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.asset-tree ul ul {
  margin-left: 13px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.asset-node {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius-small);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.asset-node:hover {
  background: var(--surface-2);
}
.asset-node[aria-current="true"] {
  background: var(--brand-soft);
  box-shadow: inset 2px 0 0 var(--brand);
}
.asset-node.is-system {
  margin-top: 6px;
  font-weight: 600;
}
.asset-node-text {
  flex: 1;
  min-width: 0;
}
.asset-node-text small {
  display: block;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
}
.criticality {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.criticality-A {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.tree-empty {
  padding: 14px 10px;
  color: var(--muted);
  font-size: 14px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px 22px;
  margin: 0;
}
.facts dt {
  color: var(--muted);
  font-size: 12px;
}
.facts dd {
  margin: 2px 0 0;
  font-weight: 550;
  overflow-wrap: anywhere;
}

/* Horímetro: contador de rolos, média e lançamento */
.meter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}
.meter-counter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.meter-digit {
  display: grid;
  place-items: center;
  width: 26px;
  height: 38px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.meter-digit.is-decimal {
  background: var(--brand-soft);
  color: var(--brand);
}
.meter-comma,
.meter-unit {
  align-self: flex-end;
  padding: 0 1px 4px;
  color: var(--muted);
  font-weight: 650;
}
.meter-rate-label {
  color: var(--muted);
  font-size: 13px;
}
.meter-rate {
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.meter-formula {
  color: var(--muted);
  font-size: 13px;
}
/* Lançamento da leitura: data, contador e botão na mesma linha; a dica do
   contador fica embaixo dele sem desalinhar o resto. */
.reading-form {
  display: grid;
  grid-template-columns: minmax(200px, 230px) minmax(150px, 190px) max-content;
  justify-content: start;
  align-items: start;
  gap: 8px 12px;
  margin-top: 18px;
}
.reading-form .field {
  margin: 0;
}
.reading-form .field label {
  white-space: nowrap;
}
.reading-form .counter-input {
  font-weight: 600;
}
.reading-form > .button {
  align-self: start;
  margin-top: 26px;
  min-height: 44px;
  white-space: nowrap;
}
.reading-calc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.maint-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.45;
}
.maint-notice.is-ok {
  background: var(--ok-soft);
}
.maint-notice.is-warning {
  background: var(--soon-soft);
}
.maint-notice.is-error {
  background: var(--overdue-soft);
}

/* Gráfico de uso diário (barras) */
.usage-chart {
  position: relative;
  margin: 18px 0 0;
}
.usage-chart > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.usage-chart .axis {
  fill: var(--faint);
  font-size: 11px;
}
.usage-chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.usage-chart .bar {
  fill: var(--line-strong);
}
.usage-chart .bar.in-average {
  fill: var(--brand);
}
.usage-chart .average-line {
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.usage-chart .hit {
  fill: transparent;
}
.usage-tip {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: var(--radius-small);
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
}
.usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.usage-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}
.usage-legend .legend-line {
  width: 16px;
  height: 0;
  border-top: 1.5px dashed var(--ink);
  border-radius: 0;
  vertical-align: 3px;
}

.readings-details {
  margin-top: 16px;
}
.readings-details summary {
  color: var(--brand);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.readings-details .list-frame {
  margin-top: 10px;
}
/* Tabela de leituras compacta: uma linha por leitura, sem rolar de lado. */
.readings-details th,
.readings-details td {
  padding-left: 10px;
  padding-right: 10px;
}
/* Títulos longos (Horas trabalhadas) em duas linhas, para caber o painel. */
.readings-details th {
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: normal;
  line-height: 1.25;
}
.readings-details td {
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: nowrap;
}
.readings-details tbody td:first-child {
  min-width: 0;
}
.readings-details .reading-by {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.readings-details .actions-cell .row-actions {
  flex-wrap: nowrap;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tr.is-in-average td {
  background: var(--brand-soft);
}

@media (max-width: 1080px) {
  .vessel-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .asset-tree {
    position: static;
    max-height: 340px;
  }
}
@media (max-width: 720px) {
  .maint-page {
    padding: 24px 16px 96px;
  }
  .meter-digit {
    width: 21px;
    height: 32px;
    font-size: 18px;
  }
}

/* Planos de manutenção */
#plan-form [hidden] {
  display: none !important;
}
.plan-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.plan-name small {
  overflow-wrap: anywhere;
}
.plan-cycle {
  width: 120px;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.plan-cycle span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
}
.plan-cycle .plan-cycle-due_soon {
  background: var(--soon);
}
.plan-cycle .plan-cycle-overdue {
  background: var(--overdue);
}
.plan-cycle .plan-cycle-no_projection {
  background: var(--line-strong);
}
.vessel-card-numbers .is-overdue dd {
  color: var(--overdue);
}
.vessel-card-numbers .is-soon dd {
  color: var(--soon);
}
.plans-table td {
  vertical-align: top;
}
.plans-table td:nth-child(1) {
  min-width: 160px;
}
.plans-table td:nth-child(2) {
  min-width: 150px;
}
/* Abrir OS e Alterar um embaixo do outro, sem quebrar o texto. */
.plans-table .actions-cell .row-action {
  display: block;
  margin-left: auto;
  white-space: nowrap;
}
.plans-table td:nth-child(3) {
  white-space: nowrap;
}
.panel-stack,
.panel {
  min-width: 0;
}

/* Passo a passo do plano */
.plan-task-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.plan-task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-2);
}
.plan-task-row > .plan-task-number {
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
.plan-task-measure {
  display: grid;
  grid-column: 2 / -1;
  grid-template-columns: repeat(3, minmax(0, 120px));
  gap: 8px;
}
.plan-task-measure[hidden] {
  display: none;
}
.plan-task-measure input {
  min-width: 0;
}
@media (max-width: 720px) {
  .plan-task-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .plan-task-measure {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Ordens de serviço */
.status-info {
  background: var(--brand-soft);
  color: var(--brand);
}
.maint-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.maint-stage {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
}
.maint-stage p {
  margin: 0;
}
.wo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
#maint-content > .panel + .panel {
  margin-top: 20px;
}
.wo-timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line);
  list-style: none;
}
.wo-timeline li {
  display: grid;
  gap: 2px;
}
.wo-tasks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wo-tasks li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.wo-tasks li:last-child {
  border-bottom: 0;
}
.wo-tasks li.is-done > div > span:first-child,
.wo-tasks li.is-done .wo-check span {
  color: var(--muted);
}
.wo-task-number {
  color: var(--faint);
  font-weight: 650;
}
.wo-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.wo-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
}
/* OS fora de execução: o quadradinho mostra o que foi feito, sem marcar. */
.wo-check.is-locked {
  cursor: default;
}
.wo-check.is-locked input {
  opacity: 0.6;
}
.wo-steps-hint {
  margin: 0 0 10px;
}
.wo-measure {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 6px;
}
.wo-measure input {
  width: 110px;
  font-weight: 600;
  text-align: right;
}
.wo-notes {
  flex: 1;
  min-width: 240px;
}
.wo-notes input {
  width: 100%;
}
.wo-complete-panel {
  border-color: var(--brand);
}
.wo-complete {
  display: grid;
  gap: 12px;
}
.wo-high {
  color: var(--overdue);
}
.plan-order-link {
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 1080px) {
  .wo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.wo-tasks li.wo-tasks-empty {
  display: block;
}
#maint-content a:not(.vessel-card):not(.button) {
  color: var(--brand);
  font-weight: 550;
  text-decoration: none;
}
#maint-content a:not(.vessel-card):not(.button):hover {
  text-decoration: underline;
}

/* Estoque */
.plan-material-row {
  grid-template-columns: minmax(0, 1fr) 120px auto;
}
@media (max-width: 720px) {
  .plan-material-row {
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}
.stock-search {
  flex: 1 1 240px;
  min-width: 0;
}
.maint-filters .inline-check {
  align-self: center;
}
.stock-table td.num,
.stock-table th:nth-child(n + 4) {
  white-space: nowrap;
}
.stock-in {
  color: var(--ok);
}
.stock-out {
  color: var(--overdue);
}
.wo-consumption {
  width: 96px;
  font-weight: 600;
  text-align: right;
}
#stock-balance:empty {
  display: none;
}
.stock-search {
  padding-left: 12px;
}
.stock-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
}
.stock-row-actions .row-action {
  padding: 0;
}
.wo-consumption + .plan-meta {
  white-space: nowrap;
}
td:has(> .wo-consumption) {
  white-space: nowrap;
}
.stock-table .row-action {
  white-space: nowrap;
}

/* Situação operacional */
.availability-strip {
  padding: 12px 18px;
  margin-bottom: 18px;
}
.availability-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.availability-current .button {
  margin-left: auto;
}
.availability-history {
  margin-top: 10px;
  font-size: 13px;
}
.availability-history summary {
  cursor: pointer;
  color: var(--brand);
}
.availability-history ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.availability-history li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Indicadores */
.kpi-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-tile {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.kpi-label {
  color: var(--muted);
  font-size: 13px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.kpi-bar-cell {
  min-width: 180px;
}
.kpi-bar-cell .num {
  margin-left: 10px;
}
.kpi-bar {
  display: inline-block;
  width: 120px;
  height: 8px;
  vertical-align: middle;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.kpi-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.kpi-stacked {
  min-width: 200px;
}
.kpi-legend {
  margin-bottom: 12px;
}
.bar-info,
.legend-info::before {
  background: var(--brand);
}
.bar-ok-soft,
.legend-ok-soft::before {
  background: color-mix(in srgb, var(--ok) 45%, var(--surface));
}
.legend-none::before {
  background: var(--line-strong);
}
.kpi-pair {
  display: grid;
  gap: 18px;
}
.kpi-pair > .panel {
  margin: 0;
}
.kpi-table td.num {
  white-space: nowrap;
}

/* Fotos e laudos da OS */
.wo-files {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.wo-files li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}
.wo-file-icon {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.wo-file-icon.is-photo {
  background: var(--brand-soft);
  color: var(--brand);
}
.wo-file-icon.is-document {
  background: var(--soon-soft);
  color: var(--soon);
}
.wo-file-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.wo-file-main strong {
  overflow-wrap: anywhere;
}
.wo-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
@media (max-width: 720px) {
  .wo-files li {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Data e quem concluiu o passo descem para a linha de baixo: na mesma
     linha a coluna "auto" empurra a página para o lado. */
  .wo-tasks li:not(.wo-tasks-empty) {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .wo-tasks li:not(.wo-tasks-empty) > .plan-meta {
    grid-column: 2;
  }
  .panel-head {
    flex-wrap: wrap;
  }
}

/* Tripulação */
.crew-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  border: 0;
  padding: 0;
  margin: 0;
}
.crew-skills legend {
  width: 100%;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Custos */
.asset-cost-center {
  margin-top: 14px;
  max-width: 360px;
}
.wo-service-form {
  margin-top: 12px;
}
.wo-cost-facts {
  margin: 12px 0 16px;
}

/* PDF do certificado (tripulante e calibração) */
.cert-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.cert-file {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.vessel-documents {
  margin-top: 18px;
}
.wo-certificate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.reading-corrected {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--soon-soft);
  color: var(--ink);
  font-size: 11.5px;
  cursor: help;
}

/* Troca de horímetro e reinício do contador */
.meter-change-actions {
  margin-left: auto;
}
.meter-change-lead {
  margin: 16px 34px 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.meter-change-preview {
  margin-top: 0;
}
.reading-segment {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
}
.reading-segment.is-previous {
  background: var(--surface-2);
  color: var(--muted);
}
.readings-details tr.is-previous td {
  color: var(--muted);
}
@media (max-width: 720px) {
  .meter-change-lead {
    margin-inline: 18px;
  }
}
#meter-change-last[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}
.reading-segment.is-estimate {
  background: var(--soon-soft);
  color: var(--ink);
}
.readings-details tr:has(.is-estimate) td {
  font-style: italic;
}

/* Menu em faixa (tela estreita): sem títulos de grupo nem busca, todos os bens
   aparecem e o tipo vai ao lado do nome. */
@media (max-width: 1080px) {
  .maint-vessel-type,
  .maint-vessel-search {
    display: none;
  }
  .maint-vessels,
  .maint-vessels:not(.is-open) .maint-vessels-body,
  .maint-vessels-body {
    display: contents;
  }
  .maint-vessel-nav .admin-nav-item.is-collapsed {
    display: flex;
  }
  .maint-vessel-kind {
    display: inline;
    margin-left: 6px;
  }
}

/* Campo do contador do horímetro: algarismos alinhados, como os rolos. */
.counter-input,
.counter-cell {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}
.reading-form .counter-echo {
  display: block;
  margin-top: -2px;
}

@media (max-width: 720px) {
  .reading-form {
    grid-template-columns: 1fr;
  }
  .reading-form > .button {
    margin-top: 0;
  }
}

/* No celular, as leituras continuam em tabela (rolando de lado dentro do
   quadro): cartões soltos, como na lista de documentos, perdem as colunas. */
@media (max-width: 720px) {
  .readings-details .list-frame {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .readings-details table {
    display: table;
    min-width: 620px;
  }
  .readings-details thead {
    display: table-header-group;
  }
  .readings-details tbody {
    display: table-row-group;
  }
  .readings-details tbody tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .readings-details td {
    display: table-cell;
    padding: 8px 10px;
  }
  .readings-details tbody tr + tr td {
    border-top: 1px solid var(--line);
  }
}

/* ---------------------------------------------------------------------------
   Painel executivo da frota
   --------------------------------------------------------------------------- */
.exec-hero {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 0;
  margin-bottom: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.exec-lead {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px 28px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}
.exec-hero-value {
  color: var(--ink);
  font-size: 52px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
}
.exec-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.exec-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--line-strong);
}
.exec-meter-fill.is-ok { background: var(--chart-ok); }
.exec-meter-fill.is-soon { background: var(--chart-soon); }
.exec-meter-fill.is-overdue { background: var(--chart-overdue); }
/* Números-chave em grade de 3, separados por linhas finas (o fundo da
   grade aparece no espaço de 1px entre as caixas). */
.exec-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.exec-kpi {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 24px;
  background: var(--surface);
}
/* Com 5 números, o último ocupa o resto da linha. */
.exec-kpi:last-child:nth-child(3n + 2) {
  grid-column: span 2;
}
.exec-kpi-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.exec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--line-strong);
}
.exec-kpi.is-overdue .exec-dot { background: var(--chart-overdue); }
.exec-kpi.is-soon .exec-dot { background: var(--chart-soon); }
.exec-kpi.is-ok .exec-dot { background: var(--chart-ok); }
.exec-kpi-value {
  color: var(--ink);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.exec-kpi-detail {
  color: var(--muted);
  font-size: 13px;
}
.exec-kpi-link {
  color: var(--brand);
  font-weight: 550;
}

/* Abas das telas que dividem um item do menu (Estoque | Requisições,
   Indicadores | Custos). */
.maint-tabs {
  display: flex;
  gap: 4px;
  margin: -8px 0 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.maint-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: -1px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.maint-tab:hover {
  color: var(--ink);
}
.maint-tab[aria-current="page"] {
  border-bottom-color: var(--brand);
  color: var(--ink);
}

/* Frota por tipo de embarcação: um cartão por tipo, que filtra a tabela. */
.exec-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: -12px 0 32px;
}
.exec-type {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.exec-type:hover {
  border-color: var(--line-strong);
}
.exec-type[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.exec-type-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.exec-type-name {
  font-size: 16px;
  font-weight: 650;
}
.exec-type-count {
  color: var(--muted);
  font-size: 13px;
}
.exec-type-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin: 0;
}
.exec-type-numbers dt {
  color: var(--muted);
  font-size: 12px;
}
.exec-type-numbers dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 650;
}
.exec-type-numbers .is-overdue dd {
  color: var(--overdue);
}
.exec-type-numbers .is-soon dd {
  color: var(--soon);
}

/* Linha de título de cada tipo na tabela. */
.exec-table tr.exec-group td {
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--surface-2);
}
.exec-table tr.exec-group:hover {
  background: none;
}
.exec-group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 13px;
}
.exec-group-title strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Situação por embarcação */
.exec-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 10px;
}
.exec-section-head h2 {
  margin: 0;
  font-size: 18px;
}
.exec-section-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.exec-chips {
  display: flex;
  gap: 6px;
}
.exec-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.exec-chip[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.exec-chip:disabled {
  opacity: 0.5;
  cursor: default;
}
.exec-legend {
  display: flex;
  gap: 18px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.exec-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.exec-legend i {
  width: 14px;
  height: 8px;
  border-radius: 2px;
}
.exec-table th,
.exec-table td {
  padding-left: 14px;
  padding-right: 14px;
}
/* Títulos das colunas numéricas em até duas linhas, para caber o quadro. */
.exec-table th.num {
  max-width: 110px;
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: normal;
  line-height: 1.25;
}
.exec-table td {
  padding-top: 11px;
  padding-bottom: 11px;
  vertical-align: middle;
}
.exec-table tbody td:first-child {
  min-width: 170px;
}
.exec-vessel a {
  display: block;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.exec-vessel a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.exec-table .num {
  font-variant-numeric: tabular-nums;
}
.exec-table .exec-muted {
  color: var(--muted);
  font-size: 13px;
}
.exec-table .is-zero {
  color: var(--faint);
}
.exec-table .is-overdue {
  color: var(--overdue);
  font-weight: 650;
}
.exec-table .is-soon {
  color: var(--soon);
  font-weight: 650;
}
.exec-table tr.is-calm td {
  color: var(--muted);
}
.exec-cell-note {
  display: block;
  color: var(--overdue);
  font-size: 12px;
  font-weight: 550;
}
.exec-planbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.exec-bar {
  display: flex;
  gap: 2px;
  width: 120px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.exec-bar span {
  min-width: 3px;
}
.seg-overdue { background: var(--chart-overdue); }
.seg-soon { background: var(--chart-soon); }
.seg-ok { background: var(--chart-ok); }
.seg-empty { flex: 1; background: var(--line); }
.exec-planbar-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.exec-planbar-text.is-overdue {
  color: var(--ink);
  font-weight: 600;
}

/* Vencimentos que pedem ação */
.exec-deadlines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.exec-deadline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.exec-deadline-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.exec-deadline-list li:first-child {
  border-top: 0;
}
.exec-deadline-what,
.exec-deadline-when {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.exec-deadline-what a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.exec-deadline-what a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.exec-deadline-when {
  flex: none;
  text-align: right;
}
.exec-deadline-when strong {
  font-size: 13px;
  font-weight: 650;
}
.exec-deadline-when strong.is-overdue {
  color: var(--overdue);
}
.exec-deadline-os {
  font-size: 12px;
}
.exec-deadline-empty {
  justify-content: flex-start !important;
}
.exec-more {
  display: block;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: 13px;
  font-weight: 550;
}

@media (max-width: 1080px) {
  .exec-hero {
    grid-template-columns: 1fr;
  }
  .exec-lead {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .exec-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .exec-kpi:last-child:nth-child(3n + 2) {
    grid-column: auto;
  }
  /* Com número ímpar de cartões, o último ocupa a linha em vez de deixar um vão. */
  .exec-kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .exec-deadlines {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .exec-hero-value {
    font-size: 44px;
  }
  .exec-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .exec-kpi {
    padding: 16px;
  }
  .exec-kpi-value {
    font-size: 24px;
  }
  /* Tabela de embarcações: continua tabela, rolando de lado dentro do quadro. */
  .exec-table-frame {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--surface);
  }
  .exec-table {
    display: table;
    min-width: 760px;
  }
  .exec-table thead { display: table-header-group; }
  .exec-table tbody { display: table-row-group; }
  .exec-table tbody tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .exec-table td {
    display: table-cell;
    padding: 10px 12px;
  }
  .exec-table tbody tr + tr td {
    border-top: 1px solid var(--line);
  }
}

/* A lista de documentos vira cartão abaixo de 1280px com seletores globais
   (thead some, a linha vira grade). Nas tabelas do TechMaint isso apaga o
   cabeçalho e mistura as colunas. Aqui elas continuam tabela e rolam de lado. */
@media (max-width: 1279px) {
  #maint-content .list-frame,
  .reports-page .report-table-frame {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
  }
  #maint-content .list-frame table,
  .reports-page .report-table {
    display: table;
    width: max-content;
    min-width: 100%;
  }
  #maint-content .list-frame thead,
  .reports-page .report-table thead {
    display: table-header-group;
  }
  #maint-content .list-frame tbody,
  .reports-page .report-table tbody {
    display: table-row-group;
  }
  #maint-content .list-frame tr,
  .reports-page .report-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #maint-content .list-frame th,
  #maint-content .list-frame td,
  .reports-page .report-table th,
  .reports-page .report-table td {
    display: table-cell;
  }
  .reports-page .report-table td {
    border-top: 0;
  }
  #maint-content .list-frame td {
    padding: 14px 16px;
    border-top: 0;
  }
  #maint-content .list-frame tbody tr + tr td {
    border-top: 1px solid var(--line);
  }
  #maint-content .list-frame tbody tr:hover {
    background: var(--surface-2);
  }
  #maint-content .exec-table td {
    padding: 11px 14px;
  }
  #maint-content .readings-details td {
    padding: 8px 10px;
  }
}

/* Menu da manutenção em faixa (tela estreita): as embarcações entram na
   mesma faixa, e nenhum item estica a altura dos outros. */
@media (max-width: 1080px) {
  #maint-rail .admin-nav {
    align-items: center;
  }
  #maint-rail .maint-vessel-nav {
    display: contents;
  }
}

/* Relatórios do TechMaint (reports/reports-page.js). As classes que o gerador
   de relatórios do TechDocs também usa (.report-field, .report-table) ficam
   presas à página do TechMaint. */
/* Área Relatórios: catálogo de fontes, montagem à esquerda e prévia à direita. */
.reports-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}
.reports-page[hidden],
.reports-rail[hidden] {
  display: none;
}
.rail-empty {
  margin: 0 0 6px;
  padding: 0 12px;
  color: var(--faint, var(--muted));
  font-size: 12.5px;
}
.report-model-link {
  display: grid;
  gap: 1px;
}
.report-model-link .nav-count {
  justify-self: start;
  font-size: 11.5px;
}

/* Cabeçalho: o nome do relatório é o título da página, editável. */
.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 22px;
}
.report-head h1 {
  font-size: 28px;
}
.report-head .maint-subtitle {
  margin: 6px 0 0;
  max-width: 72ch;
}
.report-title-box {
  flex: 1 1 360px;
  min-width: 0;
}
.report-title-input {
  width: 100%;
  min-height: 0;
  padding: 2px 6px;
  margin-left: -6px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--ink);
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.report-title-input:hover {
  border-color: var(--line);
}
.report-title-input:focus {
  border-color: var(--brand);
  background: var(--surface);
  outline: none;
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Catálogo de fontes */
.report-catalog {
  display: grid;
  gap: 28px;
}
.report-catalog-group h2 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}
.report-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.report-source-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.report-source-card strong {
  font-size: 15.5px;
}
.report-source-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.report-source-card:hover {
  border-color: var(--brand);
}
.report-source-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Montagem em cima, prévia embaixo, como no TechDocs. */
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.report-config {
  display: grid;
  gap: 14px;
}
.reports-page .report-top {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1fr) minmax(200px, 1.2fr);
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.reports-page .report-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: start;
}
.reports-page .report-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.report-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.report-panel h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
}
.reports-page .report-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.reports-page .report-field input,
.reports-page .report-field select {
  width: 100%;
  min-height: 36px;
  font-size: 13.5px;
  font-weight: 400;
}
.report-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.report-panel .inline-check {
  font-size: 13px;
}
.report-chosen {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: column;
}
.report-chosen li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-2);
  font-size: 13px;
  counter-increment: column;
}
.report-chosen li::before {
  content: counter(column);
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.report-column-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-chosen .row-action {
  min-width: 28px;
  padding: 2px 6px;
}
.report-chosen .row-action:disabled {
  opacity: 0.35;
}
.report-column-tools {
  display: flex;
  gap: 8px;
}
.report-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  max-height: 176px;
  overflow: auto;
  padding-right: 4px;
}
.report-column-grid .inline-check {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink);
}
.report-more {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.report-more summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 650;
}
.report-more[open] summary {
  border-bottom: 1px solid var(--line);
}
.report-more-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}
.reports-page .report-more-body .inline-check,
.reports-page .report-more-body .report-model-actions {
  grid-column: 1 / -1;
}
.reports-page .report-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.reports-page .report-preview-bar h2 {
  margin: 0;
  font-size: 18px;
}
.report-model-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-output {
  min-width: 0;
  display: grid;
  gap: 12px;
}
.report-empty-state {
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 64px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.report-empty-state strong {
  color: var(--ink);
}
.report-result-head {
  display: grid;
  gap: 4px;
}
.report-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 18px;
  font-size: 13.5px;
}
.report-facts strong {
  font-size: 18px;
}
.report-criteria {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.reports-page .report-table-frame {
  overflow: auto;
  max-height: min(480px, 60vh);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.reports-page .report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.reports-page .report-table th,
.reports-page .report-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.reports-page .report-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.reports-page .report-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reports-page .report-table .report-group th {
  padding-top: 14px;
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}
.reports-page .report-table .report-subtotal td {
  background: var(--surface-2);
  font-weight: 600;
}
.reports-page .report-table tfoot .report-total td {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 2px solid var(--ink);
  font-weight: 700;
}

@media (max-width: 980px) {
  .reports-page .report-top,
  .reports-page .report-setup,
  .reports-page .report-controls,
  .reports-page .report-more-body,
  .reports-page .report-column-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .reports-page {
    padding: 24px 16px 96px;
  }
  .report-title-input {
    font-size: 22px;
  }
  /* 16px evita o zoom automático do iOS ao focar o campo. */
  .reports-page .report-field input,
  .reports-page .report-field select,
  .reports-page .report-field textarea {
    font-size: 16px;
  }
}

/* Nome completo de uma sigla, logo abaixo dela no rótulo (IMO, MMSI, CEP, OS…). */
.field label .label-full {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

/* Guia do cadastro de equipamento: um exemplo da árvore, com recuo por nível. */
.guide-lead {
  margin: 10px 0 6px;
  color: var(--ink);
  line-height: 1.5;
}
.guide-tree,
.guide-tree ul {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}
.guide-tree {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.7;
}
.guide-tree ul {
  border-left: 1px solid var(--line);
  margin-left: 4px;
}
.guide-tree code {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* Bem, equipamento e fornecedor do documento, na lista do TechDocs. */
.doc-links {
  display: block;
  margin-top: 2px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 550;
}

/* Menu recolhido (só ícones): sem títulos de tipo nem busca dos bens. */
.is-menu-collapsed .maint-vessel-type,
.is-menu-collapsed .maint-vessel-search {
  display: none;
}
