:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --primary: #6366f1;
  --primary-700: #4f46e5;
  --danger: #ef4444;
  --success: #22c55e;
  --border: #1f2937;
  --sidebar-bg: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.75));
  --topbar-bg: linear-gradient(180deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.7));
  --body-glow-1: rgba(99, 102, 241, 0.18);
  --body-glow-2: rgba(139, 92, 246, 0.16);
  --icon-btn-danger-bg: #1f0b0b;
  --icon-btn-danger-color: #fecaca;
  --icon-btn-danger-border: #7f1d1d;
  --icon-btn-edit-bg: #0b1029;
  --icon-btn-edit-color: #dbeafe;
  --icon-btn-edit-border: #1e3a8a;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}


.hidden {
  display: none !important;
}

.spacer {
  flex: 1;
}

.muted {
  color: var(--muted);
  margin: 0 0 8px;
  font-size: 14px;
}

.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app img {
  width: 50px;
  height: 50px;
  margin-left: 10px;
  border-radius: 50%;
  margin-top: 10px;
}

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  box-shadow: 4px 0 20px var(--shadow-color);
}

.brand {
  padding: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-color: rgba(99, 102, 241, 0.35);
}

.nav-link:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
}

.main {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.icon-btn.danger {
  color: var(--icon-btn-danger-color);
  border-color: var(--icon-btn-danger-border);
  background: var(--icon-btn-danger-bg);
}

.icon-btn.edit {
  color: var(--icon-btn-edit-color);
  border-color: var(--icon-btn-edit-border);
  background: var(--icon-btn-edit-bg);
}

.content {
  padding: 16px;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
  will-change: transform;
  contain: layout style paint;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: var(--primary);
}

.gradient-card {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.gradient-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.card-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  width: fit-content;
  margin-top: 8px;
}

.card-trend.positive {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.card-trend.negative {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.card-trend.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

input:hover,
select:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

input[type="date"] {
  padding: 8px 10px;
}

.btn {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 4px 12px var(--shadow-color);
  position: relative;
  overflow: hidden;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary-700);
  color: white;
}

.btn.secondary {
  background: var(--panel);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn.full {
  width: 100%;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

/* Input with inline action button */
.input-with-action {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.input-with-action input {
  flex: 1;
}

.input-with-action .icon-btn.small {
  padding: 0 10px;
  display: grid;
  place-items: center;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  margin-top: 12px;
  box-shadow: 0 8px 24px var(--shadow-color);
  contain: layout style paint;
  will-change: scroll-position;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  transition: background-color 0.15s ease;
  contain: layout style;
}

.table thead th {
  position: sticky;
  top: 0;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  z-index: 1;
}

.table tbody tr:nth-child(odd) {
  background: rgba(148, 163, 184, 0.04);
}

.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

.table tbody tr {
  transition: background-color 0.15s ease;
  contain: layout style;
}

.col-actions {
  display: flex;
  gap: 6px;
}

/* Make table scroller friendlier on touch devices */
.table-wrap {
  -webkit-overflow-scrolling: touch;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  /* Ensure overlays sit above main app */
}

.overlay#loginOverlay {
  background: radial-gradient(1200px 400px at 10% -10%, rgba(99, 102, 241, 0.25), transparent 40%),
    radial-gradient(600px 300px at 90% -10%, rgba(139, 92, 246, 0.25), transparent 40%),
    rgba(0, 0, 0, 0.5);
}

.modal {
  width: min(720px, 92vw);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 20px 60px var(--shadow-color);
}

.login-modal {
  width: min(440px, 94vw);
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08)), var(--panel);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 20px 60px var(--shadow-color);
}

.login-header {
  text-align: center;
  margin-bottom: 12px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 8px;
}

.login-header h2 {
  margin: 6px 0 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-actions {
  margin-top: 8px;
}

.login-actions .btn {
  width: 100%;
}

@media (max-width: 480px) {
  .login-modal {
    width: 94vw;
    padding: 16px;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }
}

.modal h2 {
  margin: 0 0 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.settings-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.settings-section:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

.settings-section h3 {
  margin: 0 0 10px;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    z-index: 20;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    z-index: 10;
  }

  .main {
    width: 100%;
  }
}


/* ----- Enhancements: theme, avatars, badges, toasts, subtle effects ----- */
:root {
  --card-gradient: radial-gradient(1200px 400px at 10% -10%, rgba(99, 102, 241, 0.15), transparent 40%), radial-gradient(600px 300px at 90% -10%, rgba(139, 92, 246, 0.16), transparent 40%);
}

[data-theme="light"] {
  --bg: #f7f7fb;
  --panel: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --primary: #6366f1;
  --primary-700: #4f46e5;
  --danger: #dc2626;
  --success: #16a34a;
  --border: #e5e7eb;
  --card-gradient: radial-gradient(1200px 400px at 10% -10%, rgba(99, 102, 241, 0.08), transparent 40%), radial-gradient(600px 300px at 90% -10%, rgba(139, 92, 246, 0.08), transparent 40%);
  --sidebar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.9));
  --topbar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.95));
  --body-glow-1: rgba(99, 102, 241, 0.08);
  --body-glow-2: rgba(139, 92, 246, 0.06);
  --icon-btn-danger-bg: #fef2f2;
  --icon-btn-danger-color: #dc2626;
  --icon-btn-danger-border: #fca5a5;
  --icon-btn-edit-bg: #eff6ff;
  --icon-btn-edit-color: #1e40af;
  --icon-btn-edit-border: #93c5fd;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

.nav-link {
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.nav-link:hover {
  transform: translateX(4px);
}

.icon-btn {
  transition: transform 120ms ease, background 120ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

.card {
  box-shadow: 0 6px 20px var(--shadow-color);
}

.table-wrap {
  box-shadow: 0 6px 20px var(--shadow-color);
}

.btn {
  transition: transform 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Avatars and badges */
.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 0.2s ease;
}

.badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.badge.muted {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.35);
}

.badge:hover {
  transform: scale(1.05);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
  z-index: 50;
}

.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}


/* Enhanced Member Form Styles */
.large-modal {
  width: min(900px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.member-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.form-section:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

.form-section h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.form-section label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

.form-section>div>label {
  margin-bottom: 6px;
}

textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 60px;
}

/* Photo Upload */
.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.photo-preview {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms ease;
}

.photo-preview:hover {
  border-color: var(--primary);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.photo-placeholder {
  text-align: center;
  color: var(--muted);
}

.photo-placeholder span {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.photo-placeholder p {
  margin: 0;
  font-size: 12px;
}

/* Camera actions layout */
.photo-upload .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Member Table Enhancements */
.table {
  min-width: 900px;
}

.col-photo {
  width: 60px;
  text-align: center;
}

.member-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.member-photo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin: 0 auto;
}

/* Dashboard Additions */
.dashboard-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.dot.purple {
  background: #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.qa-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  color: var(--text);
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-weight: 600;
}

.qa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-color);
  border-color: rgba(99, 102, 241, 0.5);
}

.announcement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.announcement-item .text p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.announcement-item .text strong {
  color: var(--text);
  font-size: 14px;
}

.pill {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  height: fit-content;
}

.pill.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.pill.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.pill.warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

/* WhatsApp Button */
.icon-btn.whatsapp {
  color: #25d366;
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

.icon-btn.whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  transform: translateY(-1px);
}

/* Print Button */
.icon-btn.print {
  color: #6366f1;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

.icon-btn.print:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}

/* Fees Plans Management */
.fees-plans-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Validation Styles */
input.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

input.error:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

/* Today Present Animation */
.card-value.updating {
  font-weight: 800;
}



/* Attendance Checkbox Styling */
.attendance-checkbox {
  transform: scale(1.2);
  cursor: pointer;
  accent-color: var(--primary);
}

.attendance-checkbox:checked {
  accent-color: #22c55e;
}

/* Form Field Validation */
.member-form input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.member-form input:valid:not(:placeholder-shown) {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Alerts System */
.nav-badge {
  background: #ef4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
  min-width: 18px;
  text-align: center;
  display: inline-block;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  will-change: transform;
}


/* Password strength */
.strength {
  margin-top: 6px;
}

.strength-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.strength-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #ef4444;
  transition: width 160ms ease, background 160ms ease;
}

/* Recovery section */
.recovery {
  margin-top: 12px;
}

.recovery h3 {
  margin: 8px 0;
  font-size: 14px;
  color: var(--muted);
}

.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alert-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 16px var(--shadow-color);
  transition: all 0.2s ease;
}

.alert-section:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.alert-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 200ms ease;
}

.alert-item:hover {
  background: var(--panel);
  border-color: var(--primary);
}

.alert-item.read {
  opacity: 0.6;
  background: var(--panel);
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.alert-icon.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.alert-icon.expiring {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.alert-icon.overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.alert-details {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.alert-description {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.alert-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.alert-date {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}

.alert-priority {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.alert-priority.high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.alert-priority.medium {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.alert-priority.low {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.empty-alerts {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  font-style: italic;
}

/* Form Validation Styles */
.form-validation-status {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.validation-message {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 500;
}

.validation-icon {
  font-size: 16px;
}

.validation-text {
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #6b7280 !important;
  border-color: #6b7280 !important;
}

.btn:disabled:hover {
  transform: none;
  background: #6b7280 !important;
}



/* Responsive adjustments */
@media (max-width: 1200px) {
  .table {
    min-width: 1000px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .large-modal {
    width: 95vw;
  }

  .member-form {
    gap: 16px;
  }

  .form-section {
    padding: 12px;
  }

  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .actions>* {
    flex: 1 1 140px;
  }

  .content {
    padding: 12px;
  }

  .table-wrap {
    margin-top: 10px;
  }

  .table th,
  .table td {
    padding: 8px 10px;
    font-size: 14px;
  }

  #cameraPreview {
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 8px 10px;
  }

  .brand {
    padding: 12px;
  }

  .btn {
    padding: 8px 10px;
  }

  input,
  select {
    padding: 8px 10px;
  }

  .table {
    min-width: 720px;
  }

  .table th,
  .table td {
    padding: 6px 8px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 8px;
  }

  .topbar {
    gap: 6px;
  }

  .owner {
    display: none;
  }

  .btn {
    padding: 8px 10px;
    font-size: 14px;
  }

  .actions {
    gap: 6px;
  }

  .actions>* {
    flex: 1 1 110px;
  }

  .modal {
    width: 96vw;
    padding: 12px;
  }

  .large-modal {
    width: 96vw;
  }

  .table {
    min-width: 600px;
  }
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }

  .print-content,
  .print-content * {
    visibility: visible;
  }

  .print-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .no-print {
    display: none !important;
  }
}

.print-content {
  background: white;
  color: black;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.print-header {
  text-align: center;
  border-bottom: 2px solid #333;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.print-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  display: block;
}

.print-title {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

.print-subtitle {
  font-size: 16px;
  color: #666;
  margin: 5px 0 0;
}

.print-section {
  margin-bottom: 20px;
  page-break-inside: avoid;
}

.print-section h3 {
  background: #f5f5f5;
  padding: 10px;
  margin: 0 0 10px;
  border-left: 4px solid #6366f1;
}

.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.print-field {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dotted #ccc;
}

.print-field strong {
  min-width: 120px;
}

.print-receipt {
  border: 2px solid #333;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.print-receipt h2 {
  margin: 0 0 20px;
  color: #333;
}

.print-receipt .amount {
  font-size: 24px;
  font-weight: bold;
  color: #22c55e;
  margin: 10px 0;
}

/* Role-based UI */
.role-staff .nav-link[data-view="settings"],
.role-staff .nav-link[data-view="reports"],
.role-staff .icon-btn.delete {
  display: none !important;
}

.role-staff .btn.danger {
  display: none !important;
}

.role-staff .btn.danger.collect-btn,
.role-staff .btn.danger#sendCollectBtn {
  display: inline-block !important;
}

.role-staff .admin-only {
  display: none !important;
}

/* Disabled form elements for staff */
.role-staff select:disabled,
.role-staff input:disabled,
.role-staff button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #6b7280 !important;
  border-color: #6b7280 !important;
}

/* WhatsApp Messaging Styles */
.whatsapp-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.whatsapp-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.whatsapp-section h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-actions .btn {
  min-width: 160px;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 200ms ease;
  cursor: pointer;
}

.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.template-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.template-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.template-card .btn {
  width: 100%;
}

/* Message Form Styles */
.message-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recipients-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recipient-type {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.recipient-type label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 500;
}

.recipient-type input[type="radio"] {
  margin: 0;
}

.recipient-type select {
  width: 100%;
  margin-top: 8px;
}

.bulk-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.bulk-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  margin: 0;
}

.bulk-options input[type="checkbox"] {
  margin: 0;
}

.message-preview {
  margin-top: 16px;
}

.message-preview h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.preview-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-height: 60px;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text);
}

/* Message Input Section */
.message-input-section {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.message-input-section label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.message-input-section input[type="radio"] {
  margin: 0;
}

.custom-message-section {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.custom-message-section textarea {
  width: 100%;
  margin-bottom: 8px;
}

.message-variables {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

/* Message History Actions */
.message-history-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  gap: 8px;
}

/* Message History Styles */
.message-history-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-history-item:hover {
  border-color: var(--primary);
}

.message-info {
  flex: 1;
}

.message-info .member-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.message-info .message-details {
  color: var(--muted);
  font-size: 14px;
}

.message-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.message-status.sent {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.message-status.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.message-status.failed {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* WhatsApp Button Enhancement */
.icon-btn.whatsapp {
  color: #25d366;
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

.icon-btn.whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  transform: translateY(-1px);
}

.icon-btn.whatsapp:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #6b7280 !important;
  border-color: #6b7280 !important;
  color: #9ca3af !important;
}

/* Collect Button Styles */
.collect-btn {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: white !important;
  font-size: 12px;
  padding: 6px 12px;
  min-width: auto;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid #ef4444;
}

.collect-btn:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.collect-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}


/* Enhanced Button Styles */
.btn {
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

[data-theme="light"] .btn::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-color: var(--primary);
  color: white;
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-700), #7c3aed);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Enhanced Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.attendance-section {
  animation: slideInUp 0.6s ease;
}

.stat-card {
  animation: fadeIn 0.8s ease;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Welcome Message Modal Styles */
.welcome-modal {
  width: min(500px, 90vw);
  background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: welcomeSlideIn 0.6s ease-out;
}

@keyframes welcomeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.welcome-content {
  text-align: center;
  padding: 20px;
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

.welcome-content h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-content p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.welcome-role {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.welcome-content .btn {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.welcome-content .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.welcome-content .btn:hover::before {
  left: 100%;
}

.welcome-content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Role-specific welcome message colors */
.welcome-modal.admin .welcome-role {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.welcome-modal.staff .welcome-role {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.welcome-modal.staff .welcome-content h2 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Dashboard Styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.dashboard-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.dashboard-date {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* Enhanced Stat Cards */
.stat-card-1 {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

.stat-card-2 {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 163, 74, 0.05));
}

.stat-card-3 {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

.stat-card-4 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
}

.card-decoration {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
  border-radius: 50%;
  transform: translate(30%, 30%);
  pointer-events: none;
}

/* Mini Stats */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.mini-stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.mini-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.mini-stat-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
  border-radius: 12px;
}

.mini-stat-info {
  flex: 1;
}

.mini-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.mini-stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart Container */
.chart-container {
  margin: 20px 0;
  padding: 20px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.chart-period-select {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* Recent Members Card */
.recent-members-card {
  grid-column: span 1;
}

.recent-members-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.recent-member-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.recent-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.recent-member-info {
  flex: 1;
  min-width: 0;
}

.recent-member-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-member-date {
  font-size: 12px;
  color: var(--muted);
}

.recent-member-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.recent-member-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.recent-member-badge.inactive {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* Activity Timeline */
.activity-card {
  grid-column: span 1;
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-left: 8px;
  position: relative;
}

.activity-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 24px;
  bottom: -16px;
  width: 2px;
  background: var(--border);
}

.activity-item:last-child::before {
  display: none;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.activity-content {
  flex: 1;
  padding-top: 4px;
}

.activity-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--muted);
}

/* Enhanced Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  will-change: transform;
}

.qa-btn:hover {
  transform: translateY(-2px) translateZ(0);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

.qa-icon {
  font-size: 24px;
  line-height: 1;
}

.qa-btn span:not(.qa-icon) {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Dashboard Sections Grid */
.dashboard-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
  .dashboard-sections {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-date {
    align-self: flex-start;
  }

  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-sections {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Performance optimizations */
.view.hidden {
  display: none !important;
  content-visibility: hidden;
  contain: layout style paint;
}

.view:not(.hidden) {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Optimize images */
img {
  image-rendering: -webkit-optimize-contrast;
  will-change: auto;
}

.member-photo {
  will-change: auto;
  contain: layout style paint;
}

/* Reduce repaints with GPU acceleration */
.glass-card,
.card,
.mini-stat-card,
.recent-member-item,
.activity-item {
  contain: layout style paint;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize scrolling */
.table-wrap {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Reduce animation complexity for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}