:root {
  --primary: #961622;
  --primary-dark: #78121b;
  --primary-light: #b8222e;
  --primary-soft: #fff1f3;
  --primary-line: #eab9c1;
  --gold: #c9a44c;
  --dark: #241316;
  --sidebar-width: 280px;
  --mm-bg: #f8f4f5;
  --mm-card: #ffffff;
  --mm-border: #ead7db;
  --mm-sidebar-bg: #241316;
  --mm-sidebar-hover: rgba(255,255,255,0.08);
  --mm-sidebar-active: rgba(150,22,34,0.28);
  --font-primary: 'Oswald', sans-serif;
  --font-secondary: 'Rubik', sans-serif;
}

body {
  background: var(--mm-bg);
  font-family: var(--font-secondary);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
}

/* ===== LOGIN PAGE ===== */
#loginPage { display: none; }
#managerPage { display: none; }

#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #f8f4f5 0%, #f2e6e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#pageLoader .loader-content {
  text-align: center;
}
#pageLoader .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(150,22,34,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.mm-login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #f8f4f5 0%, #f2e6e9 100%);
}
.mm-login-card {
  width: 100%;
  max-width: 460px;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 60px rgba(84,12,25,0.12);
  background: #fff;
}
.mm-login-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}
.mm-login-header .mm-login-logo {
  width: min(100%, 190px);
  max-width: 190px;
  height: 72px;
  object-fit: contain;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 1.25rem;
}
.mm-login-header .mm-login-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(150,22,34,0.4);
}
.mm-login-header h4 {
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 1.5rem;
}
.mm-login-header p {
  opacity: 0.7;
  font-size: 0.85rem;
  margin: 0;
}
.mm-login-body {
  padding: 2rem 2rem 1.5rem;
}
.mm-login-body .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #555;
}
.mm-login-body .form-control {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}
.mm-login-body .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(150,22,34,0.12);
}
.mm-login-body .input-group-text {
  border: 2px solid #e9ecef;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #f8f9fa;
  color: #888;
}
.mm-login-body .input-group .form-control {
  border-left: none;
  border-radius: 0 10px 10px 0;
}
.mm-login-body .input-group .btn {
  border: 2px solid #e9ecef;
  border-left: none;
  border-radius: 0 10px 10px 0;
}
.mm-login-footer {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  background: #fafafa;
}

/* ===== LAYOUT ===== */
.mm-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.mm-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--mm-sidebar-bg);
  color: #fff;
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.mm-sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mm-sidebar-header .mm-sidebar-logo {
  display: block;
  width: 172px;
  height: 66px;
  object-fit: contain;
  background: rgba(255,255,255,0.96);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 1rem;
}
.mm-sidebar-header h5 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  color: #fff;
  letter-spacing: 0.5px;
}
.mm-sidebar-header small {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}
.mm-sidebar-user {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.mm-sidebar-user .mm-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}
.mm-sidebar-user .mm-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.mm-sidebar-user .mm-user-role {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.mm-sidebar-nav {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}
.mm-sidebar-nav .mm-nav-section {
  padding: 0.75rem 1.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.35);
}
.mm-sidebar-nav li a,
.mm-sidebar-nav li button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 1.25rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.mm-sidebar-nav li a:hover,
.mm-sidebar-nav li button:hover {
  background: var(--mm-sidebar-hover);
  color: #fff;
}
.mm-sidebar-nav li a.active,
.mm-sidebar-nav li button.active {
  background: var(--mm-sidebar-active);
  color: #fff;
  border-left-color: var(--gold);
  font-weight: 600;
}
.mm-sidebar-nav li a i,
.mm-sidebar-nav li button i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.mm-sidebar-nav .mm-nav-badge {
  margin-left: auto;
  background: #dc3545;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.mm-sidebar-nav .mm-nav-badge.hide { display: none; }
.mm-sidebar-bottom {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}
.mm-sidebar-bottom a,
.mm-sidebar-bottom button {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border: none;
  background: none;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: color 0.2s;
  width: 100%;
  text-align: left;
}
.mm-sidebar-bottom a:hover,
.mm-sidebar-bottom button:hover {
  color: #fff;
}

/* ===== MAIN CONTENT ===== */
.mm-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 2rem 3rem;
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
.mm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.mm-topbar h2 {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.75rem;
  margin: 0;
  color: #111;
}
.mm-topbar .mm-breadcrumb {
  font-size: 0.82rem;
  color: #888;
}
.mm-topbar .mm-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== CARDS ===== */
.mm-card {
  background: var(--mm-card);
  border-radius: 16px;
  border: 1px solid var(--mm-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.3s ease;
}
.mm-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.mm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mm-border);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.mm-card-header h5 {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== STAT CARDS ===== */
.mm-stat-card {
  background: var(--mm-card);
  border-radius: 14px;
  border: 1px solid var(--mm-border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}
.mm-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.mm-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.mm-stat-num {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.75rem;
  color: #111;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.mm-stat-label {
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SECTION VIEWS ===== */
.mm-section {
  display: none;
}
.mm-section.active {
  display: block;
  animation: mmFadeIn 0.3s ease;
}
@keyframes mmFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.mm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.mm-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 2px 10px rgba(150,22,34,0.25);
}
.mm-btn-primary:hover {
  box-shadow: 0 4px 20px rgba(150,22,34,0.35);
  transform: translateY(-1px);
  color: #fff;
}
.mm-btn-outline {
  background: transparent;
  color: #555;
  border: 2px solid #dee2e6;
}
.mm-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.mm-btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
  box-shadow: 0 2px 10px rgba(220,53,69,0.25);
}
.mm-btn-danger:hover {
  box-shadow: 0 4px 20px rgba(220,53,69,0.35);
  transform: translateY(-1px);
  color: #fff;
}
.mm-btn-sm {
  padding: 5px 14px;
  font-size: 0.75rem;
}
.mm-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border: none;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mm-btn-icon:hover {
  background: rgba(150,22,34,0.1);
  color: var(--primary);
}

/* ===== SEARCH BOX ===== */
.mm-search-box {
  background: var(--mm-card);
  padding: 1.75rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--mm-border);
  border-top: 4px solid var(--primary);
}
.mm-search-box .form-control,
.mm-search-box .form-select {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  transition: all 0.3s ease;
}
.mm-search-box .form-control:focus,
.mm-search-box .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(150,22,34,0.12);
}

/* ===== MEMBER CARDS ===== */
.member-card {
  background: var(--mm-card);
  padding: 1.5rem;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  border: 1px solid var(--mm-border);
  border-left: 4px solid transparent;
}
.member-card:hover {
  box-shadow: 0 6px 24px rgba(150,22,34,0.1);
  transform: translateY(-2px);
  border-left-color: var(--primary);
}
.member-card .member-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #e9ecef;
  flex-shrink: 0;
}
.member-card .member-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}
.member-card .member-avatar-placeholder.male {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}
.member-card .member-avatar-placeholder.female {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
.member-card .member-avatar-placeholder.other {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}
.member-card .member-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-card .member-actions .btn {
  width: 180px;
  text-align: left;
  justify-content: flex-start;
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* ===== STATUS BADGES ===== */
.mm-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===== MODALS ===== */
.modal-content {
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2) !important;
  border: none !important;
  font-family: var(--font-secondary);
}
.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1.5rem 2rem;
}
.modal-title {
  font-family: var(--font-primary);
  font-weight: 700;
}
.modal-body {
  padding: 1.75rem 2rem;
  font-family: var(--font-secondary);
}
.modal-body h6,
.modal-body .form-label {
  font-family: var(--font-secondary);
}
.modal-footer {
  border-top: 1px solid var(--mm-border);
  padding: 1rem 2rem;
}
.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 14px;
  transition: all 0.3s ease;
  font-family: var(--font-secondary);
}
.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(150,22,34,0.12);
}
.modal-body .nav-pills .nav-link {
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 18px;
  color: #555;
  transition: all 0.2s;
  font-family: var(--font-secondary);
}
.modal-body .nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}
.modal-body .alert,
.modal-body .card,
.modal-body .badge {
  font-family: var(--font-secondary);
}
.modal {
  z-index: 1050;
}
.modal-backdrop {
  z-index: 1040;
}

/* Override specific modal headers */
#confirmPaymentModal .modal-header { background: linear-gradient(135deg, #28a745, #218838); }
#deleteMemberModal .modal-header { background: linear-gradient(135deg, #dc3545, #c82333); }
#resetPasswordModal .modal-header { background: linear-gradient(135deg, #ffc107, #e0a800); color: #111; }
#viewMemberModal .modal-header { background: linear-gradient(135deg, #4facfe, #00f2fe); }

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(150,22,34,0.2);
  font-family: var(--font-secondary);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(150,22,34,0.3);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: 10px;
  font-weight: 600;
  font-family: var(--font-secondary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn, .btn-secondary, .btn-outline-secondary, .btn-danger, .btn-outline-danger,
.btn-success, .btn-outline-success, .btn-warning, .btn-outline-warning {
  font-family: var(--font-secondary);
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.badge.pulse, .mm-nav-badge.pulse {
  animation: pulse 2s infinite;
}

/* ===== MOBILE SIDEBAR ===== */
.mm-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(150,22,34,0.4);
  z-index: 200;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mm-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ===== ADMIN LOGOUT MODAL ===== */
#adminLogoutModal .modal-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* ===== EDIT MEMBER MODAL ===== */
#editMemberModal,
#editMemberModal * {
  font-style: normal;
}

/* ===== RESPONSIVE: LARGE TABLETS (992-1199px) ===== */
@media (max-width: 1199.98px) {
  .mm-sidebar { width: 240px; }
  .mm-main { margin-left: 240px; padding: 1.5rem 1.5rem 3rem; }
  .mm-stat-num { font-size: 1.5rem; }
  .mm-stat-label { font-size: 0.72rem; }
  .member-card .member-actions .btn { width: 160px; font-size: 0.78rem; padding: 6px 12px; }
}

/* ===== RESPONSIVE: TABLETS (768-991px) ===== */
@media (max-width: 991.98px) {
  .mm-sidebar {
    width: 280px;
    transform: translateX(-100%);
  }
  .mm-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.3);
  }
  .mm-main {
    margin-left: 0;
    padding: 1.25rem 1rem 5rem;
  }
  .mm-sidebar-toggle {
    display: flex !important;
  }
  .mm-sidebar-overlay.open {
    display: block;
  }
  .mm-topbar { margin-bottom: 1.25rem; }
  .mm-topbar h2 { font-size: 1.5rem; }
  .mm-card { padding: 1.25rem; }
  .mm-search-box { padding: 1.25rem; }
  .member-card { padding: 1.25rem; }
  .member-card .member-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .member-card .member-actions .btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
    justify-content: center;
  }
  .member-card .row > [class*="col-md-1"] { display: none; }
  .member-card .row > [class*="col-md-2"],
  .member-card .row > [class*="col-md-3"] {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 0.5rem;
  }
  .modal-body { padding: 1.25rem; }
  .modal-header { padding: 1.25rem 1.5rem; }
  .modal-footer { padding: 0.75rem 1.25rem; }
  .modal-body .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .modal-body .nav-pills::-webkit-scrollbar { display: none; }
  .modal-body .nav-pills .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 6px 14px;
  }
}

/* ===== RESPONSIVE: SMALL TABLETS & LARGE PHONES (576-767px) ===== */
@media (max-width: 767.98px) {
  .mm-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .mm-topbar h2 { font-size: 1.35rem; }
  .mm-topbar .d-flex { width: 100%; }
  .mm-topbar .mm-btn { flex: 1; justify-content: center; font-size: 0.78rem; padding: 6px 12px; }
  .mm-stat-card { padding: 1rem; }
  .mm-stat-icon { width: 40px; height: 40px; font-size: 1rem; margin-bottom: 0.5rem; border-radius: 8px; }
  .mm-stat-num { font-size: 1.35rem; }
  .mm-stat-label { font-size: 0.68rem; letter-spacing: 0; }
  .mm-search-box { padding: 1rem; }
  .mm-search-box .form-control,
  .mm-search-box .form-select { padding: 8px 12px; font-size: 0.85rem; }
  .member-card .member-actions { flex-direction: column; }
  .member-card .member-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .member-card .row > [class*="col-md"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .member-card .row > .text-end { text-align: left !important; }
  .modal-body .row > [class*="col-md-3"],
  .modal-body .row > [class*="col-md-4"],
  .modal-body .row > [class*="col-md-6"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .mm-login-card { margin: 0 0.75rem; border-radius: 16px; }
  .mm-login-header { padding: 2rem 1.5rem 1.5rem; }
  .mm-login-header .mm-login-icon { width: 64px; height: 64px; font-size: 1.5rem; }
  .mm-login-header h4 { font-size: 1.25rem; }
  .mm-login-body { padding: 1.5rem; }
  .mm-login-footer { padding: 0.75rem 1.5rem 1.25rem; }
  .modal-body .card .card-body .row > [class*="col-md"] {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 0.5rem;
  }
  #adminUsersList .member-card .row > [class*="col-md"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
  #adminUsersList .member-card .text-end { text-align: left !important; }
}

/* ===== RESPONSIVE: PHONES (< 576px) ===== */
@media (max-width: 575.98px) {
  .mm-main { padding: 1rem 0.75rem 5rem; }
  .mm-topbar h2 { font-size: 1.2rem; }
  .mm-breadcrumb { font-size: 0.75rem; }
  .mm-stat-card { padding: 0.75rem 0.5rem; border-radius: 10px; }
  .mm-stat-icon { width: 36px; height: 36px; font-size: 0.9rem; margin-bottom: 0.4rem; border-radius: 8px; }
  .mm-stat-num { font-size: 1.15rem; }
  .mm-stat-label { font-size: 0.62rem; }
  .mm-card { padding: 1rem; border-radius: 12px; margin-bottom: 1rem; }
  .mm-card-header { margin-bottom: 0.75rem; padding-bottom: 0.75rem; }
  .mm-card-header h5 { font-size: 0.95rem; }
  .mm-search-box { padding: 0.75rem; border-radius: 12px; margin-bottom: 1rem; }
  .member-card { padding: 1rem; border-radius: 10px; margin-bottom: 8px; }
  .member-card h5 { font-size: 0.9rem; }
  .mm-btn { padding: 6px 14px; font-size: 0.75rem; }
  .mm-btn-sm { padding: 4px 10px; font-size: 0.7rem; }
  .modal-dialog { margin: 0.5rem; }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-title { font-size: 1rem; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .modal-footer .btn { flex: 1 1 auto; min-width: 100px; font-size: 0.82rem; }
  .modal-body .nav-pills .nav-link { font-size: 0.72rem; padding: 5px 10px; }
  .modal-body .nav-pills .nav-link i { display: none; }
  .modal-body .card .card-body .row > [class*="col-md"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  #viewMemberModal .card-body .row .col-auto { display: none; }
  .mm-search-box .row > [class*="col-md"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .mm-sidebar-toggle {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    display: flex !important;
  }
  .modal-body .alert .row > [class*="col-md"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
  }
  .role-badge { font-size: 0.6rem; padding: 3px 10px; margin-left: 4px; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .mm-sidebar, .mm-sidebar-toggle, .mm-sidebar-overlay { display: none !important; }
  .mm-main { margin-left: 0 !important; padding: 0 !important; }
  .mm-card, .mm-search-box { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .member-card { break-inside: avoid; }
}

/* ===== WBI LIGHT TYPOGRAPHY OVERRIDES ===== */
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
strong,
label,
.mm-btn,
.mm-sidebar a,
.mm-sidebar button,
.mm-sidebar h5,
.mm-topbar h2,
.mm-card-header h5,
.mm-stat-num,
.mm-stat-label,
.member-card h5,
.role-badge,
.mc-tab,
.mc-stock-pill,
.modal-title,
.fw-bold {
  font-family: var(--font-secondary);
  font-weight: 300 !important;
}

.mm-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
