* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #1f2937;
}

header {
  background: #25D366;
  color: white;
  padding: 1.2rem 1.5rem;
}

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.subtitle code {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

main {
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

#calendar {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

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

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  z-index: 1;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn {
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-primary {
  background: #25D366;
  color: white;
}

.btn-secondary {
  background: #e5e7eb;
  color: #1f2937;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

#edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #374151;
}

#edit-form input,
#edit-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.hidden {
  display: none;
}

#calendar .fc-event-title,
#calendar .fc-event-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

#calendar .fc-daygrid-event-harness {
  max-width: 100%;
}

#calendar .fc-daygrid-day-events {
  overflow: hidden;
}
