:root {
  --p-primary: #0d3b2e;
  --p-primary-light: #14503f;
  --p-accent: #c9a24b;
  --p-bg: #f6f7f5;
  --p-dark: #10201b;
  --p-danger: #e5484d;
  --p-success: #1e9e5a;
  --p-warning: #e8a53d;
  --p-info: #3f8ce8;
}
* { box-sizing: border-box; }
body.portal-body {
  font-family: 'Poppins', sans-serif;
  background: var(--p-bg);
  color: #2b332f;
  margin: 0;
  padding-bottom: 76px; /* space for bottom nav on mobile */
}
a { text-decoration: none; }

/* ---------- Top bar ---------- */
.portal-topbar {
  position: sticky; top: 0; z-index: 1030; background: #fff;
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.portal-brand { display: flex; align-items: center; gap: 10px; }
.portal-brand img { height: 32px; }
.portal-brand span { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--p-primary); font-size: 16px; }
.portal-topbar-actions { display: flex; align-items: center; gap: 10px; }
.portal-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; background: var(--p-bg); border: none;
  display: flex; align-items: center; justify-content: center; color: var(--p-primary); position: relative;
}
.portal-icon-btn .badge-dot {
  position: absolute; top: -3px; right: -3px; background: var(--p-danger); color: #fff; font-size: 10px;
  width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.portal-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--p-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Playfair Display', serif;
}

/* ---------- Desktop top nav ---------- */
.portal-top-nav { align-items: center; gap: 4px; }
.portal-top-nav-link {
  color: #5b6863; font-weight: 500; font-size: 13.5px; padding: 8px 14px; border-radius: 8px; transition: .2s;
}
.portal-top-nav-link:hover { background: var(--p-bg); color: var(--p-primary); }
.portal-top-nav-link.active { background: var(--p-primary); color: #fff; }

/* ---------- Mobile slide-down menu ---------- */
.portal-mobile-menu {
  display: none; flex-direction: column; background: #fff; border-bottom: 1px solid #eef1ee;
  position: sticky; top: 66px; z-index: 1025; box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}
.portal-mobile-menu.open { display: flex; }
.portal-mobile-menu-link { padding: 14px 22px; color: #3a453f; font-weight: 500; font-size: 14.5px; border-top: 1px solid #f4f6f5; }
.portal-mobile-menu-link.active { color: var(--p-primary); font-weight: 700; background: var(--p-bg); }

/* ---------- Content ---------- */
.portal-content { max-width: 720px; margin: 0 auto; padding: 24px 18px 40px; }
.portal-page-title { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--p-primary); margin-bottom: 4px; }
.portal-page-sub { color: #7c8981; font-size: 14px; margin-bottom: 24px; }

/* ---------- Bottom nav (mobile app feel) ---------- */
.portal-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1040; background: #fff;
  border-top: 1px solid #eef1ee; display: flex; justify-content: space-around; padding: 8px 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.portal-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: #9aa6a0;
  font-size: 11px; padding: 6px 10px; border-radius: 10px; transition: .2s;
}
.portal-nav-item i { font-size: 18px; }
.portal-nav-item.active { color: var(--p-primary); }
.portal-nav-item.active i { color: var(--p-accent); }

/* ---------- Cards ---------- */
.portal-card { background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); margin-bottom: 18px; }
.portal-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.portal-card-title { font-weight: 600; color: var(--p-primary); margin: 0; font-size: 16px; }

.portal-stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.portal-stat {
  flex: 1; min-width: 130px; background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04); text-align: center;
}
.portal-stat .num { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.4rem; color: var(--p-primary); }
.portal-stat .label { font-size: 11.5px; color: #8a978f; text-transform: uppercase; letter-spacing: .3px; }

.booking-mini-card {
  border: 1px solid #eef1ee; border-radius: 14px; padding: 16px; margin-bottom: 12px; transition: .2s;
}
.booking-mini-card:hover { border-color: var(--p-accent); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.booking-mini-card .ref { font-weight: 700; color: var(--p-primary); }
.booking-mini-card .room { font-size: 13px; color: #6b7a75; }
.booking-mini-card .dates { font-size: 12.5px; color: #8a978f; margin-top: 4px; }

.badge-status { padding: 5px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.badge-new { background: #e8f0ff; color: #3f6fe8; }
.badge-confirmed, .badge-active, .badge-fully_paid, .badge-successful, .badge-completed, .badge-resolved, .badge-approved { background: #e5f7ea; color: var(--p-success); }
.badge-pending, .badge-deposit_paid, .badge-open, .badge-in_progress { background: #fff4e0; color: var(--p-warning); }
.badge-cancelled, .badge-failed, .badge-declined { background: #fde8e8; color: var(--p-danger); }
.badge-checked_in, .badge-checked_out { background: #eef1ff; color: #6a5acd; }

/* ---------- Forms ---------- */
.portal-body .form-control, .portal-body .form-select {
  border-radius: 10px; border: 1px solid #e2e6e3; padding: 11px 14px; font-size: 14.5px;
}
.portal-body .form-control:focus, .portal-body .form-select:focus { border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(201,162,75,0.15); }
.portal-body .form-label { font-weight: 500; font-size: 13.5px; color: #3a453f; margin-bottom: 6px; }
.btn-portal-primary { background: var(--p-primary); border: none; color: #fff; padding: 12px 24px; border-radius: 10px; font-weight: 600; transition: .2s; }
.btn-portal-primary:hover { background: var(--p-accent); color: #fff; }
.btn-portal-outline { background: #fff; color: var(--p-primary); border: 1px solid #dde4e0; border-radius: 10px; padding: 11px 22px; font-size: 14px; }

/* ---------- Auth screens ---------- */
.portal-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--p-primary), #0a2b21); padding: 20px; }
.portal-auth-card { background: #fff; border-radius: 20px; padding: 40px; max-width: 420px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,0.3); }

/* ---------- Empty state ---------- */
.portal-empty { text-align: center; padding: 40px 20px; color: #9aa6a0; }
.portal-empty i { font-size: 40px; margin-bottom: 12px; display: block; }

@media (min-width: 768px) {
  .portal-bottom-nav { display: none; }
  body.portal-body { padding-bottom: 0; }
}
