/* ============================================================
   PHAMOUS VISION FOUNDATION — Admin Dashboard
   Production-ready. cPanel-compatible. Mobile-first.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 72px;
  --header-h: 64px;
  --statusbar-h: 36px;
  --total-top: calc(var(--header-h) + var(--statusbar-h));

  /* Brand */
  --pvf-navy: #1a1f5e;
  --pvf-indigo: #2d35a8;
  --pvf-blue: #3b49d8;
  --pvf-orange: #f47d1a;
  --pvf-amber: #f6b31a;
  --pvf-teal: #0fb8a4;
  --pvf-coral: #f05454;

  /* Neutrals */
  --bg: #f0f2fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: rgba(45,53,168,.10);
  --border-soft: rgba(45,53,168,.06);
  --text: #1c1f3a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.14);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: .2s;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body.admin-shell {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ── STATUS BAR ─────────────────────────────────────────── */
.admin-statusbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  height: var(--statusbar-h);
  background: var(--pvf-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  letter-spacing: .02em;
  gap: 12px;
}
.admin-statusbar .sb-left,
.admin-statusbar .sb-right { display: flex; align-items: center; gap: 16px; }
.admin-statusbar .sb-item { display: flex; align-items: center; gap: 5px; }
.admin-statusbar .sb-item i { font-size: 12px; color: var(--pvf-teal); }
.admin-statusbar .sb-item.alert-item i { color: var(--pvf-amber); }
.admin-statusbar .sb-badge {
  background: var(--pvf-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: var(--r-pill);
  line-height: 16px;
  min-width: 16px;
  text-align: center;
}

/* ── LAYOUT SHELL ───────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--statusbar-h);
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.admin-sidebar {
  position: fixed;
  top: var(--statusbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(165deg, var(--pvf-navy) 0%, #23236f 60%, #1a1a5a 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--dur) var(--ease);
  z-index: 1040;
  border-right: 1px solid rgba(255,255,255,.04);
}
.admin-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(59,73,216,.25) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(244,125,26,.12) 0%, transparent 50%);
  pointer-events: none;
}
.admin-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 1;
  padding: 0 14px 16px;
}
.admin-sidebar-inner::-webkit-scrollbar { display: none; }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.sidebar-brand-logo {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.12);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.16);
}
.sidebar-brand-logo img { width: 36px; height: 36px; object-fit: contain; }
.sidebar-brand-text { overflow: hidden; }
.sidebar-brand-text strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  line-height: 1.2;
}
.sidebar-brand-text span {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}
.sidebar-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(244,125,26,.2);
  border: 1px solid rgba(244,125,26,.3);
  color: var(--pvf-amber);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Nav groups */
.nav-group { margin-bottom: 8px; }
.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 4px 10px 6px;
  margin-top: 4px;
}
.nav-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: all var(--dur) var(--ease);
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link-item:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
  transform: translateX(2px);
}
.nav-link-item.active {
  background: linear-gradient(90deg, var(--pvf-orange) 0%, rgba(244,125,26,.8) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(244,125,26,.3);
}
.nav-link-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: #fff;
  border-radius: 0 var(--r-pill) var(--r-pill) 0;
}
.nav-link-item .nav-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.10);
  border-radius: 8px;
  flex-shrink: 0;
  font-size: 14px;
  transition: background var(--dur);
}
.nav-link-item.active .nav-icon { background: rgba(255,255,255,.2); }
.nav-link-item:hover .nav-icon { background: rgba(255,255,255,.15); }
.nav-link-item .nav-badge {
  margin-left: auto;
  background: var(--pvf-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.sidebar-footer-card strong {
  display: block;
  font-size: 12px;
  color: #fff;
  margin-bottom: 6px;
}
.sidebar-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sidebar-footer-tags span {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 4px;
}
.sidebar-footer-tags span i { font-size: 10px; color: var(--pvf-teal); }

/* Collapsed state */
.sidebar-collapsed .admin-sidebar { width: var(--sidebar-collapsed-w); }
.sidebar-collapsed .sidebar-brand-text,
.sidebar-collapsed .nav-link-item .nav-label,
.sidebar-collapsed .nav-group-label,
.sidebar-collapsed .nav-link-item .nav-badge,
.sidebar-collapsed .sidebar-footer-card { display: none; }
.sidebar-collapsed .nav-link-item { justify-content: center; padding: 10px; }
.sidebar-collapsed .nav-link-item .nav-icon { width: 38px; height: 38px; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 20px 0 16px; }
.sidebar-collapsed .admin-main { margin-left: var(--sidebar-collapsed-w); }

/* ── MAIN AREA ──────────────────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--dur) var(--ease);
  flex: 1;
}

/* ── TOP HEADER BAR ─────────────────────────────────────── */
.admin-header {
  position: sticky;
  top: var(--statusbar-h);
  z-index: 1030;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
}
.header-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  transition: all var(--dur);
  flex-shrink: 0;
}
.header-toggle:hover { background: var(--bg); color: var(--pvf-blue); }

.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.header-search i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
  pointer-events: none;
}
.header-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: all var(--dur);
}
.header-search input:focus {
  border-color: var(--pvf-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,73,216,.08);
}
.header-search input::placeholder { color: var(--text-light); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.header-icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: all var(--dur);
  position: relative;
  text-decoration: none;
}
.header-icon-btn:hover { background: var(--bg); color: var(--pvf-blue); }
.header-notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--pvf-coral);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.header-divider { width: 1px; height: 28px; background: var(--border); }
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur);
  text-decoration: none;
  color: inherit;
}
.header-user:hover { background: var(--bg); border-color: var(--pvf-blue); }
.header-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--pvf-blue), var(--pvf-indigo));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.header-user-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.header-user-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── PAGE CONTENT ───────────────────────────────────────── */
.admin-content {
  padding: 28px 24px;
  flex: 1;
}

/* Page header */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pvf-orange);
  background: rgba(244,125,26,.08);
  border: 1px solid rgba(244,125,26,.16);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 8px;
}
.page-head h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--pvf-navy);
  margin: 0 0 4px;
  line-height: 1.2;
}
.page-head p { font-size: 14px; color: var(--text-muted); margin: 0; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Breadcrumb */
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.admin-breadcrumb a { color: var(--pvf-blue); text-decoration: none; }
.admin-breadcrumb a:hover { text-decoration: underline; }
.admin-breadcrumb i { font-size: 10px; }

/* ── METRIC CARDS ───────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--dur);
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: '';
  position: absolute;
  bottom: -24px; right: -24px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: .06;
}
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.metric-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.metric-card.m-blue  .metric-icon { background: rgba(59,73,216,.12); color: var(--pvf-blue); }
.metric-card.m-orange .metric-icon { background: rgba(244,125,26,.12); color: var(--pvf-orange); }
.metric-card.m-teal  .metric-icon { background: rgba(15,184,164,.12); color: var(--pvf-teal); }
.metric-card.m-amber .metric-icon { background: rgba(246,179,26,.12); color: var(--pvf-amber); }
.metric-card.m-coral .metric-icon { background: rgba(240,84,84,.12); color: var(--pvf-coral); }
.metric-card.m-navy  .metric-icon { background: rgba(26,31,94,.10); color: var(--pvf-navy); }
.metric-card::after { background: currentColor; }
.metric-body { min-width: 0; }
.metric-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.metric-value { font-size: 28px; font-weight: 800; color: var(--pvf-navy); line-height: 1; margin-bottom: 6px; }
.metric-change {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-pill);
}
.metric-change.up { background: rgba(16,185,129,.10); color: var(--success); }
.metric-change.down { background: rgba(239,68,68,.10); color: var(--danger); }
.metric-change.neutral { background: rgba(107,114,128,.10); color: var(--text-muted); }

/* ── PANEL CARDS ────────────────────────────────────────── */
.panel-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-card + .panel-card { margin-top: 20px; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.panel-head h3 { font-size: 15px; font-weight: 700; color: var(--pvf-navy); margin: 0 0 2px; }
.panel-head p  { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.panel-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pvf-blue);
  text-decoration: none;
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(59,73,216,.06);
  transition: all var(--dur);
  flex-shrink: 0;
  margin-top: 2px;
}
.panel-link:hover { background: rgba(59,73,216,.12); }
.panel-body { padding: 18px 20px; }
.panel-body-flush { /* no padding — for tables */ }

/* ── TABLES ─────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead tr { background: rgba(240,242,250,.8); }
.admin-table thead th {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background var(--dur); }
.admin-table tbody tr:hover { background: rgba(59,73,216,.02); }

/* ── STATUS PILLS ───────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pill.success { background: rgba(16,185,129,.10); color: #059669; }
.pill.success::before { background: #059669; }
.pill.warning { background: rgba(245,158,11,.10); color: #b45309; }
.pill.warning::before { background: var(--warning); }
.pill.danger  { background: rgba(239,68,68,.10); color: #dc2626; }
.pill.danger::before  { background: var(--danger); }
.pill.info    { background: rgba(59,130,246,.10); color: #1d4ed8; }
.pill.info::before    { background: var(--info); }
.pill.neutral { background: rgba(107,114,128,.10); color: var(--text-muted); }
.pill.neutral::before { background: var(--text-light); }
.pill.orange  { background: rgba(244,125,26,.10); color: #c05621; }
.pill.orange::before  { background: var(--pvf-orange); }

/* ── FILTER BAR ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  background: rgba(240,242,250,.4);
}
.filter-bar .form-select,
.filter-bar .form-control {
  border-color: var(--border);
  font-family: inherit;
  font-size: 13px;
  border-radius: var(--r-sm);
  padding: 7px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: all var(--dur);
  height: 36px;
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--pvf-blue);
  box-shadow: 0 0 0 3px rgba(59,73,216,.08);
}
.filter-bar .form-select { min-width: 140px; }
.filter-bar .form-control { min-width: 200px; flex: 1; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-primary-pvf {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--pvf-blue) 0%, var(--pvf-indigo) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur);
  box-shadow: 0 4px 14px rgba(59,73,216,.3);
  white-space: nowrap;
}
.btn-primary-pvf:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59,73,216,.4);
  color: #fff;
}
.btn-outline-pvf {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  color: var(--pvf-blue);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--pvf-blue);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur);
  white-space: nowrap;
}
.btn-outline-pvf:hover { background: rgba(59,73,216,.06); }
.btn-danger-pvf {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(239,68,68,.08);
  color: var(--danger);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(239,68,68,.2);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur);
}
.btn-danger-pvf:hover { background: rgba(239,68,68,.14); }
.btn-sm-icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--dur);
  text-decoration: none;
}
.btn-sm-icon:hover { background: var(--bg); color: var(--pvf-blue); border-color: var(--pvf-blue); }

/* ── FORMS ──────────────────────────────────────────────── */
.form-field { margin-bottom: 18px; }
.form-label-admin {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.form-label-admin .required { color: var(--pvf-coral); }
.form-input-admin,
.form-select-admin,
.form-textarea-admin {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: all var(--dur);
  appearance: none;
}
.form-input-admin:focus,
.form-select-admin:focus,
.form-textarea-admin:focus {
  border-color: var(--pvf-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,73,216,.08);
}
.form-input-admin::placeholder { color: var(--text-light); }
.form-textarea-admin { resize: vertical; min-height: 100px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.form-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.form-switch-row:last-child { border-bottom: none; }
.form-switch-row .switch-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.form-switch-row .switch-hint { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.form-switch-row .switch-toggle { margin-left: auto; flex-shrink: 0; }

/* ── CHARTS ─────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  padding: 0 0 16px;
}
.chart-svg { width: 100%; display: block; }
.chart-labels {
  display: flex; justify-content: space-around;
  padding: 0 20px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
}
.donut-svg-wrap { position: relative; flex-shrink: 0; }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.donut-center strong { font-size: 22px; font-weight: 800; color: var(--pvf-navy); }
.donut-center span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.legend-list { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-value { margin-left: auto; font-weight: 700; color: var(--pvf-navy); font-size: 13px; }
.legend-pct { font-size: 11px; color: var(--text-muted); }

/* Line chart area */
.chart-line-wrap {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  overflow: hidden;
  position: relative;
}

/* ── PROGRESS ───────────────────────────────────────────── */
.progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 13px; }
.progress-row strong { font-weight: 700; color: var(--pvf-navy); }
.progress-bar-wrap {
  background: var(--bg);
  border-radius: var(--r-pill);
  height: 7px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar-fill { height: 100%; border-radius: var(--r-pill); transition: width .6s var(--ease); }
.fill-blue   { background: linear-gradient(90deg, var(--pvf-blue), var(--pvf-indigo)); }
.fill-orange { background: linear-gradient(90deg, var(--pvf-orange), var(--pvf-amber)); }
.fill-teal   { background: linear-gradient(90deg, var(--pvf-teal), #0dd6bf); }
.fill-coral  { background: linear-gradient(90deg, var(--pvf-coral), #f87171); }

/* ── ACTIVITY FEED ──────────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(59,73,216,.02); }
.activity-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-body strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.activity-body span { font-size: 12px; color: var(--text-muted); }
.activity-meta { font-size: 11.5px; color: var(--text-light); white-space: nowrap; }

/* ── GALLERY GRID ───────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px;
}
.gallery-thumb {
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-thumb-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.7), transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 16px 8px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .2s;
}
.gallery-thumb:hover .gallery-thumb-label { opacity: 1; }

/* ── QUICK ACTIONS ──────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 20px;
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  transition: all var(--dur);
  text-align: center;
}
.quick-action-btn i {
  font-size: 22px;
  color: var(--pvf-blue);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,73,216,.08);
  border-radius: 12px;
}
.quick-action-btn:hover {
  border-color: var(--pvf-blue);
  background: rgba(59,73,216,.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--pvf-navy);
}

/* ── UPLOAD ZONE ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur);
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--pvf-blue);
  background: rgba(59,73,216,.03);
}
.upload-zone i { font-size: 32px; color: var(--pvf-blue); opacity: .6; margin-bottom: 10px; }
.upload-zone strong { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.upload-zone span { font-size: 12.5px; color: var(--text-muted); }

/* ── ALERTS / FLASH ─────────────────────────────────────── */
.flash-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 20px;
  border-left: 4px solid;
}
.flash-msg.success { background: rgba(16,185,129,.08); border-color: var(--success); color: #065f46; }
.flash-msg.error   { background: rgba(239,68,68,.08); border-color: var(--danger); color: #991b1b; }
.flash-msg.info    { background: rgba(59,130,246,.08); border-color: var(--info); color: #1e40af; }
.flash-msg i { font-size: 18px; flex-shrink: 0; }
.flash-close { margin-left: auto; cursor: pointer; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top left, rgba(59,73,216,.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(244,125,26,.10) 0%, transparent 50%),
    linear-gradient(160deg, #f0f2fa 0%, #e8ecf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pvf-blue), var(--pvf-orange));
}
.login-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 16px; }
.login-title { font-size: 24px; font-weight: 800; color: var(--pvf-navy); margin: 0 0 4px; }
.login-sub { font-size: 14px; color: var(--text-muted); margin: 0 0 28px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-light); font-size: 15px;
  pointer-events: none;
}
.input-icon-wrap input {
  padding-left: 38px;
  height: 44px;
}
.login-divider { height: 1px; background: var(--border); margin: 20px 0; }
.login-note {
  background: rgba(245,158,11,.06);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #78350f;
  margin-top: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.login-note i { color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.login-features {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.login-feature-tag {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}
.login-feature-tag i { font-size: 11px; color: var(--pvf-teal); }

/* ── EMPTY STATES ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 40px; opacity: .3; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; margin: 0; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    transition: transform .25s var(--ease), box-shadow .25s;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .admin-main { margin-left: 0; }
  .sidebar-collapsed .admin-sidebar { transform: translateX(-100%); }
  .sidebar-collapsed .admin-main { margin-left: 0; }
}
@media (max-width: 768px) {
  .admin-content { padding: 20px 16px; }
  .page-head { flex-direction: column; }
  .page-head h1 { font-size: 22px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .donut-wrap { flex-direction: column; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-select,
  .filter-bar .form-control { width: 100%; min-width: unset; }
}

/* ── UTILITIES ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-7-5, .grid-2-1 { grid-template-columns: 1fr; }
}
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-auto { margin-top: auto; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.fw-700 { font-weight: 700; }
.text-navy { color: var(--pvf-navy); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── MOBILE OVERLAY ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 1035;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }
