.booking-page {
  --desk-w: 52px;
  --desk-h: 36px;
  --wood: #6b4423;
  --wood-light: #8b5a2b;
  --chair: #2d2d2d;
  --wall: #c5cdd8;
  --floor-booked: #9ca3af;
  --floor-booked-opacity: 0.55;
}

.booking-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.booking-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.booking-toolbar input[type="date"] {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  min-width: 180px;
}

.booking-intro {
  flex: 1;
  min-width: 220px;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.booking-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 20px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.legend-swatch.free {
  background: linear-gradient(135deg, var(--wood-light), var(--wood));
}

.legend-swatch.busy {
  background: var(--floor-booked);
  opacity: var(--floor-booked-opacity);
}

.floor-wrapper {
  position: relative;
  background: #f8fafc;
  border: 2px solid var(--wall);
  border-radius: 16px;
  padding: 20px;
  overflow: auto;
  min-height: 520px;
}

.floor-plan {
  display: grid;
  grid-template-columns: 150px 1fr 210px;
  gap: 12px;
  min-width: 720px;
  min-height: 480px;
}

.floor-left-col {
  grid-column: 1;
}

.room-small-meeting-wrap {
  position: relative;
  min-height: 240px;
  height: 100%;
}

.room-small-meeting-wrap > .zone-small-meeting {
  width: 100%;
  min-height: 240px;
  height: 100%;
}

.floor-main > .zone-online {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 100px;
  min-height: 82px;
  padding: 6px 8px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(17, 32, 51, 0.12);
  background: #fff;
}

.floor-main > .zone-online .room-icon {
  width: 100%;
  max-height: 36px;
}

.floor-main > .zone-online .room-label {
  font-size: 0.65rem;
  margin-top: 4px;
}

.floor-plan > .floor-main {
  grid-column: 2;
}

.floor-plan > .zone-conference {
  grid-column: 3;
}

.zone-room {
  border: 3px solid var(--wall);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.2s, transform 0.15s;
  position: relative;
}

.zone-room:hover:not(.is-booked) {
  box-shadow: 0 0 0 3px var(--blue);
  transform: translateY(-2px);
}

.zone-room.is-booked {
  opacity: var(--floor-booked-opacity);
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.zone-small-meeting {
  min-height: 220px;
}

.zone-conference {
  min-height: 420px;
}

.room-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.2;
}

.room-icon {
  width: 70%;
  max-height: 60%;
  opacity: 0.85;
}

.floor-main {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 16px;
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
}

.cluster-top {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.cluster-solo {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  padding-top: 8px;
}

.floor-desks-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex: 1;
  margin-top: 0;
  align-items: center;
}

.desk-cluster {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desk-pair-row {
  display: flex;
  gap: 4px;
}

.desk-unit {
  width: var(--desk-w);
  height: var(--desk-h);
  background: linear-gradient(145deg, var(--wood-light), var(--wood));
  border-radius: 4px;
  border: 1px solid #4a3018;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.2s, transform 0.12s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.desk-unit::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 10px;
  background: var(--chair);
  border-radius: 50% 50% 40% 40%;
}

.desk-unit:hover:not(.is-booked) {
  box-shadow: 0 0 0 3px var(--cyan);
  transform: scale(1.06);
  z-index: 2;
}

.desk-unit.is-booked {
  opacity: var(--floor-booked-opacity);
  filter: grayscale(0.85);
  cursor: not-allowed;
  background: var(--floor-booked);
}

.desk-unit.is-booked::after {
  opacity: 0.5;
}

.desk-unit .desk-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* Detail panel */
.booking-detail-panel {
  display: none;
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.booking-detail-panel.is-open {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-header h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.btn-back:hover {
  background: var(--line);
}

.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
}

.equipment-list li {
  padding: 6px 12px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.schedule-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.schedule-badge--weekday {
  background: #dbeafe;
  color: #1d4ed8;
}

.schedule-badge--gamer {
  background: #fce7f3;
  color: #9d174d;
}

.schedule-hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 14px;
}

.gamer-headcount-block {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fdf2f8;
  border: 1px solid #f9a8d4;
}

.gamer-headcount-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #9d174d;
}

.gamer-headcount-label select {
  padding: 10px 12px;
  border: 1px solid #f9a8d4;
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  color: #1e293b;
  background: #fff;
}

.gamer-headcount-hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.schedule-closed {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
}

.time-range-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.time-range-picker label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.time-range-picker select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
}

.existing-bookings {
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.existing-bookings-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.existing-bookings ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.slot-btn {
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: #eff6ff;
}

.slot-btn.selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.slot-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.booking-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.booking-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.booking-form-grid input,
.booking-form-grid textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
}

.form-feedback.error {
  color: #b91c1c;
}

.booking-success {
  padding: 16px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  color: #065f46;
  font-weight: 500;
}

@media (max-width: 900px) {
  .floor-plan {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .zone-small-meeting,
  .zone-conference,
  .zone-online,
  .floor-main {
    grid-column: 1;
    grid-row: auto;
  }

  .floor-desks-row {
    flex-direction: column;
    align-items: center;
  }

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