: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: 20px 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, #1d4ed8, #2f78ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
}

.hero__content h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.05em;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 8px;
  color: var(--muted);
}

.profile-meta strong {
  color: var(--accent);
}

.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;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: 200px;
  background: #f4f6fb;
}

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

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

.card__address {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.35;
}

.card__price {
  font-weight: 600;
  color: var(--accent);
  margin: 4px 0;
}

.card__rating {
  font-size: 0.9rem;
  color: #f59e0b;
}

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

.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;
}

.booking-bonus-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-bonus-label span {
  white-space: nowrap;
}

input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}

input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}

.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;
}

.secondary-button {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 14px;
  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__cancel {
  align-self: flex-start;
  margin-top: 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;
  scroll-snap-stop: always;
}

.details__media img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f4f6fb;
  scroll-snap-align: start;
  flex: 0 0 100%;
}

.details__body {
  flex: 1 1 auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  position: relative;
}

.details__footer {
  flex: 0 0 auto;
  background: #fff;
  padding: 0px 0px 5px;
  display: flex;
  justify-content: center;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.12);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.details__actions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal[aria-hidden='false'] {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: min(480px, 92vw);
  box-shadow: var(--shadow);
  z-index: 100;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #0f172a;
}

.modal__body p {
  margin: 4px 0;
}

.modal__close {
  border: none;
  background: var(--accent-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.modal__close::before,
.modal__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: #0f172a;
  transform-origin: center;
}

.modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

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

.modal__form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}

.modal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-soft);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0;
}

.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;
  font-size: 0.95rem;
}

.details__title {
  margin: 0;
  line-height: 1.3;
}

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

.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;
}

.details__description {
  margin: 0;
  line-height: 1.45;
  color: #0f172a;
}

.details__rating .rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.details__rating .rating-value {
  font-weight: 600;
  color: #0f172a;
}

.details__reviews {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details__reviews h4 {
  margin: 0;
}

.review-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.review-author {
  font-weight: 600;
}

.review-text {
  margin: 0;
  color: #0f172a;
  line-height: 1.5;
}

.map-list-item {
  cursor: pointer;
  padding: 6px 0;
}

.map-list-item:hover {
  text-decoration: underline;
}

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

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

.booking-form__row label {
  flex: 1;
}

.calendar {
  background: #f7f9fc;
  color: #0f172a;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar__header button {
  background: #e5edff;
  color: #1a73e8;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

.calendar__month {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  min-height: 240px;
}

.calendar__day {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.calendar__day--muted {
  visibility: hidden;
}

.calendar__day--disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: #9ca3af;
}

.calendar__day--selected,
.calendar__day--in-range {
  background: #e8f1ff;
  color: #1a73e8;
  font-weight: 700;
}

.calendar__day--start,
.calendar__day--end {
  border: 2px solid #3b82f6;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.25);
}

.calendar__selection {
  font-weight: 600;
  color: #f8fafc;
  margin-top: 6px;
}

.date-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.date-chip {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
}

.chip-label {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
}

.chip-value {
  display: block;
  margin-top: 4px;
  font-weight: 700;
  color: #111827;
}

.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);
}

.success {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.success[aria-hidden="false"] {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.success__dialog {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  animation: pop 0.25s ease;
  position: relative;
  margin: 0 16px;
}

.success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e5f3ff;
  color: #1a73e8;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
}

.success p {
  margin: 8px 0 16px;
  color: #2c2c2c;
  line-height: 1.4;
}

.modal__dialog--viewer {
  width: min(860px, 96vw);
  padding: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.viewer__controls {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 8px;
}

.viewer__nav {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: var(--accent-soft);
  color: #0f172a;
  font-size: 24px;
  cursor: pointer;
}

#viewer-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
  background: #f4f6fb;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@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));
  }


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