/* Modest compact density: keep every field/action, existing typography and themes.
   This final layer changes presentation only; touch controls stay at least 44px. */
.page-wrap { padding: 19px 20px 26px !important; }
.page-heading { min-height: 64px; gap: 12px; margin-bottom: 14px !important; }
.page-heading h1 { font-size: clamp(var(--zkl-font-24, 24px), var(--zkl-font-vw-2_5, 2.5vw), var(--zkl-font-29, 29px)) !important; }
.panel-heading { gap: 10px; margin-bottom: 10px !important; padding-bottom: 9px; }
.chart-panel, .table-panel, .recent-panel { padding: 13px 14px !important; }
.catalog-grid { gap: 10px; margin-bottom: 11px; }
.inventory-tabs, .production-tabs { margin-bottom: 10px !important; padding: 3px !important; }
.stat-card { min-height: 116px !important; padding: 12px !important; }
.stat-card > strong { margin-top: 9px !important; font-size: clamp(var(--zkl-font-20, 20px), var(--zkl-font-vw-1_7, 1.7vw), var(--zkl-font-26, 26px)) !important; }
.form-grid { gap: 10px; }
.form-field { gap: 4px; }
.modal-header { gap: 10px; padding: 12px 16px !important; }
.modal-body { padding: 14px 16px !important; }
.modal-footer { padding: 10px 16px !important; }
/* One compact cell size across Dashboard, Production, Inventory, Costing, and detail tables. */
.data-table th, .data-table td,
.data-table tfoot th, .data-table tfoot td { padding: 5px 6px !important; }

/* The same seven columns remain in the same horizontal row on every screen.
   Wrapping descriptive values saves width without truncation or tiny text. */
.production-entry-table { min-width: 700px; }
.production-entry-table th, .production-entry-table td { padding: 7px !important; }
.production-entry-table td { line-height: 1.3; }
.production-entry-table th:first-child,
.production-entry-table td[data-mobile-field="date"] { min-width: 84px; }
.production-entry-table td[data-mobile-field="identity"] { min-width: 128px; }
.production-entry-table td[data-mobile-field="print-type"] { min-width: 78px; }
.production-entry-table td[data-mobile-field="body-color"] { min-width: 84px; }
.production-entry-table td[data-mobile-field="quantity"] { min-width: 72px; }
.production-entry-table td[data-mobile-field="cm"] { min-width: 78px; }
.production-entry-table td[data-mobile-field="actions"] { min-width: 54px; }
.production-entry-identity { gap: 2px; max-width: 170px; }
.production-entry-type-badge { min-height: 20px; padding: 2px 6px; }
.production-entry-table .icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px !important;
  min-height: 44px !important;
}
.production-entry-table th + th,
.production-entry-table td + td {
  border-left: 1px solid color-mix(in srgb, var(--line) 45%, transparent);
}
.production-entry-toolbar { gap: 6px; margin: 8px 0 9px; }

@media (min-width: 761px) {
  .sidebar { width: 224px !important; padding: 18px 12px 14px !important; }
  .main-shell { margin-left: 224px !important; }
  .topbar { min-height: 60px; height: 60px !important; padding: 0 20px !important; }
  .button { min-height: 38px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .sidebar { width: 212px !important; }
  .main-shell { margin-left: 212px !important; }
}
@media (max-width: 760px) {
  .page-wrap { padding: 12px 10px calc(26px + env(safe-area-inset-bottom)) !important; }
  .topbar {
    height: calc(58px + env(safe-area-inset-top)) !important;
    min-height: calc(58px + env(safe-area-inset-top)) !important;
  }
  .page-heading { min-height: 0; gap: 8px; margin-bottom: 12px !important; }
  .page-heading h1 { font-size: var(--zkl-font-24, 24px) !important; }
  .chart-panel, .table-panel, .recent-panel { padding: 11px !important; }
  .form-grid { gap: 8px; }
  .stat-card { min-height: 104px !important; padding: 11px !important; }
  .stat-card > strong { font-size: var(--zkl-font-20, 20px) !important; }
  .modal-header, .modal-body { padding: 12px !important; }
  .modal-footer { padding: 10px 12px max(10px, env(safe-area-inset-bottom)) !important; }
  .button, .icon-button { min-height: 44px !important; }
  .icon-button { min-width: 44px !important; }
  .mobile-compact-head { min-height: 31px; }
  .mobile-compact-head > span { padding-top: 6px; padding-bottom: 6px; }
  .mobile-compact-summary { min-height: 56px; }
  .mobile-compact-summary > div { padding-top: 6px; padding-bottom: 6px; }
  .mobile-compact-fields { gap: 6px; }
  .mobile-compact-field { padding: 8px; }
}
@media (max-width: 360px) {
  .page-wrap { padding-right: 8px !important; padding-left: 8px !important; }
}
