@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4CAF50;
  --secondary: #81C784;
  --surface: #ffffff;
  --muted: #F1F8E9;
  --background: #F8FFF8;
  --text: #212121;
  --text-secondary: #616161;
  --accent: #66BB6A;
  --shadow: 0 18px 45px rgba(76, 175, 80, 0.12);
  --danger: #d32f2f;
  --warning: #f57c00;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--background);
}

body.dark-mode {
  --primary: #66BB6A;
  --secondary: #A5D6A7;
  --surface: #16211a;
  --muted: #0f1712;
  --background: #0b120d;
  --text: #f3f7f2;
  --text-secondary: #b8c2b7;
  --accent: #81C784;
  --shadow: 0 18px 45px rgba(0,0,0,0.28);
}

img {
  max-width: 100%;
  display: block;
}

.navbar {
  background: var(--primary);
  backdrop-filter: blur(12px);
  transition: background .25s ease;
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .btn {
  color: #ffffff !important;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important;
}

.navbar .nav-link {
  font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--secondary) !important;
}

.hero-section {
  min-height: 92vh;
  background: linear-gradient(120deg, rgba(46,125,50,.85), rgba(67,160,71,.75)), url('https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
  color: #ffffff;
  position: relative;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.3), rgba(15,23,42,0.7));
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1,
.hero-section p,
.hero-section .btn {
  color: #fff;
}

.feature-card,
.room-card,
.gallery-card,
.stats-card,
.hero-form,
.footer-card {
  background: var(--surface);
  border: none;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card,
.navbar,
.btn-primary,
.btn-success,
.badge-success {
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary,
.btn-success {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-success:hover,
.btn-secondary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  box-shadow: var(--shadow);
}

.btn-outline-primary {
  color: #ffffff;
  border-color: rgba(255,255,255,.5);
}

.btn-outline-primary:hover {
  background: rgba(255,255,255,.12);
}

.btn-outline-secondary {
  color: #212121;
  border-color: rgba(33,33,33,.15);
}

.btn-outline-secondary:hover {
  background: rgba(33,33,33,.04);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--secondary);
}

.badge-status {
  font-size: .85rem;
  font-weight: 600;
}

.badge-success {
  background-color: var(--primary) !important;
}

.badge-warning {
  background-color: var(--warning) !important;
  color: #ffffff;
}

.badge-danger {
  background-color: var(--danger) !important;
  color: #ffffff;
}

.room-card .badge,
.badge-status {
  font-size: .85rem;
  font-weight: 600;
}

.section-title {
  font-size: clamp(2rem, 1.7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 610px;
}

.amenity-icon,
.service-icon {
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(37,99,235,.08);
  color: var(--primary);
}

.gallery-grid img,
.room-cover,
.reservation-room-image,
.tourist-card img {
  border-radius: 24px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.room-cover {
  height: 220px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #fff;
  cursor: pointer;
  min-height: 240px;
}

.gallery-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
  filter: brightness(1.02);
}

.gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}

.reservation-room-image {
  width: 120px;
  height: 80px;
  border-radius: 12px;
}

.gallery-grid img {
  height: 260px;
  transition: transform .35s ease;
}

.gallery-card:hover img {
  transform: scale(1.03);
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  transition: transform .25s ease, background-color .2s ease, box-shadow .2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(37,99,235,.2);
}

.btn-outline-primary:hover {
  background: rgba(37,99,235,.08);
}

.bg-clean {
  background: var(--muted);
}

.hero-form {
  border-radius: 24px;
  padding: 30px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 40px rgba(46,125,50,0.12);
}

.hero-form h5 {
  color: var(--primary);
  font-weight: 700;
}

.hero-form p,
.hero-form a {
  color: #333333;
}

.hero-form a:hover {
  color: var(--secondary);
}

.card,
.hero-form,
.feature-card,
.stats-card {
  transition: transform .3s ease, box-shadow .3s ease;
}

/* Ensure text on white/light backgrounds is dark for readability */
.bg-white, .bg-clean, .card, .feature-card, .stats-card {
  color: var(--text) !important;
}

/* Buttons on dark hero background */
.hero-section .btn-light {
  background: rgba(255,255,255,0.95);
  color: var(--secondary);
}

/* Make hero text fit on smaller screens */
.hero-section h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
}
.hero-section p.lead { font-size: clamp(1rem, 2.4vw, 1.2rem); }

.card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(15,23,42,0.12);
}

.form-control,
.form-select,
textarea.form-control {
  border-radius: 16px;
  border: 1px solid #d1d5db;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: rgba(37,99,235,.4);
  box-shadow: 0 0 0 .15rem rgba(37,99,235,.12);
}

.room-meta {
  color: var(--text-secondary);
}

.room-price {
  font-size: 1.35rem;
  font-weight: 700;
}

.footer {
  background: var(--primary);
  color: #ffffff;
}

.footer a {
  color: #ffffff;
}

.footer .form-control {
  background: rgba(255,255,255,.12);
  color: #ffffff;
}

.footer .form-control::placeholder {
  color: rgba(255,255,255,.75);
}

.footer a:hover {
  color: #ffffff;
}

.list-group-item {
  border: none;
}

.section-divider {
  width: 64px;
  height: 4px;
  background: var(--primary);
  border-radius: 999px;
  margin-bottom: 1rem;
}

@media (max-width: 992px) {
  .hero-section { min-height: 80vh; }
  .gallery-grid img { height: 220px; }
  .gallery-card { min-height: 220px; }
}

@media (max-width: 576px) {
  .hero-form { padding: 20px; }
  .gallery-card img { height: 210px; }
}

body.dashboard-body {
  background: var(--muted);
  color: var(--text);
  overflow-x: hidden;
}

.dashboard-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fff8 0%, #f1f8e9 100%);
}

.dashboard-sidebar {
  width: 250px;
  min-width: 250px;
  background: #ffffff;
  border-right: 1px solid rgba(76, 175, 80, 0.12);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 8px 0 30px rgba(76, 175, 80, 0.06);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1030;
  overflow-y: auto;
}

.mobile-sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1030;
  border: none;
  background: var(--primary);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.mobile-sidebar {
  width: 100%;
  height: 100%;
  border-right: 0;
  position: static;
  box-shadow: none;
}

.sidebar-profile {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 20px;
  padding: 18px;
  text-align: center;
}

.sidebar-profile img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.7);
  margin: 0 auto 12px;
}

.sidebar-profile h6 {
  margin-bottom: 4px;
  font-weight: 700;
}

.sidebar-profile p,
.sidebar-profile .role-pill {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95);
}

.role-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  margin-bottom: 6px;
}

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

.sidebar-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--muted);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(76, 175, 80, 0.12);
}

.sidebar-footer a {
  text-decoration: none;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
}

.dashboard-main {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(76, 175, 80, 0.10);
}

.dashboard-content {
  padding: 24px 28px 36px;
}

.dashboard-card,
.dashboard-table,
.profile-card {
  background: #ffffff;
  border: 1px solid rgba(76, 175, 80, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.quick-action-card {
  display: block;
  background: linear-gradient(135deg, #f8fff8 0%, #eef8ee 100%);
  border: 1px solid rgba(76, 175, 80, 0.12);
  border-radius: 18px;
  padding: 18px;
  min-height: 120px;
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

.quick-action-card .action-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(76, 175, 80, 0.12);
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.dashboard-card {
  padding: 20px;
}

.welcome-hero {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(129, 199, 132, 0.9));
  color: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.welcome-hero .btn-outline-success,
.welcome-hero .btn-outline-secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.welcome-hero .btn-outline-success:hover,
.welcome-hero .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.summary-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,255,248,0.95));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
}

.badge-status {
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}

@media (max-width: 992px) {
  .dashboard-main {
    margin-left: 0;
    padding-left: 0;
  }
  .dashboard-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(76, 175, 80, 0.12);
    height: auto;
    position: static;
  }
  .dashboard-topbar {
    padding-top: 72px;
  }
}
