:root {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  background-color: #f1f5f9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem;
  min-height: 100vh;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.card h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.reserve-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

select,
input[type="time"],
input[type="date"] {
  padding: 0.5rem;
  border: 1px solid #cbd5f5;
  border-radius: 0.5rem;
  font-size: 1rem;
}

button {
  appearance: none;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.reservation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.reservation {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-radius: 0.8rem;
  padding: 0.75rem;
  border-left: 4px solid #60a5fa;
  gap: 1rem;
}

.reservation .details {
  flex: 1;
}

.reservation .meta {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}

.reservation.override {
  border-left-color: #f97316;
}

.reservation .time {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  min-width: 80px;
}

.time-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.time-slot .label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-slot .value {
  font-size: 1.2rem;
  color: #0f172a;
}

.cancel-form {
  margin-left: auto;
}

.cancel-button {
  background: #ef4444;
}

.tag {
  display: inline-flex;
  padding: 0.1rem 0.5rem;
  background: #fde68a;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #92400e;
}

.empty-state {
  color: #94a3b8;
  margin: 0;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  animation: fadeIn 0.3s ease;
}

.toast.success {
  background: rgba(16, 185, 129, 0.95);
}

.conflict-dialog {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.conflict-dialog.is-visible {
  visibility: visible;
  opacity: 1;
}

.dialog-content {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.3);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dialog-actions button {
  flex: 1;
}

.dialog-actions button:first-child {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-picker {
    width: 100%;
  }

  .date-picker input,
  .date-picker button {
    flex: 1;
  }

  .reservation {
    flex-direction: row;
    align-items: center;
  }

  .cancel-form {
    width: auto;
  }

  .cancel-button {
    width: auto;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

