/* ================================================================
   GYM MANAGEMENT SYSTEM — RESPONSIVE STYLESHEET
   Theme: Industrial Dark with Neon Accent
   ================================================================ */

:root {
  --bg-dark:       #eef0f4;
  --bg-card:       #ffffff;
  --bg-card2:      #f3f4f8;
  --sidebar-w:     260px;
  --accent:        #4ADE80;
  --accent-dark:   #22C55E;
  --accent2:       #e74c3c;
  --accent3:       #2ecc71;
  --text-primary:  #1f2430;
  --text-muted:    #6b7280;
  --border:        #e1e4ea;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 20px rgba(15,23,42,0.08);
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 900px 600px at 8% 0%, rgba(74,222,128,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 800px 700px at 100% 100%, rgba(46,204,113,0.08) 0%, transparent 55%),
    linear-gradient(160deg, #f7f8fb 0%, #eef0f4 50%, #e7e9ee 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 14px;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #c3c7d1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8adba; }

/* ════════════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════════════ */
.app-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
  z-index: 900;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  line-height: 1;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.user-avatar { font-size: 32px; color: var(--accent); }
.user-name   { font-size: 13px; font-weight: 600; }
.user-role   { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { padding: 0 12px 20px; flex: 1; }

.nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 16px 8px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #4b5563;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.nav-item i { width: 18px; text-align: center; font-size: 15px; }

.nav-item:hover {
  background: var(--bg-card2);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(74,222,128,0.08));
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.content-wrapper { padding: 28px; min-height: 100%; }

/* ── Top Bar (sidebar toggle on mobile + user menu on all devices) ── */
.app-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.btn-ham {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

.mobile-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.user-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-toggle-btn i { font-size: 20px; color: var(--accent); }

.user-toggle-menu { min-width: 180px; }
.user-toggle-menu .dropdown-header { color: var(--accent); font-size: 11px; text-transform: uppercase; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 800;
  backdrop-filter: blur(2px);
}

/* ════════════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.page-title span { color: var(--accent); }

.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.stat-card.green::before  { background: var(--accent3); }
.stat-card.red::before    { background: var(--accent2); }
.stat-card.blue::before   { background: #3b82f6; }
.stat-card.purple::before { background: #8b5cf6; }

.stat-card:hover { transform: translateY(-3px); border-color: rgba(74,222,128,0.3); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(74,222,128,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.stat-icon.green  { background: rgba(46,204,113,0.12); color: var(--accent3); }
.stat-icon.red    { background: rgba(231,76,60,0.12);  color: var(--accent2); }
.stat-icon.blue   { background: rgba(59,130,246,0.12); color: #3b82f6; }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ════════════════════════════════════════════════════════════
   CARDS & PANELS
   ════════════════════════════════════════════════════════════ */
.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.card-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.card-panel-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.card-panel-body { padding: 20px; }

/* ════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.gym-table {
  width: 100%;
  min-width: 720px; /* keeps columns readable — table scrolls horizontally on narrow screens instead of squishing */
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-responsive {
  -webkit-overflow-scrolling: touch; /* smooth momentum scroll on touch devices */
}

.gym-table thead th {
  background: var(--bg-card2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.gym-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.gym-table tbody tr:hover { background: rgba(15,23,42,0.03); }

.gym-table td {
  padding: 8px 12px;
  vertical-align: middle;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   BADGES & PILLS
   ════════════════════════════════════════════════════════════ */
.badge-active   { background: rgba(46,204,113,0.15); color: #2ecc71; border-radius: 20px; padding: 3px 10px; font-size: 11px; }
.badge-inactive { background: rgba(231,76,60,0.15);  color: #e74c3c; border-radius: 20px; padding: 3px 10px; font-size: 11px; }
.badge-warning  { background: rgba(74,222,128,0.15); color: #4ADE80; border-radius: 20px; padding: 3px 10px; font-size: 11px; }
.badge-info     { background: rgba(59,130,246,0.15); color: #3b82f6; border-radius: 20px; padding: 3px 10px; font-size: 11px; }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */
.btn-gym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-gym-primary {
  background: var(--accent);
  color: #0d0f14;
}
.btn-gym-primary:hover { background: #22C55E; color: #0d0f14; transform: translateY(-1px); }

.btn-gym-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-gym-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-gym-danger {
  background: rgba(231,76,60,0.15);
  color: var(--accent2);
  border: 1px solid rgba(231,76,60,0.3);
}
.btn-gym-danger:hover { background: var(--accent2); color: white; }

.btn-gym-sm { padding: 5px 12px; font-size: 12px; }

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */
.form-gym-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.form-gym-control {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: border-color var(--transition);
  appearance: none;
}

.form-gym-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.form-gym-control::placeholder { color: var(--text-muted); }

/* Client-side validation state */
.form-gym-control.is-invalid { border-color: var(--accent2) !important; }
.field-error-msg { display:block; color: var(--accent2); font-size: 11.5px; margin-top: 4px; }

/* Date inputs — always show a clearly visible calendar icon on the dark
   theme (the browser's default icon is dark and disappears on a dark
   background), and make the whole field clickable to open the calendar,
   not just the tiny icon (see the click handler in gym.js). */
input[type="date"] {
  color-scheme: light;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(48%) sepia(94%) saturate(1800%) hue-rotate(330deg) brightness(95%) contrast(101%);
  cursor: pointer;
  opacity: 1;
}

select.form-gym-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

/* ════════════════════════════════════════════════════════════
   SEARCH BAR
   ════════════════════════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-input-wrap input {
  padding-left: 36px;
}

/* ════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════ */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
}

.modal-header {
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 20px;
}

.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.modal-body  { padding: 24px; }
.modal-footer{ border-top: 1px solid var(--border); padding: 14px 20px; }

.btn-close { opacity: 0.6; }
.btn-close:hover { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   MEMBER CARD GRID (Mobile-Friendly)
   ════════════════════════════════════════════════════════════ */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform var(--transition), border-color var(--transition);
}

.member-card:hover { transform: translateY(-3px); border-color: rgba(74,222,128,0.3); }

.member-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #22C55E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #0d0f14;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD QUICK ACTIONS
   ════════════════════════════════════════════════════════════ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.quick-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
}

.quick-action:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.quick-action i { font-size: 24px; display: block; margin-bottom: 8px; color: var(--accent); }
.quick-action span { font-size: 12px; font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  padding: 20px;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(74,222,128,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(231,76,60,0.08) 0%, transparent 60%);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo i { font-size: 48px; color: var(--accent); }
.login-logo h1 { font-family: var(--font-display); font-size: 32px; font-weight: 700; margin-top: 8px; }
.login-logo p { font-size: 13px; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════ */
.gym-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
  margin-bottom: 16px;
}

.gym-alert.success { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.3); color: #2ecc71; }
.gym-alert.error   { background: rgba(231,76,60,0.12);  border: 1px solid rgba(231,76,60,0.3);  color: #e74c3c; }
.gym-alert.info    { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #3b82f6; }

/* ── Attendance quick check-in: member search dropdown ──────────── */
.checkin-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 1080; /* above the Bootstrap modal (1055) so it isn't clipped/hidden */
}

.checkin-results:empty { box-shadow: none; }

/* Static variant: an always-open checklist under the search box, instead of
   a floating autocomplete overlay — ticking a box must never close the list. */
.checkin-results-static {
  position: static;
  margin-top: 8px;
  max-height: 260px;
  box-shadow: none;
}

.checkin-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-top: none;
  cursor: pointer;
  background: var(--bg-card);
}

.checkin-result-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.checkin-result-item:first-child { border-top: 1px solid var(--border); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.checkin-result-item:last-child  { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.checkin-result-item:hover { background: var(--bg-card2); }

.checkin-result-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(74,222,128,0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

/* min-width:0 is the fix — without it, a flex child won't shrink below its
   text's natural width, so a long name pushes past the rounded border and
   visually spills outside the dropdown instead of staying inside it. */
.checkin-result-info { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.checkin-result-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkin-result-sub  { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkin-result-empty { padding: 10px; font-size: 13px; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); }

.checkin-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-height: 40px;
  max-height: 130px;   /* caps growth once several members are picked — scrolls */
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
}

.checkin-chip-empty { font-size: 13px; color: var(--text-muted); padding: 4px; }

.checkin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.checkin-chip button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 2px;
}

.checkin-chip button:hover { color: var(--accent2); }

/* ════════════════════════════════════════════════════════════
   LOADER
   ════════════════════════════════════════════════════════════ */
.loader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}

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

/* ════════════════════════════════════════════════════════════
   PROGRESS BARS
   ════════════════════════════════════════════════════════════ */
.progress-gym {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-gym-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22C55E);
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* ════════════════════════════════════════════════════════════
   TOOLTIP PILL (subscription days)
   ════════════════════════════════════════════════════════════ */
.days-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.days-ok      { background: rgba(46,204,113,0.12); color: var(--accent3); }
.days-warn    { background: rgba(74,222,128,0.12); color: var(--accent); }
.days-expired { background: rgba(231,76,60,0.12);  color: var(--accent2); }

/* ════════════════════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════════════════════ */
.text-accent  { color: var(--accent); }
.text-muted2  { color: var(--text-muted); }
.fw-display   { font-family: var(--font-display); }
.gap-2        { gap: 8px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 992px) ──────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.open { display: block; }

  .app-wrapper { flex-direction: column; height: auto; overflow: visible; }

  .main-content { overflow: visible; }

  .content-wrapper { padding: 20px 16px; }

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

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

/* ── Mobile (≤ 576px) ──────────────────────────────────────── */
@media (max-width: 576px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .stat-card { padding: 14px; }

  .stat-icon { width: 40px; height: 40px; font-size: 17px; }

  .stat-value { font-size: 22px; }

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

  .page-header { flex-direction: column; align-items: flex-start; }

  .page-title { font-size: 22px; }

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

  .search-bar { flex-direction: column; align-items: stretch; }

  .search-input-wrap { min-width: auto; }

  .card-panel-header { flex-direction: column; align-items: flex-start; }

  .login-card { padding: 28px 20px; }
}
