/* ==========================================================================
   Records Portal — Modern Responsive Stylesheet (سجلات أعضاء الكشاف)
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --primary-glow: rgba(79, 70, 229, 0.18);
  
  --success: #059669;
  --success-hover: #047857;
  --success-light: #d1fae5;
  
  --warning: #d97706;
  --warning-light: #fef3c7;
  
  --danger: #dc2626;
  --danger-light: #fee2e2;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Unit Accent Colors */
  --unit-beavers: #0284c7;
  --unit-beavers-bg: #e0f2fe;
  
  --unit-cubs: #d97706;
  --unit-cubs-bg: #fef3c7;
  
  --unit-boyscouts: #059669;
  --unit-boyscouts-bg: #d1fae5;
  
  --unit-girlscouts: #7c3aed;
  --unit-girlscouts-bg: #ede9fe;
  
  --unit-pioneers: #ea580c;
  --unit-pioneers-bg: #ffedd5;
  
  --unit-rovers: #b91c1c;
  --unit-rovers-bg: #fee2e2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* ─── Top Navigation Bar ─────────────────────────────────────────────── */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 48px;
  max-width: 140px;
  object-fit: contain;
}

.brand-titles h1 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-titles p {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.badge-portal-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* ─── Main Content Container ─────────────────────────────────────────── */
.main-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ─── Hero Summary Header ────────────────────────────────────────────── */
.hero-summary {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.hero-summary::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-text h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  min-width: 110px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.hero-stat-card .num {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
}

.hero-stat-card .label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
}

/* ─── Controls & Filter Bar ──────────────────────────────────────────── */
.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 16px;
}

.search-input {
  width: 100%;
  padding: 11px 40px 11px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px var(--primary-light);
}

.search-clear-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
}

.btn-success:hover:not(:disabled) {
  background: var(--success-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-icon-only {
  padding: 9px 12px;
}

/* ─── Unit Filter Pills ─────────────────────────────────────────────── */
.controls-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.unit-pills-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  max-width: 100%;
}

.unit-pill {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.unit-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.unit-pill.active {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

.unit-pill .count {
  font-size: 11px;
  opacity: 0.8;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}

.unit-pill.active .count {
  background: rgba(255, 255, 255, 0.25);
}

.view-and-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--primary);
}

.view-toggle {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* ─── Members Counter Bar ───────────────────────────────────────────── */
.results-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.results-count {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.results-count span {
  color: var(--primary);
  font-weight: 800;
}

/* ─── Grid View (Member Cards) ───────────────────────────────────────── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.member-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.member-avatar-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

.avatar.male {
  background: #dbeafe;
  color: #1d4ed8;
}

.avatar.female {
  background: #fce7f3;
  color: #be185d;
}

.name-details h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.name-details .gender-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.unit-tag {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Dynamic Unit Badge Colors */
.unit-tag.cubs {
  background: var(--unit-cubs-bg);
  color: var(--unit-cubs);
}
.unit-tag.boyscouts {
  background: var(--unit-boyscouts-bg);
  color: var(--unit-boyscouts);
}
.unit-tag.girlscouts {
  background: var(--unit-girlscouts-bg);
  color: var(--unit-girlscouts);
}
.unit-tag.beavers {
  background: var(--unit-beavers-bg);
  color: var(--unit-beavers);
}
.unit-tag.pioneers {
  background: var(--unit-pioneers-bg);
  color: var(--unit-pioneers);
}
.unit-tag.rovers {
  background: var(--unit-rovers-bg);
  color: var(--unit-rovers);
}

/* Card Info List */
.member-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item.full-width {
  grid-column: span 2;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.info-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  word-break: break-word;
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

.badges-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Card Footer Actions */
.member-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-record {
  flex: 1;
  background: #059669;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.btn-download-record:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

.btn-view-profile {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-view-profile:hover {
  background: #ffffff;
  color: var(--text-primary);
}

/* ─── Table View (Full Data Table) ───────────────────────────────────── */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13.5px;
}

.members-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.members-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.members-table tr:last-child td {
  border-bottom: none;
}

.members-table tr:hover td {
  background: #f8fafc;
}

.table-member-name {
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Empty & Loading States ─────────────────────────────────────────── */
.empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  margin: 20px 0;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 16px;
}

.loading-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: 240px;
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── Modal (Full Member Profile Dialog) ─────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.modal-backdrop.open .modal-window {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: var(--bg-subtle);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 13px;
}

.modal-info-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-info-table tr:last-child td {
  border-bottom: none;
}

.modal-info-table .key {
  font-weight: 700;
  color: var(--text-muted);
  width: 35%;
}

.modal-info-table .val {
  font-weight: 800;
  color: var(--text-primary);
}

.badges-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-tag-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ─── Toast Notifications ───────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: toastSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.success {
  background: #065f46;
  border-right: 4px solid #34d399;
}

.toast.error {
  background: #991b1b;
  border-right: 4px solid #f87171;
}

.toast.info {
  background: #1e1b4b;
  border-right: 4px solid #818cf8;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Spinner ────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Responsive Media Queries ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-container {
    padding: 10px 14px;
  }
  
  .brand-logo {
    height: 38px;
  }
  
  .brand-titles h1 {
    font-size: 17px;
  }
  
  .main-wrapper {
    padding: 16px 14px 40px;
  }
  
  .hero-summary {
    padding: 20px;
    border-radius: var(--radius-lg);
  }
  
  .hero-text h2 {
    font-size: 20px;
  }
  
  .hero-stat-card {
    min-width: 90px;
    padding: 10px 12px;
  }
  
  .hero-stat-card .num {
    font-size: 22px;
  }
  
  .members-grid {
    grid-template-columns: 1fr;
  }
  
  .controls-row-top,
  .controls-row-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  
  .toolbar-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .unit-pills-list {
    width: 100%;
  }
  
  .view-and-sort {
    justify-content: space-between;
  }
  
  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 16px;
  }
  
  .toast {
    min-width: auto;
  }
}
