:root {
  --ink: #1d2639;
  --muted: #6b7489;
  --line: #e6e9f0;
  --brand: #0b2a6f;
  --brand-deep: #071a47;
  --accent: #f7921e;
  --cream: #fff7ec;
  --bg: #f6f7fb;
  --shadow: 0 10px 30px rgba(11, 42, 111, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

/* ---------- Staff header (matches the public site) ---------- */
.staff-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.staff-strip { background: var(--brand-deep); color: rgba(255,255,255,.7); font-size: 12px; }
.staff-strip .staff-wrap { padding-top: 7px; padding-bottom: 7px; }
.staff-strip strong { color: #fff; font-weight: 600; }
.staff-strip a { color: var(--accent); text-decoration: none; font-weight: 600; }

.topbar { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 2px 18px rgba(7,26,71,.07); }
.topbar .staff-wrap { min-height: 70px; padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--brand); text-decoration: none; }
.brand strong { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: block; flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: contain; }

.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; }
.topbar nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; text-decoration: none; }
.topbar nav a:hover, .topbar nav a.active { color: var(--accent); }
.topbar nav a.active { background: var(--cream); }
.topbar nav a.nav-cta { margin-left: 8px; padding: 9px 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; }
.topbar nav a.nav-cta:hover { background: var(--accent); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }

main { max-width: 1200px; margin: 0 auto; padding: 34px 20px 60px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

h1 { margin: 2px 0 0; color: var(--brand); font-size: 32px; font-weight: 800; line-height: 1.15; }
h2 { margin: 0 0 14px; color: var(--brand); font-size: 18px; font-weight: 700; }

/* Script eyebrow, like "Explore Mahayag" on the landing page. */
.eyebrow {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 18px;
}

.metric { border-top: 4px solid var(--accent); }
.metric span { display: block; font-size: 13px; color: var(--muted); }
.metric strong { display: block; margin-top: 6px; color: var(--brand); font-size: 32px; font-weight: 800; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.button:hover { background: var(--brand); }

.button.secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--line);
}
.button.secondary:hover { border-color: var(--brand); }
.button.navy { background: var(--brand); }
.button.navy:hover { background: var(--accent); }

.grid-two {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.45fr 1fr;
  align-items: start;
}

@media (max-width: 860px) {
  .grid-two { grid-template-columns: 1fr; }
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}

/* One height and look for every field, including Safari's native selects. */
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 11px 14px;
  border: 1px solid #dde2ec;
  border-radius: 12px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b2a6f' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; min-height: 0; }
input[type="file"] { padding: 9px 12px; }

input:focus, select:focus, textarea:focus {
  outline: 3px solid #ffe6c7;
  border-color: var(--accent);
}

textarea { resize: vertical; }

.form-grid {
  display: grid;
  gap: 0 16px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.actions label { margin-bottom: 0; }

.alert { background: #fdecec; color: #8f2d2d; border-radius: 12px; padding: 12px; font-size: 14px; }
.notice { background: #ebf8ed; color: #176644; border-radius: 12px; padding: 12px; font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.row-title { font-weight: 600; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #edf1ed; }
th { background: #f7faf7; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; margin-top: 14px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar-track { width: 100%; flex: 1; display: flex; align-items: flex-end; background: #eef4ef; border-radius: 8px; }
.bar-fill { width: 100%; min-height: 3px; background: var(--brand); border-radius: 8px; }
.bar-label, .bar-value { font-size: 11px; color: var(--muted); }

.list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #edf1ed;
  font-size: 14px;
}

.list-row:last-child { border-bottom: 0; }

.bar-line { height: 7px; margin-top: 8px; border-radius: 999px; background: #e9f1e9; }
.bar-line span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

.qr-panel { text-align: center; margin-top: 14px; }
.qr-panel img { width: 180px; height: 180px; }

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-page { background: radial-gradient(circle at 85% 15%, #1f7a8c 0, transparent 40%), linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.login-card { width: 100%; max-width: 400px; padding: 32px; }
.login-card h1 { font-size: 24px; margin: 0 0 6px; }
.login-brand { margin-bottom: 22px; }
.login-back { margin: 16px 0 0; text-align: center; }
.login-back a { text-decoration: none; }
.login-card button { width: 100%; margin-top: 6px; }

.site-footer { padding: 24px; background: var(--brand-deep); color: rgba(255,255,255,.6); text-align: center; font-size: 12px; }

/* Destinations and reviews admin */
.button.danger { background: #b42318; }
.danger-text { color: #b42318 !important; }
.link-button { padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.link-button.danger { color: #b42318; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
label.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.thumb { display: block; width: 72px; height: 52px; border-radius: 8px; object-fit: cover; }
.thumb-empty { display: grid; place-items: center; background: #eef1f7; color: var(--muted); font-size: 10px; }
.pill { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: #e7f6ec; color: #17663a; }
.pill-off { background: #eef1f7; color: var(--muted); }
.pill-accent { background: #fff1e0; color: #a85a00; }
.upload-box { padding: 14px; border: 1px dashed #c9d2e4; border-radius: 12px; margin-bottom: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { position: relative; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.photo.is-cover { border-color: var(--accent); }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.cover-tag { position: absolute; top: 14px; left: 14px; }
.caption-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.caption-form input { margin: 0; padding: 6px 8px; font-size: 12px; }
.photo-actions { display: flex; justify-content: space-between; margin-top: 6px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d5dae5; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tabs .count { opacity: .7; margin-left: 4px; }
.review-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-row > div:first-child { flex: 1 1 380px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review-text { margin: 8px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }

/* Check-in */
.step { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.card form .step:not(:first-of-type) { margin-top: 18px; }
.side-stack { display: flex; flex-direction: column; gap: 20px; }
.dest-preview { padding: 0; overflow: hidden; }
.preview-media { height: 150px; background: #e8edf7; }
.preview-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-body { padding: 20px 24px 24px; text-align: center; }
.preview-body h2 { margin: 8px 0 2px; font-size: 20px; }
.media-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--brand), #1f7a8c); color: rgba(255,255,255,.85); font-size: 54px; font-weight: 800; }
.qr-box { display: inline-block; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--line); line-height: 0; }
.qr-box img, .qr-box canvas { display: block; }
.today { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.today strong { color: var(--accent); font-size: 20px; }
.actions.center { justify-content: center; }

/* QR codes on the destinations page */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.qr-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.qr-tile strong { color: var(--brand); }
.qr-tile .button { padding: 8px 14px; }
.qr-link { display: block; color: var(--muted); font-size: 11px; word-break: break-all; text-decoration: none; }
.qr-link:hover { color: var(--accent); }
.qr-mini { display: inline-block; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; line-height: 0; }
.qr-mini img, .qr-mini canvas { width: 56px; height: 56px; }
.qr-inline { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qr-inline > div:last-child { flex: 1 1 180px; }

/* Printable QR posters (qr.php) */
.qr-page { background: #e9edf5; }
.qr-toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #fff; box-shadow: var(--shadow); }
.qr-warning { max-width: 720px; margin: 20px auto 0; }
.poster { width: 148mm; min-height: 200mm; margin: 24px auto; padding: 14mm 12mm; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: center; border-top: 10px solid var(--accent); }
.poster-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; color: var(--brand); text-align: left; }
.poster-head strong { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; }
.poster-head .brand-mark { width: 72px; height: 72px; }
.poster-head small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.poster-photo { height: 38mm; margin: 0 0 14px; border-radius: 12px; background-size: cover; background-position: center; }
.poster .eyebrow { font-size: 30px; }
.poster h1 { margin: 0 0 4px; font-size: 30px; }
.poster-qr { display: inline-block; margin: 14px 0 6px; padding: 14px; border: 3px solid var(--brand); border-radius: 18px; line-height: 0; }
.poster h2 { margin: 6px 0 8px; font-size: 24px; }
.poster-steps { display: flex; justify-content: center; gap: 18px; margin: 0 0 12px; padding: 0; list-style: none; counter-reset: step; font-size: 12px; color: var(--muted); }
.poster-steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.poster-url { margin: 0 0 12px; color: var(--muted); font-size: 10px; word-break: break-all; }
@media print {
  .qr-page { background: #fff; }
  .poster { margin: 0 auto; box-shadow: none; border-radius: 0; page-break-after: always; break-after: page; }
  .poster:last-of-type { page-break-after: auto; break-after: auto; }
  .poster-qr, .poster-photo, .poster-steps li::before, .poster { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 760px) {
  .staff-strip .staff-wrap span:first-child { display: none; }
  .topbar { position: static; }
  .topbar nav a.nav-cta { margin-left: 0; }
}

@media print {
  .topbar, .staff-strip, .site-footer, .no-print, .button { display: none !important; }
  .card { box-shadow: none; }
  main { max-width: none; padding: 0; }
  .card, .table-wrap { border: 0; }
}
