:root {
  --ink: #24201d;
  --muted: #6f6861;
  --line: #e6e0d8;
  --paper: #ffffff;
  --soft: #f7f3ee;
  --deep: #1f2933;
  --amber: #c46f22;
  --amber-dark: #9b5318;
  --teal: #1d6f68;
  --green: #217a45;
  --red: #b83232;
  --shadow: 0 14px 36px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.is-hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.1rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button--primary {
  background: var(--amber);
  color: #fff;
}

.button--primary:hover {
  background: var(--amber-dark);
}

.button--dark {
  background: var(--deep);
  color: #fff;
}

.button--dark:hover {
  background: #111923;
}

.button--full {
  width: 100%;
}

.text-link {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #27313b;
}

.hero__media,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__media {
  background: linear-gradient(135deg, #27313b 0%, #32453d 50%, #6f4a2b 100%);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media--empty {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.hero__fallback {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5rem;
  line-height: 0.95;
  text-align: center;
}

.hero__overlay {
  background: rgba(0, 0, 0, 0.48);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  text-align: center;
}

.hero__content .eyebrow {
  color: #f4c27c;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1rem;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 0 auto 1.5rem;
  font-size: 1.25rem;
}

.hero__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero__nav--prev {
  left: 1rem;
}

.hero__nav--next {
  right: 1rem;
}

.hero__nav[hidden] {
  display: none;
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0;
}

.section--intro {
  padding-top: 5rem;
}

.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 2rem;
  align-items: start;
}

.section__grid h2,
.section__header h2,
.section__titleline h2 {
  margin: 0.35rem 0 1rem;
  font-size: 2.35rem;
}

.section__grid p + p {
  margin-top: 1rem;
}

.section__header {
  max-width: 680px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section__titleline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-panel,
.calendar-card,
.booking-form-panel,
.admin-card,
.login-card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.info-panel {
  padding: 1.5rem;
}

.info-panel h3 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.info-panel dl {
  display: grid;
  gap: 1rem;
  margin: 0 0 1rem;
}

.info-panel dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.info-panel dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
}

.amenities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.amenities article {
  min-height: 138px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.amenities span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(29, 111, 104, 0.12);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 900;
}

.amenities p {
  font-weight: 750;
}

.gallery-preview,
.gallery-grid,
.admin-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-preview__item,
.gallery-grid__item,
.admin-gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #ddd4c8;
}

.gallery-preview__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-preview__item img,
.gallery-grid__item img,
.admin-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-preview__item:hover img,
.gallery-grid__item:hover img {
  transform: scale(1.04);
}

.gallery-placeholder,
.empty-gallery {
  padding: 3rem 1rem;
  border: 1px dashed #cfc5b9;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.map-frame {
  height: 410px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #d9d0c3;
  box-shadow: var(--shadow);
}

.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  align-items: stretch;
}

.calendar-card {
  padding: 1.5rem;
  border-radius: 8px 0 0 8px;
}

.booking-form-panel {
  padding: 1.5rem;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #fbfaf8;
}

.calendar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.calendar-head h2 {
  font-size: 1.65rem;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-transform: capitalize;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

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

.calendar-grid--weekdays {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day,
.calendar-blank {
  aspect-ratio: 1;
}

.calendar-day {
  display: grid;
  place-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
}

.calendar-day:hover {
  background: rgba(196, 111, 34, 0.12);
}

.calendar-day.is-today {
  border-color: var(--amber);
  color: var(--amber-dark);
  font-weight: 900;
}

.calendar-day.is-selected {
  background: var(--amber);
  color: #fff;
  font-weight: 900;
}

.calendar-day.is-blocked,
.calendar-day.is-approved,
.calendar-day.is-past {
  background: #eee8e0;
  color: #aaa096;
  cursor: not-allowed;
  text-decoration: line-through;
}

.calendar-day.is-pending {
  background: #f5dfbf;
  color: #7a470e;
  cursor: not-allowed;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend__dot--selected {
  background: var(--amber);
}

.legend__dot--pending {
  background: #f5dfbf;
  border: 1px solid #ddb477;
}

.legend__dot--blocked {
  background: #ddd5cb;
}

.empty-state {
  display: grid;
  min-height: 100%;
  place-items: center;
  gap: 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.reservation-form,
.login-card,
.admin-card {
  display: grid;
  gap: 1rem;
}

.reservation-form h3 {
  font-size: 1.35rem;
}

label {
  display: grid;
  gap: 0.4rem;
  color: #403b35;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8d0c7;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0.72rem 0.85rem;
}

input:focus,
select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(29, 111, 104, 0.15);
}

.form-message {
  min-height: 1.2em;
  color: var(--red);
  font-size: 0.92rem;
  font-weight: 700;
}

.form-message.is-success {
  color: var(--green);
}

.footer {
  padding: 3rem 1rem;
  background: var(--deep);
  color: #d8dee4;
  text-align: center;
}

.footer__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer__actions a,
.footer__admin {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.footer__admin {
  display: inline-block;
  margin-top: 0.8rem;
  color: #b9c7d3;
  font-size: 0.9rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 1.35rem;
}

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

.gallery-grid__item {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox img {
  max-width: min(100%, 1100px);
  max-height: 86vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox p {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.5rem 1rem;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
}

.admin-shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #eef2f1;
}

.login-card {
  width: min(430px, 100%);
  padding: 2rem;
}

.login-card h1 {
  margin-bottom: 0.35rem;
  font-size: 1.85rem;
}

.login-card p {
  color: var(--muted);
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.4rem;
  background: var(--deep);
  color: #dbe2e8;
}

.admin-sidebar h1 {
  color: #fff;
  font-size: 1.3rem;
}

.admin-sidebar p {
  color: #9fb0bd;
  font-size: 0.9rem;
}

.admin-sidebar nav,
.admin-sidebar__bottom {
  display: grid;
  gap: 0.5rem;
}

.admin-sidebar__bottom {
  margin-top: auto;
}

.admin-nav {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 0.7rem 0.85rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}

.admin-nav:hover,
.admin-nav.is-active {
  background: var(--amber);
  color: #fff;
}

.admin-content {
  min-width: 0;
  padding: 2rem;
}

.admin-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-panel__header h2 {
  font-size: 1.95rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filters select {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eee8e0;
  vertical-align: middle;
  text-align: left;
}

.admin-table th {
  background: #f6f1eb;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.92rem;
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.status--pending {
  background: #f5dfbf;
  color: #7a470e;
}

.status--approved {
  background: #dff2e6;
  color: #176437;
}

.status--rejected {
  background: #f8dddd;
  color: #922929;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
}

.small-button {
  min-width: 36px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  color: #fff;
  font-weight: 900;
}

.small-button--approve {
  background: var(--green);
}

.small-button--reject,
.small-button--delete {
  background: var(--red);
}

.small-button--neutral {
  background: var(--deep);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-card {
  align-content: start;
  padding: 1.2rem;
}

.admin-card h3 {
  font-size: 1.15rem;
}

.date-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.date-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
}

.admin-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-gallery__item {
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid var(--line);
}

.admin-gallery__item footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
}

.admin-gallery__item footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1.05rem;
  }

  .hero__fallback {
    font-size: 3.4rem;
  }

  .section__grid,
  .booking,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .calendar-card,
  .booking-form-panel {
    border-radius: 8px;
  }

  .booking-form-panel {
    border-left: 1px solid var(--line);
    border-top: 0;
  }

  .amenities,
  .gallery-preview,
  .gallery-grid,
  .admin-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav,
  .admin-sidebar__bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 76vh;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero__nav {
    display: none;
  }

  .section {
    width: min(100% - 1rem, 1120px);
    padding: 3rem 0;
  }

  .section__titleline,
  .calendar-head,
  .admin-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .section__grid h2,
  .section__header h2,
  .section__titleline h2 {
    font-size: 1.95rem;
  }

  .amenities,
  .gallery-preview,
  .gallery-grid,
  .admin-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-preview__item:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .topbar span {
    display: none;
  }

  .admin-content {
    padding: 1rem;
  }

  .admin-sidebar nav,
  .admin-sidebar__bottom,
  .filters {
    grid-template-columns: 1fr;
  }

  .filters select {
    width: 100%;
  }
}
