:root {
  --bg: #f5f1ea;
  --surface: #fffaf2;
  --surface-2: #f8f5ee;
  --text: #152238;
  --muted: #5b657e;
  --primary: #c8a96b;
  --primary-dark: #a9864f;
  --border: rgba(21, 34, 56, 0.09);
  --shadow: 0 20px 50px rgba(12, 18, 29, 0.08);
  --radius: 18px;
  --success: #1f9d61;
  --danger: #d64b4b;
}

body.dark {
  --bg: #0f1220;
  --surface: #171c31;
  --surface-2: #11172c;
  --text: #f5f7ff;
  --muted: #a7b0cd;
  --primary: #d3aa67;
  --primary-dark: #b68d49;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(200, 169, 107, 0.12), transparent 18%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  opacity: 0.12;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f1220, #1b2144);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 241, 234, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

body.dark .navbar {
  background: rgba(15, 18, 32, 0.78);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logo span {
  color: var(--primary);
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar nav a,
.footer a {
  color: var(--muted);
  transition: color 0.3s ease;
}

.navbar nav a:hover,
.footer a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 30px rgba(200, 169, 107, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 760px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(rgba(8, 12, 24, 0.58), rgba(8, 12, 24, 0.58)),
    url('https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -10% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(200, 169, 107, 0.22), transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 6rem 0;
}

.hero-text h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.95;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}

.hero-text p {
  color: #e7e6e5;
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow);
}

.search-panel {
  background: var(--surface);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin-top: -80px;
  position: relative;
  z-index: 5;
}

.search-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
  gap: 0.8rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--muted);
}

.input-group input,
.input-group select,
.input-group textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted);
}

.card-grid,
.room-grid,
.review-grid,
.stats-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid,
.room-grid,
.review-grid {
  grid-template-columns: repeat(3, 1fr);
}

.hotel-card,
.room-card,
.review-card,
.stats-card,
.message-card,
.dashboard-card,
.admin-panel,
.booking-summary,
.profile-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hotel-card:hover,
.room-card:hover,
.review-card:hover,
.dashboard-card:hover,
.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(12, 18, 29, 0.14);
}

.hotel-card img {
  height: 240px;
  width: 100%;
  object-fit: cover;
}

.card-body,
.room-body,
.review-body,
.stats-card,
.profile-card,
.booking-summary,
.message-card,
.dashboard-card,
.admin-panel {
  padding: 1.3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(200, 169, 107, 0.1);
  color: var(--primary-dark);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rating {
  color: #f7b500;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-box {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  border: 1px solid var(--border);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, var(--primary), #f4dfb0);
  color: #fff;
  font-size: 1.5rem;
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stats-card {
  text-align: center;
}

.stats-card h3 {
  font-size: 2rem;
  color: var(--primary);
}

.newsletter {
  background: linear-gradient(90deg, rgba(200, 169, 107, 0.9), rgba(28, 36, 63, 0.88));
  color: #fff;
  border-radius: 24px;
  padding: 3rem;
}

.newsletter form {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.footer {
  background: #0d1223;
  color: #d7dff7;
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
}

.footer h4 {
  margin-bottom: 0.8rem;
}

.footer-logo {
  color: #fff;
}

.form-card,
.booking-steps,
.table-wrap,
.auth-card,
.admin-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-card {
  max-width: 500px;
  margin: 4rem auto;
  padding: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.auth-card h2,
.section-header h2,
.profile-card h3,
.booking-summary h3,
.message-card h3 {
  margin-bottom: 0.8rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(31, 157, 97, 0.12);
  color: var(--success);
}

.alert-error {
  background: rgba(214, 75, 75, 0.1);
  color: var(--danger);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-wrap th {
  color: var(--muted);
  font-weight: 600;
}

.status {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status.pending { background: rgba(255, 193, 7, 0.16); color: #b98600; }
.status.approved { background: rgba(31, 157, 97, 0.16); color: var(--success); }
.status.rejected, .status.cancelled { background: rgba(214, 75, 75, 0.14); color: var(--danger); }

.gallery-wrap {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 1rem;
}

.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-main img {
  height: 440px;
  border-radius: var(--radius);
}

.gallery-thumbs {
  display: grid;
  gap: 0.8rem;
}

.gallery-thumb {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
}

.gallery-thumb.active {
  border-color: var(--primary);
}

.booking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@media (max-width: 980px) {
  .hero-content,
  .contact-layout,
  .booking-layout,
  .gallery-wrap,
  .card-grid,
  .room-grid,
  .review-grid,
  .services-grid,
  .stats-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .search-grid,
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 900px;
  }
}

@media (max-width: 768px) {
  .navbar nav {
    display: none;
  }

  .hero-actions,
  .newsletter form,
  .form-actions,
  .nav-actions {
    flex-wrap: wrap;
  }

  .search-grid,
  .form-grid,
  .stats-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-text h1 {
    font-size: 3rem;
  }
}
