:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111111;
  --accent-soft: #2f343a;
  --soft: #f3f4f6;
  --shadow: 0 12px 28px rgb(17 17 17 / 7%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 1px 0 rgb(17 17 17 / 3%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 38px;
  max-width: 190px;
  object-fit: contain;
}

.brand-logo-full {
  width: auto;
  height: 38px;
}

.page {
  width: min(960px, calc(100% - 32px));
  margin: 32px auto;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.topbar-user small {
  padding-right: 12px;
  border-right: 1px solid var(--line);
  color: var(--accent-soft);
  font-weight: 700;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 560px;
  margin: 0 16px;
}

.global-search input {
  min-height: 36px;
}

.global-search button {
  min-height: 36px;
  white-space: nowrap;
}

.topbar-user form {
  margin: 0;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: #2f343a;
}

.menu-group {
  position: relative;
}

.menu-group > span {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.menu-items {
  display: none;
  position: absolute;
  z-index: 10;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.menu-group:hover .menu-items,
.menu-group:focus-within .menu-items {
  display: grid;
}

.menu-items a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.menu-items a:hover,
.menu-items a:focus {
  background: var(--soft);
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgb(17 17 17 / 3%);
}

.panel h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

.auth-panel {
  width: min(420px, 100%);
  margin: 64px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 22px;
  text-align: center;
}

.auth-brand img {
  width: min(260px, 100%);
  height: auto;
  object-fit: contain;
}

.auth-panel h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-panel p {
  margin: 0 0 20px;
  color: var(--muted);
}

.auth-panel footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.form {
  display: grid;
  gap: 16px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.form-help {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--accent-soft);
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgb(47 52 58 / 16%);
  border-color: var(--accent-soft);
}

select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-compact {
  justify-self: start;
  width: auto;
  min-width: 96px;
}

.alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #e0b4a8;
  border-radius: 6px;
  background: #fff2ef;
  color: #8f2f1f;
}

.notice {
  margin: 18px 0;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f3f4f6;
  color: #2f343a;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-hero span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.kpi-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #657182;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
}

.kpi-card strong {
  font-size: 26px;
}

.kpi-card small,
.kpi-card span {
  color: var(--muted);
}

.kpi-ok {
  border-left-color: #2f343a;
}

.kpi-warn {
  border-left-color: #b7791f;
}

.kpi-danger {
  border-left-color: #b42318;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.compact-list a {
  color: var(--accent);
  font-weight: 700;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button-link.secondary {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #2f343a;
}

.button-link.active {
  background: var(--accent);
}

.button-link.disabled {
  pointer-events: none;
  opacity: 0.45;
}

.pagination-summary {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.pagination .button-link {
  min-height: 34px;
  padding: 6px 10px;
}

.label-modal {
  width: min(720px, calc(100% - 24px));
  height: min(620px, calc(100vh - 24px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgb(17 17 17 / 24%);
}

.label-modal::backdrop {
  background: rgb(24 32 42 / 48%);
}

.label-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.label-modal-header button {
  min-height: 34px;
  padding: 6px 10px;
  background: #2f343a;
}

.label-modal iframe {
  width: 100%;
  height: calc(100% - 56px);
  border: 0;
  background: #f1f2f4;
}

.filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.inline-actions {
  display: inline-grid;
  grid-template-columns: auto;
  gap: 6px;
  margin: 0 4px 6px 0;
}

.inline-actions input {
  min-height: 34px;
}

.template-list {
  display: grid;
  gap: 8px;
}

.template-list a {
  color: var(--accent);
  font-weight: 700;
}

.label-body {
  margin: 0;
  background: #f1f2f4;
}

.zebra-label {
  display: grid;
  grid-template-columns: 1fr 0.72in;
  gap: 0.08in;
  margin: 24px auto;
  padding: 0.08in;
  overflow: hidden;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
}

.label-size-large {
  width: 2.5in;
  height: 1.5in;
}

.label-size-wide {
  grid-template-columns: 1fr 0.88in;
  gap: 0.1in;
  width: 3in;
  height: 2in;
  padding: 0.1in;
}

.label-size-wide .label-type {
  font-size: 11pt;
}

.label-size-wide .label-code {
  font-size: 20pt;
}

.label-size-wide .label-subtitle,
.label-size-wide .label-line {
  font-size: 8.5pt;
}

.label-size-wide .label-qr img {
  width: 0.8in;
  height: 0.8in;
}

.label-size-square-100 {
  grid-template-columns: 1fr 1.15in;
  gap: 0.16in;
  padding: 0.16in;
}

.label-size-square-100 .label-type {
  font-size: 15pt;
}

.label-size-square-100 .label-code {
  font-size: 28pt;
}

.label-size-square-100 .label-subtitle,
.label-size-square-100 .label-line {
  font-size: 11pt;
}

.label-size-square-100 .label-qr img {
  width: 1.08in;
  height: 1.08in;
}

.label-template-plaintext {
  display: block;
  padding: 3.8mm;
}

.label-template-telapa_100 {
  display: block;
  padding: 3mm;
  border: 0;
}

.telapa-label {
  width: 100%;
  height: 100%;
  border: 1px solid #000000;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000000;
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

.telapa-header {
  height: 10mm;
  padding: 0;
  border: 1px solid #000000;
  font-size: 13pt;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
}

.telapa-cell,
.telapa-full {
  min-width: 0;
  border: 1px solid #000000;
  padding: 1.6mm 2.2mm;
  overflow: hidden;
  font-size: 11pt;
  line-height: 1.18;
  vertical-align: middle;
}

.telapa-label tr:nth-child(2) {
  height: 13mm;
}

.telapa-label tr:nth-child(3) {
  height: 16mm;
}

.telapa-label tr:nth-child(4),
.telapa-label tr:nth-child(5) {
  height: 11mm;
}

.telapa-label tr:nth-child(6) {
  height: 12mm;
}

.telapa-cell.product {
  font-size: 12.5pt;
  font-weight: 800;
  text-transform: uppercase;
}

.telapa-cell span,
.telapa-full span {
  font-size: 9.5pt;
  font-weight: 700;
}

.telapa-cell strong,
.telapa-full strong {
  font-weight: 800;
}

.telapa-cell.composition {
  font-size: 12pt;
  font-weight: 700;
}

.telapa-full {
  font-size: 10.5pt;
  white-space: normal;
  overflow-wrap: anywhere;
}

.telapa-barcode {
  border: 1px solid #000000;
  padding: 3mm 8mm;
  text-align: center;
  vertical-align: middle;
}

.telapa-barcode img {
  display: inline-block;
  width: 100%;
  height: 22mm;
}

.label-plaintext {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: #000000;
  background: #ffffff;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 10.1pt;
  font-weight: 700;
  line-height: 1.22;
  white-space: pre;
}

.label-size-compact {
  grid-template-columns: 1fr 0.62in;
  gap: 0.06in;
  width: 2.25in;
  height: 1.25in;
  padding: 0.065in;
}

.label-size-compact .label-type {
  font-size: 8.5pt;
}

.label-size-compact .label-code {
  font-size: 14pt;
}

.label-size-compact .label-subtitle,
.label-size-compact .label-line {
  font-size: 7pt;
}

.label-size-compact .label-qr img {
  width: 0.56in;
  height: 0.56in;
}

.label-main {
  min-width: 0;
}

.label-type {
  font-size: 10pt;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.label-code {
  margin-top: 0.04in;
  overflow-wrap: anywhere;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1;
}

.label-subtitle {
  margin-top: 0.04in;
  overflow: hidden;
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.label-line {
  margin-top: 0.035in;
  overflow: hidden;
  font-size: 7.5pt;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.label-qr {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.03in;
}

.label-qr img {
  width: 0.66in;
  height: 0.66in;
  background: #ffffff;
}

.zpl-panel {
  width: min(720px, calc(100% - 32px));
  margin: 16px auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.zpl-panel pre {
  overflow: auto;
  padding: 12px;
  background: #f6f7f9;
}

.label-size-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

@page report {
  size: A4 landscape;
  margin: 10mm;
}

.print-report {
  width: auto;
  padding: 18px;
  background: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.report-header,
.report-band {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #000000;
}

.report-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.report-header span {
  display: block;
  margin-top: 3px;
}

.report-header h1,
.report-band h2 {
  margin: 5px 0;
}

.print-report table {
  page-break-inside: auto;
  font-size: 9px;
}

.print-report tr {
  page-break-inside: avoid;
}

.print-report thead {
  display: table-header-group;
}

.print-report footer {
  margin-top: 14px;
  border-top: 1px solid #000000;
  padding-top: 6px;
}

@media print {
  .no-print {
    display: none;
  }

  .label-body {
    background: #ffffff;
  }

  .zebra-label {
    margin: 0;
    border: 0;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f4f6;
  font-size: 13px;
  color: #2f343a;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: #fbfbfc;
}

tbody tr:hover {
  background: #f7f8fa;
}

.zebra-label tbody tr:nth-child(even),
.zebra-label tbody tr:hover,
.telapa-label tbody tr:nth-child(even),
.telapa-label tbody tr:hover {
  background: #ffffff;
}

td a {
  color: var(--accent);
  font-weight: 700;
}

.label-preview {
  width: 378px;
  min-height: 189px;
  margin: 48px auto;
  padding: 18px;
  border: 2px solid var(--text);
  background: #ffffff;
  color: #000000;
  text-align: center;
}

.label-preview h1 {
  margin: 0 0 12px;
  font-size: 34px;
}

.label-preview p {
  margin: 8px 0;
  font-size: 16px;
}

.table-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.module-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.module-header,
.row-form {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.module-header {
  border-bottom: 1px solid var(--line);
}

.module-header h2 {
  margin: 0;
  font-size: 18px;
}

.module-header p,
.row-form span {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.inline-form {
  display: contents;
}

.inline-action-form {
  display: inline-block;
  margin-left: 8px;
}

.danger-button {
  background: #202733;
  border-color: #202733;
}

.danger-button:hover {
  background: #111827;
  border-color: #111827;
}

.rows {
  display: grid;
}

.row-form + .row-form {
  border-top: 1px solid var(--line);
}

.badge-ok,
.badge-off {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok {
  background: #e5e7eb;
  color: #111111;
}

.badge-off {
  background: #f1f2f4;
  color: #657182;
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .global-search {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .module-header,
  .row-form {
    grid-template-columns: 1fr;
  }

  .inline-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

@page {
  size: A4 portrait;
  margin: 16mm 14mm 18mm;
}

.pdf-report {
  background: #ffffff;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5pt;
  line-height: 1.35;
}

.pdf-page {
  max-width: 184mm;
  margin: 0 auto;
  padding: 0;
}

.pdf-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #333333;
}

.pdf-brand {
  font-size: 18pt;
  font-weight: 800;
  letter-spacing: 0;
}

.pdf-client {
  margin-bottom: 2px;
  color: #333333;
  font-size: 10pt;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-title {
  margin-top: 3px;
  font-size: 15pt;
  font-weight: 800;
}

.pdf-meta {
  display: grid;
  gap: 3px;
  min-width: 58mm;
  font-size: 8.5pt;
  text-align: right;
}

.pdf-actions {
  margin-bottom: 12px;
  text-align: right;
}

.pdf-section {
  margin: 0 0 13px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-section h2 {
  margin: 0 0 7px;
  padding: 5px 7px;
  border: 1px solid #555555;
  background: #eeeeee;
  color: #111111;
  font-size: 10.5pt;
  font-weight: 800;
}

.pdf-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.pdf-kpis.six {
  grid-template-columns: repeat(3, 1fr);
}

.pdf-kpi {
  min-height: 18mm;
  padding: 7px;
  border: 1px solid #555555;
  background: #f3f3f3;
  break-inside: avoid;
}

.pdf-kpi span {
  display: block;
  color: #333333;
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
}

.pdf-kpi strong {
  display: block;
  margin-top: 4px;
  color: #000000;
  font-size: 15pt;
  font-weight: 800;
}

.pdf-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid #555555;
  border-left: 1px solid #555555;
}

.pdf-info-item {
  display: grid;
  grid-template-columns: 34mm 1fr;
  min-height: 9mm;
  border-right: 1px solid #555555;
  border-bottom: 1px solid #555555;
}

.pdf-info-item span {
  padding: 5px 6px;
  background: #eeeeee;
  font-size: 8pt;
  font-weight: 800;
}

.pdf-info-item strong {
  padding: 5px 6px;
  font-weight: 700;
}

.pdf-record {
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid #555555;
  background: #ffffff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-record:nth-child(even) {
  background: #f7f7f7;
}

.pdf-record-main {
  display: grid;
  grid-template-columns: 28mm 1fr 32mm 22mm 22mm 24mm;
  gap: 8px;
  align-items: start;
  font-weight: 800;
}

.pdf-record-main.carga {
  grid-template-columns: 30mm 1fr 30mm;
}

.pdf-record-main.despacho {
  grid-template-columns: 30mm 1fr;
}

.pdf-record-secondary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #999999;
  color: #222222;
  font-size: 8.8pt;
}

.pdf-record-secondary span {
  font-weight: 800;
}

.pdf-total-box {
  margin-left: auto;
  width: 76mm;
  border: 1px solid #555555;
}

.pdf-total-box div {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid #999999;
}

.pdf-total-box div:last-child {
  border-bottom: 0;
}

.pdf-total-box span,
.pdf-total-box strong {
  padding: 5px 7px;
}

.pdf-total-box span {
  background: #eeeeee;
  font-weight: 800;
}

.pdf-timeline-item {
  position: relative;
  margin-bottom: 8px;
  padding: 7px 8px 7px 12px;
  border-left: 3px solid #333333;
  background: #f7f7f7;
  break-inside: avoid;
}

.pdf-timeline-item time {
  display: block;
  font-size: 8.5pt;
  font-weight: 800;
}

.pdf-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.pdf-signature {
  min-height: 20mm;
  border-top: 1px solid #333333;
  padding-top: 5px;
  text-align: center;
  font-weight: 800;
}

.pdf-footer {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #555555;
  color: #333333;
  font-size: 8pt;
  text-align: center;
}

.pdf-footer .page-number::after {
  content: counter(page);
}

@media print {
  .pdf-actions,
  .no-print {
    display: none;
  }

  .pdf-report {
    font-size: 10pt;
  }
}

.dashboard-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.dashboard-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.dashboard-eyebrow {
  margin: 0 0 8px !important;
  color: #2f343a !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-date {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
  text-align: right;
}

.dashboard-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-date strong {
  font-size: 15px;
}

.metric-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.metric-card {
  position: relative;
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text) !important;
  text-decoration: none !important;
  box-shadow: var(--shadow);
}

.metric-card:hover {
  border-color: #9ca3af;
  box-shadow: 0 14px 30px rgb(17 17 17 / 10%);
}

.metric-status {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: #657182;
}

.metric-card-ok .metric-status {
  background: #2f343a;
}

.metric-card-warn .metric-status {
  background: #b7791f;
}

.metric-card-danger .metric-status {
  background: #b42318;
}

.metric-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-value {
  align-self: end;
  font-size: 28px;
  line-height: 1;
}

.metric-subtext {
  min-height: 32px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  margin-top: 16px;
}

.dashboard-layout-wide {
  grid-template-columns: minmax(420px, 1.3fr) minmax(260px, 0.7fr);
}

.dashboard-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-panel h2 {
  margin: 0;
  font-size: 20px;
}

.dashboard-panel header span {
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111111;
  font-weight: 800;
  text-align: center;
}

.dashboard-panel p {
  color: var(--muted);
}

.alert-list,
.state-list,
.activity-list,
.quick-action-grid {
  display: grid;
  gap: 10px;
}

.alert-list a {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #f0c5bd;
  border-radius: 8px;
  background: #fff7f5;
  color: #8f2f1f;
  text-decoration: none;
}

.alert-list a span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b42318;
}

.state-list div,
.activity-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.state-list div:last-child,
.activity-list div:last-child {
  border-bottom: 0;
}

.state-list span,
.activity-list span,
.activity-list time {
  color: var(--muted);
}

.activity-list time {
  font-size: 12px;
  font-weight: 700;
}

.activity-list strong {
  text-align: right;
}

.activity-list span {
  grid-column: 1 / -1;
  font-size: 13px;
}

.quick-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-action-grid a {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
  color: #111111;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-header,
  .dashboard-layout,
  .dashboard-layout-wide,
  .metric-grid,
  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-date {
    text-align: left;
  }
}

.label-template-telapa_100 {
  box-sizing: border-box;
  padding: 0;
}

.label-template-telapa_100 .telapa-label {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #000000;
  border-collapse: collapse;
  border-radius: 0;
  table-layout: fixed;
  background: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
}

.label-template-telapa_100 .telapa-label th,
.label-template-telapa_100 .telapa-label td {
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  text-align: left;
  vertical-align: middle;
}

.label-template-telapa_100 .telapa-header {
  height: 9.5mm;
  padding: 0;
  font-size: 12pt;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.label-template-telapa_100 .telapa-label tr:nth-child(2) {
  height: 13mm;
}

.label-template-telapa_100 .telapa-label tr:nth-child(3) {
  height: 15mm;
}

.label-template-telapa_100 .telapa-label tr:nth-child(4),
.label-template-telapa_100 .telapa-label tr:nth-child(5) {
  height: 11mm;
}

.label-template-telapa_100 .telapa-label tr:nth-child(6) {
  height: 11mm;
}

.label-template-telapa_100 .telapa-cell,
.label-template-telapa_100 .telapa-full {
  padding: 1.25mm 2mm;
  overflow: hidden;
  font-size: 10.4pt;
  line-height: 1.1;
}

.label-template-telapa_100 .telapa-cell.product {
  font-size: 11.3pt;
  font-weight: 800;
}

.label-template-telapa_100 .telapa-rollo {
  font-size: 9.4pt;
  line-height: 1.05;
  white-space: nowrap;
}

.label-template-telapa_100 .telapa-metric {
  font-size: 10.1pt;
}

.label-template-telapa_100 .telapa-cell span,
.label-template-telapa_100 .telapa-full span {
  font-size: 9.2pt;
  font-weight: 700;
}

.label-template-telapa_100 .telapa-cell strong,
.label-template-telapa_100 .telapa-full strong {
  font-weight: 800;
}

.label-template-telapa_100 .telapa-cell.composition {
  font-size: 10.8pt;
  font-weight: 700;
}

.label-template-telapa_100 .telapa-full {
  font-size: 10pt;
  overflow-wrap: anywhere;
}

.label-template-telapa_100 .telapa-barcode {
  height: auto;
  padding: 2mm 4mm 1.8mm;
  text-align: center;
}

.label-template-telapa_100 .telapa-barcode img {
  display: block;
  width: 100%;
  height: 21mm;
  margin: 0 auto;
}

.batch-label-body {
  background: #f1f2f4;
}

.batch-labels {
  display: grid;
  gap: 12px;
  justify-content: center;
}

.batch-label-page {
  width: 100mm;
  height: 100mm;
}

.batch-labels .zebra-label {
  margin: 0;
}

.user-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.user-access-module {
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.user-access-module h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.user-access-functions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

@media print {
  @page {
    size: 100mm 100mm;
    margin: 0;
  }

  html {
    width: 100mm;
    min-height: 100mm;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .label-body {
    display: block;
    width: 100mm;
    min-height: 100mm;
    margin: 0;
    padding: 0;
    background: #ffffff;
    overflow: visible;
  }

  html.single-label-print-page,
  html.single-label-print-page .label-body {
    height: 100mm;
    overflow: hidden;
  }

  .batch-label-body {
    width: 100mm;
    height: auto;
    min-height: 100mm;
    margin: 0;
    padding: 0;
    background: #ffffff;
    overflow: visible;
  }

  html.batch-label-print-page {
    width: 100mm;
    height: auto;
    overflow: visible;
  }

  .batch-labels {
    display: block;
    width: 100mm;
  }

  .batch-label-page {
    width: 100mm !important;
    height: 100mm !important;
    margin: 0 !important;
    overflow: hidden;
    page-break-inside: avoid;
    break-inside: avoid;
    page-break-after: always;
    break-after: page;
  }

  .batch-labels .zebra-label {
    display: block !important;
    width: 100mm !important;
    height: 100mm !important;
    margin: 0 !important;
  }

  .zebra-label.label-template-telapa_100 {
    width: 100mm !important;
    height: 100mm !important;
    margin: 0 !important;
    border: 0;
  }

  .batch-label-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}
