:root {
  --ink: #1f2933;
  --muted: #61707d;
  --line: #d9e1e8;
  --paper: #ffffff;
  --surface: #fff3f3;
  --accent: #ad75b5;
  --accent-strong: #423456;
  --accent-soft: #fff3f3;
  --brand-secondary: #6acbd2;
  --brand-highlight: #ffd75e;
  --warn: #ff7917;
  --danger: #b91c1c;
  --ok: #15803d;
  --shadow: 0 10px 24px rgba(20, 36, 50, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.58rem 0.75rem;
  cursor: pointer;
  min-height: 38px;
  box-shadow: none;
  transform: translateY(0);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:not(:disabled):hover,
button:not(:disabled):focus-visible {
  border-color: rgba(173, 117, 181, 0.5);
  background: rgba(173, 117, 181, 0.1);
  color: var(--accent-strong);
  box-shadow: 0 6px 16px rgba(66, 52, 86, 0.1);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

button.primary:not(:disabled):hover,
button.primary:not(:disabled):focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: white;
}

button.loading-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
}

.button-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: button-spin 700ms linear infinite;
  flex: 0 0 auto;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.page-loading-panel {
  min-height: min(520px, calc(100vh - 8.5rem));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: left;
  align-self: stretch;
}

.page-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: button-spin 800ms linear infinite;
  flex: 0 0 auto;
}

.error-panel {
  align-items: center;
  justify-content: center;
  text-align: center;
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

button.danger:not(:disabled):hover,
button.danger:not(:disabled):focus-visible {
  background: #7f1d1d;
  border-color: #7f1d1d;
  color: white;
}

button.icon {
  width: 38px;
  padding: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.58rem 0.65rem;
  background: white;
  min-height: 38px;
}

input:focus,
select:focus,
textarea:focus,
.custom-select-button:focus-visible {
  outline: 2px solid rgba(173, 117, 181, 0.55);
  outline-offset: -2px;
}

.native-select-mirror {
  display: none;
}

.custom-select {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
}

.custom-select-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 0.58rem 0.65rem;
  color: var(--ink);
  text-align: left;
}

.custom-select-button:not(:disabled):hover,
.custom-select.open .custom-select-button:not(:disabled) {
  border-color: var(--accent);
  background: #fff;
}

.custom-select-button:disabled {
  cursor: not-allowed;
  color: var(--ink);
  background: #fff;
  opacity: 1;
}

.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
}

.custom-select-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  border-radius: 1px;
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 60;
  display: none;
  max-height: var(--custom-select-menu-max-height, min(260px, 42vh));
  overflow: auto;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.custom-select.open-up .custom-select-menu {
  top: auto;
  bottom: calc(100% + 0.25rem);
}

.custom-select.fixed-menu .custom-select-menu {
  position: fixed;
  left: var(--custom-select-menu-left);
  top: var(--custom-select-menu-top);
  right: auto;
  bottom: auto;
  width: var(--custom-select-menu-width);
  z-index: 4000;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 0.15rem;
}

.custom-select-option {
  width: 100%;
  min-height: 34px;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.custom-select .custom-select-menu .custom-select-option:not(:disabled):hover,
.custom-select .custom-select-menu .custom-select-option:not(:disabled):focus-visible,
.custom-select .custom-select-menu .custom-select-option.hovered {
  background: var(--accent) !important;
  color: white !important;
  border-radius: 6px;
}

.custom-select-option.selected {
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
}

.custom-select .custom-select-menu .custom-select-option.selected:not(:disabled):hover,
.custom-select .custom-select-menu .custom-select-option.selected:not(:disabled):focus-visible,
.custom-select .custom-select-menu .custom-select-option.selected.hovered {
  background: var(--accent) !important;
  color: white !important;
  border-radius: 6px;
}

.custom-date,
.custom-time {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
}

.custom-date {
  width: min(100%, 15.5rem);
}

.custom-date-input,
.custom-time-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-date-button,
.custom-time-button {
  min-height: 38px;
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0;
  color: var(--muted);
  background: white;
  font-size: 0.95rem;
}

.custom-date.open .custom-date-input,
.custom-date.open .custom-date-button,
.custom-time.open .custom-time-input,
.custom-time.open .custom-time-button,
.custom-date-input:focus,
.custom-date-input:focus + .custom-date-button,
.custom-time-input:focus,
.custom-time-input:focus + .custom-time-button {
  border-color: var(--accent);
}

.custom-date.open,
.custom-time.open,
.custom-date:focus-within,
.custom-time:focus-within {
  box-shadow: 0 0 0 2px rgba(173, 117, 181, 0.18);
}

.custom-date-calendar,
.custom-time-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 0.25rem);
  z-index: 60;
  display: none;
  width: min(340px, calc(100vw - 2rem));
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.custom-date-calendar {
  position: fixed;
  z-index: 120;
}

.custom-date.open .custom-date-calendar {
  display: grid;
  gap: 0.55rem;
}

.custom-time-panel {
  width: min(270px, calc(100vw - 2rem));
}

.custom-time.fixed-panel .custom-time-panel {
  position: fixed;
  left: var(--custom-time-panel-left);
  top: var(--custom-time-panel-top);
  right: auto;
  bottom: auto;
  width: var(--custom-time-panel-width);
  z-index: 4000;
}

.custom-time.open .custom-time-panel {
  display: grid;
  gap: 0.65rem;
}

.custom-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.custom-time-stepper {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 0.25rem;
  align-items: center;
}

.custom-time-stepper span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.custom-time-stepper input {
  min-height: 34px;
  padding: 0.35rem;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.custom-time-stepper input::-webkit-outer-spin-button,
.custom-time-stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.custom-time-stepper button,
.custom-time-quick button {
  min-height: 34px;
  padding: 0.35rem 0.55rem;
}

.custom-time-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
}

.custom-time-quick button.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.custom-time-quick button.selected:not(:disabled):hover,
.custom-time-quick button.selected:not(:disabled):focus-visible,
.custom-date-day.selected:not(:disabled):hover,
.custom-date-day.selected:not(:disabled):focus-visible,
.custom-date-year-menu button.selected:not(:disabled):hover,
.custom-date-year-menu button.selected:not(:disabled):focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.custom-date-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 0.4rem;
  align-items: center;
  text-align: center;
}

.custom-date-nav {
  min-height: 34px;
  width: 34px;
}

.custom-date-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.35rem;
}

.custom-date-jump .custom-select-button,
.custom-date-year-picker input {
  min-height: 34px;
  padding: 0.35rem 0.45rem;
}

.custom-date-jump .custom-select-button {
  font-size: 0.88rem;
}

.custom-date-year-picker {
  position: relative;
  display: block;
}

.custom-date-year-picker input {
  width: 100%;
  padding-left: 0.55rem;
  padding-right: 2.45rem;
}

.custom-date-year-picker input::-webkit-outer-spin-button,
.custom-date-year-picker input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.custom-date-year-button {
  position: absolute;
  top: 0;
  right: 0;
  width: 38px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.custom-date-year-picker.open input {
  border-color: var(--accent);
}

.custom-date-year-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 75;
  display: none;
  max-height: 210px;
  overflow: auto;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.custom-date-year-picker.open .custom-date-year-menu {
  display: grid;
  gap: 0.12rem;
}

.custom-date-year-menu button {
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0.35rem 0.45rem;
}

.custom-date-year-menu button:hover,
.custom-date-year-menu button:focus-visible {
  background: var(--accent-soft);
}

.custom-date-year-menu button.selected {
  background: var(--accent);
  color: white;
}

.custom-date-weekdays,
.custom-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.18rem;
}

.custom-date-weekdays span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.custom-date-day,
.custom-date-empty {
  min-height: 32px;
}

.custom-date-day {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.custom-date-day:hover,
.custom-date-day:focus-visible {
  background: var(--accent-soft);
}

.custom-date-day.today {
  color: var(--accent-strong);
  font-weight: 850;
}

.custom-date-day.selected {
  background: var(--accent);
  color: white;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label,
.field-label {
  display: grid;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.sidebar {
  background: #fbfcfd;
  border-right: 1px solid var(--line);
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.brand-logo {
  width: 30px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav {
  display: grid;
  gap: 0.35rem;
}

.nav-group {
  display: grid;
  gap: 0.25rem;
}

.nav-subitems {
  display: grid;
  gap: 0.2rem;
  padding: 0.15rem 0 0.15rem 0.7rem;
}

.nav-subitems button {
  min-height: 38px;
  padding: 0.58rem 0.75rem;
  font-size: inherit;
  font-weight: inherit;
}

.nav-group > button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  height: 39px;
  min-height: 38px;
  white-space: nowrap;
}

.nav-chevron {
  display: inline-flex;
  width: 0.58rem;
  height: 0.58rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  flex: 0 0 auto;
  transform-origin: center;
  transform: rotate(-45deg);
  transition: transform 120ms ease;
}

.nav-chevron.open {
  transform: rotate(45deg);
}

.nav button {
  text-align: left;
  border-color: transparent;
  background: transparent;
  font-size: 1.05rem;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.nav button:hover,
.nav button:focus-visible {
  background: rgba(173, 117, 181, 0.12);
  color: var(--accent-strong);
  border-color: rgba(173, 117, 181, 0.18);
}

.nav button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav button.active:hover,
.nav button.active:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--accent) 28%);
  border-color: rgba(173, 117, 181, 0.28);
}

.content {
  padding: 1.25rem 1.25rem 6.5rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.content.dashboard-content {
  height: 100vh;
  overflow: hidden;
  padding-bottom: 1.25rem;
  grid-template-rows: auto minmax(0, 1fr);
}

.panel,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-row .icon {
  margin-right: 0.1rem;
}

.panel {
  padding: 1rem;
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3,
.page-header h1 {
  margin: 0;
}

.page-header h1 {
  font-size: 1.35rem;
}

.panel h2 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.sidebar-profile {
  position: relative;
  display: flex;
  justify-content: stretch;
}

.profile-button {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  border-color: transparent;
  background: transparent;
  position: relative;
  z-index: 11;
}

.profile-button:hover,
.profile-button:focus-visible {
  border-color: transparent;
  background: rgba(173, 117, 181, 0.1);
}

.avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 850;
  font-size: 0.78rem;
}

.profile-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dismiss-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-popover {
  position: absolute;
  right: 0;
  width: min(220px, calc(100vw - 2rem));
  bottom: calc(100% + 0.5rem);
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 12;
}

.profile-popover button {
  justify-self: start;
}

.review-summary-header {
  display: grid;
  gap: 0.35rem;
}

.review-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.review-title-row h2 {
  margin: 0;
}

.review-header-tools {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.panel-head h2 {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 0.8rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-page {
  justify-items: start;
  align-items: start;
}

.settings-view > .panel:not(:first-child),
.settings-page > .panel {
  width: fit-content;
  min-width: min(720px, 100%);
  max-width: 100%;
  justify-self: start;
}

.staff-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.68fr);
  gap: 0.8rem;
  align-items: start;
}

.pay-hours-editor {
  grid-template-columns: minmax(300px, 0.95fr) minmax(420px, 1.3fr) minmax(220px, 0.7fr);
}

.pay-details-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.55rem;
  align-items: start;
}

.pay-hours-editor .compact-fields > label,
.pay-hours-editor .compact-fields > .missing-required {
  align-self: start;
}

.pay-hours-editor .compact-fields > label:not(:has(.field-hint))::after {
  content: "";
  display: block;
  min-height: 1rem;
}

.summary-lower-layout {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.compact-working-hours-panel {
  width: fit-content;
  max-width: 100%;
}

.summary-card-danger {
  border-color: #fecaca;
  background: #fff;
}

.summary-card-danger .summary-value {
  color: var(--danger);
}

.outlined-subsection {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
}

.notification-panel {
  gap: 0.65rem;
}

.notification-list {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.clickable-notification {
  cursor: pointer;
}

.clickable-notification:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(66, 52, 86, 0.08);
}

.notification-main {
  display: grid;
  gap: 0.15rem;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(515px, 1fr);
  gap: 1rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: start;
  padding-top: 2px;
}

.dashboard-room-overview,
.dashboard-recent-signins,
.dashboard-feed {
  min-height: 0;
}

.dashboard-main-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.dashboard-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  height: 100%;
  min-width: 515px;
}

.dashboard-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-notification-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.dashboard-notification-title h2 {
  margin: 0;
}

.notification-count {
  min-width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f3e8ff;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
}

.dashboard-notification-list {
  gap: 0.55rem;
}

.dashboard-feed-list {
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 0.15rem;
  min-height: 0;
  padding-bottom: 0.85rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.dashboard-scroll-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.dashboard-scroll-body {
  height: 100%;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
}

.dashboard-recent-signins .dashboard-scroll-shell,
.dashboard-feed .dashboard-scroll-shell {
  margin-bottom: -1rem;
  padding-bottom: 0.25rem;
}

.dashboard-recent-signins .dashboard-scroll-body,
.dashboard-feed .dashboard-scroll-body {
  height: calc(100% - 0.25rem);
}

.dashboard-scroll-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dashboard-scroll-shell.can-scroll-up .modal-scroll-indicator--top,
.dashboard-scroll-shell.can-scroll-down .modal-scroll-indicator--bottom {
  opacity: 1;
}

.dashboard-feed-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.dashboard-feed-toolbar button.active,
.dashboard-notification-head button.active {
  border-color: var(--primary);
  background: #f3e8ff;
  color: var(--primary-strong);
}

.dashboard-notification-item {
  cursor: pointer;
  border-left: 4px solid var(--line);
  align-items: flex-start;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-notification-item:hover {
  box-shadow: 0 10px 24px rgba(66, 52, 86, 0.08);
}

.dashboard-notification-item.notification-action {
  border-color: var(--danger);
  background: #fff5f5;
}

.dashboard-notification-item.dismissed {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #64748b;
  opacity: 0.78;
}

.notification-date {
  color: var(--muted);
  font-size: 0.82rem;
}

.notification-actions {
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.dashboard-room-overview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  height: fit-content;
  max-height: none;
  overflow: hidden;
  cursor: pointer;
  align-self: start;
  box-shadow: 0 12px 32px rgba(66, 52, 86, 0.08);
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-room-overview:hover,
.dashboard-room-overview:focus-within {
  border-color: var(--primary);
  box-shadow: 0 16px 36px rgba(66, 52, 86, 0.12);
}

.dashboard-recent-signins {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  max-height: 100%;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(66, 52, 86, 0.08);
}

.dashboard-room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-room-list {
  display: grid;
  gap: 0.35rem;
  min-height: 0;
  padding-right: 0.15rem;
}

.dashboard-recent-signin-list {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 0;
  padding-right: 0.15rem;
  padding-bottom: 0.85rem;
}

.dashboard-recent-signin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-recent-signin-item.staff {
  border-left-width: 5px;
  border-left-color: var(--accent);
}

.dashboard-recent-signin-item.child {
  border-left-width: 5px;
  border-left-color: var(--brand-secondary);
}

.dashboard-recent-signin-item.new-entry {
  animation: recentSigninNew 0.9s ease;
}

.dashboard-recent-signin-main,
.dashboard-recent-signin-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.dashboard-recent-signin-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.dashboard-recent-signin-text strong,
.dashboard-recent-signin-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-signin-meta {
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-left: auto;
}

.recent-signin-direction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
}

.recent-signin-direction.in {
  color: var(--ok);
  background: #dcfce7;
}

.recent-signin-direction.out {
  color: var(--danger);
  background: #fee2e2;
}

.recent-signin-time.out {
  color: var(--danger);
}

.recent-signin-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.recent-signin-type.staff {
  background: #f3e8ff;
  color: var(--primary-strong);
}

.recent-signin-type.child {
  background: #e6fbfe;
  color: #0f6b78;
}

@keyframes recentSigninNew {
  0% {
    transform: translateY(-10px);
    background: #f3e8ff;
    border-color: var(--primary);
  }
  100% {
    transform: translateY(0);
    background: #fff;
  }
}

.dashboard-room-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem 4.2rem 3.3rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.dashboard-room-row-header {
  padding: 0 0.5rem 0.32rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-room-total-row {
  margin-top: 0.1rem;
  padding-top: 0.55rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.dashboard-room-total-row .dashboard-room-name,
.dashboard-room-total-row .dashboard-room-stat {
  color: var(--ink);
  font-weight: 850;
}

.dashboard-room-name {
  min-width: 0;
  font-weight: 700;
  color: var(--ink);
}

.deleted-room-text {
  color: var(--danger) !important;
  font-weight: 800;
}

.dashboard-room-stat {
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

.payroll-warning-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.payroll-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c2410c;
  font-weight: 900;
  line-height: 1;
}

.payroll-irregularity-warning {
  margin: 0;
}

.compact-panel {
  padding: 0.8rem;
}

.compact-fields {
  gap: 0.55rem;
}

.compact-fields label,
.compact-fields .field-label,
.compact-panel label,
.compact-panel .field-label {
  gap: 0.2rem;
  font-size: 0.78rem;
}

.compact-fields input,
.compact-fields select,
.compact-fields .custom-select-button,
.compact-fields .custom-date-input,
.compact-fields .custom-time-input,
.compact-fields .custom-date-button,
.compact-fields .custom-time-button,
.compact-panel input,
.compact-panel select,
.compact-panel .custom-select-button,
.compact-panel .custom-date-input,
.compact-panel .custom-time-input,
.compact-panel .custom-date-button,
.compact-panel .custom-time-button {
  min-height: 34px;
  padding: 0.42rem 0.5rem;
}

.compact-fields .custom-date-button,
.compact-fields .custom-time-button,
.compact-panel .custom-date-button,
.compact-panel .custom-time-button {
  padding: 0;
}

.absence-datetime-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.absence-datetime-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.74fr);
  gap: 0.55rem;
  align-items: end;
  width: 100%;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.field-group-label {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.absence-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 0.55rem;
  align-items: end;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.absence-datetime-group .custom-date,
.absence-datetime-group .custom-time,
.absence-meta-row label,
.absence-meta-row .custom-select {
  min-width: 0;
}

.staff-detail-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.staff-detail-section {
  border-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.8rem;
}

.staff-detail-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.staff-detail-field-stack {
  display: grid;
  gap: 0.55rem;
  align-items: end;
}

.staff-detail-section textarea {
  min-height: 90px;
}

.subtle-box {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem;
}

.compact-note {
  max-width: 58ch;
  margin: -0.1rem 0 0;
}

.famly-settings-page .panel {
  align-self: start;
}

.famly-token-fields {
  max-width: 560px;
}

.famly-polling-settings .grid.four,
.famly-polling-settings .grid.three {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.famly-polling-block {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.famly-polling-block h3 {
  margin: 0;
  font-size: 0.95rem;
}

.settings-page > .famly-manual-panel {
  width: min(720px, 100%);
  min-width: min(720px, 100%);
}

.famly-manual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

.famly-manual-block {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.famly-manual-block h3 {
  margin: 0;
  font-size: 0.95rem;
}

.famly-status-card {
  padding: 0.65rem;
}

.api-response-pre {
  margin: 0;
  padding: 0.85rem;
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.45;
}

.famly-room-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.famly-room-card {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.famly-room-card .pill {
  justify-self: start;
}

.famly-room-card:has(.pill.warn),
.room-picker-row.deleted-room {
  background: #fff8ed;
  border-color: #f3d29a;
}

.famly-dynamic-field {
  min-width: 0;
}

@media (max-width: 760px) {
  .famly-room-card-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

.success {
  color: #047857;
  font-weight: 700;
}

.save-feedback {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.25rem;
  font-size: 0.92rem;
}

.settings-save-feedback {
  margin: 0;
}

.actions.save-row {
  justify-content: flex-start;
  align-items: flex-end;
}

.save-row label,
.save-row .field-label {
  width: min(220px, 100%);
}

.save-row button {
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
}

@media (max-width: 1180px) {
  .pay-hours-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-split {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .dashboard-feed {
    min-width: 0;
    height: min(620px, 70vh);
  }

  .content.dashboard-content {
    height: auto;
    overflow: visible;
    grid-template-rows: auto;
  }

  .child-parent-card {
    grid-column: 1 / -1;
  }
}

.field-hint {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  min-height: 1rem;
}

.readonly-field {
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.42rem 0.5rem;
  background: #f8fafb;
  color: var(--ink);
  font-weight: 700;
}

.span-2 {
  grid-column: 1 / -1;
}

.organisation-details-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  width: 100%;
}

.organisation-details-panel {
  padding-top: 0.75rem;
}

.organisation-details-panel > .section-header {
  margin-top: 0;
}

.organisation-details-layout .subpanel,
.organisation-name-field {
  grid-column: 1 / -1;
}

.organisation-address-grid,
.organisation-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.invalid-input,
.invalid-field input {
  border-color: var(--danger);
  background: #fff5f5;
}

.invalid-field .custom-select-button,
.invalid-field .readonly-field {
  border-color: var(--danger);
  background: #fff5f5;
}

.invalid-field {
  color: var(--danger);
}

.readonly-detail-row.invalid-field {
  border-color: rgba(185, 28, 28, 0.28);
  background: #fff5f5;
  border-radius: 8px;
  padding: 0.45rem;
}

.readonly-detail-row.invalid-field .muted,
.readonly-detail-row.invalid-field strong {
  color: var(--danger);
}

.missing-required-field {
  cursor: help;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.absence-year-card {
  display: flex;
  align-items: end;
  justify-self: end;
  width: min(100%, 220px);
}

.absence-year-card label {
  width: 100%;
}

.pay-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}

.payroll-panel-head {
  justify-content: space-between;
  align-items: end;
  width: 100%;
  gap: 0.75rem;
}

.payroll-table-controls,
.payroll-period-controls {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.payroll-table-controls {
  flex: 1 1 360px;
  justify-content: flex-start;
}

.payroll-period-controls {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.payroll-year-control {
  width: 150px;
}

.payroll-month-control {
  width: 165px;
}

.table-search-field {
  width: min(320px, 100%);
}

.payroll-table-controls button {
  min-height: 38px;
}

.payroll-table-controls .list-count {
  align-self: center;
  justify-self: auto;
  white-space: nowrap;
}

.payroll-table-scroll {
  background: var(--paper);
  border-radius: 8px;
}

.payroll-table-scroll .payroll-staff-table {
  margin: 0;
}

.payroll-staff-table {
  min-width: 760px;
}

.payroll-staff-table th:first-child,
.payroll-staff-table td:first-child {
  width: 34%;
  min-width: 240px;
  white-space: nowrap;
}

.payroll-staff-table th:nth-child(n + 2):nth-child(-n + 5),
.payroll-staff-table td:nth-child(n + 2):nth-child(-n + 5) {
  width: 15%;
  min-width: 112px;
  white-space: nowrap;
}

.payroll-staff-table th:last-child,
.payroll-staff-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.payroll-modal {
  width: min(1040px, calc(100vw - 2rem));
}

.modal > .compact-modal-head {
  padding: 0.65rem 1rem;
}

.compact-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.modal > .panel-head .muted {
  margin: 0.2rem 0 0;
  font-weight: 400;
}

.payroll-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.55rem;
}

.payroll-kpi-grid .card {
  padding: 0.65rem 0.75rem;
}

.payroll-breakdown {
  overflow: visible;
}

.payroll-modal .payroll-breakdown {
  padding: 0.8rem;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: none;
}

.payroll-modal .payroll-breakdown table {
  table-layout: auto;
}

.payroll-modal .payroll-breakdown th,
.payroll-modal .payroll-breakdown td {
  padding: 0.48rem 0.55rem;
  white-space: normal;
}

.answer-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.card {
  padding: 0.9rem;
}

.metric {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.value {
  font-size: 1.7rem;
  font-weight: 800;
  margin-top: 0.15rem;
}

.current-checkins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 680px), 1fr));
  gap: 0.9rem;
  align-items: start;
}

.current-checkins-key {
  justify-content: flex-start;
  width: 100%;
  margin-top: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(43, 35, 58, 0.05);
  overflow-x: auto;
  flex-wrap: nowrap;
}

.current-checkins-key .key-item {
  gap: 0.25rem;
  padding: 0.18rem 0.35rem;
  background: rgba(255, 255, 255, 0.8);
}

.current-checkins-key .pill {
  min-height: 20px;
  padding: 0.1rem 0.42rem;
  font-size: 0.72rem;
}

.room-checkin-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.room-checkin-head,
.room-staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.room-checkin-head h3 {
  margin: 0;
  font-size: 1rem;
}

.room-checkin-list {
  display: grid;
  gap: 0.45rem;
}

.room-checkin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.room-checkin-column {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.room-checkin-column h4 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.room-empty-state {
  margin: 0;
  padding: 0.65rem;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fff;
}

.room-staff-row {
  min-height: 52px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.room-child-row {
  min-height: 46px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.room-staff-row > div:first-child {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.room-child-row > div:first-child {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.room-child-row strong,
.room-staff-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-staff-row.checkedIn {
  border-color: rgba(21, 128, 61, 0.35);
  background: #f0fdf4;
}

.room-child-row.checkedIn {
  border-color: rgba(21, 128, 61, 0.24);
  background: #fff;
}

.room-child-row.unexpected {
  border-color: rgba(255, 121, 23, 0.45);
  background: #fffbeb;
}

.room-staff-row.missing {
  opacity: 0.62;
  background: #f8fafc;
}

.room-child-row.missing {
  opacity: 0.52;
  background: #f8fafc;
}

.room-child-row.unavailable {
  opacity: 0.62;
  border-color: rgba(255, 121, 23, 0.28);
  background: #fff7ed;
}

.room-staff-row.unexpected {
  border-color: rgba(255, 121, 23, 0.45);
  background: #fffbeb;
}

.room-staff-row.absent {
  opacity: 0.7;
  border-color: rgba(185, 28, 28, 0.28);
  background: #fff1f2;
}

.current-checkins-view .room-checkin-card {
  gap: 0.55rem;
  min-width: 0;
}

.current-checkins-view .room-checkin-list,
.current-checkins-view .room-checkin-column {
  gap: 0.3rem;
}

.current-checkins-view .room-staff-row {
  min-height: 40px;
  padding: 0.35rem 0.55rem;
}

.current-checkins-view .room-child-row {
  min-height: 38px;
  padding: 0.32rem 0.52rem;
}

.current-checkins-view .room-staff-meta {
  gap: 0.28rem;
}

.current-checkins-view .room-staff-meta .pill {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.current-checkins-view .room-staff-row > div:first-child,
.current-checkins-view .room-child-row > div:first-child {
  gap: 0.05rem;
}

.room-staff-meta,
.room-checkin-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.room-staff-meta {
  flex: 0 0 auto;
  min-width: max-content;
  margin-left: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.room-staff-meta .pill {
  flex: 0 0 auto;
  white-space: nowrap;
}

.checkin-time {
  font-weight: 850;
  color: var(--ok);
  white-space: nowrap;
  margin-left: auto;
}

.attendance-overview-times {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  white-space: normal;
}

.room-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem 0.75rem;
}

.room-picker-row {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-picker-row .checkbox:last-child {
  color: var(--muted);
  font-size: 0.86rem;
}

.room-picker-row.deleted-room .checkbox:first-child {
  font-weight: 700;
  color: var(--danger);
}

@media (max-width: 760px) {
  .room-checkin-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .current-checkins-view .room-checkin-columns {
    grid-template-columns: 1fr;
  }
}

.dashboard-fab {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.dashboard-fab.blocked {
  z-index: 10;
  pointer-events: none;
}

.quick-dismiss-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.quick-dismiss-layer:not(:disabled):hover,
.quick-dismiss-layer:not(:disabled):focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dashboard-fab-button {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-size: 1.65rem;
  line-height: 1;
  box-shadow: var(--shadow);
  transform: rotate(0deg) scale(1);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.dashboard-fab-button.open {
  transform: rotate(135deg) scale(1.04);
  box-shadow: 0 14px 30px rgba(66, 52, 86, 0.22);
}

.dashboard-fab-menu {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.5rem;
  width: min(230px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-origin: bottom right;
  animation: fabMenuPop 170ms ease-out both;
}

.dashboard-fab-menu::before {
  content: "";
  position: absolute;
  inset: -0.75rem -0.85rem;
  z-index: -1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 100%, rgba(173, 117, 181, 0.26), rgba(173, 117, 181, 0.08) 46%, rgba(255, 243, 243, 0) 76%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 243, 243, 0.42));
  box-shadow: 0 18px 42px rgba(66, 52, 86, 0.16);
  pointer-events: none;
}

.dashboard-fab-menu button {
  text-align: left;
  width: 100%;
  border-color: rgba(173, 117, 181, 0.26);
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(66, 52, 86, 0.16);
  transform: scale(1);
  transform-origin: right center;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.dashboard-fab-menu button:hover,
.dashboard-fab-menu button:focus-visible {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 14px 30px rgba(66, 52, 86, 0.22);
  transform: scale(1.04);
}

@keyframes fabMenuPop {
  from {
    opacity: 0;
    transform: translate(14px, 18px) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.quick-staff-picker {
  position: relative;
  display: grid;
  gap: 0.35rem;
  z-index: 5;
}

.quick-staff-results {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 0.2rem;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-staff-result {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
}

.quick-staff-result:hover,
.quick-staff-result:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quick-staff-empty {
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.summary-value {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.split-kpi-card {
  display: grid;
  gap: 0.45rem;
}

.split-kpi-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.65rem;
}

.split-kpi-lines {
  display: grid;
  gap: 0.25rem;
}

.split-kpi-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.split-kpi-label {
  color: var(--muted);
  font-weight: 750;
}

.split-kpi-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  text-align: right;
}

.split-kpi-value small {
  font-size: 0.72rem;
}

.summary-comparison {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.comparison-change {
  font-weight: 800;
}

.comparison-change.positive {
  color: #12805c;
}

.comparison-change.negative {
  color: #c2410c;
}

.comparison-change.neutral,
.comparison-previous {
  color: var(--muted);
}

.comparison-previous {
  flex-basis: 100%;
}

@media (max-width: 720px) {
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .dashboard-split {
    height: auto;
    overflow: visible;
  }

  .content.dashboard-content {
    height: auto;
    overflow: visible;
    grid-template-rows: auto;
  }
}

.summary-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.staff-import-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: #fbfcfd;
}

.staff-import-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.staff-import-table td:last-child label {
  min-width: 150px;
}

.staff-import-table th:first-child,
.staff-import-table td:first-child {
  width: 42px;
}

.child-contact-list {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.child-contact-list.compact {
  gap: 0.35rem;
}

.child-contact-item {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.child-contact-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.child-contact-item:last-child {
  padding-bottom: 0;
}

.child-contact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.child-contact-head strong {
  color: var(--ink);
}

.row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.famly-detail-modal {
  width: min(900px, calc(100vw - 2rem));
  overflow-x: hidden;
}

.famly-detail-modal .subpanel,
.famly-detail-modal .summary-grid,
.famly-detail-modal table {
  min-width: 0;
}

.famly-detail-modal table {
  table-layout: fixed;
}

.famly-detail-modal th,
.famly-detail-modal td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.famly-detail-modal .summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: auto;
  align-items: center;
}

.split-actions > .actions:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.split-actions > .actions:last-child {
  margin-left: auto;
  flex: 0 0 auto;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

.staff-directory-table th,
.staff-directory-table td {
  border-bottom: 0;
}

.staff-directory-table tbody tr {
  border-bottom: 1px solid var(--line);
}

.staff-directory-table thead tr {
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sort-button {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 800;
  text-transform: inherit;
}

.staff-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.staff-list-search-controls {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  flex: 1 1 430px;
  flex-wrap: wrap;
}

.staff-list-search-controls button {
  min-height: 38px;
}

.staff-list-search-controls .list-count {
  align-self: center;
  white-space: nowrap;
}

.famly-import-toolbar .table-search-field {
  width: min(340px, 100%);
}

.staff-list-toggle-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.list-count {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.pager-size {
  width: 92px;
}

.pager-rows-control {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pager-rows-control .pager-size {
  margin: 0;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f8fafb;
}

.clickable-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.staff-directory-table th,
.staff-import-table th {
  position: relative;
  overflow: visible;
}

.staff-header-row {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-icon {
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.filter-icon.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.filter-dismiss-layer {
  position: fixed;
  inset: 0;
  z-index: 25;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.filter-popover {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 30;
  width: min(260px, calc(100vw - 2rem));
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-transform: none;
}

.filter-popover-left {
  left: 0;
  right: auto;
}

.filter-popover .custom-date-calendar {
  width: min(300px, calc(100vw - 3rem));
}

.audit-plain-header {
  min-height: 28px;
}

.filter-options {
  display: grid;
  gap: 0.35rem;
  max-height: 220px;
  overflow: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.pill.ok {
  background: #dcfce7;
  color: var(--ok);
}

.pill.warn {
  background: #fef3c7;
  color: var(--warn);
}

.pill.danger {
  background: #fee2e2;
  color: var(--danger);
}

.staff-status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.missing-info-pill {
  cursor: help;
}

.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 1rem;
}

.checkbox {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

.checkbox input {
  width: 18px;
  min-height: 18px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login .panel {
  width: min(430px, 100%);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.login-logo {
  width: min(250px, 74vw);
  max-height: 106px;
  object-fit: contain;
  margin-bottom: 0.15rem;
}

.login-brand h1 {
  margin: 0;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.schedule-row {
  display: grid;
  grid-template-columns: 88px 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
}

.compact-schedule-row {
  grid-template-columns: 48px 1fr 1fr 34px;
  gap: 0.42rem;
  align-items: center;
}

.compact-schedule-row .icon {
  min-height: 34px;
  width: 34px;
}

.compact-schedule-row .copy-line-button {
  align-self: end;
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-strong);
  background: #fff;
  border-color: var(--line);
}

.compact-schedule-row .copy-line-button:hover,
.compact-schedule-row .copy-line-button:focus-visible {
  border-color: var(--accent);
  background: #fff;
}

.row-tools {
  display: flex;
  gap: 0.35rem;
}

.row-tools-end {
  justify-content: flex-end;
}

.row-tools .icon {
  min-height: 30px;
  width: 30px;
}

.sign-in-edit-main .row-tools {
  align-items: center;
}

.sign-in-edit-main .sign-in-row-remove {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  flex: 0 0 38px;
}

.danger-icon {
  color: var(--danger);
}

.danger-icon:hover,
.danger-icon:focus-visible {
  border-color: #fecaca;
  background: #fff5f5;
}

.danger-text {
  color: var(--danger);
  border-color: #fecaca;
}

.danger-text:hover,
.danger-text:focus-visible {
  border-color: var(--danger);
  background: #fff5f5;
}

.delete-action-button {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff;
}

.delete-action-button:hover,
.delete-action-button:focus-visible {
  border-color: var(--danger);
  background: #fff5f5;
}

.logo-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.logo-preview input[type="file"] {
  grid-column: 1 / -1;
}

.logo-preview-copy {
  display: grid;
  gap: 0.16rem;
}

.brand-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.logo-preview img {
  max-width: 150px;
  max-height: 74px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem;
}

.invalid-row input {
  border-color: var(--danger);
  background: #fff5f5;
}

.invalid-row strong {
  color: var(--danger);
}

.invalid-row .copy-line-button {
  color: var(--accent-strong) !important;
  background: #fff !important;
  border-color: var(--line) !important;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tabs button {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.tabs button:hover,
.tabs button:focus-visible {
  background: rgba(173, 117, 181, 0.1);
  border-color: rgba(173, 117, 181, 0.34);
  color: var(--accent-strong);
}

.tabs button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.tabs button.active:hover,
.tabs button.active:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 30%);
  box-shadow: 0 0 0 2px rgba(173, 117, 181, 0.08);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
}

.review-stepper {
  display: flex;
  flex-wrap: nowrap;
}

.step {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
  min-width: 0;
}

.review-stepper .step {
  flex: 1 1 0;
  white-space: nowrap;
}

.step.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.step.done {
  color: var(--ok);
  background: #f0fdf4;
}

.modal-actions {
  justify-content: flex-start;
  width: 100%;
}

.modal-actions .modal-close-action,
.modal-footer .modal-close-action {
  margin-left: auto;
}

.staff-details-actions {
  justify-content: space-between;
  align-items: center;
}

.staff-delete-button {
  margin-left: auto;
}

.readonly-staff-form input:disabled,
.readonly-staff-form textarea:disabled,
.readonly-staff-form select:disabled,
.readonly-staff-form button:disabled {
  cursor: not-allowed;
}

.inactive-staff-note {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.child-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.65rem;
  align-items: start;
  justify-content: stretch;
  justify-items: stretch;
}

.child-detail-grid > * {
  width: 100%;
  max-width: 100%;
}

.child-personal-card {
  width: 100%;
}

.child-famly-card {
  width: 100%;
}

.child-parent-card {
  width: 100%;
  grid-column: span 2;
}

.child-parent-card .child-parent-contact-sections {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.6rem;
}

.child-parent-contact-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: #fbfcfd;
}

.child-parent-contact-section h4 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
}

.child-parent-contact-section .child-contact-item {
  border-top: 0;
  padding: 0;
}

.child-parent-contact-section .child-contact-head {
  display: block;
}

.child-parent-contact-section .child-contact-item > div:not(.child-contact-head) {
  overflow-wrap: anywhere;
}

.child-session-card {
  width: 100%;
}

.child-billing-card {
  width: 100%;
}

.child-session-card table {
  margin-top: 0.65rem;
}

.child-session-summary {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.65rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.child-session-summary .muted {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.readonly-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
}

.readonly-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.compact-detail-list {
  display: grid;
  gap: 0.45rem;
}

.readonly-detail-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.55fr) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
  white-space: pre-line;
}

.readonly-detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.align-end {
  justify-content: flex-end;
}

.child-day-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.65rem;
}

.staff-history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
  white-space: nowrap;
}

.compact-history-table th,
.compact-history-table td {
  font-size: 0.82rem;
}

.modal-footer {
  align-items: center;
  gap: 0.75rem;
}

.review-step-actions {
  justify-content: flex-end;
}

.settings-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 0.65rem;
}

.settings-toolbar.compact-year-toolbar {
  grid-template-columns: auto;
  justify-self: end;
}

.settings-toolbar.compact-year-toolbar > label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
}

.settings-toolbar.compact-year-toolbar .custom-select {
  width: 8.6rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

.compact-header {
  align-items: center;
}

.calendar-section {
  display: grid;
  gap: 0.75rem;
}

.calendar-term-section {
  margin-top: -0.25rem;
}

.session-day-list {
  display: grid;
  gap: 0.55rem;
}

.session-day-row {
  display: grid;
  grid-template-columns: 5.8rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.6rem;
}

.session-day-name {
  padding-top: 0.28rem;
  color: var(--accent-strong);
}

.session-day-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 0.5rem;
}

.session-card.is-deleting {
  opacity: 0.68;
  border-color: var(--accent);
}

.session-card-main {
  display: grid;
  gap: 0.25rem;
  align-items: start;
  justify-items: start;
}

.session-card-main .pill {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.session-card-time {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.session-empty {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.session-day-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.45rem 0.7rem;
}

.term-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.term-card,
.closed-day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 0.75rem;
}

.term-card {
  display: grid;
  gap: 0.65rem;
}

.term-card.editing,
.closed-day-card.editing {
  background: white;
  border-color: var(--accent);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.date-display {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.date-display span {
  color: var(--muted);
}

.closed-day-list {
  display: grid;
  gap: 0.55rem;
}

.closed-day-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.closed-day-card.editing {
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  align-items: end;
}

.closed-day-main {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.month-control {
  min-width: 155px;
  width: auto;
  flex: 0 0 auto;
}

.attendance-month-controls {
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}

.full-width-button {
  width: 100%;
}

.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(var(--open-day-count, 5), minmax(0, 1fr));
  gap: 0.55rem;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-day {
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.attendance-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.attendance-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.attendance-date-number {
  font-size: 0.9rem;
  line-height: 1.35;
}

.attendance-day.today {
  border-color: rgba(173, 117, 181, 0.58);
  box-shadow: 0 0 0 2px rgba(173, 117, 181, 0.14), 0 8px 18px rgba(173, 117, 181, 0.12);
}

.attendance-day-head .actions {
  justify-content: flex-end;
  gap: 0.18rem;
  min-width: 0;
}

.attendance-day-head .pill {
  min-height: 20px;
  padding: 0.12rem 0.38rem;
  font-size: 0.68rem;
}

button.attendance-day {
  cursor: pointer;
}

button.attendance-day:hover,
button.attendance-day:focus-visible {
  border-color: var(--accent);
  background: #f8fafb;
}

.attendance-day.present {
  border-left: 4px solid var(--ok);
  background: #f0fdf4;
}

.attendance-day.absence {
  border-left: 4px solid #7c3aed;
  background: #f5f3ff;
}

.attendance-day.missing {
  border-left: 4px solid var(--warn);
  background: #fffbeb;
}

.attendance-day.unexpected {
  border-left: 4px solid var(--warn);
  background: #fffbeb;
}

.attendance-day.pendingImport {
  border-left: 4px solid #94a3b8;
  background: #fff;
}

.aggregate-attendance-day {
  min-height: 112px;
}

.aggregate-day-count {
  font-size: 1rem;
}

.child-attendance-record-table tr.unexpected-row td {
  background: #fffbeb;
}

.child-attendance-record-table tr.unexpected-row td:first-child {
  border-left: 4px solid var(--warn);
}

.attendance-overview-modal {
  width: min(980px, calc(100vw - 1.25rem));
}

.attendance-day-room-grid {
  grid-template-columns: 1fr;
  gap: 0.8rem;
  align-items: start;
}

.attendance-overview-modal .room-checkin-card {
  gap: 0.55rem;
  padding: 0.7rem;
  border-color: rgba(66, 52, 86, 0.18);
  box-shadow: none;
}

.attendance-overview-modal .room-checkin-head {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.attendance-overview-modal .room-checkin-head h3 {
  font-size: 0.92rem;
}

.attendance-overview-modal .room-checkin-list {
  gap: 0.32rem;
}

.staff-attendance-overview-modal .room-checkin-list {
  grid-template-columns: 1fr;
}

.children-attendance-overview-modal .room-checkin-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attendance-overview-modal .room-child-row,
.attendance-overview-modal .room-staff-row {
  min-height: 38px;
  padding: 0.38rem 0.48rem;
}

.attendance-overview-modal .modal-actions {
  position: static;
  z-index: auto;
  margin-bottom: 0;
}

.attendance-modal-footer {
  display: grid;
  gap: 0.7rem;
}

.attendance-modal-footer .attendance-key {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.attendance-modal-footer .actions {
  justify-content: flex-start;
  width: 100%;
}

.attendance-overview-modal .modal-actions button {
  min-height: 36px;
}

.overview-room-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.overview-room-row:hover,
.overview-room-row:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(173, 117, 181, 0.12);
}

@media (max-width: 860px) {
  .children-attendance-overview-modal .room-checkin-list {
    grid-template-columns: 1fr;
  }
}

.attendance-day.time-alert {
  box-shadow: inset 0 0 0 2px rgba(185, 28, 28, 0.22);
}

.attendance-day.blank,
.attendance-day.muted-day {
  background: #f8fafb;
  color: var(--muted);
}

.stacked-lines {
  display: grid;
  gap: 0.25rem;
}

.time-range {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
}

.time-warning {
  color: var(--danger);
  font-weight: 800;
}

.normalised-time {
  border-bottom: 1px dotted rgba(173, 117, 181, 0.65);
  color: #5f4a66;
}

.time-warning[role="button"] {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.attendance-edit-modal {
  width: min(980px, calc(100vw - 2rem));
  overflow-x: hidden;
}

.attendance-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  width: 100%;
}

.attendance-edit-row.sign-in-edit-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}

.sign-in-edit-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.resolve-warning-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.time-resolution-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.time-resolution-card {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(160px, 0.75fr) auto;
  gap: 0.65rem;
  align-items: end;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 0.65rem;
  background: #fff7ed;
}

.time-resolution-copy {
  display: grid;
  gap: 0.15rem;
}

.pending-resolution {
  color: #047857;
  font-size: 0.78rem;
  font-weight: 800;
}

.resolved-resolution-card {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.danger-text-button {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff;
  font-weight: 800;
}

.danger-text-button:hover,
.danger-text-button:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
}

.time-resolution-note {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 750;
}

.time-resolution-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.attendance-edit-row.absence-edit-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fbfcfd;
}

.absence-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.absence-edit-head strong {
  font-size: 0.9rem;
}

.absence-edit-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 0.65rem;
}

.attendance-edit-row .notes-field textarea {
  min-height: 64px;
}

.absence-edit-row .notes-field {
  width: 100%;
}

@media (max-width: 760px) {
  .attendance-edit-row,
  .sign-in-edit-main,
  .time-resolution-card,
  .attendance-edit-row.absence-edit-row,
  .absence-datetime-row,
  .absence-datetime-group,
  .absence-meta-row,
  .absence-edit-main,
  .absence-edit-times {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .attendance-edit-row .icon {
    justify-self: start;
  }
}

.empty-state {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--muted);
  background: #fbfcfd;
}

.warning-box {
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fffbeb;
  color: var(--ink);
}

.warning-box p {
  margin: 0.35rem 0 0.55rem;
}

.review-question {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) minmax(90px, auto);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: #f8fafb;
}

.review-question input[type="range"] {
  width: 100%;
}

.leave-type-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.leave-type-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 0.7rem;
}

.leave-type-card-main {
  display: grid;
  gap: 0.45rem;
  align-items: start;
}

.leave-type-card-main strong {
  color: var(--ink);
}

.leave-type-card .pill {
  justify-self: start;
}

.leave-type-card .icon-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.pay-group-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: start;
}

.pay-group-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 0.55rem;
}

.pay-group-card-main {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.pay-group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.pay-group-card-main strong {
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.pay-group-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.pay-group-rates span {
  white-space: nowrap;
}

.pay-group-card .icon-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.pay-group-modal .modal-body {
  gap: 0.35rem;
  padding-top: 0.15rem;
  padding-bottom: 0.25rem;
}

.pay-group-modal .pay-group-form {
  gap: 0.4rem;
}

.pay-group-modal .pay-group-form > .outlined-subsection {
  padding: 0.45rem 0.5rem;
  gap: 0.25rem;
}

.pay-group-modal .pay-group-form > .outlined-subsection h3 {
  margin: 0;
  font-size: 0.88rem;
}

.pay-group-modal .compact-note {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.18;
}

.pay-group-modal .compact-fields {
  gap: 0.3rem 0.4rem;
}

.pay-group-modal .pay-group-form label {
  gap: 0.2rem;
  font-size: 0.78rem;
}

.pay-group-modal .pay-group-form input {
  min-height: 34px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.pay-group-modal .modal-actions {
  padding-top: 0.35rem;
}

.band-progression-form {
  display: grid;
  gap: 0.85rem;
}

.band-progression-panel {
  width: min(760px, 100%);
}

.band-progression-panel > h2 {
  margin-bottom: 0.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.band-progression-section {
  display: grid;
  gap: 0.7rem;
  border: 1px solid rgba(173, 117, 181, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(173, 117, 181, 0.075), rgba(255, 255, 255, 0.96) 3.4rem);
  padding: 0.75rem;
  box-shadow: 0 8px 20px rgba(66, 52, 86, 0.035);
}

.band-progression-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: -0.2rem -0.2rem 0;
  padding: 0.15rem 0.2rem 0.5rem;
  border-bottom: 1px solid rgba(173, 117, 181, 0.2);
  color: var(--ink);
  font-size: 0.98rem;
}

.band-progression-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: rgba(173, 117, 181, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
  line-height: 1;
}

.band-progression-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.billing-rate-history {
  max-width: 100%;
}

.billing-rate-history table {
  font-size: 0.78rem;
}

.billing-rate-history th,
.billing-rate-history td {
  padding: 0.42rem 0.45rem;
  vertical-align: top;
}

.billing-rate-history th:first-child,
.billing-rate-history td:first-child {
  white-space: nowrap;
}

.billing-rate-set-cell {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.billing-rate-set-cell span {
  white-space: nowrap;
}

.settings-table-heading h3 {
  margin: 0;
  font-size: 0.9rem;
}

.band-progression-card {
  display: grid;
  gap: 0.45rem;
  align-items: start;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  border-left: 3px solid rgba(173, 117, 181, 0.42);
  background: #fff;
  padding: 0.6rem;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(66, 52, 86, 0.035);
}

.band-progression-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid rgba(208, 217, 226, 0.72);
}

.band-progression-card-head strong,
.band-progression-card > strong {
  color: var(--ink);
}

.band-progression-fields {
  display: grid;
  gap: 0.4rem;
}

.band-progression-fields label {
  gap: 0.2rem;
}

.band-progression-fields input {
  min-height: 34px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.band-progression-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.band-progression-value strong {
  color: var(--ink);
  font-size: 0.9rem;
  text-align: right;
}

.probation-general-values {
  max-width: 620px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.probation-general-values label {
  min-width: 0;
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.input-with-suffix input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.input-with-suffix span {
  padding: 0 0.7rem;
  color: var(--muted);
  font-weight: 700;
  border-left: 1px solid var(--line);
}

.progression-rule-summary {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.progression-rule-summary span:not(.muted) {
  color: var(--ink);
}

.progression-rule-modal {
  width: min(760px, calc(100vw - 2rem));
}

.progression-rule-builder {
  display: grid;
  gap: 0.45rem;
}

.progression-condition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  background: #fff;
}

.progression-condition-row label {
  min-width: 130px;
  flex: 1 1 130px;
}

.progression-condition-row label:has(input[type="number"]) {
  flex: 0 0 88px;
  min-width: 88px;
}

.progression-condition-row .custom-select {
  min-width: 0;
}

.review-question-card-list {
  display: grid;
  gap: 0.45rem;
}

.pay-band-card-list {
  display: grid;
  gap: 0.55rem;
}

.pay-band-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.review-question-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 0.45rem 0.6rem;
  transition: box-shadow 140ms ease, background 140ms ease;
}

.review-question-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.review-question-card-head strong {
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.question-card-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  white-space: nowrap;
}

.review-question-card .icon-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.review-question-modal .outlined-subsection {
  gap: 0.45rem;
}

.review-question-modal .outlined-subsection h3,
.review-question-modal .compact-note {
  margin: 0;
}

.review-question-modal .question-text-field textarea {
  min-height: 84px;
  resize: vertical;
}

.review-question-modal .modal-bottom-error {
  margin: 0.25rem 0 0;
}

.question-band-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.question-band-picker .checkbox {
  margin: 0;
  white-space: nowrap;
}

.review-question-card.reordering {
  grid-template-columns: auto minmax(0, 1fr) auto;
  cursor: grab;
}

.review-question-card.reordering:hover {
  box-shadow: 0 8px 18px rgba(66, 52, 86, 0.08);
}

.review-question-card.reordering:active {
  cursor: grabbing;
}

.review-question-card.dragging {
  opacity: 0.35;
  background: rgba(248, 250, 251, 0.55);
  border-style: dashed;
  box-shadow: none;
}

.drag-handle {
  width: 28px;
  min-height: 28px;
  padding: 0;
  cursor: grab;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.drag-handle:not(:disabled):hover,
.drag-handle:not(:disabled):focus-visible {
  color: var(--accent-strong);
  background: rgba(173, 117, 181, 0.08);
  border-color: rgba(173, 117, 181, 0.25);
  box-shadow: none;
}

.drag-handle:active {
  cursor: grabbing;
}

@media (max-width: 720px) {
  .leave-type-card-list,
  .pay-group-card-list {
    grid-template-columns: 1fr;
  }

  .band-progression-card-grid {
    grid-template-columns: 1fr;
  }

  .review-question-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .question-card-meta {
    flex-wrap: wrap;
    white-space: normal;
  }
}

.subpanel {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.subpanel h3 {
  font-size: 0.95rem;
}

.staff-attendance-settings form > .subpanel:first-child {
  border-top: 0;
  padding-top: 0;
}

.staff-attendance-settings,
.staff-attendance-settings > form {
  gap: 0.55rem;
}

.staff-attendance-settings form > .subpanel:first-child h3 {
  margin-top: 0;
}

.visibility-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(31, 41, 51, 0.42);
}

.modal {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal.panel {
  padding: 0;
  gap: 0;
}

.modal.panel > :not(.panel-head):not(h2:first-child) {
  margin-left: 1rem;
  margin-right: 1rem;
  width: calc(100% - 2rem);
  max-width: calc(100% - 2rem);
}

.modal.panel > :last-child {
  margin-bottom: 1rem;
}

.modal-body-shell {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.modal-body {
  display: grid;
  gap: 0.85rem;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 0.15rem 0 0.35rem;
  scroll-padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.modal-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal-scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 30px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.modal-scroll-indicator--top {
  top: 0;
  background: radial-gradient(ellipse 72% 30px at 50% 0%, rgba(107, 114, 128, 0.24) 0%, rgba(107, 114, 128, 0.13) 38%, rgba(107, 114, 128, 0) 76%);
}

.modal-scroll-indicator--bottom {
  bottom: 0;
  background: radial-gradient(ellipse 72% 30px at 50% 100%, rgba(107, 114, 128, 0.24) 0%, rgba(107, 114, 128, 0.13) 38%, rgba(107, 114, 128, 0) 76%);
}

.modal-body-shell.can-scroll-up .modal-scroll-indicator--top,
.modal-body-shell.can-scroll-down .modal-scroll-indicator--bottom {
  opacity: 1;
}

.modal-scroll-arrow {
  position: relative;
  z-index: 2;
  display: inline-block;
  color: rgba(173, 117, 181, 0.72);
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  animation: modal-scroll-pulse 1.8s ease-in-out infinite;
}

@keyframes modal-scroll-pulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.82;
  }

  50% {
    transform: translateY(2px);
    opacity: 1;
  }
}

.modal > .modal-actions,
.modal > .modal-footer,
.modal > .actions {
  padding-top: 0.75rem;
  border-top: 0;
  background: var(--paper);
  box-sizing: border-box;
}

.modal > .panel-head,
.modal.panel > h2:first-child {
  margin: 0;
  padding: 1rem;
  min-width: 0;
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(173, 117, 181, 0.18) 0%, rgba(173, 117, 181, 0.09) 56%, rgba(173, 117, 181, 0) 100%),
    var(--paper);
}

.modal > .panel-head h2,
.modal.panel > h2:first-child {
  color: var(--accent-strong);
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal > .panel-head > button[title="Close"] {
  display: none;
}

.modal.small {
  width: min(460px, 100%);
}

.large-modal {
  width: min(920px, calc(100vw - 2rem));
}

.review-attendance-modal {
  width: min(1100px, calc(100vw - 2rem));
}

.review-create-modal,
.review-create-modal .modal-body-shell,
.review-create-modal .modal-body {
  overflow: visible;
}

.changed-cell {
  display: inline-flex;
  min-width: 44px;
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  background: #fef3c7;
  color: var(--warn);
  font-weight: 800;
}

.attendance-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.25rem 0.45rem;
  min-height: 2rem;
  border: 1px dotted rgba(97, 112, 125, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.compact-modal-key {
  flex-wrap: nowrap;
  gap: 0.3rem;
  overflow-x: auto;
  padding-top: 0.55rem;
  font-size: 0.72rem;
  scrollbar-width: none;
}

.compact-modal-key::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.compact-modal-key .key-item {
  min-height: 28px;
  padding: 0.16rem 0.34rem;
  gap: 0.22rem;
  border-radius: 7px;
}

.compact-modal-key .pill,
.compact-modal-key .key-sample,
.compact-modal-key .key-swatch,
.compact-modal-key .today-key-sample {
  min-height: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
}

.compact-modal-key .pill {
  padding-top: 0.02rem;
  padding-bottom: 0.02rem;
}

.compact-modal-key .today-key-sample {
  min-width: 22px;
}

.key-label {
  color: var(--ink);
  margin-right: 0.1rem;
}

.key-swatch {
  display: inline-flex;
  min-width: 20px;
  justify-content: center;
}

.key-sample {
  min-width: auto;
  padding: 0.04rem 0.25rem;
}

.child-key-sample {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0.04rem 0.3rem;
  border-radius: 6px;
  font-weight: 800;
}

.child-imported-sample {
  color: #15803d;
  background: #f0fdf4;
}

.today-key-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  border: 1px solid rgba(173, 117, 181, 0.58);
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(173, 117, 181, 0.14), 0 6px 14px rgba(173, 117, 181, 0.12);
  color: var(--ink);
  background: white;
  font-weight: 800;
}

.schedule-history {
  overflow-x: auto;
}

.schedule-history table {
  min-width: 980px;
}

.schedule-history th,
.schedule-history td {
  white-space: nowrap;
}

.audit-table {
  position: relative;
  z-index: 5;
  overflow: visible;
}

.audit-table table {
  min-width: 760px;
}

.audit-table th:first-child,
.audit-table td:first-child {
  width: 9.5rem;
  white-space: nowrap;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2),
.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  white-space: nowrap;
}

.audit-table td:last-child {
  min-width: 18rem;
}

@media (max-width: 820px) {
  .section-header {
    flex-direction: column;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .child-detail-grid,
  .staff-edit-layout,
  .session-day-list,
  .session-day-cards,
  .session-day-row,
  .section-header,
  .term-card-grid,
  .closed-day-card,
  .closed-day-card.editing,
  .review-question,
  .split,
  .staff-detail-sections {
    grid-template-columns: 1fr;
  }

  .summary-lower-layout {
    grid-template-columns: 1fr;
  }

  .child-detail-grid {
    grid-template-areas: none;
  }

  .child-detail-grid > *,
  .child-parent-card,
  .child-session-card,
  .child-billing-card {
    grid-area: auto;
  }

  .list-count {
    justify-self: start;
  }

  .pager {
    align-items: flex-start;
    flex-direction: column;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
