:root {
  --desktop-bg: #f1f3f5;
  --panel: #ffffff;
  --text: #202124;
  --muted: #66707a;
  --line: #aeb6bf;
  --line-light: #d8dde3;
  --tab: #e6e9ed;
  --tab-active: #ffffff;
  --blue: #1769aa;
  --blue-dark: #0f568f;
  --weekend: #eaf4ff;
  --danger: #b42318;
  --success: #067647;
  --warning: #8a6100;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--desktop-bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
a { color: #0b58a2; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 8px; }

.desktop-header { background: #e9edf1; border-bottom: 1px solid #8f98a3; }
.window-titlebar {
  height: 35px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #1f252b;
  background: linear-gradient(#f9fafb, #e7ebef);
  border-bottom: 1px solid #c4cad0;
  font-size: 13px;
}
.app-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  background: #1769aa;
  color: #fff;
  border-radius: 2px;
  font-size: 12px;
}
.window-version { color: #66707a; font-variant-numeric: tabular-nums; }
.window-account { margin-left: auto; color: #5a626b; }
.desktop-menubar { display: flex; align-items: flex-end; padding: 6px 12px 0; }
.viewer-logout-form { margin: 0 0 5px auto; }
.main-tabs { display: flex; gap: 3px; }
.main-tab {
  min-width: 118px;
  padding: 8px 22px;
  text-align: center;
  color: #222;
  background: #dfe4e9;
  border: 1px solid #aeb6bf;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  font-weight: 600;
}
.main-tab:hover { text-decoration: none; background: #f4f6f8; }
.main-tab.active { position: relative; top: 1px; background: #fff; }
.system-menu { margin: 0 0 5px auto; position: relative; }
.system-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 5px 12px;
  border: 1px solid #aeb6bf;
  background: #f8f9fa;
}
.system-menu summary::-webkit-details-marker { display: none; }
.system-menu-panel {
  position: absolute;
  z-index: 50;
  right: 0;
  top: calc(100% + 2px);
  width: 185px;
  padding: 4px;
  background: #fff;
  border: 1px solid #8f98a3;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, .18);
}
.system-menu-panel a, .menu-button {
  display: block;
  width: 100%;
  padding: 7px 9px;
  color: #222;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.system-menu-panel a:hover, .menu-button:hover { background: #e8f2fd; text-decoration: none; }
.system-menu-panel form { margin: 0; border-top: 1px solid #ddd; }

.page-shell { width: 100%; max-width: 1540px; flex: 1 0 auto; margin: 0 auto; padding: 14px 16px 38px; }
.site-footer { width: 100%; flex: 0 0 auto; padding: 8px 16px 10px; border-top: 1px solid var(--line-light); background: #e9edf1; color: var(--muted); text-align: center; font-size: 12px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--blue-dark); }
.workbench-shell { max-width: none; padding: 10px 12px 20px; }
.viewer-shell { max-width: 1120px; }
.viewer-preview { max-width: 1050px; margin: 0 auto; }
.viewer-versionbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.messages { margin-bottom: 8px; }
.message, .notice, .form-errors {
  padding: 8px 11px;
  margin-bottom: 8px;
  border: 1px solid #b9c4ce;
  background: #f8fbff;
}
.message-success { color: var(--success); border-color: #9dd4b7; background: #eefaf3; }
.message-error, .form-errors { color: var(--danger); border-color: #e4aaa5; background: #fff3f2; }
.table-action-form { display: inline; margin: 0; }
.table-link-button { padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; cursor: pointer; }
.table-link-button:hover { text-decoration: underline; }

.schedule-workbench {
  display: grid;
  grid-template-columns: minmax(440px, 43%) minmax(650px, 57%);
  gap: 10px;
  align-items: stretch;
  height: calc(100vh - 112px);
  min-height: 660px;
}
.schedule-sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 9px; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.preview-pane { min-width: 0; min-height: 0; height: 100%; }
.desktop-group {
  min-width: 0;
  margin: 0;
  padding: 12px 10px 10px;
  border: 1px solid #9da6b0;
  background: #f8f9fa;
}
.desktop-group > legend { padding: 0 7px; font-weight: 700; color: #2c333a; }
.generation-group { display: grid; gap: 10px; }
.month-generate, .holiday-generate { display: flex; align-items: center; gap: 7px; }
.month-generate > label, .holiday-generate > label { width: 78px; font-weight: 600; }
.month-inputs { display: flex; align-items: center; gap: 5px; flex: 1; }
.month-inputs input { width: 82px; }
.month-inputs input:nth-of-type(2) { width: 54px; }
input, select, textarea {
  border: 1px solid #9fa8b2;
  border-radius: 2px;
  padding: 6px 7px;
  background: #fff;
  color: #202124;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(23, 105, 170, .2); border-color: #1769aa; }
.holiday-generate select { flex: 1; min-width: 0; }
.desktop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px 12px;
  color: #202124;
  background: linear-gradient(#fff, #e9edf1);
  border: 1px solid #919ba5;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
}
.desktop-button:hover { background: #edf5fd; border-color: #5b86ad; text-decoration: none; }
.desktop-button.primary { color: #fff; background: linear-gradient(#277fbc, #1769aa); border-color: #0f568f; }
.desktop-button.danger { color: #fff; background: linear-gradient(#c4433a, #a92820); border-color: #871b15; }
.desktop-button.danger:hover { color: #fff; background: linear-gradient(#b73931, #94221b); border-color: #74150f; }
.desktop-button.primary:hover { background: var(--blue-dark); }
.desktop-note { color: var(--muted); margin: 4px 0; font-size: 12px; }
.start-person-box { border-top: 1px solid #c6ccd2; background: #f8f9fa; }
.start-person-box > div { display: grid; grid-template-columns: 92px minmax(145px, 1fr); min-height: 31px; align-items: center; }
.start-person-box > div + div { border-top: 1px solid #d9dde2; }
.start-person-box span { padding: 5px 8px; }
.start-person-box span:first-child { text-align: left; color: #4d5660; }
.start-person-heading span:not(:first-child) { text-align: center; color: #222; }
.start-person-heading { background: #eef1f4; font-weight: 600; }
.start-person-form { min-width: 0; margin: 0; padding: 3px 6px; border-left: 1px solid #d9dde2; }
.start-person-select { width: 100%; height: 29px; padding: 3px 7px; }
.start-person-controls { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 4px; }
.start-person-controls .desktop-button { height: 29px; padding: 3px 5px; white-space: nowrap; }
.start-person-select:disabled { color: #737b84; background: #eef0f2; }

.personnel-group { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.sub-tabs { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #9da6b0; }
.sub-tabs a {
  padding: 7px 11px;
  color: #222;
  background: #e4e8ec;
  border: 1px solid #aeb6bf;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.sub-tabs a:hover { background: #f7f8f9; text-decoration: none; }
.sub-tabs a.active { position: relative; top: 1px; background: #fff; font-weight: 700; }
.personnel-tabs { overflow-x: auto; flex: 0 0 auto; }
.personnel-tabs a { padding: 7px 8px; font-size: 12px; white-space: nowrap; }
.people-toolbar { display: flex; gap: 4px; padding: 6px 0; }
.people-toolbar .desktop-button { min-width: 72px; }
.people-toolbar .desktop-button:disabled { color: #9aa0a6; cursor: default; background: #edf0f2; border-color: #c4c9ce; }
.person-list {
  flex: 1 1 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  grid-auto-rows: 64px;
  gap: 4px;
  align-content: start;
  padding: 4px;
  border: 1px solid #b7bfc7;
  background: #eef1f4;
  min-height: 0;
}
.person-card {
  position: relative;
  min-width: 0;
  height: 64px;
  overflow: hidden;
  border: 1px solid #cbd0d6;
  background: #fff;
}
.person-card:nth-child(even) { background: #f3f5f7; }
.person-card.selected { border: 2px solid #7b9acc; background: #dce9f7; }
.person-card.inactive { color: #aeb3ba; }
.person-drag-bar { height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; cursor: grab; background: #e9edf2; }
.person-card:nth-child(even) .person-drag-bar { background: #e5e9ee; }
.person-card.selected .person-drag-bar { background: #d3e1f0; }
.person-card .position { color: inherit; font-size: 11px; }
.person-status-form { margin: 0; }
.duty-state { padding: 0; border: 0; color: #111; background: transparent; font: 700 11px "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; cursor: pointer; }
.inactive .duty-state { color: #c62828; }
.person-rename-form { height: 36px; margin: 0; }
.person-name-input { display: flex; width: 100%; height: 36px; align-items: center; justify-content: center; padding: 2px 3px; overflow: hidden; border: 0; border-radius: 0; outline: 0; background: transparent; color: inherit; text-align: center; text-overflow: ellipsis; font: 400 12px "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.person-name-input:focus { outline: 1px solid #7b9acc; }
.person-name-input.readonly { white-space: nowrap; }
.person-action-form { display: none; }
.person-card.swap-target { border: 3px solid #d97706; }
.person-card.insert-left::before, .person-card.insert-right::after { content: ""; position: absolute; z-index: 4; top: 0; bottom: 0; width: 4px; background: #d97706; }
.person-card.insert-left::before { left: -1px; }
.person-card.insert-right::after { right: -1px; }
.person-context-menu { position: fixed; z-index: 120; min-width: 175px; padding: 4px; border: 1px solid #8f98a3; background: #fff; box-shadow: 2px 3px 8px rgba(0, 0, 0, .2); }
.person-context-menu a, .person-context-menu button { display: block; width: 100%; padding: 7px 10px; border: 0; background: transparent; color: #222; text-align: left; cursor: pointer; }
.person-context-menu a:hover, .person-context-menu button:hover { background: #e8f2fd; text-decoration: none; }
.person-context-menu hr { margin: 3px 0; border: 0; border-top: 1px solid #d8dce0; }
.desktop-dialog { width: 330px; padding: 0; border: 1px solid #87919b; box-shadow: 3px 5px 18px rgba(0,0,0,.3); }
.desktop-dialog::backdrop { background: rgba(0, 0, 0, .22); }
.start-person-dialog { width: 310px; }
.start-person-password-form { display: grid; gap: 7px; padding: 11px 13px 12px; }
.start-person-password-form h2 { margin: 0; font-size: 15px; }
.start-person-password-form .desktop-note { margin: 0; line-height: 1.55; }
.start-person-password-form .field-error { margin: 0; color: #b42318; font-size: 12px; }
.start-password-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 7px; }
.start-password-row span { white-space: nowrap; }
.start-password-row input { width: 100%; height: 29px; }
.start-person-password-form .dialog-actions { justify-content: flex-end; margin-top: 1px; }
.add-person-dialog-form { display: grid; gap: 10px; padding: 14px 18px 16px; }
.add-person-dialog-form h2 { margin: 0 0 2px; }
.add-person-dialog-form label { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 7px; }
.add-person-dialog-form .desktop-note { margin: -5px 0 0 89px; }
.dialog-actions { display: flex; justify-content: center; gap: 8px; margin-top: 5px; }

.preview-group { height: 100%; display: flex; flex-direction: column; }
.preview-versionbar { display: flex; align-items: center; min-height: 33px; margin-bottom: 3px; }
.preview-titlebar { display: flex; align-items: center; gap: 10px; min-height: 39px; margin-bottom: 8px; }
.preview-titlebar > strong { flex: 1 1 auto; min-width: 0; font-size: 14px; text-align: left; }
.version-picker { display: flex; gap: 6px; align-items: center; min-width: 0; }
.version-picker label { white-space: nowrap; }
.version-picker select { min-width: 0; max-width: 360px; }
.status-label, .badge { display: inline-block; padding: 2px 8px; border: 1px solid #bdc4cb; background: #edf0f3; font-size: 12px; }
.status-draft { color: var(--warning); background: #fff8df; border-color: #e1ca79; }
.status-preview { color: var(--warning); background: #fff8df; border-color: #e1ca79; }
.status-finalized { color: #174ea6; background: #edf4ff; border-color: #a9c4ea; }
.status-published { color: var(--success); background: #edf9f2; border-color: #9dd4b7; }
.status-archived { color: #667085; background: #f1f2f4; }
.preview-toolbar { display: flex; justify-content: flex-end; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.preview-toolbar form { margin: 0; }
.preview-toolbar .desktop-button { min-width: 88px; }
.campus-tabs { margin-bottom: 0; }
.campus-tabs a { min-width: 115px; text-align: center; }
.calendar-wrap { flex: 1; min-height: 430px; padding: 6px; border: 0; background: #d9dde2; display: flex; flex-direction: column; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(78px, 1fr)); }
.calendar-head { flex: 0 0 auto; gap: 2px; font-weight: 700; text-align: center; }
.calendar-head > div { min-height: 25px; padding: 4px 3px; color: #1f2328; background: #e5e8ec; }
.calendar-head > div.weekend { color: #315d85; background: #d7e6f4; }
.calendar-week { flex: 1 1 0; min-height: 78px; gap: 2px; margin-top: 2px; }
.calendar-cell { position: relative; display: flex; min-width: 0; flex-direction: column; border: 1px solid #cbd0d6; background: #fff; overflow: hidden; }
.calendar-cell.weekend { background: #e4eef8; }
.calendar-cell.holiday { background: #fff0c7; }
.calendar-cell.outside { background: #eef1f4; }
.calendar-datebar { display: flex; flex: 0 0 23px; align-items: center; justify-content: space-between; gap: 3px; padding: 1px 3px 0; color: #505861; font-size: 10px; }
.calendar-datebar small { color: #7a8088; font-size: 10px; font-weight: 700; white-space: nowrap; }
.calendar-cell.weekend .calendar-datebar small { color: #315d85; }
.calendar-cell.holiday .calendar-datebar small { color: #9a6500; }
.calendar-person { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 30px; text-align: center; color: #111; font-size: 14px; font-weight: 700; padding: 3px; }
.calendar-leader { display: flex; flex: 0 0 23px; align-items: center; justify-content: center; text-align: center; color: #4f5964; background: #eef1f5; font-size: 10px; padding: 2px; }
.calendar-cell.weekend .calendar-leader { background: #d3e3f2; }
.calendar-cell.holiday .calendar-leader { background: #ffe2a0; }
.calendar-empty { margin-top: 13px; text-align: center; color: #a0a6ad; font-size: 12px; }
.draggable-item { cursor: grab; outline: 1px solid transparent; outline-offset: -1px; }
.draggable-item.drag-source { outline: 2px solid #4f7cac; }
.calendar-cell.drag-source-cell { outline: 2px solid #4f7cac; outline-offset: -2px; }
.drop-target.drag-over { outline: 3px solid #d97706; outline-offset: -3px; }
.drop-target.insert-left::before, .drop-target.insert-right::after { content: ""; position: absolute; z-index: 5; top: 0; bottom: 0; width: 4px; background: #d97706; }
.drop-target.insert-left::before { left: 0; }
.drop-target.insert-right::after { right: 0; }
.calendar-help { margin: 0; padding: 7px 2px 0; color: #303840; font-size: 12px; }

.reminder-shell { max-width: 1320px; }
.reminder-window { border: 1px solid #9da6b0; background: #f8f9fa; padding: 14px; }
.reminder-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.reminder-heading h1 { margin: 0; font-size: 22px; }
.reminder-tools { display: flex; gap: 8px; align-items: center; }
.reminder-linked-version strong { color: #1f2933; white-space: nowrap; }
.reminder-campus-tabs { margin-top: 4px; }
.sender-status { margin: 9px 0 0; }
.sender-status-online { border-color: #82ae8b; background: #edf8ef; color: #245c30; }
.sender-status-offline { border-color: #d7a06a; background: #fff6e9; color: #7a4312; }
.sender-status a { margin: 0 4px; font-weight: 700; }
.week-navigation { display: grid; grid-template-columns: 100px 1fr 100px; align-items: center; gap: 12px; margin: 10px 0; }
.week-navigation strong { text-align: center; font-size: 16px; }
.reminder-table { border: 1px solid #9da6b0; background: #fff; }
.reminder-row { display: grid; grid-template-columns: 86px 78px 100px minmax(320px, 1fr) 120px 52px; align-items: center; min-height: 50px; }
.reminder-row + .reminder-row { border-top: 1px solid #c8ced4; }
.reminder-row > * { min-width: 0; padding: 7px 8px; }
.reminder-row > * + * { border-left: 1px solid #d6dbe0; }
.reminder-table-head { min-height: 35px; background: #e8ebee; font-weight: 700; text-align: center; }
.reminder-row.unavailable { color: #8a929a; background: #f2f3f4; }
.reminder-message { width: calc(100% - 14px); margin: 6px 7px; }
.row-buttons { display: flex; gap: 5px; justify-content: center; }
.no-reminder { grid-column: 4; color: #969da4; }
.reminder-footer { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.reminder-footer .desktop-note { margin-left: auto; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
h1 { margin: 0 0 5px; font-size: 22px; }
h2 { font-size: 17px; }
.muted, .help { color: var(--muted); }
.panel, .auth-card { background: #fff; border: 1px solid #aeb6bf; padding: 20px; }
.narrow, .auth-card { max-width: 560px; }
.auth-card { margin: 8vh auto 0; box-shadow: 1px 2px 7px rgba(0, 0, 0, .12); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 13px; }
.field label { font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; }
.field.compact { width: 110px; }
.field.grow { flex: 1; min-width: 220px; }
.filter-bar { display: flex; align-items: flex-end; gap: 9px; padding: 12px; background: #fff; border: 1px solid #aeb6bf; margin-bottom: 12px; }
.filter-bar .field { margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 33px; padding: 6px 12px; border: 1px solid #919ba5; border-radius: 2px; background: linear-gradient(#fff, #e9edf1); color: #202124; cursor: pointer; }
.button:hover { text-decoration: none; background: #edf5fd; }
.button-primary { color: #fff; border-color: #0f568f; background: linear-gradient(#277fbc, #1769aa); }
.full-width { width: 100%; }
.form-actions, .actions { display: flex; gap: 9px; margin-top: 16px; }
.actions form { margin: 0; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid #aeb6bf; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 9px 11px; border-bottom: 1px solid #dce1e6; text-align: left; vertical-align: middle; }
th { background: #e9edf1; color: #343b42; }
tbody tr:hover { background: #f1f7fd; }
tbody tr:last-child td { border-bottom: 0; }
.empty, .empty-panel { text-align: center; color: var(--muted); padding: 28px; }
.errorlist { margin: 4px 0 0; padding-left: 18px; color: var(--danger); }
code { font-family: Consolas, monospace; font-size: 12px; }
.section { margin-bottom: 16px; }
.section h2 { margin-top: 0; }
.official-holiday-update { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 14px 16px; }
.official-holiday-update h2, .subsection-heading h2 { margin: 0 0 4px; }
.official-holiday-update p, .subsection-heading p { margin: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 9px; margin: 0; }
.inline-form .field { margin: 0; }
.subsection-heading { align-items: flex-end; margin-top: 24px; }
.compact-tabs { flex-wrap: wrap; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-grid .field { margin: 0; }
.form-grid .form-actions { align-items: flex-end; }
.compact-list { margin: 0; padding-left: 20px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; }
.inline-actions { display: flex; gap: 6px; align-items: center; }
.inline-actions form { margin: 0; }
.nowrap { white-space: nowrap; }
.pairing-code { font-size: 22px; letter-spacing: 2px; word-break: break-all; }
.query-panel { padding: 14px; }
.query-form { display: grid; grid-template-columns: 170px 170px minmax(220px, 1fr) auto auto; gap: 12px; align-items: end; }
.query-form .field { margin: 0; }
.campus-checks { min-height: 58px; margin: 0; padding: 5px 10px 7px; border: 1px solid #aeb6bf; white-space: nowrap; }
.campus-checks legend { padding: 0 5px; font-weight: 600; }
.campus-checks label + label { margin-left: 10px; }
.query-summary { margin-top: 12px; padding: 9px 11px; border: 1px solid #b8c7d5; background: #edf6ff; font-weight: 600; }
.query-result-section { margin-top: 14px; }
.query-result-section h2 { margin-bottom: 7px; font-size: 16px; }
.query-occurrence-list { margin: 0; padding-left: 20px; }
.query-occurrence-list li + li { margin-top: 3px; }

.holiday-preview-shell { max-width: 1320px; }
.holiday-preview-window { margin-bottom: 16px; padding: 12px; border: 1px solid #9da6b0; background: #f8f9fa; }
.holiday-preview-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 9px; }
.holiday-preview-toolbar h1 { font-size: 20px; }
.holiday-actions { align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 0; }
.holiday-campus-tabs { margin-top: 4px; }
.holiday-grid-panel { padding: 5px 6px 7px; border: 1px solid #9da6b0; border-top: 0; background: #fff; }
.holiday-unit-line { margin: 0; padding: 6px 2px; font-size: 14px; }
.holiday-table-wrap { border-color: #9099a3; }
.holiday-preview-table { table-layout: fixed; text-align: center; }
.holiday-preview-table th, .holiday-preview-table td { border-right: 1px solid #c8ced4; text-align: center; }
.holiday-preview-table th:last-child, .holiday-preview-table td:last-child { border-right: 0; }
.holiday-preview-table th:first-child { width: 54px; }
.holiday-preview-table th:nth-child(2) { width: 105px; }
.holiday-preview-table th:nth-child(3) { width: 85px; }
.holiday-preview-table th:nth-child(6) { width: 120px; }
.holiday-roster-dialog { width: min(1100px, 94vw); max-width: 94vw; max-height: 92vh; padding: 0; overflow: hidden; }
.holiday-dialog-window { max-height: 88vh; padding: 12px; overflow: auto; background: #f8f9fa; }
.holiday-dialog-toolbar { margin-bottom: 9px; }
.holiday-dialog-toolbar form { margin: 0; }
.holiday-dialog-tabs button {
  padding: 7px 11px;
  border: 1px solid #aeb6bf;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #e4e8ec;
  color: #222;
  font: inherit;
  cursor: pointer;
}
.holiday-dialog-tabs button:hover { background: #f7f8f9; }
.holiday-dialog-tabs button.active { position: relative; top: 1px; background: #fff; font-weight: 700; }
.holiday-dialog-table th:first-child { width: 125px; }
.holiday-dialog-table th:nth-child(2) { width: 100px; }
.holiday-dialog-table th:nth-child(3), .holiday-dialog-table th:nth-child(4) { width: auto; }
.holiday-dialog-table th:nth-child(5) { width: 130px; }

@media (max-width: 1100px) {
  .schedule-workbench { grid-template-columns: 1fr; height: auto; }
  .schedule-sidebar { grid-template-rows: auto auto; height: auto; overflow: visible; }
  .personnel-group { overflow: visible; }
  .person-list { flex: none; min-height: 220px; max-height: 420px; }
  .preview-group { min-height: 720px; }
  .reminder-row { grid-template-columns: 72px 68px 88px minmax(260px, 1fr) 112px 46px; }
  .query-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .query-name { grid-column: span 2; }
}
@media (max-width: 760px) {
  .desktop-menubar { padding-left: 6px; padding-right: 6px; }
  .main-tab { min-width: 100px; padding: 8px 12px; }
  .page-shell { padding: 10px 7px 28px; }
  .schedule-workbench { display: block; }
  .schedule-sidebar { display: block; }
  .generation-group, .personnel-group { margin-bottom: 8px; }
  .person-list { grid-template-columns: 1fr; }
  .preview-titlebar { align-items: flex-start; flex-direction: column; }
  .preview-titlebar > strong { text-align: left; }
  .calendar-wrap { overflow-x: auto; }
  .calendar-grid { min-width: 720px; }
  .reminder-heading, .reminder-tools, .filter-bar, .page-heading, .official-holiday-update, .inline-form { align-items: stretch; flex-direction: column; }
  .reminder-table { overflow-x: auto; }
  .reminder-row { min-width: 890px; }
  .field.compact, .field.grow { width: 100%; min-width: 0; }
  .split-layout { grid-template-columns: 1fr; }
  .query-form { grid-template-columns: 1fr; }
  .query-name { grid-column: auto; }
  .holiday-preview-toolbar { flex-direction: column; }
  .holiday-actions { justify-content: flex-start; }
  .holiday-preview-table { min-width: 760px; }
}
