/* ============================================================
   STYLE.CSS  —  CMS Design System
   Combines: core layout, modules, members, birds, fundraising,
             fathers-union, settings, bulk-messaging,
             departments, and utility classes.
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
  --primary:       #4a1e8f;
  --primary-dk:    #330f6e;
  --primary-lt:    #6b35c7;
  --primary-fade:  rgba(74,30,143,.08);
  --accent:        #d4a017;
  --accent-lt:     #f0c040;
  --accent-fade:   rgba(212,160,23,.12);
  --success:       #28a745;
  --danger:        #dc3545;
  --warning:       #ffc107;
  --info:          #17a2b8;
  --text:          #1e1e2d;
  --text-muted:    #6c757d;
  --border:        #e4ddf5;
  --bg:            #f3f2f8;
  --white:         #ffffff;
  --shadow-sm:     0 1px 6px rgba(74,30,143,.07);
  --shadow:        0 4px 18px rgba(74,30,143,.12);
  --shadow-lg:     0 10px 40px rgba(74,30,143,.18);
  --sidebar-w:     260px;
  --topbar-h:      62px;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     14px;
  --transition:    all .22s ease;
}


/* ============================================================
   2. BASE RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
a    { text-decoration: none; color: inherit; }
img  { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar        { width: 5px; height: 5px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-lt); }


/* ============================================================
   3. CMS SHELL
   ============================================================ */
.cms-layout { display: flex; min-height: 100vh; }

/* Prevent body scroll when a modal is open */
body.cms-modal-open { overflow: hidden !important; }


/* ============================================================
   4. SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: linear-gradient(175deg, var(--primary-dk) 0%, var(--primary) 55%, #5a2aaa 100%);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  box-shadow: 4px 0 24px rgba(0,0,0,.2);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

/* Brand */
.sidebar-brand {
  padding: 22px 20px 15px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.sidebar-brand .cross { display: block; font-size: 2.4rem; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.sidebar-brand h2     { color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.sidebar-brand p      { color: rgba(255,255,255,.42); font-size: 10.5px; margin-top: 3px; letter-spacing: .4px; }

.sidebar-logo {
  width: 58px; height: 58px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  margin-bottom: 8px;
}

/* User pill */
.sidebar-user {
  margin: 12px 14px;
  padding: 10px 13px;
  background: rgba(0,0,0,.18);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.sidebar-user .info strong { color: #fff; font-size: 12.5px; display: block; line-height: 1.3; }
.sidebar-user .info span   { color: rgba(255,255,255,.48); font-size: 10.5px; text-transform: capitalize; }

/* Nav */
.sidebar-nav { flex: 1; padding: 6px 0 24px; overflow-y: auto; }
.nav-section {
  padding: 16px 20px 5px;
  font-size: 9.5px; font-weight: 700;
  color: rgba(255,255,255,.28);
  text-transform: uppercase; letter-spacing: 1.4px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px;
  color: rgba(255,255,255,.7);
  font-size: 13px; font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: var(--accent);
}
.sidebar-nav a.active { font-weight: 700; background: rgba(255,255,255,.13); }
.sidebar-nav a .icon  { width: 20px; text-align: center; font-size: 14.5px; flex-shrink: 0; }

/* Footer */
.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); flex-shrink: 0; }
.sidebar-footer a { color: rgba(255,255,255,.42); font-size: 12px; display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.sidebar-footer a:hover { color: #fff; }

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


/* ============================================================
   5. MAIN WRAPPER & TOPBAR
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left .3s cubic-bezier(.4,0,.2,1);
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0; z-index: 100;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(74,30,143,.06);
  display: flex;
  align-items: center;
  padding: 0 24px 0 16px;
  gap: 14px;
  flex-shrink: 0;
}
.topbar-toggle {
  background: none; border: none;
  font-size: 19px; color: var(--primary); cursor: pointer;
  padding: 7px 9px; border-radius: var(--radius-sm);
  display: flex; align-items: center;
  transition: var(--transition); flex-shrink: 0;
}
.topbar-toggle:hover { background: var(--primary-fade); }
.topbar-title { font-size: 17px; font-weight: 800; color: var(--primary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-date  { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.topbar-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px;
  background: var(--primary-fade); color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.topbar-btn:hover { background: var(--primary); color: #fff; }
.topbar-user {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  background: var(--primary-fade);
  border-radius: 20px;
}
.topbar-avatar { width: 30px; height: 30px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.topbar-username { font-size: 12px; font-weight: 600; color: var(--primary); }

.content-area { flex: 1; padding: 26px 28px 44px; min-width: 0; }


/* ============================================================
   6. PAGE / MODULE HEADERS
   ============================================================ */
.page-header,
.module-header,
.module-page-header,
.data-page-header,
.form-page-header,
.profile-page-header,
.members-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-header h2,
.module-title h2,
.data-title h2,
.form-page-header h2,
.profile-page-header h2,
.members-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header h2 i { font-size: 17px; opacity: .8; }

.module-title p,
.data-title p,
.form-page-header p,
.profile-page-header p,
.members-title p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }

.module-actions,
.profile-actions,
.form-actions-inline,
.member-view-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}


/* ============================================================
   7. GRID SYSTEM  (Bootstrap-compatible, mobile-first)
   ============================================================ */
.row { display: flex; flex-wrap: wrap; margin-left: -10px; margin-right: -10px; }
[class*="col-"] { padding-left: 10px; padding-right: 10px; width: 100%; flex: 0 0 100%; max-width: 100%; }

.col-1  { flex: 0 0 8.333%;   max-width: 8.333%;   }
.col-2  { flex: 0 0 16.667%;  max-width: 16.667%;  }
.col-3  { flex: 0 0 25%;      max-width: 25%;      }
.col-4  { flex: 0 0 33.333%;  max-width: 33.333%;  }
.col-5  { flex: 0 0 41.667%;  max-width: 41.667%;  }
.col-6  { flex: 0 0 50%;      max-width: 50%;      }
.col-7  { flex: 0 0 58.333%;  max-width: 58.333%;  }
.col-8  { flex: 0 0 66.667%;  max-width: 66.667%;  }
.col-9  { flex: 0 0 75%;      max-width: 75%;      }
.col-10 { flex: 0 0 83.333%;  max-width: 83.333%;  }
.col-11 { flex: 0 0 91.667%;  max-width: 91.667%;  }
.col-12 { flex: 0 0 100%;     max-width: 100%;     }

@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 8.333%;  max-width: 8.333%;  }
  .col-sm-2  { flex: 0 0 16.667%; max-width: 16.667%; }
  .col-sm-3  { flex: 0 0 25%;     max-width: 25%;     }
  .col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-sm-6  { flex: 0 0 50%;     max-width: 50%;     }
  .col-sm-12 { flex: 0 0 100%;    max-width: 100%;    }
}
@media (min-width: 768px) {
  .col-md-1  { flex: 0 0 8.333%;  max-width: 8.333%;  }
  .col-md-2  { flex: 0 0 16.667%; max-width: 16.667%; }
  .col-md-3  { flex: 0 0 25%;     max-width: 25%;     }
  .col-md-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-5  { flex: 0 0 41.667%; max-width: 41.667%; }
  .col-md-6  { flex: 0 0 50%;     max-width: 50%;     }
  .col-md-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-md-8  { flex: 0 0 66.667%; max-width: 66.667%; }
  .col-md-9  { flex: 0 0 75%;     max-width: 75%;     }
  .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-md-12 { flex: 0 0 100%;    max-width: 100%;    }
}
@media (min-width: 992px) {
  .col-lg-2  { flex: 0 0 16.667%; max-width: 16.667%; }
  .col-lg-3  { flex: 0 0 25%;     max-width: 25%;     }
  .col-lg-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-6  { flex: 0 0 50%;     max-width: 50%;     }
  .col-lg-8  { flex: 0 0 66.667%; max-width: 66.667%; }
  .col-lg-9  { flex: 0 0 75%;     max-width: 75%;     }
  .col-lg-12 { flex: 0 0 100%;    max-width: 100%;    }
}


/* ============================================================
   8. STAT CARDS & STATS GRIDS
   ============================================================ */
.stats-grid,
.module-stats-grid,
.three-per-row,
.fu-stats-grid,
.birds-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.fu-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-card {
  background: #673ab7;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15,23,42,.08);
  display: flex;
  gap: 14px;
  align-items: center;
  transition: transform .2s, box-shadow .2s;
  cursor: default;
  color: #fff;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
a .stat-card { cursor: pointer; }
a:hover .stat-card { box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(74,30,143,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.stat-body { flex: 1; min-width: 0; }

.stat-value,
.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.5px;
  color: #fff;
}
.stat-value.small { font-size: 18px; }
.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}


/* ============================================================
   9. CARDS
   ============================================================ */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }
.card + .card, .mb-3 { margin-bottom: 16px; }
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: var(--white); font-size: 13.5px; font-weight: 700; color: var(--primary);
}
.card-header i { opacity: .75; }
.card-body   { padding: 20px; }
.card-footer { padding: 11px 20px; border-top: 1px solid var(--border); background: #faf9fd; font-size: 12.5px; }
.card-footer a { color: var(--primary); font-weight: 600; }
.card-footer a:hover { text-decoration: underline; }
.h-100 { height: 100%; }

/* Module / data card variants */
.module-card,
.data-card { overflow: hidden; }

.data-card-header,
.module-card-header {
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; color: var(--primary); flex-wrap: wrap;
}

.data-count,
.module-count,
.count-pill {
  background: var(--primary-fade); color: var(--primary);
  padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; white-space: nowrap;
}

.data-table-wrap,
.module-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table,
.module-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.data-table th,
.module-table th {
  background: #f5f1ff; color: var(--primary);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  padding: 13px 14px; white-space: nowrap;
  border-bottom: 2px solid var(--border); text-align: left;
}
.data-table td,
.module-table td {
  padding: 13px 14px; border-bottom: 1px solid #f0ecfa;
  vertical-align: middle; color: var(--text); font-size: 13px;
}
.data-table tbody tr:hover,
.module-table tbody tr:hover { background: #faf7ff; }

/* Fundraising card */
.fundraising-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}
.fundraising-card-header {
  background: var(--primary); color: #fff;
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.fundraising-card-body  { padding: 16px; }
.fundraising-card-footer {
  padding: 12px 16px; background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.fundraising-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}

/* Fin KPI */
.fin-kpi { background: var(--white); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm); height: 100%; }
.fin-kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 6px; }
.fin-kpi-value { font-size: 1.2rem; font-weight: 700; }
.fin-report-card { transition: transform .15s; }
.fin-report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }


/* ============================================================
   10. INFO BOX  (alert-style banners)
   ============================================================ */
.info-box {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  background: var(--primary-fade); color: var(--primary); font-size: 13.5px;
}
.info-box i  { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.info-box h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.info-box p  { margin: 0; font-size: 13px; opacity: .85; }
.info-box.gold    { background: var(--accent-fade); border-left-color: var(--accent); color: #7a5000; }
.info-box.success { background: rgba(40,167,69,.09); border-left-color: var(--success); color: #1a6b2e; }
.info-box.danger  { background: rgba(220,53,69,.09); border-left-color: var(--danger); color: #7a0e1e; }
.info-box.warning { background: rgba(255,193,7,.12); border-left-color: var(--warning); color: #6b4f00; }


/* ============================================================
   11. TABLES
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  background: #f5f1ff; color: var(--primary);
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .55px;
  padding: 11px 14px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid #f0ecfa; transition: background .14s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: #faf7ff; }
.table tbody td { padding: 10px 14px; vertical-align: middle; }
.table-sm th, .table-sm td { padding: 7px 12px; font-size: 12.5px; }
.table-borderless td, .table-borderless th { border: none !important; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-warning { background: #fff8e1 !important; }
.table-danger  { background: #ffeaea !important; }
.table-success { background: #eaffea !important; }


/* ============================================================
   12. BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.badge-primary   { background: var(--primary-fade);          color: var(--primary); }
.badge-success   { background: rgba(40,167,69,.12);           color: #1a7a32; }
.badge-danger    { background: rgba(220,53,69,.12);           color: #a72030; }
.badge-warning   { background: rgba(255,193,7,.18);           color: #7a5c00; }
.badge-info      { background: rgba(23,162,184,.14);          color: #0d6e7c; }
.badge-secondary { background: rgba(108,117,125,.12);         color: #495057; }
.badge-light     { background: rgba(255,255,255,.22);         color: #fff; }
.badge-gold      { background: var(--accent-fade);            color: #7a5800; }


/* ============================================================
   13. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition); text-decoration: none;
  white-space: nowrap; line-height: 1.4;
}
.btn i { font-size: 12px; }
.btn.disabled { pointer-events: none; opacity: .55; }

.btn-primary         { background: var(--primary);  border-color: var(--primary);  color: #fff; }
.btn-primary:hover   { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-secondary       { background: #6c757d; border-color: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; border-color: #5a6268; }
.btn-success         { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover   { background: #1e7e34; border-color: #1e7e34; }
.btn-danger          { background: var(--danger);  border-color: var(--danger);  color: #fff; }
.btn-danger:hover    { background: #b02a37; border-color: #b02a37; }
.btn-warning         { background: var(--warning); border-color: var(--warning); color: #212529; }
.btn-warning:hover   { background: #e0a800; border-color: #e0a800; }
.btn-info            { background: var(--info);    border-color: var(--info);    color: #fff; }
.btn-info:hover      { background: #117a8b; border-color: #117a8b; }
.btn-accent          { background: var(--accent);  border-color: var(--accent);  color: #fff; }
.btn-accent:hover    { background: #b88a10; border-color: #b88a10; }

.btn-outline-primary       { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary       { background: transparent; border-color: #6c757d; color: #6c757d; }
.btn-outline-secondary:hover { background: #6c757d; color: #fff; }
.btn-outline       { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm    { padding: 5px 12px; font-size: 12px; }
.btn-lg    { padding: 11px 26px; font-size: 15px; }
.btn-xs    { padding: 2px 8px; font-size: 11px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-icon  { width: 34px; height: 34px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }


/* ============================================================
   14. FORMS
   ============================================================ */
.form-row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
.form-row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-control {
  display: block; width: 100%;
  padding: 9px 13px; border: 2px solid #ddd; border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: inherit; color: var(--text); background: var(--white);
  transition: border-color .2s, box-shadow .2s; outline: none; line-height: 1.5;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,30,143,.1); }
.form-control::placeholder { color: #aaa; }
select.form-control { cursor: pointer; appearance: auto; }
textarea.form-control { resize: vertical; min-height: 88px; }
.form-control-sm { padding: 6px 10px; font-size: 12.5px; }
.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-check  { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.form-check-input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.form-check-label { font-size: 13px; cursor: pointer; margin-bottom: 0; }

/* Form grids */
.form-grid,
.form-grid-2,
.modal-form-grid,
.member-form-grid,
.birds-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3     { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-grid-4     { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* Full-width span helpers (all naming conventions) */
.full-span,
.form-full,
.form-group.full,
.full { grid-column: 1 / -1; }

.form-section-title,
.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 0 16px; padding: 10px 12px;
  background: var(--primary-fade); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); color: var(--primary);
  font-weight: 800; font-size: 13px;
}
.req, .required { color: var(--danger); font-weight: 800; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}

/* Form card */
.form-card { overflow: hidden; }
.form-card .card-header h3 { font-size: 15px; color: var(--primary); display: flex; align-items: center; gap: 8px; }


/* ============================================================
   15. TOOLBARS & SEARCH
   ============================================================ */
.module-toolbar,
.data-toolbar,
.toolbar,
.birds-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.module-filter-form,
.data-filter-form,
.filter-form,
.members-filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-box,
.module-search-box,
.data-search-box,
.members-search-box {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
  position: relative;
}
.search-box i,
.module-search-box i,
.data-search-box i,
.members-search-box i {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px;
}
.search-box input,
.module-search-box input,
.data-search-box input,
.members-search-box input,
.module-filter-form select,
.data-filter-form select,
.filter-form select,
.filter-form input,
.members-filter-form select {
  width: 100%; height: 42px;
  border: 2px solid #e1d9f3; border-radius: var(--radius-sm);
  padding: 0 13px; background: #fff; color: var(--text);
  outline: none; font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box input,
.module-search-box input,
.data-search-box input,
.members-search-box input { padding-left: 38px; }

.search-box input:focus,
.module-search-box input:focus,
.data-search-box input:focus,
.members-search-box input:focus,
.module-filter-form select:focus,
.data-filter-form select:focus,
.filter-form select:focus,
.filter-form input:focus,
.members-filter-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,30,143,.10);
}

/* Action button groups in tables */
.action-buttons,
.table-actions,
.table-action,
.birds-row-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; flex-wrap: wrap; }


/* ============================================================
   16. ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  font-size: 13.5px; border-left: 4px solid; gap: 10px;
}
.alert-success { background: rgba(40,167,69,.09);  border-color: var(--success); color: #1a6b2e; }
.alert-danger  { background: rgba(220,53,69,.09);  border-color: var(--danger);  color: #7a0e1e; }
.alert-warning { background: rgba(255,193,7,.12);  border-color: var(--warning); color: #6b4f00; }
.alert-info    { background: rgba(23,162,184,.09); border-color: var(--info);    color: #0c5460; }

.close, .close-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; line-height: 1; opacity: .55;
  color: inherit; padding: 0 4px; flex-shrink: 0; transition: opacity .2s;
}
.close:hover, .close-btn:hover { opacity: 1; }

/* Inline / Ajax alerts */
.ajax-alert,
.app-alert,
.birds-alert {
  display: none;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.ajax-alert.success,
.app-alert.success,
.birds-alert.success { display: block; background: #dcfce7; color: #166534; }
.ajax-alert.error,
.app-alert.error,
.birds-alert.error   { display: block; background: #fee2e2; color: #991b1b; }


/* ============================================================
   17. PROGRESS BARS
   ============================================================ */
.progress { background: #e9ecef; border-radius: 20px; height: 8px; overflow: hidden; width: 100%; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: width .6s ease; }
.progress-bar.bg-success { background: var(--success); }
.progress-bar.bg-warning { background: var(--warning); }
.progress-bar.bg-danger  { background: var(--danger);  }
.progress-bar.bg-info    { background: var(--info);    }


/* ============================================================
   18. NAV TABS & BIRDS TABS
   ============================================================ */
.nav-tabs,
.birds-tabs {
  display: flex; flex-wrap: wrap; gap: 2px;
  border-bottom: 2px solid var(--border); margin-bottom: 20px; list-style: none;
  overflow-x: auto;
}
.nav-item  { margin: 0; }
.nav-link,
.birds-tabs a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid transparent; position: relative; top: 2px;
  transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.nav-link:hover,
.birds-tabs a:hover  { color: var(--primary); background: var(--primary-fade); }
.nav-link.active,
.birds-tabs a.active {
  color: var(--primary); background: var(--white);
  border-color: var(--border); border-bottom-color: var(--white); font-weight: 700;
}


/* ============================================================
   19. MODALS  (all variants unified)
   ============================================================ */
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* -- Shared backdrop -- */
.modal-overlay,
.app-modal-backdrop,
.ajax-modal-backdrop,
.birds-modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.62);
  z-index: 9998;
  display: none;
}
.modal-overlay          { background: rgba(0,0,0,.52); z-index: 1000; backdrop-filter: blur(2px);
                           align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show     { display: flex; }
.app-modal-backdrop.show,
.ajax-modal-backdrop.show { display: block; }
.birds-modal.show        { display: block; }

/* -- Shared scroll-container -- */
.app-modal,
.ajax-modal,
.member-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none;
  align-items: flex-start; justify-content: center;
  overflow: auto; padding: 28px 14px;
}
.app-modal.show,
.ajax-modal.show,
.member-modal-overlay.show { display: flex !important; }

/* -- Dialog boxes -- */
.modal,
.app-dialog,
.ajax-dialog,
.birds-modal-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 60px rgba(0,0,0,.26);
  overflow: hidden;
  animation: modalIn .22s ease;
}
/* legacy .modal */
.modal { max-width: 540px; width: 100%; }
/* app-dialog */
.app-dialog       { width: min(840px, 100%); }
.app-dialog-sm    { width: min(520px, 100%); }
.app-dialog-lg    { width: min(900px, 100%); }
/* ajax-dialog */
.ajax-dialog      { width: min(720px, 100%); }
.ajax-dialog-sm   { width: min(480px, 100%); }
.ajax-dialog-lg   { width: min(820px, 100%); }
.ajax-dialog-xl   { width: min(1050px, 100%); }
/* birds */
.birds-modal-dialog { width: min(780px, 100%); margin: 30px auto; }
/* member overlay */
.member-modal-overlay {
  padding: 22px 12px !important;
  background: rgba(0,0,0,.58) !important;
}
.member-modal-overlay .modal {
  margin: auto 0 !important;
  width: 100% !important; max-width: 760px !important;
  max-height: calc(100vh - 44px) !important;
  display: flex !important; flex-direction: column !important;
}
.member-modal-overlay .modal-lg  { max-width: 980px !important; }
.member-modal-overlay .modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  max-height: calc(100vh - 182px) !important;
  -webkit-overflow-scrolling: touch !important;
}
.modal.modal-lg { max-width: 820px; }
.modal.modal-xl { max-width: 1080px; }
.modal-scrollable .modal-body,
.modal-body-scroll { max-height: calc(100vh - 190px); overflow-y: auto; }

/* -- Headers -- */
.modal-header,
.app-modal-header,
.ajax-modal-header,
.birds-modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  background: var(--primary); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.modal-header h4,
.app-modal-header h3,
.ajax-modal-header h4,
.birds-modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; }

/* -- Bodies -- */
.modal-body,
.app-modal-body,
.ajax-modal-body,
.birds-modal-body {
  padding: 20px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}
.modal-body    { padding: 24px; }

/* -- Footers -- */
.modal-footer,
.app-modal-footer,
.ajax-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  background: #faf9fd;
  border-top: 1px solid var(--border);
}
.modal-footer { border-top: 1px solid var(--border); }

/* Close button */
.modal-close,
.birds-close {
  border: 0; background: rgba(255,255,255,.15); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  width: 32px; height: 32px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover,
.birds-close:hover { background: rgba(255,255,255,.3); }


/* ============================================================
   20. DETAIL / PROFILE SECTIONS
   ============================================================ */
/* Inline detail rows */
.detail-row { display: grid; grid-template-columns: 155px 1fr; gap: 6px; padding: 9px 0; border-bottom: 1px solid #f2eefc; }
.detail-row .dlabel { font-weight: 600; font-size: 12.5px; color: var(--text-muted); }
.detail-row .dval   { font-size: 13px; color: var(--text); }
.detail-section { margin-bottom: 22px; }
.detail-section h4 { font-size: 13.5px; font-weight: 700; color: var(--primary); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }

/* Detail grid (modals) */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.detail-item b {
  display: block;
  font-size: 11.5px; color: var(--text-muted); font-weight: 700;
  margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em;
}
.detail-item.full { grid-column: 1 / -1; }

/* Profile grid */
.profile-grid,
.detail-profile-grid,
.member-profile-grid {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start;
}
.member-view-profile {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px;
}
.profile-card .card-body { padding: 32px 24px; }
.profile-avatar,
.large-avatar,
.member-view-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-lt));
  color: #fff; font-size: 34px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 15px; box-shadow: 0 10px 24px rgba(74,30,143,.22);
}
.member-view-avatar { width: 88px; height: 88px; font-size: 32px; background: #4f46e5; }
.profile-card h3 { margin-bottom: 6px; font-size: 18px; color: var(--text); }
.summary-total,
.profile-total,
.amount-total,
.contribution-total { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.2; }

/* Profile / detail rows */
.detail-list-row,
.profile-detail-row,
.info-row,
.member-detail-row,
.member-view-row {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 12px 0; border-bottom: 1px solid #f0ecfa;
}
.detail-list-row:last-child,
.profile-detail-row:last-child,
.info-row:last-child,
.member-detail-row:last-child { border-bottom: none; }
.detail-label,
.profile-detail-label,
.info-label,
.member-detail-label,
.member-view-label { min-width: 160px; color: var(--text-muted); font-weight: 700; font-size: 13px; }
.detail-value,
.profile-detail-value,
.info-value,
.member-detail-value,
.member-view-value { flex: 1; text-align: right; color: var(--text); font-size: 13.5px; word-break: break-word; }

/* Member view card */
.member-view-card { border: 1px solid #eee; border-radius: 12px; padding: 18px; background: #fff; }
.member-view-row { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f1f1; }
.member-view-label { color: #64748b; font-weight: 700; font-size: 12px; }
.member-view-value { word-break: break-word; }

/* Pills */
.pill-group,
.dept-pill { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 4px 6px; flex-wrap: wrap; }
.pill-group small,
.dept-pill small { color: var(--text-muted); font-weight: 600; }


/* ============================================================
   21. AVATAR
   ============================================================ */
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.record-avatar,
.entity-avatar,
.list-avatar,
.member-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-lt));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(74,30,143,.18);
}
.record-info,
.entity-info,
.list-info,
.member-info { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.record-name,
.entity-name,
.list-title,
.member-name { font-weight: 800; color: #171326; line-height: 1.2; }
.record-sub,
.entity-sub,
.list-subtitle,
.member-sub { color: var(--text-muted); font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 5px; }


/* ============================================================
   22. CAMPAIGN / FUNDRAISING EXTRAS
   ============================================================ */
.campaign-money-row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 8px;
}
.mini-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.mini-stat-row > div { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px; text-align: center; padding: 8px; }
.mini-stat-row b,
.mini-stat-row small { display: block; }

.campaign-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.detail-card { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; }
.detail-card.full { grid-column: 1 / -1; }
.detail-card b { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; }


/* ============================================================
   23. BIRDS MODULE
   ============================================================ */
.rotation-item { display: flex; gap: 14px; margin-bottom: 18px; }
.rotation-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; flex-shrink: 0;
}
.rotation-dot.returned { background: var(--success); }
.rotation-dot.pending  { background: var(--warning); }
.rotation-content { flex: 1; background: #faf8ff; border-radius: var(--radius-sm); padding: 12px 16px; border-left: 3px solid var(--primary); }
.cycle-badge { display: inline-block; background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }


/* ============================================================
   24. LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 50%, var(--primary-lt) 100%);
  padding: 20px;
}
.login-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 46px 40px; width: 400px; max-width: 100%;
  box-shadow: var(--shadow-lg); text-align: center;
}
.login-box .cross    { font-size: 48px; color: var(--primary); display: block; margin-bottom: 8px; }
.login-box h1        { font-size: 21px; font-weight: 800; color: var(--primary); }
.login-box .subtitle { font-size: 12px; color: var(--text-muted); margin: 4px 0 26px; }
.login-box .form-group { margin-bottom: 16px; text-align: left; }
.btn-login {
  width: 100%; padding: 13px;
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .2s; margin-top: 8px;
}
.btn-login:hover { background: var(--primary-dk); }
.login-footer { margin-top: 18px; font-size: 11.5px; color: var(--text-muted); }


/* ============================================================
   25. SETTINGS MODULE
   ============================================================ */
.settings-page .settings-card { margin-top: 18px; }
.settings-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.settings-preview-box { border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px; background: #f8fafc; min-height: 150px; }
.settings-preview-box h5 { margin: 0 0 12px; font-weight: 800; }
.settings-logo-preview { max-width: 220px; max-height: 95px; object-fit: contain; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px; }
.settings-favicon-preview { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px; }
.empty-preview {
  min-height: 95px; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #64748b; gap: 8px;
  border: 1px dashed #cbd5e1; border-radius: 12px; background: #fff;
}
.empty-preview i { font-size: 30px; }


/* ============================================================
   26. UTILITIES
   ============================================================ */
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }
.d-inline-block { display: inline-block !important; }
.d-table        { display: table !important; }
.d-table-cell   { display: table-cell !important; }

.flex-wrap              { flex-wrap: wrap; }
.flex-column            { flex-direction: column; }
.flex-1                 { flex: 1; }
.align-items-center     { align-items: center !important; }
.align-items-start      { align-items: flex-start !important; }
.align-items-end        { align-items: flex-end !important; }
.align-self-center      { align-self: center !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end     { justify-content: flex-end !important; }
.gap-1 { gap: 4px; }  .gap-2 { gap: 8px; }  .gap-3 { gap: 16px; }  .gap-4 { gap: 24px; }

.m-0  { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }   .mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; } .mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; } .mt-5 { margin-top: 40px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; } .mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; } .mb-5 { margin-bottom: 40px !important; }
.ml-1 { margin-left: 4px !important; }  .ml-2 { margin-left: 8px !important; }
.ml-3 { margin-left: 16px !important; } .ml-auto { margin-left: auto !important; }
.mr-1 { margin-right: 4px !important; } .mr-2 { margin-right: 8px !important; }
.mr-3 { margin-right: 16px !important; } .mr-auto { margin-right: auto !important; }
.p-0  { padding: 0 !important; }  .p-1  { padding: 4px !important; }
.p-2  { padding: 8px !important; } .p-3 { padding: 16px !important; } .p-4 { padding: 24px !important; }
.py-1 { padding-top: 4px !important;  padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important;  padding-bottom: 8px !important; }
.py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }
.px-2 { padding-left: 8px !important;  padding-right: 8px !important; }
.px-3 { padding-left: 16px !important; padding-right: 16px !important; }

.text-left    { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: #856404 !important; }
.text-info    { color: var(--info) !important; }
.text-white   { color: #fff !important; }
.text-dark    { color: var(--text) !important; }
.font-weight-bold   { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.small        { font-size: 12px !important; }
.display-4    { font-size: 2.5rem; font-weight: 700; }
.text-uppercase       { text-transform: uppercase !important; }
.text-decoration-none { text-decoration: none !important; }
.opacity-75   { opacity: .75; }

.bg-success { background-color: var(--success) !important; }
.bg-danger  { background-color: var(--danger)  !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-info    { background-color: var(--info)    !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-light   { background-color: #f8f9fa !important; }
.bg-white   { background-color: #fff !important; }

.w-100  { width: 100% !important; }
.h-100  { height: 100% !important; }
.mw-100 { max-width: 100%; }

.border         { border: 1px solid var(--border) !important; }
.border-0       { border: none !important; }
.rounded        { border-radius: var(--radius-sm) !important; }
.rounded-circle { border-radius: 50% !important; }

.position-relative { position: relative; }
.overflow-hidden   { overflow: hidden; }
.overflow-x-auto   { overflow-x: auto; }

.float-right  { float: right; }
.clearfix::after { content: ''; display: table; clear: both; }
.cursor-pointer  { cursor: pointer; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 54px; margin-bottom: 14px; opacity: .28; }
.modal-open { overflow: hidden; }


/* ============================================================
   27. RESPONSIVE — = 1100px  (4-col stat ? 2-col)
   ============================================================ */
@media (max-width: 1100px) {
  .fu-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ============================================================
   28. RESPONSIVE — = 991px
   ============================================================ */
@media (max-width: 991px) {
  .topbar-date { display: none; }
  .topbar-btn  { display: none; }

  .stats-grid,
  .module-stats-grid,
  .three-per-row,
  .birds-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .form-grid,
  .form-grid-3,
  .modal-form-grid,
  .member-form-grid,
  .birds-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .profile-grid,
  .detail-profile-grid,
  .member-profile-grid,
  .member-view-profile { grid-template-columns: 1fr; }

  .fundraising-grid,
  .campaign-detail-grid { grid-template-columns: 1fr 1fr; }
  .settings-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ============================================================
   29. RESPONSIVE — = 767px
   ============================================================ */
@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); z-index: 300; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .content-area { padding: 14px 14px 30px; }
  .topbar { padding: 0 14px 0 12px; }
  .topbar-username { display: none; }

  .page-header,
  .module-header,
  .module-page-header,
  .data-page-header,
  .form-page-header,
  .profile-page-header,
  .members-page-header { flex-direction: column; align-items: flex-start; }
  .page-header h2 { font-size: 18px; }

  .module-filter-form,
  .data-filter-form,
  .filter-form,
  .members-filter-form { flex-direction: column; align-items: stretch; }

  .search-box,
  .module-search-box,
  .data-search-box,
  .members-search-box { min-width: 100%; max-width: 100%; }

  .module-filter-form .btn,
  .data-filter-form .btn,
  .filter-form .btn,
  .members-filter-form .btn,
  .module-filter-form select,
  .data-filter-form select,
  .filter-form select,
  .members-filter-form select { width: 100%; justify-content: center; }

  .data-card-header,
  .module-card-header { flex-direction: column; align-items: flex-start; }

  .form-row { flex-direction: column; }
  .form-row > [class*="col-"] { max-width: 100%; flex: 0 0 100%; }

  .stat-number,
  .stat-value { font-size: 1.35rem; }
  .card-body  { padding: 14px; }

  .birds-modal { padding: 8px; }
  .birds-modal-dialog { margin: 10px auto; }
}


/* ============================================================
   30. RESPONSIVE — = 575px
   ============================================================ */
@media (max-width: 575px) {
  .topbar-user { padding: 4px; }
  .btn         { padding: 7px 14px; }
  .btn-sm      { padding: 5px 10px; font-size: 11.5px; }
  .table       { font-size: 12px; }
  .table thead th { font-size: 10px; padding: 8px 10px; }
  .table tbody td { padding: 8px 10px; }
  .stat-value,
  .stat-number { font-size: 1.2rem; }

  .stats-grid,
  .module-stats-grid,
  .three-per-row,
  .birds-stat-grid,
  .fu-stats-grid { grid-template-columns: 1fr; }

  .form-grid,
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .modal-form-grid,
  .member-form-grid,
  .birds-form-grid,
  .detail-grid,
  .campaign-detail-grid { grid-template-columns: 1fr; }

  .fundraising-grid,
  .settings-preview-grid,
  .mini-stat-row { grid-template-columns: 1fr; }

  .form-actions,
  .module-actions,
  .profile-actions,
  .member-view-actions { flex-direction: column; width: 100%; }
  .form-actions .btn,
  .module-actions .btn,
  .profile-actions .btn,
  .member-view-actions .btn { width: 100%; justify-content: center; }

  .detail-list-row,
  .profile-detail-row,
  .info-row,
  .member-detail-row { flex-direction: column; gap: 4px; }
  .detail-label,
  .profile-detail-label,
  .info-label,
  .member-detail-label { min-width: 0; }
  .detail-value,
  .profile-detail-value,
  .info-value,
  .member-detail-value { text-align: left; }

  .member-view-row { grid-template-columns: 1fr; gap: 3px; }

  .modal-overlay { padding: 10px; }
  .modal { max-height: 96vh; }
  .modal-body { padding: 16px; }
  .modal-header, .modal-footer { padding-left: 16px; padding-right: 16px; }

  .app-modal,
  .ajax-modal { padding: 10px 8px; }
  .app-modal-body,
  .ajax-modal-body { padding: 14px; max-height: calc(100vh - 145px); }

  .member-modal-overlay { padding: 8px !important; }
  .member-modal-overlay .modal { max-height: calc(100vh - 16px) !important; }
  .member-modal-overlay .modal-body { max-height: calc(100vh - 158px) !important; }
}


/* ============================================================
   32. BULK MESSAGING MODULE
   ============================================================ */
.bulk-message-page .bulk-page-grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}

/* Tabs */
.bulk-message-page .bulk-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb; padding-bottom: 10px;
}
.bulk-message-page .tab-btn {
  border: 1px solid #d1d5db; background: #fff; color: #374151;
  padding: 10px 16px; border-radius: 10px; font-weight: 700; cursor: pointer;
}
.bulk-message-page .tab-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* Stats grid — 3 cols */
.bulk-message-page .stats-grid-3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}

/* Stat card override (lighter style for this module) */
.bulk-message-page .stat-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 16px; box-shadow: 0 6px 18px rgba(15,23,42,.05);
}
.bulk-message-page .stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: #f1f5f9; color: var(--primary);
}
.bulk-message-page .stat-value { font-size: 22px; }
.bulk-message-page .stat-label { color: #64748b; margin-top: 4px; }

/* Actions row */
.bulk-message-page .bulk-actions,
.bulk-message-page .bulk-recipient-actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px;
}

/* Recipient checkboxes */
.bulk-message-page .recipient-check,
.bulk-message-page #selectAllRecipients,
.bulk-message-page #selectAllRecipientsHead { width: 18px; height: 18px; cursor: pointer; }

/* Table */
.bulk-message-page .module-table { min-width: 780px; }

/* Local helpers */
.bulk-message-page .justify-between { justify-content: space-between; }
.bulk-message-page .align-center    { align-items: center; }

@media (max-width: 900px) {
  .bulk-message-page .stats-grid-3 { grid-template-columns: 1fr; }
  .bulk-message-page .form-grid    { grid-template-columns: 1fr; }
}


/* ============================================================
   33. DEPARTMENTS MODULE
   ============================================================ */
.dept-stats-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-bottom: 20px;
}

.dept-stat-card {
  background: #fff; border-radius: 16px; padding: 18px;
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
  border: 1px solid rgba(148,163,184,.25);
  display: flex; align-items: center; gap: 14px;
}
.dept-stat-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37,99,235,.12); font-size: 21px;
}
.dept-stat-value { font-size: 26px; font-weight: 800; line-height: 1; }
.dept-stat-label { color: #64748b; font-size: 13px; margin-top: 5px; }

/* Toolbar */
.dept-toolbar {
  display: flex; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap;
}
.dept-search { min-width: 260px; flex: 1; max-width: 420px; }
.dept-search input {
  width: 100%; padding: 10px 12px;
  border: 1px solid #d1d5db; border-radius: 10px;
}

/* Dept card grid */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.dept-card { border-top: 4px solid var(--primary); }
.dept-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dept-code  { font-size: 11px; }
.dept-title { margin: 8px 0 0; font-size: 18px; color: var(--primary); }
.dept-desc  { color: var(--text-muted); font-size: 13px; margin: 8px 0; min-height: 36px; }
.dept-meta  { display: flex; gap: 20px; align-items: center; margin-top: 12px; }
.dept-count { text-align: center; }
.dept-count strong { font-size: 22px; color: var(--primary); }
.dept-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Alerts */
.dept-alert { display: none; margin-bottom: 12px; border-radius: 10px; padding: 10px 12px; }
.dept-alert.success { display: block; background: #dcfce7; color: #166534; }
.dept-alert.error   { display: block; background: #fee2e2; color: #991b1b; }

/* Modal */
.dept-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.62);
  z-index: 9998; display: none;
}
.dept-modal-backdrop.show { display: block; }
.dept-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: flex-start; justify-content: center;
  overflow: auto; padding: 30px 14px;
}
.dept-modal.show { display: flex; }

.dept-dialog {
  width: min(860px, 100%); background: #fff; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
}
.dept-dialog-sm { width: min(520px, 100%); }

.dept-modal-header {
  padding: 16px 18px; background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between;
}
.dept-modal-title { font-weight: 800; font-size: 18px; }
.dept-close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; }
.dept-modal-body {
  padding: 18px; max-height: calc(100vh - 180px); overflow-y: auto;
}
.dept-modal-actions {
  padding: 14px 18px; background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Form grid */
.dept-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dept-full { grid-column: 1 / -1; }
.dept-field label { font-weight: 700; font-size: 13px; margin-bottom: 6px; display: block; }
.dept-field input,
.dept-field select,
.dept-field textarea { width: 100%; border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; }
.dept-field textarea { min-height: 90px; resize: vertical; }

/* Member layout inside dept view */
.dept-member-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.member-row { display: flex; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .dept-stats-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-form-grid,
  .dept-member-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dept-stats-grid  { grid-template-columns: 1fr; }
  .dept-search      { max-width: 100%; min-width: 100%; }
  .dept-modal       { padding: 12px 8px; }
  .dept-modal-body  { max-height: calc(100vh - 130px); }
}


/* ============================================================
   31. PRINT
   ============================================================ */
@media print {
  .sidebar, .topbar, .page-header .btn,
  .no-print, .btn-primary, .btn-danger { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content-area { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; font-size: 12px; }
}