/* Keep staff controls usable when desktop browser zoom reduces the CSS viewport.
   At these widths the sidebar is still present, so feature layouts must respond
   to the narrower content area rather than waiting for the phone breakpoint. */
@media screen and (min-width: 761px) and (max-width: 1180px) {
  .app-shell.staff-workspace .main-area > .content {
    padding-inline: clamp(14px, 2vw, 22px) !important;
  }

  .app-shell .content > .staff-team[data-team-root="Data Relawan"],
  .app-shell .content > .staff-team[data-team-root="Rekap Gaji"] {
    grid-template-columns: minmax(0, 1fr);
  }
  .staff-team[data-team-root="Data Relawan"] > .team-toolbar,
  .staff-team[data-team-root="Rekap Gaji"] > .team-toolbar,
  .staff-team[data-team-root="Data Relawan"] > .team-actions,
  .staff-team[data-team-root="Rekap Gaji"] > .team-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }
  .staff-team[data-team-root="Data Relawan"] > .team-actions,
  .staff-team[data-team-root="Rekap Gaji"] > .team-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .staff-team .team-filter-panel {
    flex: 1 1 100%;
    min-width: 0;
  }
  .staff-team .team-filter-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fc-week-head {
    align-items: stretch;
    flex-direction: column;
  }
  .fc-week-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  .fc-week-controls label {
    flex: 1 1 170px;
    min-width: 170px;
  }
  .fc-week-controls input { width: 100%; }

  .ing-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ing-filter > label:first-child { grid-column: 1 / -1; }
  .ing-summary-values { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .app-shell .main-area > .warehouse-page > .warehouse-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .warehouse-page .warehouse-scroll-hint { display: block; }
}

@media screen and (min-width: 761px) and (max-width: 900px) {
  .fc-week-totals,
  .fc-week-days,
  .bm-week-summary,
  .sj-week-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .arrival-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .arrival-toolbar [data-arrival-print] {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .arrival-toolbar .app-print-menu,
  .arrival-toolbar .app-print-trigger { width: 100%; }
}

@media screen and (min-width: 761px) and (max-width: 850px) {
  .attendance-staff-tools .attendance-search-label {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
}
