:root {
  --hb-primary: #1d4ed8;
  --hb-primary-dark: #1e3a8a;
  --hb-bg: #f4f6fb;
  --hb-card-bg: #ffffff;
  --hb-border: #e2e8f0;
  --hb-text-muted: #64748b;
  --hb-sidebar-width: 220px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--hb-bg);
  color: #1e293b;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

table { max-width: 100%; }

/* ---------- Layout: sidebar + content ---------- */
.hb-shell {
  display: flex;
  min-height: 100vh;
}

.hb-sidebar {
  width: var(--hb-sidebar-width);
  flex-shrink: 0;
  background: var(--hb-primary-dark);
  color: #fff;
  padding: 1.25rem 0;
}

.hb-sidebar .hb-brand {
  padding: 0 1.25rem 1rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: .75rem;
}

.hb-sidebar .nav-link {
  color: rgba(255,255,255,.8);
  padding: .65rem 1.25rem;
  border-left: 3px solid transparent;
}

.hb-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.hb-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-left-color: #fbbf24;
  font-weight: 600;
}

.hb-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
}

/* ---------- Mobile topbar + off-canvas nav drawer ---------- */
.hb-topbar {
  display: none;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: var(--hb-primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.hb-topbar .hb-hamburger {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: .35rem;
}
.hb-topbar .hb-hamburger:focus-visible,
.hb-topbar .hb-hamburger:active {
  background: rgba(255,255,255,.12);
  outline: none;
}
.hb-topbar-brand {
  font-weight: 700;
  font-size: .98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 1040;
  opacity: 0;
  transition: opacity .2s ease;
}
.hb-sidebar-backdrop.hb-open {
  display: block;
  opacity: 1;
}

body.hb-nav-locked { overflow: hidden; }

@media (max-width: 991.98px) {
  .hb-shell { flex-direction: column; }
  .hb-topbar { display: flex; }

  .hb-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 82vw);
    height: 100vh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .28s ease;
    z-index: 1050;
    padding-top: 1.1rem;
  }
  .hb-sidebar.hb-open {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0,0,0,.3);
  }
  .hb-sidebar .nav { flex-direction: column !important; }
  .hb-sidebar .nav-link {
    border-left: 3px solid transparent;
    border-bottom: none;
    white-space: normal;
  }
  .hb-sidebar .nav-link.active {
    border-left-color: #fbbf24;
    border-bottom-color: transparent;
  }

  .hb-content { padding: 1.1rem; }
}

@media (max-width: 480px) {
  .hb-content { padding: .85rem; }
  .bw-card { padding: 1.1rem; }
  .hb-steps { gap: .4rem; }
  .hb-step { font-size: .72rem; padding: .28rem .6rem; }
  .room-rate { font-size: 1.3rem; }
  .qr-placeholder { width: 130px; height: 130px; }
  .guest-form-block { padding: .85rem 1rem; }
  .stat-card .stat-value { font-size: 1.35rem; }
  .hb-home-cta-band { text-align: center; justify-content: center; }
  .hb-home-footer { justify-content: center; text-align: center; }
  .hb-home-footer a { margin: 0 .5rem; }
}

/* ---------- Step indicator ---------- */
.hb-steps {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.hb-step {
  font-size: .78rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--hb-text-muted);
}
.hb-step.active {
  background: var(--hb-primary);
  color: #fff;
  font-weight: 600;
}
.hb-step.done {
  background: #dcfce7;
  color: #166534;
}

/* ---------- Card ---------- */
.bw-card {
  background: var(--hb-card-bg);
  border: 1px solid var(--hb-border);
  border-radius: .75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* ---------- Status badges ---------- */
.badge-status {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-Pending      { background:#fef9c3; color:#854d0e; }
.badge-Confirmed    { background:#dcfce7; color:#166534; }
.badge-Paid         { background:#dcfce7; color:#166534; }
.badge-Rejected     { background:#fee2e2; color:#991b1b; }
.badge-Refunded     { background:#e0e7ff; color:#3730a3; }
.badge-Cancelled    { background:#f1f5f9; color:#475569; }
.badge-Failed       { background:#fee2e2; color:#991b1b; }
.badge-PendingCounterPayment { background:#e0f2fe; color:#075985; }

/* Compact select that looks like a status badge, used for the payment-status quick action */
.badge-select {
  border: none;
  border-radius: 999px;
  padding: .3rem 1.6rem .3rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.badge-select:focus { box-shadow: 0 0 0 .15rem rgba(37, 99, 235, .25); }

/* ---------- Summary box ---------- */
.summary-box .summary-row {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  color: var(--hb-text-muted);
  font-size: .92rem;
}
.summary-box .summary-total {
  border-top: 1px solid var(--hb-border);
  margin-top: .5rem;
  padding-top: .6rem;
  font-weight: 700;
  color: #0f172a;
  font-size: 1.05rem;
}

/* ---------- Room card ---------- */
.room-card {
  border: 1px solid var(--hb-border);
  border-radius: .6rem;
}
.room-type-badge {
  display: inline-block;
  background: var(--hb-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: .35rem;
}
.room-rate {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--hb-primary-dark);
}

/* ---------- Meal quantity control ---------- */
.meal-item {
  border: 1px solid var(--hb-border);
  border-radius: .6rem;
  padding: .9rem 1rem;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hb-border);
  border-radius: .4rem;
  overflow: hidden;
}
.qty-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.qty-control input {
  width: 48px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--hb-border);
  border-right: 1px solid var(--hb-border);
  height: 32px;
}

/* ---------- Guest detail form blocks ---------- */
.guest-form-block {
  border: 1px solid var(--hb-border);
  border-radius: .6rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}
.guest-form-block .guest-form-badge {
  position: absolute;
  top: -.6rem;
  left: 1rem;
  background: var(--hb-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 999px;
}
.guest-form-block.child-block .guest-form-badge {
  background: #d97706;
}

/* ---------- QR placeholder ---------- */
.qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border: 2px dashed var(--hb-border);
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: .7rem;
  color: var(--hb-text-muted);
  font-weight: 600;
  text-align: center;
}

/* ---------- Privacy modal ---------- */
.hb-privacy-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.hb-privacy-modal {
  background: #fff;
  border-radius: .75rem;
  max-width: 560px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 45px rgba(0,0,0,.25);
}

/* =====================================================
 * Homepage (public landing page, index.php)
 * ===================================================== */
.hb-home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem);
}
.hb-home-nav .hb-home-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #0f172a;
  letter-spacing: .01em;
}

.hb-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(8,15,33,.35) 0%, rgba(8,15,33,.35) 40%, rgba(6,10,24,.92) 100%),
    url('../img/hotel-hero.jpg') center/cover no-repeat;
  color: #fff;
}
.hb-hero-inner {
  width: 100%;
  padding: 3rem clamp(1.25rem, 4vw, 3.5rem) 3.5rem;
}
.hb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(253, 230, 138, .12);
  border: 1px solid rgba(253, 230, 138, .35);
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hb-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  max-width: 16ch;
  margin-bottom: 1rem;
}
.hb-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hb-hero-sub .bi { color: #fde68a; }
.hb-hero-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hb-hero-cta .btn-primary {
  padding: .85rem 1.9rem;
  font-weight: 700;
  font-size: 1.02rem;
  border-radius: .5rem;
  box-shadow: 0 10px 30px -8px rgba(29, 78, 216, .65);
}
.hb-hero-cta .hb-hero-secondary {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: 2px;
}
.hb-hero-cta .hb-hero-secondary:hover { border-color: #fde68a; color: #fde68a; }

.hb-home-section {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3.5rem);
  max-width: 1180px;
  margin: 0 auto;
}
.hb-home-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hb-primary);
  margin-bottom: .5rem;
}
.hb-facility-card {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: .75rem;
  padding: 1.4rem 1.25rem;
  height: 100%;
}
.hb-facility-card .bi {
  font-size: 1.4rem;
  color: var(--hb-primary);
  margin-bottom: .6rem;
  display: inline-block;
}
.hb-home-cta-band {
  background: linear-gradient(135deg, var(--hb-primary-dark), var(--hb-primary));
  color: #fff;
  border-radius: 1rem;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hb-home-cta-band h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; margin-bottom: .35rem; }
.hb-home-cta-band .btn-light { font-weight: 700; padding: .75rem 1.6rem; }

.hb-home-footer {
  border-top: 1px solid var(--hb-border);
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem);
  color: var(--hb-text-muted);
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.hb-home-footer a { color: var(--hb-text-muted); margin-left: 1rem; text-decoration: none; }
.hb-home-footer a:hover { color: var(--hb-primary); }

@media (max-width: 576px) {
  .hb-hero { min-height: 86vh; }
}

/* ---------- Admin dashboard stat cards ---------- */
.stat-card {
  background: #fff;
  border: 1px solid var(--hb-border);
  border-radius: .75rem;
  padding: 1.1rem 1.25rem;
}
.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--hb-primary-dark);
}
.stat-card .stat-label {
  font-size: .8rem;
  color: var(--hb-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
