@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap');

:root {
  --forest: #24483e;
  --forest-soft: #e3eee7;
  --clay: #c98272;
  --clay-soft: #f2dfd9;
  --cream: #f7f6f1;
  --paper: #fffefa;
  --ink: #27332e;
  --muted: #737c75;
  --line: #e7e8df;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
}
.page { max-width: 1120px; margin: auto; padding: 42px 24px 28px; }
.hero { text-align: center; margin: 0 auto 32px; max-width: 680px; }
.eyebrow { color: var(--forest); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; }
h1 { font: 600 clamp(32px, 5vw, 48px) 'Playfair Display', Georgia, serif; margin: 10px 0 12px; }
.hero p { color: var(--muted); margin: 0; line-height: 1.7; }
.toolbar { display: flex; justify-content: center; align-items: center; gap: 24px; margin: 28px 0 20px; }
.toolbar h2 { min-width: 220px; text-align: center; font: 600 23px 'Playfair Display', Georgia, serif; margin: 0; }
.nav { border: 1px solid var(--line); background: var(--paper); border-radius: 50%; width: 42px; height: 42px; color: var(--forest); font-size: 20px; cursor: pointer; }
.nav:hover { background: var(--forest-soft); }
.nav:disabled { opacity: .35; cursor: not-allowed; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.free { background: #b8d5c2; }
.dot.booked { background: var(--clay); }
.dot.unknown { background: #b8b8b3; }
.status { text-align: center; color: var(--muted); font-size: 13px; min-height: 20px; margin-bottom: 12px; }
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.room-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 4px 18px #27332e05; min-width: 0; }
.room-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.room-head h3 { font: 600 22px 'Playfair Display', Georgia, serif; margin: 0; }
.room-head .number { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.weekday { color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; padding: 5px 0 8px; }
.day { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 7px; font-size: 13px; background: var(--forest-soft); color: var(--forest); }
.day.booked { background: var(--clay-soft); color: #854b3d; }
.day.blank { background: transparent; }
.day.today { outline: 2px solid var(--forest); outline-offset: -2px; font-weight: 700; }
.day.unknown { background: #e8e8e4; color: #666; }
footer { margin: 28px auto 0; max-width: 720px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.7; }

.admin-page { max-width: 760px; }
.admin-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 4px 18px #27332e05; }
.admin-panel h2, .saved-heading h2 { font: 600 23px 'Playfair Display', Georgia, serif; margin: 0 0 18px; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-heading h2 { margin-bottom: 18px; }
.admin-form, #login-form { display: grid; gap: 10px; }
.admin-form label, #login-form label { color: var(--ink); font-size: 13px; font-weight: 700; margin-top: 4px; }
.admin-form input, .admin-form select, #login-form input {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: #fff; color: var(--ink); font: inherit;
}
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.date-fields > div { display: grid; gap: 10px; }
.primary-button, .secondary-button, .delete-button {
  border: 0; border-radius: 9px; padding: 12px 16px; font: 600 14px 'DM Sans', Arial, sans-serif; cursor: pointer;
}
.primary-button { background: var(--forest); color: white; margin-top: 8px; }
.primary-button:hover { background: #18382f; }
.secondary-button { background: var(--forest-soft); color: var(--forest); padding: 9px 12px; }
.delete-button { background: var(--clay-soft); color: #854b3d; padding: 8px 11px; }
button:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 20px; color: var(--muted); font-size: 13px; }
.saved-heading { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.saved-heading h2 { margin-bottom: 12px; }
.blocks-list { display: grid; gap: 10px; }
.block-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.block-details { display: grid; gap: 4px; min-width: 0; }
.block-details strong { color: var(--forest); }
.block-details span, .block-details small, .muted { color: var(--muted); font-size: 13px; }
.block-details small { overflow-wrap: anywhere; }
.admin-back { text-align: center; margin-top: 22px; font-size: 13px; }
.admin-back a { color: var(--forest); }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .page { padding: 28px 14px 22px; }
  .rooms { grid-template-columns: 1fr; gap: 12px; }
  .room-card { padding: 16px; }
  .toolbar { gap: 12px; }
  .toolbar h2 { min-width: 0; flex: 1; font-size: 21px; }
  .legend { gap: 10px 14px; font-size: 12px; }
}
@media (max-width: 480px) {
  .admin-panel { padding: 17px; }
  .date-fields { grid-template-columns: 1fr; gap: 8px; }
  .block-item { align-items: flex-start; }
}
