/* 排班、排休選人及月份操作共用同一面板，依螢幕寬度調整位置。 */
#desktop-actions {
  display: block;
  background: #fff;
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 14px;
}
.action-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
#desktop-actions .action-heading h2 {
  font-size: 15px;
  margin: 0;
  color: #49643c;
}
#action-month {
  color: #7a8d6c;
  font-size: 12px;
}
.auto-action-row {
  display: flex;
  gap: 7px;
}
.auto-action-row #auto-plan {
  flex: 1;
}
.auto-action-row .auto-settings {
  width: 42px;
  padding: 8px;
  flex: none;
  display: grid;
  place-items: center;
}
.auto-settings svg {
  height: 22px;
  width: 22px;
}
#desktop-actions .auto-rule-summary {
  font-size: 12px;
  line-height: 1.7;
  color: #7a8d6c;
  margin: 6px 0 13px;
}
#desktop-actions #pal.assignment-toolbar {
  position: static;
  display: block;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid #e6ecdf;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#desktop-actions .tool-mode-row {
  display: block;
}
#desktop-actions .tool-label,
#desktop-actions .tool-month,
#desktop-actions .desktop-mode-select {
  display: none;
}
#desktop-actions .assignment-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
#desktop-actions .assignment-modes .b {
  min-width: 0;
  padding: 6px 3px;
  min-height: 38px;
  font-size: 12px;
  white-space: nowrap;
}
#desktop-actions .desktop-persons {
  display: grid;
  margin: 13px 0 0;
  gap: 12px;
}
#desktop-actions .person-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#desktop-actions .person-group-label {
  grid-column: 1 / -1;
  font-size: 12px;
  margin: 0 0 2px;
}
#desktop-actions .person-chip.b {
  justify-content: center;
  gap: 2px;
  padding: 7px 4px;
  min-height: 40px;
  font-size: 14px;
  white-space: nowrap;
}
#desktop-actions .assignment-status {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
}
.month-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  border-top: 1px solid #e6ecdf;
  padding-top: 12px;
}
.month-action-row .b {
  font-size: 13px;
}
.clear-month {
  color: #a16549;
}
#compact-actions-anchor:not(:empty) {
  margin-bottom: 15px;
}
.phone-layout #desktop-actions {
  padding: 12px;
  background: #f8faf4;
  border-color: #dae3cf;
}
.phone-layout #desktop-actions .desktop-persons {
  display: none;
}
.phone-layout #desktop-actions .assignment-modes .b {
  min-height: 42px;
}
.phone-layout #desktop-actions .auto-action-row .b,
.phone-layout #desktop-actions .month-action-row .b {
  min-height: 44px;
  font-size: 14px;
}
.phone-layout #desktop-actions .assignment-status {
  font-size: 12px;
}
.phone-layout #desktop-actions .guest-toolbar-copy {
  margin-bottom: 10px;
}
.auto-options {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.auto-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid #dfe7d8;
  padding: 12px;
  border-radius: 9px;
}
.auto-option:has(input[type="checkbox"]:checked) {
  background: #f1f6ec;
  border-color: #91ad81;
}
.auto-role-option {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.auto-role-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.auto-role-count {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #758868;
}
.auto-check,
.auto-count {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}
.auto-check {
  cursor: pointer;
  min-height: 44px;
}
#pn .auto-check input {
  appearance: auto;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #315e43;
}
#pn .auto-count select {
  width: 72px;
  min-height: 44px;
  margin: 0;
  text-align: center;
  font-size: 16px;
}
.auto-count {
  color: #758868;
  font-size: 13px;
  white-space: nowrap;
}
#pn .auto-count select:disabled {
  opacity: 0.4;
}
.auto-protection {
  line-height: 1.8;
  margin-bottom: 20px;
}
