/* Complementos ao Bootstrap 5 */
body { background: var(--bs-tertiary-bg); }
.app { min-height: 100vh; }
.min-vw-0 { min-width: 0; }

/* Menu lateral fixo em telas grandes */
@media (min-width: 992px) {
  .sidebar { width: 232px; flex: 0 0 232px; position: sticky; top: 0; height: 100vh; }
}
.brand { font-weight: 700; font-size: 1.15rem; color: inherit; }
.brand span { color: var(--bs-primary); }
.sidebar .brand { color: #fff; }
.sidebar .brand span { color: #6ea8fe; }
.sidebar .nav-group { font-size: .68rem; letter-spacing: .06em; }
.sidebar .nav-link { padding: .4rem .75rem; }
.sidebar .nav-link:not(.active):hover { color: #fff !important; background: rgba(255, 255, 255, .08); }

/* Cabeçalho de página */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; }
.card-header h2, h2.h6 { font-size: 1rem; margin: 0; font-weight: 600; }

/* Indicadores */
.kpi .label { color: var(--bs-secondary-color); font-size: .85rem; }
.kpi .value { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .value.sm { font-size: 1rem; }
.kpi .bi { font-size: 1.6rem; opacity: .35; }

/* Tabelas */
.table { font-size: .9rem; }
.table > thead th { color: var(--bs-secondary-color); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.table td small { display: block; color: var(--bs-secondary-color); }
.table tfoot th { text-transform: none; font-size: .9rem; }
.table td:first-child > a { white-space: nowrap; }
.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.off td { opacity: .5; }
.table.kv th { width: 170px; text-transform: none; font-size: .9rem; color: var(--bs-secondary-color); }
.scroll-y { max-height: 420px; overflow-y: auto; }
.table-sticky thead th { position: sticky; top: 0; background: var(--bs-body-bg); z-index: 1; }
button.link { background: none; border: 0; padding: 0; color: var(--bs-link-color); cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }

/* Gráfico de barras */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 260px; padding-top: 18px; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 64px; background: var(--bs-primary); border-radius: 4px 4px 0 0; min-height: 1px; }
.bar:hover i { filter: brightness(1.15); }
.bar em { font-style: normal; font-size: 11px; color: var(--bs-secondary-color); margin-bottom: 2px; white-space: nowrap; }
.bar span { font-size: 11px; color: var(--bs-secondary-color); margin-top: 4px; white-space: nowrap; }
@media (max-width: 600px) { .bar em { display: none; } }

/* Suprimentos / almofada */
.supply { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto auto auto; gap: 10px; align-items: center; margin: 6px 0; font-size: .9rem; }
.supply .progress { height: 10px; }

pre.dump { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: 12px; overflow: auto; max-height: 75vh; font-size: 12px; }

@media print {
  .noprint, .sidebar, .btn, .btn-close { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card { break-inside: avoid; border-color: #ccc !important; }
  main { padding: 0 !important; }
  .table-responsive { overflow: visible; }
  a { color: #000; text-decoration: none; }
}
