/* =====================================================
   Adventure Booking System — Styles
   Mobile-first, Adventure/Outdoor theme
   ===================================================== */
:root {
  --primary: #168f55;
  --secondary: #f59e0b;
  --dark: #0f241d;
  --muted: #64748b;
  --bg: #f6fbf8;
  --card: #fff;
  --line: #dbe7df;
  --danger: #dc2626;
  --warn: #d97706;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, system-ui, -apple-system, sans-serif; background: var(--bg); color: #10231c; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 6vw;
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.logo {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 14px; background: linear-gradient(135deg, var(--primary), #22c55e);
  font-size: 23px; box-shadow: 0 8px 20px rgba(22,143,85,.25); flex-shrink: 0;
}
nav { display: flex; gap: 18px; color: #244338; font-weight: 700; flex-wrap: wrap; }
nav a:hover { color: var(--primary); }

/* ── Buttons ── */
.btn {
  border: 0; border-radius: 14px; padding: 12px 18px;
  font-weight: 900; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: .15s; font-size: 14px; gap: 6px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.primary { background: linear-gradient(135deg, var(--primary), #22c55e); color: white; }
.ghost { background: white; color: #153f2d; border: 1px solid var(--line); }
.danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.full { width: 100%; font-size: 16px; padding: 15px; }
.xs { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

/* ── Hero ── */
.hero {
  min-height: 75vh; display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 28px; align-items: center; padding: 70px 6vw 48px;
  background: radial-gradient(circle at 10% 10%, #d9f99d 0, transparent 28%),
              linear-gradient(135deg, #effcf4, #e0f2fe);
}
.hero h1 { font-size: clamp(28px, 5vw, 60px); line-height: 1.05; margin: 18px 0; }
.hero p { font-size: 17px; color: #345448; max-width: 620px; }
.pill {
  display: inline-flex; border: 1px solid #b7e5c9; background: #ecfdf5;
  color: #166534; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.heroCard {
  background: rgba(255,255,255,.8); border: 1px solid var(--line);
  border-radius: 28px; padding: 16px; box-shadow: 0 24px 55px rgba(15,36,29,.1);
}
.heroImage {
  height: 320px; border-radius: 22px;
  background: linear-gradient(135deg, #166534, #0ea5e9);
  display: grid; place-items: center; font-size: 96px;
  background-size: cover; background-position: center;
}
.stats {
  display: flex; gap: 12px; align-items: center; justify-content: space-around;
  margin-top: 14px; padding: 14px; border-radius: 16px; background: #fff;
}
.statNum { font-size: 20px; font-weight: 900; color: var(--primary); }

/* ── Sections ── */
.section { padding: 56px 6vw; }
.sectionHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.sectionHead h2 { font-size: 28px; }
.muted { color: var(--muted); }

/* ── Activity Cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.activityCard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; overflow: hidden; box-shadow: 0 8px 28px rgba(16,35,28,.07);
  cursor: pointer; transition: .18s;
}
.activityCard:hover { transform: translateY(-4px); box-shadow: 0 18px 48px rgba(16,35,28,.13); }
.cardImg {
  height: 200px; background: linear-gradient(135deg, #166534, #22c55e);
  display: grid; place-items: center; font-size: 64px;
}
.cardBody { padding: 18px; }
.cardBody h3 { font-size: 20px; margin: 10px 0 6px; }
.cardBody p { color: var(--muted); font-size: 14px; margin-bottom: 12px; line-height: 1.5; }
.price { font-weight: 950; color: #166534; margin-bottom: 14px; font-size: 17px; }
.tag {
  display: inline-flex; background: #fff7ed; color: #c2410c;
  border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 800;
}
.tag.danger { background: #fef2f2; color: var(--danger); }

/* ── How to ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.howto { background: linear-gradient(135deg, #f0fdf4, #eff6ff); }
.steps { display: grid; gap: 10px; margin-top: 16px; }
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: white; border: 1px solid var(--line);
  border-radius: 16px; font-weight: 700;
}
.stepNum {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: white; font-weight: 900;
  display: grid; place-items: center; flex-shrink: 0;
}
.infoBox {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 22px; box-shadow: 0 8px 24px rgba(16,35,28,.06);
}
.infoBox h3 { margin-bottom: 10px; }

/* ── Booking Form ── */
.bookingForm {
  background: #fff; border: 1px solid var(--line);
  border-radius: 26px; padding: 24px; box-shadow: 0 16px 36px rgba(16,35,28,.06);
  max-width: 900px; margin: 0 auto;
}
.formGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
input, select, textarea {
  width: 100%; border: 1px solid #cbd5d1; border-radius: 12px;
  padding: 12px 13px; font: inherit; background: #fff; font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,143,85,.12);
}
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; margin: 12px 0; cursor: pointer; }
.check input { width: auto; }
.summary {
  border: 1px dashed #aacdb8; background: #f3fbf6;
  border-radius: 16px; padding: 14px; margin: 14px 0;
}
.summaryRow { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.summaryRow.total b { color: var(--primary); font-size: 18px; }
.summaryRow.deposit b { color: var(--warn); }
.paymentBox {
  border: 1px dashed #aacdb8; background: #fffdf0;
  border-radius: 16px; padding: 16px; margin: 14px 0;
}
.paymentBox h3 { margin-bottom: 10px; font-size: 16px; }
.bankInfo {
  background: #f8fcfa; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin: 8px 0;
}
.bankLabel { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.slipPreview { max-width: 260px; border-radius: 14px; border: 1px solid var(--line); margin-top: 10px; }
.slipOk { color: #166534; font-weight: 700; }
.slipError { color: var(--danger); font-weight: 700; }

/* ── Gallery ── */
.galleryGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.galleryItem { border-radius: 16px; overflow: hidden; position: relative; }
.galleryItem img { width: 100%; height: 180px; object-fit: cover; }
.galleryCaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: white; padding: 8px; font-size: 12px; font-weight: 700;
}

/* ── Reviews ── */
.reviewsGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.reviewCard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; box-shadow: 0 8px 24px rgba(16,35,28,.05);
}
.stars { color: #f59e0b; font-size: 18px; margin-bottom: 8px; }

/* ── Promotions ── */
.promoCard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; overflow: hidden;
}
.promoCard img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.promoCard h4 { margin-bottom: 6px; }

/* ── Contact ── */
.contactGrid { display: grid; gap: 12px; max-width: 400px; }
.contactInfo { display: grid; gap: 12px; }
.contactInfo p { font-size: 16px; }

/* ── Footer ── */
footer { padding: 20px 6vw; background: #0f241d; color: #dff8e9; }
.footerInner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footerInner a { color: #a7f3d0; }

/* ── Success Dialog ── */
.successIcon { font-size: 48px; text-align: center; margin-bottom: 10px; }
.successCode {
  font-size: 28px; font-weight: 900; color: var(--primary);
  text-align: center; margin: 12px 0; letter-spacing: 2px;
}
.statusBadge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  font-weight: 800; font-size: 13px; margin-top: 8px;
}
.statusBadge.pending { background: #fff7ed; color: var(--warn); }
.statusBadge.info { background: #ecfdf5; color: var(--primary); }
.termsContent { max-height: 300px; overflow-y: auto; margin: 12px 0; line-height: 1.7; }

/* ── Dialog ── */
dialog {
  border: 0; border-radius: 24px;
  box-shadow: 0 35px 100px rgba(0,0,0,.22);
  max-width: 96vw;
}
dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog { padding: 22px; min-width: min(460px, 90vw); }
.dialog.wide { min-width: min(680px, 96vw); }
.dialog h2 { margin-bottom: 16px; }

/* ════════════════════════════════════════════════════
   Admin Styles
   ════════════════════════════════════════════════════ */
.adminBody { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ── Auth Overlay ── */
.authOverlay {
  position: fixed; inset: 0; background: rgba(15,36,29,.92);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.authBox {
  background: white; border-radius: 24px; padding: 32px;
  width: min(380px, 94vw); text-align: center; box-shadow: 0 40px 100px rgba(0,0,0,.3);
}
.authLogo { font-size: 48px; margin-bottom: 12px; }
.authBox h2 { margin-bottom: 6px; }
.authInput {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font: inherit; font-size: 16px; margin: 14px 0;
}
.authError { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 8px; }

/* ── Sidebar ── */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #10231c; color: white; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar a {
  padding: 11px 14px; border-radius: 12px; color: #def7e8;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.12); }
.sidebar a.active { background: var(--primary); color: white; }
.adminBrand { margin-bottom: 14px; }
.adminBrand strong { color: white; }
.adminBrand small { color: #a7d9b8; }

/* ── Admin Main ── */
.adminMain { padding: 20px; min-width: 0; overflow-x: hidden; }
.adminSection {
  background: white; border: 1px solid var(--line);
  border-radius: 22px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(16,35,28,.05);
}
.adminSection h1 { font-size: 26px; margin-bottom: 18px; }
.adminSection h2 { font-size: 22px; }

/* ── Dashboard ── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px; text-align: center;
}
.metric span { color: var(--muted); font-weight: 800; font-size: 12px; display: block; }
.metric b { display: block; font-size: 28px; margin-top: 6px; }
.dashRow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.dashCard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px;
}
.dashCard h3 { font-size: 15px; margin-bottom: 12px; }
.recentRow {
  display: grid; grid-template-columns: auto 1fr 1fr auto auto;
  gap: 8px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px;
}
.recentRow:hover { background: #f8fcfa; }
.recentCode { font-weight: 900; color: var(--primary); }
.chartRow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chartLabel { width: 100px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.chartBar { flex: 1; height: 20px; background: #f0fdf4; border-radius: 6px; overflow: hidden; }
.chartFill { height: 100%; background: var(--primary); border-radius: 6px; transition: .3s; }
.chartVal { width: 30px; text-align: right; font-size: 13px; font-weight: 700; }

/* ── Filters ── */
.filterBar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.filterBar input, .filterBar select { width: auto; padding: 8px 12px; font-size: 13px; }

/* ── Table ── */
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: white; min-width: 600px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { background: #f7fbf8; color: #365244; font-weight: 900; white-space: nowrap; }
td { white-space: nowrap; }
.actionBtns { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Status badges ── */
.status {
  display: inline-flex; padding: 4px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 900;
}
.st-pending { background: #fff7ed; color: #c2410c; }
.st-payment { background: #fef3c7; color: #d97706; }
.st-slip { background: #eff6ff; color: #2563eb; }
.st-confirmed { background: #ecfdf5; color: #166534; }
.st-checkin { background: #f0fdf4; color: #15803d; }
.st-done { background: #f8fafc; color: #475569; }
.st-cancel { background: #fef2f2; color: var(--danger); }
.st-noshow { background: #fdf2f8; color: #9d174d; }

/* ── Admin Cards ── */
.adminCard {
  background: #f8fcfa; border: 1px solid var(--line);
  border-radius: 18px; padding: 16px; margin-bottom: 10px;
}
.adminCard.compact { padding: 12px; }
.adminCardHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cardActions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Toggle ── */
.toggleWrap { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.switch {
  width: 52px; height: 28px; border-radius: 999px;
  background: #ef4444; padding: 3px; display: inline-flex;
  justify-content: flex-start; transition: .2s; flex-shrink: 0; cursor: pointer;
}
.switch.on { background: #22c55e; justify-content: flex-end; }
.knob { width: 22px; height: 22px; border-radius: 50%; background: #fff; pointer-events: none; }

/* ── Schedule ── */
.scheduleCard {
  background: #f8fcfa; border: 1px solid var(--line);
  border-radius: 18px; padding: 16px; margin-bottom: 10px;
}
.scheduleCard.slotClosed { background: #fff5f5; border-color: #fca5a5; }
.scheduleHead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.scheduleStats { display: flex; align-items: center; gap: 8px; }
.scheduleBookings { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.scheduleBookingRow {
  display: grid; grid-template-columns: auto 1fr auto auto;
  gap: 12px; padding: 6px 0; font-size: 13px; align-items: center;
}

/* ── Day checkboxes ── */
.dayChecks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ── Pay card ── */
.payCard {
  background: #f8fcfa; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; margin-top: 10px;
}
.slipThumb {
  max-width: 180px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); margin-top: 8px;
}

/* ── Detail table ── */
.detailTable { width: 100%; font-size: 14px; }
.detailTable td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.detailTable td:first-child { color: var(--muted); font-weight: 800; width: 100px; }

/* ── Sub sections ── */
.subSection { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.subSection h3 { margin-bottom: 14px; }

/* ── Admin Form ── */
.adminForm { padding: 0; }

/* ── Gallery Admin ── */
.galleryAdminGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.galleryAdminCard { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.galleryAdminCard img { width: 100%; height: 140px; object-fit: cover; }
.galleryAdminInfo { padding: 10px; }
.galleryAdminInfo b { display: block; font-size: 13px; }

/* ── Notifications ── */
.notifCard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; margin-bottom: 8px; cursor: pointer;
}
.notifCard.unread { border-color: var(--primary); background: #f0fdf4; }
.notifHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.notifCard p { font-size: 13px; color: var(--muted); }

/* ── Reports ── */
.reportGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.reportList { display: grid; gap: 8px; }
.reportRow { display: flex; justify-content: space-between; padding: 10px; background: #f8fcfa; border-radius: 10px; font-size: 14px; }

/* ── Inline label ── */
.inlineLabel { display: flex; align-items: center; gap: 10px; }

/* ═══════════════════════════════════════════════════
   Loading state
   ═══════════════════════════════════════════════════ */
.loading { opacity: .5; pointer-events: none; }

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .heroCard { display: none; }
  .split { grid-template-columns: 1fr; }
  .dashRow { grid-template-columns: 1fr; }
  .adminBody { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar a { flex: 1; min-width: 80px; text-align: center; font-size: 11px; padding: 8px 4px; }
  .adminMain { padding: 12px; }
  .section { padding: 36px 16px; }
  .sectionHead { display: block; }
  .sectionHead h2 { margin-bottom: 10px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  nav { font-size: 13px; }
  .recentRow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .formGrid { grid-template-columns: 1fr; }
  .filterBar { flex-direction: column; }
  .filterBar input, .filterBar select { width: 100%; }
}
