:root {
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  background-color: #eef2ff;
  --surface: #ffffff;
  --accent: #1d4ed8;
  --accent-soft: #e0e7ff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(145deg, #eff4ff, #f7fbff);
  color: #0f172a;
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 72px;
}

.hero {
  margin: 16px;
  padding: 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, #1d4ed8, #2f78ff);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
}

.hero__eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  opacity: 0.8;
  margin: 0 0 8px;
}

.hero__content h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero__content p {
  margin: 0;
  max-width: 520px;
  font-size: 1rem;
  opacity: 0.9;
}

.pill-button {
  border: none;
  background: #fff;
  color: #1d4ed8;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.pill-button:active {
  transform: scale(0.97);
}

.views {
  flex: 1;
  padding: 0 16px 24px;
}

.view {
  display: none;
  animation: fade 0.2s ease;
}

.view--active {
  display: block;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.badge {
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  position: relative;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__title {
  margin: 0;
  font-size: 1rem;
}

.card__price {
  font-weight: 600;
  color: var(--accent);
}

.card__city {
  font-size: 0.85rem;
  color: var(--muted);
}

.card__button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.card__button:active {
  opacity: 0.85;
}

.tab-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  gap: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  z-index: 20;
}

.tab-button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  gap: 4px;
  cursor: pointer;
  padding: 4px 10px;
}

.tab-button--active {
  color: #fff;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  background-color: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-home {
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 4.2L4 11h2v9h5v-6h2v6h5v-9h2z"/></svg>');
}

.icon-map {
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 2c3.7 0 6.5 3 6.5 6.7c0 4.5-6.5 12.1-6.5 12.1s-6.5-7.6-6.5-12.1C5.5 5 8.3 2 12 2m0 9.1c1.3 0 2.4-1.1 2.4-2.4S13.3 6.3 12 6.3S9.6 7.4 9.6 8.7S10.7 11.1 12 11.1z"/></svg>');
}

.icon-user {
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 12a4 4 0 1 0-4-4a4 4 0 0 0 4 4m0 2c-3.7 0-7 1.8-7 4v2h14v-2c0-2.2-3.3-4-7-4"/></svg>');
}

.map {
  width: 100%;
  height: 360px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-card,
.history-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #111827;
}

form input {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #f8fafc;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-weight: 600;
  padding: 14px;
  border-radius: 16px;
  margin-top: 12px;
  cursor: pointer;
}

.booking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-card__title {
  margin: 0;
  font-weight: 600;
}

.status-chip {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.status-pending {
  background: #fff7ed;
  color: #c2410c;
}

.status-confirmed {
  background: #dcfce7;
  color: #15803d;
}

.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.status-completed {
  background: #dbeafe;
  color: #1d4ed8;
}

.details-panel {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 24px 16px 32px;
  z-index: 40;
  transition: opacity 0.15s ease;
}

.details-panel[aria-hidden='true'] {
  opacity: 0;
  pointer-events: none;
}

.details__inner {
  width: min(720px, 100%);
  max-height: 95vh;
  background: var(--surface);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.details__media {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.details__media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  scroll-snap-align: start;
}

.details__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.details__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="m18.3 5.7-1-1L12 10l-5.3-5.3-1 1L11 11l-5.3 5.3 1 1L12 12l5.3 5.3 1-1L13 11z"/></svg>');
  background-color: #0f172a;
}

.details__location {
  color: var(--muted);
  margin: 0;
}

.details__title {
  margin: 0;
}

.details__price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

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

.details__amenities span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-form__row {
  display: flex;
  gap: 12px;
}

.booking-form__row label {
  flex: 1;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
  z-index: 50;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 20px;
    border-radius: 24px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .details__media img {
    height: 220px;
  }

  .booking-form__row {
    flex-direction: column;
  }
}
