/* Customer report reading only. Preserve existing report/print styles and the
   separate screen toolbar correction. Dense source rows scroll within the page. */
@media screen {
  .customer-progress .customer-report-summary {
    padding: 10px 6px 14px;
    background: #e8f1ff;
    border-radius: 5px;
  }
  .customer-progress .customer-report-summary h1 {
    margin: 0 0 10px;
    font-size: 28px;
  }
  .customer-progress .customer-report-summary-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 32px;
    margin-bottom: 12px;
  }
  .customer-progress .customer-report-summary-fields > dl {
    min-width: 240px;
    flex: 1 1 280px;
    margin: 0;
  }
  .customer-progress .customer-report-summary-fields dl > div {
    display: flex;
    gap: 5px;
    min-height: 25px;
    align-items: baseline;
  }
  .customer-progress .customer-report-summary-fields dt::after {
    content: ":";
  }
  .customer-progress .customer-report-summary-fields dd {
    margin: 0;
    overflow-wrap: anywhere;
  }
  .customer-progress
    .customer-report-summary-fields
    dl
    > .customer-report-inline-quantity {
    display: inline-flex;
    margin-right: 24px;
  }
  .customer-progress .customer-report-orders-scroll,
  .customer-progress .customer-report-operations-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  .customer-progress .customer-report-orders {
    min-width: 1100px;
    border: 2px solid #999;
    border-radius: 5px;
    background: #fff9ee;
  }
  .customer-progress .customer-progress-order,
  .customer-progress .customer-progress-lot,
  .customer-progress .customer-progress-operation {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .customer-progress .customer-progress-order + .customer-progress-order,
  .customer-progress .customer-progress-lot + .customer-progress-lot,
  .customer-progress
    .customer-progress-operation
    + .customer-progress-operation {
    border-top: 2px solid #999;
  }
  .customer-progress .customer-report-order-row,
  .customer-progress .customer-report-lot-row {
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 46px;
    padding: 5px;
  }
  .customer-progress .customer-report-order-row h2,
  .customer-progress .customer-report-lot-row h3 {
    flex: 0 0 220px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .customer-progress .customer-report-order-row dl,
  .customer-progress .customer-report-lot-row dl,
  .customer-progress .customer-report-operation-row {
    display: grid;
    gap: 16px;
    align-items: start;
    flex: 1;
    margin: 0;
  }
  .customer-progress .customer-report-order-row dl {
    grid-template-columns:
      minmax(150px, 1fr) 130px 130px minmax(150px, 1fr)
      120px;
  }
  .customer-progress .customer-report-lot-row dl {
    grid-template-columns: 180px minmax(180px, 1fr) 120px;
  }
  .customer-progress .customer-report-order-row dt,
  .customer-progress .customer-report-lot-row dt,
  .customer-progress .customer-report-operation-row dt {
    color: #526171;
    font-size: 12px;
  }
  .customer-progress .customer-report-order-row dd,
  .customer-progress .customer-report-lot-row dd,
  .customer-progress .customer-report-operation-row dd {
    margin: 3px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .customer-progress .customer-report-lots {
    margin: 5px 5px 12px 28px;
    border: 2px solid #999;
    background: #e8f1ff;
  }
  .customer-progress .customer-report-expand {
    min-width: 32px;
    min-height: 32px;
    padding: 4px 7px;
    background: #e6edff;
    color: #145acc;
    box-shadow: inset 1px 1px 3px #aaa;
  }
  .customer-progress .customer-report-expand[aria-expanded="true"] {
    background: #fff1cc;
    color: #624500;
  }
  .customer-progress .customer-report-operations-scroll:not([hidden]) {
    margin: 5px;
    border: 2px solid #999;
    background: #ffeddd;
  }
  .customer-progress .customer-report-operation-row {
    min-width: 1430px;
    padding: 6px;
    grid-template-columns:
      170px 150px 160px 160px 65px 180px minmax(200px, 1fr)
      160px;
  }
  .customer-progress .customer-report-qc button {
    padding: 5px 7px;
    font-size: 13px;
  }
  .customer-progress .customer-report-empty {
    margin: 0;
    padding: 8px;
    color: #526171;
  }
  .customer-progress .customer-report-calendar {
    margin-top: 20px;
    font:
      12px Arial,
      sans-serif;
  }
  .customer-progress .customer-report-calendar-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 48px;
  }
  .customer-progress .customer-report-calendar-toolbar button {
    border-radius: 2px;
    background: #31485b;
    font-size: 14px;
  }
  .customer-progress .customer-report-calendar-toolbar button:first-child {
    margin-right: 6px;
    background: #788695;
  }
  .customer-progress .customer-report-calendar-toolbar h2 {
    flex: 1 1 220px;
    margin: 5px;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
  }
  .customer-progress .customer-report-calendar-viewport {
    overflow: auto;
    max-height: 760px;
    border: 1px solid #ddd;
  }
  .customer-progress .customer-report-calendar-head,
  .customer-progress .customer-report-calendar-grid {
    display: grid;
    min-width: 1050px;
    grid-template-columns: 48px repeat(7, minmax(0, 1fr));
  }
  .customer-progress .customer-report-calendar-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fafafa;
  }
  .customer-progress .customer-report-calendar-head > span {
    padding: 4px;
    border: 1px solid #ddd;
    text-align: center;
  }
  .customer-progress .customer-report-calendar-grid {
    height: 864px;
    background: linear-gradient(#fafafa, #aaa);
  }
  .customer-progress .customer-report-calendar-hours > span {
    display: block;
    box-sizing: border-box;
    height: 36px;
    border-bottom: 1px solid #ddd;
    padding: 3px;
    text-align: center;
  }
  .customer-progress .customer-report-calendar-day {
    position: relative;
    border-left: 1px solid #ddd;
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 17px,
      #ddd 17px,
      #ddd 18px,
      transparent 18px,
      transparent 35px,
      #ddd 35px,
      #ddd 36px
    );
  }
  .customer-progress .customer-report-calendar-day.is-today {
    background-color: #fff9b855;
  }
  .customer-progress .customer-report-calendar-event {
    position: absolute;
    box-sizing: border-box;
    min-height: 3px;
    overflow: hidden;
    padding: 2px;
    border: 1px solid #1050bd;
    border-radius: 3px;
    background: #1e6df6;
    color: white;
  }
  .customer-progress .customer-report-calendar-event > span,
  .customer-progress .customer-report-calendar-event > small {
    display: block;
    overflow-wrap: anywhere;
  }
  .customer-progress .customer-report-calendar-note,
  .customer-progress .customer-report-calendar-empty {
    margin: 4px 0;
    color: #526171;
  }
  .customer-progress .customer-report-orders-scroll:focus-visible,
  .customer-progress .customer-report-operations-scroll:focus-visible,
  .customer-progress .customer-report-calendar-viewport:focus-visible {
    outline: 2px solid #145acc;
    outline-offset: 2px;
  }
}
@media screen and (max-width: 600px) {
  .customer-progress {
    padding: 12px;
  }
  .customer-progress .customer-report-summary-fields > dl {
    min-width: 0;
  }
  .customer-progress .customer-report-calendar-toolbar h2 {
    flex-basis: 100%;
    order: 1;
  }
}
