/* ============================================================
   LOCAL BLOOD BANK — MAIN STYLESHEET
   Author  : Rizve Joarder
   Version : 1.0.0
   ============================================================ */

/* ── Root variables ─────────────────────────────────────── */
:root {
  --primary     : #dc2626;
  --primary-d   : #b91c1c;
  --primary-l   : #fef2f2;
  --secondary   : #1e40af;
  --success     : #16a34a;
  --bg          : #f8fafc;
  --bg-surface  : #ffffff;
  --bg-sidebar  : #0f172a;
  --text-main   : #1e293b;
  --text-muted  : #64748b;
  --border      : #e2e8f0;
  --shadow-sm   : 0 1px 3px rgba(0,0,0,.08);
  --shadow-md   : 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg   : 0 10px 40px rgba(0,0,0,.15);
  --radius      : 12px;
  --radius-sm   : 8px;
  --sidebar-w   : 240px;
  --topbar-h    : 60px;
  --transition  : .25s ease;
}

[data-bs-theme="dark"] {
  --bg          : #0f172a;
  --bg-surface  : #1e293b;
  --text-main   : #f1f5f9;
  --text-muted  : #94a3b8;
  --border      : #334155;
  --shadow-sm   : 0 1px 3px rgba(0,0,0,.3);
  --shadow-md   : 0 4px 16px rgba(0,0,0,.35);
}

/* ── Optional badge (visible on any background) ─────────── */
.optional-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid currentColor;
  opacity: .55;
  margin-left: .35rem;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Adaptive section background ────────────────────────── */
.section-alt-bg { background: #f1f5f9; }

/* ── Dark-mode overrides ────────────────────────────────── */
/* Override Bootstrap's bg-light which stays pale in dark mode */
[data-bs-theme="dark"] .bg-light   { background-color: var(--bg-surface) !important; }
[data-bs-theme="dark"] .section-alt-bg { background: #162032; }

[data-bs-theme="dark"] .hero-search-box {
  background: rgba(15,23,42,.96);
  border: 1px solid rgba(255,255,255,.1);
}
[data-bs-theme="dark"] .hero-search-box .form-label { color: #e2e8f0; }
[data-bs-theme="dark"] .hero-search-box .form-text  { color: #94a3b8; }

[data-bs-theme="dark"] .section-title {
  border-bottom-color: rgba(220,38,38,.22);
}

[data-bs-theme="dark"] .stats-strip {
  border-bottom-color: var(--border);
}

[data-bs-theme="dark"] .donor-card {
  border-color: rgba(255,255,255,.07);
}
[data-bs-theme="dark"] .donor-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
[data-bs-theme="dark"] .donor-address {
  color: #64748b !important;
}

[data-bs-theme="dark"] .how-step-card {
  background: #1e293b;
  border-color: rgba(255,255,255,.07);
}

[data-bs-theme="dark"] .filter-bar {
  background: #1e293b;
  border-color: rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .form-card {
  background: #1e293b;
  border-color: rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #475569; }

[data-bs-theme="dark"] .profile-card  { border-color: rgba(255,255,255,.07); }
[data-bs-theme="dark"] .profile-detail-row { border-bottom-color: rgba(255,255,255,.06); }

[data-bs-theme="dark"] .pagination .page-link {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-bs-theme="dark"] .pagination .page-link:hover {
  background: rgba(220,38,38,.15);
  border-color: var(--primary);
  color: #fca5a5;
}
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

[data-bs-theme="dark"] .bg-filter-btn { border-color: transparent; }

[data-bs-theme="dark"] .alert-info {
  background: rgba(56,189,248,.1);
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,.2);
}

[data-bs-theme="dark"] .table { color: #e2e8f0; }
[data-bs-theme="dark"] .table-card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.07);
}
[data-bs-theme="dark"] .table thead { background: #0f172a; }
[data-bs-theme="dark"] .table td, [data-bs-theme="dark"] .table th {
  border-color: rgba(255,255,255,.06);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Hind Siliguri', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

main { flex: 1; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Emergency bar ──────────────────────────────────────── */
.emergency-bar {
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.emergency-bar a { color: #fde68a; text-decoration: none; }
.emergency-bar a:hover { text-decoration: underline; }

/* ── Navbar ─────────────────────────────────────────────── */
.app-navbar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-bottom: 2px solid var(--primary);
  min-height: 58px;
}

.app-navbar .navbar-brand .brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px rgba(220,38,38,.5));
  animation: heartbeat 1.8s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.15); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.1); }
  56%       { transform: scale(1); }
}

/* Navbar brand — Bengali name needs a tighter font size */
.app-navbar .navbar-brand .brand-name {
  font-size: .82rem;
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}
.app-navbar .navbar-brand .brand-sub {
  font-size: .58rem;
  opacity: .7;
  font-family: 'Inter', sans-serif;
}

.app-navbar .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-size: .88rem;
  border-radius: 6px;
  padding: 6px 12px;
  transition: all var(--transition);
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.12);
}

/* ── Hero section ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #7f1d1d 100%);
  color: #fff;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.hero-subtitle {
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 1.1rem;
  opacity: .85;
  margin-top: .5rem;
}

.hero-search-box {
  background: rgba(255,255,255,.95);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

/* ── Stats strip ────────────────────────────────────────── */
.stats-strip { background: var(--bg-surface); border-bottom: 1px solid var(--border); }

.stat-item {
  text-align: center;
  padding: 20px 16px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Blood group badges ─────────────────────────────────── */
.blood-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  white-space: nowrap;
  text-decoration: none;
}

.blood-badge-lg {
  font-size: 1.4rem;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

/* ── Donor cards ────────────────────────────────────────── */
.donor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  position: relative;
}

.donor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.donor-card-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 20px;
  position: relative;
  text-align: center;
}

.donor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.3);
  background: #334155;
}

.donor-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,.6);
  border: 3px solid rgba(255,255,255,.15);
  margin: 0 auto;
}

.donor-blood-badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
}

.donor-card-body {
  padding: 16px;
}

.donor-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.donor-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.donor-info-row i { flex-shrink: 0; margin-top: 2px; }

.donor-address {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: .82rem;
}

.donor-actions {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── Forms ──────────────────────────────────────────────── */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

.form-label { font-weight: 500; font-size: .88rem; color: var(--text-main); }

.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: .9rem;
  padding: 10px 14px;
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}

.section-title {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-l);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}
.btn-primary:hover { background: var(--primary-d); border-color: var(--primary-d); }

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  font-weight: 600;
}
.btn-whatsapp:hover { background: #1da851; color: #fff; }

/* ── Filter bar ─────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

/* ── Donor profile page ─────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, #0f172a 0%, #7f1d1d 100%);
  color: #fff;
  padding: 40px;
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: center;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.4);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.profile-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.profile-detail-row:last-child { border-bottom: none; }
.profile-detail-label { font-weight: 600; min-width: 140px; color: var(--text-muted); font-size: .82rem; }

/* ── Admin layout ───────────────────────────────────────── */
.admin-body { background: #f1f5f9; margin: 0; padding: 0; }

[data-bs-theme="dark"] .admin-body { background: #0f172a; }

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* -- Sidebar -- */
.admin-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width var(--transition), min-width var(--transition);
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand-name { color: #fff; font-weight: 700; font-size: .9rem; }
.sidebar-brand-sub  { color: rgba(255,255,255,.4); font-size: .6rem; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name { color: #e2e8f0; font-weight: 600; font-size: .82rem; }
.sidebar-user-role { color: rgba(255,255,255,.4); font-size: .65rem; }

.sidebar-nav { padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-link:hover  { background: rgba(255,255,255,.08); color: #e2e8f0; }
.sidebar-link.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(220,38,38,.4); }
.sidebar-link i      { font-size: 1rem; flex-shrink: 0; }

.sidebar-badge {
  margin-left: auto;
  background: #f59e0b;
  color: #000;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-divider { border-color: rgba(255,255,255,.08); margin: 8px 4px; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  text-align: center;
}

/* Collapsed state */
.sidebar-collapsed .admin-sidebar {
  width: 60px;
  min-width: 60px;
}
.sidebar-collapsed .admin-sidebar .sidebar-brand-name,
.sidebar-collapsed .admin-sidebar .sidebar-brand-sub,
.sidebar-collapsed .admin-sidebar .sidebar-user-name,
.sidebar-collapsed .admin-sidebar .sidebar-user-role,
.sidebar-collapsed .admin-sidebar .sidebar-link span,
.sidebar-collapsed .admin-sidebar .sidebar-badge,
.sidebar-collapsed .admin-sidebar .sidebar-footer { display: none; }
.sidebar-collapsed .admin-sidebar .sidebar-link { justify-content: center; padding: 12px; }

/* -- Admin main -- */
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.admin-page-title { font-size: .95rem; font-weight: 600; color: var(--text-main); margin: 0; }

.admin-content { padding: 24px; flex: 1; }

/* ── Admin stat cards ───────────────────────────────────── */
.admin-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.admin-stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-stat-number { font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--text-main); }
.admin-stat-label  { font-size: .75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

/* ── Tables ─────────────────────────────────────────────── */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table { margin: 0; color: var(--text-main); }
.table thead th {
  background: #f8fafc;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: 12px 16px;
  white-space: nowrap;
}

[data-bs-theme="dark"] .table thead th { background: #1e293b; }

.table tbody td { padding: 12px 16px; vertical-align: middle; border-color: var(--border); }
.table tbody tr:hover { background: rgba(0,0,0,.025); }

[data-bs-theme="dark"] .table tbody tr:hover { background: rgba(255,255,255,.03); }

/* ── Donor image in table ───────────────────────────────── */
.table-donor-img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.table-donor-placeholder {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ── Image preview ──────────────────────────────────────── */
#imagePreviewContainer {
  display: none;
  margin-top: 10px;
}

#imagePreview {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

/* ── Blood group filter buttons ─────────────────────────── */
.bg-filter-btn {
  font-size: .75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  border: 2px solid transparent;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.bg-filter-btn:hover, .bg-filter-btn.selected {
  filter: brightness(1.1);
  transform: scale(1.06);
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
  color: #fff;
}

/* ── Utility classes ────────────────────────────────────── */
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 20px;
}
.section-divider span { white-space: nowrap; font-weight: 600; color: var(--text-muted); font-size: .82rem; }
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── App footer ─────────────────────────────────────────── */
.app-footer {
  background: #0f172a;
  border-top: 2px solid var(--primary);
  color: #cbd5e1;   /* Base readable color on dark bg */
}

/* Override Bootstrap's text-muted inside footer — #6c757d is too dark on #0f172a */
.app-footer .text-muted     { color: #94a3b8 !important; }
.app-footer p               { color: #cbd5e1; }
.app-footer li, .app-footer small { color: #94a3b8; }
.app-footer h5, .app-footer h6    { color: #f1f5f9; }
.app-footer strong          { color: #f1f5f9; }

.footer-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-link:hover { color: #f1f5f9; }

/* WhatsApp group CTA in footer */
.footer-whatsapp-group {
  background: rgba(37, 211, 102, .12);
  border: 1px solid rgba(37, 211, 102, .3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 12px;
}
.footer-whatsapp-group a {
  color: #4ade80;
  font-weight: 600;
  text-decoration: none;
}
.footer-whatsapp-group a:hover { color: #86efac; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); border: none; font-size: .9rem; }

/* ── Pagination (pill style) ────────────────────────────── */
.pagination { gap: 4px; flex-wrap: wrap; justify-content: center; }

.pagination .page-link {
  border-radius: 50px !important;
  min-width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-main);
  border-color: var(--border);
  background: var(--bg-surface);
  padding: 0 14px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.pagination .page-link:hover {
  background: var(--primary-l);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220,38,38,.18);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220,38,38,.35);
  transform: none;
}
.pagination .page-item.disabled .page-link {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

/* ── "How it works" step cards ──────────────────────────── */
.how-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.how-step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.step-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 200;
  }
  .admin-wrapper.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .admin-content { padding: 16px; }
  .hero { padding: 50px 0 40px; }
  .form-card { padding: 20px; }
}

@media (max-width: 767.98px) {
  /* Compact donor cards on tablets */
  .donor-card-header { padding: 14px; }
  .donor-avatar      { width: 70px; height: 70px; }
  .donor-avatar-placeholder { width: 70px; height: 70px; font-size: 1.75rem; }
  .donor-card-body   { padding: 12px; }
  .donor-name        { font-size: .92rem; }
  .donor-info-row    { font-size: .78rem; margin-bottom: 3px; }
  .donor-actions     { padding: 8px 12px; gap: 4px; }
  .donor-actions .btn { font-size: .75rem; padding: 4px 8px; }

  /* Smaller step cards */
  .how-step-card { padding: 24px 16px !important; }
  .step-number   { font-size: 2.2rem; }
}

@media (max-width: 575.98px) {
  .stat-number         { font-size: 1.5rem; }
  .hero-title          { font-size: 1.6rem; }

  /* Even more compact cards on phones */
  .donor-card-header   { padding: 12px; }
  .donor-avatar        { width: 60px; height: 60px; }
  .donor-avatar-placeholder { width: 60px; height: 60px; font-size: 1.5rem; }
  .donor-name          { font-size: .88rem; }

  /* Pill pagination smaller on phones */
  .pagination .page-link {
    min-width: 36px;
    height: 36px;
    font-size: .8rem;
    padding: 0 10px;
  }
}
