:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5b6770;
  --line: #d8dee4;
  --brand: #006c67;
  --brand-strong: #004f4b;
  --accent: #b45309;
  --paper: #ffffff;
  --soft: #f6f8f9;
  --success: #137333;
  --error: #b3261e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef5f4 0%, #ffffff 42%);
}

.page {
  min-height: 100vh;
  padding: 40px 20px;
}

.booking-shell,
.admin-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(25, 42, 50, 0.1);
  overflow: hidden;
}

.intro,
.admin-header {
  padding: 32px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfd;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
}

.notice {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.booking-form {
  padding: 32px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.date-picker {
  position: relative;
  display: block;
  min-height: 46px;
  cursor: pointer;
}

.date-picker input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.date-display {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  pointer-events: none;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus,
button:focus,
select:focus {
  outline: 3px solid rgba(0, 108, 103, 0.22);
  outline-offset: 2px;
}

.date-field {
  margin-top: 18px;
  max-width: 320px;
}

.slot-panel {
  margin-top: 28px;
}

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

h2 {
  margin: 0;
  font-size: 22px;
}

.slot-heading p {
  margin: 0;
  color: var(--muted);
}

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

.slot-button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.slot-button strong,
.slot-button span {
  display: block;
}

.slot-button strong {
  font-size: 19px;
}

.slot-button span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.slot-button:hover:not(:disabled),
.slot-button.selected {
  border-color: var(--brand);
  background: #e9f5f3;
}

.slot-button.selected {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.slot-button:disabled {
  cursor: not-allowed;
  color: #8a949b;
  background: #f0f2f3;
}

.slot-button:disabled span {
  color: #6f7980;
  line-height: 1.35;
}

.message {
  min-height: 28px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 700;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--error);
}

.message.info {
  color: var(--brand);
}

.submit-button,
.secondary-button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.submit-button {
  width: 100%;
  margin-top: 10px;
  color: #fff;
  background: var(--brand);
}

.submit-button:hover {
  background: var(--brand-strong);
}

.secondary-button {
  color: #fff;
  background: var(--accent);
}

.cancel-shell {
  margin-top: 22px;
}

.cancel-header {
  padding: 28px 32px 0;
}

.cancel-row {
  margin-top: 18px;
}

.cancel-button {
  background: var(--accent);
}

.cancel-button:hover {
  background: #8a3f07;
}

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

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

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

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .page {
    padding: 18px 12px;
  }

  .intro,
  .admin-header,
  .booking-form {
    padding: 22px;
  }

  h1 {
    font-size: 25px;
  }

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

  .slot-heading,
  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }
}
