/* Authenticated Dashboard Responsive Fix — 1.5.2
   Intentional scope: logged-in dashboard only. Previous 1.5.1 changed detail view, not this dashboard.
   Does not touch tracking, data, access control, master imports, or QR behavior. */
.nrt-app.nrt-v2.nrt-view-dashboard {
  width:100%; max-width:100%; min-width:0; overflow:visible;
  --nrt-dashboard-accent:#147b75;
}
.nrt-app.nrt-v2.nrt-view-dashboard,
.nrt-app.nrt-v2.nrt-view-dashboard *,
.nrt-app.nrt-v2.nrt-view-dashboard *::before,
.nrt-app.nrt-v2.nrt-view-dashboard *::after { box-sizing:border-box; }
.nrt-app.nrt-v2.nrt-view-dashboard :where(.nrt-workspace,.nrt-workspace-main,.nrt-card,.nrt-kpis,.nrt-kpi,.nrt-dashboard-panels,.nrt-track-widget,.nrt-track-copy,.nrt-action-bar,.nrt-panel-title,.nrt-table-wrap,.nrt-distribution,.nrt-legend) {min-width:0;max-width:100%;}
.nrt-app.nrt-v2.nrt-view-dashboard :where(h1,h2,h3,p,small,strong,span,a) {overflow-wrap:anywhere;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace {width:100%;grid-template-columns:minmax(0,220px) minmax(0,1fr);}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace.nrt-workspace-solo {display:block;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace-main {width:100%;padding:clamp(14px,2vw,30px);}
.nrt-app.nrt-v2.nrt-view-dashboard.nrt-elementor-embed .nrt-workspace-solo .nrt-workspace-main {padding:0;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-page-title h1 {font-family:ui-rounded,'Segoe UI',Arial,sans-serif;font-weight:800;letter-spacing:-.035em;line-height:1.18;font-size:clamp(23px,2.4vw,34px);}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-page-date {white-space:normal;text-align:center;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar {gap:12px;align-items:center;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar>div {min-width:0;display:flex;flex-wrap:wrap;gap:8px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar .nrt-button {min-height:44px;padding:10px 13px;line-height:1.25;white-space:normal;text-align:center;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpis-six {grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi {display:flex;align-items:center;gap:12px;min-width:0;padding:15px;background:white;border:1px solid #dbeae8;box-shadow:0 4px 14px rgba(22,79,81,.05);}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi>div {min-width:0;flex:1;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi-icon {flex:0 0 38px;width:38px;height:38px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi .nrt-kpi-label {font-size:12px;line-height:1.35;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi strong {font-family:ui-rounded,'Segoe UI',Arial,sans-serif;font-size:clamp(21px,2vw,30px);}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels>.nrt-card {width:100%;margin:0 0 15px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower {grid-template-columns:minmax(0,1.85fr) minmax(250px,.8fr);}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-panel-title {flex-wrap:wrap;align-items:flex-start;gap:7px 14px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-panel-title h3 {font-family:ui-rounded,'Segoe UI',Arial,sans-serif;font-size:17px;line-height:1.3;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-distribution {gap:13px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-legend {flex:1 1 145px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget {margin:10px 0;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:13px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget .nrt-track-copy,
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget .nrt-track-input {width:100%;min-width:0;max-width:100%;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget .nrt-track-icon {display:none;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget input {min-width:0;width:100%;font-size:16px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-track-widget button {width:100%;min-height:44px;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-table-wrap {max-width:100%;width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-table {min-width:660px;width:100%;max-width:none;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-table th,
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-table td {white-space:normal;overflow-wrap:anywhere;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar {min-width:0;}
.nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar nav a {min-height:43px;}
/* Container breakpoints respond to actual WordPress/Elementor shortcode width. */
@container nrt-portal (max-width:1180px){
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels {grid-template-columns:minmax(0,1fr);}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpis-six {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@container nrt-portal (max-width:900px){
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace {grid-template-columns:minmax(0,1fr);}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar {padding:10px 12px;border-right:0;border-bottom:1px solid #dbe9e7;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar-title,.nrt-view-dashboard .nrt-sidebar-foot {display:none;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar nav {display:flex;flex-direction:row;gap:6px;overflow-x:auto;max-width:100%;padding:2px 0 6px;scrollbar-width:thin;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar nav a {white-space:nowrap;flex-shrink:0;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace-main {padding:16px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels {grid-template-columns:minmax(0,1fr);}
}
@container nrt-portal (max-width:530px){
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace-main {padding:12px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-card {padding:14px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dash-heading {display:flex;flex-direction:column;align-items:flex-start;gap:10px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-page-date {font-size:11px;padding:6px 9px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar {display:block;padding:12px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar>b {display:block;margin-bottom:8px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar>div {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar .nrt-button {width:100%;font-size:12px;padding:10px 6px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpis-six {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi {display:flex;align-items:flex-start;flex-direction:column;gap:8px;padding:11px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi-icon {width:32px;height:32px;flex:0 0 32px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi .nrt-kpi-label {font-size:11px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpi strong {font-size:23px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-donut {width:142px;height:142px;flex:0 0 142px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-donut::before {width:100px;height:100px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-legend {flex:1 1 120px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels>.nrt-card {margin:0 0 12px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-table-wrap {margin-bottom:10px;}
  /* Recent shipments become self-contained information cards, not a cropped desktop table. */
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table-wrap {overflow:visible;border:0;background:transparent;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table {min-width:0;width:100%;display:block;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table thead {display:none;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table tbody {display:grid;grid-template-columns:minmax(0,1fr);gap:10px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table tr {display:grid;grid-template-columns:minmax(0,1fr);padding:10px 12px;border:1px solid #d8e8e5;border-radius:10px;background:#fbfefd;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td {display:grid;grid-template-columns:90px minmax(0,1fr);align-items:start;gap:6px;padding:5px 0;border:0!important;min-width:0;white-space:normal;font-size:12px;background:transparent!important;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td::before {color:#657d84;font-weight:650;font-size:11px;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(1)::before {content:'Batch';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(2)::before {content:'Consignee';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(3)::before {content:'Transporter';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(4)::before {content:'LR / AWB';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(5)::before {content:'Status';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(6)::before {content:'ETA';}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-lower .nrt-table td:nth-child(7)::before {content:'Details';}

}
@container nrt-portal (max-width:350px){
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar>div {grid-template-columns:minmax(0,1fr);}
}
/* Viewport fallback for older browsers lacking container queries. */
@supports not (container-type:inline-size) {
 @media(max-width:900px){.nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace{grid-template-columns:minmax(0,1fr);}.nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels{grid-template-columns:minmax(0,1fr);}.nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar nav{display:flex;flex-direction:row;overflow-x:auto;}.nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar-title,.nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar-foot{display:none;}}
 @media(max-width:540px){.nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace-main{padding:12px;}.nrt-app.nrt-v2.nrt-view-dashboard .nrt-kpis-six{grid-template-columns:repeat(2,minmax(0,1fr));}.nrt-app.nrt-v2.nrt-view-dashboard .nrt-action-bar>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}}
}
@media print{
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-workspace{display:block;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-sidebar {display:none;}
  .nrt-app.nrt-v2.nrt-view-dashboard .nrt-dashboard-panels {display:block;}
}
