/* QA991: Workforce Schedule & Dispatch stays readable on phones. */
@media (max-width: 720px) {
  #app .premium-app .wfops-page .wfops-nav {
    gap: 4px !important;
    padding: 6px 6px 10px !important;
    scroll-padding-inline: 6px !important;
    scroll-snap-type: x proximity !important;
  }

  #app .premium-app .wfops-page .wfops-nav button {
    flex: 0 0 calc((100% - 8px) / 3) !important;
    min-width: 0 !important;
    min-height: 56px !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 8px 4px !important;
    font-size: 12px !important;
    scroll-snap-align: center !important;
  }

  #app .premium-app .wfops-page .wfops-nav button svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 17px !important;
  }

  #app .premium-app .wfops-page .wfops-nav button span {
    min-width: 0 !important;
    line-height: 1.1 !important;
    overflow: visible !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    border: 1px solid var(--wf-line) !important;
    border-radius: 9px !important;
    background: #091521 !important;
    font-size: 13px !important;
    line-height: 17px !important;
    text-align: left !important;
    white-space: normal !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow > button:hover {
    background: #102131 !important;
    border-color: #5d748a !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow > button.is-active,
  #app .premium-app .wfops-page .wfops-clock-flow > button[aria-pressed="true"] {
    background: #2a2118 !important;
    border-color: var(--wf-orange) !important;
    color: #fff !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow > button:disabled,
  #app .premium-app .wfops-page .wfops-clock-flow > button[aria-disabled="true"] {
    background: #0a1520 !important;
    border-color: #26394b !important;
    color: #6f8294 !important;
    opacity: .72 !important;
  }

  #app .premium-app .wfops-page .wfops-clock-flow > i {
    display: none !important;
  }

  #app .premium-app .wfops-page .wfops-clock-context {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 11px !important;
  }

  #app .premium-app .wfops-page .wfops-clock-context select {
    min-height: 48px !important;
  }

  #app .premium-app .wfops-page .wfops-clock-state {
    align-items: flex-start !important;
    line-height: 18px !important;
    margin-bottom: 11px !important;
  }

  #app .premium-app .wfops-page .wfops-clock-state::before {
    margin-top: 5px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-guide {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-guide > span {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    padding: 9px 10px !important;
    border: 1px solid var(--wf-line) !important;
    border-radius: 9px !important;
    background: #091521 !important;
    font-size: 12px !important;
    white-space: normal !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-guide > i {
    display: none !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table,
  #app .premium-app .wfops-page .wfops-schedule-table .wfops-table-wrap {
    overflow: visible !important;
    scrollbar-gutter: auto !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table table,
  #app .premium-app .wfops-page .wfops-schedule-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table thead {
    display: none !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table tbody {
    display: grid !important;
    gap: 10px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 13px !important;
    border: 1px solid var(--wf-line) !important;
    border-radius: 10px !important;
    background: #091521 !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td {
    display: block !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #e5edf6 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 4px !important;
    color: #90a7bb !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td:first-child {
    grid-column: 1 / -1 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--wf-line) !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td:nth-child(6) {
    grid-column: 1 / -1 !important;
    padding-top: 2px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td > strong,
  #app .premium-app .wfops-page .wfops-schedule-table td > small {
    display: block !important;
    min-width: 0 !important;
    white-space: normal !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table td > small {
    margin-top: 4px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table .wfops-status {
    max-width: 100% !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table .wfops-row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table .wfops-icon-btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  #app .premium-app .wfops-page .wfops-cost-summary {
    gap: 7px !important;
    margin-block: 12px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-summary > div {
    min-height: 72px !important;
    padding: 10px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > button {
    align-items: start !important;
    display: grid !important;
    gap: 9px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 13px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > button b {
    font-size: 16px !important;
    white-space: nowrap !important;
  }

  #app .premium-app .wfops-page .wfops-cost-signals {
    grid-template-columns: 1fr !important;
    padding: 11px 13px 1px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-pace > small,
  #app .premium-app .wfops-page .wfops-completion-forecast > small {
    font-size: 11px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-pace > span,
  #app .premium-app .wfops-page .wfops-completion-forecast > span {
    font-size: 12px !important;
  }

  #app .premium-app .wfops-page .wfops-progress-row {
    gap: 7px 9px !important;
    padding: 11px 13px 0 !important;
  }

  #app .premium-app .wfops-page .wfops-progress-row > span {
    align-items: start !important;
    display: grid !important;
    gap: 3px !important;
  }

  #app .premium-app .wfops-page .wfops-progress-row > span strong {
    overflow-wrap: anywhere !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > dl {
    margin: 10px 13px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > dl > div {
    align-items: start !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > footer {
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding: 11px 13px 13px !important;
  }

  #app .premium-app .wfops-page .wfops-cost-card > footer .wfops-btn {
    min-width: 0 !important;
    width: 100% !important;
  }

  #app .premium-app .wfops-page .wfops-cost-grid > .wfops-empty {
    grid-column: 1 / -1 !important;
  }

  #app .premium-app .wfops-page .wfops-data-table,
  #app .premium-app .wfops-page .wfops-data-table tbody {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  #app .premium-app .wfops-page .wfops-data-table thead {
    display: none !important;
  }

  #app .premium-app .wfops-page .wfops-data-table tbody {
    display: grid !important;
    gap: 10px !important;
  }

  #app .premium-app .wfops-page .wfops-data-table tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px 12px !important;
    width: 100% !important;
    padding: 13px !important;
    border: 1px solid var(--wf-line) !important;
    border-radius: 10px !important;
    background: #091521 !important;
  }

  #app .premium-app .wfops-page .wfops-data-table td {
    display: block !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  #app .premium-app .wfops-page .wfops-data-table td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin-bottom: 4px !important;
    color: #90a7bb !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
  }

  #app .premium-app .wfops-page .wfops-data-table td:first-child {
    grid-column: 1 / -1 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--wf-line) !important;
  }

  #app .premium-app .wfops-page .wfops-data-table .wfops-table-actions-cell {
    grid-column: 1 / -1 !important;
    padding-top: 2px !important;
  }

  #app .premium-app .wfops-page .wfops-data-table .wfops-row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #app .premium-app .wfops-page .wfops-data-table .wfops-row-actions .wfops-btn {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 350px) {
  #app .premium-app .wfops-page .wfops-nav button {
    gap: 3px !important;
    padding-inline: 2px !important;
    font-size: 10.5px !important;
  }

  #app .premium-app .wfops-page .wfops-nav button svg {
    width: 14px !important;
    height: 14px !important;
    flex-basis: 14px !important;
  }

  #app .premium-app .wfops-page .wfops-schedule-table tr {
    padding: 11px !important;
    gap: 10px !important;
  }
}
