.staff-module-header{align-items:flex-end}.staff-header-actions{display:flex;gap:9px}.staff-metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.staff-metric-grid article{display:grid;gap:5px;padding:17px;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:0 8px 22px rgba(32,51,45,.05)}.staff-metric-grid small,.staff-metric-grid span{color:var(--muted);font-size:10px}.staff-metric-grid strong{font-family:Georgia,"Noto Serif TC",serif;font-size:24px}.staff-metric-grid .staff-alert-metric{color:#fff;background:var(--clay)}.staff-metric-grid .staff-alert-metric small,.staff-metric-grid .staff-alert-metric span{color:#f5ddd2}
.staff-schedule-card{padding:20px}.staff-schedule-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:15px}.staff-schedule-toolbar h2,.staff-card-heading h2{margin:0;font-family:Georgia,"Noto Serif TC",serif;font-size:24px}.staff-schedule-toolbar p:last-child{margin:5px 0 0;color:var(--muted);font-size:10px}.staff-week-controls{display:flex;align-items:flex-end;gap:7px}.staff-week-controls>button:not(.text-button){width:36px;height:36px;border:1px solid var(--line);border-radius:10px;color:var(--pine);background:#fff;font-size:22px}.staff-week-controls>strong{min-width:105px;padding-bottom:8px;text-align:center}.staff-week-controls label{display:grid;gap:3px;color:var(--muted);font-size:9px;font-weight:900}.staff-week-controls select{height:36px;padding:0 30px 0 10px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:#fff}
.staff-schedule-board{display:grid;gap:10px}.staff-schedule-row{display:grid;grid-template-columns:190px minmax(680px,1fr);gap:12px;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff}.staff-schedule-person{display:grid;grid-template-columns:44px 1fr;align-items:center;gap:10px}.staff-schedule-person>span{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;color:#fff;background:var(--pine);font-weight:900}.staff-schedule-person>span.clay{background:var(--clay)}.staff-schedule-person>span.sand{color:var(--pine);background:var(--sand)}.staff-schedule-person>span.moss{background:var(--moss)}.staff-schedule-person div{display:grid;gap:2px}.staff-schedule-person small{color:var(--muted);font-size:9px;line-height:1.4}.staff-day-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.staff-day-cell{min-height:82px;display:grid;align-content:start;gap:3px;padding:8px 7px;border:1px solid var(--line);border-radius:11px;text-align:left;color:var(--ink);background:#f7f7f2}.staff-day-cell:hover{border-color:#b8c9bf}.staff-day-cell .day-label{display:flex;justify-content:space-between;color:var(--muted);font-size:9px}.staff-day-cell .day-label b{color:var(--ink);font-size:11px}.staff-day-cell .shift-line{padding:3px 5px;border-radius:6px;color:var(--pine);background:#e5eee9;font-size:8px;font-weight:900}.staff-day-cell.off{color:#939d98;background:#f1f0ec}.staff-day-cell.leave{color:#8b5421;background:#fff1d8;border-color:#e6c794}.staff-day-cell.blocked{color:#8a493d;background:#f8e7e2;border-color:#e4bdb4}.staff-day-cell.today{box-shadow:inset 0 0 0 2px var(--clay)}.staff-day-cell em{margin-top:auto;font-size:8px;font-style:normal;font-weight:900}.staff-day-cell.leave em{color:#9a6820}.staff-day-cell.blocked em{color:#a14f42}
.booking-rule-note{display:flex;align-items:center;gap:10px;margin-top:14px;padding:12px 14px;border-radius:13px;color:#315d50;background:#eaf3ee;font-size:10px;line-height:1.6}.booking-rule-note strong{flex:0 0 auto;padding:4px 8px;border-radius:999px;color:#fff;background:var(--pine)}
.staff-lower-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.staff-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.staff-card-heading>span{padding:5px 8px;border-radius:999px;color:var(--pine);background:#e6efeb;font-size:9px;font-weight:900}.staff-qualification-list,.staff-exception-list{display:grid;gap:8px}.qualification-row{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:.55rem;padding:.55rem 0;border-bottom:1px solid var(--line)}.qualification-row:last-child{border-bottom:0}.qualification-row strong{padding-top:.18rem;font-size:.875rem;white-space:nowrap}.qualification-row div{display:flex;flex-wrap:wrap;gap:4px}.qualification-row em{max-width:100%;padding:4px 6px;border-radius:7px;color:var(--pine);background:#edf3ef;font-size:.75rem;line-height:1.3;font-style:normal}.exception-empty{padding:20px;color:var(--muted);text-align:center}
.therapist-view .staff-header-actions{display:flex}
@media(max-width:1150px){.staff-metric-grid{grid-template-columns:repeat(2,1fr)}.staff-schedule-toolbar{align-items:flex-start;flex-direction:column}.staff-schedule-card{overflow-x:auto}.staff-schedule-row{min-width:900px}.staff-lower-grid{grid-template-columns:1fr}}
@media(max-width:650px){.staff-header-actions{width:100%;flex-direction:column}.staff-header-actions button{width:100%}.staff-metric-grid{grid-template-columns:1fr 1fr}.staff-week-controls{flex-wrap:wrap}}


.staff-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.staff-metric-grid small, .staff-week-controls label {
  font-size: .875rem;
}
.module-card.staff-schedule-card, .staff-schedule-board {
  min-width: 0;
  overflow: hidden;
}
.staff-view-choices, .staff-period {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.staff-view-choices {
  padding: .24rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #eef3ee;
}
.staff-view-choices button, .staff-period button {
  min-height: 2.55rem;
  padding: .42rem .75rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--pine);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.staff-view-choices button[aria-pressed=true] {
  background: var(--pine);
  color: white;
}
.staff-period button {
  padding: .24rem .75rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.35rem;
}
.staff-week-controls {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .95rem;
}
.staff-week-controls select {
  height: 2.65rem;
}
#staffWeekLabel {
  min-width: 6rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#staffPermissionHint:empty,
#staffConflictPreview:empty {
  display: none;
}
.staff-week-table {
  overflow-x: auto;
}
.staff-week-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: .28rem;
  table-layout: fixed;
}
.staff-week-table th, .staff-week-table td {
  padding: .45rem .24rem;
  border-radius: .56rem;
  text-align: center;
  vertical-align: middle;
}
.staff-week-table thead th {
  background: #e9f1eb;
  color: #284238;
}
.staff-week-table tbody th, .staff-week-table td {
  border: 1px solid var(--line);
}
.staff-week-table th small, .staff-week-table td small {
  display: block;
  margin-top: .2em;
}
.staff-week-table td.staff-today {
  background: #edf3eb;
  border-color: #6c9384;
}
.staff-week-table td button {
  width: 100%;
  min-height: 2.75rem;
  padding: .1rem;
  border: 0;
  border-radius: .45rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.staff-week-table td button:hover,
.staff-week-table td button:focus-visible {
  background: #e1ede6;
}
.staff-time-range {
  display: block;
  color: #29483d;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.staff-booked-count {
  color: #795435;
}
.staff-week-compact {
  display: none;
}
.staff-day-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .3rem;
}
.staff-day-heading {
  padding: .15rem 0;
  color: #53655e;
  font-size: .81rem;
  text-align: center;
}
.staff-day-picker button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .15rem;
  min-width: 0;
  min-height: 3.15rem;
  padding: .25rem .1rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.staff-day-picker button span {
  color: #52665e;
  font-size: .76rem;
  line-height: 1.2;
}
.staff-day-picker button[aria-pressed=true] {
  border-color: var(--pine);
  background: #deebe3;
  box-shadow: inset 0 0 0 1px var(--pine);
}
.staff-day-summary {
  display: grid;
  gap: .45rem;
  margin-top: .65rem;
}
.staff-day-summary > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .75rem;
  padding: .6rem 0;
}
.staff-day-summary header h3 {
  margin: 0;
}
.staff-day-summary header > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .55rem;
}
.staff-day-person {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) minmax(6rem, 1fr) minmax(5rem, 1fr) auto;
  align-items: center;
  gap: .35rem .6rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.staff-day-person > div:first-child small {
  display: block;
  color: #53655e;
}
.staff-day-ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .55rem;
  min-width: 0;
}
.staff-day-person button {
  justify-self: end;
  min-height: 2.5rem;
}
.staff-booked-times {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .35rem;
  color: #795435;
  font-size: .875rem;
}
.staff-booked-times > span {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.staff-exception-card .staff-card-heading,
.staff-exception-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .75rem;
}
.staff-exception-card h2 {
  font-size: clamp(1.15rem, 5vw, 1.5rem);
}
.staff-exception-actions {
  display: flex;
}
.staff-exception-actions span {
  color: var(--muted);
  font-size: .875rem;
}
.staff-exception-list .exception-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  width: 100%;
  gap: .25rem .8rem;
  padding: .65rem .75rem;
  border: 1px solid transparent;
  border-radius: .75rem;
  background: #f7f5ef;
  color: var(--ink);
  text-align: left;
}
.staff-exception-list .exception-row:not(:disabled):hover {
  border-color: var(--line);
}
.staff-exception-list .exception-row > .exception-details {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .5rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
}
.exception-details > time,
.exception-details > .staff-time-range {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.staff-exception-list .exception-row .exception-note {
  flex-basis: 100%;
  font-size: .875rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
@media (max-width: 960px) {
  .staff-week-table {
    display: none;
  }
  .staff-week-compact {
    display: grid;
  }
}
@media (max-width: 540px) {
  .staff-metric-grid {
    gap: .35rem;
  }
  .staff-metric-grid article {
    padding: .6rem;
  }
  .staff-day-person {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .staff-day-person > div:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .15rem .4rem;
  }
  .staff-day-ranges {
    grid-column: 1 / -1;
  }
  .staff-day-person button {
    grid-row: 1;
    grid-column: 2;
  }
  .staff-day-picker {
    gap: .18rem;
  }
  .staff-day-picker button span {
    font-size: .69rem;
  }
  .staff-form-grid input,
  .staff-form-grid select,
  .staff-form-grid textarea {
    font-size: 1rem;
  }
}
