/* ================================================
   ঋতুপূর্ণ সমবায় সমিতি — Main Stylesheet
   Design: Dark Teal + Amber | Glassmorphism
   ================================================ */

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

/* ── CSS Variables ──────────────────────────────── */
:root {
  --primary:       #0f4c75;
  --primary-dark:  #0a3557;
  --primary-light: #1b6ca8;
  --accent:        #f0a500;
  --accent-dark:   #d4920a;
  --success:       #27ae60;
  --danger:        #e74c3c;
  --warning:       #f39c12;
  --info:          #2980b9;
  --purple:        #8e44ad;

  --bg:            #f0f4f8;
  --bg-card:       #ffffff;
  --sidebar-bg:    #0d1b2a;
  --sidebar-text:  #a8c6e0;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active:#1b6ca8;
  --topbar-bg:     #ffffff;

  --text:          #1a2332;
  --text-muted:    #6c7a8d;
  --text-light:    #a0aec0;

  --border:        #e2e8f0;
  --border-focus:  #1b6ca8;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow:        0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:     0 10px 40px rgba(0,0,0,0.15);

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --radius-pill:   50px;

  --sidebar-w:     260px;
  --topbar-h:      64px;
  --transition:    0.25s ease;
  --font-bn:       'Hind Siliguri', sans-serif;
  --font-en:       'Inter', sans-serif;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-bn);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }

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

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), width var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-brand .brand-logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: 700;
  flex-shrink: 0;
}
.sidebar-brand .brand-text { overflow: hidden; }
.sidebar-brand .brand-name {
  font-size: 13px; font-weight: 700;
  color: #fff; line-height: 1.3;
  display: block;
}
.sidebar-brand .brand-sub {
  font-size: 11px; color: var(--sidebar-text);
}

.sidebar-section {
  padding: 12px 0 4px;
  flex-shrink: 0;
}
.sidebar-section-title {
  padding: 0 16px 6px;
  font-size: 10px;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(168,198,224,0.5);
  font-weight: 600;
}

.sidebar-menu { padding: 0 8px; }
.sidebar-item { margin-bottom: 2px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary-light), #1a7abf);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27,108,168,0.4);
}
.sidebar-link .nav-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  font-size: 15px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.sidebar-link.active .nav-icon,
.sidebar-link:hover .nav-icon {
  background: rgba(255,255,255,0.15);
}
.sidebar-link .nav-label { flex: 1; }
.sidebar-link .nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-family: var(--font-en);
}
.sidebar-link .nav-arrow {
  font-size: 11px;
  transition: transform var(--transition);
  color: rgba(168,198,224,0.5);
}
.sidebar-link[aria-expanded="true"] .nav-arrow { transform: rotate(90deg); }

/* Submenu */
.sidebar-submenu {
  padding-left: 16px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.sidebar-submenu.open { max-height: 500px; }
.sidebar-submenu .sidebar-link {
  font-size: 13px;
  padding: 8px 12px;
  color: rgba(168,198,224,0.8);
}
.sidebar-submenu .sidebar-link::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(168,198,224,0.4);
  flex-shrink: 0;
}
.sidebar-submenu .sidebar-link.active::before,
.sidebar-submenu .sidebar-link:hover::before {
  background: var(--accent);
}

/* ── Main Content ────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: margin-left var(--transition);
}

/* ── Topbar ──────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-toggle {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 20px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: none;
}
.topbar-toggle:hover { background: var(--bg); color: var(--primary); }
.topbar-title {
  font-size: 17px; font-weight: 700;
  color: var(--text);
  flex: 1;
}
.topbar-search {
  position: relative;
  width: 280px;
}
.topbar-search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}
.topbar-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,108,168,0.1);
}
.topbar-search .search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none; background: var(--bg);
  color: var(--text-muted);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--primary); color: #fff; }
.topbar-btn .badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger);
  border: 2px solid var(--topbar-bg);
}
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.topbar-user:hover { background: var(--bg); border-color: var(--primary-light); }
.topbar-user .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.topbar-user .user-name { font-size: 14px; font-weight: 600; color: var(--text); }
.topbar-user .user-role { font-size: 11px; color: var(--text-muted); }
.lang-switcher {
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
  cursor: pointer;
}
.lang-switcher:hover { border-color: var(--primary); color: var(--primary); }

/* ── Page Content ────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.page-header h1 {
  font-size: 22px; font-weight: 800;
  color: var(--text);
}
.page-header .breadcrumb {
  font-size: 13px; color: var(--text-muted);
  margin-top: 2px;
}
.page-header .breadcrumb a { color: var(--primary-light); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(240,244,248,0.5);
}
.card-header h3 {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.card-header h3 .card-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(240,244,248,0.3);
}

/* ── Stat Cards ─────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.blue::before   { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.amber::before  { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); }
.stat-card.green::before  { background: linear-gradient(90deg, #1e8449, var(--success)); }
.stat-card.red::before    { background: linear-gradient(90deg, #c0392b, var(--danger)); }
.stat-card.purple::before { background: linear-gradient(90deg, #6c3483, var(--purple)); }
.stat-card.teal::before   { background: linear-gradient(90deg, #0e6655, #1abc9c); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(15,76,117,0.1); color: var(--primary); }
.stat-icon.amber  { background: rgba(240,165,0,0.1); color: var(--accent-dark); }
.stat-icon.green  { background: rgba(39,174,96,0.1); color: var(--success); }
.stat-icon.red    { background: rgba(231,76,60,0.1); color: var(--danger); }
.stat-icon.purple { background: rgba(142,68,173,0.1); color: var(--purple); }
.stat-icon.teal   { background: rgba(26,188,156,0.1); color: #1abc9c; }

.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 12px; color: var(--text-muted);
  font-weight: 500; margin-bottom: 4px;
}
.stat-value {
  font-size: 22px; font-weight: 800;
  color: var(--text); font-family: var(--font-en);
  line-height: 1.2;
}
.stat-change {
  font-size: 12px; margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Grid ────────────────────────────────────────── */
.row { display: flex; flex-wrap: wrap; margin: -8px; }
.col { padding: 8px; min-width: 0; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%; max-width: 50%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3  { flex: 0 0 25%; max-width: 25%; }
.col-8  { flex: 0 0 66.667%; max-width: 66.667%; }
.col-5  { flex: 0 0 41.667%; max-width: 41.667%; }
.col-7  { flex: 0 0 58.333%; max-width: 58.333%; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15,76,117,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 18px rgba(15,76,117,0.4);
  color: #fff;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(240,165,0,0.3);
}
.btn-accent:hover { filter: brightness(0.92); color: #fff; }
.btn-success {
  background: linear-gradient(135deg, #1e8449, var(--success));
  color: #fff;
  box-shadow: 0 4px 12px rgba(39,174,96,0.25);
}
.btn-success:hover { filter: brightness(0.92); color: #fff; }
.btn-danger {
  background: linear-gradient(135deg, #c0392b, var(--danger));
  color: #fff;
  box-shadow: 0 4px 12px rgba(231,76,60,0.25);
}
.btn-danger:hover { filter: brightness(0.92); color: #fff; }
.btn-warning {
  background: linear-gradient(135deg, #d68910, var(--warning));
  color: #fff;
  box-shadow: 0 4px 12px rgba(243,156,18,0.25);
}
.btn-warning:hover { filter: brightness(0.92); color: #fff; }
.btn-info {
  background: linear-gradient(135deg, #1a5276, var(--info));
  color: #fff;
  box-shadow: 0 4px 12px rgba(41,128,185,0.25);
}
.btn-info:hover { filter: brightness(0.92); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(15,76,117,0.05); }
.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-rounded { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  transition: all var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,108,168,0.12);
  background: #fff;
}
.form-control.error { border-color: var(--danger); }
.form-control:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c7a8d' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { min-height: 100px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.input-group .input-addon {
  padding: 10px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex; align-items: center;
}

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.file-upload-area:hover, .file-upload-area.dragging {
  border-color: var(--primary-light);
  background: rgba(27,108,168,0.04);
}
.file-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-upload-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 8px; }
.file-upload-text { font-size: 14px; color: var(--text-muted); }
.file-upload-text strong { color: var(--primary); }
.file-preview {
  width: 100px; height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  margin-top: 10px;
}

/* ── Tables ──────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table thead tr th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.table tbody tr td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(240,244,248,0.8); }
.table-striped tbody tr:nth-child(even) td { background: rgba(240,244,248,0.4); }
.table-sm thead tr th,
.table-sm tbody tr td { padding: 8px 12px; font-size: 13px; }

/* Member/Staff avatar in table */
.table-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.table-avatar-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-en);
  white-space: nowrap;
}
.badge-primary { background: rgba(15,76,117,0.12); color: var(--primary); }
.badge-success { background: rgba(39,174,96,0.12); color: var(--success); }
.badge-danger  { background: rgba(231,76,60,0.12); color: var(--danger); }
.badge-warning { background: rgba(243,156,18,0.12); color: #b7770d; }
.badge-info    { background: rgba(41,128,185,0.12); color: var(--info); }
.badge-purple  { background: rgba(142,68,173,0.12); color: var(--purple); }
.badge-secondary { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Alerts ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid transparent;
}
.alert-success { background: rgba(39,174,96,0.08); border-color: var(--success); color: #1a7a42; }
.alert-danger  { background: rgba(231,76,60,0.08); border-color: var(--danger); color: #b03328; }
.alert-warning { background: rgba(243,156,18,0.08); border-color: var(--warning); color: #8a6500; }
.alert-info    { background: rgba(41,128,185,0.08); border-color: var(--info); color: #1a5f8a; }
.alert-close { margin-left: auto; background: none; border: none; font-size: 16px; cursor: pointer; color: inherit; opacity: 0.6; padding: 0; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }

/* ── Tabs ────────────────────────────────────────── */
.tabs { border-bottom: 2px solid var(--border); display: flex; gap: 0; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h4 { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none; background: var(--bg);
  font-size: 18px; cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ── Search Bar ──────────────────────────────────── */
.search-bar {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.search-bar .form-control { flex: 1; min-width: 200px; }

/* ── Member Card ─────────────────────────────────── */
.member-card {
  display: flex; align-items: center; gap: 14px;
}
.member-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.member-avatar-placeholder {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.member-info .member-name { font-weight: 700; font-size: 15px; color: var(--text); }
.member-info .member-id   { font-size: 12px; color: var(--text-muted); font-family: var(--font-en); }

/* ── Pagination ──────────────────────────────────── */
.pagination-nav { display: flex; justify-content: center; padding: 16px 0; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination li a, .pagination li span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
  font-family: var(--font-en);
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active a, .pagination li.active span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Print ───────────────────────────────────────── */
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .page-header .page-actions, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .print-only { display: block; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; }
}

/* ── Loading Spinner ─────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ─────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h4 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: 14px; }

/* ── Stats/Info Rows ─────────────────────────────── */
.info-list { }
.info-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.info-item:last-child { border-bottom: none; }
.info-label { width: 45%; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.info-value { flex: 1; font-weight: 600; color: var(--text); }

/* ── Charts Container ────────────────────────────── */
.chart-container { position: relative; height: 280px; }

/* ── Dashboard specific ──────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.quick-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}
.quick-action:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--primary);
}
.quick-action .qa-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.quick-action .qa-label { font-size: 13px; font-weight: 600; }

/* ── Timeline ────────────────────────────────────── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item::before {
  content: ''; position: absolute; left: -22px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--bg-card);
}
.timeline-item .tl-time { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.timeline-item .tl-content { font-size: 14px; color: var(--text); }
.timeline-item .tl-amount { font-weight: 700; color: var(--primary); }

/* ── Report Print Header ─────────────────────────── */
.report-header {
  text-align: center;
  padding: 20px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 20px;
}
.report-header .org-name { font-size: 22px; font-weight: 800; color: var(--primary); }
.report-header .org-address { font-size: 13px; color: var(--text-muted); }
.report-header .report-title { font-size: 17px; font-weight: 700; margin-top: 8px; }
.report-meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 16px; }

/* ── Certificate ─────────────────────────────────── */
.certificate {
  border: 8px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%);
  position: relative;
  overflow: hidden;
}
.certificate::before {
  content: '';
  position: absolute; inset: 12px;
  border: 2px solid var(--accent);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.certificate-title { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.certificate-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 24px; }
.certificate-body { font-size: 15px; line-height: 1.8; color: var(--text); }
.certificate-amount { font-size: 32px; font-weight: 800; color: var(--success); margin: 16px 0; }

/* ── Utility ─────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.fs-12   { font-size: 12px; }
.fs-13   { font-size: 13px; }
.fs-14   { font-size: 14px; }
.fs-18   { font-size: 18px; }
.fs-22   { font-size: 22px; }
.w-100   { width: 100%; }
.d-none  { display: none; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius); }
.shadow  { box-shadow: var(--shadow); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .col-4 { flex: 0 0 50%; max-width: 50%; }
  .col-3 { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content { margin-left: 0; }
  .topbar-toggle { display: flex; }
  .topbar-search { display: none; }
  .col-6, .col-4, .col-3, .col-8, .col-5, .col-7 {
    flex: 0 0 100%; max-width: 100%;
  }
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
}

/* ── Login Page ──────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-dark) 40%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(240,165,0,0.07);
  top: -200px; right: -100px;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(27,108,168,0.15);
  bottom: -100px; left: -100px;
  pointer-events: none;
}
.login-left {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative; z-index: 1;
  flex-direction: column; text-align: center;
}
.login-right {
  width: 460px; flex-shrink: 0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  box-shadow: -20px 0 60px rgba(0,0,0,0.3);
  position: relative; z-index: 10;
}
.login-brand-logo {
  width: 80px; height: 80px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #fff;
  margin: 0 auto 20px;
  border: 2px solid rgba(255,255,255,0.2);
}
.login-brand-name {
  font-size: 26px; font-weight: 800;
  color: #fff; margin-bottom: 8px;
}
.login-tagline { font-size: 15px; color: rgba(255,255,255,0.7); }
.login-features { margin-top: 40px; text-align: left; }
.login-feature {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.login-feature .lf-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 16px; flex-shrink: 0;
}
.login-feature .lf-text { color: rgba(255,255,255,0.85); font-size: 14px; }
.login-feature .lf-text strong { color: #fff; display: block; font-size: 15px; }
.login-form-box { width: 100%; max-width: 380px; }
.login-form-title { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-form-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
@media (max-width: 768px) {
  .login-page { flex-direction: column; }
  .login-left  { display: none; }
  .login-right { width: 100%; min-height: 100vh; }
}

/* ── Animations ──────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.slide-in { animation: slideIn 0.3s ease; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 1.5s infinite; }

/* ── Tooltip ─────────────────────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: #fff;
  font-size: 12px; padding: 4px 10px;
  border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  z-index: 999;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Dropdown ────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px); right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: all; transform: none; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 14px; color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Number display ──────────────────────────────── */
.amount-positive { color: var(--success); font-weight: 700; }
.amount-negative { color: var(--danger); font-weight: 700; }
.amount-neutral  { color: var(--text); font-weight: 700; }

/* ── Sidebar overlay for mobile ──────────────────── */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}
.sidebar-overlay.open { display: block; }
