:root {
  --ink: #17211f;
  --muted: #66736f;
  --paper: #f6f1e8;
  --white: #ffffff;
  --line: #ddd4c8;
  --sea: #0d6f73;
  --deep: #123f3f;
  --sun: #e5b84f;
  --clay: #bd6f55;
  --green: #2f8a5d;
  --yellow: #f0c84b;
  --red: #d65d53;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

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

h1 {
  max-width: 820px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: .95;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

h3 { font-size: 24px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 54px);
  color: var(--white);
  background: rgba(18, 63, 63, .82);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 45%, rgba(255,255,255,.85) 46% 54%, transparent 55%),
    radial-gradient(circle at 50% 70%, var(--sun) 0 20%, transparent 21%),
    var(--sea);
}

nav {
  display: flex;
  gap: 22px;
  color: rgba(255,255,255,.88);
  font-size: 14px;
  font-weight: 800;
}

nav a, .header-call {
  text-decoration: none;
}

.header-call {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 26px;
  align-items: end;
  padding: 130px clamp(16px, 5vw, 64px) 48px;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 26, 28, .86), rgba(9, 26, 28, .46) 54%, rgba(9, 26, 28, .7)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=2200&q=85") center / cover;
}

.hero-content {
  display: grid;
  gap: 22px;
  max-width: 900px;
}

.hero-content p {
  max-width: 660px;
  color: rgba(255,255,255,.88);
  font-size: 19px;
}

.eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow.dark {
  border-color: #c9bda9;
  color: var(--clay);
  background: rgba(255,255,255,.52);
}

.hero-actions,
.contact-strip,
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn,
button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary,
button {
  color: var(--white);
  background: var(--clay);
}

.btn.ghost {
  color: var(--white);
  border-color: rgba(255,255,255,.44);
  background: rgba(255,255,255,.08);
}

.btn.ghost.dark {
  color: var(--deep);
  border-color: #c8bba9;
  background: transparent;
}

.hero-panel,
.rules-card,
.booking-form {
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.hero-panel strong {
  font-size: 22px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.price-line b {
  white-space: nowrap;
}

.hero-panel small {
  color: var(--muted);
}

.section,
.booking-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 74px clamp(16px, 4vw, 48px);
}

.intro,
.split,
.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: 34px;
  align-items: start;
}

.intro p,
.section-title p,
.booking-copy p,
.contacts p {
  color: var(--muted);
  font-size: 18px;
}

.section-title {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 28px;
}

.public-map {
  display: grid;
  gap: 18px;
}

.public-row {
  display: grid;
  grid-template-columns: 90px repeat(2, minmax(120px, 1fr)) minmax(70px, .55fr) repeat(2, minmax(120px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.row-label,
.row-passage,
.house-card {
  min-height: 96px;
  border-radius: 8px;
}

.row-label,
.row-passage {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c7bcae;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.house-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cdd8cf;
  background: #eef8f0;
}

.house-card b {
  font-size: 20px;
}

.house-card span {
  color: var(--green);
  font-weight: 900;
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.amenities span {
  padding: 10px 12px;
  border: 1px solid #d5cabb;
  border-radius: 999px;
  background: var(--white);
  font-weight: 800;
}

.rules-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--white);
}

.rules-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.booking-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: start;
}

.booking-copy {
  display: grid;
  gap: 16px;
}

.contact-strip a {
  color: var(--deep);
  font-weight: 900;
}

.booking-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

textarea { resize: vertical; }

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-message {
  min-height: 24px;
  color: var(--green);
  font-weight: 900;
}

.form-message.error {
  color: var(--red);
}

.contacts {
  border-top: 1px solid var(--line);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(16px, 4vw, 54px);
  color: var(--white);
  background: var(--deep);
}

footer a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}

.admin-body {
  background: #f5f3ed;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px clamp(16px, 4vw, 46px);
  color: var(--white);
  background: var(--deep);
}

.admin-top p {
  color: rgba(255,255,255,.74);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-actions a {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
}

.admin-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 46px);
}

.admin-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
  gap: 18px;
  align-items: start;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.login-card {
  max-width: 420px;
  margin: 12vh auto;
}

.login-card form,
.admin-form {
  display: grid;
  gap: 12px;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.legend-dot {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

.legend-dot::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
}

.legend-dot.yellow::before { background: var(--yellow); }
.legend-dot.red::before { background: var(--red); }

.admin-map {
  display: grid;
  gap: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: 86px repeat(2, minmax(96px, 1fr)) minmax(58px, .45fr) repeat(2, minmax(96px, 1fr));
  gap: 10px;
}

.admin-house,
.admin-passage,
.admin-line {
  min-height: 94px;
  border-radius: 8px;
}

.admin-line,
.admin-passage {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.admin-house {
  display: grid;
  align-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 2px solid transparent;
  color: var(--ink);
  text-align: left;
  background: #e9f7ef;
}

.admin-house[data-state="confirmed"],
.admin-house[data-state="new"] {
  background: #fff5c7;
}

.admin-house[data-state="paid"],
.admin-house[data-state="blocked"] {
  color: var(--white);
  background: var(--red);
}

.admin-house b,
.admin-house span {
  display: block;
}

.admin-house span {
  font-size: 12px;
  font-weight: 800;
}

.booking-list {
  display: grid;
  gap: 12px;
}

.booking-item {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.booking-item:last-child {
  border-bottom: 0;
}

.booking-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.status {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-new { color: #806100; background: #fff2bc; }
.status-confirmed { color: #806100; background: #fff2bc; }
.status-paid { color: #9e332d; background: #ffe2df; }
.status-cancelled { color: #6d7370; background: #edf0ef; }

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions form {
  display: inline-flex;
  margin: 0;
}

.small-btn {
  min-height: 36px;
  padding: 8px 10px;
  border-color: #cdd7d1;
  color: var(--deep);
  background: var(--white);
  font-size: 13px;
}

.small-btn.primary {
  color: var(--white);
  background: var(--sea);
}

.small-btn.danger {
  color: #9e332d;
  background: #fff2f0;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  overflow: auto;
  padding: 18px;
  background: rgba(10, 22, 24, .58);
}

.modal-backdrop.is-open {
  display: block;
}

.modal {
  width: min(900px, 100%);
  margin: 3vh auto;
  padding: 20px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.modal-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  background: #f2f2f0;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .site-header {
    position: sticky;
    flex-wrap: wrap;
    color: var(--white);
  }

  nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .intro,
  .split,
  .booking-section,
  .contacts,
  .admin-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 62px;
  }

  .public-row,
  .admin-row {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .row-label,
  .admin-line {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .row-passage,
  .admin-passage {
    grid-column: 1 / -1;
    min-height: 30px;
  }
}

@media (max-width: 560px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  .header-call { width: 100%; text-align: center; }
  .two { grid-template-columns: 1fr; }
  .section, .booking-section { padding-top: 48px; padding-bottom: 48px; }
  .admin-top { flex-direction: column; }
  .admin-actions { justify-content: flex-start; }
}
