: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%);
}

#loginPage.mm-login-gate{display:none;grid-template-columns:minmax(320px,.9fr) minmax(340px,480px);gap:28px;align-items:center;width:min(1120px,calc(100% - 32px));margin:auto;padding:38px 0;background:transparent;text-align:left}.mm-login-intro{position:relative;overflow:hidden;min-height:620px;padding:34px;border-radius:18px;background:linear-gradient(135deg,rgba(7,27,56,.9),rgba(120,18,27,.93)),url('/img/hero_images/WBi_Tournament_Blogs.jpg') center/cover;color:#fff;box-shadow:0 24px 70px rgba(15,23,42,.12)}.mm-login-home{display:inline-flex;gap:7px;margin-bottom:46px;padding:7px 11px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.08);color:#fff;text-decoration:none;font-size:11.5px}.mm-login-brand{width:170px;margin-bottom:44px}.mm-login-brand img{width:100%}.mm-login-kicker{display:inline-flex;margin-bottom:12px;padding:5px 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:11.5px}.mm-login-intro h1{margin:0;font:500 clamp(2rem,4vw,3.2rem)/1.08 'Rubik',sans-serif}.mm-login-intro p{margin:16px 0 0;color:rgba(255,255,255,.84);font-size:14px;line-height:1.7}.mm-login-highlights{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:36px}.mm-login-highlights div{min-height:86px;padding:14px;border:1px solid rgba(255,255,255,.16);border-radius:12px;background:rgba(255,255,255,.09)}.mm-login-highlights i{display:block;margin-bottom:10px;font-size:18px}.mm-login-highlights span{font-size:12px}.mm-login-form-column{width:100%}.mm-login-form-column .mm-login-card{max-width:none;border-radius:14px}.mm-login-form-column .mm-login-header{background:linear-gradient(135deg,var(--primary),var(--primary-dark));border-bottom:0}@media(max-width:991.98px){#loginPage.mm-login-gate{grid-template-columns:1fr;max-width:560px;min-height:auto;padding:24px 0}.mm-login-intro{min-height:auto;padding:26px}.mm-login-home{margin-bottom:26px}.mm-login-brand{width:132px;margin-bottom:28px}}@media(max-width:575.98px){#loginPage.mm-login-gate{width:calc(100% - 20px);gap:14px}.mm-login-intro{padding:22px}.mm-login-highlights{grid-template-columns:1fr}}
.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;
  top: 14px;
  left: 14px;
  width: auto;
  min-width: 96px;
  height: 38px;
  gap: 0.45rem;
  padding: 0 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  font-size: 0.76rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(150,22,34,0.4);
  z-index: 1400;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mm-sidebar-toggle i { font-size: 1rem; }
.mm-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1290;
}
body:not(.mm-manager-active) .mm-sidebar-toggle,
body:not(.mm-manager-active) .mm-sidebar-overlay {
  display: none !important;
}

/* ===== 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%);
    z-index: 1300;
  }
  .mm-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.3);
  }
  .mm-main {
    margin-left: 0;
    padding: 4.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 {
    top: 12px;
    left: 12px;
    min-width: 88px;
    height: 48px;
    font-size: 0.74rem;
    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;
}

/* ===== OUR BADMINTON MEMBER OPERATIONS REFRESH ===== */
:root {
  --primary: #a41024;
  --primary-dark: #7c0c1b;
  --primary-light: #c1293c;
  --gold: #d4af52;
  --dark: #071b38;
  --sidebar-width: 272px;
  --mm-bg: #f4f7fb;
  --mm-card: #ffffff;
  --mm-border: #dfe7f1;
  --mm-ink: #071b3a;
  --mm-muted: #5e6d83;
  --mm-sidebar-bg: #06162e;
  --mm-sidebar-hover: rgba(255, 255, 255, 0.07);
  --mm-sidebar-active: linear-gradient(135deg, rgba(164, 16, 36, 0.78), rgba(18, 72, 145, 0.54));
  --font-primary: 'Inter', system-ui, sans-serif;
  --font-secondary: 'Inter', system-ui, sans-serif;
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(164, 16, 36, 0.065), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(15, 91, 215, 0.075), transparent 30rem),
    var(--mm-bg);
  color: var(--mm-ink);
  font-family: var(--font-secondary);
}

#pageLoader {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 12%, rgba(164, 16, 36, 0.08), transparent 26rem),
    radial-gradient(circle at 84% 18%, rgba(15, 91, 215, 0.08), transparent 28rem),
    #f6f8fc;
}

#pageLoader .loader-content {
  width: min(420px, calc(100% - 32px));
  padding: 30px;
  border: 1px solid rgba(7, 27, 58, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 64px rgba(7, 27, 58, 0.12);
}

.mm-loader-logo {
  display: block;
  width: min(244px, 100%);
  height: 58px;
  margin: 0 auto 22px;
  object-fit: contain;
}

#pageLoader .spinner {
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-width: 3px;
}

#pageLoader p {
  margin: 0;
  color: var(--mm-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

#pageLoader small {
  display: block;
  margin-top: 5px;
  color: var(--mm-muted);
  font-size: 0.7rem;
}

.mm-login-brand {
  width: 222px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.mm-login-brand img {
  display: block;
  height: 48px;
  object-fit: contain;
}

.mm-login-header .mm-login-logo {
  width: min(100%, 230px);
  max-width: 230px;
  height: 60px;
  padding: 8px 12px;
}

.mm-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
}

.mm-sidebar {
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 16% 0%, rgba(164, 16, 36, 0.28), transparent 34%),
    linear-gradient(180deg, #06162e 0%, #0a2142 54%, #160b24 100%);
  box-shadow: 12px 0 34px rgba(7, 27, 58, 0.14);
}

body.agsa-attribution-topbar-enabled .mm-sidebar {
  top: 72px;
  min-height: 0;
}

.mm-sidebar-header {
  padding: 10px 10px 14px;
  border-bottom: 0;
}

.mm-sidebar-header .mm-sidebar-logo {
  width: 218px;
  height: 54px;
  margin-bottom: 13px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.mm-sidebar-kicker {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.47);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mm-sidebar-header h5 {
  margin: 0 0 3px;
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

.mm-sidebar-header small {
  color: rgba(255, 255, 255, 0.56) !important;
  font-size: 0.62rem !important;
}

.mm-sidebar-user {
  margin: 0 3px 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
}

.mm-sidebar-user .mm-user-avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: linear-gradient(145deg, #b51c32, #7c0c1b);
  box-shadow: 0 8px 18px rgba(164, 16, 36, 0.24);
}

.mm-sidebar-user .mm-user-name {
  font-size: 0.72rem;
  font-weight: 500;
}

.mm-sidebar-user .mm-user-role {
  margin-top: 2px;
  color: #f1d98e !important;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.mm-sidebar-nav {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 0 8px;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  scrollbar-width: thin;
}

.mm-sidebar-nav .mm-nav-section {
  padding: 12px 11px 5px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.mm-sidebar-nav li a,
.mm-sidebar-nav li button {
  width: 100%;
  min-height: 38px;
  margin: 2px 0;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem !important;
  font-weight: 400 !important;
}

.mm-sidebar-nav li a:hover,
.mm-sidebar-nav li button:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--mm-sidebar-hover);
}

.mm-sidebar-nav li a.active,
.mm-sidebar-nav li button.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--mm-sidebar-active);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.14);
  color: #ffffff;
  font-weight: 500 !important;
}

.mm-sidebar-nav li a i,
.mm-sidebar-nav li button i {
  width: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.mm-sidebar-nav li button.active i,
.mm-sidebar-nav li a.active i {
  color: #f1d98e;
}

.mm-sidebar-nav .mm-nav-badge {
  padding: 2px 7px;
  background: #d83a4d;
  font-size: 0.52rem;
  font-weight: 600;
  box-shadow: 0 5px 12px rgba(216, 58, 77, 0.24);
}

.mm-sidebar-bottom {
  margin: 7px 3px 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.mm-sidebar-bottom button {
  min-height: 34px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.66rem !important;
}

.mm-main {
  margin-left: var(--sidebar-width);
  padding: 22px 24px 42px;
  background: transparent;
}

.mm-workspace-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 21px 23px;
  border: 1px solid rgba(7, 27, 58, 0.09);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
  box-shadow: 0 16px 38px rgba(7, 27, 58, 0.075);
}

.mm-workspace-header::after {
  position: absolute;
  z-index: -1;
  right: -65px;
  bottom: -100px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 91, 215, 0.12), rgba(15, 91, 215, 0));
  content: '';
}

.mm-workspace-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mm-workspace-copy h1 {
  margin: 0;
  color: var(--mm-ink);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.12;
}

.mm-workspace-copy p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--mm-muted) !important;
  font-size: 0.73rem !important;
  line-height: 1.55;
}

.mm-workspace-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-secure-status,
.mm-suite-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
}

.mm-secure-status {
  border: 1px solid #cce6da;
  background: #eef9f4;
  color: #17633e;
}

.mm-suite-link {
  border: 1px solid #d6e1f1;
  background: #ffffff;
  color: #0f4a9c;
  text-decoration: none;
  box-shadow: 0 7px 16px rgba(7, 27, 58, 0.06);
}

.mm-suite-link:hover {
  border-color: #9bb9e4;
  color: #0b3b7e;
  transform: translateY(-1px);
}

.mm-section > iframe {
  display: block;
  min-height: calc(100vh - 176px) !important;
  min-height: calc(100dvh - 176px) !important;
  border: 1px solid var(--mm-border) !important;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(7, 27, 58, 0.07);
}

.mm-card,
.mm-search-box,
.mm-stat-card,
.member-card {
  border-color: var(--mm-border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(7, 27, 58, 0.065);
}

.mm-card:hover,
.mm-stat-card:hover,
.member-card:hover {
  box-shadow: 0 18px 42px rgba(7, 27, 58, 0.1);
}

.mm-btn,
.btn-primary,
.btn-outline-primary {
  border-radius: 10px;
}

.mm-search-box .form-control,
.mm-search-box .form-select,
.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea {
  border-width: 1px;
  border-color: #d9e1ec;
  border-radius: 9px;
}

@media (max-width: 1199.98px) {
  :root { --sidebar-width: 252px; }
  .mm-sidebar-header .mm-sidebar-logo { width: 198px; }
  .mm-main { margin-left: var(--sidebar-width); padding: 18px 18px 36px; }
}

@media (max-width: 991.98px) {
  .mm-sidebar {
    width: 280px;
  }

  body.agsa-attribution-topbar-enabled .mm-sidebar {
    top: 70px;
  }

  .mm-main {
    margin-left: 0;
    padding: 68px 14px 36px;
  }

  .mm-workspace-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px;
  }

  .mm-workspace-actions {
    justify-content: flex-start;
  }

  body.agsa-attribution-topbar-enabled .mm-sidebar-toggle {
    top: 82px;
  }
}

@media (max-width: 575.98px) {
  .mm-main {
    padding: 68px 10px 28px;
  }

  .mm-workspace-header {
    margin-bottom: 12px;
    padding: 17px;
    border-radius: 15px;
  }

  .mm-workspace-actions,
  .mm-secure-status,
  .mm-suite-link {
    width: 100%;
  }

  .mm-secure-status,
  .mm-suite-link {
    justify-content: center;
  }

  .mm-section > iframe {
    min-height: calc(100dvh - 220px) !important;
    border-radius: 14px;
  }
}
