/* ============================================================================
   Bhatti Gym branding overlay (bhatti branch only)
   Loaded on top of style.css. Keeps per-gym branding isolated from core CSS.
   Brand colors: yellow #F5C518, ink #0D0D0D.
   Direction: athletic / bold — condensed display type, black + chrome-yellow,
   hairline borders instead of shadows.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Hanken+Grotesque:wght@400;500;600;700;800&display=swap');

:root {
  /* Accent colour + fonts are per-gym and overridable from the dashboard
     (branding.js injects overrides). These defaults reproduce the original
     Bhatti gold + type EXACTLY, so nothing changes unless an owner picks new
     values. --brand-accent-rgb feeds the rgba() accent tints below. */
  --brand-accent: #f5c518;
  --brand-accent-rgb: 245, 197, 24;
  --brand-font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --brand-font-body: 'Hanken Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --brand-yellow: var(--brand-accent);
  --brand-ink: #0d0d0d;
}

/* ---- 0.6s loading splash ------------------------------------------------- */
#brand-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #1c1c1c 0%, #0d0d0d 70%);
  transition: opacity .4s ease;
}
#brand-splash.brand-hide { opacity: 0; pointer-events: none; }
#brand-splash .brand-splash-logo {
  width: 170px;
  height: 170px;
  animation: brandPop .6s cubic-bezier(.2, .8, .3, 1.2) both;
  filter: drop-shadow(0 8px 28px rgba(var(--brand-accent-rgb), .35));
}
@keyframes brandPop {
  0%   { transform: scale(.55); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #brand-splash .brand-splash-logo { animation: none; }
}

/* ---- Login page logo + title -------------------------------------------- */
.brand-login-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  margin-bottom: .25rem;
}
.brand-login-logo {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .18));
}
.brand-login-head h1 {
  color: var(--brand-ink);
  letter-spacing: .5px;
  margin: 0;
}

/* ---- Sidebar (dashboard) top-left logo ----------------------------------- */
.sidebar-header.brand-sidebar-header {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.brand-sidebar-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}
.sidebar-header.brand-sidebar-header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: .3px;
}

/* ---- Contact + social footer (login page) -------------------------------- */
.brand-footer {
  max-width: 760px;
  margin: 1.75rem auto 1rem;
  padding: 1.25rem 1rem 0;
  border-top: 1px solid rgba(0, 0, 0, .08);
  text-align: center;
  color: var(--text-secondary, #5b6b60);
  font-size: .9rem;
}
.brand-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.4rem;
  margin-bottom: 1rem;
}
.brand-contact a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.brand-contact a:hover { color: var(--brand-ink); }
.brand-contact svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }

.brand-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.brand-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.brand-social a:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.brand-social svg { width: 20px; height: 20px; fill: #fff; }
/* brand-tinted hovers */
.brand-social .s-yt:hover     { background: #ff0000; }
.brand-social .s-wa:hover     { background: #25d366; }
.brand-social .s-fb:hover     { background: #1877f2; }
.brand-social .s-ig:hover     { background: #e1306c; }
.brand-social .s-sc:hover     { background: #fffc00; }
.brand-social .s-sc:hover svg { fill: #0d0d0d; }
.brand-social .s-tt:hover     { background: #000; }

.brand-copy { margin: .25rem 0 0; font-size: .8rem; opacity: .8; }

/* ============================================================================
   DARK THEME — Bhatti Gym: black + gold + white. (PRODUCTION / reviewer-fixed)
   Replaces the previous light "athletic black" theme section. Loaded LAST in
   brand.css, so it re-points the shared :root tokens to dark tiers AND
   overrides every hardcoded light surface from the base stylesheets
   (style.css, admin-dashboard.css, member-profile.css, pwa.css) plus the
   structural branding rules above (login head, footer, socials) that assumed a
   light bg.

   ELEVATION TIERS
     body / app bg ............ #0a0a0a
     base surface / page ...... #0d0d0d
     card / panel / modal ..... #161616
     raised / inputs / hover .. #1f1f1f  (hover lift #242424)
     hairline border .......... #2a2a2a
     gold accent border ....... rgba(var(--brand-accent-rgb),.45)
   TEXT  primary #ededed · secondary #a8a8a8 · muted #909090 · gold #f5c518
   Gold is the 10% signal color — buttons, active nav, accents, headings,
   focus rings, table-head text, key stat values. Surfaces stay charcoal.
   ============================================================================ */

/* ---- 1. Re-point shared tokens to dark tiers ----------------------------- */
:root {
  --primary-color: #0d0d0d;
  --primary-gradient: linear-gradient(135deg, #1f1f1f 0%, #0d0d0d 100%);
  --secondary-color: #161616;
  --secondary-gradient: linear-gradient(135deg, #1f1f1f 0%, #161616 100%);

  --bg-color: #0d0d0d;          /* page canvas */
  --bg-secondary: #161616;      /* cards / tables / panels */
  --bg-tertiary: #1f1f1f;       /* raised / paper blocks */

  --text-color: #ededed;
  --text-primary: #ededed;      /* member-profile.css consumer */
  --text-secondary: #c8c8c8;    /* brightened from #a8a8a8 — small grey labels were hard to read on black */
  --text-muted: #aeaeae;        /* brightened from #909090 — ~7:1 on #0d0d0d */

  --border-color: #2a2a2a;      /* neutral hairline on dark */

  /* Re-point status tokens so .simple-note / .warning-note / .activity-badge
     text (consumed from these vars) is legible on dark tints, not dark-on-dark */
  --success-color: #4ade80;
  --warning-color: #fbbf24;
  --info-color: #5eb0e8;

  --shadow: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .60);
  --shadow-glow: 0 0 0 4px rgba(var(--brand-accent-rgb), .35);

  --brand-gold: var(--brand-accent);
  --gold-grad: linear-gradient(180deg, #f8d23c 0%, #efb70c 100%);
}

/* ---- Global Viewport & Surface Polish ----------------------------- */
html {
  font-size: 14.5px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: var(--brand-font-body);
  background: #09090b !important;
  color: var(--text-color);
  width: 100% !important;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
html body { background: #09090b !important; }

.brand-login-head h1,
.login-box h1,
.sidebar-header.brand-sidebar-header h2,
.sidebar-header h2,
#pageTitle,
.content-header h1,
.dashboard-recent h2,
.dashboard-intro-copy h2,
.modal-header h2 {
  font-family: var(--brand-font-display);
  font-weight: 400;
  letter-spacing: .04em;
  -webkit-text-fill-color: currentColor;   /* cancel any gradient text-clip */
  background: none;
}
/* Display headings must be LIGHT/GOLD on dark — never --brand-ink (vanishes) */
.brand-login-head h1, .login-box h1 { font-size: 2.15rem; line-height: 1.1; color: #ffffff; }
.content-header h1, #pageTitle { font-size: 2rem; color: #ffffff; }
.sidebar-header.brand-sidebar-header h2, .sidebar-header h2 { font-size: 1.5rem; color: #ffffff; }
.dashboard-recent h2, .dashboard-intro-copy h2, .modal-header h2 { color: #ededed; }

::selection { background: var(--brand-yellow); color: var(--brand-ink); }

/* ============================================================================
   2. LOGIN PAGE & VIEWPORT CONTAINMENT (Compact 90% Fit)
   ============================================================================ */
body:has(.login-container) {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  justify-content: center;
  align-items: center;
}

.login-container {
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem 0.65rem;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 12%, rgba(var(--brand-accent-rgb), .12), transparent 42%),
    radial-gradient(circle at 88% 86%, rgba(var(--brand-accent-rgb), .08), transparent 44%),
    #0d0d0d;
  animation: none;
}
.login-container::before { display: none; }

.login-box, .login-box-wide {
  background: #161616;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand-gold);
  box-shadow: var(--shadow-lg);
  padding: 1.35rem 1.75rem;
  max-width: 840px;
  width: 100%;
  margin: 0;
}

.brand-login-logo {
  max-height: 52px;
  width: auto;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.login-access-card {
  background: linear-gradient(180deg, #181818 0%, #141414 100%);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: none;
  padding: 0.75rem;
}

.access-intro {
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--brand-gold);
  border-radius: 8px;
  color: var(--text-secondary);
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}
/* Defensively pin paragraph text so no inherited dark --brand-ink leaks in */
.access-intro, .access-intro p { color: var(--text-secondary); margin: 0; }
.access-intro strong { color: var(--brand-gold); display: block; margin-bottom: 0.15rem; }

.login-split-layout {
  display: flex;
  gap: 0.85rem;
  align-items: stretch;
}

.login-form-panel {
  background: #161616;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: none;
  padding: 0.85rem 1.1rem;
  flex: 1;
}
.login-form-panel h2 {
  font-size: 1.1rem;
  margin-top: 0.2rem;
  margin-bottom: 0.25rem;
}
.login-panel-text {
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 0.55rem;
}
.form-group label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  color: var(--text-secondary);
}
.form-group input {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
.form-hint {
  font-size: 0.74rem;
  margin-top: 0.2rem;
  color: var(--text-muted);
}
.login-form-panel .btn {
  margin-top: 0.5rem;
  padding: 0.52rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.login-subtitle, .login-panel-text, .form-hint { color: var(--text-secondary); }
.login-form-panel label, .form-group label { color: var(--text-secondary); }

/* OR divider chip visible on dark */
.login-divider span {
  background: #161616;
  color: var(--text-muted);
  box-shadow: none;
}
.login-divider::before, .login-divider::after { border-color: var(--border-color); }

/* ---- Badges -------------------------------------------------------------- */
/* Staff badge: lift off the #161616 card to #1f1f1f so it reads as a real pill */
.login-panel-badge {
  background: #1f1f1f;
  color: var(--brand-yellow);
  border: 1px solid rgba(var(--brand-accent-rgb), .45);
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.login-panel-badge.member-badge,
.member-badge { background: var(--brand-yellow); color: var(--brand-ink); border-color: transparent; }

/* ---- Segmented Login Tabs (Mobile / Narrow Viewports) ------------------- */
.login-tabs-bar {
  display: none;
  margin-bottom: 0.75rem;
  background: #111111;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.login-tab-btn {
  flex: 1;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.login-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.login-tab-btn.active {
  background: var(--brand-gold);
  color: #0d0d0d;
  box-shadow: 0 2px 8px rgba(245, 197, 24, 0.35);
}

.login-tab-switch-hint {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-color);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-link-switch {
  background: none;
  border: none;
  color: var(--brand-gold);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0.25rem;
  text-decoration: underline;
}

/* Desktop Compact 90% Containment (No-Scroll Viewport Fit) */
@media (min-width: 769px) {
  body:has(.login-container) {
    height: 100vh !important;
    overflow: hidden !important;
  }
  .login-container {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    padding: 0.5rem 1rem !important;
  }
  .login-box, .login-box-wide {
    transform: scale(0.92);
    transform-origin: center center;
    max-width: 860px;
    margin: 0 auto;
  }
  .login-tabs-bar {
    display: none !important;
  }
  .login-tab-switch-hint {
    display: none !important;
  }
  .login-split-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.85rem !important;
    align-items: stretch !important;
  }
  .login-form-panel {
    display: block !important;
    flex: 1 !important;
  }
  .login-divider {
    display: flex !important;
  }
}

/* ============================================================================
   MOBILE RESPONSIVENESS FOR LOGIN VIEW (<= 768px)
   Eliminates horizontal overflow blowout, sets 100% width, stacks forms cleanly
   ============================================================================ */
@media (max-width: 768px) {
  .login-tabs-bar {
    display: flex !important;
  }
  .login-tab-switch-hint {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
  }
  .login-divider {
    display: none !important;
  }

  html, body {
    overflow-x: hidden !important;
  }

  body:has(.login-container) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    min-height: 100dvh !important;
    height: auto !important;
    padding: 0 !important;
  }

  .login-container {
    min-height: 100dvh !important;
    height: auto !important;
    padding: 0.85rem 0.65rem 1.5rem !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .login-box,
  .login-box.login-box-wide {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1.15rem 0.85rem !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .brand-login-head h1,
  .login-box h1 {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.35rem !important;
    word-break: break-word !important;
  }

  .login-subtitle {
    font-size: 0.8rem !important;
    margin: 0.2rem 0 0.65rem !important;
    line-height: 1.35 !important;
  }

  .login-access-card {
    padding: 0.65rem 0.55rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .access-intro {
    padding: 0.45rem 0.65rem !important;
    margin-bottom: 0.65rem !important;
    font-size: 0.8rem !important;
  }

  .login-split-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
    box-sizing: border-box !important;
  }

  .login-form-panel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0.95rem 0.85rem !important;
    box-sizing: border-box !important;
  }

  .login-form-panel h2 {
    font-size: 1.05rem !important;
    margin-top: 0.2rem !important;
    margin-bottom: 0.25rem !important;
  }

  .login-panel-text {
    font-size: 0.78rem !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.35 !important;
  }

  .form-group {
    margin-bottom: 0.55rem !important;
    width: 100% !important;
  }

  .form-group input {
    font-size: 16px !important; /* Prevents auto-zoom in iOS/Android browsers */
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.6rem 0.75rem !important;
  }

  .login-divider {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0.2rem 0 !important;
    position: relative !important;
  }

  .login-divider::before {
    position: absolute !important;
    content: '' !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 1px !important;
    transform: translateY(-50%) !important;
    background: linear-gradient(90deg, transparent 0%, var(--border-color) 15%, var(--border-color) 85%, transparent 100%) !important;
  }

  .login-divider span {
    position: relative !important;
    z-index: 2 !important;
    background: #161616 !important;
    padding: 0.15rem 0.75rem !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
  }

  .login-form-panel .btn {
    width: 100% !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
  }

  .member-signup-cta {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
  }

  .member-signup-cta .btn {
    width: 100% !important;
  }

  .login-access-card > div[style*='margin-top'] {
    margin-top: 1rem !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .login-access-card > div[style*='margin-top'] a.btn {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .brand-footer {
    padding: 0.75rem 0 !important;
  }
}

/* ============================================================================
   3. INPUTS — dark field, light text, gold focus ring
   ============================================================================ */
.form-group input, .form-group select, .form-group textarea,
.search-input, .lookup-input, .form-control,
.dashboard-date-range input {
  background: #1a1a1a;
  color: var(--text-color);
  border: 2px solid #2e2e2e;
  border-radius: 8px;
}
.form-group input::placeholder, .form-group textarea::placeholder,
.search-input::placeholder, .lookup-input::placeholder,
.form-control::placeholder { color: #8a8a8a; }   /* bumped from #6f6f6f → ≥3:1 on #1a1a1a */
/* All selects + native option popups dark (covers bare/un-classed selects too) */
select, select option, optgroup,
.form-group select option, .form-control option {
  background: #1a1a1a; color: var(--text-color);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.search-input:focus, .lookup-input:focus, .form-control:focus,
.dashboard-date-range input:focus {
  background: #1f1f1f;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(var(--brand-accent-rgb), .45);
  transform: none;
}
.search-input { box-shadow: none; }

/* Invert date/time picker calendar icons for dark mode */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
  opacity: 0.85;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Autofill (Chrome/Edge) — kill the UA light fill on the login card & lookups */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.lookup-input:-webkit-autofill,
.search-input:-webkit-autofill,
.form-control:-webkit-autofill {
  -webkit-text-fill-color: var(--text-color);
  -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset;
  box-shadow: 0 0 0 1000px #1a1a1a inset;
  caret-color: var(--text-color);
  transition: background-color 9999s ease-out 0s;
}

/* ============================================================================
   4. BUTTONS — gold primary (dark text), dark neutral secondary
   ============================================================================ */
.btn {
  border-radius: 8px;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 700;
}
.btn::before { display: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.btn-primary { background: var(--gold-grad); color: #0d0d0d; border: 1px solid #d9a407; }
.btn-primary:hover {
  background: linear-gradient(180deg, #ffdf52, var(--brand-accent));
  box-shadow: 0 6px 18px rgba(var(--brand-accent-rgb), .45);
}
.btn-success {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #ffffff;
  border: 1px solid #22c55e;
}
.btn-success:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 6px 18px rgba(34, 197, 94, .35);
}
.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: 1px solid #f59e0b;
}
.btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .35);
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: 1px solid #ef4444;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 18px rgba(239, 68, 68, .35);
}
.btn-secondary, .btn-outline {
  background: #1f1f1f;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover, .btn-outline:hover { background: #242424; }
.pagination button {
  background: #1f1f1f;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all .2s ease;
}
.pagination button:hover:not(:disabled) {
  background: #242424;
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}
.pagination input[type="number"], .pagination input {
  background: #1a1a1a !important;
  color: #ededed !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px;
}

/* ============================================================================
   5. TABLES & DATA-TABLE SUITE (Viewport Contained & 90% Calibrated)
   ============================================================================ */
/* Dashboard viewport containment — stretches 100% full width */
.dashboard-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.main-content {
  margin-left: 215px !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: calc(100% - 215px) !important;
  width: calc(100% - 215px) !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

.content-body {
  padding: 1.25rem 1.5rem !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.table-responsive,
.table-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  margin-bottom: 1rem !important;
  border-radius: 8px !important;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-secondary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--brand-gold);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.81rem !important;
}
.data-table thead {
  background: #111111;
}
.data-table th {
  background: #111111 !important;
  color: var(--brand-gold) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.65rem 0.75rem !important;
  border-bottom: 1px solid #282828 !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  text-align: left;
}
.data-table td {
  padding: 0.55rem 0.75rem !important;
  color: var(--text-color) !important;
  border-bottom: 1px solid #1f1f1f !important;
  vertical-align: middle !important;
  font-size: 0.81rem !important;
}
.data-table td[data-label="#"] {
  width: 36px;
  text-align: center;
  color: var(--text-muted);
}
.data-table tbody tr {
  transition: background 0.15s ease;
}
.data-table tbody tr:hover {
  background: rgba(245, 197, 24, 0.04) !important;
  transform: none !important;
}
.data-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* Cell typography & badges */
.data-table .cell-nowrap {
  white-space: nowrap !important;
}
.data-table .cell-date {
  color: var(--text-secondary) !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
}
.data-table .cell-member-name,
.member-name-text {
  font-weight: 600 !important;
  color: #ffffff !important;
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em;
}
.data-table .cell-email {
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--text-secondary) !important;
  font-size: 0.78rem !important;
}
.member-code-badge {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--brand-gold);
  background: rgba(245, 197, 24, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(245, 197, 24, 0.2);
  white-space: nowrap;
}

/* Status Badges */
.status-badge {
  padding: 0.15rem 0.55rem !important;
  font-size: 0.68rem !important;
  border-radius: 999px !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

/* Due Amount Indicators */
.due-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.due-pill.due-clear {
  color: #4ade80 !important;
}
.due-pill.due-owed {
  color: #f87171 !important;
  font-weight: 700;
}

/* Unified Table Action Buttons (Ultra-compact 28px) */
.table-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  white-space: nowrap !important;
}
.table-actions .btn,
.table-actions .btn-sm {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 0.55rem !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  border-radius: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1 !important;
  cursor: pointer;
  transition: all 0.15s ease !important;
}
.table-actions .btn:hover {
  transform: translateY(-1px) !important;
}
.table-actions .btn-icon-only {
  width: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
}
.table-actions .btn-secondary {
  background: #202020 !important;
  border: 1px solid #333333 !important;
  color: #e5e5e5 !important;
}
.table-actions .btn-secondary:hover {
  background: #2d2d2d !important;
  border-color: #4c4c4c !important;
  color: #ffffff !important;
}
.table-actions .btn-primary {
  background: rgba(245, 197, 24, 0.12) !important;
  border: 1px solid rgba(245, 197, 24, 0.35) !important;
  color: #f5c518 !important;
}
.table-actions .btn-primary:hover {
  background: var(--gold-grad) !important;
  border-color: #f5c518 !important;
  color: #0d0d0d !important;
  box-shadow: 0 2px 8px rgba(245, 197, 24, 0.3) !important;
}
.table-actions .btn-success {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  color: #4ade80 !important;
}
.table-actions .btn-success:hover {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
  border-color: #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3) !important;
}
.table-actions .btn-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}
.table-actions .btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

@media (max-width: 768px) {
  .data-table td[data-label="Actions"] {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }
  .data-table td[data-label="Actions"] .table-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 0.3rem !important;
  }
  .data-table td[data-label="Actions"] .table-actions .btn {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 0.55rem !important;
  }
}

/* ============================================================================
   6. DASHBOARD SIDEBAR — ink slab, gold active marker (already dark, reinforce)
   ============================================================================ */
.sidebar { background: #0d0d0d; box-shadow: none; border-right: 1px solid #1c1c1c; }
.sidebar-header.brand-sidebar-header {
  background: #111;
  border-bottom: 2px solid rgba(var(--brand-accent-rgb), .4);
}
.sidebar-nav .nav-item { color: #cccccc; }
.sidebar-nav .nav-item:hover { color: #fff; }
.sidebar-nav .nav-item:hover::before,
.sidebar-nav .nav-item.active::before { background: rgba(var(--brand-accent-rgb), .12); }
.sidebar-nav .nav-item.active {
  color: var(--brand-yellow);
  background: rgba(var(--brand-accent-rgb), .10);
  box-shadow: inset 3px 0 0 var(--brand-yellow);
}

/* ============================================================================
   7. DASHBOARD SURFACES (admin-dashboard.css hardcoded whites)
   Section/panel fills are OPAQUE #161616 so they read as the same card tier as
   .stat-card (translucency over #0a0a0a body would sink them a tier darker).
   Only true sticky/overlay bars keep alpha (show-through is intentional there).
   ============================================================================ */
.main-content, .content-body, .dashboard-container { background: var(--bg-color); }
.content-header, .section-header {
  background: rgba(13, 13, 13, .94);   /* sticky bar — show-through intentional */
  box-shadow: none;
  border-bottom: 2px solid var(--brand-gold);
}
#userName, .user-info { color: var(--text-color); }

.stat-card, .dashboard-recent, .dashboard-intro-card {
  background: #161616;
  box-shadow: none;
  border: 1px solid var(--border-color);
  border-top: 2px solid rgba(var(--brand-accent-rgb), .55);
  border-radius: 10px;
}
.stat-card { background: linear-gradient(135deg, #181818 0%, #141414 100%); }
.stat-card:hover { box-shadow: 0 12px 35px rgba(0, 0, 0, .55); }
/* admin-dashboard.css gradient-clips .stat-value to transparent; the dark
   re-pointed --primary-gradient made it invisible. Reset the clip so gold shows. */
.stat-value {
  color: var(--brand-gold);
  background: none;
  -webkit-text-fill-color: currentColor;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

/* Decorative gradient-fill badges/icons that relied on the old vivid green
   --primary-gradient now paint charcoal-on-charcoal — restore the gold accent. */
.stat-card-icon, .report-icon, .stat-icon, .import-icon, .export-icon {
  background: var(--gold-grad);
  color: #0d0d0d;
}

/* Page chip: was var(--primary-color) (now #0d0d0d) on a faint green tint */
.page-chip { background: rgba(var(--brand-accent-rgb), .12); color: var(--brand-gold); }

.section-guide { background: #161616; border: 1px solid var(--border-color); }
.empty-state { background: #1a1a1a; color: var(--text-secondary); }
.download-section, .import-results, .stat-item,
.activity-meta-item, .activity-json-view { background: #1a1a1a; }

.gender-tabs {
  background: #161616;
  box-shadow: none;
  border: 1px solid var(--border-color);
}
.gender-tab:hover { background: rgba(var(--brand-accent-rgb), .08); }

.members-section, .attendance-section, .payments-section,
.reports-section, .import-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}
.import-card, .export-card {
  background: #161616;
  border: 1px solid var(--border-color);
}
.import-card:hover, .export-card:hover { box-shadow: 0 12px 35px rgba(0, 0, 0, .55); }

/* ---- Simple / warning info notes (consumed --info/--warning, now retuned) -- */
.simple-note {
  background: rgba(3, 105, 161, .15);
  color: #5eb0e8;
  border-color: rgba(3, 105, 161, .4);
}
.warning-note {
  background: rgba(245, 158, 11, .15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .4);
}

/* ---- Insight / chart cards ---------------------------------------------- */
.insight-card {
  background: #161616;
  border: 1px solid var(--border-color);
  box-shadow: none;
}
.insight-card-header { border-bottom: 1px solid var(--border-color); }
.insight-card-header h3 { color: var(--brand-gold); }
.insight-card-header small { color: var(--text-muted); }
.insight-table thead tr { border-bottom: 2px solid #2a2a2a; }
.insight-table th { color: var(--brand-gold); }
.insight-table td { color: var(--text-color); border-bottom: 1px solid #222; }
.insight-table tbody tr:hover td { background: rgba(var(--brand-accent-rgb), .06); }

.chart-card { background: #161616; border: 1px solid var(--border-color); }
.chart-card-pill { background: #1f1f1f; color: var(--brand-gold); }
.dashboard-intro-card { background: var(--bg-secondary); }
.dashboard-toolbar { background: rgba(22, 22, 22, .92); }  /* sticky bar — keep alpha */
.dashboard-shell { background: var(--bg-secondary); }
.dashboard-chart-tab {
  background: #1f1f1f;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.dashboard-chart-tab.active, .dashboard-chart-tab:hover {
  border-color: rgba(var(--brand-accent-rgb), .5);
  color: var(--brand-gold);
}
.dashboard-shell .chart-card {
  border-color: var(--border-color);
  box-shadow: none;
}
.chart-tooltip {
  background: rgba(20, 20, 20, .98);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .6);
}
.chart-legend-item {
  background: #1f1f1f;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
/* Chart lib inline-SVG axis labels / gridlines (hardcoded #666/#ccc in JS) */
.chart-card svg text, .dashboard-shell svg text { fill: var(--text-secondary); }
.chart-card .recharts-cartesian-grid line,
.dashboard-shell .recharts-cartesian-grid line { stroke: #2a2a2a; }

/* ---- Activity feed ------------------------------------------------------- */
.activity-summary-card {
  background: linear-gradient(135deg, #181818 0%, #141414 100%);
  border: 1px solid var(--border-color);
}
.activity-bar-track { background: #2a2a2a; }
.activity-card { background: #161616; border: 1px solid var(--border-color); }
.activity-card:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.activity-detail-pill { background: rgba(var(--brand-accent-rgb), .12); color: var(--text-color); }
/* Full set of activity badges retuned for dark tints (not just .danger) */
.activity-badge.danger { background: rgba(231, 76, 60, .18); color: #ff6b6b; border-color: rgba(231, 76, 60, .35); }
.activity-badge.success { background: rgba(39, 174, 96, .18); color: #4ade80; border-color: rgba(39, 174, 96, .35); }
.activity-badge.warning { background: rgba(245, 158, 11, .18); color: #fbbf24; border-color: rgba(245, 158, 11, .35); }
.activity-badge.neutral { background: rgba(168, 168, 168, .18); color: var(--text-secondary); border-color: rgba(168, 168, 168, .3); }
.activity-table-wrap { background: #161616; border: 1px solid var(--border-color); }

/* ---- Reports ------------------------------------------------------------- */
.report-card { background: var(--bg-secondary); border: 1px solid var(--border-color); }
.report-card:hover { box-shadow: 0 15px 40px rgba(0, 0, 0, .6); }
.report-content { background: var(--bg-secondary); }

/* ============================================================================
   8. MODALS (admin-dashboard.css base — polished dark theme elevation)
   ============================================================================ */
.modal {
  background-color: rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal[style*="display: flex"],
.modal[style*="display:flex"],
.modal.is-active,
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #161616;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand-gold);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .7);
}
.modal-header {
  background: #1a1a1a;
  border-bottom: 1px solid #262626;
  padding: 1.25rem 1.5rem;
}
.modal-header h2 {
  color: #ffffff;
  margin: 0;
  font-size: 1.35rem;
}
.modal-body {
  color: var(--text-color);
  padding: 1.5rem;
}
.modal-footer {
  background: #1a1a1a;
  border-top: 1px solid #262626;
  padding: 1.25rem 1.5rem;
}
.modal-close {
  color: var(--text-secondary);
  transition: all .2s ease;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: rgba(231, 76, 60, .25);
  color: #ff6b6b;
}

/* ============================================================================
   9. STATUS / BADGES & NOTIFICATIONS — keep colored tints legible on dark
   ============================================================================ */
.status-badge, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  line-height: 1.2;
}
.status-active, .status-completed, .badge-success {
  background: rgba(39, 174, 96, .18);
  color: #4ade80;
  border-color: rgba(39, 174, 96, .35);
}
.status-inactive, .badge-danger {
  background: rgba(231, 76, 60, .18);
  color: #ff6b6b;
  border-color: rgba(231, 76, 60, .35);
}
.status-pending, .badge-warning {
  background: rgba(243, 156, 18, .18);
  color: #fbbf24;
  border-color: rgba(243, 156, 18, .35);
}
.badge-secondary, .badge-muted, .status-unknown {
  background: rgba(168, 168, 168, .15);
  color: #a8a8a8;
  border-color: rgba(168, 168, 168, .25);
}
.error {
  background: rgba(220, 38, 38, .18);
  color: #ff6b6b;
  border: 1px solid rgba(220, 38, 38, .35);
}

/* Toast Notifications */
.notification {
  background: #181818;
  color: #ededed;
  border: 1px solid #2e2e2e;
  border-top: 3px solid var(--brand-gold);
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .7);
  font-family: var(--brand-font-body);
}
.notification-success { border-left: 4px solid #4ade80; }
.notification-error { border-left: 4px solid #ef4444; }
.notification-warning { border-left: 4px solid #f59e0b; }
.notification-info { border-left: 4px solid #5eb0e8; }

/* ============================================================================
   10. MEMBER PROFILE PAGES (member-profile.css hardcoded light surfaces)
   ============================================================================ */
.member-content, .member-container { background: transparent; }

.lookup-bar {
  background: #0d0d0d;
  border-bottom: 2px solid var(--brand-gold);
}
.lookup-bar .lookup-input, .lookup-input {
  background: #1a1a1a;
  color: var(--text-color);
  border: 2px solid #2e2e2e;
}
.lookup-input:focus { box-shadow: 0 0 0 3px rgba(var(--brand-accent-rgb), .45); }

.member-profile {
  background: rgba(22, 22, 22, .96);
  border: 1px solid var(--border-color);
}
.profile-card {
  background: linear-gradient(135deg, #181818 0%, #141414 100%);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}
.profile-card:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, .55); }
/* Avatar ring: gold-tinted so the deliberate frame survives on a dark card
   (was 5px #2a2a2a — invisible against #161616/#181818 behind it) */
.profile-image { border: 4px solid rgba(var(--brand-accent-rgb), .30); box-shadow: 0 8px 25px rgba(0, 0, 0, .55); }
.profile-placeholder { background-color: #1f1f1f; color: var(--brand-gold); }

.detail-item { border-bottom: 1px solid var(--border-color); }
.detail-label { color: var(--text-secondary); }
.detail-value { color: var(--text-color); }

/* ---- Snapshot banners — dark-mode tints, light text --------------------- */
.snapshot-banner {
  background: rgba(245, 158, 11, .12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, .35);
}
.snapshot-banner--stale {
  background: rgba(220, 38, 38, .12);
  color: #ff8787;
  border-color: rgba(220, 38, 38, .4);
}
.snapshot-notice {
  background: #161616;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.snapshot-notice p { color: var(--text-secondary); }

/* ---- Attendance calendar ------------------------------------------------- */
.calendar-section { background: #161616; border: 1px solid var(--border-color); }
.attendance-calendar { background: #1a1a1a; }
.calendar-day { background: #1f1f1f; border: 2px solid var(--border-color); }
.calendar-day.future { background: #161616; }
.calendar-day .day-number { color: var(--text-color); }
.calendar-day.present { background: rgba(39, 174, 96, .22); border-color: rgba(39, 174, 96, .5); }
.calendar-day.absent { background: rgba(231, 76, 60, .18); border-color: rgba(231, 76, 60, .45); }

/* default-date / "today" stays gold with intentional dark text — RE-ASSERT the
   gold fill explicitly so the generic .calendar-day{background:#1f1f1f} above
   can't leave near-black #1f2933 text on a dark cell (invisible). */
.calendar-day.default-date {
  background: var(--brand-yellow);
  border-color: #d9a407;
}
.calendar-day.default-date,
.calendar-day.default-date .day-number { color: #1f2933; }

/* member-profile.css L503 hardcodes .today = Material-blue !important gradient
   with a pulsing glow — neutralize to the black+gold palette. */
.calendar-day.today {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%) !important;
  border-color: var(--brand-gold) !important;
  box-shadow: 0 0 0 2px rgba(var(--brand-accent-rgb), .4) !important;
  animation: none;
}
.calendar-day.today .day-number { color: var(--brand-gold); }
/* today+present / today+absent also carry !important saturated gradients */
.calendar-day.today.present {
  background: rgba(39, 174, 96, .25) !important;
  border-color: var(--brand-gold) !important;
}
.calendar-day.today.absent {
  background: rgba(231, 76, 60, .22) !important;
  border-color: var(--brand-gold) !important;
}

/* ---- Fee history table --------------------------------------------------- */
.fee-history { background: #1a1a1a; border: 1px solid var(--border-color); }
.fee-table { background: #161616; }
.fee-table thead {
  background: var(--brand-ink);
  color: var(--brand-gold);
}
.fee-table thead th { color: var(--brand-gold); }
.fee-table th, .fee-table td { color: var(--text-color); border-bottom: 1px solid #222; }
.fee-table tbody tr:hover { background: rgba(var(--brand-accent-rgb), .08); }

.status-badge.status-active, .status-badge.status-completed { color: #4ade80; }
.status-badge.status-inactive { color: #ff6b6b; }
.status-badge.status-pending { color: #fbbf24; }
.no-data, .loading { color: var(--text-muted); }

/* ============================================================================
   11. STRUCTURAL OVERRIDES — top-half branding rules that assumed light
   ============================================================================ */
/* Footer: light-muted text, visible hairline, compact fit */
.brand-footer {
  border-top: 1px solid rgba(255, 255, 255, .10);
  color: var(--text-secondary);
  margin: 0.65rem auto 0.25rem;
  padding: 0.5rem 1rem 0;
  font-size: 0.78rem;
  width: 100%;
  max-width: 840px;
  text-align: center;
}
.brand-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.2rem;
  margin-bottom: 0.35rem;
}
.brand-contact a {
  color: var(--text-secondary);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.brand-contact a:hover { color: var(--brand-gold); }
.brand-contact svg { width: 13px; height: 13px; fill: currentColor; flex: 0 0 auto; }
.brand-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.brand-copy { color: var(--text-muted); opacity: 1; margin: 0.15rem 0 0; font-size: 0.75rem; }

/* Social circles: --brand-ink (#0d0d0d) disappears on dark — give an edge.
   Glyphs go light; brand-tinted :hover fills (defined earlier in the file)
   still win on hover. Snapchat keeps its dark glyph-on-yellow hover. */
.brand-social a {
  width: 30px;
  height: 30px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-social a:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .55); }
.brand-social svg { fill: #ededed; width: 15px; height: 15px; }
.brand-social .s-sc:hover svg { fill: #0d0d0d; }  /* re-assert: dark glyph on yellow */

/* Gold underline under display headings (echoes the logo ring) */
.brand-login-head h1::after,
.login-box h1::after,
#pageTitle::after {
  content: ''; display: block; height: 3px; width: 56px; border-radius: 2px;
  background: var(--brand-gold); margin-top: .45rem;
}
.brand-login-head h1::after, .login-box h1::after { margin-left: auto; margin-right: auto; }
.lookup-bar #lookupBtn { background: var(--gold-grad); color: #0d0d0d; border: 1px solid #d9a407; }

/* ============================================================================
   12. PWA STATUS BAR (assets/css/pwa.css — was the last light white-flash band)
   ============================================================================ */
.pwa-status-bar.is-online {
  background: rgba(39, 174, 96, .16);
  color: #4ade80;
  border-color: rgba(39, 174, 96, .4);
}
.pwa-status-bar.is-offline {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, .4);
}

/* ============================================================================
   13. SCROLLBAR — dark track, subtle translucent thumb, gold on hover
   ============================================================================ */
* {
  scrollbar-color: rgba(255, 255, 255, .22) #121212;
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .22);
  border-radius: 4px;
  border: 2px solid #121212;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-gold); }
::-webkit-scrollbar-corner { background: #121212; }  /* kill UA light corner dot */

/* Spinner track on dark */
.loading-spinner { border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--brand-gold); }

/* #brand-splash already dark (radial #1c1c1c → #0d0d0d) — intentionally untouched. */

/* ============================================================================
   14. --primary-gradient CONSUMERS — the re-pointed dark gradient turned these
   real accents charcoal-on-charcoal. Restore gold so selected/active states and
   the mobile menu button read on dark. (Verified in admin-dashboard.css.)
   ============================================================================ */
.gender-tab.active {                       /* selected Men/Women segment */
  background: var(--gold-grad);
  color: #0d0d0d;
  box-shadow: 0 4px 12px rgba(var(--brand-accent-rgb), .3);
}
.activity-bar-fill { background: var(--gold-grad); }                   /* progress fill (was darker than its track) */
.mobile-menu-toggle { background: var(--gold-grad); color: #0d0d0d; }  /* hamburger — invisible on dark otherwise */
.stat-card::before { background: var(--gold-grad); }                   /* animated hover top-stripe */
.report-card::before { background: rgba(var(--brand-accent-rgb), .08); }          /* faint gold hover wash (was dark gradient) */

/* ============================================================================
   15. MOBILE LAYOUT FIX — the PWA status bar (pwa.css) and the member page's
   .lookup-bar were BOTH position:sticky; top:0, so on scroll they piled on top
   of each other (the green "Online" bar overlapping the member-code box on
   phones). The status bar is informational; the lookup box is the control —
   so let the status bar scroll normally and keep the lookup box sticky.
   ============================================================================ */
.pwa-status-bar { position: static; }

/* Member lookup header on phones: keep the logo from crowding the field/buttons
   and make the action buttons full-width so they don't get clipped. */
@media (max-width: 600px) {
  .lookup-bar .lookup-container { align-items: stretch; }
  .lookup-bar .brand-sidebar-logo { width: 38px; height: 38px; align-self: center; }
  .lookup-bar .lookup-input { width: 100%; }
  .lookup-bar .btn { width: 100%; }
}

/* Member-profile fee table: never let columns overlap — scroll horizontally
   with a min width and no-wrap cells, at EVERY screen size (the cramped
   landscape view in particular). The fee table does NOT use the card layout. */
.fee-section, .fee-history { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fee-table { min-width: 560px; }
.fee-table th, .fee-table td { white-space: nowrap; }
.recent-table-wrap, .activity-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* On phones the .data-table switches to a STACKED-CARD layout (admin-dashboard
   .css turns each row into a card) — and paints that card #ffffff, so our light
   text became invisible (the "white area" on the Registrations list). Re-skin
   the cards for the dark theme. NOTE: no min-width here — cards are full-width. */
@media (max-width: 768px) {
  .data-table tr {
    background: #161616;
    border: 1px solid var(--border-color);
    border-radius: 10px;
  }
  .data-table td { color: var(--text-color); border-bottom-color: #242424; }
  .data-table td::before { color: var(--brand-gold); }   /* the field labels */
  .data-table tbody tr:hover { background: #1b1b1b; }
}

/* ============================================================================
   16. "Create profile" CTA — make it read as an on-theme GOLD action, not a
   muted dark button that blends into the login card.
   ============================================================================ */
.member-signup-cta { border-top-color: rgba(var(--brand-accent-rgb), .35); }
.member-signup-cta .form-hint { color: var(--text-secondary); }
#openSignupBtn {
  background: transparent;
  color: var(--brand-gold);
  border: 2px solid var(--brand-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 8px;
}
#openSignupBtn:hover {
  background: var(--gold-grad);
  color: #0d0d0d;
  box-shadow: 0 6px 18px rgba(var(--brand-accent-rgb), .4);
}

/* ============================================================================
   17. UI POLISH & SPECIAL DIALOGS — refined dark+gold theme completeness
   ============================================================================ */

/* Sidebar header safety (when class is just .sidebar-header without .brand-) */
.sidebar-header {
  background: #111;
  border-bottom: 2px solid rgba(var(--brand-accent-rgb), .4);
}

/* Global search & scan card modal overlay */
#scanSearchOverlay {
  background: rgba(10, 10, 10, .96) !important;
  color: #ededed !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#scanSearchOverlay h2 {
  color: #ffffff !important;
  font-family: var(--brand-font-display);
  letter-spacing: .04em;
}
#scanSearchOverlay p {
  color: var(--text-secondary) !important;
}
#scanSearchOverlay .fa-wifi,
#scanSearchOverlay svg {
  color: var(--brand-gold) !important;
  filter: drop-shadow(0 0 20px rgba(var(--brand-accent-rgb), .5));
}

/* Floating Entry Alerts widget */
html body #entryAlertBell {
  background: #161616 !important;
  border: 2px solid rgba(var(--brand-accent-rgb), .45) !important;
  color: var(--brand-gold) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .6) !important;
}
html body #entryAlertBell:hover {
  border-color: var(--brand-gold) !important;
  box-shadow: 0 6px 24px rgba(var(--brand-accent-rgb), .4) !important;
}
html body #entryAlertPanel {
  background: #161616 !important;
  border: 1px solid var(--border-color) !important;
  border-top: 3px solid var(--brand-gold) !important;
  box-shadow: var(--shadow-lg) !important;
}
html body #entryAlertPanel .eah {
  background: #1a1a1a !important;
  border-bottom: 1px solid var(--border-color) !important;
}
html body #entryAlertPanel .eah b {
  color: #ededed !important;
}
html body #entryAlertPanel .eah button {
  background: #242424 !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
  border-radius: 6px;
}
html body .eaItem {
  border-bottom-color: #242424 !important;
}
html body .eaItem .nm {
  color: #ededed !important;
}
html body .eaItem .meta {
  color: var(--text-secondary) !important;
}
html body .eaEmpty {
  color: var(--text-muted) !important;
}

/* Inline notes & alert banners: defeat hardcoded light fills */
#memberConflictResolutionNote,
#paymentConflictResolutionNote {
  background: rgba(245, 158, 11, .15) !important;
  color: #fbbf24 !important;
  border-left: 4px solid #f59e0b !important;
  border-radius: 8px !important;
}
#changePwError {
  background: rgba(220, 38, 38, .18) !important;
  color: #ff6b6b !important;
  border: 1px solid rgba(220, 38, 38, .35) !important;
  border-radius: 8px !important;
}

/* Member profile mobile ordering & defaulter theme */
@media (max-width: 1024px) {
  .profile-sidebar { order: 1 !important; }
  .profile-main { order: 2 !important; }
}

.profile-card.defaulter {
  background: linear-gradient(135deg, #380a0a 0%, #5c1414 100%) !important;
  border: 1px solid #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, .35) !important;
}

/* Fee table hover fix: prevent table width horizontal jitter */
.fee-table tbody tr:hover {
  transform: none !important;
}

/* Responsive typography refinement */
@media (max-width: 768px) {
  #pageTitle, .content-header h1 {
    font-size: 1.25rem !important;
  }
}
@media (max-width: 480px) {
  #pageTitle, .content-header h1 {
    font-size: 1.1rem !important;
  }
  .brand-login-head h1, .login-box h1 {
    font-size: 1.35rem !important;
  }
}

/* Icon glyph fallbacks if offline / CDN unavailable */
.fa-wifi::before   { content: '\f1eb'; }
.fa-camera::before { content: '\f030'; }
.fa-spinner::before{ content: '\f110'; }

/* ============================================================================
   2026 ULTRA-MODERN OBSIDIAN & GOLD SAAS SUITE (LINEAR / APEX DESIGN SYSTEM)
   Transforms the legacy UI into a high-performance, dark-luxury dashboard.
   ============================================================================ */

/* 1. Global Viewport & Surface Polish (Full Width Fit + 90% Rem Scale) */
html {
  font-size: 14.4px !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

body {
  background-color: #09090b !important;
  color: #f4f4f5 !important;
  font-family: var(--brand-font-body) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dashboard-container {
  display: flex !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  background: #09090b !important;
  box-sizing: border-box !important;
}

/* 2. Sleek Modern Compact Sidebar — Fits all 17 items on screen without scrolling */
.sidebar {
  width: 215px !important;
  background: #0e0e11 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  height: 100vh !important;
  max-height: 100vh !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 90 !important;
}

.sidebar-header.brand-sidebar-header {
  padding: 0.55rem 0.85rem !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.sidebar-header.brand-sidebar-header h2 {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  margin: 0 !important;
}

.sidebar-nav {
  padding: 0.2rem 0.35rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.06rem !important;
}

.nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  padding: 0.28rem 0.55rem !important;
  color: #a1a1aa !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  border-radius: 5px !important;
  border-left: none !important;
  transition: all 0.15s ease-in-out !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: visible !important;
  min-height: 28px !important;
  line-height: 1.2 !important;
}

.main-content {
  margin-left: 215px !important;
  flex: 1 1 0% !important;
  max-width: calc(100% - 215px) !important;
  width: calc(100% - 215px) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

.nav-item::before {
  display: none !important;
}

.nav-item .nav-icon {
  font-size: 0.95rem !important;
  width: 18px !important;
  text-align: center !important;
  color: #71717a !important;
  transition: color 0.18s ease !important;
  flex-shrink: 0 !important;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  transform: none !important;
}

.nav-item:hover .nav-icon {
  color: #f5c518 !important;
}

.nav-item.active {
  background: rgba(245, 197, 24, 0.12) !important;
  color: #f5c518 !important;
  font-weight: 600 !important;
  box-shadow: inset 0 0 0 1px rgba(245, 197, 24, 0.25) !important;
}

.nav-item.active .nav-icon {
  color: #f5c518 !important;
}

/* 3. Sticky Top Header (Ultra-Compact Full-Width) */
.content-header {
  background: rgba(9, 9, 11, 0.92) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  padding: 0.45rem 1rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  min-height: 40px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.content-header h1 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #f4f4f5 !important;
  letter-spacing: -0.02em !important;
}

.content-body {
  padding: 0.65rem 1rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 4. Bento Stat Cards & Metrics (Full-Width Responsive Grid) */
.dashboard-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.65rem !important;
  margin-bottom: 0.65rem !important;
  width: 100% !important;
}

@media (max-width: 1024px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.stat-card {
  background: linear-gradient(145deg, rgba(22, 22, 26, 0.95), rgba(14, 14, 16, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.85rem !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
  min-height: 64px !important;
  box-sizing: border-box !important;
}

.stat-card::before {
  display: none !important;
}

.stat-card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(245, 197, 24, 0.4) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 197, 24, 0.1) !important;
}

.stat-card h3 {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #a1a1aa !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin-bottom: 0.5rem !important;
}

.stat-value {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  color: #f5c518 !important;
  -webkit-text-fill-color: initial !important;
  background: none !important;
  font-family: 'JetBrains Mono', monospace, sans-serif !important;
  letter-spacing: -0.02em !important;
  line-height: 1.1 !important;
}

/* Compact Fast Actions, Date Range & Section Cards */
.dashboard-intro-card,
.dashboard-fast-actions,
.action-strip,
.section-guide-card {
  padding: 0.6rem 0.85rem !important;
  margin-bottom: 0.6rem !important;
  border-radius: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.dashboard-intro-copy h2,
.dashboard-fast-actions h2,
.section-guide-card h3 {
  font-size: 0.9rem !important;
  margin: 0.1rem 0 0.2rem !important;
}

.dashboard-intro-copy p,
.dashboard-fast-actions p,
.section-guide-card p {
  font-size: 0.74rem !important;
  margin-bottom: 0.3rem !important;
}

.dashboard-intro-actions .btn,
.dashboard-fast-actions .btn,
.action-strip .btn {
  padding: 0.32rem 0.65rem !important;
  font-size: 0.76rem !important;
  min-height: 28px !important;
}

.dashboard-toolbar {
  padding: 0.4rem 0.75rem !important;
  margin-bottom: 0.6rem !important;
  border-radius: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.dashboard-date-range {
  padding: 0.28rem 0.5rem !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.dashboard-date-range input {
  padding: 0.25rem 0.45rem !important;
  font-size: 0.76rem !important;
}

.dashboard-date-range .btn {
  padding: 0.25rem 0.55rem !important;
  font-size: 0.74rem !important;
  min-height: 26px !important;
}

.pwa-status-bar {
  padding: 0.25rem 0.75rem !important;
  font-size: 0.75rem !important;
  min-height: 26px !important;
}

.stat-card small {
  color: #71717a !important;
  font-size: 0.8rem !important;
  margin-top: 0.35rem !important;
}

/* 5. Modern Bento Panels & Containers */
.dashboard-recent,
.card,
.section-card,
.attendance-container,
.member-container,
.form-container,
.report-container {
  background: #111114 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

/* 6. High-Precision Modern Data Tables */
table,
.data-table,
.members-table,
.attendance-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  border: none !important;
}

thead th,
.data-table thead th {
  background: #16161a !important;
  color: #a1a1aa !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 0.8rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: none !important;
}

tbody td,
.data-table tbody td {
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: #e4e4e7 !important;
  font-size: 0.86rem !important;
  vertical-align: middle !important;
}

tbody tr {
  transition: background-color 0.15s ease !important;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* 7. Modern Status Pills & Badges */
.status-pill,
.badge,
.pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 9999px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.status-active,
.pill.green,
.badge-success {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.status-inactive,
.status-due,
.pill.red,
.badge-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.status-warning,
.pill.gold,
.badge-warning {
  background: rgba(245, 197, 24, 0.12) !important;
  color: #f5c518 !important;
  border: 1px solid rgba(245, 197, 24, 0.3) !important;
}

/* 8. Modern Buttons & Micro-Interactions */
.btn,
.btn-primary,
button[type="submit"] {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.01em !important;
  padding: 0.55rem 1.15rem !important;
  transition: all 0.15s ease !important;
  border: none !important;
}

.btn-primary,
.btn-gold {
  background: linear-gradient(180deg, #f8d23c 0%, #efb70c 100%) !important;
  color: #0d0d0d !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(245, 197, 24, 0.25) !important;
}

.btn-primary:hover,
.btn-gold:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.4) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* 9. Form Inputs with Focus Rings */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
  background: #141417 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f4f4f5 !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.9rem !important;
  font-size: 0.88rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #f5c518 !important;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15) !important;
  outline: none !important;
}

/* 10. Floating Modals & Dialogs */
.modal-content,
.modal-dialog,
.modal-box {
  background: #141418 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75) !important;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1.25rem 1.5rem !important;
}

.modal-header h3,
.modal-header h2 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1rem 1.5rem !important;
}

