:root {
  --a-primary: #0d3b2e;
  --a-primary-light: #14503f;
  --a-accent: #c9a24b;
  --a-bg: #f4f6f5;
  --a-sidebar-w: 265px;
  --a-dark: #10201b;
  --a-danger: #e5484d;
  --a-success: #1e9e5a;
  --a-warning: #e8a53d;
  --a-info: #3f8ce8;
}
* { box-sizing: border-box; }
body.admin-body {
  font-family: 'Poppins', sans-serif;
  background: var(--a-bg);
  color: #2b332f;
  margin: 0;
}
a { text-decoration: none; }

/* ---------- Sidebar ---------- */
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--a-sidebar-w);
  background: linear-gradient(180deg, var(--a-primary), #0a2b21);
  color: #dfe7e3; z-index: 1040; display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.sidebar-brand { padding: 24px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand img { height: 36px; }
.sidebar-brand span { font-family: 'Playfair Display', serif; font-weight: 700; color: #fff; font-size: 16px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 18px 12px; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
.sidebar-section-label { text-transform: uppercase; font-size: 11px; letter-spacing: 1px; color: #7d9187; padding: 14px 12px 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: #cdd9d3; font-size: 14.5px; margin-bottom: 3px; transition: .2s; text-decoration: none;
}
.sidebar-link:hover, .sidebar-link:focus, .sidebar-link:active { text-decoration: none; }
.sidebar-link i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: var(--a-accent); color: #1a1a1a; font-weight: 600; }
.sidebar-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: #7d9187; }

/* ---------- Main content ---------- */
.admin-main { margin-left: var(--a-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 1030; background: #fff; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.admin-topbar .page-title { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--a-primary); font-size: 20px; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; background: var(--a-bg); display: flex; align-items: center;
  justify-content: center; color: var(--a-primary); position: relative; border: none;
}
.icon-btn .badge-dot {
  position: absolute; top: -3px; right: -3px; background: var(--a-danger); color: #fff; font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.admin-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.admin-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--a-primary); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-family: 'Playfair Display', serif;
}
.admin-content { padding: 28px; flex: 1; }
.sidebar-toggle-btn { display: none; }

@media (max-width: 991px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle-btn { display: flex; }
}

/* ---------- Cards / widgets ---------- */
.stat-card {
  background: #fff; border-radius: 16px; padding: 24px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04); height: 100%;
}
.stat-icon {
  width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--a-primary); font-family: 'Playfair Display', serif; }
.stat-card .stat-label { font-size: 12.5px; color: #8a978f; text-transform: uppercase; letter-spacing: .4px; }
.stat-card .stat-trend { font-size: 12px; font-weight: 600; }
.trend-up { color: var(--a-success); }
.trend-down { color: var(--a-danger); }

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

.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
  background: var(--a-bg); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #6c7a72;
  padding: 12px 16px; border: none; font-weight: 600;
}
.table-modern tbody td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #f0f2f0; vertical-align: middle; }
.table-modern tbody tr:hover { background: #fafcfb; }

.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-sent { background: #e5f7ea; color: var(--a-success); }
.badge-pending, .badge-deposit_paid { background: #fff4e0; color: var(--a-warning); }
.badge-cancelled, .badge-failed, .badge-suspended, .badge-inactive { background: #fde8e8; color: var(--a-danger); }
.badge-checked_in, .badge-checked_out { background: #eef1ff; color: #6a5acd; }

.btn-admin-primary { background: var(--a-primary); color: #fff; border: none; border-radius: 9px; padding: 9px 18px; font-weight: 500; font-size: 14px; }
.btn-admin-primary:hover { background: var(--a-accent); color: #fff; }
.btn-admin-outline { background: #fff; color: var(--a-primary); border: 1px solid #dde4e0; border-radius: 9px; padding: 8px 16px; font-size: 13.5px; }

.perm-check-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 10px; }
.perm-check-item { background: var(--a-bg); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }

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