/* DZ Truk Material | LAYOUT FULL WIDTH V3 | Gentelella + Bootstrap 3 | PHP 7.3-compatible.\n   Scope: layout & presentation ONLY. Do not change business, database, security or request routes. */
:root { --dz-wide-gutter: clamp(16px,1.45vw,30px); }
html { max-width:100%; }
body.blue-theme.phase-app { max-width:100%; overflow-x:clip; }
/* The prior v2 capped workspace-content to 1540px; on large screens this creates
   the large white strip shown in the reported screenshot. Keep the sidebar width
   and make the main pane consume ALL of the remaining width. */
.blue-theme.phase-app .workspace {
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  width:100%; max-width:100%; min-width:0; min-height:100vh;
  align-items:stretch;
}
.blue-theme.phase-app .workspace-main {
  min-width:0; width:100%; max-width:100%; min-height:100vh;
  display:flex; flex-direction:column;
}
.blue-theme.phase-app .workspace-content {
  box-sizing:border-box; display:flex; flex-direction:column; flex:1 0 auto;
  width:100%; min-width:0; max-width:none !important;
  margin:0 !important; padding:26px var(--dz-wide-gutter) 0;
}
.blue-theme.phase-app .workspace-content> :not(.modal) {min-width:0;}
/* Bootstrap .row uses -15px horizontal margins; as a direct content child
   it causes document-wide horizontal scrolling on phones. */
.blue-theme.phase-app .workspace-content>.row {margin-left:0;margin-right:0;width:100%;}
.blue-theme.phase-app .workspace-footer {margin-top:auto; width:100%;}
.blue-theme.phase-app .topbar {width:100%;max-width:100%;min-width:0;flex:0 0 auto;}
/* Sidebar stays part of the native layout; mobile nav continues to use
   phase002-shell.js and the original (max-width:820px) drawer behavior. */
.blue-theme.phase-app .sidebar {min-width:0;max-width:250px;}
/* All business cards extend to the natural right edge instead of leaving
   a fake inner desktop column. Receipts and print-only documents are exempt. */
.blue-theme.phase-app .workspace-content>.dz-panel,
.blue-theme.phase-app .workspace-content>.x_panel,
.blue-theme.phase-app .workspace-content>.dz-chart-grid,
.blue-theme.phase-app .workspace-content>.dz-stats-grid,
.blue-theme.phase-app .workspace-content>.dz-summary-strip,
.blue-theme.phase-app .workspace-content>.dz-section-head,
.blue-theme.phase-app .workspace-content>.dz-tabs,
.blue-theme.phase-app .workspace-content>.dz-quick-links,
.blue-theme.phase-app .workspace-content>.dz-alert-strip {width:100%;max-width:none;}
.blue-theme.phase-app .dz-panel.dz-form-panel {width:100%;max-width:none!important;}
.blue-theme.phase-app .dz-report-table {width:100%;max-width:none!important;}
.blue-theme.phase-app .dz-panel,.blue-theme.phase-app .x_panel.app-panel {
  box-sizing:border-box; min-width:0; max-width:100%;
  border-radius:14px; padding:20px 22px; box-shadow:0 5px 20px rgba(28,75,123,.045);
}
/* Normalize a common reusable page heading across every menu. */
.blue-theme.phase-app .dz-section-head {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:14px 22px; width:100%; min-width:0;
  margin:0 0 20px; padding:0;
}
.blue-theme.phase-app .dz-section-head>div:first-child {flex:1 1 420px; min-width:0;}
.blue-theme.phase-app .dz-section-head>.btn,
.blue-theme.phase-app .dz-section-head>div:last-child:not(:first-child) {flex:0 0 auto; max-width:100%;}
.blue-theme.phase-app .dz-section-head p:not(.dz-eyebrow) {max-width:1000px;}
.blue-theme.phase-app .dz-section-head h2 {margin-top:4px;}
.blue-theme.phase-app .dz-tabs {display:flex;gap:7px;flex-wrap:wrap;overflow:visible;margin-bottom:15px;min-width:0;}
.blue-theme.phase-app .dz-tabs a {min-height:36px;display:inline-flex;align-items:center;justify-content:center;}
/* Tidy list toolbar: filter, record count, export stay on ONE row on desktop. */
.blue-theme.phase-app .dz-panel.dz-list-root {
  display:grid; grid-template-columns:minmax(0,1fr) auto;
  grid-auto-flow:row; align-items:start; column-gap:14px;
  width:100%;
}
.blue-theme.phase-app .dz-list-root>.dz-panel-title {grid-column:1/-1;min-width:0;}
.blue-theme.phase-app .dz-list-root>.dz-table-toolbar {grid-column:1;align-self:center;min-width:0;margin:0 0 14px;}
.blue-theme.phase-app .dz-list-root>.dz-export-row {
  grid-column:2;align-self:center;min-width:0;margin:0 0 14px;
  padding:0;border:0;display:flex;justify-content:flex-end;
}
.blue-theme.phase-app .dz-list-root>.table-responsive,
.blue-theme.phase-app .dz-list-root>.dz-pagination,
.blue-theme.phase-app .dz-list-root>nav.dz-pagination {grid-column:1/-1;min-width:0;}
.blue-theme.phase-app .dz-list-root>.dz-table-toolbar {gap:8px;}
.blue-theme.phase-app .dz-list-root .dz-search-form {min-width:0;max-width:100%;flex:0 1 auto;margin:0;}
.blue-theme.phase-app .dz-list-root .dz-search-form input[type=search] {flex:1 1 215px; width:auto;min-width:140px;max-width:340px;}
.blue-theme.phase-app .dz-list-root .dz-search-form .form-control {box-sizing:border-box;}
.blue-theme.phase-app .dz-list-root .dz-table-toolbar>.dz-muted {white-space:nowrap;margin-left:auto;padding:0 4px;font-size:12px;}
.blue-theme.phase-app .dz-list-root .dz-export-row .btn {min-height:38px;display:inline-flex;align-items:center;white-space:nowrap;}
/* Consistent table readability; horizontal scrolling must live inside the card. */
.blue-theme.phase-app .dz-panel>.table-responsive,
.blue-theme.phase-app .dz-list-root>.table-responsive,
.blue-theme.phase-app .x_panel>.table-responsive {
  width:100%; min-width:0; max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
  border:0; margin:0;
}
.blue-theme.phase-app .dz-panel table.dz-table {width:100%; max-width:100%;}
.blue-theme.phase-app .dz-panel .dz-table>thead>tr>th {white-space:normal;vertical-align:middle;}
.blue-theme.phase-app .dz-panel .dz-table>tbody>tr>td {vertical-align:middle;}
.blue-theme.phase-app .dz-panel .dz-table>tbody>tr>td.dz-empty {
  padding:32px 14px!important;text-align:center;min-height:112px;height:112px;
  line-height:1.7;font-size:13px;color:#6a819d;
  background:linear-gradient(180deg,#fbfdff,#f6f9fc);
}
.blue-theme.phase-app .dz-pagination {margin-top:12px;padding-top:13px;min-width:0;}
.blue-theme.phase-app .dz-pagination .dz-pages {justify-content:flex-end;max-width:100%;}
.blue-theme.phase-app .dz-summary-strip .dz-info-card {flex:1 1 220px;min-width:0;}
/* Large entry forms should align with the table/cards around them, not stop at 1150px. */
.blue-theme.phase-app .dz-form-panel .row {display:flex;flex-wrap:wrap;align-items:stretch;}
.blue-theme.phase-app .dz-form-panel .row>[class*="col-"] {float:none;}
.blue-theme.phase-app .dz-price-preview {width:100%;max-width:100%;}
.blue-theme.phase-app .dz-form-panel .dz-form-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;}
/* Reports and DataTables keep responsive internal controls. */
.blue-theme.phase-app .dz-dt-toolbar,
.blue-theme.phase-app .dz-dt-footer {min-width:0;max-width:100%;gap:12px;}
.blue-theme.phase-app .dt-container,.blue-theme.phase-app .dataTables_wrapper {width:100%;max-width:100%;min-width:0;}
.blue-theme.phase-app .dz-chart-grid,.blue-theme.phase-app .dz-stats-grid {min-width:0;}
.blue-theme.phase-app .dz-chart-grid>.dz-panel {min-width:0;max-width:100%;}
.blue-theme.phase-app .dz-document-print,.blue-theme.phase-app .dz-slip {max-width:100%;}
/* Modal: keep its existing SweetAlert/validation behavior, but avoid clipping
   when text is long or a field-level error appears in the form. */
.blue-theme.phase-app .dz-modal .modal-dialog {max-width:min(700px,calc(100vw - 30px));width:calc(100% - 30px);}
.blue-theme.phase-app .dz-modal .modal-header {flex-wrap:nowrap;}
.blue-theme.phase-app .dz-modal .modal-content {max-width:100%;}
.blue-theme.phase-app .dz-modal .modal-body {min-width:0;}
.blue-theme.phase-app .dz-modal .modal-body>.dz-field-wide,
.blue-theme.phase-app .dz-modal .modal-body>p.dz-muted {grid-column:1/-1;}
/* Between large desktop and tablet: keep sidebar, no content clipping. */
@media (max-width:1200px) and (min-width:821px) {
  .blue-theme.phase-app .workspace {grid-template-columns:235px minmax(0,1fr);}
  .blue-theme.phase-app .sidebar {max-width:235px;}
  .blue-theme.phase-app .workspace-content {padding:20px 20px 0;}
  .blue-theme.phase-app .dz-list-root>.dz-table-toolbar {flex-wrap:wrap;}
  .blue-theme.phase-app .dz-list-root .dz-search-form {flex:1 1 100%;}
  .blue-theme.phase-app .dz-list-root .dz-table-toolbar>.dz-muted {margin-left:0;}
}
@media (max-width:1100px) {
  .blue-theme.phase-app .dz-panel.dz-list-root {grid-template-columns:minmax(0,1fr);}
  .blue-theme.phase-app .dz-list-root>.dz-table-toolbar,
  .blue-theme.phase-app .dz-list-root>.dz-export-row {grid-column:1;}
  .blue-theme.phase-app .dz-list-root>.dz-export-row {justify-content:flex-end;margin:0 0 10px;}
  .blue-theme.phase-app .dz-list-root .dz-table-toolbar {justify-content:flex-start;}
  .blue-theme.phase-app .dz-list-root .dz-search-form {flex:1 1 auto;}
}
@media (max-width:820px) {
  .blue-theme.phase-app .workspace {grid-template-columns:minmax(0,1fr);}
  .blue-theme.phase-app .workspace-main {width:100%;min-height:100vh;}
  .blue-theme.phase-app .sidebar {max-width:270px;}
  .blue-theme.phase-app .workspace-content {padding:17px 14px 0;}
  .blue-theme.phase-app .dz-section-head {align-items:flex-start;}
  .blue-theme.phase-app .dz-panel,.blue-theme.phase-app .x_panel.app-panel {padding:17px 16px;}
  .blue-theme.phase-app .dz-panel .dz-table {min-width:640px;}
  .blue-theme.phase-app .dz-dt-toolbar,.blue-theme.phase-app .dz-dt-footer {flex-wrap:wrap;}
  .blue-theme.phase-app .dz-form-panel .row>[class*="col-"] {flex:0 0 50%;max-width:50%;}
  .blue-theme.phase-app .dz-modal .modal-dialog {margin:18px auto;}
}
@media (max-width:560px) {
  .blue-theme.phase-app .workspace-content {padding:13px 12px 0;}
  .blue-theme.phase-app .dz-section-head {margin-bottom:14px;gap:12px;}
  .blue-theme.phase-app .dz-section-head>div:first-child {flex:0 1 auto;width:100%;}
  .blue-theme.phase-app .dz-section-head>.btn {min-height:38px;}
  .blue-theme.phase-app .dz-panel,.blue-theme.phase-app .x_panel.app-panel {padding:14px 12px;border-radius:12px;}
  .blue-theme.phase-app .dz-tabs {flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;}
  .blue-theme.phase-app .dz-tabs a {flex:0 0 auto;white-space:nowrap;}
  .blue-theme.phase-app .dz-list-root>.dz-table-toolbar {flex-direction:column;align-items:stretch;}
  .blue-theme.phase-app .dz-list-root .dz-search-form {width:100%;flex:1 1 auto;}
  .blue-theme.phase-app .dz-list-root .dz-search-form input[type=search] {min-width:100%;max-width:none;}
  .blue-theme.phase-app .dz-list-root>.dz-export-row {justify-content:flex-start;}
  .blue-theme.phase-app .dz-list-root .dz-table-toolbar>.dz-muted {margin:0;}
  .blue-theme.phase-app .dz-form-panel .row>[class*="col-"] {flex:0 0 100%;max-width:100%;}
  .blue-theme.phase-app .dz-info-card {flex:1 1 140px;min-width:0;}
  .blue-theme.phase-app .dz-modal .modal-dialog {max-width:calc(100vw - 16px);width:calc(100% - 16px);margin:8px auto;}
  .blue-theme.phase-app .dz-modal .modal-body {grid-template-columns:minmax(0,1fr);}
}
@media print {
  body.blue-theme.phase-app {overflow:visible!important;}
  .blue-theme.phase-app .workspace,.blue-theme.phase-app .workspace-main,.blue-theme.phase-app .workspace-content {display:block!important;max-width:100%!important;width:100%!important;min-height:0!important;margin:0!important;padding:0!important;}
  .blue-theme.phase-app .dz-panel,.blue-theme.phase-app .dz-form-panel {max-width:100%!important;}
}
