#personnelRoster h2 { margin: 0; }
#personnelRosterStatus { margin: 6px 0 12px; }
#personnelRoster h3 { margin: 20px 0 8px; font-size: 15px; }
#personnelRoster .table-wrap { border: 1px solid var(--line); border-radius: 8px; }
.roster-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.roster-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 4px; }
.roster-card span { color: var(--muted); }
.roster-card strong { font-size: 21px; }

.roster-station-board {
  container: station-roster / inline-size;
  display: grid;
  gap: 16px;
}
#personnelRoster .roster-station-board h3 { margin: 0; font-size: 15px; }
.roster-station-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}
.roster-station-stat {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}
.roster-station-current { border-color: #bfd8fd; background: #eef5ff; }
.roster-station-current dd { color: #1859aa; }
.roster-station-stat dt { color: #53667a; font-size: 13px; }
.roster-station-stat dd {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.2cqi, 30px);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.roster-station-stat dd span { margin-left: 4px; font-size: 12px; font-weight: 500; }
.roster-station-details {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
}
.roster-station-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.roster-station-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 46px;
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.roster-station-activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
.roster-station-event {
  min-height: 83px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.roster-station-event-label { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.roster-station-event-label span { font-weight: 600; }
.roster-station-event-label strong { color: #475b71; font-size: 18px; white-space: nowrap; }
.roster-station-event-label strong.roster-arrivals { color: #16704b; }
.roster-station-event-label small, .roster-station-period small { font-size: 11px; font-weight: 500; }
.roster-station-names { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 8px 0 0; padding: 0; }
.roster-station-names li { max-width: 100%; padding: 2px 7px; border-radius: 5px; background: #eef3f9; overflow-wrap: anywhere; }
.roster-station-empty { margin: 8px 0 0; color: #5b6b7d; }
.roster-station-no-schedule { margin: 0; padding: 20px 14px; }
.roster-station-count { color: #425670; font-weight: 600; white-space: nowrap; }
.roster-station-schedule { max-height: 260px; overflow: auto; }
.roster-station-schedule:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.roster-station-schedule th {
  position: sticky;
  top: 0;
  background: #fff;
  color: #53667a;
}
.roster-station-schedule :is(th, td) { padding: 6px 14px; }
.roster-station-schedule :is(th, td):last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.roster-station-schedule td:first-child { overflow-wrap: anywhere; }
.roster-station-schedule tr:last-child td { border-bottom: 0; }
.roster-station-monthly { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2fr); }
.roster-station-period { min-width: 0; padding: 12px 14px; }
.roster-station-period + .roster-station-period { border-left: 1px solid var(--line); }
.roster-station-period-title { display: flex; align-items: baseline; gap: 8px; }
.roster-station-period-title span { font-size: 12px; color: #53667a; }
.roster-station-period dl {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0;
}
.roster-station-period:last-child dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roster-station-period dt { color: #53667a; font-size: 12px; }
.roster-station-period dd { margin: 3px 0 0; font-size: 19px; font-weight: 700; }

@container station-roster (max-width: 710px) {
  .roster-station-details, .roster-station-monthly { grid-template-columns: minmax(0, 1fr); }
  .roster-station-period + .roster-station-period { border-left: 0; border-top: 1px solid var(--line); }
}
@container station-roster (max-width: 540px) {
  .roster-station-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .roster-station-period dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container station-roster (max-width: 370px) {
  .roster-station-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster-station-stat:last-child { grid-column: 1 / -1; }
  .roster-station-period dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#personnelRosterDataMovements { container: data-roster-movements / inline-size; margin-top: 20px; }
.roster-data-recent-head { flex-wrap: wrap; gap: 8px; }
.roster-data-week-note { margin-inline-start: 5px; font-size: 12px; font-weight: 400; }
.roster-data-departure-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; white-space: nowrap;
}
#personnelRoster .roster-data-movements h3 { margin: 0; }
.roster-data-recent table { table-layout: fixed; }
.roster-data-recent thead th { color: #53667a; }

.roster-data-recent tbody th {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.roster-data-recent tbody :is(th, td) { padding: 8px 10px; }
.roster-data-recent tbody tr { height: 46px; }
.roster-data-recent tbody tr:last-child th { border-bottom: 0; }
.roster-data-recent .roster-station-names { margin: 0; gap: 4px; }
.roster-data-recent .roster-station-names li { font-size: 12px; padding: 2px 5px; }
.roster-data-mobile-label { display: none; }
.roster-data-empty { color: #5b6b7d; }
.roster-dialog.roster-data-departures {
  width: min(800px, calc(100% - 24px));
  margin-inline-start: auto; margin-inline-end: clamp(12px, 4vw, 64px);
}
.roster-data-departure-title { display: flex; align-items: baseline; gap: 8px; }
.roster-data-departure-title h2, .roster-data-departure-head form { margin: 0; }
.roster-data-departure-filter { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
#rosterDataDepartureCount { color: #53667a; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.roster-data-departures select {
  width: auto; max-width: 100%; min-height: 30px; padding: 4px 25px 4px 8px; font-size: 12px;
}
.roster-data-schedule {
  max-height: min(55vh, 540px); max-height: min(55dvh, 540px);
  overflow: auto; overscroll-behavior: contain; scrollbar-color: #b8c7d9 transparent;
  border: 1px solid var(--line); border-radius: 8px;
}
.roster-data-departure-help, #rosterDataDepartureWorkStatus { margin: 4px 0 8px; }
.roster-data-schedule table { min-width: 535px; }
.roster-data-schedule :is(th, td):nth-child(4) { text-align: center; font-variant-numeric: tabular-nums; }
.roster-data-schedule:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.roster-data-schedule th {
  position: sticky;
  top: 0;
  background: #fff;
  color: #53667a;
}
.roster-data-schedule :is(th, td) { padding: 7px 10px; overflow-wrap: anywhere; }
.roster-data-schedule :is(th, td):last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.roster-data-schedule td[colspan] { text-align: left; padding: 14px 10px; white-space: normal; }

@container data-roster-movements (max-width: 1050px) {
  .roster-data-recent :is(table, tbody, tfoot) { display: block; }
  .roster-data-recent thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .roster-data-recent :is(tbody, tfoot) tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--line);
  }
  .roster-data-recent tbody tr:last-child { border-bottom: 0; }
  .roster-data-recent :is(tbody, tfoot) :is(th, td) { display: block; width: auto; padding: 4px 4px 4px 0; border-bottom: 0; }
  .roster-data-recent :is(tbody, tfoot) :is(th, [colspan]) { grid-column: 1 / -1; }
  .roster-data-mobile-label { display: block; color: #53667a; font-size: 12px; margin-bottom: 3px; }
}

#personnelRosterList { container: roster-list / inline-size; }
.roster-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 265px) minmax(0, 1fr) max-content;
  grid-template-areas: "search orders mode";
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
#personnelRosterListMode { grid-area: mode; }
.roster-search { grid-area: search; min-width: 0; width: 100%; }
.roster-order-controls {
  grid-area: orders;
  display: flex;
  align-items: center;
  gap: 8px;
}
.roster-order-controls[inert], .roster-orders-feedback[inert] { visibility: hidden; }
@container roster-list (max-width: 680px) {
  .roster-list-toolbar {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "search mode" "orders orders";
  }
}
.roster-list-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: #eef2f7; }
.roster-list-toggle button {
  min-width: 34px; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 5px;
  background: transparent; color: #425670;
}
.roster-list-toggle button[aria-pressed="true"] { background: #fff; color: #1859aa; box-shadow: 0 1px 3px #1f2d3d1f; }
.roster-list-toggle button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.roster-order-date { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.roster-order-date span { white-space: nowrap; }
.roster-order-date input { width: 144px; min-width: 0; padding: 7px 9px; }
.roster-orders-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin-bottom: 8px;
}
.roster-recruitment-notice {
  flex: none;
  max-width: 48%;
  margin: 0 0 0 auto;
  color: #af2927;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
@container roster-list (max-width: 680px) {
  .roster-orders-feedback { flex-wrap: wrap; row-gap: 4px; }
  .roster-recruitment-notice { flex-basis: 100%; max-width: none; }
}
#personnelRosterOrderStatus {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.roster-list-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #53667a;
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.roster-list-stats strong { color: #1b3046; font-size: 13px; font-weight: 700; }
.roster-list-stats .roster-stat-active { color: #14764e; font-weight: 600; }
.roster-list-stats .roster-stat-left { color: #b3312d; font-weight: 600; }
.roster-list-stats .roster-stat-abnormal { color: #b45309; font-weight: 600; }
.roster-list-stats .roster-stat-filter { color: #1859aa; font-weight: 600; }
.roster-clear-filters { flex: none; padding: 3px 8px; font-size: 12px; }
.roster-clear-filters:disabled { opacity: .55; cursor: not-allowed; }
.roster-orders-feedback.is-details :is(#personnelRosterOrderStatus, #personnelRosterOrderRetry, #personnelRosterOrderClearFilters) { display: none; }
.roster-orders-feedback button { flex: none; padding: 3px 8px; font-size: 12px; }
.roster-order-summary:not([hidden]) {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; margin-left: auto;
}
.roster-order-summary button { white-space: nowrap; }
.roster-order-summary-value:not([hidden]) {
  display: flex; align-items: stretch; min-width: 0; margin-bottom: 8px; gap: 8px;
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #f3f7fc;
  color: #405a77; font-size: 12px; font-variant-numeric: tabular-nums;
}
#personnelRosterOrderSummaryCount { align-self: center; flex: none; padding: 2px 3px; font-weight: 600; }
.roster-order-summary-days {
  display: flex; align-items: stretch; flex: 1; min-width: 0; gap: 4px; overflow-x: auto;
  list-style: none; margin: 0; padding: 0 0 2px; scrollbar-width: thin;
}
.roster-order-summary-days li {
  display: grid; grid-template-rows: auto auto 1fr; min-width: 72px; flex: 0 0 auto;
  padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: #fff; text-align: center;
}
.roster-order-summary-days strong { color: #233b57; font-size: 14px; }
.roster-order-summary-days .roster-order-positive { color: #16704b; }
.roster-order-summary-days :is(.roster-order-missing, small) { color: #53667a; }
@container roster-list (max-width: 680px) {
  .roster-order-summary:not([hidden]) { margin-left: 0; }
  .roster-order-summary-value:not([hidden]) { flex-direction: column; gap: 3px; }
  #personnelRosterOrderSummaryCount { align-self: start; }
}
.roster-actions { flex-wrap: wrap; }
.roster-scroll { max-height: min(66vh, 740px); overflow: auto; overflow-anchor: none; }
#personnelRoster .roster-scroll {
  container: roster-table / inline-size;
  overscroll-behavior-x: contain;
}
.roster-third-party { margin-top: 14px; }
.roster-third-party-tools, .roster-third-party-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.roster-third-party-tools { justify-content: space-between; }
/* 搜索独占一行；三个筛选框固定在第二行一行排开，宽度随内容自适应 */
.roster-third-party-filters {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 8px;
}
.roster-third-party-filters input[type="search"] {
  grid-column: 1 / -1;
  width: 420px;
  max-width: 100%;
}
.roster-third-party-filters select {
  width: auto;
  min-width: 132px;
}
.roster-third-party-download {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}
.roster-third-party-rule, .roster-third-party-status { margin: 8px 0; }
.roster-third-party-table { min-width: 1320px; }
.roster-third-party-table thead th { position: sticky; top: 0; z-index: 1; background: #eff5fb; text-align: center; }
.roster-third-party-table :is(th, td) { text-align: center; white-space: nowrap; }
.roster-third-party-table th[scope="row"] { font-weight: 600; }
.roster-third-party-table td small { display: block; font-size: 11px; }
.roster-third-party-table .roster-day-head { min-width: 52px; font-size: 11px; }
.roster-third-party-table .roster-day-zero,
.roster-third-party-table .roster-days-zero {
  background: #fdecea; color: #b03a2e; font-weight: 700;
}
.roster-third-party-table .roster-day-positive { background: #e8f7ee; color: #1e8449; font-weight: 600; }
.roster-third-party-table .roster-day-empty { background: #f5f7fa; color: #8a97a6; }
#personnelRosterTable {
  --roster-hire-width: 110px;
  --roster-site-width: 144px;
  --roster-rider-id-width: 112px;
  --roster-rider-name-width: 92px;
  --roster-channel-width: 94px;
  --roster-agency-width: 105px;
  --roster-employment-width: 85px;
  --roster-profile-width: calc(var(--roster-hire-width) + var(--roster-site-width) +
    var(--roster-rider-id-width) + var(--roster-rider-name-width) + var(--roster-channel-width) +
    var(--roster-agency-width) + var(--roster-employment-width));
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
#personnelRosterTable:not(.roster-orders-table) { width: max(100%, calc(var(--roster-profile-width) + 1290px)); }
#personnelRosterTable.roster-orders-table {
  --roster-period-width: 64px;
  width: calc(var(--roster-profile-width) + var(--roster-period-width) * var(--roster-order-columns, 1));
}
#personnelRosterTable.roster-orders-table:is([data-order-period="week"], [data-order-period="month"]) {
  --roster-period-width: 104px;
}
#personnelRosterTable .roster-profile-width:nth-child(1) { width: var(--roster-hire-width); }
#personnelRosterTable .roster-profile-width:nth-child(2) { width: var(--roster-site-width); }
#personnelRosterTable .roster-profile-width:nth-child(3) { width: var(--roster-rider-id-width); }
#personnelRosterTable .roster-profile-width:nth-child(4) { width: var(--roster-rider-name-width); }
#personnelRosterTable .roster-profile-width:nth-child(5) { width: var(--roster-channel-width); }
#personnelRosterTable .roster-profile-width:nth-child(6) { width: var(--roster-agency-width); }
#personnelRosterTable .roster-profile-width:nth-child(7) { width: var(--roster-employment-width); }
#personnelRosterTable:not(.roster-orders-table) col:is(:nth-child(8), :nth-child(9)) { width: 100px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(13) { width: 145px; }
#personnelRosterTable:not(.roster-orders-table) col:is(:nth-child(14), :nth-child(15)) { width: 120px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(16) { width: 126px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(17) { width: 82px; }
#personnelRosterTable :is(th, td) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#personnelRosterTable th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 48px;
  padding-inline: 8px;
  background: #f1f6fc;
}
#personnelRosterTable tbody td { height: 46px; padding-block: 8px; }
#personnelRosterTable [data-personnel-edit] { min-height: 28px; padding: 4px 10px; line-height: 16px; }
#personnelRosterTable:not(.roster-orders-table) :is(th, td):last-child:not([colspan]) {
  position: sticky;
  right: 0;
  box-shadow: -1px 0 var(--line);
}
#personnelRosterTable:not(.roster-orders-table) th:last-child { z-index: 5; }
#personnelRosterTable:not(.roster-orders-table) td:last-child:not([colspan]) { z-index: 2; background: #fff; }
#personnelRosterTable td:is(:nth-child(2), :nth-child(4), :nth-child(5), :nth-child(6)) {
  white-space: normal;
  overflow-wrap: anywhere;
}
#personnelRosterTable :is(th, td):nth-child(7) { border-inline-end: 1px solid var(--line); }
#personnelRosterTable .roster-order-cell { text-align: center; font-variant-numeric: tabular-nums; }
#personnelRosterTable .roster-order-missing { color: var(--muted); }
#personnelRosterTable .roster-order-empty { text-align: center; }
#personnelRosterTable.roster-summary-list td:last-child:not([colspan]) {
  position: static !important;
  z-index: auto;
  background: transparent;
  box-shadow: none;
}
#personnelRosterTable.roster-summary-list th:last-child {
  right: auto !important;
  box-shadow: none;
}

@container roster-table (min-width: 930px) {
  #personnelRosterTable tr > :nth-child(-n + 7):not([colspan]) {
    position: sticky;
  }
  #personnelRosterTable thead th:nth-child(-n + 7) { z-index: 4; }
  #personnelRosterTable tbody td:nth-child(-n + 7):not([colspan]) { z-index: 2; }
  #personnelRosterTable td:nth-child(-n + 7):not(.roster-unmatched):not([colspan]) { background: #fff; }
  #personnelRosterTable tr > :nth-child(1) { inset-inline-start: 0; }
  #personnelRosterTable tr > :nth-child(2) { inset-inline-start: var(--roster-hire-width); }
  #personnelRosterTable tr > :nth-child(3) {
    inset-inline-start: calc(var(--roster-hire-width) + var(--roster-site-width));
  }
  #personnelRosterTable tr > :nth-child(4) {
    inset-inline-start: calc(var(--roster-hire-width) + var(--roster-site-width) + var(--roster-rider-id-width));
  }
  #personnelRosterTable tr > :nth-child(5) {
    inset-inline-start: calc(var(--roster-profile-width) - var(--roster-channel-width) -
      var(--roster-agency-width) - var(--roster-employment-width));
  }
  #personnelRosterTable tr > :nth-child(6) {
    inset-inline-start: calc(var(--roster-profile-width) - var(--roster-agency-width) - var(--roster-employment-width));
  }
  #personnelRosterTable tr > :nth-child(7) {
    inset-inline-start: calc(var(--roster-profile-width) - var(--roster-employment-width));
  }
}

#personnelRosterTable .roster-sort { font: inherit; color: inherit; padding: 3px 0; border: 0; background: transparent; }
#personnelRosterTable .roster-sort span { color: #1a73e8; }
#personnelRosterTable .roster-sort:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
#personnelRosterTable .roster-column-filter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 28px;
  padding: 2px 5px;
  border-radius: 5px;
  background: transparent;
  color: #425670;
  font: inherit;
  white-space: nowrap;
}
#personnelRosterTable .roster-column-filter-icon {
  justify-content: center;
  min-width: 24px;
  margin-left: 2px;
}
#personnelRosterTable .roster-column-filter :is(.roster-column-filter-arrow, span[aria-hidden="true"]) {
  font-size: 11px;
  line-height: 1;
}
#personnelRosterTable .roster-column-filter:is(.active, [aria-expanded="true"], :hover):not(:disabled) {
  border-color: #bfd8fd;
  background: #e8f1ff;
  color: #1859aa;
}
#personnelRosterTable .roster-column-filter:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
#personnelRosterTable .roster-unmatched { background: #fff0ef; color: #af2927; font-weight: 600; }
#personnelRosterTable :is(.roster-recruitment-provisional, .roster-note-system) { color: #af2927; }
#personnelRosterTable .roster-status-left { color: #c0392b; font-weight: 700; }
#personnelRosterTable .roster-missing { color: #c0392b; font-weight: 600; }

/* 人员名单：除入职日期、站点名称外全部居中 */
#personnelRosterTable :is(th, td):is(:nth-child(1), :nth-child(2)) { text-align: left; }
#personnelRosterTable :is(th, td):nth-child(n + 3) { text-align: center; }
#personnelRosterTable :is(.roster-name-archived, .roster-rehired) { color: #b42320; }
.roster-archive, .roster-rehired { display: block; font-size: 11px; }
.roster-rider-id { display: block; overflow: hidden; text-overflow: ellipsis; }
.roster-dialog {
  box-sizing: border-box; width: min(680px, calc(100% - 24px)); max-height: calc(100% - 28px);
  overflow: auto; padding: 20px; background: #fff; color: inherit; border: 1px solid var(--line); border-radius: 12px;
}
.roster-dialog::backdrop { background: #17253673; }
.roster-filter-dialog { width: min(420px, calc(100% - 24px)); }
.roster-filter-search { width: 100%; margin: 12px 0 8px; }
.roster-filter-options {
  min-width: 0;
  max-height: min(48vh, 320px);
  margin: 12px 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.roster-filter-search:not([hidden]) + .roster-filter-options { margin-top: 0; }
.roster-filter-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 35px;
  margin: 0;
  padding: 7px 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.roster-filter-choice + .roster-filter-choice { border-top: 1px solid var(--line); }
.roster-filter-choice:is(:hover, :focus-within) { background: #f1f6fc; }
.roster-filter-choice span { min-width: 0; }
.roster-filter-choice input[type="checkbox"] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}
.roster-filter-choice input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.roster-filter-dialog[data-filter-kind="date"] { width: min(460px, calc(100% - 24px)); }
.roster-date-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 6px;
  padding-inline: 8px;
}
.roster-date-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.roster-date-tools input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
}
.roster-date-tools button { padding: 4px 10px; }
.roster-date-tools:not([hidden]) + .roster-filter-options {
  max-height: min(50vh, 360px);
  margin-top: 0;
  padding: 4px;
}
.roster-date-children { padding-inline-start: 19px; }
.roster-date-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 29px;
  border-radius: 5px;
}
.roster-date-row:is(:hover, :focus-within) { background: #f1f6fc; }
.roster-date-row .roster-filter-choice {
  grid-column: 2;
  align-items: center;
  min-height: 29px;
  padding: 3px 0;
  background: transparent;
}
.roster-date-row .roster-filter-choice input { margin-top: 0; }
.roster-date-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.roster-date-expand, .roster-date-only {
  align-self: stretch;
  margin: 1px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.roster-date-expand[aria-expanded="true"] { transform: rotate(90deg); }
.roster-date-only {
  grid-column: 3;
  padding-inline: 5px;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}
@media (hover: hover) {
  .roster-date-only { opacity: 0; }
  .roster-date-row:is(:hover, :focus-within) .roster-date-only { opacity: 1; }
}
.roster-filter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.roster-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.roster-edit-grid label { display: grid; align-content: start; gap: 5px; }
.roster-edit-grid :is(input,select,textarea) { width: 100%; min-width: 0; }
.roster-edit-grid :is(input,select):disabled {
  color: #53657a;
  background: #f5f7fa;
  opacity: 1;
}
.roster-edit-grid :is(.roster-note-system, .roster-recruitment-provisional) { color: #af2927; }
#personnelRosterEditMessage, #personnelRosterPasswordMessage { color: #af2927; }
.roster-password-dialog { width: min(420px, calc(100% - 24px)); }
.roster-password-input { display: grid; gap: 5px; margin-top: 12px; }
.roster-password-input iframe { display: block; width: 100%; height: 42px; border: 0; }
.roster-private-mask { color: var(--muted); letter-spacing: .12em; }

/* ---------------- 数据账号花名册：数据颜色层级（只作用于数据页） ---------------- */
#personnelRoster .roster-cards { gap: 12px; }
#personnelRoster .roster-card {
  padding: 12px 14px;
  border: 1px solid #e1eaf4;
  border-top-width: 3px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(32, 63, 96, .04);
}
#personnelRoster .roster-card[data-tone="blue"]   { border-top-color: #3578d4; background: linear-gradient(180deg, #f6faff, #fff 70%); }
#personnelRoster .roster-card[data-tone="green"]  { border-top-color: #1e9663; background: linear-gradient(180deg, #f4fbf7, #fff 70%); }
#personnelRoster .roster-card[data-tone="orange"] { border-top-color: #e58a22; background: linear-gradient(180deg, #fffaf2, #fff 70%); }
#personnelRoster .roster-card[data-tone="red"]    { border-top-color: #d14b45; background: linear-gradient(180deg, #fff7f6, #fff 70%); }
#personnelRoster .roster-card[data-tone="amber"]  { border-top-color: #c99718; background: linear-gradient(180deg, #fffcf1, #fff 70%); }
#personnelRoster .roster-card span { font-size: 12px; color: #5b6f84; }
#personnelRoster .roster-card strong {
  font-size: 22px; line-height: 1.25; color: #16283c; font-variant-numeric: tabular-nums;
}
#personnelRoster .roster-card[data-tone="blue"] strong   { color: #2364b4; }
#personnelRoster .roster-card[data-tone="green"] strong  { color: #14764e; }
#personnelRoster .roster-card[data-tone="orange"] strong { color: #a8610d; }
#personnelRoster .roster-card[data-tone="red"] strong    { color: #b3312d; }
#personnelRoster .roster-card[data-tone="amber"] strong  { color: #8a6208; }
#personnelRoster .roster-card strong .rs-unit { margin-left: 4px; font-size: 12px; font-weight: 500; color: #71859a; }

#personnelRoster .roster-summary-wrap { border-color: #e1eaf4; border-radius: 10px; }
#personnelRoster .roster-summary-table { width: 100%; min-width: 1040px; table-layout: auto; }
#personnelRoster .roster-summary-table th {
  height: 44px; padding: 0 10px; background: #eef4fb; color: #3d5470;
  font-weight: 600; white-space: nowrap;
}
#personnelRoster .roster-summary-table th:first-child,
#personnelRoster .roster-summary-table td:first-child {
  width: 150px; padding-left: 14px; text-align: left;
}
#personnelRoster .roster-summary-table th:not(:first-child),
#personnelRoster .roster-summary-table td:not(:first-child) {
  padding-right: 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
#personnelRoster .roster-summary-table td { height: 42px; color: #33485e; }
#personnelRoster .roster-summary-table td:first-child { color: #1b3046; font-weight: 600; }
#personnelRoster .roster-summary-table tbody tr:nth-child(even) { background: #fbfdff; }
#personnelRoster .roster-summary-table tbody tr:hover { background: #f3f9ff; }
#personnelRoster .roster-summary-table tr.roster-summary-total { background: #eaf3fd; font-weight: 700; }
#personnelRoster .roster-summary-table tr.roster-summary-total td { border-top: 1px solid #bfd3e8; color: #12385f; }
#personnelRoster .roster-summary-table td.rs-enter { color: #14764e; font-weight: 700; }
#personnelRoster .roster-summary-table td.rs-leave { color: #b3312d; font-weight: 700; }
#personnelRoster .roster-summary-table td.rs-abnormal { color: #b45309; font-weight: 700; }
#personnelRoster .roster-summary-table td.rs-normal { color: #14764e; font-weight: 700; }
#personnelRoster .roster-summary-table td.rs-zero { color: #a7b5c4; font-weight: 400; }
#personnelRoster .roster-summary-table td.rs-parttime { color: #a8610d; font-weight: 600; }
#personnelRoster .rs-ratio {
  display: inline-block; min-width: 54px; padding: 2px 7px; border-radius: 999px;
  text-align: right; font-weight: 700; font-size: 12px;
}
#personnelRoster .rs-ratio-low  { background: #eaf7f0; color: #14764e; }
#personnelRoster .rs-ratio-mid  { background: #fff3d8; color: #92620a; }
#personnelRoster .rs-ratio-high { background: #fdecec; color: #b3312d; }
#personnelRoster .rs-ratio-none { background: #f1f5f9; color: #8393a5; font-weight: 500; }

#personnelRoster .roster-data-movements .roster-station-panel { border-color: #e1eaf4; border-radius: 10px; }
#personnelRoster .roster-data-movements .roster-station-panel-head {
  min-height: 48px; padding: 10px 14px; background: #f8fbff;
}
#personnelRoster .roster-data-recent table { width: 100%; table-layout: fixed; }
#personnelRoster .roster-data-recent thead th {
  height: 42px; padding: 0 12px; background: #eef4fb; color: #3d5470;
  font-weight: 600; text-align: left;
}
#personnelRoster .roster-data-recent thead th:first-child { width: 14%; }
#personnelRoster .roster-data-recent thead th.roster-data-part-time-head {
  width: 7%; padding-inline: 6px; text-align: center; overflow-wrap: anywhere;
}
#personnelRoster .roster-data-recent .roster-data-period-count { text-align: center; }
#personnelRoster .roster-data-recent th.roster-data-period-count { width: 72px; padding-inline: 6px; }
#personnelRoster .roster-data-order-count {
  font-size: 14px; font-weight: 800; text-align: center;
  font-variant-numeric: tabular-nums;
}
#personnelRoster .roster-card .roster-data-order-value { font: inherit; color: inherit; }
#personnelRoster .roster-data-order-count .rs-unit { margin-left: 3px; font-size: 11px; font-weight: 500; color: #71859a; }
#personnelRoster .roster-data-recent thead th.rs-enter-head { color: #14764e; background: #eef9f3; }
#personnelRoster .roster-data-recent thead th.rs-leave-head { color: #b3312d; background: #fdf1f0; }
#personnelRoster .roster-data-count {
  display: inline-block; min-width: 20px; padding: 1px 6px;
  border-radius: 999px; background: #eef5ff; color: #1d5ea8;
  font-size: 16px; font-weight: 700; line-height: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}
#personnelRoster .roster-data-recent tbody th,
#personnelRoster .roster-data-recent tbody td { padding: 9px 12px; vertical-align: middle; }
#personnelRoster .roster-data-recent tbody tr:nth-child(even) { background: #fbfdff; }
#personnelRoster .roster-data-recent tbody tr:hover { background: #f3f9ff; }
#personnelRoster .roster-data-recent tfoot {
  background: #eef4fb; border-top: 1px solid var(--line); color: #16283c; font-weight: 700;
}
#personnelRoster .roster-data-recent tfoot :is(th, td) {
  padding: 9px 12px; border-bottom: 0; font-size: 16px;
}
#personnelRoster .roster-data-recent tfoot th { color: inherit; font-weight: inherit; }
#personnelRoster .roster-data-recent tfoot .rs-unit { font-size: 12px; }
#personnelRoster .roster-data-movement { display: flex; align-items: center; gap: 8px; }
#personnelRoster .roster-data-movement-count {
  flex-shrink: 0; white-space: nowrap; line-height: 24px; font-variant-numeric: tabular-nums;
}
#personnelRoster .roster-data-movement-count.roster-data-empty { font-weight: 500; }
#personnelRoster .roster-data-recent .roster-station-names { flex: 1; gap: 5px 6px; min-width: 0; }
#personnelRoster .roster-data-recent .roster-station-names li {
  padding: 2px 6px; border: 1px solid; border-radius: 5px;
  font-size: 12px; line-height: 18px; text-align: center;
}
#personnelRoster .roster-data-recent .rs-chip-enter { background: #eaf7f0; border-color: #bfe4d1; color: #116b47; }
#personnelRoster .roster-data-recent .rs-chip-leave { background: #fdeeee; border-color: #f0c9c6; color: #ad2f2b; }
#personnelRoster .roster-data-recent .roster-data-empty { color: #a7b5c4; font-size: 12px; }

.roster-data-departures select { min-height: 28px; border-color: #dbe6f2; color: #3e5369; }
.roster-data-departure-toggle .rs-count-badge, .roster-data-departure-title .rs-count-badge {
  display: inline-block; padding: 1px 8px; border: 1px solid #f0d79c;
  border-radius: 999px; background: #fff6dd; color: #8a6208; font-weight: 700; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.roster-data-departures .roster-data-schedule table { width: 100%; table-layout: fixed; }
.roster-data-departures .roster-data-schedule th {
  height: 42px; padding: 0 12px; background: #eef4fb; color: #3d5470;
  font-weight: 600; text-align: left;
}
.roster-data-departures .roster-data-schedule td {
  height: 38px; padding: 0 12px; color: #33485e; border-bottom: 1px solid #eef3f8;
}
.roster-data-departures .roster-data-schedule td:first-child {
  width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5a6e83;
}
.roster-data-departures .roster-data-schedule td:nth-child(2) { width: 26%; font-weight: 600; color: #1b3046; }
.roster-data-departures .roster-data-schedule th:last-child,
.roster-data-departures .roster-data-schedule td:last-child {
  width: 32%; padding-right: 14px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.roster-data-departures .roster-data-schedule tbody tr:nth-child(even) { background: #fbfdff; }
.roster-data-departures .roster-data-schedule tbody tr:hover { background: #f3f9ff; }
.roster-data-departures .roster-data-schedule tbody tr:last-child td { border-bottom: 0; }
.roster-data-departures .roster-data-schedule td.rs-due-past { color: #b3312d; font-weight: 700; background: #fdf1f0; }
.roster-data-departures .roster-data-schedule td.rs-due-soon { color: #92620a; font-weight: 700; background: #fffaf0; }
.roster-data-departures .roster-data-schedule td.rs-due-later { color: #33485e; }

/* 汇总表数字列居中 */
#personnelRoster .roster-summary-table th:not(:first-child),
#personnelRoster .roster-summary-table td:not(:first-child) { text-align: center; }
#personnelRoster .roster-summary-table .rs-ratio { text-align: center; }

/* 核心人力列着重显示 */
#personnelRoster .roster-summary-table thead tr:not(.roster-summary-groups) th {
  background: #f5f9fd;
  color: #405d78;
  font-weight: 600;
  border-bottom: 1px solid #dfe9f3;
}
#personnelRoster .roster-summary-table tbody td:nth-child(n+2):nth-child(-n+8) {
  background: #eff7ff;
  color: #173b5c;
  font-size: 14px;
  font-weight: 600;
}
#personnelRoster .roster-summary-table tbody tr:nth-child(even) td:nth-child(n+2):nth-child(-n+8) {
  background: #e7f2fe;
}
#personnelRoster .roster-summary-table tbody tr:hover td:nth-child(n+2):nth-child(-n+8) {
  background: #dcedff;
}
#personnelRoster .roster-summary-table tbody td:nth-child(2) {
  color: #1c5b9e;
  font-weight: 800;
  font-size: 16px;
}
#personnelRoster .roster-summary-table tbody td:nth-child(3),
#personnelRoster .roster-summary-table tbody td:nth-child(8) {
  color: #0f7750;
  font-weight: 800;
  font-size: 16px;
}
#personnelRoster .roster-summary-table tr.roster-summary-total td:nth-child(n+2):nth-child(-n+8) {
  background: #d6eafe;
  color: #0d335a;
  font-weight: 800;
  border-top: 1px solid #dbe6f0;
}
#personnelRoster .roster-summary-table tr.roster-summary-total td:nth-child(2),
#personnelRoster .roster-summary-table tr.roster-summary-total td:nth-child(3),
#personnelRoster .roster-summary-table tr.roster-summary-total td:nth-child(8) {
  font-size: 16px;
}
#personnelRoster .roster-summary-table tbody td:nth-child(n+9):not(.rs-enter):not(.rs-leave):not(.rs-zero) { color: #52677c; }

#personnelRosterEditFields input:is([name="noticeDate"], [name="departureDate"]):read-only {
  background: #f4f7fb;
  color: #7d8fa3;
  cursor: not-allowed;
}

/* 汇总分组：总览 / 本月 / 上月 */
#personnelRoster .roster-summary-wrap { margin-top: 16px; border-color: #e6eef6; }
#personnelRoster .roster-summary-table .roster-summary-groups th {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-align: center;
  border: 0;
  white-space: nowrap;
}
#personnelRoster .roster-summary-table .roster-summary-title {
  width: 150px;
  padding-left: 14px;
  background: linear-gradient(180deg, #1b4061, #21496d);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  letter-spacing: .3px;
  border-right: 1px solid #4a7398;
}
#personnelRoster .roster-summary-table .roster-summary-group-overview {
  background: linear-gradient(180deg, #27547b, #214b71);
  color: #fff;
}
#personnelRoster .roster-summary-table .roster-summary-group-month {
  background: linear-gradient(180deg, #157e75, #11736b);
  color: #fff;
}
#personnelRoster .roster-summary-table .roster-summary-group-last {
  background: linear-gradient(180deg, #655493, #5d4d8b);
  color: #fff;
}
#personnelRoster .roster-summary-table tbody td:nth-child(n+9):nth-child(-n+14) { background: #f6fbfa; }
#personnelRoster .roster-summary-table tbody td:nth-child(n+15):nth-child(-n+16) { background: #faf8fd; }




/* 单量日期列：加宽并让筛选入口清晰可点 */
#personnelRosterTable.roster-orders-table { --roster-period-width: 80px; }
#personnelRosterTable.roster-orders-table:is([data-order-period="week"], [data-order-period="month"]) {
  --roster-period-width: 116px;
}
#personnelRosterTable th.roster-order-cell {
  cursor: pointer;
  padding-left: 4px;
  padding-right: 4px;
}
#personnelRosterTable th.roster-order-cell:hover { background: #eef5ff; }
#personnelRosterTable th.roster-order-cell .roster-column-filter-icon {
  min-width: 18px;
  width: 18px;
  margin-left: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #60758b;
}
#personnelRosterTable th.roster-order-cell .roster-column-filter-icon.active { color: #1859aa; background: #dcebff; }

/* 单量模式：右侧固定单量合计列 */
#personnelRosterTable.roster-orders-table {
  width: calc(var(--roster-profile-width) + var(--roster-period-width) * var(--roster-order-columns, 1) + 112px);
}
#personnelRosterTable .roster-order-total-col { width: 112px; }
#personnelRosterTable.roster-orders-table th.roster-order-total,
#personnelRosterTable.roster-orders-table td.roster-order-total {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -1px 0 var(--line);
  text-align: center;
  font-weight: 700;
  color: #1c5b9e;
  white-space: nowrap;
}
#personnelRosterTable.roster-orders-table th.roster-order-total {
  z-index: 6;
  background: #f7fafd;
}
#personnelRosterTable.roster-orders-table tbody tr:nth-child(even) td.roster-order-total { background: #f7fafd; }


.roster-summary-link {
  width: auto;
  min-width: 28px;
  min-height: 26px;
  padding: 1px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
#personnelRoster .roster-count-change,
#personnelRoster .roster-card .roster-count-change {
  margin-inline-start: 5px; color: #b42320; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.roster-count-change .roster-summary-link { min-width: 0; min-height: 22px; padding-inline: 2px; }
#personnelRoster .roster-summary-table tbody td:nth-child(5) {
  min-width: 116px;
  padding-inline: 4px;
}
.roster-summary-table .roster-summary-part-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.roster-summary-table .roster-summary-part-time-total { grid-column: 2; }
.roster-summary-table .roster-summary-part-time .roster-count-change {
  grid-column: 3;
  justify-self: start;
  margin-inline-start: 4px;
}
#personnelRoster .roster-summary-table tbody td:is(:nth-child(2), :nth-child(3), :nth-child(4)) {
  min-width: 76px;
  padding-inline: 4px;
}
.roster-summary-headcount {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.roster-summary-headcount-total { grid-column: 2; }
.roster-summary-headcount-changes { grid-column: 3; display: grid; justify-items: start; line-height: 1.15; }
.roster-summary-link:hover { background: #dceafb; color: #164779; }
.roster-summary-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.roster-station-period dl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@container station-roster (max-width: 650px) {
  .roster-station-period dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.roster-summary-dialog { width: min(1100px, calc(100% - 24px)); }
.roster-summary-departure-dialog { width: min(1640px, calc(100% - 24px)); }
.roster-summary-part-time-dialog { width: min(1260px, calc(100% - 24px)); }
.roster-summary-actions { justify-content: flex-end; gap: 8px; }
.roster-departure-definition:not([hidden]) { display: block; margin-top: 3px; }
.roster-summary-dialog h2 { margin: 0; }
.roster-summary-dialog > p { margin: 9px 0 12px; }
.roster-summary-definition {
  padding: 7px 10px; border-left: 3px solid #80a9d6; border-radius: 4px;
  background: #eff5fb; color: #405a77; font-size: 13px; line-height: 1.55;
}
.roster-summary-definition strong { margin-right: 6px; color: #1b3046; }
.roster-summary-dialog form { margin: 0; }
.roster-summary-detail-table { max-height: min(62vh, 620px); }
.roster-summary-detail-table table { min-width: 780px; }
.roster-summary-departure-dialog .roster-summary-detail-table table { min-width: 1600px; }
.roster-summary-deleted-dialog .roster-summary-detail-table table { min-width: 1720px; }
.roster-summary-part-time-dialog .roster-summary-detail-table table { min-width: 960px; }
.roster-summary-detail-table .roster-private-mask { color: #647587; }
.roster-summary-departure-dialog .roster-summary-detail-table :is(th, td) { padding-inline: 12px; }
.roster-summary-detail-table thead th {
  position: sticky;
  top: 0;
  background: #eff5fb;
  color: #304b68;
}
.roster-summary-detail-table :is(th, td) { text-align: center; white-space: nowrap; }
.roster-summary-detail-table tbody th { color: #173452; font-weight: 600; }
.roster-summary-detail-table .roster-summary-reason {
  max-width: 270px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.roster-summary-detail-table .roster-summary-reason.roster-note-system { color: #af2927; }

/* 资料表：压缩空列宽度，减少横向空白 */
#personnelRosterTable:not(.roster-orders-table) {
  table-layout: fixed;
  width: max(100%, 1740px);
}
#personnelRosterTable:not(.roster-orders-table) col:nth-child(8) { width: 90px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(9) { width: 84px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(10) { width: 105px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(11) { width: 115px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(12) { width: 110px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(13) { width: 110px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(14) { width: 80px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(15) { width: 80px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(16) { width: 120px; }
#personnelRosterTable:not(.roster-orders-table) col:nth-child(17) { width: 72px; }

/* 资料表：单元格直接点击编辑 */
#personnelRosterTable td[data-inline-key] { cursor: text; }
#personnelRosterTable td[data-inline-key]:hover { background: #f7fbff; box-shadow: inset 0 0 0 1px #d7e6f8; }
#personnelRosterTable td.roster-inline-editing { padding: 2px 4px !important; background: #fffdf2; box-shadow: inset 0 0 0 1px #e6c46a; }
#personnelRosterTable .roster-inline-control {
  width: 100%; min-width: 74px; max-width: 100%; height: 30px;
  border: 1px solid #b9cee6; border-radius: 5px; padding: 3px 5px;
  background: #fff; color: #24364d; font-size: 12.5px;
}
#personnelRosterTable .roster-inline-control:focus { outline: 2px solid #8bb9ea; outline-offset: 1px; }
#personnelRosterTable td.roster-inline-saving { opacity: .55; }

/* 快捷编辑：清除按钮与包装 */
#personnelRosterTable td.roster-inline-editing { padding: 2px 3px !important; }
#personnelRosterTable .roster-inline-wrap { display: flex; align-items: center; gap: 3px; width: 100%; }
#personnelRosterTable .roster-inline-wrap .roster-inline-control { flex: 1 1 auto; min-width: 0; }
#personnelRosterTable .roster-inline-clear {
  flex: 0 0 auto; width: 24px; height: 30px; padding: 0; line-height: 1;
  border: 1px solid #d7e2ef; border-radius: 5px; background: #fff;
  color: #8b9bad; font-size: 17px; cursor: pointer;
}
#personnelRosterTable .roster-inline-clear:hover { background: #fff1f1; border-color: #e3b4b4; color: #c0392b; }

/* 姓名底色标记 */
#personnelRosterTable td.roster-name-cell { cursor: pointer; }
#personnelRosterTable td.roster-name-cell:hover { box-shadow: inset 0 -2px #b9d4f2; }
#personnelRosterTable td.roster-color-yellow { background: #fff3c4 !important; }
#personnelRosterTable td.roster-color-green { background: #d9f3e5 !important; }
#personnelRosterTable td.roster-color-blue { background: #dbeafe !important; }
#personnelRosterTable td.roster-color-red { background: #fde2e4 !important; }
#personnelRosterTable td.roster-color-purple { background: #ede4ff !important; }
#personnelRosterTable td.roster-color-gray { background: #e9edf2 !important; }
.roster-color-menu {
  position: fixed; z-index: 9000; width: 210px; padding: 10px;
  background: #fff; border: 1px solid #dbe3ee; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(28, 52, 84, .18);
}
.roster-color-title { font-size: 12px; color: #60758b; margin: 0 2px 8px; }
.roster-color-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.roster-color-choice {
  width: 25px; height: 25px; padding: 0; border-radius: 7px;
  border: 1px solid #d7e1ec; background: #fff; cursor: pointer;
}
.roster-color-choice.active { outline: 2px solid #1f63ad; outline-offset: 1px; }
.roster-color-choice.roster-color-yellow { background: #fff3c4; }
.roster-color-choice.roster-color-green { background: #d9f3e5; }
.roster-color-choice.roster-color-blue { background: #dbeafe; }
.roster-color-choice.roster-color-red { background: #fde2e4; }
.roster-color-choice.roster-color-purple { background: #ede4ff; }
.roster-color-choice.roster-color-gray { background: #e9edf2; }
.roster-color-choice[data-color=""] { position: relative; overflow: hidden; }
.roster-color-choice[data-color=""]::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%;
  border-top: 1px solid #d06b6b; transform: rotate(-45deg);
}
.roster-color-close {
  width: 100%; height: 26px; margin-top: 9px; border: 0; border-radius: 6px;
  background: #f2f6fb; color: #60758b; font-size: 12px; cursor: pointer;
}


/* 汇总页只读：姓名列不显示可编辑指针 */
#personnelRosterTable.roster-summary-list td.roster-name-cell { cursor: default; }


/* 筛选弹窗：内容与颜色分开 */
.roster-color-filter-tools {
  margin: 0 0 10px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: #f8fafc;
}
.roster-color-filter-tools label { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #53667a; }
.roster-color-filter-tools label > span { flex: none; white-space: nowrap; }
.roster-color-filter-tools select { flex: 1; min-width: 0; height: 32px; padding: 4px 28px 4px 9px; }

/* 单量模式：仅大于零的单量标绿 */
#personnelRosterTable.roster-orders-table td.roster-order-positive {
  color: #16704b;
}

/* 已离职但后台未删号：入职时间标红 */
#personnelRosterTable td.roster-hire-warn {
  color: #c0392b !important;
  font-weight: 600;
}

/* 从表格补充的招聘渠道/所属第三方：标红提示核对 */
#personnelRosterTable td.roster-recruitment-filled {
  color: #c0392b !important;
  font-weight: 600;
}

#personnelRoster .roster-summary-table .roster-summary-group-compare {
  background: linear-gradient(180deg, #6b5b2a, #5f5025);
  color: #fff;
}
#personnelRoster .roster-summary-table tbody td:nth-child(17),\n#personnelRoster .roster-summary-table tbody td:nth-child(18) { color:#8a5a00; font-weight:700; }


#personnelRoster .roster-summary-table tbody td.rs-mom { color:#8a5a00; font-weight:700; }

