:root {
  --ink: #17211f;
  --muted: #5f6f6b;
  --paper: #faf8f2;
  --panel: #ffffff;
  --line: #dfe4de;
  --teal: #007c79;
  --teal-dark: #075957;
  --coral: #e85d4f;
  --gold: #f5a623;
  --shadow: 0 24px 70px rgba(21, 38, 35, 0.14);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
}

button:hover {
  background: var(--teal-dark);
}

button:disabled {
  background: #9eaaa8;
  cursor: not-allowed;
}

.secondary {
  background: #edf3f1;
  color: var(--teal-dark);
}

.topbar {
  align-items: center;
  background: rgba(250, 248, 242, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(223, 228, 222, 0.75);
  display: flex;
  height: 72px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.nav {
  align-items: center;
  display: flex;
  gap: 16px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 900;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.brand-mark svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
}

.hero {
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.hero img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(12, 25, 23, 0.74), rgba(12, 25, 23, 0.44) 48%, rgba(12, 25, 23, 0.12));
  inset: 0;
  position: absolute;
}

.hero-content {
  color: #fff;
  max-width: 760px;
  padding: 96px clamp(20px, 6vw, 72px) 160px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffb2a9;
}

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

h1 {
  font-size: clamp(2.35rem, 6vw, 5.6rem);
  line-height: 0.97;
  margin-bottom: 24px;
  max-width: 900px;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 650px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-points span {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 9px 13px;
}

.search-band {
  margin: -78px auto 28px;
  max-width: 1180px;
  padding: 0 18px;
  position: relative;
  z-index: 4;
}

.search-panel,
.partner-form {
  background: var(--panel);
  border: 1px solid rgba(223, 228, 222, 0.9);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.search-panel {
  border-radius: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  padding: 16px;
}

label,
fieldset {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

input,
select {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: block;
  margin-top: 7px;
  min-height: 44px;
  padding: 0 12px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 124, 121, 0.16);
}

.workspace {
  display: grid;
  gap: 22px;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  margin: 0 auto;
  max-width: 1380px;
  padding: 18px clamp(18px, 4vw, 48px) 56px;
}

.filters,
.booking-card,
.hostel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters,
.booking-card {
  align-self: start;
  padding: 20px;
  position: sticky;
  top: 92px;
}

.filters {
  display: grid;
  gap: 20px;
}

.filters p,
.partner-band p,
.booking-card p,
.hostel-card p {
  color: var(--muted);
  line-height: 1.55;
}

fieldset {
  border: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

legend {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

fieldset label {
  align-items: center;
  display: flex;
  gap: 10px;
}

input[type="checkbox"] {
  accent-color: var(--teal);
  height: 18px;
  margin: 0;
  min-height: 18px;
  width: 18px;
}

input[type="range"] {
  accent-color: var(--teal);
  padding: 0;
}

#priceLabel {
  color: var(--ink);
  display: block;
  font-size: 0.92rem;
  margin-top: 8px;
}

.results-header {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.results-header label {
  min-width: 190px;
}

.cards {
  display: grid;
  gap: 16px;
}

.hostel-card {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr) 175px;
  overflow: hidden;
}

.card-gallery {
  display: grid;
  gap: 6px;
  min-height: 260px;
  padding: 8px;
}

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

.gallery-main {
  border-radius: 6px;
  min-height: 168px;
}

.gallery-strip {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  min-height: 80px;
}

.gallery-strip img {
  border-radius: 6px;
}

.card-body {
  padding: 18px 0;
}

.meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 9px;
  margin-bottom: 12px;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  background: #edf3f1;
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 6px 10px;
}

.card-action {
  align-content: center;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 18px;
}

.price {
  font-size: 1.55rem;
  font-weight: 950;
}

.price span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
}

.room-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.room-option {
  align-items: center;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.room-option strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.room-option span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.line {
  display: flex;
  justify-content: space-between;
}

.line strong {
  font-size: 1.1rem;
}

.guest-form {
  display: grid;
  gap: 12px;
}

.payment-options {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 2px 0 0;
  padding: 12px;
}

.payment-options legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 6px;
  text-transform: uppercase;
}

.payment-option {
  align-items: flex-start;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  padding: 12px;
}

.payment-option input {
  accent-color: var(--teal);
  margin-top: 3px;
  min-height: 18px;
  padding: 0;
}

.payment-option strong,
.payment-option small {
  display: block;
}

.payment-option small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 3px;
}

.confirmation-card {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 16px;
}

.confirmation-card[hidden] {
  display: none;
}

.confirmation-card h3 {
  margin-bottom: 8px;
}

.confirmation-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.confirmation-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.confirmation-card a {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  text-align: center;
}

.confirmation-card a:hover {
  background: var(--teal-dark);
}

.fineprint {
  font-size: 0.78rem;
  margin: 14px 0 0;
}

.admin-page {
  background: #f4f7f5;
}

.admin-shell {
  margin: 0 auto;
  max-width: 1320px;
  padding: 42px clamp(18px, 4vw, 48px) 64px;
}

.admin-login {
  display: grid;
  min-height: calc(100vh - 178px);
  place-items: center;
}

.admin-login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  max-width: 520px;
  padding: clamp(22px, 4vw, 34px);
  width: min(100%, 520px);
}

.admin-login-card h1 {
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
  margin: 0;
}

.admin-login-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  margin: 12px 0 0;
}

.admin-intro {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-intro h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.admin-intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  max-width: 720px;
}

.admin-session {
  color: var(--teal-dark);
  display: block;
  font-size: 0.86rem;
  font-weight: 850;
  margin-top: 10px;
}

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

.admin-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.admin-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.admin-stat span {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 950;
}

.admin-stat p {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  margin: 4px 0 0;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.admin-controls {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) 190px;
  padding: 18px;
}

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

.booking-table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

.booking-table th,
.booking-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.booking-table th {
  background: #f8fbfa;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.booking-table td span,
.booking-table td small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.booking-table td small {
  font-size: 0.76rem;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 6px 10px;
  text-transform: capitalize;
}

.status-confirmed {
  background: #e5f5ed;
  color: #14633c;
}

.status-cancelled {
  background: #fde8e5;
  color: #9f2c20;
}

.empty-bookings {
  padding: 34px 18px;
  text-align: center;
}

.empty-bookings[hidden] {
  display: none;
}

.empty-bookings p {
  color: var(--muted);
  margin-bottom: 0;
}

.partner-band {
  padding: 54px clamp(18px, 6vw, 72px);
}

.partner-band {
  align-items: center;
  background: #e9f3ef;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.partner-form {
  border-radius: 8px;
  box-shadow: none;
  padding: 18px;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: #fff;
  left: 50%;
  max-width: min(520px, calc(100vw - 36px));
  opacity: 0;
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .booking {
    grid-column: 1 / -1;
  }

  .booking-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: 610px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(12, 25, 23, 0.82), rgba(12, 25, 23, 0.3));
  }

  .search-panel,
  .workspace,
  .admin-intro,
  .admin-stats,
  .admin-controls,
  .partner-band {
    grid-template-columns: 1fr;
  }

  .admin-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: stretch;
  }

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

  .filters {
    position: static;
  }

  .hostel-card {
    grid-template-columns: 1fr;
  }

  .card-body,
  .card-action {
    padding: 18px;
  }

  .card-action {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .results-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    height: 64px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .hero-content {
    padding-top: 62px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .search-band {
    margin-top: -118px;
  }
}
