* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f5fb;
  color: #222;
}

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

.page {
  display: none;
}

.page.active {
  display: block;
}

.card {
  max-width: 980px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card.wide {
  max-width: 1100px;
}

h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 28px;
  font-size: 34px;
}

.month-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
}

.month-header h2 {
  margin: 0;
  font-size: 26px;
}

.month-header button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #eef2ff;
  color: #3157d5;
  font-size: 30px;
  cursor: pointer;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
  font-size: 14px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend b {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.blue {
  background: #4f8cff;
}

.green {
  background: #4caf50;
}

.orange {
  background: #ff9800;
}

.red {
  background: #e53935;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}

.day-name {
  text-align: center;
  font-weight: bold;
  color: #3157d5;
  padding-bottom: 8px;
}

.date-cell {
  height: 88px;
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  background: #fafafa;
  font-size: 18px;
  border: 2px solid #e5e7eb;
  position: relative;
}

.date-cell:hover {
  transform: translateY(-2px);
  background: #f3f4f6;
  border-color: #d1d5db;
}

.date-cell.past {
  opacity: 0.45;
  cursor: not-allowed;
}

.date-cell.past:hover {
  transform: none;
  background: #fafafa;
  border-color: #e5e7eb;
}

.date-cell.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.date-cell.today {
  outline: 3px solid #3157d5;
}

.date-number {
  font-weight: bold;
}

.date-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.empty-day {
  background: #fafafa;
  border-color: #e5e7eb;
}

.low-day {
  background: #fafafa;
  border-color: #e5e7eb;
}

.mid-day {
  background: #fafafa;
  border-color: #e5e7eb;
}

.full-day {
  background: #fafafa;
  border-color: #e5e7eb;
}

.empty-day .date-status-dot {
  background: #4f8cff;
}

.low-day .date-status-dot {
  background: #4caf50;
}

.mid-day .date-status-dot {
  background: #ff9800;
}

.full-day .date-status-dot {
  background: #e53935;
}

.reserved-hour-text {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

.back-btn {
  border: none;
  background: #eef2ff;
  color: #3157d5;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
}

.time-summary {
  width: fit-content;
  margin: -12px auto 28px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
}

.time-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.time-layout h2 {
  text-align: center;
  font-size: 30px;
}

.time-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.time-block {
  height: 56px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  background: white;
  color: #1f2937;
  cursor: pointer;
  font-size: 17px;
}

.time-block:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.time-block.selected {
  background: #dbe5ff;
  border-color: #3157d5;
  color: #3157d5;
  font-weight: bold;
}

.time-block.reserved {
  background: #f3f4f6;
  border-color: #cbd5e1;
  color: #4b5563;
  font-weight: bold;
}

.time-block.reserved.selected {
  background: #e5e7eb;
  border-color: #6b7280;
  color: #111827;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-box {
  width: 430px;
  background: white;
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-box h2 {
  margin-top: 0;
}

.selected-time {
  padding: 12px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3157d5;
  font-weight: bold;
}

.modal-box label {
  font-weight: bold;
  margin-top: 8px;
}

.modal-box input,
.modal-box textarea {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
}

.modal-box textarea {
  height: 100px;
  resize: none;
}

.email-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-row input {
  flex: 1;
}

.btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-row button {
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  background: #3157d5;
  color: white;
}

.btn-row .cancel {
  background: #eee;
  color: #333;
}
