:root {
  color-scheme: light;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #25241f;
  background: #f7f7f3;
  font-synthesis: none;
  --ink: #25241f;
  --muted: #5e5d54;
  --line: #e8e7df;
  --gold: #ffce35;
  --gold-pale: #fff7d8;
  --white: #fff;
  --danger: #a12b22;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #927000;
  outline-offset: 2px;
}

.shell { max-width: 1576px; width: calc(100% - 96px); margin-inline: auto; }
.topbar { background: #222; color: #fff; border-bottom: 3px solid var(--gold); }
.topbar-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: block; object-fit: contain; width: 156px; height: auto; }
.account-controls { display: flex; align-items: center; gap: 14px; }
.admin-label { color: #e0ded8; font-size: .875rem; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
  background: transparent;
  color: inherit;
}
.button:disabled { opacity: .58; }
.button-header { border-color: #605c50; color: #fff; padding-inline: 14px; }
.button-header:hover { background: #38362e; border-color: #a49669; }
.button-header .icon { color: #ffd445; }
.button-header:focus-visible { outline-color: #ffd445; }
.button-primary { background: var(--gold); color: #252016; border-color: #efbd24; }
.button-primary:hover:not(:disabled) { background: #f6c22b; }
.button-secondary, .button-today, .button-icon { background: #fff; border-color: #e4e2da; }
.button-secondary:hover, .button-today:hover, .button-icon:hover { background: #f7f6f0; }
.button-icon { width: 39px; padding: 0; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover:not(:disabled) { background: #85241d; }
.text-button { border: 0; background: transparent; color: #604b07; padding: 8px 0; font-size: .875rem; font-weight: 650; text-align: left; }
.text-button:hover { text-decoration: underline; }
.danger { color: var(--danger); }

.main { padding-block: 39px 52px; }
.page-heading { margin-bottom: 29px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.heading-copy h1 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.15rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 750; }
.heading-copy p { margin: 11px 0 0; color: var(--muted); line-height: 1.5; }
.new-button { min-height: 44px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 272px; align-items: start; gap: 22px; }
.calendar-panel, .side-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 5px #28251607; }
.calendar-panel { min-width: 0; }
.calendar-toolbar, .calendar-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 19px; }
.calendar-toolbar { padding-block: 15px 12px; }
.calendar-options { padding-block: 0 13px; }
.period, .calendar-actions { display: flex; align-items: center; gap: 10px; }
.period h2 { margin: 0; font-size: clamp(1.02rem, 2vw, 1.25rem); letter-spacing: -.018em; line-height: 1.25; }
.period-icon, .access-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--gold-pale); color: #674e0d; }
.navigation { display: flex; }
.navigation .button:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.navigation .button + .button { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.navigation .button:focus-visible { z-index: 1; }
.segmented { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 9px; background: #f1f0eb; }
.segmented button { min-height: 31px; padding: 3px 12px; border: 0; border-radius: 6px; background: transparent; font-size: .875rem; font-weight: 600; color: var(--muted); }
.segmented button[aria-pressed='true'] { color: var(--ink); background: #fff; box-shadow: 0 1px 3px #2d28191c; }
.segmented button:hover { color: var(--ink); }
.legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .875rem; }
.legend > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-swatch { width: 12px; height: 12px; border: 1px solid #d8d6cb; border-radius: 3px; background: #fff; }
.legend-swatch.reserved { border-color: #e2bb47; background: #ffdf7a; }
.mobile-room-filter { display: none; }
.calendar-status { padding: 10px 19px; font-size: .875rem; color: var(--muted); background: #faf9f3; border-top: 1px solid var(--line); }
.calendar-status button { margin-left: 8px; }
.table-container { overflow-x: auto; border-block: 1px solid var(--line); }
.table-container[data-unavailable] tbody { visibility: hidden; }
.calendar-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.calendar-table[data-columns='10'] { min-width: 720px; }
.calendar-table th, .calendar-table td { padding: 0; border-right: 1px solid #eeede7; border-bottom: 1px solid #eeede7; }
.calendar-table th:last-child, .calendar-table td[data-last] { border-right: 0; }
.calendar-table tr:last-child > * { border-bottom: 0; }
.calendar-table thead { background: #faf9f5; }
.calendar-table th.time-heading, .calendar-table th.hour-label { position: sticky; left: 0; width: 71px; z-index: 1; text-align: center; border-right-color: #e4e2da; }
.calendar-table th.time-heading { background: #faf9f5; font-size: .875rem; color: var(--muted); }
.calendar-table .day-heading { height: 53px; padding: 4px 6px; }
.day-header { display: flex; align-items: center; justify-content: center; gap: 6px; text-transform: capitalize; font-size: .875rem; color: #504f45; }
.day-header strong { font-size: .925rem; color: var(--ink); }
.calendar-table .room-heading { height: 34px; padding: 3px; font-size: .875rem; color: #5d5a4e; font-weight: 600; border-bottom-color: #e8e6de; }
.calendar-table thead .is-today { background: #fff5cf; border-color: #f0e5ba; }
.day-heading.is-today strong { background: #ffd047; border-radius: 5px; padding: 2px 5px; }
.calendar-table .day-end { border-right-color: #e0ded4; }
.calendar-table tbody tr { height: 35px; }
.calendar-table th.hour-label { font-size: .875rem; font-variant-numeric: tabular-nums; font-weight: 550; color: var(--muted); background: #fff; }
.calendar-table tbody td { background: #fff; }
.calendar-table tbody .alternate > * { background: #faf9f5; }
.calendar-table tbody .is-today { background: #fffcf0; }
.calendar-table tbody .alternate .is-today { background: #fcf7e5; }
.calendar-table .hour-start:not(:first-child) > * { border-top: 1px solid #edece4; }
.time-cell { position: relative; }
.slot-button { display: block; border: 0; position: absolute; inset: 2px; width: calc(100% - 4px); border-radius: 4px; background: transparent; color: #5c4600; font-weight: 700; font-size: 1.06rem; }
.slot-button > span { opacity: 0; }
.slot-button:hover, .slot-button:focus-visible { background: #fff0ad; }
.slot-button:hover > span, .slot-button:focus-visible > span { opacity: 1; }
.reservation-card { position: absolute; inset: 3px; width: calc(100% - 6px); border: 1px solid #efce64; border-left: 3px solid #d79810; border-radius: 5px; background: #ffedaf; color: #3b2b08; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 2px; padding: 3px 5px; text-align: left; line-height: 1.2; overflow: hidden; }
.reservation-card:hover { background: #ffe497; }
.reservation-card strong, .reservation-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reservation-card strong { font-size: .875rem; font-weight: 700; }
.reservation-card small { font-size: .8125rem; color: #5d480e; }
.reservation-card.compact small { display: none; }
.calendar-footer { display: flex; gap: 8px; align-items: center; padding: 11px 19px; color: var(--muted); font-size: .8125rem; }
.footer-divider { display: block; width: 3px; height: 3px; border-radius: 50%; background: #8b8879; }

.sidebar { display: grid; gap: 15px; }
.side-panel { padding: 17px; }
.side-heading { margin-bottom: 15px; }
.side-panel h2 { margin: 0; font-size: 1.04rem; line-height: 1.3; letter-spacing: -.01em; }
.side-panel p { margin: 5px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.room-filters { display: grid; gap: 8px; }
.room-filter { display: flex; align-items: center; text-align: left; gap: 9px; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; }
.room-filter:hover, .room-filter[aria-pressed='true'] { border-color: #e8c34b; background: #fff9e6; }
.room-copy { flex: 1; display: grid; gap: 2px; min-width: 0; }
.room-copy strong { font-size: .925rem; line-height: 1.22; }
.room-copy small { font-size: .8125rem; color: var(--muted); }
.room-filter .icon-chevron { color: #746b55; margin-right: 3px; }
.room-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 8px; background: var(--gold-pale); color: #775911; }
.room-icon > span { position: relative; display: block; width: 15px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; }
.room-icon > span::before, .room-icon > span::after { content: ''; position: absolute; inset-inline: 2px; height: 2px; border-inline: 3px solid currentColor; }
.room-icon > span::before { bottom: calc(100% + 2px); }
.room-icon > span::after { top: calc(100% + 2px); }
.room-icon-small { background: #f0eee7; color: #615c48; }
.room-icon-small > span { width: 11px; height: 11px; }
.room-icon-small > span::before, .room-icon-small > span::after { inset-inline: 3px; border: 0; background: currentColor; }
.all-rooms { margin-top: 5px; }
.access-panel { display: flex; align-items: flex-start; gap: 10px; background: #fdfbf1; border-color: #eee9d5; }
.access-icon { width: 30px; height: 30px; }
.access-panel h2 { font-size: .94rem; }

.icon { position: relative; display: inline-block; flex: none; color: inherit; }
.icon-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: translateX(-1px) rotate(45deg); }
.icon-chevron.previous { transform: translateX(1px) rotate(-135deg); }
.icon-lock { width: 13px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; margin-top: 5px; }
.icon-lock::before { content: ''; position: absolute; bottom: 100%; left: 2px; right: 2px; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.icon-calendar { width: 17px; height: 16px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon-calendar::before { content: ''; position: absolute; inset: 3px 0 auto; border-top: 1.5px solid currentColor; }
.icon-calendar::after { content: ''; position: absolute; inset: -3px 3px auto; height: 4px; border-inline: 1.5px solid currentColor; }
.icon-clock { height: 14px; width: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon-clock::after { content: ''; position: absolute; top: 2px; left: 5px; width: 3px; height: 4px; border-bottom: 1px solid currentColor; border-left: 1px solid currentColor; }
.icon-plus, .icon-close { width: 13px; height: 13px; }
.icon-close { transform: rotate(45deg); }
.icon-plus::before, .icon-plus::after, .icon-close::before, .icon-close::after { content: ''; position: absolute; border-radius: 1px; background: currentColor; }
.icon-plus::before, .icon-close::before { inset: 5.5px 0; }
.icon-plus::after, .icon-close::after { inset: 0 5.5px; }

dialog { width: min(450px, calc(100% - 26px)); max-height: calc(100% - 26px); padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 15px 60px #15140b3d; }
dialog::backdrop { background: #1b19118c; }
.booking-dialog { width: min(570px, calc(100% - 26px)); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 22px 15px; gap: 12px; border-top: 4px solid var(--gold); }
.dialog-heading h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
.dialog-heading p { margin: 5px 0 0; color: var(--muted); font-size: .925rem; line-height: 1.45; }
.close-dialog { flex: none; min-height: 33px; width: 33px; }
.dialog-form { padding: 0 22px 21px; display: grid; gap: 13px; }
.field { display: grid; min-width: 0; gap: 5px; color: var(--ink); font-size: .875rem; font-weight: 650; }
.field input:not([type='radio']), .field select, .mobile-room-filter select { width: 100%; min-height: 39px; padding: 7px 10px; color: var(--ink); background: #fff; border: 1px solid #dad7cb; border-radius: 7px; font-size: 1rem; font-weight: 400; }
.field input[type='date'] { min-width: 0; }
.field select, .mobile-room-filter select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, #625b45 50%), linear-gradient(135deg, #625b45 50%, transparent 50%); background-position: right 12px center, right 8px center; background-size: 4px 4px; background-repeat: no-repeat; }
.field select:disabled { background-color: #f7f6f1; }
fieldset.field { padding: 0; border: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: 5px; }
.room-choices, .booking-details { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-choice { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid #e4e1d7; border-radius: 7px; cursor: pointer; }
.room-choice:has(:checked) { border-color: #e4b525; background: #fff6d5; }
.room-choice input { accent-color: #a17500; margin: 0; }
.time-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.time-button { min-height: 32px; padding: 4px 2px; border: 1px solid #dedbd0; border-radius: 6px; background: #fff; color: var(--ink); font-size: .875rem; font-variant-numeric: tabular-nums; }
.time-button:hover:not(:disabled), .time-button[aria-pressed='true'] { border-color: #c79211; background: #ffefac; color: #29210a; }
.time-button:disabled { background: #f3f2ec; color: #68665f; text-decoration: line-through; }
.field-note { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 400; }
.form-error { padding: 8px 10px; margin: 0; font-size: .875rem; font-weight: 550; border-radius: 7px; color: var(--danger); background: #fff0ee; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.booking-actions { justify-content: space-between; }
.booking-actions .button-primary { margin-left: auto; }
.reservation-details { display: grid; gap: 12px; padding: 0 22px 22px; margin: 0; }
.reservation-details dt { font-size: .875rem; color: var(--muted); }
.reservation-details dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.announcement { position: fixed; z-index: 2; inset: auto 16px 16px auto; max-width: calc(100% - 32px); margin: 0; }
.announcement:not(:empty) { padding: 10px 14px; color: #fff; background: #28261c; border: 1px solid #8e751c; border-radius: 8px; box-shadow: 0 3px 10px #241d2133; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1130px) {
  .shell { width: calc(100% - 54px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .sidebar { display: none; }
  .mobile-room-filter { display: block; margin-right: auto; }
  .mobile-room-filter select { font-size: .875rem; min-height: 35px; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 26px); }
  .topbar-inner { height: 65px; }
  .logo { width: 119px; }
  .admin-label { display: none; }
  .button-header { min-height: 36px; gap: 6px; padding-inline: 9px; }
  .main { padding-block: 24px 30px; }
  .page-heading { flex-wrap: wrap; margin-bottom: 17px; }
  .heading-copy h1 { font-size: 2.35rem; }
  .heading-copy p { margin-top: 7px; }
  .calendar-toolbar, .calendar-options { padding-inline: 9px; gap: 7px; }
  .calendar-toolbar { padding-top: 11px; }
  .calendar-options { flex-wrap: wrap; }
  .calendar-actions { gap: 5px; }
  .calendar-actions .button { min-height: 35px; }
  .button-today { padding-inline: 8px; }
  .navigation .button { width: 31px; }
  .period-icon { display: none; }
  .legend { margin-left: auto; gap: 7px; }
  .legend > span { gap: 4px; }
  .legend-swatch { width: 10px; height: 10px; }
  .calendar-table th.time-heading, .calendar-table th.hour-label { width: 58px; }
  .calendar-footer { padding-inline: 10px; }
  .dialog-heading { padding-inline: 15px; }
  .dialog-form { padding-inline: 15px; }
}

@media (max-width: 420px) {
  .legend { flex-basis: 100%; justify-content: flex-end; }
}
