:root {
  --g: #087a3d;
  --gd: #05301c;
  --gold: #d8b64c;
  --ink: #17221c;
  --muted: #69756e;
  --line: #dfe8e2;
  --soft: #f3f7f4;
  --red: #b42318;
  --blue: #0b60b0;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body { margin: 0; color: var(--ink); font: 15px/1.6 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif; background: #fff; max-width: 100%; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 24px; max-height: 24px; display: inline-block; }
button, input, select, textarea { font: inherit; box-sizing: border-box; }

.container { width: min(100% - 32px, 1200px); margin-inline: auto; }
@media (max-width: 480px) {
  .container { width: min(100% - 24px, 1200px); }
}

.header { position: sticky; top: 0; z-index: 40; background: #fffffff5; backdrop-filter: blur(14px); border-bottom: 1px solid #dfe8e2aa; }
.nav { height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { max-height: 48px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.navlinks { display: flex; gap: 20px; align-items: center; font-size: 13px; font-weight: 700; }
.navlinks a:hover { color: var(--g); }
.navlinks .cta { background: var(--g); color: #fff !important; padding: 10px 18px; border-radius: 10px; transition: 0.2s; white-space: nowrap; }
.navlinks .cta:hover { background: var(--gd); }
.navlinks .admin-btn { background: #17221c; color: #fff !important; padding: 8px 14px; border-radius: 8px; font-size: 11px; white-space: nowrap; }

.menu { display: none; border: 1px solid var(--line); background: #fff; width: 42px; height: 42px; border-radius: 10px; font-size: 22px; cursor: pointer; color: #17221c; align-items: center; justify-content: center; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 13px; border: 0; cursor: pointer; transition: 0.15s ease; white-space: nowrap; touch-action: manipulation; text-align: center; }
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.primary { background: var(--g); color: #fff; }
.gold { background: var(--gold); color: #17221c; }
.outline { border: 1.5px solid var(--g); color: var(--g); background: #fff; }
.outline:hover { background: #f0f7f3; }
.ghost { border: 1.5px solid #ffffff70; color: #fff; background: #ffffff12; }
.danger { background: #fff0ef; color: var(--red); border: 1px solid #fecdca; }

.eyebrow { font-size: 11px; letter-spacing: .18em; font-weight: 900; color: var(--g); text-transform: uppercase; }
.light { color: #f0d98a; }

.hero, .pagehero { color: #fff; background: linear-gradient(90deg, #031b10ed, #031b10b8), url('https://images.unsplash.com/photo-1529107386315-e1a2ed48a620?auto=format&fit=crop&w=2000&q=90') center/cover; }
.hero { min-height: 600px; display: flex; align-items: center; }
.hero-content { padding: clamp(48px, 8vw, 80px) 0; max-width: 820px; }
.hero h1, .pagehero h1, h1 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; font-size: clamp(1.75rem, 5vw, 3.25rem); margin: 16px 0; overflow-wrap: break-word; word-wrap: break-word; }
.hero h1 em { font-style: normal; color: #f0d98a; }
h2 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; font-size: clamp(1.35rem, 3.5vw, 2.2rem); margin: 12px 0; overflow-wrap: break-word; word-wrap: break-word; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.35rem); line-height: 1.3; overflow-wrap: break-word; }
.hero p, .pagehero p, p { max-width: 680px; font-size: clamp(0.9rem, 1.2vw, 1rem); line-height: 1.55; }
.hero p, .pagehero p { color: #e0eee7; }

.motto { display: inline-block; border-left: 3px solid var(--gold); padding: 7px 14px; background: #ffffff15; font-weight: 800; border-radius: 0 8px 8px 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }

.ticker { height: 50px; background: var(--g); color: #fff; display: flex; align-items: center; overflow: hidden; }
.ticker b { background: var(--gd); padding: 14px 22px; font-size: 12px; }
.ticker span { padding: 14px 20px; white-space: nowrap; font-size: 12px; }

.section { padding: 85px 0; }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 45px; }
.section-title h2 { font-size: clamp(36px, 4.5vw, 54px); margin: 14px 0; }
.section-title p, .card p { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 20px; padding: 28px; background: #fff; box-shadow: 0 20px 60px #05301c10; transition: 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 25px 70px #05301c18; }
.icon { color: var(--g); font-weight: 900; font-size: 24px; margin-bottom: 12px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split h2 { font-size: 48px; margin: 12px 0; }
.panel { border-radius: 23px; overflow: hidden; }
.panel img { width: 100%; height: 420px; object-fit: cover; }

.pagehero { padding: 80px 0; }
.pagehero h1 { font-size: clamp(40px, 5.5vw, 68px); margin: 12px 0; }

.gallery { background: var(--soft); }
.gallery-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; grid-auto-rows: 230px; gap: 16px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 18px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, #000b); }
.large { grid-row: span 2; }
.wide { grid-column: span 2; }
.caption { position: absolute; z-index: 2; bottom: 16px; left: 18px; color: #fff; }
.caption small { display: block; color: #f1dc91; font-size: 10px; font-weight: 900; }

.news { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.featured { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; }
.featured img { height: 300px; width: 100%; object-fit: cover; }
.body { padding: 27px; }
.body h3 { font: 700 26px/1.2 'Playfair Display', Georgia; margin: 8px 0; }
.newslist { display: grid; gap: 14px; }
.newscard { display: grid; grid-template-columns: 65px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: #fff; }
.num { height: 58px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; color: var(--g); font-weight: 900; font-size: 18px; }
.newscard h3 { font-size: 16px; margin: 2px 0; font-weight: 700; }
.newscard p { font-size: 13px; color: var(--muted); margin: 3px 0; }

.band { padding: 75px 0; background: linear-gradient(120deg, var(--gd), var(--g)); color: #fff; }
.bandflex { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.band h2 { font-size: 52px; margin: 8px 0; }

.formwrap { display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; align-items: start; }
.formcard, .verifybox, .joinbox, .adminbox { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: 0 20px 60px #05301c10; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 12px; font-weight: 700; color: #2e3b33; display: block; margin-bottom: 4px; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 14px; background: #fff; outline: none; transition: border-color 0.2s; }
input:focus, select:focus, textarea:focus { border-color: var(--g); }
.block { border-top: 1px solid var(--line); padding: 22px 0; }
.block h3 { margin: 0 0 16px; font-size: 17px; font-weight: 800; color: #17221c; }

/* Password Visibility Toggle */
.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 6px;
}
.pwd-wrap input {
  margin-top: 0;
  width: 100%;
  padding-right: 44px;
}
.pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #718096;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 5;
}
.pwd-toggle:hover { color: var(--g); }
.pwd-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Global Loading Bar & Micro-Interaction */
#top-loader {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--g), var(--gold));
  z-index: 99999;
  transition: width 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 0 10px rgba(8, 122, 61, 0.8);
  pointer-events: none;
}
#top-loader.loading {
  width: 80%;
}
#top-loader.complete {
  width: 100%;
  opacity: 0;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.85 !important;
}
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: btn-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.upload { min-height: 130px; border: 2px dashed #b7c7bd; border-radius: 15px; display: grid; place-items: center; text-align: center; cursor: pointer; padding: 20px; background: #fafdfb; }
.upload input { display: none; }
.upload img { display: none; width: 90px; height: 90px; object-fit: cover; border-radius: 12px; margin-top: 8px; border: 2px solid var(--g); }
.upload.preview img { display: block; }
.notice { min-height: 20px; color: var(--red); font-size: 13px; margin: 10px 0; font-weight: 600; }
.consent { display: flex; gap: 10px; margin: 18px 0; align-items: flex-start; cursor: pointer; font-size: 12px; font-weight: 600; }
.consent input { width: auto; margin-top: 3px; }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.joinbox.featured { background: linear-gradient(140deg, #064a29, #087a3d); color: #fff; }
.joinbox h2 { font-size: 36px; margin: 10px 0; }
.benefits { padding: 0; list-style: none; }
.benefits li { margin: 12px 0; font-size: 13px; }
.benefits li:before { content: '✓'; color: var(--gold); font-weight: 900; margin-right: 10px; font-size: 15px; }

.verifybox { max-width: 580px; margin: auto; }
.result { display: none; margin-top: 20px; padding: 20px; border-radius: 14px; font-size: 14px; }
.result.show { display: block; }

/* --------------------------------------------------
   COMPACT ID-CARD SYSTEM (CR80 Standard 85.6mm × 53.98mm — Aspect Ratio ~1.586:1)
-------------------------------------------------- */
.idcard-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  margin: 16px auto 24px;
  max-width: 960px;
  width: 100%;
}

.idcard-card-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 0 1 430px;
  width: min(100%, 430px);
  max-width: 430px;
}
.idcard-side-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.idcard {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(5, 48, 28, 0.08);
  border: 1px solid #087a3d;
  background: #ffffff;
  display: block;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
  container-type: inline-size;
}

/* Download options grid for card views */
.card-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.card-element {
  position: absolute;
  box-sizing: border-box;
}

/* Card Front & Back ADC-Inspired Official Styling */
.idcard-front, .idcard-back {
  background: #ffffff;
  padding: 0;
}

/* Card Header Banner */
.idcard-banner-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: #087a3d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5%;
  box-sizing: border-box;
  color: #ffffff;
  overflow: hidden;
}
.idcard-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.idcard-banner-logo-box {
  width: 29px;
  height: 29px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.idcard-banner-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
.idcard-banner-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
.idcard-banner-titles strong {
  display: block;
  font-size: clamp(7.5px, 2.0cqw, 9.4px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.15;
}
.idcard-banner-titles small {
  display: block;
  font-size: clamp(5.2px, 1.35cqw, 6.4px);
  font-weight: 700;
  color: #d1fae5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
  line-height: 1.1;
}
.idcard-banner-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  flex-shrink: 0;
}
.idcard-banner-right small {
  display: block;
  font-size: clamp(4.2px, 1.05cqw, 5.0px);
  font-weight: 700;
  color: #a7f3d0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
}
.idcard-banner-right strong {
  display: block;
  font-size: clamp(6.4px, 1.65cqw, 8.0px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

/* Card Bottom Perimeter Accent */
.idcard-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #087a3d;
}

/* Backward compatibility fallback */
.legacy-member-card {
  width: 440px;
  max-width: 100%;
  aspect-ratio: 1.586 / 1;
  margin: auto;
  border-radius: 14px;
  padding: 16px;
}

/* SaaS Dashboard Professional Layout */
.dash-body {
  background: #f8faf9;
  min-height: 100vh;
  display: flex;
}
.dash-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.dash-sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dash-brand {
  height: 70px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}
.dash-brand a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  max-width: 130px;
  min-width: 0;
  text-decoration: none;
}
.dash-brand img {
  max-height: 56px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.dash-nav {
  padding: 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-nav-section {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 16px 12px 6px;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  transition: all 0.15s ease;
}
.dash-nav-item:hover {
  background: #f1f5f3;
  color: var(--g);
}
.dash-nav-item.active {
  background: #eaf6ee;
  color: var(--g);
}
.dash-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dash-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-w));
}
.dash-topbar {
  height: 75px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 12px;
}
.dash-topbar-title {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 800;
  color: #17221c;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.dash-topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Topbar User Profile & Dropdown */
.dash-user-dropdown {
  position: relative;
  flex-shrink: 0;
}
.dash-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
}
.dash-user-btn:hover, .dash-user-dropdown.open .dash-user-btn {
  background: #f8faf9;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.dash-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eaf6ee;
  color: var(--g);
  border: 1.5px solid #cce8d5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.dash-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.dash-user-name {
  font-size: 13px;
  font-weight: 700;
  color: #17221c;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-user-chevron {
  width: 14px;
  height: 14px;
  color: #64748b;
  margin-left: 2px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.dash-user-dropdown.open .dash-user-chevron {
  transform: rotate(180deg);
}

/* User Dropdown Menu */
.dash-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(5, 48, 28, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 8px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownFadeIn 0.18s ease forwards;
}
.dash-user-dropdown.open .dash-user-menu {
  display: flex;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-user-menu-header {
  padding: 10px 12px 8px;
}
.dash-user-menu-header strong {
  display: block;
  font-size: 13px;
  color: #17221c;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-user-menu-header small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.dash-user-menu-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}
.dash-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
}
.dash-user-menu-item:hover {
  background: #f1f5f3;
  color: var(--g);
}
.dash-user-menu-item svg {
  width: 16px;
  height: 16px;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.dash-user-menu-item:hover svg {
  color: var(--g);
}
.dash-user-menu-item.text-danger {
  color: var(--red);
}
.dash-user-menu-item.text-danger:hover {
  background: #fff0ef;
  color: var(--red);
}
.dash-user-menu-item.text-danger svg {
  color: var(--red);
}

@media (max-width: 640px) {
  .dash-user-meta {
    display: none;
  }
  .dash-user-btn {
    padding: 4px;
    border-radius: 50%;
  }
  .dash-user-chevron {
    display: none;
  }
}
.dash-drawer-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #17221c;
  padding: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.dash-drawer-close {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  margin-left: auto;
}
.dash-drawer-close:hover {
  color: var(--red);
}

.dash-page-content {
  padding: clamp(16px, 3vw, 32px);
  flex: 1;
  width: 100%;
  max-width: 100%;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(5,48,28,0.04);
  max-width: 100%;
}

/* Dashboard Metric Cards & Grids */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(5,48,28,0.04);
}
.kpi-label { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
.kpi-val { font-size: 32px; font-weight: 900; color: #17221c; margin: 4px 0; line-height: 1.1; font-family: 'Playfair Display', Georgia, serif; }
.kpi-sub { font-size: 12px; color: var(--muted); }

/* Role Badges */
.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.2;
}
.role-pill.super_admin { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.role-pill.site_admin { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.role-pill.lga_admin { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.role-pill.registration_agent { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.role-pill.member { background: #eaf6ee; color: var(--g); border: 1px solid #cce8d5; }

/* Admin Dashboard Table & Badges */
.admin-table-wrap { overflow-x: auto; background: #fff; border-radius: 18px; border: 1px solid var(--line); margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.admin-table th { background: var(--soft); padding: 14px 18px; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.admin-table td { padding: 14px 18px; border-bottom: 1px solid #f0f4f1; vertical-align: middle; }
.admin-table tr:hover { background: #fafdfb; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.badge-active { background: #eaf6ee; color: var(--g); }
.badge-inactive { background: #fff0ef; color: var(--red); }

/* Alerts / Flash Messages */
.alert { padding: 14px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.alert-success { background: #eaf6ee; color: var(--g); border: 1px solid #cce8d5; }
.alert-danger { background: #fff0ef; color: var(--red); border: 1px solid #fecdca; }

/* Footer */
footer { background: #0b2117; color: #fff; padding: 60px 0 25px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot img { max-height: 45px; width: auto; max-width: 140px; object-fit: contain; display: block; margin-bottom: 14px; }
.foot a, .foot p { display: block; color: #aebdb5; font-size: 13px; margin: 8px 0; }
.foot a:hover { color: #fff; }
.bottom { border-top: 1px solid #ffffff1c; margin-top: 40px; padding-top: 20px; color: #899990; font-size: 11px; text-align: center; }

/* Global SVG Safety */
svg:not([width]):not([height]) {
  max-width: 24px;
  max-height: 24px;
}

/* Mobile Backdrop */
.dash-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 48, 28, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dash-backdrop.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 991px) {
  .navlinks { display: none; }
  .navlinks.open { 
    display: flex; 
    position: absolute; 
    top: 78px; 
    left: 0; 
    right: 0; 
    background: #fff; 
    padding: 24px; 
    flex-direction: column; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    border-bottom: 1px solid var(--line);
    z-index: 999;
  }
  .menu { display: block; }
  .cards, .split, .news, .formwrap, .join-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .large, .wide { grid-column: span 1; grid-row: span 1; }
  .large { grid-column: span 2; }
  .bandflex { display: grid; }
  .formgrid { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }

  /* Dashboard mobile drawer */
  .dash-sidebar {
    width: 280px;
    z-index: 1100;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0,0,0,0.2);
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0;
    width: 100%;
  }
  .dash-drawer-toggle {
    display: block;
  }
  .dash-drawer-close {
    display: block;
  }
  .dash-topbar {
    padding: 0 14px;
    height: 64px;
  }
  .dash-topbar-title {
    font-size: 15px;
    max-width: 150px;
  }
  .dash-topbar-user {
    gap: 8px;
  }
  .dash-topbar-user small {
    display: none;
  }
  .dash-topbar-user strong {
    font-size: 11px !important;
  }
  .dash-page-content {
    padding: 16px 12px;
  }

  /* Card Container stacks vertically on tablets & mobile */
  .idcard-container {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .idcard-card-box {
    width: 100%;
    max-width: 440px;
  }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 24px); }
  .nav { height: 68px; }
  .navlinks.open { top: 68px; }
  .hero { min-height: 520px; }
  .hero-content { padding: 48px 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); line-height: 1.15; }
  .actions { flex-direction: column; }
  .section { padding: 48px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .large { grid-column: span 1; }
  .foot { grid-template-columns: 1fr; }
  .band h2 { font-size: clamp(26px, 7vw, 36px); }
}

@media (max-width: 480px) {
  .idcard {
    width: 100%;
    max-width: 380px;
    height: auto;
    aspect-ratio: 1.586 / 1;
  }
}

@media print {
  body * { visibility: hidden; }
  .printable-area, .printable-area * { visibility: visible; }
  .printable-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .idcard-container {
    display: block !important;
  }
  .idcard {
    width: 85.6mm !important;
    height: 53.98mm !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 8mm auto !important;
    border: 1px solid #087a3d !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .no-print, .actions, .dash-topbar, .dash-sidebar, header, footer, .idcard-side-label {
    display: none !important;
  }
}
