/* Workbench preview based on the supplied Seller Central reference. */
.page-content:has(#dashboard-grid) {
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #0f1111;
  --muted: #565959;
  --line: #d5d9d9;
  --shadow: none;
}
.page-content:has(#dashboard-grid) .page-heading h1 { font-size: 28px; font-weight: 700; letter-spacing: 0; color: #0f1111; }
.page-content:has(#dashboard-grid) .page-heading p { font-size: 14px; line-height: 1.6; color: #565959; }
.page-content:has(#dashboard-grid) .eyebrow { font-size: 12px; color: #565959; letter-spacing: .3px; }
#dashboard-grid { gap: 20px; margin-top: 16px; }
#dashboard-grid .card { border: 1px solid #d5d9d9; border-radius: 18px; box-shadow: none; overflow: hidden; }
#dashboard-grid .card-head { padding: 22px 24px 0; align-items: flex-start; }
#dashboard-grid .card-body { padding: 20px 24px 24px; }
#dashboard-grid .card-title { font-size: 20px; font-weight: 700; line-height: 1.4; color: #0f1111; }
#dashboard-grid .card-subtitle { font-size: 13px; color: #565959; line-height: 1.6; margin-top: 6px; }
#dashboard-grid .metric-card { min-height: 164px; padding: 22px 24px; }
#dashboard-grid .metric-top { font-size: 15px; font-weight: 700; color: #0f1111; }
#dashboard-grid .metric-icon { background: transparent; color: #565959; border-radius: 0; font-size: 18px; }
#dashboard-grid .metric-value { font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -.3px; color: #0f1111; margin: 18px 0 12px; font-variant-numeric: tabular-nums; }
#dashboard-grid .metric-bottom { flex-wrap: wrap; font-size: 12px; color: #565959; line-height: 1.6; }
#dashboard-grid .trend-up, #dashboard-grid .trend-down { background: transparent; padding: 0; border-radius: 0; }
.page-content:has(#dashboard-grid) .btn { min-height: 36px; padding: 7px 14px; border: 1px solid #adb1b8; border-radius: 8px; font-size: 14px; color: #0f1111; background: #fff; }
.page-content:has(#dashboard-grid) .btn:hover { background: #f7fafa; border-color: #888c8c; }
.page-content:has(#dashboard-grid) .btn-primary { background: #0073bb; border-color: #0073bb; color: #fff; }
.page-content:has(#dashboard-grid) .btn-primary:hover { background: #005e99; }
.page-content:has(#dashboard-grid) .select,
.page-content:has(#dashboard-grid) .dashboard-date-input { min-height: 40px; border: 1px solid #adb8c5; border-radius: 8px; padding: 8px 12px; font-size: 15px; color: #0f1111; background-color: #fff; }
.page-content:has(#dashboard-grid) select:focus-visible,
.page-content:has(#dashboard-grid) button:focus-visible,
.page-content:has(#dashboard-grid) input:focus-visible { outline: 3px solid #80c7ed; outline-offset: 2px; }
.page-content:has(#dashboard-grid) .dashboard-filter-bar { padding: 14px 18px; gap: 12px; border: 1px solid #d5d9d9; border-radius: 12px; font-size: 14px; }
.page-content:has(#dashboard-grid) .dashboard-filter-bar > label { color: #0f1111; }
.page-content:has(#dashboard-grid) .dashboard-meta { font-size: 12px; color: #565959; flex-wrap: wrap; line-height: 1.6; }
#dashboard-grid .dashboard-trend-controls { gap: 8px; }
#dashboard-grid .dashboard-trend-controls > label { font-size: 12px; color: #565959; }
#dashboard-grid .chart-legend { font-size: 12px; color: #565959; flex-wrap: wrap; }
#dashboard-grid .table-link { font-size: 14px; color: #0073bb; line-height: 1.5; }
#dashboard-grid .table-link:hover { color: #005e99; text-decoration: underline; }
#dashboard-grid .empty-state, #dashboard-grid .empty-card { font-size: 14px; color: #565959; line-height: 1.7; }
#dashboard-grid .bar-row { font-size: 13px; grid-template-columns: minmax(75px,100px) 1fr 70px; }
#dashboard-grid .bar-label, #dashboard-grid .bar-value { color: #0f1111; }
#dashboard-grid .bar-fill { background: #0073bb; }
#dashboard-grid .alert-text strong { color: #0f1111; font-size: 14px; }
#dashboard-grid .alert-text span, #dashboard-grid .alert-age { color: #565959; font-size: 12px; line-height: 1.5; }
#dashboard-grid .alert-row { padding: 16px 0; border-color: #d5d9d9; }
#dashboard-grid .data-table th { font-size: 12px; color: #565959; background: #f7f8f8; border-color: #d5d9d9; padding: 12px 16px; }
#dashboard-grid .data-table td { font-size: 14px; color: #0f1111; border-color: #d5d9d9; padding: 14px 16px; }
#dashboard-grid .status { font-size: 12px; }
#dashboard-grid .axis-labels { font-size: 11px; color: #565959; }
#dashboard-grid .chart-line { stroke: #0073bb; }
#dashboard-grid .chart-wrap { height: 225px; }
#dashboard-grid .widget-tools { top: 8px; right: 8px; }
.page-content:has(#dashboard-grid) .customize-banner { font-size: 13px; color: #0f1111; background: #f0f8ff; padding: 12px 16px; }
.page-content:has(#dashboard-grid) .drag-hint { font-size: 13px; color: #565959; }
@media(max-width:1200px) {
  #dashboard-grid > .span-3 { grid-column: span 6; }
  #dashboard-grid > .span-4, #dashboard-grid > .span-8 { grid-column: span 12; }
}
@media(max-width:720px) {
  #dashboard-grid { gap: 14px; }
  #dashboard-grid > .widget { grid-column: span 12; }
  #dashboard-grid .card-head { padding: 18px 16px 0; flex-wrap: wrap; }
  #dashboard-grid .card-body { padding: 16px; }
  #dashboard-grid .metric-card { padding: 18px; min-height: 145px; }
  #dashboard-grid .card-title { font-size: 18px; }
  #dashboard-grid .dashboard-trend-controls { margin-left: 0; width: 100%; }
  .page-content:has(#dashboard-grid) .dashboard-filter-bar { align-items: flex-start; }
}

/* Final global dialog sizing: landscape layout with reachable two-axis scrolling. */
.modal-backdrop { padding: 2vh 2vw; }
.modal, .modal:has(form), .modal:has(.shipment-entry-table) {
  box-sizing: border-box;
  width: min(1280px, 96vw);
  max-width: 96vw;
  max-height: 82vh;
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.6;
}
.modal-head, .modal-foot { flex: 0 0 auto; background: #fff; }
.modal-head { padding: 20px 28px; }
.modal-head h2 { font-size: 24px; line-height: 1.4; }
.modal-head .icon-button { width: 44px; height: 44px; font-size: 28px; }
.modal-body {
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8f969d #f3f4f4;
}
.modal-body::-webkit-scrollbar { width: 10px; height: 12px; }
.modal-body::-webkit-scrollbar-thumb { background: #8f969d; border-radius: 8px; }
.modal-body::-webkit-scrollbar-track { background: #f3f4f4; }
.modal-foot { padding: 16px 28px; gap: 12px; flex-wrap: wrap; }
.modal .field { min-width: 0; }
.modal .field label { font-size: 16px; margin-bottom: 8px; }
.modal .field input, .modal .field select, .modal .field textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  font-size: 16px;
}
.modal .field textarea { min-height: 100px; }
.modal .btn { min-height: 44px; padding: 9px 18px; font-size: 16px; }
.modal .data-table-wrap, .modal .shipment-grid-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #9aa0a6 #f3f4f4;
}
.modal .data-table-wrap::-webkit-scrollbar, .modal .shipment-grid-wrap::-webkit-scrollbar { height: 10px; }
.modal .data-table-wrap::-webkit-scrollbar-thumb, .modal .shipment-grid-wrap::-webkit-scrollbar-thumb { background: #9aa0a6; border-radius: 8px; }
.modal .data-table { width: max-content; min-width: 100%; }
@media (max-width: 700px) {
  .modal-backdrop { padding: 10px; }
  .modal, .modal:has(form), .modal:has(.shipment-entry-table) {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: 90vh;
    max-height: 90dvh;
  }
  .modal-head { padding: 14px 16px; }
  .modal-head h2 { font-size: 21px; }
  .modal-body { padding: 18px 16px; }
  .modal-foot { padding: 12px 16px; }
  .modal .form-grid { grid-template-columns: minmax(0, 1fr); }
}
