@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Warm Neutral Ramp (Airbnb / Hospitality Grade) */
  --bg-page: #F7F4EE;
  --bg-card: #FDFBF7;
  --bg-raised: #EFE9DF;
  --bg-ink: #1F1B16;
  
  --text-primary: #1F1B16;
  --text-secondary: #5E554A;
  --text-muted: #7B7266;
  
  --hairline: rgba(31, 27, 22, 0.08);
  --hairline-strong: rgba(31, 27, 22, 0.16);
  
  /* Single Brand Accent */
  --accent: #D92B4B;
  --accent-hover: #BF223F;
  
  /* Toned Semantic Colors */
  --positive: #16A34A;
  --negative: #DC2626;
  
  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Single Easing Curve */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  
  /* Quiet Neutral Depth */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Force Lucide Icons to 16px, 1.5px stroke, muted/secondary inheritance */
svg.lucide {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(31, 27, 22, 0.18);
  border-radius: 4px;
}

/* 1. Navigation Bar (64px tall, quiet hairline) */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--hairline);
}

/* 2. Suite Switcher (Nested radius: outer 12px, padding 4px, inner 8px) */
.suite-switcher {
  display: inline-flex;
  padding: 4px;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  gap: 4px;
}

.suite-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
  text-align: left;
}

.suite-option:hover {
  color: var(--text-primary);
}

.suite-option.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

/* 3. Photo Grid (Desktop 5-photo composition, 16px outer radius) */
.photo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 220px);
  gap: 8px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background-color: var(--bg-raised);
}

.photo-cell {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-raised);
}

.photo-cell-main {
  grid-row: span 2;
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 180ms var(--ease);
}

.photo-cell:hover img {
  opacity: 0.92;
}

/* 4. Mobile Photo Carousel */
.mobile-carousel-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline);
}

.mobile-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-carousel::-webkit-scrollbar {
  display: none;
}

.mobile-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  scroll-snap-align: start;
}

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

/* 5. Surfaces & Cards */
.surface-card {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px;
}

.surface-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px;
}

/* 6. Booking Widget (Sticky right column, 16px card, 8px inner controls) */
.booking-card {
  position: sticky;
  top: 88px;
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-float);
}

.field-group {
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bg-card);
  transition: border-color 150ms var(--ease);
}

.field-group:focus-within {
  border-color: var(--text-primary);
}

.field-cell {
  padding: 10px 12px;
  transition: background-color 150ms var(--ease);
}

.field-cell:hover {
  background-color: var(--bg-page);
}

.field-label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.field-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.text-input {
  width: 100%;
  height: 40px;
  background-color: var(--bg-page);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}

.text-input:focus {
  outline: none;
  background-color: var(--bg-card);
  border-color: var(--text-primary);
}

/* 7. Buttons (Solid fill, 8px radius, no gradients, no colored shadows) */
.btn-primary {
  width: 100%;
  height: 44px;
  background-color: var(--accent);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  height: 36px;
  background-color: var(--bg-raised);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}

.btn-secondary:hover {
  background-color: #E5DECFE0;
  border-color: var(--hairline-strong);
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* 8. Calendar Grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-head {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--text-muted);
  text-align: center;
  padding-bottom: 8px;
}

.cal-day {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease);
  user-select: none;
}

.cal-day.open {
  background-color: var(--bg-page);
  color: var(--text-primary);
  border-color: var(--hairline);
  cursor: pointer;
}

.cal-day.open:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-card);
}

.cal-day.past {
  color: rgba(31, 27, 22, 0.25);
  cursor: default;
}

.cal-day.booked {
  background-color: transparent;
  color: rgba(31, 27, 22, 0.32);
  text-decoration: line-through;
  cursor: not-allowed;
}

.cal-day.selected {
  background-color: var(--text-primary);
  color: var(--bg-card);
  font-weight: 500;
  cursor: pointer;
}

.cal-day.in-range {
  background-color: var(--bg-raised);
  color: var(--text-primary);
  border-color: var(--hairline-strong);
  cursor: pointer;
}

/* 9. Signature Detail: Tactile Smartlock Keycard Object */
.keycard-object {
  background-color: #161513;
  color: #EFE9DE;
  border: 1px solid rgba(239, 233, 222, 0.12);
  border-radius: 16px;
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-float);
}

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 40px;
  padding: 0 10px;
  background-color: #262421;
  border: 1px solid rgba(239, 233, 222, 0.14);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: #EFE9DE;
  font-variant-numeric: tabular-nums;
}

/* 10. Host Operations Matrix */
.host-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

@media (max-width: 1023px) {
  .host-shell {
    grid-template-columns: 1fr;
  }
}

.host-sidebar {
  background-color: var(--bg-card);
  border-right: 1px solid var(--hairline);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-row {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}

.nav-row:hover {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

.nav-row.active {
  background-color: var(--bg-raised);
  color: var(--text-primary);
  font-weight: 500;
}

.matrix-cell {
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background-color: var(--bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color 120ms var(--ease), background-color 120ms var(--ease);
}

.matrix-cell:hover {
  border-color: var(--text-primary);
}

.matrix-cell.blocked {
  background-color: var(--bg-raised);
  color: var(--text-muted);
  border-color: var(--hairline-strong);
}

/* 11. Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(22, 21, 19, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-float);
  transform: translateY(8px);
  transition: transform 220ms var(--ease);
}

.modal-backdrop.open .modal-window {
  transform: translateY(0);
}

/* Mobile Checkout Sheet */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background-color: rgba(22, 21, 19, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
  display: flex;
  align-items: flex-end;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-sheet {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--bg-card);
  border-top: 1px solid var(--hairline-strong);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 20px 24px 32px;
  box-shadow: var(--shadow-float);
  transform: translateY(100%);
  transition: transform 260ms var(--ease);
}

.mobile-drawer-backdrop.open .mobile-drawer-sheet {
  transform: translateY(0);
}

.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  height: 72px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--hairline);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .mobile-bottom-bar {
    display: none;
  }
}

/* Rating Progress Bar */
.rating-track {
  width: 100%;
  height: 4px;
  background-color: var(--bg-raised);
  border-radius: 2px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background-color: var(--text-primary);
}

/* Dropdown */
.menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background-color: var(--bg-card);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  z-index: 60;
}

.menu-popover.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-link {
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms var(--ease);
}

.menu-link:hover {
  background-color: var(--bg-raised);
}

/* Non-blocking Toast Banner */
.toast-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  background-color: #161513;
  color: #EFE9DE;
  border: 1px solid rgba(239, 233, 222, 0.14);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 400;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast-banner.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Segmented Filter Pills */
.filter-group {
  display: inline-flex;
  padding: 3px;
  background-color: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  gap: 2px;
}

.filter-tab {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}

.filter-tab.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
