:root {
  --leaf: #708054;
  --leaf-dark: #4f5d3a;
  --ink: #20231f;
  --muted: #656b63;
  --line: #dfe4dc;
  --paper: #fbfcfa;
  --soft: #eef3ec;
  --coral: #c45f4c;
  --aqua: #4d8b8d;
  --aqua-soft: #e7f1f1;
  --coral-soft: #f8ebe8;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(30, 35, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7f8f5;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(32, 35, 31, 0.06);
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  margin: 0;
  background: var(--leaf-dark);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, top 160ms ease;
}

.nav-toggle span:nth-child(1) {
  top: 14px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--aqua-soft);
  border-color: rgba(77, 139, 141, 0.24);
  outline: none;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--soft);
  border-color: rgba(79, 93, 58, 0.24);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 20px;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 20px;
  transform: translateX(-50%) rotate(-45deg);
}

.brand img {
  width: min(210px, 54vw);
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
}

.header-login-button {
  min-width: 112px;
}

.nav-backdrop {
  position: fixed;
  inset: 68px 0 0;
  z-index: 9;
  background: rgba(32, 35, 31, 0.34);
}

.nav-links a {
  padding: 10px 12px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--aqua-soft);
  color: var(--ink);
  outline: none;
}

main {
  overflow: hidden;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
  min-height: min(620px, calc(100svh - 68px));
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 56px) clamp(26px, 4vw, 48px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.intro[hidden] {
  display: none;
}

.intro-copy {
  align-self: center;
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  font-size: clamp(2.4rem, 6vw, 5.1rem);
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.35rem);
}

h3 {
  margin: 0;
  font-size: 1.08rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.intro-copy p:not(.eyebrow) {
  max-width: 55ch;
  margin: 20px 0;
  font-size: 1.08rem;
}

.primary-link,
.secondary-link,
button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px 18px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.secondary-button {
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.secondary-button:disabled {
  color: rgba(101, 107, 99, 0.7);
  background: #edf0eb;
  border-color: #d6ddd1;
  box-shadow: none;
}

.secondary-link:hover,
.secondary-link:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  background: var(--aqua-soft);
  outline: none;
}

.intro-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.intro-image {
  min-height: 390px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(32, 35, 31, 0.02), rgba(32, 35, 31, 0.18)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1400&q=80")
      center / cover;
}

.auth-band,
.admin-section,
.booking-section,
.rooms-section,
.facilities-section,
.contact-section {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 56px);
}

.auth-band {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 1.25fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-panel,
.booking-controls {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 24px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-modal {
  width: min(520px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  margin: 0;
  max-height: min(760px, calc(100dvh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

#authDialog,
#adminAuthDialog {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.auth-modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-close {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--muted);
  background: transparent;
}

.auth-modal-copy {
  margin: -4px 0 4px;
}

.auth-step,
.otp-step-copy,
.otp-actions {
  display: grid;
  gap: 10px;
}

.auth-step[hidden],
.otp-row[hidden],
.otp-step-copy[hidden],
.otp-actions[hidden] {
  display: none !important;
}

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

.auth-panel.signed-in > label,
.auth-panel.signed-in > input,
.auth-panel.signed-in > .inline-control,
.auth-panel.signed-in > .form-note {
  display: none;
}

.auth-panel.signed-in > label,
.auth-panel.signed-in > .inline-control,
.auth-panel.signed-in > .otp-row,
.auth-panel.signed-in > .form-note {
  display: none;
}

.signed-in-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(180deg, var(--aqua-soft), var(--white));
  border: 1px solid rgba(77, 139, 141, 0.24);
  border-radius: 8px;
}

.signed-in-panel[hidden] {
  display: none;
}

.signed-in-panel h3 {
  font-size: 1.45rem;
}

.signed-in-panel p {
  margin: 0;
}

.booking-controls.locked {
  position: sticky;
  top: 88px;
}

.booking-controls.locked > :not(.booking-lock-note) {
  display: none;
}

.booking-lock-note {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--aqua-soft), var(--white));
  border: 1px solid rgba(77, 139, 141, 0.24);
  border-radius: 8px;
}

.booking-lock-note[hidden] {
  display: none;
}

.booking-lock-note strong {
  font-size: 0.98rem;
}

.booking-lock-note p {
  margin: 0;
  color: var(--muted);
}

.booking-lock-note .secondary-link {
  justify-self: start;
}

label,
legend {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.label-note {
  color: var(--muted);
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.compact-select {
  max-width: 180px;
}

.time-selectors,
.duration-selectors {
  display: grid;
  gap: 10px;
}

.time-selectors {
  grid-template-columns: 1fr 1fr 1fr;
}

.duration-selectors {
  grid-template-columns: 1fr 1fr;
}

.time-selectors select,
.duration-selectors select {
  min-width: 0;
}

.end-time-display {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  color: var(--leaf-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.date-picker {
  position: relative;
}

.date-button {
  width: 100%;
  justify-content: flex-start;
  padding: 0 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 800;
}

.date-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(340px, calc(100vw - 36px));
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.date-popover-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.date-popover-header strong {
  text-align: center;
}

.date-popover-header button {
  min-height: 38px;
  padding: 0 11px;
  color: var(--white);
  background: var(--leaf);
}

.date-weekdays,
.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.date-cell,
.date-spacer {
  min-height: 38px;
}

.date-cell {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}

.date-cell.selected {
  color: var(--white);
  background: var(--aqua);
  border-color: var(--aqua);
}

.date-cell:disabled {
  color: rgba(101, 107, 99, 0.42);
  background: #f4f1ef;
  cursor: not-allowed;
}

input:focus,
select:focus,
button:focus-visible,
.primary-link:focus-visible,
.secondary-link:focus-visible {
  outline: 3px solid rgba(77, 139, 141, 0.32);
  outline-offset: 2px;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-control button,
.floor-actions button {
  padding: 0 16px;
  background: var(--leaf);
  color: var(--white);
}

.otp-row {
  display: grid;
  gap: 10px;
}

.form-note {
  min-height: 26px;
  margin: 0;
  font-size: 0.92rem;
}

.muted-small {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.admin-section {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: clamp(42px, 7vw, 96px) clamp(18px, 4vw, 56px);
  background: var(--paper);
}

.admin-hero h1 {
  max-width: 12ch;
}

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

.admin-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-number {
  align-self: end;
  color: var(--leaf-dark);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.admin-locked-state {
  margin-top: 0;
}

.admin-locked-card {
  display: grid;
  gap: 18px;
  max-width: 720px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-locked-card p {
  max-width: 52ch;
}

.admin-locked-card .book-button {
  justify-self: start;
}

.admin-dashboard-link {
  margin-top: 18px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

form.booking-controls.admin-booking-form {
  width: 100%;
  max-width: none;
  position: static;
  top: auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px 18px;
}

.admin-booking-planner {
  width: 100%;
}

.admin-form-row {
  grid-column: span 4;
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-form-row-full {
  grid-column: 1 / -1;
}

.admin-booking-form > input[type="hidden"] {
  display: none;
}

.admin-booking-form .admin-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 6px;
}

.admin-booking-form .admin-form-message {
  grid-column: 1 / -1;
}

.admin-booking-form label,
.admin-booking-form legend {
  margin-top: 0;
}

.admin-booking-form label + .date-picker,
.admin-booking-form label + input,
.admin-booking-form label + .time-selectors,
.admin-booking-form label + .duration-selectors,
.admin-booking-form label + .end-time-display,
.admin-form-row .date-picker,
.admin-form-row input,
.admin-form-row .time-selectors,
.admin-form-row .duration-selectors,
.admin-form-row .end-time-display,
.admin-form-row select {
  margin-top: 0;
}

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

.export-actions button,
.records-table button {
  padding: 0 13px;
  background: var(--leaf);
  color: var(--white);
}

.records-panel {
  display: grid;
  gap: 14px;
}

.records-supplement {
  display: grid;
  gap: 16px;
}

.records-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.records-subheading h3 {
  font-size: 1rem;
}

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

.filter-toggle {
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
}

.filter-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--leaf-dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.filter-toggle-check {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: transparent;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.filter-toggle input:checked + .filter-toggle-chip {
  color: var(--white);
  background: var(--leaf);
  border-color: var(--leaf);
  box-shadow: 0 12px 28px rgba(90, 106, 63, 0.18);
}

.filter-toggle input:checked + .filter-toggle-chip .filter-toggle-check {
  color: var(--leaf);
  background: var(--white);
  border-color: var(--white);
}

.filter-toggle input:focus-visible + .filter-toggle-chip {
  outline: 3px solid rgba(103, 147, 149, 0.22);
  outline-offset: 2px;
}

.filter-toggle:hover .filter-toggle-chip {
  border-color: var(--leaf);
}

.records-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: grab;
}

.records-table-wrap.dragging {
  cursor: grabbing;
}

.records-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.main-records-table {
  min-width: 1100px;
}

.records-table th,
.records-table td {
  padding: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.records-table th {
  color: var(--ink);
  font-size: 0.84rem;
}

.records-table td {
  color: var(--muted);
}

.records-table td:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-records-table th:nth-child(5),
.main-records-table td:nth-child(5),
.main-records-table th:nth-child(6),
.main-records-table td:nth-child(6),
.main-records-table th:nth-child(8),
.main-records-table td:nth-child(8) {
  white-space: nowrap;
}

.main-records-table td:nth-child(8) {
  min-width: 180px;
}

.main-records-table td:last-child {
  flex-wrap: nowrap;
}

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

.section-heading h2 {
  max-width: 16ch;
}

.booking-status-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.booking-status-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--leaf-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.booking-controls {
  position: sticky;
  top: 88px;
  max-width: 420px;
}

form.booking-controls#bookingForm {
  width: 100%;
  max-width: none;
  position: static;
  top: auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px 18px;
}

.public-form-row {
  grid-column: span 4;
  display: grid;
  gap: 10px;
  align-content: start;
}

.public-form-row-full {
  grid-column: 1 / -1;
}

#bookingForm > input[type="hidden"] {
  display: none;
}

#bookingForm .booking-lock-note,
#bookingForm .public-form-submit,
#bookingForm .public-form-message {
  grid-column: 1 / -1;
}

#bookingForm label,
#bookingForm legend {
  margin-top: 0;
}

#bookingForm label + .date-picker,
#bookingForm label + input,
#bookingForm label + .time-selectors,
#bookingForm label + .duration-selectors,
#bookingForm label + .end-time-display,
.public-form-row .date-picker,
.public-form-row input,
.public-form-row .time-selectors,
.public-form-row .duration-selectors,
.public-form-row .end-time-display,
.public-form-row select {
  margin-top: 0;
}

.booking-controls label,
.booking-controls legend {
  margin-top: 2px;
}

.booking-controls label + .date-picker,
.booking-controls label + input,
.booking-controls label + .time-selectors,
.booking-controls label + .duration-selectors,
.booking-controls label + .end-time-display {
  margin-top: -6px;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-options label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.category-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-options label:has(input:checked) {
  border-color: var(--leaf-dark);
  background: linear-gradient(180deg, var(--soft), var(--white));
  color: var(--leaf-dark);
  box-shadow: inset 0 0 0 1px var(--leaf-dark);
}

.book-button {
  padding: 0 18px;
  background: var(--ink);
  color: var(--white);
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: wait;
}

button.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

button.secondary-button.is-loading::before,
button.dialog-close.is-loading::before,
.dialog-actions button:not(.book-button, .danger-button).is-loading::before,
.records-table button.is-loading::before,
.export-actions button.is-loading::before {
  border-color: rgba(32, 35, 31, 0.24);
  border-top-color: var(--ink);
}

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

@media (prefers-reduced-motion: reduce) {
  button.is-loading::before {
    animation-duration: 1.6s;
  }
}

.booking-planner {
  width: 100%;
}

.time-planner {
  display: grid;
  gap: 16px;
  padding: clamp(14px, 2vw, 18px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.time-planner-header {
  display: flex;
  align-items: start;
  gap: 18px;
}

.time-planner-header p {
  margin: 6px 0 0;
}

.planner-range-tag {
  align-self: start;
  margin-top: 4px;
}

.calendar-shell {
  display: grid;
  gap: 10px;
  max-width: 100%;
  cursor: grab;
  user-select: none;
}

.calendar-shell.dragging {
  cursor: grabbing;
}

.calendar-axis {
  position: relative;
  width: 100%;
  min-height: 24px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.calendar-axis span.first {
  transform: translateX(0);
}

.calendar-axis span.last {
  transform: translateX(-100%);
}

.calendar-track {
  position: relative;
  width: 100%;
  min-height: 194px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to right,
      rgba(112, 128, 84, 0.16) 0,
      rgba(112, 128, 84, 0.16) 1px,
      transparent 1px,
      transparent calc(100% / 36)
    ),
    linear-gradient(180deg, var(--paper), var(--white));
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: default;
  user-select: none;
}

.calendar-track::before {
  content: "Room availability";
  position: absolute;
  left: 16px;
  top: 14px;
  color: rgba(101, 107, 99, 0.58);
  font-size: 0.88rem;
  font-weight: 800;
  pointer-events: none;
}

.calendar-empty {
  position: absolute;
  left: 16px;
  top: 62px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  pointer-events: none;
}

.calendar-block {
  position: absolute;
  top: 64px;
  display: grid;
  align-content: center;
  min-width: 42px;
  min-height: 78px;
  padding: 9px;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(32, 35, 31, 0.14);
  pointer-events: none;
}

.calendar-block strong,
.calendar-block span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.calendar-block strong {
  font-size: 0.86rem;
}

.calendar-block span {
  font-size: 0.74rem;
  font-weight: 800;
}

.calendar-block.booked {
  color: var(--white);
  background: var(--coral);
  opacity: 0.88;
}

.calendar-block.selected {
  z-index: 2;
  color: var(--white);
  background: var(--ink);
  outline: 3px solid rgba(77, 139, 141, 0.32);
}

.calendar-block.selected.conflict {
  background: #8f3e34;
  outline-color: rgba(196, 95, 76, 0.32);
}

.floor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.floor-actions-contact {
  margin: 18px 0 20px;
}

.contact-section .floor-actions button {
  background: var(--white);
  color: var(--ink);
}

.room-grid,
.category-summary,
.facility-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.room-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.room-card,
.summary-card,
.facility-card {
  display: grid;
  gap: 12px;
  min-height: 172px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-card {
  cursor: pointer;
  text-align: left;
}

.room-choice-grid .room-card {
  min-height: 150px;
  padding: 16px;
}

.room-choice-grid .room-card h3 {
  font-size: 1rem;
}

.room-choice-grid .room-card p {
  margin: 0;
  font-size: 0.92rem;
}

.room-card.selected {
  border-color: var(--leaf-dark);
  box-shadow: inset 0 0 0 2px var(--leaf-dark), var(--shadow);
}

.room-card.unavailable {
  opacity: 0.62;
  cursor: not-allowed;
}

.room-meta,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag.accent {
  color: var(--white);
  background: var(--aqua);
}

.tag.warning {
  color: var(--white);
  background: var(--coral);
}

.facility-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: stretch;
}

.user-bookings-section {
  padding-top: 0;
}

.user-bookings-note {
  margin: 0 0 18px;
  max-width: 72ch;
}

.user-bookings-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.user-booking-filter-slot:empty {
  display: none;
}

.user-bookings-filters label {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.user-bookings-filters span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-bookings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.user-booking-group {
  display: grid;
  gap: 12px;
}

.user-booking-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-booking-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-booking-group-header h3 {
  font-size: 1.05rem;
}

.user-booking-group-body {
  display: grid;
  gap: 12px;
}

.user-booking-group-body[hidden] {
  display: none !important;
}

.user-booking-toggle {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.user-booking-toggle:hover,
.user-booking-toggle:focus-visible {
  border-color: rgba(93, 152, 157, 0.45);
  background: rgba(93, 152, 157, 0.08);
  outline: none;
}

.user-booking-list {
  display: grid;
  gap: 12px;
}

.user-booking-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.user-booking-schedule {
  display: grid;
  gap: 6px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.user-booking-day {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.4;
}

.user-booking-time {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.user-booking-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.user-booking-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.user-booking-title-row h4 {
  font-size: 1.28rem;
}

.user-booking-meta,
.user-booking-rule,
.user-booking-empty {
  margin: 0;
}

.user-booking-meta {
  color: var(--muted);
  font-size: 0.96rem;
}

.user-booking-actions {
  display: grid;
  align-items: start;
  justify-items: end;
}

.user-booking-actions:empty {
  display: none;
}

.user-booking-rule {
  font-size: 0.92rem;
  color: var(--ink);
}

.cancel-booking-button {
  min-width: 144px;
}

.facility-layout img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  border-radius: 8px;
}

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

.contact-section {
  color: var(--white);
  background: var(--ink);
}

.contact-section p {
  max-width: 64ch;
  color: rgba(255, 255, 255, 0.76);
}

dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 24px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(32, 35, 31, 0.5);
}

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

.dialog-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.dialog-actions button:first-child {
  padding: 0 18px;
  background: var(--soft);
  color: var(--ink);
}

.booking-request-panel,
.booking-success-panel,
.admin-delete-dialog {
  display: grid;
  gap: 14px;
}

.booking-request-panel h2,
.admin-delete-dialog h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
}

.delete-dialog-copy {
  margin: 0;
  color: var(--muted);
}

.delete-dialog-details {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.delete-detail-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: start;
}

.delete-detail-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.delete-detail-row strong {
  color: var(--ink);
}

.danger-button {
  padding: 0 18px;
  background: #b94034;
  color: var(--white);
}

.booking-request-summary {
  display: grid;
  gap: 12px;
}

.booking-request-status {
  margin: 0;
  padding: 12px 14px;
  color: var(--leaf-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 900;
}

.booking-success-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.booking-success-message {
  display: grid;
  gap: 12px;
}

.success-summary {
  margin: 0;
  color: var(--muted);
}

.success-detail-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.success-detail-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.success-detail-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.success-detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.success-pin {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
}

.success-pin span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.success-pin strong {
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  letter-spacing: 0.08em;
}

.success-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-edit-form {
  width: min(560px, calc(100vw - 24px));
  min-width: 0;
  max-width: 100%;
  margin: 0;
  border: 0;
  box-shadow: none;
}

@media (max-width: 920px) {
  .intro,
  .auth-band,
  .admin-hero,
  .booking-layout,
  .facility-layout,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
  }

  .booking-controls,
  .booking-controls.locked {
    position: static;
    max-width: none;
  }

  form.booking-controls#bookingForm {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .public-form-row,
  .public-form-row-full,
  #bookingForm .booking-lock-note,
  #bookingForm .public-form-submit,
  #bookingForm .public-form-message {
    grid-column: auto;
  }

  form.booking-controls.admin-booking-form {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-form-row,
  .admin-form-row-full,
  .admin-booking-form .admin-form-actions,
  .admin-booking-form .admin-form-message {
    grid-column: auto;
  }

  .intro-image {
    min-height: 360px;
  }

  .room-grid,
  .category-summary,
  .facility-list,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-shell {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .calendar-axis,
  .calendar-track {
    width: 900px;
    max-width: none;
  }

  .user-booking-row {
    grid-template-columns: 1fr;
  }

  .user-booking-schedule {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .user-booking-group-header {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    z-index: 10;
    display: grid;
    align-content: start;
    gap: 4px;
    width: min(280px, calc(100vw - 40px));
    height: calc(100dvh - 68px);
    padding: 18px;
    background: var(--white);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    padding: 12px 14px;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .intro {
    padding-top: 24px;
  }

  .intro-image {
    min-height: 260px;
  }

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

  .booking-status-list {
    justify-content: flex-start;
  }

  dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }

  .success-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .delete-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #authDialog,
  #adminAuthDialog {
    padding: 0;
  }

  .auth-modal {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }

  .auth-modal-header {
    gap: 12px;
  }

  .header-login-button {
    min-width: 0;
    padding: 0 12px;
  }

  .inline-control,
  .room-grid,
  .category-summary,
  .facility-list,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .otp-actions {
    grid-template-columns: 1fr;
  }

  .user-booking-actions {
    justify-items: stretch;
  }

  .cancel-booking-button {
    width: 100%;
  }

  .room-choice-grid {
    grid-template-columns: 1fr;
  }

  .time-planner-header {
    flex-direction: column;
  }

  .calendar-track {
    min-height: 220px;
  }

  .category-options {
    grid-template-columns: 1fr;
  }

  .time-selectors,
  .duration-selectors {
    gap: 8px;
  }

  .public-form-row .time-selectors,
  .public-form-row .duration-selectors,
  .admin-form-row .time-selectors,
  .admin-form-row .duration-selectors {
    grid-template-columns: 1fr;
  }

  #bookingForm .public-form-submit,
  .admin-booking-form .admin-form-actions button {
    width: 100%;
  }

  .admin-booking-form .admin-form-actions {
    justify-content: stretch;
  }

  .inline-control button {
    width: 100%;
  }
}
