:root {
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e3a8a;
  --color-accent: #f97316;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--color-text);
}

.brand__icon {
  font-size: 1.4rem;
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar__links {
  display: flex;
  gap: 24px;
}

.navbar__links a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.navbar__links a:hover {
  color: var(--color-primary);
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-link:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

@media (max-width: 700px) {
  .navbar__links {
    display: none;
  }
}

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.92) 0%, rgba(30, 58, 138, 0.94) 100%),
    url("https://images.unsplash.com/photo-1502877338535-766e1452684a?auto=format&fit=crop&w=1600&q=70") center / cover
      no-repeat;
  padding: 56px 0 80px;
  color: #fff;
}

.hero__inner {
  text-align: center;
}

.hero__title {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 32px;
}

/* Search card */
.search-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  text-align: left;
  color: var(--color-text);
}

.search-card__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.search-card__row:last-child {
  margin-bottom: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--action {
  justify-content: flex-end;
}

.field--action-row {
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
}

.field--action-row .btn {
  flex: 1;
}

.field select {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
}

.field input {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.field input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.15s ease;
}

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

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  opacity: 0.92;
}

.btn--ghost {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-bg);
}

.btn--full {
  width: 100%;
  margin-top: 8px;
}

/* Results */
main.container {
  padding: 48px 24px 80px;
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

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

.status-banner {
  padding: 14px 18px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.status-banner--error {
  background: #fef2f2;
  color: var(--color-error);
  margin-top: 4px;
  margin-bottom: 0;
}

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
}

.card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.card__year {
  color: var(--color-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-muted);
}

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

.card__rate {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
}

.card__rate span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-muted);
}

.card__footer {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: var(--color-success);
}

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

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.modal__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  overflow-y: auto;
}

.modal__panel--confirm {
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-muted);
}

.modal__rate {
  color: var(--color-muted);
  margin-top: -4px;
  margin-bottom: 20px;
}

.modal__total {
  font-weight: 700;
  color: var(--color-primary-dark);
  background: #eff6ff;
  padding: 10px 14px;
  border-radius: 8px;
  margin: -4px 0 16px;
  font-size: 0.9rem;
}

#booking-form .field {
  margin-bottom: 14px;
}

.confirm-icon {
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.lookup-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.lookup-form input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.booking-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
}

.booking-item__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.booking-item strong {
  color: var(--color-text);
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 999px;
}

.status-pill--confirmed {
  background: #dcfce7;
  color: var(--color-success);
}

.status-pill--cancelled {
  background: #fee2e2;
  color: var(--color-error);
}

.status-pill--pending {
  background: #fef9c3;
  color: #a16207;
}

.btn--cancel {
  margin-top: 10px;
  border-color: var(--color-error);
  color: var(--color-error);
}

.btn--cancel:hover {
  background: #fef2f2;
}

.empty-state {
  text-align: center;
  color: var(--color-muted);
  padding: 40px 0;
  grid-column: 1 / -1;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  .search-card__row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .search-card__row {
    grid-template-columns: 1fr;
  }
  .hero__title {
    font-size: 1.8rem;
  }
}
