:root {
  color: #1d252d;
  background: #f5f7f4;
  font-family: Inter, "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 6px;
  background: #ffffff;
  color: #0f766e;
  padding: 10px 14px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #0b6fa4;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #65707a;
  font-size: 0.9rem;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 2.35rem;
}

.title-with-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.help-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #9fb0aa;
  border-radius: 999px;
  padding: 0 13px;
  background: #ffffff;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

h2 {
  font-size: 1.05rem;
}

.mode-button,
.editor-button,
.primary,
.secondary,
.danger,
.period-nav button,
.segmented button {
  border: 1px solid #c8d1cf;
  background: #ffffff;
  color: #1d252d;
  border-radius: 8px;
}

.mode-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.header-button {
  min-height: 40px;
  padding: 0 14px;
}

.account-button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 12px;
  text-align: left;
}

.account-button strong {
  font-size: 0.9rem;
}

.account-button span {
  color: #65707a;
  font-size: 0.72rem;
}

.editor-button {
  min-height: 36px;
  padding: 0 14px;
}

.editor-button.active {
  background: #27313a;
  border-color: #27313a;
  color: white;
}

.mode-button.active,
.primary {
  background: #0f766e;
  border-color: #0f766e;
  color: white;
}

.secondary {
  background: #ffffff;
}

.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

.toolbar,
.panel {
  border: 1px solid #d9e0dd;
  background: #ffffff;
  border-radius: 8px;
}

.toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 12px;
  margin-bottom: 16px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 64px 64px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  min-width: 64px;
  min-height: 36px;
  border: 0;
  border-radius: 0;
}

.segmented .selected {
  background: #e5f3ef;
  color: #0f766e;
  font-weight: 700;
}

.executive-tabs,
.executive-menu-actions,
.approval-tabs {
  display: grid;
  grid-template-columns: 120px 150px;
  gap: 8px;
}

.executive-tabs button,
.executive-menu-actions button,
.approval-tabs button,
.executive-menu button {
  min-height: 38px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  color: #1d252d;
  font-weight: 800;
}

.approval-tabs {
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  max-width: 650px;
  margin-top: 12px;
}

.executive-tabs .selected,
.approval-tabs .selected {
  border-color: #0f766e;
  background: #e5f3ef;
  color: #0f766e;
}

.executive-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 20px;
  width: min(1040px, 100%);
  margin: 16px auto 0;
}

.executive-menu button {
  min-height: 96px;
  font-size: 1.05rem;
}

.period-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
}

.period-nav button {
  width: 36px;
  height: 36px;
}

.period-nav .period-range {
  width: auto;
  min-width: 220px;
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 0 12px;
  font-weight: 800;
  text-align: center;
}

.period-nav button.period-range {
  width: auto;
  height: 36px;
}

.period-nav .period-range:hover,
.period-nav .period-range:focus-visible {
  border-color: #c8d1cf;
  background: #ffffff;
}

.period-picker-control {
  position: relative;
  display: inline-grid;
}

.availability-save-status {
  min-width: 180px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.availability-save-status:not(:empty) {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: auto;
  min-width: 0;
  border: 1px solid #86d1b4;
  border-radius: 8px;
  background: #e7f7ef;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  text-align: left;
}

.notice,
.loading {
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff7db;
  color: #6b4d00;
}

.edit-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #ffffff;
}

.edit-actions span {
  color: #65707a;
  font-size: 0.86rem;
}

.edit-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  border: 1px solid #d9e0dd;
  background: #d9e0dd;
  gap: 1px;
  overflow-x: auto;
}

.month-head,
.month-cell {
  background: #ffffff;
}

.month-head {
  min-height: 38px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.month-cell {
  min-height: 132px;
  padding: 10px;
}

.month-cell.today,
.week-head.today {
  background: #e0f2fe;
}

.day-slot-cell.today {
  background: #b9dceb;
}

.month-date {
  font-weight: 800;
  margin-bottom: 8px;
}

.room-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid #bfddd5;
  background: #eef9f5;
  border-radius: 6px;
}

.room-chip.unavailable {
  color: #4b5563;
  border-color: #b8c0c8;
  background: #e5e7eb;
}

.month-room {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.month-room .room-chip {
  margin-top: 0;
}

.month-request {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 30px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fff3c4;
  color: #7a4a00;
  padding: 5px 7px;
  text-align: left;
}

.month-request:hover {
  border-color: #d97706;
  background: #ffe8a3;
}

.approve-mini,
.reject-mini {
  min-width: 32px;
  min-height: 28px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
}

.approve-mini {
  border: 1px solid #0f766e;
  background: #d8f3e7;
  color: #064e3b;
}

.reject-mini {
  border: 1px solid #ef4444;
  background: #fee2e2;
  color: #991b1b;
}

.month-request span {
  font-size: 0.7rem;
}

.month-request strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-editor-chip.unavailable {
  color: #991b1b;
  border-color: #ef4444;
  background: #fee2e2;
}

.availability-editor-chip.availability-partial {
  color: #7a4a00;
  border-color: #f59e0b;
  background: #fff3c4;
}

.month-edit-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.month-edit-row .room-chip {
  margin-top: 0;
}

.month-room-label {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 6px;
  color: #065f46;
  background: #d8f3e7;
  font-size: 0.62rem;
  font-weight: 800;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.month-room-label.availability-all {
  color: #065f46;
  background: #d8f3e7;
}

.month-room-label.unavailable,
.month-room-label.availability-none {
  color: #991b1b;
  background: #fee2e2;
}

.month-room-label.availability-partial {
  color: #7a4a00;
  background: #fff3c4;
}

.month-room-label.availability-standard {
  color: #1e40af;
  background: #dbeafe;
}

.reservation-calendar {
  --calendar-time-width: 92px;
  --calendar-day-width: 176px;
  --calendar-grid-gap: 1px;
  --calendar-head-height: 48px;
  --calendar-head-padding: 8px;
  --calendar-head-font: 16px;
  --calendar-room-gap: 6px;
  --calendar-room-margin: 4px;
  --calendar-room-font: 13.12px;
  --calendar-row-height: 70px;
  --calendar-short-row-height: 34px;
  --calendar-time-padding: 10px;
  --calendar-time-font: 12.8px;
  --calendar-slot-height: 34px;
  --calendar-slot-minute-width: 24px;
  --calendar-slot-padding: 2px;
  --calendar-minute-padding: 1px;
  --calendar-slot-font: 10.88px;
  --calendar-minute-font: 9.28px;
  --calendar-carryout-border: 4px;
  --calendar-selected-border: 3px;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  overflow-x: auto;
  padding: 8px 2px;
  color: #52606b;
  font-size: 0.74rem;
  scrollbar-width: thin;
  white-space: nowrap;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.legend-swatch {
  width: 13px;
  height: 13px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.legend-swatch.available {
  background: #f8fffc;
  border-color: #86d1b4;
}

.legend-swatch.unavailable {
  background: #e2e6ea;
  border-color: #aab4bd;
}

.legend-swatch.approved {
  background: #d8f3e7;
  border-color: #0f766e;
}

.legend-swatch.pending {
  background: #fff3c4;
  border-color: #f59e0b;
}

.legend-swatch.cancel-pending {
  background: #fee2e2;
  border-color: #ef4444;
}

.legend-swatch.session {
  background: #e0f2fe;
  border-color: #0284c7;
}

.legend-swatch.carryout {
  background: #fee2e2;
  border-color: #b91c1c;
}

.week-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #d9e0dd;
  user-select: none;
}

.week-scaler {
  position: relative;
  width: max-content;
}

.week-grid {
  display: grid;
  grid-template-columns: var(--calendar-time-width) repeat(var(--calendar-day-count), var(--calendar-day-width));
  gap: var(--calendar-grid-gap, 1px);
  width: max-content;
  /* Transform is supported on mobile browsers and applies one identical ratio
     to columns, rows, text, borders, and the two fixed indices. */
  transform: scale(var(--calendar-zoom, 1));
  transform-origin: top left;
}

.corner,
.week-head,
.time-label,
.slot {
  background: #ffffff;
}

.corner,
.week-head {
  position: sticky;
  top: 0;
  z-index: 6;
}

.corner {
  left: 0;
  z-index: 8;
  min-height: 48px;
  display: grid;
  place-items: center;
}

.calendar-head-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 8;
}

/* Keep the time index outside the transformed matrix.  Sticky positioning can
   then pin this single layer to the left edge without scroll-time scripting. */
.calendar-time-index {
  position: sticky;
  left: 0;
  z-index: 10;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.calendar-time-index-inner {
  width: var(--calendar-time-width);
  transform: scale(var(--calendar-zoom, 1));
  transform-origin: top left;
}

.calendar-time-index-corner {
  min-height: var(--calendar-index-head-height, var(--calendar-head-height, 48px));
  background: #ffffff;
  border-right: 1px solid #d9e0dd;
  border-bottom: 1px solid #d9e0dd;
}

.calendar-time-index-inner .time-label {
  position: static;
  z-index: auto;
}

.week-grid > .corner,
.week-grid > .time-label {
  visibility: hidden;
}

.calendar-jump {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  color: #27313a;
}

.week-head {
  min-height: var(--calendar-head-height, 48px);
  padding: var(--calendar-head-padding, 8px);
}

.availability-editor-week .corner,
.availability-editor-week .week-head {
  min-height: 116px;
}

.week-head strong {
  display: block;
}

.reservation-calendar .week-head > strong {
  font-size: var(--calendar-head-font);
}

.room-head-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--calendar-room-gap, 6px);
  margin-top: var(--calendar-room-margin, 4px);
}

.room-head {
  min-width: 0;
}

.room-head span {
  display: block;
  color: #65707a;
  font-size: var(--calendar-room-font, 0.82rem);
  font-weight: 700;
  text-align: center;
}

.month-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.month-shortcuts .toggle-row {
  display: contents;
}

.month-shortcuts .shortcut-row {
  display: contents;
}

.month-shortcuts .shortcut-row button,
.month-shortcuts .toggle-row button {
  width: 100%;
  min-height: 28px;
  border-radius: 7px;
  font-size: clamp(0.46rem, 0.58vw, 0.56rem);
  font-weight: 800;
  line-height: 1;
  padding: 0 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.toggle-row {
  display: grid;
  grid-template-columns: 28px 28px;
  gap: 4px;
}

.toggle-row button {
  min-height: 24px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0;
}

.toggle-row button:first-child {
  border-color: #86d1b4;
  color: #0f766e;
}

.toggle-row button:nth-child(2) {
  border-color: #fca5a5;
  color: #991b1b;
}

.shortcut-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 0;
}

.shortcut-row button {
  min-width: 0;
  min-height: 24px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
  color: #27313a;
  font-size: 0.7rem;
  padding: 0 4px;
}

.time-label {
  position: sticky;
  left: 0;
  z-index: 1;
  min-height: var(--calendar-row-height, 70px);
  display: flex;
  align-items: center;
  padding: 0 var(--calendar-time-padding, 10px);
  font-size: var(--calendar-time-font, 0.8rem);
  color: #52606b;
}

.time-label.before-nine,
.day-slot-cell.before-nine {
  min-height: var(--calendar-short-row-height, 34px);
}

.time-label.hour-even {
  background: #ffffff;
}

.time-label.hour-odd {
  background: #f6f8fb;
}

.day-slot-cell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--calendar-grid-gap, 1px);
  background: #d9e0dd;
}

.day-slot-cell.hour-even {
  background: #d9e0dd;
}

.day-slot-cell.hour-odd {
  background: #cfd8df;
}

.room-slot-stack {
  display: grid;
  grid-auto-rows: minmax(var(--calendar-slot-height, 34px), 1fr);
  gap: var(--calendar-grid-gap, 1px);
  background: #d9e0dd;
  align-content: stretch;
}

.slot {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  align-self: stretch;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 0;
  font-size: 0.7rem;
  color: #244037;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 2px;
  padding: 0 4px 0 2px;
  text-align: left;
  touch-action: auto;
}

.slot span {
  color: #718079;
  font-size: 0.68rem;
}

.slot strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
}

.reservation-calendar .slot {
  position: relative;
  grid-template-columns: var(--calendar-slot-minute-width) minmax(0, 1fr);
  gap: 0;
  min-height: var(--calendar-slot-height);
  padding: 0;
}

.slot-minute,
.slot-main {
  min-width: 0;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.slot-minute {
  display: grid;
  align-items: center;
  justify-content: start;
  padding-left: var(--calendar-minute-padding, 1px);
  color: #718079;
  font-size: var(--calendar-minute-font, 0.58rem);
  line-height: 1;
}

.slot-main {
  display: grid;
  align-items: center;
  padding: 0 var(--calendar-slot-padding, 2px);
  overflow: hidden;
  text-align: left;
  touch-action: auto;
}

.slot-main strong {
  width: 100%;
}

.reservation-calendar .slot-main strong {
  font-size: var(--calendar-slot-font);
}

.carryout-marker {
  position: static;
  z-index: 1;
  padding-left: 1px;
  background: #fecaca;
  color: #991b1b;
  font-weight: 900;
  touch-action: pan-x pan-y;
}

.reservation-calendar .slot.has-carryout {
  border-left: var(--calendar-carryout-border) solid #b91c1c;
}

.carryout-marker:hover,
.carryout-marker:focus-visible {
  background: #fca5a5;
}

.slot:disabled {
  cursor: default;
  opacity: 1;
}

.slot.available {
  background: #f8fffc;
}

.slot.available.hour-odd {
  background: #f1f6fb;
}

.slot.pending {
  background: #fff3c4;
  color: #7a4a00;
  border-left: 4px solid #f59e0b;
}

.slot.cancel_pending {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.slot.approved {
  background: #d8f3e7;
  color: #064e3b;
  border-left: 4px solid #0f766e;
}

.slot.category-session {
  background: #e0f2fe;
  color: #075985;
  border-left-color: #0284c7;
}

.slot.category-session.pending {
  border-left-color: #f59e0b;
}

.slot.category-session.cancel_pending {
  border-left-color: #ef4444;
}

.slot.unavailable {
  background: #e2e6ea;
  border: 1px solid #c0c8cf;
  color: #7b858d;
  font-weight: 600;
}

.slot.unavailable-session {
  background: #fde68a;
  border: 1px solid #f59e0b;
  color: #7a4a00;
}

.availability-editor-slot.unavailable {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.slot.officer-editable {
  cursor: crosshair;
}

.slot.officer-editable:hover {
  outline: 2px solid #111827;
  outline-offset: -2px;
}

.slot-main.selected {
  color: #064e3b;
  font-weight: 800;
}

.slot.selection-active {
  position: relative;
  z-index: 2;
  outline: 3px solid #0f766e;
  outline-offset: -3px;
  background: #bdebdc;
  background-image: none;
  color: #064e3b;
  box-shadow: inset 0 0 0 1px #0f766e;
  font-weight: 800;
}

.slot.selection-active .slot-minute {
  color: #064e3b;
  font-weight: 800;
}

.slot.selection-active .carryout-marker {
  background: transparent;
  color: #064e3b;
}

.reservation-calendar .slot.has-carryout.selection-active {
  border-left-color: #0f766e;
}

.slot.available.hour-odd.selection-active {
  background: #acdccc;
}

.slot.available {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

[data-selectable-slot]:not(.selected):focus:not(:focus-visible) {
  outline: none;
}

.carryout-slot-dialog {
  width: min(560px, 100%);
}

.carryout-slot-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.carryout-slot-entry {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid #f1aaaa;
  border-radius: 7px;
  background: #fff7f7;
  color: #4b2525;
  padding: 10px 12px;
  text-align: left;
}

.carryout-slot-entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.carryout-equipment-list {
  color: #7f1d1d;
  font-weight: 700;
}

body.reservation-range-selecting {
  overscroll-behavior: none;
}

body.reservation-selection-cooldown [data-selectable-slot] {
  pointer-events: none;
}

.slot.officer-selected {
  outline: 3px solid #374151;
  outline-offset: -3px;
}

.slot.officer-selected.available {
  background: #e5e7eb;
}

.slot.officer-selected.unavailable {
  background: #eef8f2;
  color: #166534;
}

.panel {
  margin-top: 16px;
  padding: 16px;
}

.reservation-form {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.4fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.reservation-dialog .reservation-form {
  grid-template-columns: minmax(0, 1fr);
}

.auth-dialog .reservation-form {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.custom-session-grid {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #d9e0dd;
}

.custom-grid-head,
.custom-time-label {
  display: grid;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  background: #f6f8fb;
  color: #52606b;
  font-size: 0.76rem;
  font-weight: 800;
}

.custom-time-label {
  background: #ffffff;
  font-size: 0.72rem;
}

.custom-session-grid .custom-slot {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  font-size: 0.74rem;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 3px;
  padding: 0 7px 0 4px;
  text-align: left;
}

.custom-session-grid .custom-slot small {
  color: #718079;
  font-size: 0.66rem;
  font-weight: 700;
}

.custom-session-grid .custom-slot span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-session-grid .custom-slot.session-slot {
  background: #ffffff;
  color: #52606b;
}

.custom-session-grid .custom-slot.session-active {
  background: #fde68a;
  color: #7a4a00;
  font-weight: 800;
}

.custom-session-grid .custom-slot.session-selected {
  outline: 3px solid #d97706;
  outline-offset: -3px;
}

.custom-time-label.hour-even,
.custom-session-grid .custom-slot.hour-even {
  background-color: #ffffff;
}

.custom-time-label.hour-odd,
.custom-session-grid .custom-slot.hour-odd {
  background-color: #f6f8fb;
}

.custom-session-grid .custom-slot.available.hour-even {
  background: #eef9f5;
}

.custom-session-grid .custom-slot.available.hour-odd {
  background: #e5f4ee;
}

.custom-session-grid .custom-slot.unavailable.hour-even {
  background: #fee2e2;
}

.custom-session-grid .custom-slot.unavailable.hour-odd {
  background: #fbd7d7;
}

.custom-session-grid .custom-slot.session-active.hour-odd,
.custom-session-grid .custom-slot.session-active.hour-even {
  background: #fde68a;
}

.session-form {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(150px, 1.1fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(160px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.session-list {
  display: grid;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #edf1ef;
  border-radius: 8px;
  overflow-x: auto;
}

.session-row {
  display: grid;
  grid-template-columns: 118px 84px 72px minmax(160px, 1fr) 64px;
  gap: 10px;
  align-items: center;
  min-width: 560px;
  min-height: 42px;
  padding: 8px 10px;
  background: #ffffff;
}

.reservation-dialog .dialog-actions {
  margin-top: 4px;
}

.selected-slot {
  margin: 0;
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  color: #52606b;
  font-size: 0.86rem;
}

input,
select {
  min-height: 40px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
}

.primary {
  min-height: 40px;
  padding: 0 14px;
}

.empty-text {
  margin: 12px 0 0;
  color: #65707a;
}

.officer-panel {
  display: block;
}

.approve-all {
  margin-top: 12px;
}

.pending-list {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  border: 1px solid #edf1ef;
  border-radius: 8px;
  overflow-x: auto;
}

.pending-row {
  display: grid;
  grid-template-columns: 112px 82px minmax(150px, 1.2fr) minmax(120px, 0.8fr) 88px 70px 58px 58px;
  gap: 10px;
  align-items: center;
  min-width: 900px;
  min-height: 52px;
  padding: 8px 10px;
  background: #ffffff;
  cursor: pointer;
}

.reservation-list-row {
  grid-template-columns: 112px 82px minmax(160px, 1fr) minmax(120px, 0.75fr) 90px 70px minmax(160px, 1fr);
  min-width: 980px;
}

.member-reservation-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.member-reservation-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(240px, 1.5fr) minmax(130px, auto);
  align-items: center;
  gap: 18px;
  border: 1px solid #d9e0dd;
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: #ffffff;
  padding: 13px 16px;
  color: #1d252d;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.member-reservation-card:hover {
  border-color: #9dc8bd;
  background: #f8fcfa;
  box-shadow: 0 5px 16px rgba(15, 118, 110, 0.08);
}

.member-reservation-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
}

.member-reservation-time,
.member-reservation-summary,
.member-reservation-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.member-reservation-time strong {
  font-size: 0.82rem;
}

.member-reservation-time > span {
  color: #0f766e;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.member-reservation-summary > strong,
.member-reservation-summary > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-reservation-summary > span:last-child {
  color: #65707a;
  font-size: 0.78rem;
}

.member-reservation-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reservation-room-badge,
.reservation-status-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 800;
}

.reservation-room-badge {
  background: #eef1f3;
  color: #52606b;
}

.reservation-status-pending {
  background: #fff3c4;
  color: #7a4a00;
}

.reservation-status-approved {
  background: #d8f3e7;
  color: #065f46;
}

.reservation-status-cancel_pending {
  background: #fee2e2;
  color: #991b1b;
}

.member-reservation-meta {
  grid-template-columns: auto auto 20px;
  align-items: center;
  justify-content: end;
  color: #65707a;
  font-size: 0.74rem;
  white-space: nowrap;
}

.member-reservation-arrow {
  color: #0f766e;
  font-size: 1.6rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .member-reservation-card {
    grid-template-columns: minmax(118px, auto) minmax(0, 1fr);
    gap: 10px 14px;
    padding: 12px;
  }

  .member-reservation-meta {
    grid-column: 1 / -1;
    justify-content: start;
    border-top: 1px solid #edf1ef;
    padding-top: 8px;
  }
}

.pending-row:hover {
  background: #f6f8fb;
}

.pending-row:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: -2px;
}

.pending-row strong,
.pending-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-row > span:nth-child(4) {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.audit-log-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid #d9e0dd;
  border-radius: 10px;
}

.audit-log-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.78rem;
}

.audit-log-table th,
.audit-log-table td {
  border-bottom: 1px solid #edf1ef;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.audit-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8fb;
  color: #52606b;
  white-space: nowrap;
}

.audit-log-table td span:not(.audit-event) {
  color: #65707a;
  font-size: 0.72rem;
}

.audit-event {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef1f3;
  color: #52606b;
  font-weight: 800;
  white-space: nowrap;
}

.audit-event-application,
.audit-event-cancellation_application {
  background: #fff3c4;
  color: #7a4a00;
}

.audit-event-approval {
  background: #d8f3e7;
  color: #065f46;
}

.audit-event-rejection,
.audit-event-cancellation_approval,
.audit-event-withdrawal {
  background: #fee2e2;
  color: #991b1b;
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 12;
  width: 300px;
  transform: translateX(-50%);
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
}

.date-picker-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.date-picker-head strong {
  text-align: center;
}

.date-picker-head button,
.date-picker-grid button,
.date-picker-actions button {
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
}

.date-picker-head button {
  height: 34px;
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-picker-weekday {
  color: #65707a;
  font-size: 0.74rem;
  text-align: center;
}

.date-picker-grid button {
  height: 34px;
  padding: 0;
}

.date-picker-grid button.muted {
  color: #a7b0b8;
  background: #f6f8fb;
}

.date-picker-grid button.today {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.date-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.date-picker-actions button {
  min-height: 32px;
  padding: 0 12px;
}

.approval-row {
  display: grid;
  grid-template-columns: 190px 120px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  border-top: 1px solid #edf1ef;
}

.approval-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.26);
}

.dialog {
  width: min(460px, 100%);
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #f5f7f4;
}

.auth-card {
  width: min(520px, 100%);
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}

.auth-dialog {
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.auth-card h1 {
  margin-bottom: 24px;
  font-size: 1.7rem;
}

.auth-card h2 {
  display: none;
}

.auth-card .form-field-group h2 {
  display: block;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
}

.form-field-group {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.form-field-group > h2,
.form-field-group > h3,
.form-field-group > .role-fieldset,
.form-field-group > .binary-field,
.form-field-group > .section-note {
  grid-column: 1 / -1;
}

.form-field-group > h2,
.form-field-group > h3 {
  margin: 0;
  color: #27313a;
  font-size: 0.92rem;
}

.optional-field-group {
  margin-top: 4px;
  border-top: 1px solid #d9e0dd;
  padding-top: 16px;
}

.auth-card .form-field-group,
.auth-dialog .form-field-group {
  grid-template-columns: 1fr;
}

.auth-card .title-with-help {
  margin-bottom: 24px;
}

.auth-card .title-with-help h1 {
  margin-bottom: 0;
}

.required-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.required-mark {
  color: #c81e1e;
  font-weight: 900;
}

.custom-availability-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.custom-slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 14px 0;
}

.custom-slot-grid.custom-session-grid {
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
}

.custom-slot {
  min-height: 34px;
  border: 1px solid #c8d1cf;
  border-radius: 7px;
  background: #ffffff;
  color: #27313a;
  font-size: 0.78rem;
  font-weight: 700;
}

.custom-slot.available {
  border-color: #86d1b4;
  background: #eef9f5;
  color: #0f766e;
}

.custom-slot.unavailable {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.custom-slot.officer-selected {
  outline: 3px solid #27313a;
  outline-offset: -3px;
}

input:disabled {
  color: #52606b;
  background: #f6f8fb;
}

.auth-rule {
  margin: 0;
  color: #65707a;
  font-size: 0.78rem;
}

.helptext,
.helptext ul {
  margin: 0;
  color: #65707a;
  font-size: 0.78rem;
}

.helptext ul {
  padding-left: 20px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #b91c1c;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.auth-switch {
  display: flex;
  justify-content: flex-start;
}

.auth-switch a {
  border: 0;
  background: transparent;
  color: #0f766e;
  font-weight: 700;
  padding: 0;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.request-detail {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 6px;
  background: #f6f8fb;
}

.request-detail span:first-child {
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  h1 {
    font-size: 1.75rem;
  }

  .auth-page {
    place-items: start center;
    padding: 18px 12px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .app-shell {
    width: min(100vw - 20px, 760px);
    padding-top: 14px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .reservation-form,
  .officer-panel,
  .approval-row,
  .edit-actions {
    grid-template-columns: 1fr;
  }

  .period-nav {
    position: static;
    transform: none;
    justify-content: space-between;
  }
}

a {
  color: inherit;
}

.message-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message-stack .notice {
  margin: 0;
}

.message-success {
  background: #e7f7ef;
  color: #065f46;
}

.message-error {
  background: #fee2e2;
  color: #991b1b;
}

.link-button,
.period-arrow,
.approval-tabs a,
.executive-menu-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.link-button {
  min-height: 38px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  padding: 0 14px;
}

.period-arrow {
  width: 36px;
  height: 36px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  font-size: 1.4rem;
}

.calendar-control {
  position: relative;
}

.native-date-picker {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.01;
  cursor: pointer;
  pointer-events: auto;
  font-size: 16px;
}

.page-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.approval-tabs a {
  min-height: 38px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
}

.approval-tabs a.selected {
  border-color: #0f766e;
  background: #e5f3ef;
  color: #0f766e;
}

.executive-menu-two {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.executive-menu-item {
  min-height: 150px;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.executive-menu-item strong {
  font-size: 1.05rem;
}

.executive-menu-item span,
.section-note {
  color: #65707a;
  font-size: 0.82rem;
}

.month-cell-empty {
  background: #f6f8fb;
}

.month-shortcuts > form,
.month-shortcuts > a {
  min-width: 0;
}

.month-shortcuts > form button,
.month-shortcuts > a {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
  color: #27313a;
  padding: 0 1px;
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.month-shortcuts > a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

dialog.dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

dialog.dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
}

.dialog-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #c8d1cf;
  border-radius: 50%;
  background: #ffffff;
  font-size: 1.2rem;
}

.detail-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.detail-list dt {
  color: #65707a;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.dialog-actions form {
  display: contents;
}

.field-error,
.errorlist {
  margin: 0;
  color: #b91c1c;
  font-size: 0.78rem;
}

.form-errors .errorlist {
  padding-left: 18px;
}

.auth-submit {
  width: 100%;
}

.auth-calendar-link {
  width: 100%;
  min-height: 44px;
}

.custom-availability-list {
  display: grid;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  overflow: hidden;
  background: #d9e0dd;
  user-select: none;
}

.custom-editor-heading {
  align-items: center;
}

.custom-editor-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  overflow: hidden;
}

.custom-editor-modes button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid #c8d1cf;
  border-radius: 0;
  background: #ffffff;
  color: #52606b;
  font-weight: 800;
}

.custom-editor-modes button:last-child {
  border-right: 0;
}

.custom-editor-modes button.selected {
  background: #27313a;
  color: #ffffff;
}

.custom-mode-note {
  margin: 14px 0 10px;
}

.custom-timeline {
  display: grid;
  gap: 1px;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  overflow: hidden;
  background: #d9e0dd;
  user-select: none;
}

.custom-timeline-head,
.custom-timeline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1px;
}

.custom-timeline-head span {
  min-height: 48px;
  display: grid;
  place-items: center;
  background: #f6f8fb;
  color: #52606b;
  font-size: 0.76rem;
  font-weight: 800;
}

.custom-timeline-time {
  min-height: 70px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #52606b;
  font-size: 0.78rem;
  font-weight: 700;
}

.custom-timeline-time.hour-even {
  background: #ffffff;
}

.custom-timeline-time.hour-odd {
  background: #f6f8fb;
}

.custom-timeline-row.before-nine .custom-timeline-time,
.custom-timeline-row.before-nine .custom-timeline-slot {
  min-height: 34px;
}

.custom-timeline-slots {
  display: grid;
  gap: 1px;
  background: #d9e0dd;
}

.custom-timeline-control {
  position: relative;
  min-width: 0;
}

.custom-timeline-slot {
  width: 100%;
  min-height: 34px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 0 4px 0 2px;
  cursor: crosshair;
}

.custom-timeline-slot strong {
  font-size: 0.68rem;
  font-weight: 700;
}

.custom-available-toggle.is-active {
  border-left: 4px solid #0f766e;
  background: #f8fffc;
  color: #065f46;
}

.custom-available-toggle.is-active.hour-odd {
  background: #f1f6fb;
}

.custom-available-toggle.is-inactive {
  border: 1px solid #c0c8cf;
  border-left: 4px solid #7b858d;
  background: #e2e6ea;
  color: #65707a;
}

.custom-available-toggle.is-inactive.hour-odd {
  background: #d8dde2;
}

.custom-session-toggle.is-active {
  border-left: 4px solid #f59e0b;
  background: #fde68a;
  color: #7a4a00;
}

.custom-session-toggle.is-active.hour-odd {
  background: #f9dc75;
}

.custom-session-toggle.is-inactive {
  border-left: 4px solid #c8d1cf;
  background: #f6f8fb;
  color: #65707a;
}

.custom-session-toggle.is-inactive.hour-odd {
  background: #eef1f4;
}

.custom-timeline-slot:disabled {
  cursor: not-allowed;
}

.carryout-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  border-left: 3px solid #64748b;
  background: #eef1f3;
  padding: 10px 12px;
}

.carryout-strip div {
  display: grid;
  gap: 2px;
}

.carryout-strip span {
  color: #65707a;
  font-size: 0.78rem;
}

.carryout-strip button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
}

.carryout-week-list {
  margin-top: 12px;
}

.carryout-week-list h2 {
  margin-bottom: 7px;
  color: #52606b;
  font-size: 0.84rem;
}

.carryout-items {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.carryout-item {
  display: grid;
  grid-template-columns: auto auto minmax(100px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 300px;
  min-height: 38px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
  padding: 6px 9px;
  text-align: left;
}

.carryout-item span {
  overflow: hidden;
  color: #52606b;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carryout-time-fields {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
}

.purpose-details[hidden] {
  display: none;
}

#reservation-create-dialog {
  width: min(780px, 100%);
}

.equipment-picker {
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 2px 0 0;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  padding: 12px;
}

.equipment-picker[hidden] {
  display: none;
}

.equipment-picker h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 800;
}

.equipment-picker .section-note {
  margin: 0 0 10px;
}

.equipment-checklist {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #d9e0dd;
  background: #d9e0dd;
}

.equipment-choice {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  background: #ffffff;
  padding: 6px 8px;
}

.equipment-choice.selected {
  background: #eef9f5;
}

.equipment-check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #27313a;
  cursor: pointer;
}

.equipment-check-label input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 0;
}

.equipment-check-label span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 34px 42px 34px;
  gap: 3px;
  align-items: center;
}

.quantity-stepper button,
.quantity-stepper input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #ffffff;
  padding: 0;
  text-align: center;
}

.quantity-stepper button {
  font-size: 1.1rem;
  font-weight: 800;
}

.quantity-stepper button:disabled {
  cursor: default;
  opacity: 0.4;
}

.quantity-stepper input {
  appearance: textfield;
  color: #27313a;
  font-weight: 800;
}

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

.settings-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.settings-heading p:last-child {
  margin: 0;
  color: #65707a;
  font-size: 0.82rem;
}

.purpose-settings-band {
  border-top: 1px solid #d9e0dd;
  padding: 18px 0;
}

.purpose-settings-band h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.purpose-settings-band > .section-note {
  margin: -4px 0 10px;
}

.purpose-option-list {
  display: grid;
  gap: 1px;
  border: 1px solid #d9e0dd;
  background: #d9e0dd;
}

.purpose-option-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) 126px minmax(160px, 0.7fr) 94px 76px;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  padding: 8px;
}

.purpose-option-form {
  display: contents;
}

.purpose-option-row > form {
  display: contents;
}

.purpose-drag-handle {
  width: 34px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #65707a;
  font-size: 1.35rem;
  cursor: grab;
  touch-action: none;
}

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

.purpose-option-row.is-dragging {
  opacity: 0.55;
}

.purpose-option-row.is-drag-over {
  box-shadow: inset 0 3px 0 #0f766e;
}

.purpose-option-form input,
.purpose-option-form select {
  width: 100%;
  min-width: 0;
}

.purpose-option-form .check-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
}

.purpose-option-form .check-field input {
  width: 18px;
  min-height: 18px;
}

.purpose-option-row button,
.purpose-add-form button {
  min-height: 40px;
  padding: 0 12px;
}

.purpose-add-form {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(240px, 1.4fr) 126px 92px auto;
  gap: 8px;
  align-items: end;
}

.purpose-sort-status {
  min-height: 20px;
  margin: 0 0 4px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
}

.purpose-sort-status.is-error {
  color: #b91c1c;
}

.details-title-field input {
  width: 100%;
}

.details-title-field.is-disabled {
  color: #8a949c;
}

.details-title-field.is-disabled input {
  border-color: #d9e0dd;
  background: #f1f3f4;
  color: #8a949c;
  cursor: not-allowed;
  opacity: 1;
}

.purpose-inline-add {
  margin-top: 8px;
}

.purpose-add-toggle {
  min-height: 38px;
  border: 1px dashed #9aa7a4;
  border-radius: 7px;
  background: #ffffff;
  color: #0f766e;
  padding: 0 14px;
  font-weight: 800;
}

.purpose-inline-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 126px minmax(180px, 0.8fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
  border-left: 3px solid #0f766e;
  background: #eef9f5;
  padding: 10px;
}

.purpose-inline-add-form[hidden] {
  display: none;
}

.purpose-inline-add-form .check-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
}

.purpose-inline-add-form .check-field input {
  width: 18px;
  min-height: 18px;
}

.purpose-inline-add-form button {
  min-height: 40px;
  padding: 0 14px;
}

.equipment-settings-band {
  margin-top: 10px;
}

.settings-section-heading h3 {
  margin-bottom: 4px;
}

.settings-section-heading .section-note {
  margin: 0 0 10px;
}

.equipment-setting-list {
  display: grid;
  gap: 1px;
  border: 1px solid #d9e0dd;
  background: #d9e0dd;
}

.equipment-setting-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 112px 94px 76px;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  padding: 8px;
}

.equipment-setting-row > form,
.equipment-setting-form {
  display: contents;
}

.equipment-setting-row input {
  width: 100%;
  min-width: 0;
}

.equipment-setting-row .check-field,
.equipment-add-form .check-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  white-space: nowrap;
}

.equipment-setting-row .check-field input,
.equipment-add-form .check-field input {
  width: 18px;
  min-height: 18px;
}

.equipment-setting-row button,
.equipment-add-form button {
  min-height: 40px;
  padding: 0 12px;
}

.equipment-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 112px 94px auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.equipment-add-form[hidden] {
  display: none;
}

.custom-availability-head,
.custom-availability-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(120px, 1.2fr) minmax(120px, 1.2fr);
  gap: 1px;
}

.custom-availability-head span {
  min-height: 38px;
  display: grid;
  place-items: center;
  background: #f6f8fb;
  color: #52606b;
  font-size: 0.76rem;
  font-weight: 800;
}

.custom-availability-row.hour-even > * {
  background-color: #ffffff;
}

.custom-availability-row.hour-odd > * {
  background-color: #f1f4f7;
}

.custom-availability-time {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #52606b;
  font-size: 0.76rem;
  font-weight: 700;
}

.custom-check {
  min-height: 38px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  cursor: crosshair;
  touch-action: none;
}

.custom-check input {
  min-height: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  pointer-events: none;
}

.custom-check.is-active {
  color: #065f46;
  box-shadow: inset 4px 0 #0f766e;
}

.session-check.is-active {
  color: #7a4a00;
  box-shadow: inset 4px 0 #f59e0b;
}

.custom-availability-row.has-reservation .custom-check {
  color: #7b858d;
  cursor: not-allowed;
}

.availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability-legend span {
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.legend-all,
.legend-available { background: #d8f3e7; color: #065f46; }
.legend-standard { background: #dbeafe; color: #1e40af; }
.legend-partial { background: #fff3c4; color: #7a4a00; }
.legend-none,
.legend-unavailable { background: #fee2e2; color: #991b1b; }
.legend-session { background: #fde68a; color: #7a4a00; }

.sticky-save {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  background: #ffffff;
}

.session-list {
  margin-top: 12px;
  overflow-x: auto;
}

.account-setting-panel {
  margin-top: 0;
}

.account-code-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-top: 14px;
}

.invitation-setting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 18px;
  align-items: start;
}

.current-invitation-code {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 14px;
  border-left: 1px solid #d9e0dd;
  padding-left: 18px;
}

.current-invitation-code > span {
  color: #52606b;
  font-size: 0.86rem;
  font-weight: 700;
}

.current-invitation-code p {
  margin: 0;
  color: #65707a;
  font-size: 0.78rem;
}

.invitation-code-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.invitation-code-value code {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  background: #f6f8fb;
  padding: 10px;
  color: #1d252d;
  font-size: 0.86rem;
  white-space: nowrap;
}

.invitation-code-value button {
  min-width: 76px;
  min-height: 40px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  padding: 0 10px;
}

.account-code-form > button {
  margin-top: 27px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-active {
  background: #d8f3e7;
  color: #065f46;
}

.status-disabled {
  background: #e5e7eb;
  color: #4b5563;
}

.status-admin {
  background: #dbeafe;
  color: #1e40af;
}

.account-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.account-search {
  display: grid;
  grid-template-columns: minmax(220px, 340px) auto;
  gap: 8px;
}

.account-search button {
  min-height: 40px;
  border: 1px solid #c8d1cf;
  border-radius: 8px;
  padding: 0 14px;
}

.account-list {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  overflow-x: auto;
  background: #d9e0dd;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 1fr) 88px minmax(120px, 1fr) 68px;
  gap: 12px;
  align-items: center;
  min-width: 760px;
  min-height: 58px;
  padding: 8px 12px;
  background: #ffffff;
  text-decoration: none;
}

.account-row:hover {
  background: #f6f8fb;
}

.account-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-row strong,
.account-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row > div span {
  color: #65707a;
  font-size: 0.74rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.pagination a {
  border: 1px solid #c8d1cf;
  border-radius: 6px;
  padding: 6px 10px;
  text-decoration: none;
}

.account-edit-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.account-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.account-edit-form .role-fieldset,
.account-edit-form .binary-field,
.account-edit-form .section-note,
.account-edit-form .dialog-actions {
  grid-column: 1 / -1;
}

.account-edit-form > .form-field-group {
  grid-column: 1 / -1;
}

.guide-intro,
.guide-step,
.guide-notes {
  padding: 22px;
}

.guide-intro {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.guide-intro p:last-child,
.guide-step p,
.guide-status-grid p {
  margin: 0;
  color: #52606b;
  line-height: 1.7;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-step {
  display: grid;
  align-content: start;
  gap: 18px;
}

.guide-step-copy {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.guide-step-copy > div {
  display: grid;
  gap: 8px;
}

.guide-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f766e;
  color: #ffffff;
  font-weight: 900;
}

.guide-step img {
  width: 100%;
  height: auto;
  border: 1px solid #d9e0dd;
  border-radius: 10px;
}

.guide-notes {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.guide-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.guide-status-grid > div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
}

.guide-status-grid p {
  grid-column: 1 / -1;
  font-size: 0.78rem;
}

.guide-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.guide-status-dot.available { background: #bce8d4; }
.guide-status-dot.pending { background: #f5d57a; }
.guide-status-dot.reserved { background: #98bff0; }
.guide-status-dot.carryout { background: #ef8e8e; }
.guide-status-dot.session { background: #8bd8e8; }

.role-fieldset {
  margin: 0;
  border: 1px solid #d9e0dd;
  border-radius: 8px;
  padding: 12px;
}

.role-fieldset legend {
  color: #52606b;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0 4px;
}

.role-fieldset ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.role-fieldset label,
.binary-field {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.role-fieldset input,
.binary-field input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
}

@media (max-width: 860px) {
  .executive-menu-two {
    grid-template-columns: 1fr;
  }

  .executive-menu {
    grid-template-columns: 1fr;
  }

  .page-subnav {
    align-items: stretch;
    flex-direction: column;
  }

  .approval-tabs {
    max-width: none;
  }

  .month-toolbar .period-nav {
    align-self: center;
  }

  .availability-save-status {
    min-width: 0;
    text-align: center;
  }

  .custom-editor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .custom-editor-modes {
    width: 100%;
  }

  .account-code-form,
  .account-edit-form {
    grid-template-columns: 1fr;
  }

  .form-field-group,
  .guide-steps,
  .guide-status-grid {
    grid-template-columns: 1fr;
  }

  .guide-step,
  .guide-intro,
  .guide-notes {
    padding: 18px;
  }

  .invitation-setting-layout {
    grid-template-columns: 1fr;
  }

  .current-invitation-code {
    margin-top: 0;
    border-top: 1px solid #d9e0dd;
    border-left: 0;
    padding-top: 14px;
    padding-left: 0;
  }

  .account-code-form > button {
    margin-top: 0;
  }

  .account-list-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .account-search {
    grid-template-columns: 1fr auto;
  }

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

  .carryout-strip,
  .settings-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .carryout-time-fields,
  .purpose-option-form,
  .purpose-add-form {
    grid-template-columns: 1fr;
  }

  .purpose-option-row {
    grid-template-columns: 1fr;
  }

  .equipment-checklist,
  .equipment-setting-row,
  .equipment-add-form,
  .purpose-inline-add-form {
    grid-template-columns: 1fr;
  }

  .equipment-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .quantity-stepper {
    justify-self: end;
  }

  .equipment-setting-row > form:last-child button {
    width: 100%;
  }

  .purpose-drag-handle {
    justify-self: start;
  }

  .purpose-option-row > form:last-child button {
    width: 100%;
  }
}


/* Month reservation calendar */
.week-wrap[data-month-calendar-scroll] {
  scroll-behavior: auto;
  overscroll-behavior-inline: contain;
}

.week-head.selected-date {
  background: #dceeff;
  box-shadow: inset 0 0 0 var(--calendar-selected-border, 3px) #1976d2;
  color: #0b3f70;
  position: sticky;
  top: 0;
  z-index: 7;
}

.day-slot-cell.selected-date {
  background: #eef7ff;
  box-shadow: inset var(--calendar-selected-border, 3px) 0 #1976d2, inset calc(0px - var(--calendar-selected-border, 3px)) 0 #1976d2;
}

.day-slot-cell.selected-date .slot.available {
  background-color: #e0f1ff;
}

.reservation-admin-form [hidden] {
  display: none;
}


/* Reservation calendar interaction refinements */
.period-picker-control {
  min-width: 140px;
}

.period-picker-control .period-range {
  pointer-events: none;
}

.week-wrap[data-month-calendar-scroll] {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

[data-selectable-slot] {
  touch-action: none;
}

.slot.unavailable {
  touch-action: pan-x pan-y;
}

body.calendar-matrix-zooming {
  overscroll-behavior: none;
}

body.calendar-matrix-zooming .week-wrap[data-month-calendar-scroll] {
  scroll-behavior: auto;
}

.reservation-time-fields,
.reservation-admin-time-row,
.reservation-admin-member-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reservation-admin-form {
  grid-template-columns: minmax(0, 1fr);
}

.reservation-admin-form > label,
.reservation-admin-form > div,
.reservation-admin-form > p,
.reservation-admin-form > .dialog-actions {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .reservation-time-fields,
  .reservation-admin-time-row,
  .reservation-admin-member-row {
    grid-template-columns: minmax(0, 1fr);
  }
}


.week-wrap[data-month-calendar-scroll] .time-label {
  z-index: 4;
}

.week-wrap[data-month-calendar-scroll] .calendar-time-index .time-label {
  z-index: auto;
}


body.reservation-calendar-panning {
  cursor: grabbing;
  user-select: none;
}

.danger.confirm-armed {
  border-color: #7f1d1d;
  background: #7f1d1d;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.18);
}

[data-selectable-slot]:not(.selected):focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}


/* Desktop and touch date picker activation */
@media (hover: hover) and (pointer: fine) {
  .period-picker-control .period-range {
    pointer-events: auto;
  }

  .period-picker-control .native-date-picker {
    pointer-events: none;
  }
}
