/* ============================================
   Kisii Stays — design tokens & components
   ============================================ */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&f[]=bespoke-serif@400,500&display=swap');

:root {
  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-hero: clamp(2.4rem, 5.5vw, 4rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Fonts */
  --font-body: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Bespoke Serif', Georgia, serif;

  /* Radii & shadow */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgb(20 32 26 / 0.06), 0 1px 3px rgb(20 32 26 / 0.08);
  --shadow: 0 4px 6px -1px rgb(20 32 26 / 0.07), 0 10px 24px -6px rgb(20 32 26 / 0.12);
  --shadow-lg: 0 16px 44px -12px rgb(20 32 26 / 0.24);

  /* Light theme */
  --color-bg: #fbfaf7;
  --color-surface: #ffffff;
  --color-surface-2: #f4f2ec;
  --color-border: #e3e0d6;
  --color-border-strong: #cfcabb;
  --color-text: #1a201c;
  --color-text-muted: #5c655e;
  --color-text-faint: #8a9189;
  --color-primary: #1f5741;
  --color-primary-hover: #174334;
  --color-primary-soft: #e7f0ea;
  --color-accent: #b8742a;
  --color-accent-soft: #fbf0e2;
  --color-on-primary: #f6fbf8;
  --color-danger: #a32f24;
  --color-danger-soft: #fbeae8;
  --color-success: #1f6b45;
  --color-success-soft: #e5f3ea;
  --color-warn: #8a6212;
  --color-warn-soft: #fbf3de;
  --hero-scrim: 20 32 26;
}

[data-theme='dark'] {
  --color-bg: #121714;
  --color-surface: #1a211d;
  --color-surface-2: #222b26;
  --color-border: #2e3832;
  --color-border-strong: #414d45;
  --color-text: #eef2ef;
  --color-text-muted: #a8b2ab;
  --color-text-faint: #7d877f;
  --color-primary: #6fc79c;
  --color-primary-hover: #8ad4af;
  --color-primary-soft: #1d2f26;
  --color-accent: #e0a866;
  --color-accent-soft: #2c2417;
  --color-on-primary: #0e1512;
  --color-danger: #f0938a;
  --color-danger-soft: #2e1c1a;
  --color-success: #79cba0;
  --color-success-soft: #16281e;
  --color-warn: #e0bd6f;
  --color-warn-soft: #2a2317;
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.4);
  --shadow: 0 6px 18px -4px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 20px 50px -14px rgb(0 0 0 / 0.65);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-text); }

::selection { background: var(--color-primary); color: var(--color-on-primary); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }

.kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.kicker svg {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  stroke-width: 2.2;
}

.section-title { font-size: var(--text-2xl); }
.section-lede {
  color: var(--color-text-muted);
  max-width: 62ch;
  margin-top: var(--space-3);
  font-size: var(--text-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn-ghost { background: transparent; color: var(--color-text-muted); padding-inline: var(--space-3); }
.btn-ghost:hover { color: var(--color-text); background: var(--color-surface-2); }

.btn-danger { background: transparent; color: var(--color-danger); border-color: var(--color-border-strong); }
.btn-danger:hover { background: var(--color-danger-soft); border-color: var(--color-danger); }

.btn-sm { font-size: var(--text-xs); padding: var(--space-2) var(--space-4); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.brand svg { width: 30px; height: 30px; color: var(--color-primary); }
.brand-name { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.05; }
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-weight: 700;
}

.view-switch {
  display: flex;
  gap: var(--space-1);
  background: var(--color-surface-2);
  padding: var(--space-1);
  border-radius: var(--radius-full);
  margin-inline: auto;
}
.view-switch button {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.view-switch button:hover { color: var(--color-text); }
.view-switch button[aria-selected='true'] {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Views ---------- */
.view[hidden] { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: center;
  padding-block: var(--space-20);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgb(var(--hero-scrim) / 0.9) 0%,
    rgb(var(--hero-scrim) / 0.72) 46%,
    rgb(var(--hero-scrim) / 0.35) 100%
  );
}
.hero-content { max-width: 660px; color: #f4f8f5; text-shadow: 0 1px 16px rgb(20 32 26 / 0.4); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.28);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  backdrop-filter: blur(6px);
}
.hero-badge svg { width: 14px; height: 14px; }
.hero h1 { font-size: var(--text-hero); font-family: var(--font-display); font-weight: 400; }
.hero p {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: #e4ece7;
  max-width: 54ch;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-8);
  list-style: none;
}
.hero-stats strong { display: block; font-size: var(--text-2xl); font-family: var(--font-display); font-weight: 400; }
.hero-stats span { font-size: var(--text-sm); color: #cfdad3; }

/* ---------- Search bar ---------- */
.search-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  margin-top: calc(var(--space-12) * -1);
  position: relative;
  z-index: 5;
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  align-items: end;
}

/* ---------- Fields ---------- */
.field { display: grid; gap: var(--space-2); }
.field > label,
.field-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.field input[aria-invalid='true'],
.field select[aria-invalid='true'],
.field textarea[aria-invalid='true'] { border-color: var(--color-danger); }
.field-error { font-size: var(--text-xs); color: var(--color-danger); font-weight: 500; min-height: 1em; }
.field-hint { font-size: var(--text-xs); color: var(--color-text-faint); }

/* ---------- Filters ---------- */
.results-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.result-count { color: var(--color-text-muted); font-size: var(--text-sm); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: all 0.16s ease;
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.chip[aria-pressed='true'] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
}

/* ---------- Listing grid ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: var(--space-6);
  list-style: none;
}
.listing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--color-border-strong);
}
.card-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--color-surface-2);
  overflow: hidden;
  flex: 0 0 auto;
  min-height: 0;
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-type {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgb(255 255 255 / 0.94);
  color: #1a201c;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.card-verified {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.card-verified svg { width: 12px; height: 12px; }

.card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card-area {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.card-area svg { width: 13px; height: 13px; }
.card-title { font-size: var(--text-lg); }
.card-host { font-size: var(--text-sm); color: var(--color-text-muted); }
.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.card-specs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.card-specs svg { width: 15px; height: 15px; color: var(--color-text-faint); }
.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.card-price strong { display: block; font-size: var(--text-lg); font-weight: 700; }
.card-price span { font-size: var(--text-xs); color: var(--color-text-faint); }

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.empty-state svg { width: 34px; height: 34px; margin-inline: auto; color: var(--color-text-faint); }
.empty-state h3 { margin-top: var(--space-4); color: var(--color-text); font-size: var(--text-lg); }
.empty-state p { margin-top: var(--space-2); max-width: 44ch; margin-inline: auto; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-20); }
.section-tight { padding-block: var(--space-12); }
.section-alt { background: var(--color-surface-2); }
.section-head { margin-bottom: var(--space-10); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  list-style: none;
  counter-reset: step;
}
.how-grid li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.how-grid li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 900;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.how-grid h3 { font-size: var(--text-base); }
.how-grid p { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgb(20 32 26 / 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-panel {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(980px, 100%);
  max-height: min(92dvh, 900px);
  overflow-y: auto;
  position: relative;
  margin: auto;
}
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.modal-close:hover { color: var(--color-danger); border-color: var(--color-danger); }
.modal-close svg { width: 18px; height: 18px; }

.detail-media {
  position: relative;
  aspect-ratio: 2 / 1;
  background: var(--color-surface-2);
  overflow: hidden;
}
.detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-body {
  padding: var(--space-8);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: var(--space-10);
  align-items: start;
}
.detail-title { font-size: var(--text-2xl); margin-top: var(--space-2); }
.detail-desc { color: var(--color-text-muted); margin-top: var(--space-4); line-height: 1.65; }
.detail-sub { font-size: var(--text-base); margin-top: var(--space-8); margin-bottom: var(--space-4); }
.amenity-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  list-style: none;
  font-size: var(--text-sm);
}
.amenity-list li { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text-muted); }
.amenity-list svg { width: 16px; height: 16px; color: var(--color-primary); flex-shrink: 0; }

.host-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--color-surface);
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.host-avatar {
  width: 46px; height: 46px;
  border-radius: var(--radius-full);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
}
.host-card p { font-size: var(--text-sm); color: var(--color-text-muted); }
.host-card strong { display: block; color: var(--color-text); font-size: var(--text-base); }

.booking-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: var(--space-4);
  display: grid;
  gap: var(--space-4);
}
.booking-price { display: flex; align-items: baseline; gap: var(--space-2); }
.booking-price strong { font-size: var(--text-xl); }
.booking-price span { color: var(--color-text-faint); font-size: var(--text-sm); }
.summary-lines { display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.summary-lines .row { display: flex; justify-content: space-between; gap: var(--space-4); color: var(--color-text-muted); }
.summary-lines .row.total {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-3);
  margin-top: var(--space-1);
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--text-base);
}
.notice {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  padding: var(--space-4);
  border-radius: var(--radius);
  line-height: 1.5;
}
.notice svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.notice-info { background: var(--color-primary-soft); color: var(--color-primary); }
.notice-warn { background: var(--color-warn-soft); color: var(--color-warn); }
.notice-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.notice-success { background: var(--color-success-soft); color: var(--color-success); }

/* ---------- Host dashboard ---------- */
.host-shell { padding-block: var(--space-10) var(--space-20); }
.host-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.host-bar-id { display: flex; align-items: center; gap: var(--space-4); }
.host-bar h1 { font-size: var(--text-xl); }
.host-bar p { font-size: var(--text-sm); color: var(--color-text-muted); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin-bottom: var(--space-10);
}
.stat-grid li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.stat-grid .stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.stat-grid .stat-value {
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-weight: 400;
  margin-top: var(--space-2);
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.panel-head h2 { font-size: var(--text-lg); }
.panel-head p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 640px; }
th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--color-text); font-weight: 700; }
.cell-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-pending { background: var(--color-warn-soft); color: var(--color-warn); }
.badge-confirmed { background: var(--color-success-soft); color: var(--color-success); }
.badge-declined { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-neutral { background: var(--color-surface-2); color: var(--color-text-muted); }

.host-listing-row { display: flex; align-items: center; gap: var(--space-4); }
.host-listing-row img {
  width: 68px; height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}
.form-grid .span-all { grid-column: 1 / -1; }
.amenity-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.amenity-picker label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: all 0.16s ease;
}
.amenity-picker label:hover { border-color: var(--color-primary); color: var(--color-primary); }
.amenity-picker input { accent-color: var(--color-primary); width: 15px; height: 15px; cursor: pointer; }
.amenity-picker input:checked + span { color: var(--color-primary); font-weight: 700; }

.photo-picker { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.photo-picker label { cursor: pointer; position: relative; }
.photo-picker input { position: absolute; opacity: 0; pointer-events: none; }
.photo-picker img {
  width: 92px; height: 68px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 3px solid transparent;
  transition: border-color 0.16s ease;
}
.photo-picker input:checked + img { border-color: var(--color-primary); }
.photo-picker input:focus-visible + img { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-12) var(--space-8);
  background: var(--color-surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-10);
}
.footer-grid h3 {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-blurb { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-4); max-width: 40ch; }
.footer-list { list-style: none; display: grid; gap: var(--space-3); font-size: var(--text-sm); }
.footer-list a, .footer-list button {
  color: var(--color-text-muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.footer-list a:hover, .footer-list button:hover { color: var(--color-primary); }
.footer-legal {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: var(--space-3);
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  animation: toast-in 0.25s ease;
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .toast { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; gap: var(--space-8); padding: var(--space-6); }
  .booking-box { position: static; }
}

@media (max-width: 780px) {
  .header-inner { flex-wrap: wrap; gap: var(--space-3); min-height: 0; padding-block: var(--space-3); }
  .view-switch { order: 3; width: 100%; margin: 0; }
  .view-switch button { flex: 1; padding-inline: var(--space-3); }
  .header-actions { margin-left: auto; }
  .hero { min-height: 480px; padding-block: var(--space-16); }
  .hero-stats { gap: var(--space-6); }
  .search-card { margin-top: var(--space-6); }
  .section { padding-block: var(--space-12); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ---------------------------------------------------------------
   Host authentication panels
   --------------------------------------------------------------- */
.host-bar-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

.host-email {
  font-size: var(--text-sm);
  color: var(--color-muted);
  max-width: 220px;
  overflow-wrap: anywhere;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.auth-copy h2 {
  font-size: var(--text-xl);
  margin: var(--space-2) 0 var(--space-3);
}

.auth-copy p {
  color: var(--color-muted);
  max-width: 46ch;
}

.auth-points {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.auth-points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.auth-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.auth-claim-note {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.auth-form {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.seg-btn {
  flex: 1 1 0;
  padding: 0.55rem 0.5rem;
  border: 0;
  border-radius: calc(var(--radius-md) - 4px);
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.seg-btn:hover { color: var(--color-text); }

.seg-btn.is-on {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.seg-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--color-border);
}

@media (max-width: 820px) {
  .auth-panel { grid-template-columns: 1fr; }
}

/* Flex/grid display rules must not override the hidden attribute. */
[hidden] { display: none !important; }
