:root {
  color-scheme: light;
  --app-primary: #315c55;
  --app-primary-dark: #244640;
  --app-bg: #f4f6f5;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: #182230;
}

.painel {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: .75rem;
  box-shadow: 0 4px 16px rgb(16 24 40 / 6%);
}

.navbar-brand { font-weight: 600; }
.bg-app { background: var(--app-primary) !important; }
.btn-app {
  background: var(--app-primary);
  color: #fff;
  border-color: var(--app-primary);
}
.btn-app:hover,
.btn-app:focus {
  background: var(--app-primary-dark);
  color: #fff;
  border-color: var(--app-primary-dark);
}
.card { border: 0; box-shadow: 0 .25rem 1rem rgb(0 0 0 / 6%); }
.scanner-box { min-height: 280px; background: #111; border-radius: .75rem; overflow: hidden; }
.barcode-preview { background: #fff; border: 1px solid #ddd; border-radius: .5rem; padding: 1rem; text-align: center; }
.table td, .table th { vertical-align: middle; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; }
.status-ok { background: #198754; }
.status-warn { background: #ffc107; }
.status-danger { background: #dc3545; }
.login-page { background: linear-gradient(135deg, #174f46, #247264); min-height: 100vh; }
.login-logo { display: block; width: min(320px, 85%); height: auto; margin: 0 auto; }
.nav-logo { width: 190px; height: 45px; object-fit: contain; object-position: left center; }

.status { color: #475467; font-size: .875rem; }
.status.sucesso { color: #067647; }
.status.erro { color: #b42318; }

.folha {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12mm;
}

.pagina {
  width: 210mm;
  height: 297mm;
  display: grid;
  grid-template-columns: repeat(5, 42mm);
  grid-template-rows: repeat(15, calc(297mm / 15));
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 18px rgb(16 24 40 / 12%);
}

.etiqueta {
  width: 42mm;
  height: calc(297mm / 15);
  padding: .7mm 1mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #98a2b3;
  border-radius: 0;
}

.nome, .empresa, .codigo {
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  line-height: 1.1;
}

.nome, .empresa { font-size: 6.5pt; }
.codigo { font-size: 6.5pt; font-weight: 700; }
.etiqueta svg { width: 100%; height: 8mm; }

@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: #fff; }
  .painel, .no-print, nav, aside { display: none !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  .container, .container-fluid { max-width: 100% !important; width: 100% !important; }
  main.container { max-width: none; margin: 0; padding: 0 !important; }
  .folha { display: block; }
  .pagina {
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .pagina:last-child { break-after: auto; page-break-after: auto; }
  .etiqueta { break-inside: avoid; }
}

@media (max-width: 576px) {
  .nav-logo { width: 155px; }
  .login-logo { width: 250px; }
}
