* {
	box-sizing: border-box;
}

body {
	background: #f4f6f5;
	color: #1f2a27;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.7;
	margin: 0;
}

.page {
	margin: 0 auto;
	max-width: 1120px;
	padding: 32px 20px 56px;
}

.page.narrow {
	max-width: 560px;
}

.page-header,
.admin-header {
	align-items: center;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin-bottom: 24px;
}

.page-header {
	align-items: flex-start;
	display: block;
}

.reservation-header-note {
	color: #c62828;
	font-weight: 700;
	margin: 10px 0 0;
}

.eyebrow {
	color: #007a4d;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 4px;
}

.page-header .eyebrow {
	font-size: 20px;
	line-height: 1.35;
}

h1,
h2 {
	line-height: 1.35;
	margin: 0;
}

h1 {
	font-size: 28px;
}

h2 {
	font-size: 18px;
	margin-bottom: 16px;
}

.reservation-datetime-heading {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin-bottom: 16px;
}

.reservation-datetime-heading h2,
.reservation-datetime-heading p {
	margin: 0;
}

.reservation-datetime-heading p {
	color: #52635c;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.panel {
	background: #fff;
	border: 1px solid #dfe7e3;
	border-radius: 8px;
	margin-bottom: 20px;
	padding: 22px;
}

.alert,
.notice {
	border-radius: 8px;
	margin: 0 0 18px;
	padding: 12px 14px;
}

.alert {
	background: #fff1f0;
	border: 1px solid #f0b8b4;
	color: #9a2b21;
}

.notice {
	background: #eef8f2;
	border: 1px solid #a9dabc;
	color: #17653b;
}

.slot-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.slot-card {
	border: 1px solid #d7e2dd;
	border-radius: 8px;
	cursor: pointer;
	display: grid;
	gap: 4px;
	padding: 12px;
}

.slot-card:has(input:checked) {
	background: #e9f8f1;
	border-color: #008f5a;
}

.slot-card input {
	margin: 0;
}

.slot-main {
	font-weight: 700;
}

.slot-sub {
	color: #60706a;
	font-size: 13px;
}

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

.menu-switch label {
	align-items: center;
	border: 1px solid #cfd9d4;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	gap: 8px;
	justify-content: center;
	margin: 0;
	min-height: 58px;
	overflow: hidden;
	padding: 12px 14px;
	text-align: center;
	white-space: normal;
}

.menu-switch label:has(input:checked),
.menu-switch label.is-selected {
	background: #e9f8f1;
	border-color: #008f5a;
	color: #007a4d;
}

.menu-switch input[type="radio"] {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.menu-switch label {
	font-size: 18px;
	font-weight: 700;
}

.calendar-select-message {
	background: #f7faf8;
	border: 1px solid #dfe7e3;
	border-radius: 6px;
	color: #60706a;
	font-weight: 700;
	margin: 0;
	padding: 14px;
	text-align: center;
}

.calendar-scroll {
	overflow-x: auto;
	padding-bottom: 6px;
}

.calendar-table {
	border-collapse: collapse;
	font-size: 13px;
	min-width: 1840px;
	table-layout: fixed;
	width: 100%;
}

.calendar-table th,
.calendar-table td {
	border: 1px solid #e2e8e5;
	height: 42px;
	padding: 5px;
	text-align: center;
	vertical-align: middle;
	width: 64px;
}

.calendar-table thead th {
	background: #f7faf8;
	font-weight: 700;
	position: sticky;
	top: 0;
	z-index: 2;
}

.date-main,
.date-weekday {
	display: block;
	line-height: 1.25;
}

.date-weekday {
	color: #60706a;
	font-size: 11px;
	margin-top: 2px;
}

.calendar-table .time-heading {
	background: #f7faf8;
	font-weight: 700;
	left: 0;
	position: sticky;
	width: 74px;
	z-index: 3;
}

.calendar-cell {
	background: #fff;
}

.calendar-cell.state-closed {
	background: #f5f5f5;
}

.calendar-mark,
.calendar-toggle,
.public-slot span {
	align-items: center;
	border-radius: 6px;
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	height: 28px;
	justify-content: center;
	line-height: 1;
	min-width: 36px;
}

.calendar-mark.muted {
	color: #aaa;
}

.calendar-mark.booked {
	background: #fff3d6;
	color: #8a5a00;
	font-size: 11px;
	min-width: 44px;
}

.calendar-toggle {
	border: 1px solid #bbb;
	cursor: pointer;
	padding: 0;
}

.calendar-toggle.is-on,
.public-slot span {
	background: #e9f8f1;
	border: 1px solid #008f5a;
	color: #007a4d;
}

.calendar-toggle.is-off {
	background: #f2f2f2;
	border: 1px solid #c9c9c9;
	color: #888;
}

.public-slot {
	cursor: pointer;
	display: inline-flex;
	margin: 0;
}

.public-slot input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.public-slot input:checked + span {
	background: #008f5a;
	color: #fff;
}

.public-slot span {
	height: auto;
	line-height: 1.25;
	min-height: 28px;
	padding: 4px 5px;
	white-space: normal;
}

.admin-calendar {
	min-width: 3400px;
}

.admin-calendar-scroll {
	height: 65vh;
	max-height: 720px;
	min-height: 360px;
	overscroll-behavior: contain;
	overflow: auto;
	position: relative;
}

.admin-calendar thead th {
	position: sticky;
	top: 0;
	z-index: 4;
}

.admin-calendar thead .time-heading {
	z-index: 5;
}

.admin-calendar th,
.admin-calendar td {
	height: 138px;
	width: 128px;
}

.admin-calendar .calendar-mark.booked {
	display: flex;
	margin: 2px auto;
	width: fit-content;
}

.capacity-form {
	align-items: center;
	display: grid;
	gap: 3px;
	grid-template-columns: minmax(66px, 1fr) 38px 12px;
	margin: 5px auto 0;
	max-width: 120px;
}

.capacity-label {
	font-size: 10px;
	line-height: 1.15;
	text-align: right;
}

.capacity-form input[type="number"] {
	font-size: 12px;
	padding: 4px 2px;
	text-align: center;
	width: 38px;
}

.capacity-unit {
	font-size: 10px;
	text-align: left;
}

.section-note {
	color: #60706a;
	font-size: 13px;
	margin: 4px 0 0;
}

.cell-form {
	margin: 0;
}

label {
	display: grid;
	font-weight: 700;
	gap: 6px;
	margin-bottom: 14px;
}

input,
select,
textarea {
	border: 1px solid #cfd9d4;
	border-radius: 6px;
	font: inherit;
	padding: 10px 12px;
	width: 100%;
}

textarea {
	resize: vertical;
}

button,
.primary-button,
.secondary-button {
	border-radius: 6px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	text-decoration: none;
}

.primary-button {
	background: #008f5a;
	border: 1px solid #008f5a;
	color: #fff;
	padding: 11px 18px;
}

.secondary-button {
	background: #fff;
	border: 1px solid #9aa8a2;
	color: #24342f;
	padding: 9px 14px;
}

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

.text-button {
	background: transparent;
	border: 0;
	color: #007a4d;
	padding: 0;
	text-decoration: underline;
}

.danger-button {
	background: #fff1f0;
	border: 1px solid #d96b62;
	color: #9a2b21;
	padding: 6px 10px;
}

.primary-small-button {
	background: #008f5a;
	border: 1px solid #008f5a;
	color: #fff;
	padding: 7px 12px;
}

.booking-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.change-booking-form {
	align-items: end;
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(240px, 1fr) auto;
	margin: 0;
}

.change-booking-form label {
	font-size: 12px;
	gap: 3px;
	margin: 0;
}

.change-booking-form select {
	min-width: 240px;
	padding: 7px 9px;
}

.change-calendar-modal {
	background: rgba(0, 0, 0, 0.45);
	bottom: 0;
	left: 0;
	overflow: auto;
	padding: 28px 18px;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 1000;
}

.change-calendar-modal[hidden] {
	display: none;
}

.change-calendar-panel {
	background: #fff;
	border-radius: 8px;
	margin: 0 auto;
	max-width: 1120px;
	padding: 18px;
}

.change-calendar-header {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin-bottom: 14px;
}

.change-calendar-header h3 {
	font-size: 18px;
	margin: 0;
}

.change-menu-switch {
	margin-bottom: 14px;
}

.change-calendar-select-message {
	margin-bottom: 14px;
}

.change-targets {
	display: grid;
	gap: 4px;
	justify-content: center;
}

.change-target-button {
	align-items: center;
	background: #e9f8f1;
	border: 1px solid #008f5a;
	border-radius: 6px;
	color: #007a4d;
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	gap: 4px;
	justify-content: center;
	line-height: 1.2;
	min-height: 28px;
	min-width: 56px;
	padding: 4px 6px;
}

.change-target-button span {
	font-size: 10px;
}

.cancel-booking-form {
	margin: 0;
}

.muted-text {
	color: #777;
	font-size: 12px;
}

.admin-form {
	align-items: end;
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.section-title {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

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

table {
	border-collapse: collapse;
	min-width: 860px;
	width: 100%;
}

th,
td {
	border-bottom: 1px solid #e2e8e5;
	padding: 10px;
	text-align: left;
	vertical-align: top;
}

th {
	background: #f7faf8;
	font-size: 13px;
}

.status {
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 8px;
}

.status-available {
	background: #e9f8f1;
	color: #007a4d;
}

.status-booked {
	background: #fff3d6;
	color: #8a5a00;
}

.status-stopped {
	background: #eeeeee;
	color: #555;
}

.inline-form {
	margin: 0;
}

.complete {
	text-align: center;
}

@media (max-width: 768px) {
	.page {
		padding: 20px 14px 40px;
	}

	.page-header,
	.admin-header,
	.section-title {
		align-items: flex-start;
		display: grid;
	}

	.admin-form {
		grid-template-columns: 1fr;
	}

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