:root {
  --navy: #1c2b3a;
  --orange: #e0621d;
  --orange-dark: #c14f13;
  --green: #2a9d5c;
  --red: #c53030;
  --bg: #f7f5f2;
  --card: #ffffff;
  --border: #e3ddd4;
  --text: #24303d;
  --muted: #6b7583;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 14px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 { font-size: 1.4rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 24px 0 10px; }

.hero { text-align: center; padding: 12px 0 4px; }
.hero-sub { color: var(--muted); margin-bottom: 20px; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.info-card ol { margin: 0; padding-left: 20px; }
.info-card li { margin-bottom: 6px; }

.admin-link { text-align: center; margin-top: 24px; }
.admin-link a { color: var(--muted); font-size: 0.85rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  min-height: 46px;
}
.btn-block { width: 100%; }
.btn-small { padding: 8px 14px; font-size: 0.85rem; min-height: 36px; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:active { background: var(--orange-dark); }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f0c1c1; }

.stacked-form { display: flex; flex-direction: column; }
.stacked-form label { font-size: 0.85rem; font-weight: 600; margin: 14px 0 6px; }
.stacked-form input,
.stacked-form select,
.stacked-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.stacked-form textarea { resize: vertical; }
.stacked-form button { margin-top: 20px; }

.form-footer { text-align: center; margin-top: 18px; font-size: 0.9rem; }

.flash-stack { margin-bottom: 16px; }
.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.flash-error { background: #fdecec; color: var(--red); border: 1px solid #f5c2c2; }
.flash-success { background: #e8f6ee; color: var(--green); border: 1px solid #bde5cc; }

.list-section { margin-top: 8px; }
.booking-list, .date-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.booking-card, .date-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.booking-card-wide { flex-direction: column; align-items: stretch; }
.restaurant-meta { margin-top: 8px; font-size: 0.85rem; }

.muted { color: var(--muted); font-size: 0.85rem; display: block; }

.badge {
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eee;
  color: var(--muted);
  white-space: nowrap;
}
.badge-open { background: #e8f6ee; color: var(--green); }
.badge-cancelled { background: #fdecec; color: var(--red); }
.badge-past { background: #eef1f4; color: var(--muted); }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}
.calendar-heading {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 4px;
}
.calendar-cell {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  min-height: 54px;
  min-width: 0;
  padding: 3px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  overflow: hidden;
}
.calendar-cell-outside { opacity: 0.35; }
.calendar-cell-past { background: #f1f1ee; color: var(--muted); }
.calendar-cell-open { border-color: var(--green); }
.calendar-cell-booked { border-color: var(--orange); background: #fff3ea; }
.calendar-date { font-weight: 700; font-size: 0.75rem; }
.calendar-tag {
  font-size: 0.55rem;
  color: var(--orange-dark);
  text-align: center;
  line-height: 1.15;
  overflow-wrap: break-word;
  max-width: 100%;
}

.calendar-toggle {
  border: none;
  background: #eef1f4;
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.58rem;
  padding: 2px 1px;
  width: 100%;
  min-width: 0;
}
.calendar-cell-open .calendar-toggle { background: var(--green); color: #fff; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 20px 16px 30px;
}

@media (min-width: 600px) {
  .hero-actions { flex-direction: row; justify-content: center; }
  .btn { min-width: 180px; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 33, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.18);
}
.modal-box p {
  margin: 0 0 18px;
  font-size: 1rem;
  font-weight: 600;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .btn { flex: 1; }

@media (min-width: 600px) {
  .modal-backdrop { align-items: center; }
}
