/* Incremental polish of the existing workflow. IDs scope overrides of the
   legacy inline tablet rules; hidden/disabled permission states stay intact. */
#announcerOperationalApp .topbar {
  gap: 14px !important;
  box-shadow: 0 1px 3px rgb(16 42 67 / 6%) !important;
}
#announcerOperationalApp .topbar-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-width: 0;
}
#announcerOperationalApp .topbar-actions > :is(button, select) {
  min-height: 44px !important;
  height: 44px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
#announcerOperationalApp .topbar-actions #locationSelect {
  flex: 1 1 220px;
  max-width: 280px;
}
#announcerOperationalApp .topbar-actions #viewSelect {
  flex: 0 1 160px;
}
#announcerOperationalApp .topbar-actions .identity-pill {
  flex: 1 1 190px;
  min-width: 150px !important;
  max-width: 280px;
  justify-content: flex-start;
}
#announcerOperationalApp .topbar-actions .next-pill {
  flex: 1 0 100%;
  min-width: 0 !important;
  max-width: none;
  border-radius: 8px;
  justify-content: flex-start;
  padding: 8px 12px !important;
}
#announcerOperationalApp .topbar :is(button, select):focus-visible,
#panelRoster :is(button, select, input, .roster-table-wrap):focus-visible {
  outline: 3px solid var(--fc-core-blue) !important;
  outline-offset: 3px;
}
#panelRoster > .card {
  min-width: 0;
  padding: 18px !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgb(16 42 67 / 6%) !important;
}
#panelRoster h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
  color: var(--text);
}
#panelRoster .roster-date-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#panelRoster .roster-date-controls h2 { margin-right: 10px; }
#panelRoster :is(.roster-date-controls, .roster-toolbar) :is(input, select, button) {
  min-height: 44px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
#panelRoster .blocks {
  gap: 10px !important;
  margin-top: 16px;
}
#panelRoster .blocks button {
  min-height: 44px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
#panelRoster .blocks button.active {
  background: var(--fc-core-blue) !important;
  color: white !important;
  border-color: var(--fc-core-blue) !important;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 18%) !important;
}
#panelRoster .roster-toolbar { gap: 10px 12px !important; }
#panelRoster .roster-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 0 100%;
}
#panelRoster #tagLegend {
  order: 10;
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0 14px;
  margin: 0;
}
#panelRoster #tagLegend .legendItem { gap: 5px; white-space: nowrap; }
#panelRoster #tagLegend .legendText { font-size: 12px; }
#panelRoster .roster-toolbar > .spacer { display: none; }
#panelRoster .searchWrap { flex: 1 1 240px; max-width: 420px; min-width: 0; }
#panelRoster #rosterSearch { width: 100%; min-width: 0; }
#panelRoster .roster-sort-label { margin-left: auto; font-size: 13px; }
#panelRoster #sortBy { max-width: 100%; }
#panelRoster .roster-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  overscroll-behavior-x: contain;
}
#panelRoster .roster-table {
  width: 100% !important;
  min-width: 1090px !important;
  margin: 0;
}
#panelRoster .roster-table :is(th, td) {
  display: table-cell !important;
  padding: 12px !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  vertical-align: middle;
}
#panelRoster .roster-table col { display: table-column !important; }
#panelRoster .roster-table th { font-size: 12px !important; font-weight: 750; }
#panelRoster .roster-table .rosterCell { overflow-wrap: anywhere; }
#panelRoster .roster-table .level.rosterCell {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
#panelRoster .typeLevelCell .primary {
  background: transparent !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
#panelRoster #rosterSearch::placeholder { color: var(--muted); opacity: 1; }
body.light-mode #panelRoster #rosterDate { color-scheme: light; }
#panelRoster .roster-table .flagRow { gap: 5px; margin-top: 5px; }
#panelRoster .roster-table .attBtn {
  min-width: 40px !important;
  min-height: 44px !important;
  box-shadow: none !important;
}
@media (max-width: 980px) {
  #announcerOperationalApp .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  #announcerOperationalApp .topbar-actions #locationSelect {
    flex: 1 1 55%; max-width: none; min-width: 0 !important;
  }
  #announcerOperationalApp .topbar-actions #viewSelect {
    flex: 1 1 35%; min-width: 0 !important;
  }
  #announcerOperationalApp .topbar-actions .identity-pill {
    flex: 1 1 180px; max-width: none;
  }
}
@media (max-width: 600px) {
  #announcerOperationalApp .topbar-actions .identity-pill {
    flex: 1 1 180px;
  }
  #announcerOperationalApp .topbar-actions #uploadHtmlBtn {
    order: 4;
    flex: 0 0 112px;
  }
  #panelRoster > .card { padding: 12px !important; }
  #panelRoster .roster-date-controls h2 { flex-basis: 100%; }
  #panelRoster .time-block-toolbar > .spacer { display: none; }
  #panelRoster .time-block-toolbar { gap: 12px; }
  #panelRoster .searchWrap { flex-basis: 100%; max-width: none; }
  #panelRoster .roster-sort-label { margin-left: 0; }
  #panelRoster #tagLegend { gap: 8px 12px; }
}
