/* ═══════════════════════════════════════════════════════════════════════════════
   GymFlow — Page-Specific Style Supplement (gymflow-extra.css)
   Fills in classes used by individual pages that weren't in gymflow.css.
   Loaded AFTER gymflow.css and tailwind_built.css so it can override.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Login page (login.html) ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  max-width: 440px;
  margin: 0 auto;
}
.login-header { text-align: center; margin-bottom: 24px; }
.login-title {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gf-text);
  margin: 12px 0 6px;
  letter-spacing: -0.02em;
}
.login-subtitle {
  font-size: 0.9375rem;
  color: var(--gf-text-secondary);
  margin: 0;
}
.login-card {
  width: 100%;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.login-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gf-text-secondary);
  margin: 20px 0 0;
}
.login-footer a {
  color: var(--gf-brand);
  font-weight: 600;
  text-decoration: none;
}
.login-footer a:hover { color: var(--gf-brand-light); }

.gym-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-weight: 800;
  font-size: 1.75rem;
  color: white;
  margin: 12px auto 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 200, 150, 0.3);
}

.form-stack { display: flex; flex-direction: column; gap: 14px; }
.forgot-row { display: flex; justify-content: flex-end; margin: -4px 0 4px; }
.forgot-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gf-brand);
  text-decoration: none;
}
.forgot-link:hover { color: var(--gf-brand-light); text-decoration: underline; }

.pw-wrap { position: relative; }
.pw-wrap .gf-input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--gf-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.pw-toggle:hover { color: var(--gf-text); background: var(--gf-elevated); }

.success-msg, .error-msg {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}
.success-msg.show, .error-msg.show { display: flex; }
.success-msg {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}
.error-msg {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  color: var(--gf-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.theme-toggle-btn:hover { color: var(--gf-text); border-color: var(--gf-border-light); transform: scale(1.05); }
[data-theme="dark"] .theme-toggle-btn .icon-dark { display: none; }
[data-theme="dark"] .theme-toggle-btn .icon-light { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-dark,
:root:not([data-theme="dark"]) .theme-toggle-btn .icon-dark { display: block; }
[data-theme="light"] .theme-toggle-btn .icon-light,
:root:not([data-theme="dark"]) .theme-toggle-btn .icon-light { display: none; }
:root .theme-toggle-btn .icon-dark { display: none; }
:root .theme-toggle-btn .icon-light { display: block; }

/* ── Non-prefixed buttons (analytics, business-hours, classes-admin, etc.) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--gf-elevated);
  color: var(--gf-text);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--gf-border); border-color: var(--gf-border-light); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  border-color: var(--gf-brand);
  color: white;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gf-brand-light) 0%, var(--gf-brand) 100%);
  border-color: var(--gf-brand-light);
}
.btn-secondary {
  background: var(--gf-surface);
  color: var(--gf-text-secondary);
}
.btn-secondary:hover { color: var(--gf-text); }
.btn-danger {
  background: var(--gf-danger);
  border-color: var(--gf-danger);
  color: white;
}
.btn-danger:hover { background: #d63a52; }

.menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--gf-text);
  font-size: 1.5rem;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
}
.menu-btn:hover { background: var(--gf-elevated); }
@media (max-width: 1024px) { .menu-btn { display: inline-flex; } }

/* ── Index landing page (index.html) ── */
.btn-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 8px 24px rgba(0, 200, 150, 0.3);
}
.btn-lg:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 200, 150, 0.4); }
.btn-outline-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  background: transparent;
  color: var(--gf-text);
  border: 1.5px solid var(--gf-border-light);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}
.btn-outline-lg:hover { background: var(--gf-elevated); border-color: var(--gf-text-muted); }
.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--gf-brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn-sm:hover { background: var(--gf-brand-dark); }
.btn-sm-outline {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  background: transparent;
  color: var(--gf-text);
  border: 1px solid var(--gf-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn-sm-outline:hover { border-color: var(--gf-text-muted); }
.btn-store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: #000;
  color: white;
  border: 1px solid #333;
  border-radius: 10px;
  text-decoration: none;
  transition: all .15s;
}
.btn-store:hover { background: #111; border-color: #444; }
.btn-store .store-label { display: block; font-size: 0.625rem; opacity: .7; line-height: 1; margin-bottom: 2px; }
.btn-store .store-name { display: block; font-size: 0.9375rem; font-weight: 700; line-height: 1; }

/* ── Landing page header ── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gf-text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--gf-brand); }
.logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--gf-text-secondary); text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--gf-text); }
@media (max-width: 768px) {
  .header { padding: 14px 20px; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.btn-sm):not(.btn-sm-outline) { display: none; }
}

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  padding: 40px 32px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,200,150,0.08), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
  max-width: 1280px; margin: 0 auto;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.hero-badge {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: var(--gf-brand-soft);
  border: 1px solid rgba(0, 200, 150, 0.25);
  border-radius: 100px;
  font-size: 0.8125rem; font-weight: 600; color: var(--gf-brand);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: var(--gf-text);
}
.hero-content h1 .grad {
  background: linear-gradient(135deg, var(--gf-brand) 0%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  font-size: 1.0625rem; line-height: 1.55;
  color: var(--gf-text-secondary);
  margin: 0 0 28px;
  max-width: 540px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.download-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat .num {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.75rem; font-weight: 800; color: var(--gf-text);
}
.hero-stat .label { font-size: 0.8125rem; color: var(--gf-text-muted); margin-top: 2px; }

/* ── Animations (used everywhere) ── */
@keyframes gf-fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gf-slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.animate-fadeInUp { animation: gf-fadeInUp .6s ease forwards; opacity: 0; }
.animate-slideInRight { animation: gf-slideInRight .7s ease forwards; opacity: 0; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* ── Hero phone mockup (decorative on landing page) ── */
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-phone {
  width: 280px; height: 560px;
  background: #000;
  border-radius: 38px;
  padding: 10px;
  border: 2px solid #1a1f2e;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--gf-bg);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}
.phone-content { padding: 36px 16px 16px; height: 100%; overflow: hidden; }
.phone-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.phone-greeting { font-weight: 700; font-size: 0.875rem; color: var(--gf-text); }
.phone-sub { font-size: 0.6875rem; color: var(--gf-text-muted); }
.phone-avatar {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9375rem;
}

/* ── Bottom navigation (member-dashboard) ── */
.glass-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px max(env(safe-area-inset-left), 12px) calc(env(safe-area-inset-bottom) + 8px);
  background: rgba(14, 22, 40, 0.85);
  border-top: 1px solid var(--gf-border);
  z-index: 50;
}
[data-theme="light"] .glass-nav { background: rgba(255, 255, 255, 0.92); }
.gf-glass { backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); }
.glass-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px calc(env(safe-area-inset-top) + 12px);
  background: rgba(14, 22, 40, 0.7);
  border-bottom: 1px solid var(--gf-border);
  position: sticky; top: 0; z-index: 40;
}
[data-theme="light"] .glass-header { background: rgba(255, 255, 255, 0.85); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: none;
  color: var(--gf-text-muted);
  font-size: 0.6875rem; font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
  min-width: 56px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item:hover, .nav-item.active { color: var(--gf-brand); }
.nav-qr-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: transparent; border: none;
  font-size: 0.6875rem; font-weight: 700; color: var(--gf-brand);
  cursor: pointer; padding: 0; margin-top: -22px;
}
.qr-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 200, 150, 0.45);
  margin-bottom: 2px;
}

/* ── Shimmer / loading placeholders ── */
.shimmer {
  background: linear-gradient(90deg, var(--gf-surface) 0%, var(--gf-elevated) 50%, var(--gf-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer-pulse 1.6s ease-in-out infinite;
  border-radius: 14px;
}
@keyframes shimmer-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gf-text-secondary);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .6; }
.empty-state h2 { font-size: 1.125rem; font-weight: 700; color: var(--gf-text); margin: 0 0 8px; }

/* ── Toast container (used in join.html and others) ── */
.gf-toast-container {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  align-items: center;
}
.gf-toast {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--gf-elevated);
  color: var(--gf-text);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  font-size: 0.875rem; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .25s, transform .25s;
  pointer-events: auto;
  max-width: 92vw;
}
.gf-toast.show { opacity: 1; transform: translateY(0); }
.gf-toast.hide { opacity: 0; transform: translateY(-12px); }
.gf-toast-success { border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.gf-toast-error   { border-color: rgba(239, 68, 68, 0.3);  color: #fca5a5; }
.gf-toast-warning { border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }
.gf-toast-info    { border-color: rgba(96, 165, 250, 0.3); color: #93c5fd; }

/* ── Confirm dialog ── */
.gf-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.gf-confirm-overlay.active { display: flex; }
.gf-confirm-box {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
}
.gf-confirm-title { font-size: 1.125rem; font-weight: 700; color: var(--gf-text); margin-bottom: 8px; }
.gf-confirm-msg   { font-size: 0.9375rem; color: var(--gf-text-secondary); margin-bottom: 20px; line-height: 1.5; }
.gf-confirm-actions { display: flex; gap: 10px; }
.gf-confirm-btn {
  flex: 1;
  padding: 11px 18px;
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  background: var(--gf-elevated);
  color: var(--gf-text);
  font-family: inherit;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.gf-confirm-btn:hover { background: var(--gf-border); }
.gf-confirm-btn.primary { background: var(--gf-brand); border-color: var(--gf-brand); color: white; }
.gf-confirm-btn.danger  { background: var(--gf-danger); border-color: var(--gf-danger); color: white; }

/* ── Hide loading screens after init ── */
.gf-page-loader.hidden { opacity: 0; pointer-events: none; transition: opacity .35s; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Sidebar Dashboard Layout
   Used by: analytics, business-hours, classes-admin, operations, pricing-admin,
            instructor, reminders, staff-checkin
   ═══════════════════════════════════════════════════════════════════════════════ */

body { margin: 0; }

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--gf-surface);
  border-right: 1px solid var(--gf-border);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform .25s ease;
  overflow-y: auto;
}
.sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-weight: 800; font-size: 1.25rem;
  color: var(--gf-text);
  padding: 6px 12px 22px;
  border-bottom: 1px solid var(--gf-border);
  margin-bottom: 16px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  color: var(--gf-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all .15s;
}
.sidebar nav a:hover { background: var(--gf-elevated); color: var(--gf-text); }
.sidebar nav a.active {
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  font-weight: 600;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--gf-border);
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-footer .role-badge {
  display: inline-flex; align-self: flex-start;
  padding: 3px 9px;
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sidebar-footer .logout {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--gf-border);
  color: var(--gf-text-secondary);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.sidebar-footer .logout:hover { color: var(--gf-text); border-color: var(--gf-text-muted); }

/* Main area */
.main {
  margin-left: 240px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--gf-surface);
  border-bottom: 1px solid var(--gf-border);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--gf-text);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--gf-border);
  color: var(--gf-text-secondary);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.theme-toggle:hover { color: var(--gf-text); border-color: var(--gf-text-muted); }
.content {
  padding: 24px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* Breadcrumb */
.gf-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; color: var(--gf-text-muted);
  margin-bottom: 20px;
}
.gf-breadcrumb-link { color: var(--gf-text-secondary); text-decoration: none; }
.gf-breadcrumb-link:hover { color: var(--gf-text); }
.gf-breadcrumb-sep { color: var(--gf-text-subtle); }
.gf-breadcrumb-current { color: var(--gf-text); font-weight: 600; }

/* KPI cards (analytics layout) */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all .15s;
}
.kpi-card .value {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gf-text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  display: block;
}
.kpi-card .label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gf-text-muted);
  display: block;
  margin-bottom: 6px;
}
.kpi-card .change {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gf-text-muted);
}
.kpi-card .change.up { color: var(--gf-success, #10b981); }
.kpi-card .change.down { color: var(--gf-danger, #ef4444); }
.gf-lift:hover { transform: translateY(-1px); border-color: var(--gf-border-light); }

/* Chart cards */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 20px;
}
.chart-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--gf-text);
}
.chart-container { width: 100%; height: 220px; position: relative; }

/* Date filter */
.date-filter {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.date-filter select, .date-filter input {
  padding: 8px 12px;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  color: var(--gf-text);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
}

/* Tables */
.gf-table { width: 100%; border-collapse: collapse; }
.gf-table th, .gf-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--gf-border);
}
.gf-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gf-text-muted);
  background: var(--gf-surface);
}
.gf-table tbody tr:hover { background: var(--gf-elevated); }

/* Hours list (business-hours.html) */
.hours-list { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: grid; grid-template-columns: 100px 1fr auto auto auto; gap: 12px; align-items: center;
  padding: 12px 16px;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
}
.day-row.closed { opacity: .6; }
.day-name { font-weight: 600; color: var(--gf-text); }
.hours { color: var(--gf-text-secondary); font-size: 0.875rem; }
.close-time { color: var(--gf-text-muted); font-size: 0.8125rem; }
.day-row input[type="time"] {
  padding: 6px 10px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  color: var(--gf-text);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8125rem;
}

/* Classes (classes-admin.html) */
.class-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.class-time {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.875rem; color: var(--gf-brand);
}
.class-meta {
  display: flex; gap: 14px;
  font-size: 0.8125rem;
  color: var(--gf-text-secondary);
  margin-top: 8px;
}
.capacity-bar {
  width: 100%; height: 5px;
  background: var(--gf-border);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}
.capacity-fill { height: 100%; background: var(--gf-brand); transition: width .3s; }
.capacity-fill.full { background: var(--gf-danger); }
.capacity-text { font-size: 0.75rem; color: var(--gf-text-muted); margin-top: 4px; }
.booking-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 8px;
  margin-top: 6px;
  font-size: 0.875rem;
}
.attendee-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--gf-text-secondary);
}

/* Pricing admin */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-popular { background: var(--gf-brand-soft); color: var(--gf-brand); }
.badge-inactive { background: rgba(148, 163, 184, 0.15); color: var(--gf-text-muted); }

/* Avatar (operations etc.) */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gf-elevated);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--gf-text);
  flex-shrink: 0;
}
.amount {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-weight: 700;
  color: var(--gf-text);
}
.category-pill {
  display: inline-flex;
  padding: 3px 10px;
  background: var(--gf-elevated);
  color: var(--gf-text-secondary);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Sidebar toggle on mobile */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 16px 0 32px rgba(0, 0, 0, 0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
  .topbar h1 { font-size: 1.125rem; }
}

/* Check-in / scanner pages */
.cam-toggle {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
}

/* Sections (instructor, etc.) */
section { background: transparent; }
.attendance { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Animations applied to non-prefixed elements */
.gf-animate-fade { animation: gf-fadeInUp .35s ease both; }

/* Page-loader hide */
.gf-page-loader.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
   Generic page primitives — covers index landing page, dashboard widgets,
   forms, modals, and everything else that wasn't already in gymflow.css.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Modals */
.modal, .modal-bg, .gf-modal-bg, .gf-overlay-bg, .result-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.active, .modal-bg.active, .gf-modal-bg.active, .gf-overlay-bg.active, .result-overlay.active { display: flex; }
.modal-sheet, .modal-body {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h2, .modal-header h3 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.125rem; font-weight: 700; margin: 0; color: var(--gf-text);
}
.close-btn {
  background: transparent; border: none;
  color: var(--gf-text-muted);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  transition: all .15s;
}
.close-btn:hover { color: var(--gf-text); background: var(--gf-elevated); }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width:640px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label, .form-row label, .lbl {
  font-size: 0.8125rem; font-weight: 600; color: var(--gf-text-secondary);
}
.form-note, .hint, .meta { font-size: 0.75rem; color: var(--gf-text-muted); }
.req { color: var(--gf-danger); }

/* Inputs (generic, non-prefixed) */
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], input[type="time"], input[type="search"],
textarea, select {
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  color: var(--gf-text);
  padding: 10px 12px;
  border-radius: 9px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  box-sizing: border-box;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gf-brand);
  box-shadow: 0 0 0 3px var(--gf-brand-soft);
}

/* Generic stats / stat-box (used by pricing-admin) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-box {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 16px;
}
.stat-box .num {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.75rem; font-weight: 800;
  color: var(--gf-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-box .label { font-size: 0.8125rem; color: var(--gf-text-muted); font-weight: 500; }

/* GF stat (used by some pages) */
.gf-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.gf-stat-value { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: 1.5rem; font-weight: 800; color: var(--gf-text); }
.gf-stat-label { font-size: 0.75rem; color: var(--gf-text-muted); font-weight: 500; }
.gf-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.gf-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.gf-section-title { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: 1.125rem; font-weight: 700; margin: 24px 0 12px; color: var(--gf-text); }
.gf-topbar-title { font-size: 1rem; font-weight: 600; color: var(--gf-text); }
.gf-card-stat {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 14px 16px;
}

/* Alerts */
.gf-alert {
  padding: 12px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--gf-text);
  margin-bottom: 12px;
  display: none;
}
.gf-alert.show { display: block; }
.gf-alert-danger { background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.30); color: #fca5a5; }
.error-box {
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: #fca5a5;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

/* Plan cards (pricing-admin) */
.plan-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 20px;
  position: relative;
  transition: all .15s;
}
.plan-card:hover { border-color: var(--gf-brand); transform: translateY(-2px); }
.plan-card.popular { border-color: var(--gf-brand); }
.plan-card .price {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gf-text);
  margin: 12px 0 4px;
}
.plan-card .period { font-size: 0.875rem; color: var(--gf-text-muted); margin-bottom: 16px; }
.plan-card h3, .plan-card .name {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.125rem; font-weight: 700; margin: 0; color: var(--gf-text);
}
.plan-card .feature-list { list-style: none; padding: 0; margin: 0 0 16px; }
.plan-card .feature-list li { font-size: 0.8125rem; color: var(--gf-text-secondary); padding: 4px 0; }
.plan-actions { display: flex; gap: 8px; margin-top: 12px; }
.popular-badge {
  position: absolute; top: -10px; right: 14px;
  background: var(--gf-brand);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Landing page sections (index.html) */
section {
  padding: 60px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 40px; }
.section-badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  border: 1px solid rgba(0, 200, 150, 0.25);
  border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--gf-text);
  letter-spacing: -0.02em;
}
.section-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 20px;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 24px;
  transition: all .2s;
}
.feature-card:hover { transform: translateY(-2px); border-color: var(--gf-brand); }
.feature-card h3 { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: 1.0625rem; font-weight: 700; margin: 14px 0 8px; color: var(--gf-text); }
.feature-card p { font-size: 0.875rem; line-height: 1.55; color: var(--gf-text-secondary); margin: 0; }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gf-brand-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gf-brand);
}
.feature-icon svg { width: 22px; height: 22px; }

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  position: relative;
}
.how-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  position: relative;
}
.how-num {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gf-brand);
  margin-bottom: 8px;
}
.how-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--gf-text); }
.how-card p { font-size: 0.875rem; line-height: 1.5; color: var(--gf-text-secondary); margin: 0; }

/* Pricing section on landing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.pricing-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  position: relative;
}
.pricing-card.popular { border-color: var(--gf-brand); box-shadow: 0 8px 28px rgba(0, 200, 150, 0.15); }
.pricing-desc { font-size: 0.875rem; color: var(--gf-text-secondary); margin: 8px 0 16px; }
.pricing-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 11px 16px;
  background: var(--gf-elevated);
  color: var(--gf-text);
  border: 1px solid var(--gf-border);
  border-radius: 9px;
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
}
.pricing-btn:hover { background: var(--gf-border); }
.pricing-card.popular .pricing-btn { background: var(--gf-brand); color: white; border-color: var(--gf-brand); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 14px 18px;
}
.faq-item.open .faq-answer { max-height: 400px; padding-top: 10px; }
.faq-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gf-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  font-size: 0.875rem;
  color: var(--gf-text-secondary);
  line-height: 1.55;
  transition: max-height .25s, padding .25s;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.testimonial-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 22px;
}
.testimonial-stars { color: #fbbf24; font-size: 0.875rem; margin-bottom: 10px; }
.testimonial-text { font-size: 0.9375rem; line-height: 1.55; color: var(--gf-text); margin: 0 0 16px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.testimonial-name { font-size: 0.875rem; font-weight: 700; color: var(--gf-text); }
.testimonial-role { font-size: 0.75rem; color: var(--gf-text-muted); }

/* Trusted by logos */
.trusted-by { text-align: center; padding: 24px 16px; }
.trusted-by > p, .trusted-by > div:first-child { font-size: 0.8125rem; color: var(--gf-text-muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.trusted-inner, .trusted-logos {
  display: flex; justify-content: center; align-items: center; gap: 28px; flex-wrap: wrap;
  opacity: 0.7;
}
.trusted-logo {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.875rem; color: var(--gf-text-secondary);
}

/* Footer */
.footer {
  padding: 40px 32px 24px;
  border-top: 1px solid var(--gf-border);
  background: var(--gf-surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto 24px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.footer-brand p { font-size: 0.875rem; line-height: 1.55; color: var(--gf-text-secondary); margin: 12px 0; max-width: 280px; }
.footer-col h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gf-text-muted); margin: 0 0 12px; }
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--gf-text-secondary);
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--gf-brand); }
.footer-social { display: flex; gap: 12px; margin-top: 12px; }
.footer-social a {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gf-elevated);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gf-text-secondary);
  transition: all .15s;
}
.footer-social a:hover { color: var(--gf-brand); background: var(--gf-brand-soft); }
.footer-bottom {
  border-top: 1px solid var(--gf-border);
  padding-top: 16px;
  font-size: 0.8125rem;
  color: var(--gf-text-muted);
  text-align: center;
  max-width: 1280px;
  margin: 0 auto;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  color: white;
  padding: 40px 32px;
  border-radius: 18px;
  text-align: center;
  margin: 32px auto;
  max-width: 980px;
}
.cta-banner h2 { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0 0 12px; }
.cta-banner p { font-size: 1rem; opacity: 0.9; margin: 0 0 20px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Member dashboard cards */
.dashboard-grid { display: grid; gap: 12px; padding: 16px; }
.dash-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 16px;
}
.dash-label { font-size: 0.75rem; color: var(--gf-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-value {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gf-text);
  margin-top: 4px;
}
.dash-change { font-size: 0.75rem; font-weight: 600; margin-top: 6px; }
.dash-change.positive { color: var(--gf-success, #10b981); }
.dash-change.negative { color: var(--gf-danger, #ef4444); }
.dash-change.neutral  { color: var(--gf-text-muted); }
.dash-bar { width: 100%; height: 6px; background: var(--gf-border); border-radius: 100px; overflow: hidden; margin-top: 10px; }
.dash-chart { width: 100%; height: 120px; margin-top: 12px; }

/* Status / badges */
.status, .status-pill, .status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 100px;
  background: var(--gf-elevated);
  color: var(--gf-text-secondary);
}
.status.is-open, .status-pill.is-open { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.status.green, .status-badge.green, .status-pill.green { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.status.red, .status-badge.red, .status-pill.red { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.status.orange, .status-badge.orange, .status-pill.orange { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.status.blue, .status-badge.blue, .status-pill.blue { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gf-text-muted);
}
.status-dot.green { background: #10b981; }
.status-dot.red   { background: #ef4444; }
.status-dot.orange{ background: #f59e0b; }

/* Misc reused */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gf-border);
  border-top-color: var(--gf-brand);
  border-radius: 50%;
  animation: gf-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes gf-spin { to { transform: rotate(360deg); } }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon-box {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Tabs */
.tab-bar { display: flex; border-bottom: 1px solid var(--gf-border); margin-bottom: 16px; gap: 4px; }
.tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--gf-text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.tab:hover { color: var(--gf-text); }
.tab.active { color: var(--gf-brand); border-bottom-color: var(--gf-brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Day tabs (member-dashboard / classes) */
.day-tab {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 8px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gf-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.day-tab.active { background: var(--gf-brand); color: white; border-color: var(--gf-brand); }
.day-section { margin-bottom: 20px; }
.day-title, .day-header {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gf-text-muted);
  margin: 18px 0 10px;
}

/* Action cards (member-dashboard quick actions) */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.action-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--gf-text);
  transition: all .15s;
}
.action-card:hover { border-color: var(--gf-brand); transform: translateY(-1px); }
.action-card .emoji { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.action-card .name { font-size: 0.8125rem; font-weight: 600; }

/* QR / scanner */
.scanner-wrap { position: relative; padding: 16px; }
.scanner-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--gf-border);
}
.scan-line {
  position: absolute; left: 8%; right: 8%; top: 50%;
  height: 2px;
  background: var(--gf-brand);
  box-shadow: 0 0 12px var(--gf-brand);
  animation: scan-anim 2s ease-in-out infinite;
}
@keyframes scan-anim { 0%, 100% { top: 12%; } 50% { top: 88%; } }
.manual-section { margin-top: 18px; padding: 14px; background: var(--gf-surface); border: 1px solid var(--gf-border); border-radius: 12px; }
.qr-display, .phone-qr {
  width: 200px; height: 200px;
  background: white;
  padding: 12px;
  border-radius: 16px;
  margin: 0 auto;
}
.result-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
.result-icon { font-size: 3rem; margin-bottom: 12px; }
.recent-checkins { margin-top: 18px; }
.checkin-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

/* Progress ring */
.progress-wrap { position: relative; width: 100px; height: 100px; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring-circle { fill: none; stroke: var(--gf-brand); stroke-width: 8; transition: stroke-dashoffset .6s; }
.progress-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gf-text);
}

/* Offline page */
.offline-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; text-align: center; }
.offline-icon { font-size: 4rem; margin-bottom: 16px; }
.offline-title { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: 1.5rem; font-weight: 700; margin: 0 0 8px; color: var(--gf-text); }
.offline-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* Misc utility */
.last\:border-0:last-child { border: 0; }
.secondary { background: var(--gf-elevated); color: var(--gf-text); }
.subtitle, .sub { font-size: 0.875rem; color: var(--gf-text-secondary); }
.title { font-family: var(--gf-font-display, 'Outfit', sans-serif); font-size: 1.125rem; font-weight: 700; color: var(--gf-text); }
.name, .member-name { font-weight: 600; color: var(--gf-text); }
.role { font-size: 0.75rem; color: var(--gf-text-muted); }
.flag { font-size: 1.25rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.empty-text { color: var(--gf-text-muted); font-size: 0.875rem; text-align: center; padding: 24px; }
.section { padding: 18px 0; }

/* Operations / financial */
.pnl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width:640px) { .pnl-grid { grid-template-columns: 1fr; } }
.pnl-box {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 14px 18px;
}
.expense-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: var(--gf-elevated);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.875rem;
}
.earnings-card {
  background: linear-gradient(135deg, var(--gf-brand-dark) 0%, var(--gf-brand) 100%);
  color: white;
  padding: 22px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.staff-card, .equip-card, .gym-row {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
}
.salary, .revenue { font-weight: 700; color: var(--gf-text); }

/* Member sub-table */
.member-sub-table {
  width: 100%;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  overflow: hidden;
}
.member-sub-table thead th {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gf-text-muted);
  padding: 10px 14px;
  background: var(--gf-elevated);
  text-align: left;
}
.member-sub-table tbody td { padding: 10px 14px; font-size: 0.875rem; border-top: 1px solid var(--gf-border); }

/* Schedule (instructor) */
.schedule-day { padding: 12px 0; border-bottom: 1px solid var(--gf-border); }
.instructor-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--gf-surface); border-radius: 14px; margin-bottom: 16px; }
.time-block { font-weight: 700; color: var(--gf-brand); margin-bottom: 4px; }
.time, .date { font-size: 0.8125rem; color: var(--gf-text-secondary); }
.ampm { font-size: 0.6875rem; color: var(--gf-text-muted); text-transform: uppercase; }

/* Signup form rows */
.sig-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gf-surface); border-radius: 10px; margin-bottom: 6px; }
.class-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--gf-surface); border: 1px solid var(--gf-border); border-radius: 10px; margin-bottom: 6px; }
.booking-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Loader animations */
.loader-logo {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.75rem; font-weight: 800;
  color: var(--gf-text);
}
.loader-logo em { color: var(--gf-brand); font-style: normal; }
.loader-bar {
  width: 180px; height: 4px;
  background: var(--gf-border);
  border-radius: 100px;
  margin-top: 16px;
  overflow: hidden;
  position: relative;
}
.loader-bar-fill {
  height: 100%;
  background: var(--gf-brand);
  width: 30%;
  border-radius: 100px;
  animation: loader-anim 1.2s ease-in-out infinite;
}
@keyframes loader-anim {
  0% { transform: translateX(-100%); width: 30%; }
  50% { width: 60%; }
  100% { transform: translateX(330%); width: 30%; }
}
.gf-page-loader {
  position: fixed; inset: 0;
  background: var(--gf-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .35s;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE OVERHAUL — Mobile-first design with auto-detection
   - Drawer sidebar (overlay) on < 1024px
   - Bottom nav for admin pages on mobile
   - Touch-friendly 44px tap targets
   - Safe area insets for notched devices
   - Bottom-sheet modals on mobile
   - Skeleton loading enhancements
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base touch & accessibility */
* { -webkit-tap-highlight-color: transparent; }
:root {
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --safe-left: env(safe-area-inset-left, 0);
  --safe-right: env(safe-area-inset-right, 0);
  --mobile-nav-h: 64px;
  --top-bar-h: 60px;
}

/* All buttons get touch-target minimum on mobile */
@media (max-width: 768px) {
  button, .btn, .gf-btn, a.btn, a.gf-btn, .nav-item, .tab, .day-tab, .close-btn, .pw-toggle, .theme-toggle, .theme-toggle-btn, .menu-btn {
    min-height: 44px;
    min-width: 44px;
  }
  /* Prevent iOS zoom on focused inputs */
  input, textarea, select { font-size: 16px !important; }
}

/* ── Sidebar drawer for mobile (replaces basic .open toggle) ── */
.gf-sidebar-overlay,
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  transition: opacity .25s;
}
.gf-sidebar-overlay.open,
#sidebarOverlay.open { display: block; opacity: 1; }

@media (max-width: 1024px) {
  .sidebar {
    width: 280px;
    padding-top: calc(var(--safe-top) + 16px);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.4);
  }
  /* Close button visible inside sidebar on mobile */
  .sidebar::before {
    content: '×';
    position: absolute;
    top: calc(var(--safe-top) + 10px);
    right: 12px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gf-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
  }
  .sidebar:not(.open)::before { display: none; }
}

/* Topbar tweaks for mobile */
@media (max-width: 1024px) {
  .topbar {
    padding: 12px 16px;
    padding-top: calc(var(--safe-top) + 12px);
    height: var(--top-bar-h);
    box-sizing: border-box;
    gap: 8px;
  }
  .topbar h1 {
    font-size: 1.0625rem;
    flex: 1;
    text-align: center;
    margin: 0;
  }
  .menu-btn {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--gf-elevated);
    color: var(--gf-text);
    font-size: 1.25rem;
    border: 1px solid var(--gf-border);
  }
  .topbar-actions { gap: 6px; }
  .topbar-actions .gf-btn,
  .topbar-actions .btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
  .gf-breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 16px;
    margin: 0 -16px 16px;
    background: var(--gf-surface);
    border-bottom: 1px solid var(--gf-border);
    font-size: 0.75rem;
  }
  .gf-breadcrumb::-webkit-scrollbar { display: none; }
  .gf-breadcrumb { scrollbar-width: none; }
  .content {
    padding: 16px;
    padding-bottom: calc(80px + var(--safe-bottom));
  }
}

/* KPI rows: 2 cols on mobile, more on larger */
@media (max-width: 640px) {
  .kpi-row, .stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .kpi-card, .stat-box {
    padding: 14px;
  }
  .kpi-card .value, .stat-box .num {
    font-size: 1.5rem;
  }
  .kpi-card .label, .stat-box .label {
    font-size: 0.75rem;
  }
  .chart-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .chart-card { padding: 16px; }
  .chart-container { height: 200px; }
}

/* ── Admin-dashboard specific responsive ── */
@media (max-width: 1024px) {
  /* Admin pages with .gf-app-shell or similar — make tables horizontally scrollable */
  table { font-size: 0.8125rem; }
  thead th, tbody td { padding: 10px 12px !important; }
  /* Convert wide tables to cards on small mobile */
}

/* Convert table rows to cards on very small screens */
@media (max-width: 560px) {
  .gf-table-cards table,
  .gf-table-cards thead,
  .gf-table-cards tbody,
  .gf-table-cards tr,
  .gf-table-cards td { display: block; }
  .gf-table-cards thead { display: none; }
  .gf-table-cards tr {
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .gf-table-cards td {
    padding: 4px 0 !important;
    border: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .gf-table-cards td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gf-text-muted);
  }
}

/* ── Mobile-friendly action bar in admin-dashboard ── */
@media (max-width: 768px) {
  .gf-page-title { font-size: 0.9375rem !important; }
  /* Stack action bar buttons */
  .gf-action-bar,
  .content > div[style*="flex"][style*="gap"]:has(.gf-btn) {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* Auto-detect: stat cards full width on phone */
  .gf-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Bottom-sheet modals on mobile ── */
@media (max-width: 640px) {
  .modal, .modal-bg, .gf-modal-bg {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal-sheet, .modal-body, .gf-modal-bg > div:not(.gf-confirm-box) {
    border-radius: 20px 20px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    padding-bottom: calc(20px + var(--safe-bottom)) !important;
    animation: gf-slideUp .3s ease;
  }
  /* Drag handle */
  .modal-sheet::before, .modal-body::before, .gf-modal-bg > div:not(.gf-confirm-box)::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--gf-border-light);
    border-radius: 100px;
    margin: -8px auto 12px;
  }
  /* Confirm dialog stays centered */
  .gf-confirm-overlay .gf-confirm-box {
    max-width: 92vw !important;
    margin: 0 16px;
  }
}
@keyframes gf-slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Login page on mobile — full width inputs, ensure scroll */
@media (max-width: 480px) {
  .login-wrap {
    padding: 16px;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: max(32px, calc(var(--safe-top) + 24px));
  }
  .login-card { padding: 20px; }
  .login-title { font-size: 1.5rem; }
}

/* Index landing page mobile */
@media (max-width: 900px) {
  .header { padding: 14px 16px; }
  .hero { padding: 24px 16px 48px; }
  .hero-grid { gap: 32px; }
  .hero-visual { order: 2; }
  .hero-content { order: 1; }
  .hero-phone {
    width: 220px;
    height: 440px;
    margin: 0 auto;
  }
  .nav-links a:not(.btn-sm):not(.btn-sm-outline) { display: none; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn-lg, .hero-buttons .btn-outline-lg {
    width: 100%;
    justify-content: center;
  }
  .download-btns { justify-content: center; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stat .num { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .header { padding: 12px 12px; }
  .logo { font-size: 1.125rem; }
  .nav-links { gap: 8px; }
  .nav-links a.btn-sm, .nav-links a.btn-sm-outline {
    padding: 7px 12px;
    font-size: 0.8125rem;
  }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  section { padding: 36px 16px; }
}

/* ── Mobile Bottom Nav for Admin Pages ── */
.gf-admin-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 6px max(env(safe-area-inset-left), 8px) calc(env(safe-area-inset-bottom) + 6px);
  background: rgba(14, 22, 40, 0.95);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid var(--gf-border);
  z-index: 40;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
}
[data-theme="light"] .gf-admin-mobile-nav { background: rgba(255, 255, 255, 0.96); }
.gf-admin-mobile-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px;
  color: var(--gf-text-muted);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all .15s;
  text-align: center;
}
.gf-admin-mobile-nav a svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gf-admin-mobile-nav a.active { color: var(--gf-brand); }
.gf-admin-mobile-nav a:hover { color: var(--gf-text); background: var(--gf-elevated); }
.gf-admin-mobile-nav a.active:hover { color: var(--gf-brand); }

@media (max-width: 1024px) {
  .gf-admin-mobile-nav { display: flex; }
  /* Hide sidebar in normal flow; only show as drawer */
  /* Add bottom padding to main so content doesn't hide under nav */
  .main { padding-bottom: calc(72px + var(--safe-bottom)); }
}
@media (min-width: 1025px) {
  .gf-admin-mobile-nav { display: none !important; }
}

/* ── Online/Offline Indicator ── */
.gf-net-banner {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 50%; transform: translateX(-50%) translateY(-200%);
  background: var(--gf-danger);
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform .35s ease;
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.gf-net-banner.show { transform: translateX(-50%) translateY(0); }
.gf-net-banner.online { background: var(--gf-success, #10b981); }
.gf-net-banner::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

/* ── Skeleton placeholders ── */
.gf-skeleton {
  background: linear-gradient(90deg, var(--gf-surface) 0%, var(--gf-elevated) 50%, var(--gf-surface) 100%);
  background-size: 200% 100%;
  animation: shimmer-pulse 1.6s ease-in-out infinite;
  border-radius: 8px;
  display: block;
}
.gf-skeleton-text { height: 12px; margin: 6px 0; }
.gf-skeleton-title { height: 22px; width: 60%; margin: 8px 0; }
.gf-skeleton-card { height: 80px; margin: 8px 0; border-radius: 12px; }

/* ── Pull-to-refresh visual ── */
.gf-pull-refresh {
  position: fixed;
  top: calc(var(--safe-top) + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}
.gf-pull-refresh.show {
  opacity: 1;
  transform: translateX(-50%) translateY(20px);
}
.gf-pull-refresh.refreshing svg {
  animation: gf-spin 0.8s linear infinite;
}

/* ── Improved toast positioning on mobile ── */
@media (max-width: 640px) {
  .gf-toast-container {
    top: auto !important;
    bottom: calc(var(--safe-bottom) + 80px) !important;
    transform: translateX(-50%) !important;
  }
  .gf-toast {
    font-size: 0.8125rem;
    padding: 10px 14px;
  }
}

/* ── Theme toggle better placement ── */
@media (max-width: 1024px) {
  .theme-toggle-btn {
    bottom: calc(var(--safe-bottom) + 88px);
    right: 16px;
    width: 44px; height: 44px;
  }
}

/* ── Sidebar footer theme button improvements ── */
.sidebar-footer .theme-toggle {
  background: var(--gf-elevated);
  position: relative;
}

/* ── Better empty states ── */
.gf-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gf-text-secondary);
}
.gf-empty-icon {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gf-elevated);
  border-radius: 50%;
  font-size: 2rem;
  opacity: 0.7;
}
.gf-empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gf-text);
  margin-bottom: 6px;
}
.gf-empty-text {
  font-size: 0.875rem;
  margin-bottom: 16px;
  max-width: 320px;
  margin-left: auto; margin-right: auto;
}

/* ── Search bar enhancements ── */
.gf-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.gf-search-wrap .gf-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  color: var(--gf-text);
  font-family: inherit;
  font-size: 0.875rem;
  box-sizing: border-box;
}
.gf-search-wrap .gf-search-input:focus {
  outline: none;
  border-color: var(--gf-brand);
  box-shadow: 0 0 0 3px var(--gf-brand-soft);
}
.gf-search-wrap::before {
  content: '';
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-4.35-4.35M17 10a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}
.gf-search-clear {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: var(--gf-text-muted);
  cursor: pointer;
  display: none;
  align-items: center; justify-content: center;
  font-size: 1rem;
}
.gf-search-wrap.has-value .gf-search-clear { display: inline-flex; }
.gf-search-clear:hover { background: var(--gf-border); color: var(--gf-text); }

/* ── Filter chips ── */
.gf-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0;
  margin: 0 0 14px;
  scrollbar-width: none;
}
.gf-filter-chips::-webkit-scrollbar { display: none; }
.gf-filter-chip {
  padding: 6px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gf-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.gf-filter-chip.active {
  background: var(--gf-brand);
  color: white;
  border-color: var(--gf-brand);
}
.gf-filter-chip:hover:not(.active) { color: var(--gf-text); border-color: var(--gf-text-muted); }

/* ── Floating Action Button ── */
.gf-fab {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  right: 16px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gf-brand) 0%, var(--gf-brand-dark) 100%);
  color: white;
  border: none;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 200, 150, 0.45);
  z-index: 45;
  cursor: pointer;
  transition: transform .2s;
}
.gf-fab:hover, .gf-fab:focus { transform: scale(1.06); }
.gf-fab svg { width: 24px; height: 24px; }
@media (max-width: 1024px) { .gf-fab { display: inline-flex; } }

/* ── Better focus rings (accessibility) ── */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gf-brand);
  outline-offset: 2px;
}

/* ── Reduce motion preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Print-friendly ── */
@media print {
  .sidebar, .gf-admin-mobile-nav, .topbar, .menu-btn, .glass-nav, .theme-toggle-btn, .gf-fab, .gf-net-banner { display: none !important; }
  .main { margin-left: 0 !important; padding: 0 !important; }
  body { background: white !important; color: black !important; }
  .kpi-card, .stat-box, .chart-card { break-inside: avoid; border-color: #ccc !important; }
}

/* ── Tap-and-hold removal for buttons ── */
button, a { -webkit-touch-callout: none; }

/* ── Improved scrollbars on desktop ── */
@media (min-width: 1025px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--gf-border);
    border-radius: 100px;
    border: 2px solid transparent;
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--gf-border-light); background-clip: padding-box; }
}

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Selection color ── */
::selection { background: var(--gf-brand-soft); color: var(--gf-text); }

/* ── Admin-dashboard (gf-* layout) mobile improvements ── */
@media (max-width: 1024px) {
  .gf-topbar {
    flex-wrap: wrap;
    height: auto !important;
    min-height: var(--top-bar-h);
    padding: 12px 16px !important;
    padding-top: calc(var(--safe-top) + 12px) !important;
    gap: 10px;
  }
  /* First row: hamburger + title */
  .gf-topbar > div:first-child {
    flex: 1;
    min-width: 0;
    gap: 12px !important;
  }
  /* Hide subtitle on small mobile */
  .gf-topbar [style*="font-size:0.75rem"] {
    display: none;
  }
  /* Second row: search full width below */
  .gf-topbar > div:last-child {
    flex: 1 1 100%;
    order: 99;
    gap: 8px !important;
  }
  .gf-search {
    width: 100% !important;
    flex: 1;
  }
  /* Theme button stays inline with search */
  .gf-theme-btn {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--gf-elevated);
    border: 1px solid var(--gf-border);
    color: var(--gf-text-secondary);
  }
}

@media (max-width: 640px) {
  /* Action bar buttons should be in a 2-col grid */
  .gf-content > div[style*="display:flex"][style*="gap:10px"][style*="margin-bottom:16px"]:has(.gf-btn-sm) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px !important;
  }
  .gf-content > div[style*="display:flex"][style*="gap:10px"]:has(.gf-btn-sm) > .gf-page-title,
  .gf-content > div[style*="display:flex"][style*="gap:10px"]:has(.gf-btn-sm) > div:first-child {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .gf-btn-sm {
    width: 100%;
    justify-content: center;
    padding: 10px 12px !important;
  }
  /* Stats grid: KPIs in 2x2 on mobile */
  .gf-stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .gf-kpi-card { padding: 14px !important; }
  /* KPI icon a bit smaller */
  .gf-kpi-icon { width: 32px !important; height: 32px !important; }
}

/* Member dashboard improvements (member-dashboard.html uses .glass-header / .glass-nav) */
@media (max-width: 640px) {
  .glass-header h1, .glass-header [style*="font-size"]:not([style*="0.75"]) {
    font-size: 1rem !important;
  }
}

/* ── Staff Check-In page (.gf-result-overlay was sized for inside scanner-wrap) ── */
.gf-result-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px);
  border: 0 !important;
  border-radius: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  z-index: 9999;
}
.gf-result-overlay.active { display: flex !important; }
.gf-result-card {
  background: var(--gf-surface) !important;
  border: 1px solid var(--gf-border) !important;
  border-radius: 18px !important;
  padding: 28px !important;
  max-width: 380px !important;
  width: 100%;
  text-align: center;
  margin: 0 !important;
}
.gf-result-card h2 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.5rem; font-weight: 700;
  margin: 0 0 8px;
  color: var(--gf-text);
}
.gf-result-card p { color: var(--gf-text-secondary); margin: 0 0 16px; }
.gf-result-card .actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.gf-result-card .actions button {
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  font-family: inherit; font-size: 0.9375rem; font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gf-border);
  background: var(--gf-elevated);
  color: var(--gf-text);
  transition: all .15s;
}
.gf-result-card .actions button.primary {
  background: var(--gf-brand);
  border-color: var(--gf-brand);
  color: white;
}
.gf-result-card .actions button.primary:hover { background: var(--gf-brand-dark); }
.gf-result-card .actions button.secondary:hover { background: var(--gf-border); }
.gf-result-card .actions button.danger {
  background: var(--gf-danger);
  border-color: var(--gf-danger);
  color: white;
}

/* Staff check-in page layout */
body.gf-scanner-page {
  max-width: 520px;
  margin: 0 auto;
  padding: max(20px, calc(var(--safe-top) + 20px)) 16px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.gf-scanner-page .gf-header {
  text-align: center;
  padding: 18px;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
}
body.gf-scanner-page .gf-header h1 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--gf-text);
}
body.gf-scanner-page .gf-header p {
  font-size: 0.875rem;
  color: var(--gf-text-secondary);
  margin: 0;
}
.gf-staff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--gf-brand-soft);
  color: var(--gf-brand);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 10px;
}
.gf-manual {
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.gf-manual label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gf-text-secondary);
}
.gf-manual input {
  padding: 11px 14px;
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  color: var(--gf-text);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.gf-manual input:focus { border-color: var(--gf-brand); box-shadow: 0 0 0 3px var(--gf-brand-soft); }
.gf-manual button {
  padding: 11px 18px;
  background: var(--gf-brand);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.gf-manual button:hover { background: var(--gf-brand-dark); }
.gf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gf-stat .num {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gf-text);
  letter-spacing: -0.02em;
}
.gf-stat .lbl {
  font-size: 0.75rem;
  color: var(--gf-text-muted);
  margin-top: 2px;
  font-weight: 500;
}
.gf-recent h3 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--gf-text);
}
.gf-recent-item {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gf-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  color: var(--gf-text-secondary);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  align-self: center;
}
.gf-back-link:hover { color: var(--gf-text); }
.gf-override {
  margin-top: 14px;
  padding: 14px;
  border-top: 1px solid var(--gf-border);
}
.gf-override p {
  font-size: 0.8125rem;
  color: var(--gf-text-muted);
  margin: 0 0 10px;
}


/* ── Landing page nav tighter on tiny screens ── */
@media (max-width: 420px) {
  .header { padding: 10px 12px; }
  .logo { font-size: 1rem; }
  .logo-icon { width: 30px; height: 30px; }
  .logo span { display: inline; }
  .nav-links { gap: 6px; }
  .nav-links a.btn-sm, .nav-links a.btn-sm-outline {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

/* Make pricing-admin grid responsive */
@media (max-width: 640px) {
  #plansGrid { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr !important; }
}

/* Operations page tabs scroll horizontally on mobile */
@media (max-width: 640px) {
  .tab-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.8125rem;
  }
}

/* Member dashboard cards readable on small screens */
@media (max-width: 480px) {
  .dashboard-grid { padding: 12px; gap: 10px; }
  .dash-card { padding: 14px; }
  .dash-value { font-size: 1.25rem; }
  .action-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .action-card { padding: 14px 10px; }
  .action-card .name { font-size: 0.75rem; }
}

/* Hide horizontal scrollbar on filter chips */
.gf-filter-chips, .day-tabs, .tab-bar { -webkit-overflow-scrolling: touch; }

/* Better focus on cards that are clickable */
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--gf-brand);
  outline-offset: 2px;
}

/* Scanner page header layout fix */
body.gf-scanner-page .gf-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
body.gf-scanner-page .gf-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE OVERFLOW & TAB FIXES (debug pass)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Prevent any horizontal page scroll */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Breadcrumb on mobile: constrain width properly */
@media (max-width: 1024px) {
  .gf-breadcrumb {
    max-width: 100vw;
    box-sizing: border-box;
    margin-left: -16px !important;
    margin-right: -16px !important;
    width: calc(100% + 32px) !important;
  }
}

/* Mobile admin nav: ensure it never exceeds viewport */
.gf-admin-mobile-nav {
  max-width: 100vw;
  box-sizing: border-box;
  padding-left: calc(8px + env(safe-area-inset-left, 0px));
  padding-right: calc(8px + env(safe-area-inset-right, 0px));
}

/* gf-tabs: make them horizontally scrollable on mobile when content is long */
@media (max-width: 768px) {
  .gf-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
    max-width: 100%;
  }
  .gf-tabs::-webkit-scrollbar { display: none; }
  .gf-tabs .gf-tab {
    flex: none !important;
    min-width: max-content;
    padding: 8px 14px;
    font-size: 0.8125rem;
  }
}

/* gf-tab-line same treatment */
@media (max-width: 768px) {
  .gf-tab-line {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Tables on mobile pages without gf-table-cards: wrap in scrollable container */
@media (max-width: 640px) {
  table:not(.gf-table-cards table):not([class*="member-sub-table"]) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
  }
  /* For .member-sub-table specifically (pricing-admin), wrap in scroll */
  .member-sub-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100vw;
  }
  .member-sub-table thead, .member-sub-table tbody, .member-sub-table tr { display: table; width: max-content; table-layout: fixed; }
}

/* Reminders / similar pages without a content container — add page padding via body class */
body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > .gf-header,
body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > .gf-stats-grid,
body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > .gf-tabs,
body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > .gf-card,
body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > .gf-back-link {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  body:not(:has(.sidebar)):not(:has(.gf-sidebar)):not(:has(.glass-header)):not(.gf-scanner-page):not(:has(.hero)) > * {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Failsafe: every top-level child of <body> respects viewport width */
body > * { max-width: 100vw; box-sizing: border-box; }

/* But still allow sidebars/fixed overlays to function */
body > .sidebar, body > .gf-sidebar, body > .gf-sidebar-overlay,
body > #sidebarOverlay, body > .gf-toast-container, body > .gf-confirm-overlay,
body > .gf-modal-bg, body > .gf-admin-mobile-nav, body > .gf-net-banner,
body > .glass-nav, body > .theme-toggle-btn, body > .gf-fab, body > .gf-result-overlay,
body > .gf-page-loader, body > .modal-bg, body > .modal {
  max-width: none;
}

/* Pricing-admin specific: table wraps in scroll container */
@media (max-width: 640px) {
  #plansGrid { padding-bottom: 8px; }
}

/* ── .gf-page body class: layout container for full-bleed standalone pages ── */
body.gf-page {
  max-width: 980px;
  margin: 0 auto;
  padding: max(16px, calc(var(--safe-top) + 16px)) 16px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.gf-page > .gf-page-loader { /* keep fixed */ }
body.gf-page .gf-header {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 18px 20px;
}
body.gf-page .gf-header h1 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--gf-text);
}
body.gf-page .gf-header p {
  font-size: 0.875rem;
  color: var(--gf-text-secondary);
  margin: 0;
}

/* Stats grid for reminders */
body.gf-page .gf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.gf-stat-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.gf-stat-card .num {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.gf-stat-card .num.blue { color: #60a5fa; }
.gf-stat-card .num.orange { color: #fbbf24; }
.gf-stat-card .num.red { color: #f87171; }
.gf-stat-card .num.green { color: #34d399; }
.gf-stat-card .lbl {
  font-size: 0.75rem;
  color: var(--gf-text-muted);
  font-weight: 500;
}

/* Reminders cards/fields */
.gf-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  border-radius: 14px;
  padding: 18px;
}
.gf-card h3 {
  font-family: var(--gf-font-display, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--gf-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gf-field { margin-bottom: 12px; }
.gf-field:last-child { margin-bottom: 0; }
.gf-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gf-text-secondary);
  margin-bottom: 6px;
}
.gf-field select, .gf-field textarea, .gf-field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  color: var(--gf-text);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.gf-field select:focus, .gf-field textarea:focus, .gf-field input:focus {
  border-color: var(--gf-brand);
  box-shadow: 0 0 0 3px var(--gf-brand-soft);
}
.gf-field textarea { min-height: 80px; resize: vertical; }

.gf-templates { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gf-template {
  padding: 10px 14px;
  background: var(--gf-elevated);
  border: 1px solid var(--gf-border);
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--gf-text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.gf-template:hover { border-color: var(--gf-brand); color: var(--gf-text); }
.gf-template code {
  background: var(--gf-surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--gf-brand);
}

.gf-preview {
  background: var(--gf-elevated);
  border: 1px dashed var(--gf-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--gf-text);
  margin-bottom: 12px;
  font-family: inherit;
  white-space: pre-wrap;
}
.hint { font-size: 0.75rem; color: var(--gf-text-muted); margin-top: 4px; }
.hint code {
  background: var(--gf-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.6875rem;
  color: var(--gf-brand);
}

/* Top-level tab pills on a gf-page */
body.gf-page .gf-tabs { width: 100%; }

/* When .gf-header is used as a page banner (in gf-page or gf-scanner-page),
   it should be a stacked block, not a flexbox topbar */
body.gf-page > .gf-header,
body.gf-scanner-page > .gf-header {
  height: auto !important;
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: left;
  padding: 18px 20px !important;
  border-radius: 14px;
  border: 1px solid var(--gf-border);
}
body.gf-scanner-page > .gf-header {
  text-align: center;
  align-items: center !important;
}

/* ── Inline spinner for submit buttons ── */
.gf-spinner-inline {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: gf-spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
button:disabled .gf-spinner-inline { opacity: 0.7; }
button[disabled] { opacity: 0.7; cursor: wait; }

/* Bottom padding for body.gf-page and gf-scanner-page when mobile nav is showing */
@media (max-width: 1024px) {
  body.gf-page,
  body.gf-scanner-page {
    padding-bottom: calc(80px + var(--safe-bottom)) !important;
  }
}

/* Day-tab horizontal scroll improvement */
.day-tab { flex-shrink: 0; }

/* Horizontal scroll container hint - fade edges on mobile */
@media (max-width: 768px) {
  .gf-filter-chips,
  .gf-tab-line {
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* Make scroll containers scroll snap aware */
@media (max-width: 768px) {
  .gf-tab-line { scroll-padding-left: 4px; }
}

/* Ensure all action buttons in topbar shrink nicely on mobile */
@media (max-width: 480px) {
  .gf-topbar .gf-btn,
  .topbar .gf-btn,
  .topbar .btn,
  .gf-topbar .btn {
    padding: 8px 12px !important;
    font-size: 0.8125rem;
  }
}

/* Instructor page: stack 2-col grid on mobile */
@media (max-width: 768px) {
  /* Generic 2fr 1fr / 1fr 1fr / 1fr 2fr grids stack on mobile */
  div[style*="grid-template-columns: 2fr 1fr"],
  div[style*="grid-template-columns: 1fr 2fr"],
  div[style*="grid-template-columns:2fr 1fr"],
  div[style*="grid-template-columns:1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

/* Operations search bar: stack on mobile */
@media (max-width: 640px) {
  div[style*="display:flex"][style*="gap:12px"][style*="margin-bottom:16px"]:has(input):has(select):has(button) {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  div[style*="display:flex"][style*="gap:12px"][style*="margin-bottom:16px"]:has(input):has(select):has(button) > select,
  div[style*="display:flex"][style*="gap:12px"][style*="margin-bottom:16px"]:has(input):has(select):has(button) > button {
    width: 100% !important;
  }
  /* Single column equipment grid on mobile */
  #equipmentGrid {
    grid-template-columns: 1fr !important;
  }
}
