/* ═══════════════════════════════════════════════════════════════════════════
   ICDFA Member Portal — Premium Design System v2.0
   Brand: #0D3265 (primary) · #07ADF6 (secondary/accent)
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
  --primary:        #0D3265;
  --primary-light:  #1a4a8a;
  --primary-dark:   #081e3f;
  --secondary:      #07ADF6;
  --secondary-light:#4cc9f9;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;
  --light:          #f8fafc;
  --dark:           #0f172a;
  --gray-50:        #f8fafc;
  --gray-100:       #f1f5f9;
  --gray-200:       #e2e8f0;
  --gray-300:       #cbd5e1;
  --gray-400:       #94a3b8;
  --gray-500:       #64748b;
  --gray-600:       #475569;
  --gray-700:       #334155;
  --gray-800:       #1e293b;
  --gray-900:       #0f172a;
  --gray:           #64748b;
  --sidebar-w:      268px;
  --topbar-h:       64px;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 16px rgba(13,50,101,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-md:      0 8px 32px rgba(13,50,101,.12), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg:      0 20px 60px rgba(13,50,101,.16), 0 4px 16px rgba(0,0,0,.08);
  --transition:     .2s cubic-bezier(.4,0,.2,1);
  --font:           'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--secondary); }
img { max-width: 100%; height: auto; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrapper { display: flex; min-height: 100vh; position: relative; }

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1050;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, rgba(7,173,246,.4) 0%, rgba(7,173,246,.1) 50%, transparent 100%);
  pointer-events: none;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}
.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(7,173,246,.5), transparent);
}
.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--secondary), #0598d8);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff; font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(7,173,246,.4);
  letter-spacing: -.5px;
}
.sidebar-brand img {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.brand-text { line-height: 1.25; }
.brand-text .brand-name { font-size: .88rem; font-weight: 800; color: #fff; letter-spacing: .02em; }
.brand-text .brand-sub { font-size: .63rem; color: rgba(255,255,255,.5); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

.sidebar-nav { padding: 10px 0 8px; flex: 1; }
.nav-section-label {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(255,255,255,.32);
  padding: 16px 20px 5px;
  font-weight: 700;
  user-select: none;
}
.nav-link-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--secondary);
  border-radius: 0 3px 3px 0;
  transition: width var(--transition);
}
.nav-link-item:hover { background: rgba(255,255,255,.08); color: #fff; padding-left: 24px; }
.nav-link-item.active { background: rgba(7,173,246,.15); color: #fff; padding-left: 24px; }
.nav-link-item.active::before { width: 3px; }
.nav-link-item i { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; opacity: .85; }
.nav-link-item.active i { opacity: 1; color: var(--secondary); }
.nav-link-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  background: rgba(0,0,0,.15);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), #0598d8);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-grade { font-size: .65rem; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-signout {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  font-size: 1rem;
}
.sidebar-signout:hover { background: rgba(239,68,68,.2); color: #fca5a5; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,20,40,.55);
  z-index: 1040;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--gray-100);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 8px rgba(13,50,101,.06);
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.page-title { font-size: 1rem; font-weight: 700; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 1.1rem;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--gray-200); color: var(--primary); }

.topbar-bell {
  position: relative;
  width: 36px; height: 36px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
  font-size: 1.05rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.topbar-bell:hover { background: var(--gray-200); color: var(--primary); }
.topbar-bell .bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--danger);
  border-radius: 50%;
  font-size: .58rem;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  border: 2px solid #fff;
}
.topbar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; color: #fff;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  transition: border-color var(--transition);
}
.topbar-avatar:hover { border-color: var(--secondary); }
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Content Area ────────────────────────────────────────────────────────── */
.content-area { padding: 28px 28px 40px; flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header i { color: var(--secondary); font-size: 1rem; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; background: var(--gray-50); border-top: 1px solid var(--gray-100); }

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--stat-color, var(--secondary));
  opacity: .06;
  transform: translate(20px, -20px);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: var(--stat-bg, rgba(7,173,246,.1));
  color: var(--stat-color, var(--secondary));
}
.stat-info { flex: 1; min-width: 0; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: .75rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ── Member Hero Card ────────────────────────────────────────────────────── */
.member-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}
.member-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(7,173,246,.15);
  pointer-events: none;
}
.member-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.member-hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
}
.member-hero-initials {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.3);
  background: rgba(7,173,246,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.member-hero-name { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.member-hero-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
}
.member-hero-id { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: 6px; }
.member-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}
.hero-btn-primary { background: var(--secondary); color: #fff; box-shadow: 0 4px 12px rgba(7,173,246,.35); }
.hero-btn-primary:hover { background: #0598d8; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(7,173,246,.45); }
.hero-btn-outline { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); }
.hero-btn-outline:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Status Pills ────────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-approved  { background: #dcfce7; color: #15803d; }
.status-under_review { background: #dbeafe; color: #1d4ed8; }
.status-docs_required { background: #fef9c3; color: #a16207; }
.status-applicant { background: #f1f5f9; color: #475569; }
.status-rejected  { background: #fee2e2; color: #b91c1c; }
.status-suspended { background: #f1f5f9; color: #64748b; }
.status-revoked   { background: #1e293b; color: #94a3b8; }
.status-received  { background: #cffafe; color: #0e7490; }
.status-pending   { background: #fef3c7; color: #d97706; }
.status-active    { background: #dcfce7; color: #15803d; }

/* ── Grade Badge ─────────────────────────────────────────────────────────── */
.grade-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; color: #fff; letter-spacing: .02em; }
.grade-badge-lg { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; border-radius: 20px; font-size: .78rem; font-weight: 700; color: #fff; letter-spacing: .02em; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-label { font-weight: 600; font-size: .8rem; color: var(--gray-700); margin-bottom: 6px; display: block; }
.form-control, .form-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .87rem;
  padding: 10px 13px;
  color: var(--gray-800);
  background: #fff;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font);
  line-height: 1.5;
}
.form-control:focus, .form-select:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(7,173,246,.12); outline: none; }
.form-control::placeholder { color: var(--gray-400); }
.form-control:disabled, .form-select:disabled { background: var(--gray-50); color: var(--gray-500); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-text { font-size: .74rem; color: var(--gray-400); margin-top: 4px; }
.form-check-input:checked { background-color: var(--secondary); border-color: var(--secondary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(7,173,246,.12); }
.input-group-text { background: var(--gray-50); border: 1.5px solid var(--gray-200); color: var(--gray-500); font-size: .87rem; }
.form-section-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gray-400); font-weight: 700; border-bottom: 1px solid var(--gray-100); padding-bottom: 8px; margin-bottom: 18px; margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: .84rem;
  border-radius: var(--radius);
  padding: 9px 18px;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  border: none;
  line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(13,50,101,.2); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 14px rgba(13,50,101,.3); transform: translateY(-1px); }
.btn-secondary-brand { background: var(--secondary); color: #fff; box-shadow: 0 2px 8px rgba(7,173,246,.25); }
.btn-secondary-brand:hover { background: #0598d8; color: #fff; box-shadow: 0 4px 14px rgba(7,173,246,.35); transform: translateY(-1px); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { background: transparent; color: var(--secondary); border: 1.5px solid var(--secondary); }
.btn-outline-secondary:hover { background: var(--secondary); color: #fff; }
.btn-light { background: var(--gray-100); color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.btn-light:hover { background: var(--gray-200); color: var(--gray-800); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }
.btn-sm { padding: 6px 12px; font-size: .78rem; }
.btn-lg { padding: 12px 24px; font-size: .95rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table { font-size: .83rem; width: 100%; border-collapse: collapse; margin: 0; }
.table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); font-weight: 700; white-space: nowrap; padding: 12px 16px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════════════ */
.alert { border-radius: var(--radius); padding: 13px 16px; font-size: .85rem; border: none; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.alert-success  { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }
.alert-danger   { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.alert-warning  { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info     { background: #eff6ff; color: #1d4ed8; border-left: 4px solid #3b82f6; }
.alert .btn-close { margin-left: auto; opacity: .5; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP WIZARD
   ═══════════════════════════════════════════════════════════════════════════ */
.step-wizard { display: flex; gap: 0; margin-bottom: 32px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.step-wizard::-webkit-scrollbar { display: none; }
.step-item { flex: 1; text-align: center; position: relative; min-width: 80px; }
.step-item::after { content: ''; position: absolute; top: 17px; left: 50%; right: -50%; height: 2px; background: var(--gray-200); z-index: 0; transition: background var(--transition); }
.step-item:last-child::after { display: none; }
.step-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100); color: var(--gray-400); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; margin: 0 auto 6px; position: relative; z-index: 1; border: 2px solid var(--gray-200); transition: all var(--transition); }
.step-item.active .step-dot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,50,101,.12); }
.step-item.done .step-dot { background: #dcfce7; color: #15803d; border-color: #86efac; }
.step-item.active::after { background: var(--primary); }
.step-item.done::after { background: #86efac; }
.step-label { font-size: .68rem; color: var(--gray-400); font-weight: 600; line-height: 1.3; }
.step-item.active .step-label { color: var(--primary); font-weight: 700; }
.step-item.done .step-label { color: #15803d; }

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-400); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: .5; }
.empty-state-title { font-size: .95rem; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
.empty-state-text { font-size: .82rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   PROFILE AVATAR
   ═══════════════════════════════════════════════════════════════════════════ */
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gray-200); box-shadow: var(--shadow); }
.avatar-initials { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: #fff; box-shadow: var(--shadow); }
.avatar-upload-wrap { position: relative; display: inline-block; }
.avatar-upload-btn { position: absolute; bottom: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--secondary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; cursor: pointer; border: 2px solid #fff; box-shadow: var(--shadow-sm); transition: background var(--transition); }
.avatar-upload-btn:hover { background: #0598d8; }

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.nav-tabs { border-bottom: 2px solid var(--gray-200); gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link { color: var(--gray-500); font-weight: 600; font-size: .84rem; padding: 10px 16px; border: none; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -2px; white-space: nowrap; transition: color var(--transition), border-color var(--transition); }
.nav-tabs .nav-link:hover { color: var(--primary); border-bottom-color: var(--gray-300); }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--secondary); background: transparent; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--gray-100); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* ═══════════════════════════════════════════════════════════════════════════
   MISC COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */
.badge { font-weight: 600; font-size: .7rem; padding: 4px 8px; border-radius: 6px; letter-spacing: .02em; }
.pagination { gap: 4px; }
.page-link { border-radius: var(--radius-sm) !important; border: 1.5px solid var(--gray-200); color: var(--gray-600); font-size: .82rem; font-weight: 600; padding: 6px 12px; transition: all var(--transition); }
.page-link:hover { background: var(--gray-100); color: var(--primary); border-color: var(--gray-300); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(13,50,101,.2); }
.progress { height: 8px; border-radius: 20px; background: var(--gray-100); overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 20px; transition: width .6s ease; }

/* Legacy compat */
.notif-bell { position: relative; cursor: pointer; }
.notif-bell .badge-dot { position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; background: var(--danger); border-radius: 50%; font-size: .58rem; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.member-card { background: linear-gradient(135deg, var(--primary) 0%, #1a4a8a 100%); border-radius: 16px; color: #fff; padding: 24px; position: relative; overflow: hidden; }
.member-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.06); }
.member-card::after { content: ''; position: absolute; bottom: -30px; left: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(7,173,246,.12); }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  .content-area { padding: 22px 22px 36px; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: 8px 0 32px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .sidebar-toggle { display: flex; }
  .content-area { padding: 18px 16px 32px; }
  .topbar { padding: 0 16px; }
  .member-hero { padding: 22px 20px; }
}
@media (max-width: 767.98px) {
  .content-area { padding: 16px 14px 28px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .page-title { font-size: .9rem; }
  .stat-card { padding: 16px 14px; gap: 12px; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .stat-num { font-size: 1.5rem; }
  .card-body { padding: 16px; }
  .card-header { padding: 14px 16px; }
  .member-hero-name { font-size: 1.1rem; }
  .member-hero-initials, .member-hero-avatar { width: 60px; height: 60px; }
}
@media (max-width: 575.98px) {
  .content-area { padding: 14px 12px 24px; }
  .topbar { padding: 0 12px; }
  .page-title { font-size: .85rem; }
  .step-label { font-size: .62rem; }
  .form-control, .form-select { font-size: .85rem; }
  .d-none-xs { display: none !important; }
  .btn { font-size: .8rem; padding: 8px 14px; }
  .stat-card { flex-direction: column; text-align: center; padding: 16px 12px; }
  .stat-icon { margin: 0 auto; }
}
@media (min-width: 1400px) {
  :root { --sidebar-w: 280px; }
  .content-area { padding: 32px 36px 48px; }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print, .sidebar-overlay, .btn, .alert { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content-area { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse-dot { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .7; } }
.animate-fadeInUp { animation: fadeInUp .35s ease both; }
.animate-fadeIn   { animation: fadeIn .25s ease both; }
.pulse-dot        { animation: pulse-dot 2s ease infinite; }
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .1s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .2s; }

/* ── Portal Tabs ─────────────────────────────────────────────────────────── */
.portal-tabs {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 6px 6px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.portal-tabs::-webkit-scrollbar { display: none; }
.portal-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-500);
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, color .18s;
  border-bottom: 2px solid transparent;
}
.portal-tab:hover { background: var(--gray-200); color: var(--primary); text-decoration: none; }
.portal-tab.active {
  background: #fff;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  box-shadow: 0 -2px 8px rgba(13,50,101,.06);
}
.portal-tab i { font-size: .9rem; }
.tab-section {
  background: #fff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  border-top: none;
  margin-bottom: 24px;
}
@media (max-width: 576px) {
  .portal-tab { padding: 9px 12px; font-size: .77rem; }
  .tab-section { padding: 16px; }
}

/* ── Status Pills ────────────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.status-pill.approved, .status-pill.active   { background: #d1fae5; color: #065f46; }
.status-pill.pending, .status-pill.submitted  { background: #fef3c7; color: #92400e; }
.status-pill.rejected, .status-pill.expired   { background: #fee2e2; color: #991b1b; }
.status-pill.draft                            { background: #e5e7eb; color: #374151; }
.status-pill.under_review, .status-pill.review{ background: #dbeafe; color: #1e40af; }
.status-pill.docs_required                    { background: #fde8d8; color: #9a3412; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--gray-400);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: .85rem; margin: 0; }

/* ── Data Table ──────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.data-table th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Info Row ────────────────────────────────────────────────────────────── */
.info-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); }
.info-value { font-size: .88rem; color: var(--gray-800); font-weight: 500; }
