:root {
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #222333;
  --muted: #687185;
  --primary: #3b82f6;
  --success: #16a34a;
  --danger: #ef4444;
  --border: #dde3f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #ffffff;
  padding: 32px 0;
  margin-bottom: 24px;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.site-header p {
  margin: 0;
  color: #dbeafe;
}

.room-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--card);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
}

.summary-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--muted);
}

.summary-card p {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.control-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.95rem;
  color: var(--muted);
}

select,
button {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
}

button {
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button:active {
  transform: translateY(0);
}

.booking-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
}

.booking-panel h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.booking-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.booking-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .booking-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 660px) {
  .booking-fields {
    grid-template-columns: 1fr;
  }
}

.room-list table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
}

.room-list th,
.room-list td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid #eef2ff;
}

.room-list th {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #f8fafc;
}

.room-list tbody tr:last-child td {
  border-bottom: none;
}

.status-available {
  color: var(--success);
  font-weight: 700;
}

.status-occupied {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 860px) {
  .room-summary {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 660px) {
  .room-list table,
  .room-list thead,
  .room-list tbody,
  .room-list th,
  .room-list td,
  .room-list tr {
    display: block;
  }

  .room-list th {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .room-list tr {
    margin-bottom: 18px;
  }

  .room-list td {
    position: relative;
    padding-left: 45%;
  }

  .room-list td::before {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40%;
    white-space: nowrap;
    font-weight: 700;
    color: var(--muted);
  }

  .room-list td:nth-of-type(1)::before { content: "房号"; }
  .room-list td:nth-of-type(2)::before { content: "级别"; }
  .room-list td:nth-of-type(3)::before { content: "价格"; }
  .room-list td:nth-of-type(4)::before { content: "状态"; }
  .room-list td:nth-of-type(5)::before { content: "入住时间"; }
  .room-list td:nth-of-type(6)::before { content: "结束时间"; }
}
