:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-alt: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --accent: #16a34a;
  --danger: #dc2626;
  --border: rgba(107, 114, 128, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 0.95rem;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #ffffff;
  color: var(--text);
}

body {
  padding: 24px;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: center;
}

.hero-copy {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  margin: 0 0 12px;
  font-size: 0.8rem;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 2.4vw, 3.6rem);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy .note {
  margin-top: 12px;
  font-size: 0.95rem;
}

.hero-image {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header p {
  margin-top: 8px;
  color: var(--muted);
}

label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
}

#reservation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group.full,
.form-actions.full {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.18);
  background: #ffffff;
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  min-height: 52px;
}

.date-field-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  position: relative;
}

.date-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(107, 114, 128, 0.18);
  background: #f8fafc;
  cursor: pointer;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.date-button::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.date-input {
  padding-right: 16px;
}

.hidden-picker {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  opacity: 0;
  border: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
  z-index: 2;
}

.hidden {
  display: none !important;
}

textarea {
  resize: vertical;
  min-height: 52px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.form-actions button {
  flex: 1 1 160px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  font: inherit;
}

button.primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
  border: 1px solid rgba(107, 114, 128, 0.22);
}

.hidden {
  display: none !important;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.small-button {
  border: 1px solid rgba(107, 114, 128, 0.18);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.95rem;
  background: rgba(229, 231, 235, 0.7);
  color: var(--text);
  cursor: pointer;
}

.small-button.secondary {
  background: rgba(248, 113, 128, 0.12);
}

.status {
  margin-top: 18px;
  color: var(--accent);
  min-height: 1.3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 20px;
  border-radius: 22px;
  background: var(--surface-alt);
  border: 1px solid rgba(107, 114, 128, 0.14);
}

.stat-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--muted);
}

.stat-card p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.6;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.calendar-nav button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(229, 231, 235, 0.9);
  color: var(--text);
}

#calendar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.calendar-cell,
.calendar-label {
  border-radius: 16px;
  min-height: 88px;
  padding: 12px;
  background: rgba(243, 244, 246, 0.95);
  border: 1px solid rgba(207, 214, 228, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-label {
  text-align: center;
  min-height: auto;
  font-weight: 700;
  color: var(--muted);
}

.calendar-day {
  font-size: 0.95rem;
  font-weight: 700;
}

.calendar-cell.reserved {
  background: #d9dde3;
  border-color: rgba(34, 197, 94, 0.35);
}

.calendar-cell.today {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.calendar-cell .owner {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.history-item {
  padding: 18px;
  border-radius: 22px;
  background: rgba(243, 244, 246, 0.9);
  border: 1px solid rgba(207, 214, 228, 0.8);
}

.history-item h4 {
  margin: 0 0 8px;
}

.history-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .calendar-cell,
  .calendar-label {
    min-height: 72px;
  }
}
