:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #61706a;
  --paper: #fbfaf5;
  --card: rgba(255, 255, 255, 0.88);
  --line: #dce3dc;
  --green: #185c45;
  --green-dark: #104536;
  --green-soft: #e4f1ea;
  --gold: #d8a646;
  --danger: #a33b32;
  --shadow: 0 24px 70px rgba(23, 54, 43, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 166, 70, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(24, 92, 69, 0.12), transparent 32rem),
    var(--paper);
}
button, input { font: inherit; }
textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(100% - 32px, 820px); margin: 0 auto; padding: 36px 0 64px; }
.hero { display: flex; align-items: center; gap: 20px; padding: 0 0 24px; }
.brand-mark {
  display: grid; flex: 0 0 auto; place-items: center; width: 48px; height: 48px;
  border-radius: 16px; color: #fff; background: var(--green); font: 700 26px/1 Georgia, serif;
  box-shadow: 0 10px 24px rgba(24, 92, 69, 0.25); transform: rotate(-3deg);
}
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { margin: 0; max-width: 800px; font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -0.045em; }
.admin-header h1 { font-size: clamp(2.35rem, 5vw, 4rem); }
h2 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.55rem); letter-spacing: -0.035em; }
h3 { margin: 0; font-size: 1.3rem; text-transform: capitalize; }
.intro { max-width: 650px; margin: 8px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.booking-card {
  margin-bottom: 20px; padding: clamp(20px, 4vw, 30px); border: 1px solid rgba(24, 92, 69, 0.12);
  border-radius: 24px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.compact-card { max-width: 520px; margin-top: 44px; }
.section-heading, .admin-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-header { margin-bottom: 36px; }
.header-actions { display: flex; gap: 18px; align-items: center; }
.status { min-height: 20px; margin: 10px 0 14px; color: var(--muted); font-size: 0.88rem; }
.status:empty { display: none; }
.days { display: grid; }
.day-card { padding: 20px 0; border-top: 1px solid var(--line); }
.day-card:first-child { padding-top: 0; border-top: 0; }
.day-card:last-child { padding-bottom: 0; }
.day-notice { margin: 12px 0 0; padding: 11px 13px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; color: #66501f; background: #fff7df; font-size: 0.9rem; line-height: 1.45; }
.admin-days { display: grid; gap: 12px; }
.admin-day { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(251, 250, 245, 0.75); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.slot-button {
  display: grid; place-content: center; gap: 3px; min-height: 48px; padding: 8px 10px; border: 1px solid #b9d1c5; border-radius: 13px; color: var(--green-dark); background: var(--green-soft);
  font-weight: 800; cursor: pointer; transition: transform 150ms ease, color 150ms ease, background 150ms ease;
}
.slot-button:hover { transform: translateY(-2px); color: #fff; background: var(--green); }
.slot-button.booked { color: #756d63; border-color: #d8d2c8; background: #f0ede7; cursor: not-allowed; }
.slot-button.booked:hover { transform: none; color: #756d63; background: #f0ede7; }
.slot-button.booked:disabled { opacity: 1; }
.slot-time { font-weight: 850; }
.slot-name { overflow: hidden; max-width: 100%; font-size: 0.74rem; font-weight: 650; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.text-button { padding: 0; border: 0; color: var(--green); background: transparent; font-weight: 800; text-decoration: none; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #c8d8d0; border-radius: 12px; color: var(--green); background: var(--green-soft); cursor: pointer; }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { color: #fff; background: var(--green); }
.icon-button.loading svg { animation: spin 700ms linear infinite; }
.icon-button:disabled { opacity: 0.6; cursor: wait; }
@keyframes spin { to { transform: rotate(360deg); } }
.primary-button {
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; color: #fff; background: var(--green);
  font-weight: 800; cursor: pointer; box-shadow: 0 9px 20px rgba(24, 92, 69, 0.2);
}
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { opacity: 0.62; cursor: wait; }
dialog { width: min(100% - 30px, 520px); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(16, 38, 30, 0.28); }
dialog::backdrop { background: rgba(10, 27, 21, 0.58); backdrop-filter: blur(5px); }
dialog form { position: relative; padding: 38px; }
.dialog-close { position: absolute; top: 18px; right: 20px; border: 0; color: var(--muted); background: transparent; font-size: 1.75rem; cursor: pointer; }
.selected-slot { margin: 18px 0 24px; padding: 14px 16px; border-radius: 12px; color: var(--green-dark); background: var(--green-soft); font-weight: 750; text-transform: capitalize; }
label { display: grid; gap: 8px; color: var(--ink); font-size: 0.9rem; font-weight: 750; }
input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid #bec9c3; border-radius: 12px; color: var(--ink); background: #fff; }
textarea { width: 100%; min-height: 88px; padding: 12px 14px; resize: vertical; border: 1px solid #bec9c3; border-radius: 12px; color: var(--ink); background: #fff; }
input:focus, textarea:focus { outline: 3px solid rgba(24, 92, 69, 0.15); border-color: var(--green); }
dialog .primary-button, .stack-form .primary-button { width: 100%; margin-top: 12px; }
.privacy-note { margin: 14px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 0.9rem; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 14px; color: #fff; background: var(--green-dark); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: 180ms ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }
.stack-form { display: grid; gap: 6px; margin-top: 24px; }
.availability-form { display: grid; grid-template-columns: 1.35fr 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 26px; }
.availability-form .primary-button { min-width: 120px; }
.notice-form { display: grid; grid-template-columns: minmax(150px, 0.7fr) 2fr auto; gap: 12px; align-items: end; margin-top: 26px; }
.notice-form .primary-button { min-width: 160px; }
.notice-list { display: grid; margin-top: 10px; }
.notice-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.notice-row p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.admin-list { display: grid; margin-top: 15px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-row > div:first-child { display: flex; align-items: baseline; gap: 14px; }
.admin-row strong { min-width: 46px; color: var(--green-dark); }
.admin-row span { color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.danger-button, .ghost-danger { padding: 8px 11px; border-radius: 10px; font-size: 0.8rem; font-weight: 750; cursor: pointer; }
.danger-button { border: 1px solid #e2b7b3; color: var(--danger); background: #fff0ee; }
.ghost-danger { border: 1px solid transparent; color: var(--muted); background: transparent; }
.ghost-danger:hover { color: var(--danger); background: #fff0ee; }

@media (max-width: 700px) {
  .page-shell { width: min(100% - 22px, 820px); padding-top: 20px; }
  .hero { align-items: flex-start; gap: 13px; padding-bottom: 18px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 14px; font-size: 23px; }
  h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .intro { font-size: 0.92rem; }
  .booking-card { padding: 22px; border-radius: 22px; }
  .section-heading, .admin-header { align-items: flex-start; }
  .admin-header { flex-direction: column; }
  .availability-form { grid-template-columns: 1fr 1fr; }
  .availability-form label:first-child, .availability-form .primary-button { grid-column: 1 / -1; }
  .notice-form { grid-template-columns: 1fr; }
  .admin-row { align-items: flex-start; flex-direction: column; }
  .row-actions { justify-content: flex-start; }
  dialog form { padding: 32px 24px; }
}
