/* ============================================================
   NGO ADMIN PANEL — admin.css  v2.0
   Design: Dark sidebar · Warm orange accent · Sora font
   ============================================================ */

:root {
  /* BRAND */
  --brand:        #ff7a00;
  --brand-dk:     #e06800;
  --brand-lt:     #ff9800;
  --brand-glow:   rgba(255,122,0,.18);
  --brand-soft:   rgba(255,122,0,.08);
  --brand-mid:    rgba(255,122,0,.14);

  /* SIDEBAR */
  --sb-bg:        #0c0e16;
  --sb-hover:     rgba(255,255,255,.05);
  --sb-active:    rgba(255,122,0,.14);
  --sb-border:    rgba(255,255,255,.06);
  --sb-w:         260px;

  /* PAGE */
  --bg:           #f4f3f0;
  --bg-card:      #ffffff;
  --bg-input:     #fafaf8;
  --bg-table-hd:  #f8f7f4;

  /* TEXT */
  --tx:           #1a1a2e;
  --tx2:          #6b6b80;
  --tx3:          #a0a0b0;
  --tx-inv:       #ffffff;

  /* BORDERS */
  --bdr:          #e8e6e0;
  --bdr-focus:    var(--brand);

  /* STATUS */
  --green:        #22c55e;
  --red:          #ef4444;
  --blue:         #3b82f6;
  --purple:       #8b5cf6;
  --yellow:       #f59e0b;

  /* SHADOW */
  --sh-sm:   0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --sh-md:   0 4px 16px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.05);
  --sh-lg:   0 12px 40px rgba(0,0,0,.12);
  --sh-brand:0 4px 20px rgba(255,122,0,.30);

  /* RADIUS */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* TOPBAR */
  --tb-h: 64px;

  /* FONT */
  --f-body: 'Sora', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --f-hi:   'Noto Sans Devanagari', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--tx);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--f-body); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--f-body); }
img { max-width: 100%; }
ul { list-style: none; }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sb-w);
  min-height: 100vh;
  background: var(--sb-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset-block: 0;
  left: 0;
  z-index: 300;
  border-right: 1px solid var(--sb-border);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
}

.brand-cow {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--brand), var(--brand-lt));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.brand-text { flex: 1; min-width: 0; }
.brand-name { display: block; font-size: 15px; font-weight: 800; color: #fff; }
.brand-sub  { display: block; font-size: 10px; color: var(--tx3); margin-top: 1px; }

.sb-close {
  color: rgba(255,255,255,.3); font-size: 14px; padding: 4px;
  border-radius: 6px; display: none;
}
.sb-close:hover { color: rgba(255,255,255,.8); background: var(--sb-hover); }

/* NAV */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}

.nav-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
  padding: 16px 8px 5px;
  white-space: nowrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 1px;
  transition: all .18s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--sb-hover);
  color: rgba(255,255,255,.88);
}

.nav-link.active {
  background: var(--sb-active);
  color: var(--brand-lt);
  font-weight: 700;
}

.nav-link .ni {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-style: normal;
}

.nav-logout { color: rgba(239,68,68,.65); margin-top: 4px; }
.nav-logout:hover { background: rgba(239,68,68,.10); color: #ef4444; }

/* SIDEBAR FOOTER */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 18px;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
}

.sf-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-lt));
  color: #fff; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.sf-info { display: flex; flex-direction: column; min-width: 0; }
.sf-name { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-role { font-size: 11px; color: var(--tx3); margin-top: 1px; }

/* OVERLAY */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 299;
  backdrop-filter: blur(2px);
}

/* ── MAIN WRAP ────────────────────────────────────────────── */
.main-wrap {
  margin-left: var(--sb-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar {
  height: var(--tb-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 14px;
  position: sticky; top: 0;
  z-index: 200;
  box-shadow: var(--sh-sm);
}

.tb-left  { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 7px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--bdr);
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--tx2); border-radius: 2px; transition: .2s; }
.hamburger:hover { background: var(--bdr); }

.tb-title {
  font-size: 17px; font-weight: 700;
  color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tb-org {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  color: var(--tx2);
}

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.5); }
}

.tb-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg,var(--brand),var(--brand-lt));
  color: #fff; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: box-shadow .2s;
}
.tb-avatar:hover { box-shadow: var(--sh-brand); }

.tb-logout {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.18);
  color: var(--red); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.tb-logout:hover { background: rgba(239,68,68,.15); }

/* ── PAGE MAIN ────────────────────────────────────────────── */
.page-main {
  flex: 1;
  padding: 28px 28px 48px;
}

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}
.page-hdr-left h1 { font-size: 22px; font-weight: 800; }
.page-hdr-left p  { font-size: 13px; color: var(--tx2); margin-top: 3px; }
.page-hdr-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ── STAT CARDS ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--sh-sm);
  transition: transform .22s, box-shadow .22s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.stat-card.orange::after { background: linear-gradient(135deg,var(--brand),var(--brand-lt)); }
.stat-card.green::after  { background: var(--green); }
.stat-card.blue::after   { background: var(--blue); }
.stat-card.purple::after { background: var(--purple); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

.stat-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  flex-shrink: 0;
}
.stat-ico.orange { background: var(--brand-soft); }
.stat-ico.green  { background: rgba(34,197,94,.10); }
.stat-ico.blue   { background: rgba(59,130,246,.10); }
.stat-ico.purple { background: rgba(139,92,246,.10); }

.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--tx2); font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--tx); line-height: 1; font-family: var(--f-mono); }
.stat-sub   { font-size: 11px; color: var(--tx3); margin-top: 5px; }

/* ── CARD ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--bdr);
  gap: 12px; flex-wrap: wrap;
}
.card-title { font-size: 14.5px; font-weight: 700; }
.card-body  { padding: 22px; }

/* ── TABLE ────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead th {
  background: var(--bg-table-hd);
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .9px; text-transform: uppercase;
  color: var(--tx2);
  border-bottom: 1px solid var(--bdr);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--bdr); transition: background .13s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0,0,0,.018); }
tbody td { padding: 12px 16px; color: var(--tx); vertical-align: middle; }

.mono { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .2px; }
.td-name { font-weight: 600; }
.td-sub  { font-size: 11px; color: var(--tx2); margin-top: 2px; }

/* ── BADGE ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .2px; white-space: nowrap;
}
.badge-green  { background: rgba(34,197,94,.12);  color: #15803d; }
.badge-red    { background: rgba(239,68,68,.12);   color: #dc2626; }
.badge-orange { background: var(--brand-soft);     color: var(--brand-dk); }
.badge-blue   { background: rgba(59,130,246,.12);  color: #2563eb; }
.badge-purple { background: rgba(139,92,246,.12);  color: #7c3aed; }
.badge-gray   { background: rgba(0,0,0,.07);       color: var(--tx2); }
.badge-yellow { background: rgba(245,158,11,.12);  color: #b45309; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  transition: all .18s ease;
  cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg,var(--brand),var(--brand-lt));
  color: #fff; box-shadow: var(--sh-brand);
  border-color: var(--brand);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,122,0,.38); }

.btn-outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline:hover { background: var(--brand-soft); }

.btn-secondary {
  background: var(--bg);
  border-color: var(--bdr);
  color: var(--tx);
}
.btn-secondary:hover { background: var(--bdr); }

.btn-danger  { background: rgba(239,68,68,.10); border-color: rgba(239,68,68,.25); color: var(--red); }
.btn-danger:hover { background: rgba(239,68,68,.20); }

.btn-success { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.30); color: #16a34a; }
.btn-success:hover { background: rgba(34,197,94,.20); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn-ghost:hover { background: var(--bg); color: var(--tx); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--tx); margin-bottom: 7px;
}
.form-label .req { color: var(--red); margin-left: 2px; }

.form-ctrl {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--bdr);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--tx);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.form-ctrl:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: #fff;
}
.form-ctrl:disabled { opacity: .6; cursor: not-allowed; }

textarea.form-ctrl { resize: vertical; min-height: 80px; }

.form-hint { font-size: 11.5px; color: var(--tx3); margin-top: 5px; }
.form-error{ font-size: 12px; color: var(--red); margin-top: 4px; }

.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

.form-section {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 13px; font-weight: 700;
  color: var(--brand); margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: .6px;
}

/* ── SEARCH BAR ───────────────────────────────────────────── */
.search-wrap {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.search-field {
  position: relative; flex: 1; min-width: 200px;
}
.search-field input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: var(--bg);
  border: 1.5px solid var(--bdr);
  border-radius: 10px;
  font-size: 13.5px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.search-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: #fff;
}
.search-ico {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px; color: var(--tx3);
  pointer-events: none;
}

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(34,197,94,.09);  border-color: rgba(34,197,94,.22);  color: #15803d; }
.alert-error   { background: rgba(239,68,68,.09);  border-color: rgba(239,68,68,.22);  color: #dc2626; }
.alert-warning { background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.22); color: #b45309; }
.alert-info    { background: rgba(59,130,246,.09); border-color: rgba(59,130,246,.22); color: #2563eb; }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 800;
  justify-content: center; align-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-bg.open { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto;
  animation: modal-pop .22s cubic-bezier(.34,1.56,.64,1);
}
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 1000px; }

@keyframes modal-pop {
  from { opacity:0; transform: scale(.94) translateY(16px); }
  to   { opacity:1; transform: scale(1)   translateY(0); }
}

.modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--bdr);
}
.modal-title { font-size: 16px; font-weight: 800; }
.modal-x {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--bg); color: var(--tx2);
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-x:hover { background: var(--bdr); }
.modal-body { padding: 24px; }
.modal-ftr  {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--bdr);
}

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 22px;
  border-top: 1px solid var(--bdr);
  flex-wrap: wrap;
}
.pag-info { font-size: 12px; color: var(--tx3); flex: 1; }
.page-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--bdr);
  font-size: 13px; font-weight: 600;
  color: var(--tx); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
}
.page-btn:hover, .page-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 60px 24px;
}
.empty-ico   { font-size: 52px; margin-bottom: 14px; opacity: .35; }
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-sub   { font-size: 13.5px; color: var(--tx2); max-width: 300px; }

/* ── GRID HELPERS ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ── SPACING HELPERS ──────────────────────────────────────── */
.mb-0{margin-bottom:0}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}
.mb-20{margin-bottom:20px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-20{margin-top:20px}
.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}
.flex{display:flex}.flex-center{display:flex;align-items:center;justify-content:center}
.items-center{align-items:center}.justify-between{justify-content:space-between}
.flex-wrap{flex-wrap:wrap}
.text-center{text-align:center}.text-right{text-align:right}
.w-full{width:100%}.font-bold{font-weight:700}.font-mono{font-family:var(--f-mono)}

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--sb-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255,122,0,.12), transparent 70%);
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  width: 100%; max-width: 440px;
  padding: 40px 38px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center; margin-bottom: 30px;
}
.login-logo .l-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg,var(--brand),var(--brand-lt));
  border-radius: 20px;
  font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--sh-brand);
}
.login-logo h1 { font-size: 22px; font-weight: 800; }
.login-logo p  { font-size: 13px; color: var(--tx2); margin-top: 4px; }

.login-demo-note {
  background: var(--bg);
  border: 1px solid var(--bdr);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12px; color: var(--tx2);
  margin-top: 20px; line-height: 1.7;
}
.login-demo-note code { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px; font-family: var(--f-mono); }

/* ── PROFILE / AVATAR ─────────────────────────────────────── */
.member-photo {
  width: 60px; height: 60px; border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--bdr);
}

.member-photo-lg {
  width: 110px; height: 110px; border-radius: 20px;
  object-fit: cover;
  border: 3px solid var(--bdr);
  box-shadow: var(--sh-sm);
}

.avatar-placeholder {
  width: 60px; height: 60px; border-radius: 14px;
  background: linear-gradient(135deg,var(--brand),var(--brand-lt));
  color: #fff; font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ── CERTIFICATE ──────────────────────────────────────────── */
.cert-wrap {
  background: #fffdf7;
  border: 2px solid var(--brand);
  border-radius: var(--r-md);
  padding: 40px 44px;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  font-family: Georgia, serif;
}
.cert-wrap::before {
  content: '';
  position: absolute; inset: 10px;
  border: 1px solid rgba(255,122,0,.2);
  border-radius: 10px; pointer-events: none;
}
.cert-watermark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; opacity: .03; pointer-events: none;
  font-weight: 900; letter-spacing: -2px;
  transform: rotate(-20deg);
  user-select: none;
}

.cert-hdr { text-align: center; padding-bottom: 18px; border-bottom: 2px solid var(--brand); margin-bottom: 18px; }
.cert-ngo  { font-size: 20px; font-weight: 700; color: var(--brand-dk); }
.cert-ngo-hi { font-family: var(--f-hi); font-size: 14px; color: #666; margin-top: 3px; }
.cert-addr { font-size: 11.5px; color: #888; margin-top: 5px; }
.cert-regline { font-size: 11px; color: #999; margin-top: 6px; }
.cert-type { font-size: 17px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 14px; }
.cert-subtitle { font-size: 12.5px; color: #666; }

.cert-body { font-size: 13.5px; line-height: 1.9; color: var(--tx); }
.cert-body strong { color: var(--brand-dk); }

.cert-tbl { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.cert-tbl td { padding: 7px 12px; border: 1px solid #e8d9c8; vertical-align: top; }
.cert-tbl td:first-child { font-weight: 600; background: #fdf5ea; width: 38%; color: #555; }

.cert-ftr {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 28px; padding-top: 16px; border-top: 1px solid #eee;
}
.cert-sign { text-align: center; }
.cert-sign-line { width: 150px; border-top: 1.5px solid #444; margin: 0 auto 6px; }
.cert-sign-name { font-size: 13px; font-weight: 700; }
.cert-sign-role { font-size: 11px; color: #888; }

.cert-reg-block { text-align: right; font-size: 11px; color: #999; line-height: 1.7; }
.cert-reg-block strong { color: #666; }

.cert-stamp-ring {
  width: 80px; height: 80px; border-radius: 50%;
  border: 2px dashed #ccc;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #ccc; text-align: center;
  margin: 0 auto 8px;
}

/* ── CHARTS (CSS only) ────────────────────────────────────── */
.chart-bars {
  display: flex; align-items: flex-end; gap: 10px;
  height: 160px; padding: 0 4px 0;
}
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.chart-bar {
  width: 100%;
  background: linear-gradient(180deg,var(--brand-lt),var(--brand));
  border-radius: 6px 6px 0 0;
  transition: height .5s cubic-bezier(.34,1.1,.64,1);
  opacity: .85; min-height: 4px;
}
.chart-bar:hover { opacity: 1; }
.chart-lbl { font-size: 10px; color: var(--tx3); font-weight: 500; }
.chart-val { font-size: 10px; color: var(--tx2); font-weight: 700; }

/* Progress bar */
.progress-wrap { background: var(--bg); border-radius: 20px; height: 7px; overflow: hidden; }
.progress-bar  { height: 100%; border-radius: 20px; background: linear-gradient(135deg,var(--brand),var(--brand-lt)); transition: width .5s ease; }

/* ── ACTIVITY LOG ─────────────────────────────────────────── */
.log-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--bdr);
}
.log-item:last-child { border-bottom: none; }
.log-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0;
  margin-top: 6px;
}
.log-content { flex: 1; }
.log-action { font-size: 13.5px; font-weight: 600; }
.log-meta   { font-size: 11.5px; color: var(--tx3); margin-top: 2px; }

/* ── FILTER CHIPS ─────────────────────────────────────────── */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--bg); border: 1.5px solid var(--bdr);
  color: var(--tx2); cursor: pointer;
  transition: .15s;
}
.chip:hover, .chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dk); }

/* ── SETTINGS SECTION ─────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.settings-nav { position: sticky; top: calc(var(--tb-h) + 16px); }
.settings-nav-item {
  display: block; padding: 9px 14px;
  border-radius: 9px; font-size: 13.5px; font-weight: 500;
  color: var(--tx2); transition: .15s; margin-bottom: 2px;
}
.settings-nav-item:hover { background: var(--bg); color: var(--tx); }
.settings-nav-item.active { background: var(--brand-soft); color: var(--brand-dk); font-weight: 700; }

/* ── ROLE PILLS ───────────────────────────────────────────── */
.role-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}

/* ── MEMBER ID CARD (print) ────────────────────────────────── */
.id-card {
  width: 340px;
  background: linear-gradient(135deg, var(--brand-dk) 0%, #1a1a2e 100%);
  color: white; border-radius: 16px;
  padding: 20px; font-family: var(--f-body);
  box-shadow: var(--sh-lg);
}
.id-card-top { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: 14px; margin-bottom: 14px; }
.id-card-logo { font-size: 28px; }
.id-card-org  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; opacity: .85; }
.id-card-photo { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.3); }
.id-card-name  { font-size: 17px; font-weight: 800; }
.id-card-mid   { font-size: 12px; opacity: .7; font-family: var(--f-mono); margin-top: 3px; }
.id-card-row   { display: flex; justify-content: space-between; font-size: 11px; opacity: .8; margin-top: 4px; }

/* ── PRINT STYLES ─────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-hdr, .no-print, .btn { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  .page-main { padding: 0 !important; }
  body { background: white !important; }
  .cert-wrap { box-shadow: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  :root { --sb-w: 280px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .hamburger { display: flex; }
  .sb-close { display: flex; }
  .page-main { padding: 20px 16px 40px; }
  .form-row, .form-row3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .tb-org { display: none; }
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .page-hdr { flex-direction: column; }
  .cert-wrap { padding: 24px 20px; }
  .cert-ftr { flex-direction: column; gap: 20px; align-items: center; }
}

@media (max-width: 420px) {
  .stats-row { grid-template-columns: 1fr; }
  .page-main { padding: 16px 12px 40px; }
}
