* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #1f2937;
}

.wrapper {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  padding: 28px;
}

.card-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.card-header p {
  margin: 0;
  opacity: 0.95;
}

.content {
  padding: 28px;
}

.info-box {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 14px;
}

.error-box {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.success-box {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.section {
  margin-bottom: 28px;
}

.section h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.month-select {
  width: 100%;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
}

.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.weekday-header div {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #4b5563;
  padding: 8px 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-spacer {
  min-height: 90px;
}

.day-button {
  width: 100%;
  min-height: 90px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.day-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.day-button:disabled {
  cursor: not-allowed;
  opacity: 1;
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.day-button.selected-start,
.day-button.selected-end {
  border-color: #2563eb;
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.day-button.in-range {
  background: #eff6ff;
  border-color: #93c5fd;
}

.day-button.selected-start .day-number,
.day-button.selected-end .day-number {
  color: #1d4ed8;
}

.day-number {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.day-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

.day-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.day-button.free .day-status {
  color: #166534;
}

.day-button:disabled .day-status {
  color: #9ca3af;
}

.selection-box {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.selection-row {
  margin-bottom: 8px;
}

.hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  margin-top: 16px;
}

.submit-button {
  padding: 14px 22px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}

.submit-button:hover {
  opacity: 0.95;
}