:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-elevated: #242736;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #8b8d9e;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-width: 260px;
  --radius: 8px;
  --radius-lg: 12px;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Loading */

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

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

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

/* Layout */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
}

/* Sidebar */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  background: var(--surface-elevated);
  color: var(--text);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-hover);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.logout-btn {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 150;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.2s ease;
}

.sidebar-overlay {
  display: none;
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

/* Forms */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

/* Auth */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.signup-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
}

.signup-choice:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* Page header */

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

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

/* Page header row */

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* View toggle */

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}

.toggle-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggle-btn:hover {
  color: var(--text);
}

.toggle-btn.active {
  background: var(--accent);
  color: white;
}

/* Schedule */

.schedule-day-group {
  margin-bottom: 32px;
}

.day-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.class-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.class-card {
  padding: 16px 20px;
}

.class-card-main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.class-time {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-hover);
  min-width: 80px;
}

.class-info {
  flex: 1;
  min-width: 0;
}

.class-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.class-instructor {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.class-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 90px;
}

.class-spots {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.class-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.class-recurring-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

.class-actions {
  display: flex;
  gap: 6px;
  min-width: fit-content;
}

/* Small buttons */

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

/* Empty state */

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

/* Cadence & Day Picker */

.cadence-options {
  display: flex;
  gap: 6px;
}

.cadence-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.cadence-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cadence-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.day-picker {
  display: flex;
  gap: 6px;
}

.day-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.day-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.day-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Members */

.members-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-input {
  max-width: 320px;
}

.members-table {
  padding: 0;
  overflow: hidden;
}

.members-table table {
  width: 100%;
  border-collapse: collapse;
}

.members-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.members-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.members-table tbody tr:last-child td {
  border-bottom: none;
}

.members-table tbody tr:hover {
  background: var(--surface-elevated);
}

.member-name {
  font-weight: 500;
}

.member-email {
  color: var(--text-muted);
}

.member-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.role-owner {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-hover);
}

.role-staff {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.role-member {
  background: rgba(139, 141, 158, 0.15);
  color: var(--text-muted);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8d9e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Payments */

.stripe-banner {
  margin-bottom: 24px;
}

.stripe-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stripe-banner h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.stripe-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tier-card {
  display: flex;
  flex-direction: column;
}

.tier-header {
  margin-bottom: 12px;
}

.tier-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tier-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.tier-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-hover);
}

.tier-interval {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tier-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  flex: 1;
}

.tier-features li {
  font-size: 0.85rem;
  padding: 4px 0;
  color: var(--text);
}

.tier-features li::before {
  content: "\2713  ";
  color: var(--success);
  font-weight: 700;
}

.tier-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Settings */

.settings-section {
  margin-bottom: 20px;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.settings-section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker {
  width: 48px;
  height: 36px;
  padding: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.color-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.branding-colors-row {
  display: flex;
  gap: 32px;
}

.branding-preview {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.branding-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.branding-preview-logo {
  height: 28px;
  width: auto;
}

.branding-preview-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--preview-primary, var(--accent));
}

.branding-preview-nav {
  display: flex;
  gap: 8px;
}

.branding-preview-link {
  font-size: 0.8rem;
  padding: 4px 10px;
  color: var(--text-muted);
  border-radius: var(--radius);
}

.branding-preview-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.branding-preview-body {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  background: var(--bg);
}

.branding-preview-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  cursor: default;
  background: var(--preview-primary, var(--accent));
}

.branding-preview-btn.hover {
  background: var(--preview-accent, var(--accent-hover));
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.toggle-row:last-of-type {
  border-bottom: none;
}

.toggle-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-label-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.toggle-label-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.save-success {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
}

/* Dashboard sections */

.dashboard-section {
  margin-top: 32px;
}

/* AI Insights */

.insights-summary {
  padding: 20px;
}

.insights-summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.insights-summary-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.insights-icon {
  font-size: 1.2rem;
}

.insights-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.insights-summary-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.insights-risk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insights-risk-card {
  padding: 16px;
}

.insights-risk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.insights-risk-name {
  font-weight: 600;
}

.insights-risk-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.insights-risk-badge.high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.insights-risk-badge.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.insights-risk-badge.low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.insights-risk-reasons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.insights-risk-reason {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}

.insights-risk-action {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.insights-action-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.insights-suggestion {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.insights-suggestion-priority {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

.insights-suggestion-priority.high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.insights-suggestion-priority.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.insights-suggestion-priority.low {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.section-link:hover {
  color: var(--accent-hover);
}

.sidebar-title-link {
  text-decoration: none;
  color: var(--accent);
}

/* ========================================
   MEMBER-FACING APP
   ======================================== */

.member-app {
  min-height: 100vh;
}

.member-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.member-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.member-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.member-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.member-nav-link:hover,
.member-nav-link.active {
  color: var(--text);
  background: var(--surface-elevated);
}

.member-logout {
  color: var(--text-muted);
}

.member-nav-dropdown {
  position: relative;
}

.member-nav-more-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-nav-caret {
  font-size: 0.7rem;
  opacity: 0.6;
}

.member-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  min-width: 160px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.member-nav-dropdown-item {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.1s;
}

.member-nav-dropdown-item:hover {
  color: var(--text);
  background: var(--surface-elevated);
}

.member-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.member-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

.member-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* Member hero */

.member-hero {
  text-align: center;
  padding: 60px 20px;
}

.member-hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.member-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.member-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Tenant landing page */

.tenant-landing {
  max-width: 900px;
  margin: 0 auto;
}

.tenant-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tenant-hero-overlay {
  text-align: center;
  padding: 60px 20px;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.tenant-hero:not([style*="background-image"]) .tenant-hero-overlay {
  background: none;
  backdrop-filter: none;
}

.tenant-section {
  padding: 32px 20px;
  border-top: 1px solid var(--border);
}

.tenant-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tenant-section p {
  color: var(--text-muted);
  line-height: 1.7;
  white-space: pre-line;
}

.tenant-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tenant-contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tenant-contact-item strong {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tenant-social {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.tenant-social a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.tenant-social a:hover {
  text-decoration: underline;
}

/* Member schedule */

.member-day-group {
  margin-bottom: 32px;
}

.member-class-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
}

.member-class-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.member-class-hour {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-hover);
}

.member-class-duration {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.member-class-details {
  flex: 1;
  min-width: 0;
}

.member-class-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.member-class-instructor {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.member-class-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-class-booking {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: fit-content;
}

.member-class-spots {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.member-class-spots.full {
  color: var(--danger);
  font-weight: 600;
}

/* Schedule header & controls */

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.schedule-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.week-nav-btn:hover {
  background: var(--surface-elevated);
}

.week-nav-label {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 180px;
  text-align: center;
}

.week-nav-today {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.week-nav-today:hover {
  background: var(--accent-hover);
}

/* Calendar grid */

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-day {
  background: var(--surface);
  min-height: 140px;
  display: flex;
  flex-direction: column;
}

.cal-day.today {
  background: var(--surface-elevated);
}

.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.cal-day-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.cal-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cal-day-num.today {
  background: var(--accent);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day-body {
  flex: 1;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.cal-event {
  padding: 6px 8px;
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: default;
}

.cal-event.booked {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: var(--success);
}

.cal-event-time {
  display: block;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 2px;
}

.cal-event.booked .cal-event-time {
  color: var(--success);
}

.cal-event-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-instructor {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.cal-event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.cal-event-spots {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.cal-event-spots.full {
  color: var(--danger);
  font-weight: 600;
}

.cal-event-btn {
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.cal-event-btn.book {
  background: var(--accent);
  color: white;
}

.cal-event-btn.book:hover {
  background: var(--accent-hover);
}

.cal-event-btn.cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.cal-event-btn.cancel:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.cal-event-btn.disabled {
  background: transparent;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.cal-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  opacity: 0.3;
  font-size: 0.9rem;
}

/* Member bookings */

.member-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-booking-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.member-booking-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.member-booking-time {
  font-size: 0.8rem;
  color: var(--accent-hover);
}

.member-booking-instructor {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* Member profile */

.member-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.member-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.member-profile-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.member-profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.member-profile-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 100px;
}

.profile-actions {
  margin-top: 24px;
}

.password-form-card {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.password-success {
  color: var(--success);
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

/* Member join */

.member-join-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.member-join-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.member-join-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}

.member-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}

/* ========================================
   CIRCUIT DISPLAY
   ======================================== */

.circuit-display {
  min-height: 100vh;
  background: #000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.circuit-ready,
.circuit-done,
.circuit-active {
  width: 100%;
  max-width: 1200px;
  padding: 40px;
  text-align: center;
}

.circuit-gym-name {
  font-size: 1.5rem;
  color: var(--circuit-color, #6366f1);
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.circuit-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.circuit-info {
  font-size: 1.25rem;
  color: #888;
  margin-bottom: 40px;
}

.circuit-station-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.circuit-preview-item {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
}

.circuit-start-btn {
  padding: 20px 60px;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--circuit-color, #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: transform 0.15s ease;
}

.circuit-start-btn:hover {
  transform: scale(1.05);
}

/* Circuit active state */

.circuit-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  justify-content: center;
}

.circuit-top-bar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  margin-bottom: 24px;
  font-size: 1.1rem;
  color: #888;
}

.circuit-phase-label {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.circuit-phase-label.work {
  color: var(--circuit-color, #6366f1);
}

.circuit-phase-label.rest {
  color: #22c55e;
}

.circuit-timer {
  font-size: 12rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

.circuit-progress-bar {
  width: 100%;
  max-width: 600px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
}

.circuit-progress-fill {
  height: 100%;
  background: var(--circuit-color, #6366f1);
  border-radius: 4px;
  transition: width 1s linear;
}

.circuit-current-station {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.circuit-current-desc {
  font-size: 1.25rem;
  color: #888;
  margin-bottom: 32px;
}

.circuit-next {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 24px;
}

.circuit-next-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.circuit-next-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.circuit-reset-btn {
  padding: 8px 24px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  color: #888;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Circuit done */

.circuit-done-title {
  font-size: 4rem;
  font-weight: 800;
  color: #22c55e;
  margin-bottom: 16px;
}

.circuit-done-sub {
  font-size: 1.5rem;
  color: #888;
  margin-bottom: 48px;
}

/* ========================================
   ADMIN PANEL
   ======================================== */

.admin-layout {
  min-height: 100vh;
}

.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--danger);
  text-decoration: none;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  color: var(--text);
  background: var(--surface-elevated);
}

.admin-user {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 8px;
}

.admin-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.admin-tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.admin-tenant-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-tenant-slug {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 16px;
}

.admin-tenant-actions {
  display: flex;
  gap: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .class-card-main {
    flex-wrap: wrap;
    gap: 12px;
  }

  .class-description {
    white-space: normal;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Dashboard sidebar */
  .mobile-menu-btn {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-top: 72px;
  }

  /* Member nav */
  .member-menu-btn {
    display: flex;
  }

  .member-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    gap: 2px;
  }

  .member-nav.open {
    display: flex;
  }

  .member-nav-link {
    padding: 12px 16px;
    width: 100%;
    text-align: left;
  }

  .member-header-inner {
    position: relative;
  }

  .member-content {
    padding: 24px 16px;
  }

  /* Stats grids */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Class cards */
  .class-card-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .class-time {
    min-width: unset;
  }

  .class-meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .class-actions {
    width: 100%;
    justify-content: flex-start;
  }

  /* Schedule controls */
  .schedule-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .schedule-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .week-nav {
    justify-content: center;
  }

  .week-nav-label {
    min-width: unset;
    font-size: 0.8rem;
  }

  /* Calendar grid - stack vertically on mobile */
  .cal-grid {
    grid-template-columns: 1fr;
  }

  .cal-day {
    min-height: 80px;
  }

  /* Member class cards */
  .member-class-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .member-class-time {
    flex-direction: row;
    gap: 8px;
  }

  .member-class-booking {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Members table */
  .members-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .members-table table {
    min-width: 600px;
  }

  .members-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    max-width: none;
  }

  /* Tiers */
  .tiers-grid {
    grid-template-columns: 1fr;
  }

  .membership-tiers {
    grid-template-columns: 1fr;
  }

  /* Stripe banner */
  .stripe-banner-content {
    flex-direction: column;
    text-align: center;
  }

  /* Page header */
  .page-header-row {
    flex-direction: column;
  }

  /* View toggle */
  .view-toggle {
    width: 100%;
  }

  .toggle-btn {
    flex: 1;
  }

  /* Modal */
  .modal {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Admin */
  .admin-header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .admin-tenant-grid {
    grid-template-columns: 1fr;
  }

  /* Member hero */
  .member-hero {
    padding: 40px 16px;
  }

  .member-hero-title {
    font-size: 1.5rem;
  }

  .member-hero-actions {
    flex-direction: column;
  }

  /* Profile */
  .member-profile-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .member-profile-label {
    min-width: unset;
  }

  /* Booking cards */
  .member-booking-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Circuit display */
  .circuit-title {
    font-size: 2rem;
  }

  .circuit-timer {
    font-size: 6rem;
  }

  .circuit-current-station {
    font-size: 2rem;
  }

  .circuit-preview-item {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .circuit-start-btn {
    padding: 16px 40px;
    font-size: 1.2rem;
  }

  .circuit-ready,
  .circuit-done,
  .circuit-active {
    padding: 20px;
  }

  /* Join page */
  .member-join-card {
    padding: 24px 20px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .member-hero-title {
    font-size: 1.25rem;
  }

  .circuit-timer {
    font-size: 4rem;
  }

  .circuit-title {
    font-size: 1.5rem;
  }
}

/* ============================================
   MEMBERSHIP PAGE (Member-facing)
   ============================================ */

.membership-page {
  max-width: 900px;
  margin: 0 auto;
}

.membership-header {
  text-align: center;
  margin-bottom: 32px;
}

.membership-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.membership-header p {
  color: var(--text-muted);
}

.membership-success {
  background: var(--success);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  margin-bottom: 24px;
}

.membership-tiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.membership-tier-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.membership-tier-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.membership-tier-card.current {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.membership-current-badge {
  position: absolute;
  top: -12px;
  background: var(--accent);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.membership-tier-name {
  font-size: 20px;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 12px;
}

.membership-tier-price {
  margin-bottom: 16px;
}

.membership-amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
}

.membership-interval {
  font-size: 16px;
  color: var(--text-muted);
}

.membership-tier-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.membership-features {
  list-style: none;
  padding: 0;
  width: 100%;
  margin-bottom: 20px;
  text-align: left;
}

.membership-feature {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.membership-feature::before {
  content: '\2713';
  color: var(--success);
  margin-right: 8px;
  font-weight: 700;
}

.membership-select-btn {
  width: 100%;
  margin-top: auto;
}

.membership-payment-info {
  margin-top: 32px;
  padding: 24px;
}

.membership-payment-info h3 {
  margin-bottom: 8px;
}

.membership-payment-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.membership-payment-methods {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-method-badge {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   REVENUE DASHBOARD
   ============================================ */

.revenue-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.revenue-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.revenue-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.revenue-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.revenue-stat-change {
  font-size: 13px;
  margin-top: 4px;
}

.revenue-stat-change.positive {
  color: var(--success);
}

.revenue-stat-change.negative {
  color: var(--danger);
}

.revenue-chart-card {
  padding: 24px;
  margin-bottom: 24px;
}

.revenue-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.revenue-chart-header h2 {
  font-size: 18px;
}

.revenue-chart-toggle {
  display: flex;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  overflow: hidden;
}

.chart-toggle-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.revenue-chart {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 220px;
  padding: 0 8px;
}

.revenue-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.revenue-bar-value {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.revenue-bar-track {
  flex: 1;
  width: 100%;
  max-width: 48px;
  background: var(--surface-elevated);
  border-radius: 6px 6px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.revenue-bar-fill {
  width: 100%;
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  transition: height 0.5s ease;
  min-height: 4px;
}

.revenue-bar-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.revenue-fee-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.revenue-fee-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}

.revenue-fee-row.fee-deduction {
  color: var(--text-muted);
}

.revenue-fee-row.fee-total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
  font-weight: 700;
  font-size: 1.05rem;
}

.revenue-fee-amount {
  font-variant-numeric: tabular-nums;
}

.revenue-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.revenue-tiers-card,
.revenue-payments-card {
  padding: 24px;
}

.revenue-tiers-card h2,
.revenue-payments-card h2 {
  font-size: 16px;
  margin-bottom: 16px;
}

.revenue-tier-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.revenue-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.revenue-tier-name {
  font-weight: 600;
  font-size: 14px;
}

.revenue-tier-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.revenue-tier-amount {
  font-weight: 700;
  color: var(--success);
}

.revenue-payment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.revenue-payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.revenue-payment-name {
  font-weight: 600;
  font-size: 14px;
}

.revenue-payment-tier {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.revenue-payment-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.revenue-payment-amount {
  font-weight: 600;
}

.revenue-payment-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.revenue-payment-status.paid {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.revenue-payment-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* ============================================
   PROGRESS & GOALS PAGE
   ============================================ */

.progress-page {
  max-width: 900px;
  margin: 0 auto;
}

.progress-header {
  margin-bottom: 24px;
}

.progress-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-header p {
  color: var(--text-muted);
}

.progress-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
}

.progress-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.progress-tab.active {
  background: var(--accent);
  color: #fff;
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.progress-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.progress-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

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

.progress-section-title {
  font-size: 18px;
  margin-bottom: 16px;
}

.progress-goals-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.progress-goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.progress-goal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-goal-category {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.progress-goal-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.progress-goal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-goal-values {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.progress-goal-bar {
  height: 6px;
  background: var(--surface-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.progress-goal-bar.large {
  height: 10px;
  border-radius: 5px;
}

.progress-goal-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s ease;
}

.progress-goals-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-goals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-goals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-goal-detail-card {
  padding: 20px;
}

.progress-goal-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-goal-deadline {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-goal-detail-values {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
}

.progress-goal-current {
  font-size: 20px;
  font-weight: 700;
}

.progress-goal-target {
  font-size: 14px;
  color: var(--text-muted);
  align-self: flex-end;
}

.progress-goal-pct-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

.progress-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-history-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.progress-history-date {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 60px;
}

.progress-history-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-history-class {
  font-weight: 600;
}

.progress-history-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* Health Integrations */

.progress-health {
  max-width: 800px;
}

.progress-health-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.health-integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.health-integration-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-integration-card h3 {
  font-size: 16px;
}

.health-integration-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.health-integration-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  margin-bottom: 4px;
}

.health-integration-icon.apple-health {
  background: linear-gradient(135deg, #ff2d55, #ff6482);
}

.health-integration-icon.google-fit {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.health-integration-icon.garmin {
  background: linear-gradient(135deg, #007dc5, #00a1e0);
}

.health-integration-icon.fitbit {
  background: linear-gradient(135deg, #00b0b9, #00d4aa);
}

.health-connected-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}

.health-data-preview {
  padding: 24px;
}

.health-data-preview h3 {
  margin-bottom: 8px;
}

.health-data-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.health-data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.health-data-item {
  text-align: center;
  padding: 12px;
  background: var(--surface-elevated);
  border-radius: var(--radius);
}

.health-data-value {
  font-size: 20px;
  font-weight: 700;
}

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

/* ============================================
   CHECK-IN / TAP-TO-PAY
   ============================================ */

.checkin-success-banner {
  background: var(--success);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkin-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.checkin-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkin-tap-card {
  padding: 32px;
  text-align: center;
}

.checkin-tap-card h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.checkin-tap-card > p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.checkin-reader-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.reader-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.reader-indicator.disconnected {
  background: var(--text-muted);
}

.reader-indicator.connecting {
  background: var(--warning);
  animation: pulse 1s infinite;
}

.reader-indicator.ready {
  background: var(--success);
}

.reader-indicator.reading {
  background: var(--accent);
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.checkin-tap-visual {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.tap-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: var(--text-muted);
}

.tap-circle.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.tap-circle.reading {
  border-color: var(--warning);
  animation: pulse 0.5s infinite;
}

.checkin-tap-info {
  margin-top: 28px;
  text-align: left;
}

.checkin-tap-info h4 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.checkin-methods {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.checkin-method {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.method-icon {
  background: var(--surface-elevated);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.checkin-manual-card {
  padding: 24px;
}

.checkin-manual-card h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.checkin-manual-row {
  display: flex;
  gap: 8px;
}

.checkin-manual-row .form-input {
  flex: 1;
}

.checkin-sidebar .card {
  padding: 20px;
}

.checkin-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.checkin-sidebar-header h2 {
  font-size: 16px;
}

.checkin-count-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.checkin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkin-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.checkin-list-name {
  font-weight: 600;
  font-size: 14px;
}

.checkin-list-time {
  font-size: 12px;
  color: var(--text-muted);
}

.checkin-method-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--surface-elevated);
  color: var(--text-muted);
  font-weight: 600;
}

.checkin-method-badge.tap {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.checkin-method-badge.manual {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* Revenue/progress/checkin responsive — merged into main 768px breakpoint above */
@media (max-width: 768px) {
  .revenue-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .revenue-stat-value {
    font-size: 22px;
  }
  .revenue-breakdown-row {
    grid-template-columns: 1fr;
  }
  .revenue-chart {
    gap: 8px;
    height: 160px;
  }
  .progress-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .progress-stat-value {
    font-size: 22px;
  }
  .progress-tabs {
    flex-wrap: wrap;
  }
  .progress-tab {
    flex: unset;
    padding: 8px 14px;
    font-size: 13px;
  }
  .health-integrations-grid {
    grid-template-columns: 1fr;
  }
  .health-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .checkin-layout {
    grid-template-columns: 1fr;
  }
  .checkin-tap-card {
    padding: 24px 16px;
  }
  .tap-circle {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .revenue-stats-grid {
    grid-template-columns: 1fr;
  }
  .progress-stats-grid {
    grid-template-columns: 1fr;
  }
  .progress-goals-preview {
    grid-template-columns: 1fr;
  }
}

/* Demo tryout section */

.demo-tryout {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.demo-tryout-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.demo-tryout-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.demo-tryout-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.demo-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.demo-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.demo-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.demo-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.demo-tryout-note {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.btn-full {
  width: 100%;
}

@media (max-width: 520px) {
  .demo-tryout-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MARKETING / LANDING PAGE
   ============================================ */

.marketing {
  --mkt-bg: #09090b;
  --mkt-surface: #18181b;
  --mkt-border: rgba(255, 255, 255, 0.08);
  --mkt-text: #fafafa;
  --mkt-text-muted: #a1a1aa;
  --mkt-accent: #6366f1;
  --mkt-accent-hover: #818cf8;
  --mkt-radius: 12px;
  background: var(--mkt-bg);
  color: var(--mkt-text);
  min-height: 100vh;
}

/* Nav */

.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mkt-border);
}

.mkt-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mkt-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mkt-accent);
  letter-spacing: -0.5px;
}

.mkt-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.mkt-nav-link {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.mkt-nav-link:hover {
  color: var(--mkt-text);
}

.mkt-nav-cta {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  background: var(--mkt-accent);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.mkt-nav-cta:hover {
  background: var(--mkt-accent-hover);
}

/* Hero */

.mkt-hero {
  padding: 80px 24px 60px;
}

.mkt-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.mkt-hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.mkt-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--mkt-text-muted);
  margin-bottom: 32px;
  max-width: 520px;
}

.mkt-hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.mkt-hero-note {
  font-size: 0.8rem;
  color: var(--mkt-text-muted);
}

/* Buttons */

.mkt-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--mkt-accent);
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.mkt-btn-primary:hover {
  background: var(--mkt-accent-hover);
  transform: translateY(-1px);
}

.mkt-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: var(--mkt-text);
  border: 1px solid var(--mkt-border);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.mkt-btn-secondary:hover {
  border-color: var(--mkt-accent);
  transform: translateY(-1px);
}

.mkt-btn-lg {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.mkt-btn-full {
  width: 100%;
}

/* Hero image */

.mkt-hero-visual {
  display: flex;
  justify-content: center;
}

.mkt-hero-img {
  width: 100%;
  max-width: 580px;
  border-radius: var(--mkt-radius);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--mkt-border);
}

/* Proof bar */

.mkt-proof {
  border-top: 1px solid var(--mkt-border);
  border-bottom: 1px solid var(--mkt-border);
  padding: 24px;
}

.mkt-proof-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.mkt-proof-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mkt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mkt-proof-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mkt-text-muted);
  opacity: 0.4;
}

/* Section shared */

.mkt-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mkt-section-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.mkt-section-subtitle {
  font-size: 1.05rem;
  color: var(--mkt-text-muted);
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero badge */

.mkt-hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mkt-accent);
  border: 1px solid var(--mkt-accent);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* Verticals grid */

.mkt-verticals {
  padding: 80px 0;
  background: var(--mkt-surface);
  border-top: 1px solid var(--mkt-border);
  border-bottom: 1px solid var(--mkt-border);
}

.mkt-verticals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.mkt-vertical-card {
  position: relative;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.mkt-vertical-card:hover {
  border-color: var(--mkt-accent);
  transform: translateY(-3px);
}

.mkt-vertical-img {
  height: 140px;
  width: 100%;
}

.mkt-vertical-info {
  padding: 20px;
}

.mkt-vertical-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.mkt-vertical-info p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--mkt-text-muted);
}

.mkt-vertical-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mkt-vertical-badge.live {
  background: #22c55e;
  color: #fff;
  border: none;
}

.mkt-vertical-badge.soon {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
}

.mkt-vertical-badge.preview {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
}

/* Features */

.mkt-features {
  padding: 80px 0;
}

.mkt-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mkt-feature-card {
  padding: 28px;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  transition: border-color 0.2s, transform 0.2s;
}

.mkt-feature-card:hover {
  border-color: var(--mkt-accent);
  transform: translateY(-2px);
}

.mkt-feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.mkt-feature-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.mkt-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mkt-feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mkt-text-muted);
}

/* How it works */

.mkt-how {
  padding: 80px 0;
  background: var(--mkt-surface);
  border-top: 1px solid var(--mkt-border);
  border-bottom: 1px solid var(--mkt-border);
}

.mkt-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mkt-step {
  text-align: center;
  flex: 1;
  max-width: 280px;
}

.mkt-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mkt-accent);
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.mkt-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mkt-step p {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  line-height: 1.5;
}

.mkt-step-arrow {
  font-size: 1.5rem;
  color: var(--mkt-text-muted);
  opacity: 0.4;
}

/* Pricing */

.mkt-pricing {
  padding: 80px 0;
}

.mkt-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}

.mkt-price-card {
  padding: 32px;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  position: relative;
}

.mkt-price-card.featured {
  border-color: var(--mkt-accent);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.mkt-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mkt-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.mkt-price-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mkt-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.mkt-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--mkt-text-muted);
}

.mkt-price-desc {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  margin-bottom: 24px;
}

.mkt-price-list {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.mkt-price-list li {
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--mkt-border);
  color: var(--mkt-text-muted);
}

.mkt-price-list li::before {
  content: "✓ ";
  color: var(--mkt-accent);
  font-weight: 700;
}

/* Pricing note */

.mkt-pricing-note {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
}

.mkt-pricing-note a {
  color: var(--mkt-accent);
  text-decoration: none;
}

.mkt-pricing-note a:hover {
  text-decoration: underline;
}

/* Comparison table */

.mkt-compare {
  margin-top: 64px;
  padding: 40px;
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
}

.mkt-compare-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 32px;
}

.mkt-compare-grid {
  display: grid;
  gap: 0;
}

.mkt-compare-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--mkt-border);
  align-items: center;
}

.mkt-compare-item:last-child {
  border-bottom: none;
}

.mkt-compare-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mkt-text);
}

.mkt-compare-them {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  text-align: center;
  text-decoration: line-through;
  opacity: 0.6;
}

.mkt-compare-us {
  font-size: 0.85rem;
  font-weight: 700;
  color: #22c55e;
  text-align: center;
}

/* CTA */

.mkt-cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
  border-top: 1px solid var(--mkt-border);
}

.mkt-cta-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.mkt-cta-subtitle {
  font-size: 1.1rem;
  color: var(--mkt-text-muted);
  margin-bottom: 32px;
}

/* Footer */

.mkt-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--mkt-border);
}

.mkt-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mkt-footer-brand {
  margin-bottom: 32px;
}

.mkt-footer-tagline {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  margin-top: 8px;
}

.mkt-footer-links {
  display: flex;
  gap: 80px;
  margin-bottom: 32px;
}

.mkt-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mkt-footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mkt-footer-col a {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  text-decoration: none;
}

.mkt-footer-col a:hover {
  color: var(--mkt-text);
}

.mkt-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--mkt-border);
  font-size: 0.8rem;
  color: var(--mkt-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mkt-footer-legal {
  color: var(--mkt-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.mkt-footer-legal:hover {
  color: var(--mkt-text);
}

/* Legal pages */

.mkt-legal {
  padding: 80px 24px 60px;
}

.mkt-legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.mkt-legal h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.mkt-legal-updated {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  margin-bottom: 32px;
}

.mkt-legal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.mkt-legal h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.mkt-legal p,
.mkt-legal li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--mkt-text-muted);
  margin-bottom: 12px;
}

.mkt-legal ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.mkt-legal li {
  margin-bottom: 8px;
}

.mkt-legal a {
  color: var(--mkt-accent);
  text-decoration: none;
}

.mkt-legal a:hover {
  text-decoration: underline;
}

/* Vertical demo mockups */

.demo-v-mockup {
  background: var(--mkt-surface);
  border: 1px solid var(--mkt-border);
  border-radius: var(--mkt-radius);
  padding: 24px;
}

.demo-v-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.demo-v-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.demo-v-filters {
  display: flex;
  gap: 8px;
}

.demo-v-filter {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--mkt-text-muted);
  cursor: pointer;
}

.demo-v-filter.active {
  background: var(--mkt-accent);
  color: white;
}

.demo-v-class-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--mkt-accent);
  border-bottom: 1px solid var(--mkt-border);
}

.demo-v-class-card:last-child {
  border-bottom: none;
}

.demo-v-class-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mkt-accent);
  min-width: 80px;
}

.demo-v-class-info {
  flex: 1;
}

.demo-v-class-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.demo-v-class-instructor {
  font-size: 0.8rem;
  color: var(--mkt-text-muted);
  margin-bottom: 4px;
}

.demo-v-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.demo-v-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--mkt-accent);
}

.demo-v-class-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.demo-v-spots {
  font-size: 0.75rem;
  color: var(--mkt-text-muted);
}

.demo-v-book-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}

.demo-v-feature-tag {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--mkt-accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.demo-v-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.demo-v-service-card {
  padding: 16px;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--mkt-text);
  transition: border-color 0.15s;
}

.demo-v-service-card:hover,
.demo-v-service-card.selected {
  border-color: var(--v-color, var(--mkt-accent));
}

.demo-v-service-card.selected {
  background: rgba(99, 102, 241, 0.05);
}

.demo-v-service-name {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.demo-v-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.demo-v-staff-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--mkt-text);
  transition: border-color 0.15s;
}

.demo-v-staff-card:hover,
.demo-v-staff-card.selected {
  border-color: var(--v-color, var(--mkt-accent));
}

.demo-v-staff-card.selected {
  background: rgba(99, 102, 241, 0.05);
}

.demo-v-staff-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.demo-v-staff-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.demo-v-staff-title {
  font-size: 0.75rem;
  color: var(--mkt-text-muted);
  margin-bottom: 4px;
}

.demo-v-duration-grid {
  display: flex;
  gap: 12px;
}

.demo-v-duration-card {
  flex: 1;
  padding: 16px;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  color: var(--mkt-text);
  transition: border-color 0.15s;
}

.demo-v-duration-card:hover,
.demo-v-duration-card.selected {
  border-color: var(--v-color, var(--mkt-accent));
}

.demo-v-duration-card.selected {
  background: rgba(99, 102, 241, 0.05);
}

.demo-v-duration-label {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  margin-bottom: 4px;
}

.demo-v-duration-price {
  font-size: 1.2rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .demo-v-service-grid,
  .demo-v-staff-grid {
    grid-template-columns: 1fr;
  }

  .demo-v-duration-grid {
    flex-wrap: wrap;
  }

  .demo-v-class-card {
    flex-wrap: wrap;
  }

  .demo-v-filters {
    display: none;
  }
}

/* Marketing light mode */

@media (prefers-color-scheme: light) {
  .marketing {
    --mkt-bg: #ffffff;
    --mkt-surface: #f4f4f5;
    --mkt-border: rgba(0, 0, 0, 0.08);
    --mkt-text: #18181b;
    --mkt-text-muted: #52525b;
    --mkt-accent: #4f46e5;
    --mkt-accent-hover: #6366f1;
  }

  .mkt-nav {
    background: rgba(255, 255, 255, 0.85);
  }

  .mkt-hero-img {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  }

  .mkt-price-card.featured {
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.1);
  }

  .mkt-cta {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(79, 70, 229, 0.02));
  }

  .mkt-how {
    background: var(--mkt-surface);
  }
}

/* Marketing responsive */

@media (max-width: 768px) {
  .mkt-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mkt-hero-title {
    font-size: 2.2rem;
  }

  .mkt-hero-visual {
    order: -1;
  }

  .mkt-nav-links {
    gap: 12px;
  }

  .mkt-nav-link {
    display: none;
  }

  .mkt-verticals-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mkt-features-grid {
    grid-template-columns: 1fr;
  }

  .mkt-pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
    margin: 0 auto;
  }

  .mkt-steps {
    flex-direction: column;
  }

  .mkt-step-arrow {
    transform: rotate(90deg);
  }

  .mkt-compare {
    padding: 24px;
  }

  .mkt-compare-item {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }

  .mkt-compare-them,
  .mkt-compare-us {
    text-align: left;
  }

  .mkt-footer-links {
    gap: 40px;
  }

  .mkt-hero-actions {
    flex-direction: column;
  }

  .mkt-proof-dot {
    display: none;
  }

  .mkt-proof-inner {
    gap: 12px;
  }

  .mkt-proof-item {
    font-size: 0.7rem;
  }
}

/* ==========================================
   LEADERBOARDS — Dashboard Management
   ========================================== */

.lb-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.lb-board-card {
  padding: 20px;
}

.lb-board-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lb-board-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.lb-type-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.lb-board-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lb-board-actions {
  display: flex;
  gap: 8px;
}

/* Dashboard — Entry detail view */

.lb-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.lb-detail-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.lb-entries-table {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lb-entries-header {
  display: grid;
  grid-template-columns: 60px 1fr 120px 140px 80px;
  padding: 12px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.lb-entry-row {
  display: grid;
  grid-template-columns: 60px 1fr 120px 140px 80px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.lb-entry-row:last-child {
  border-bottom: none;
}

.lb-entry-row.top-3 {
  background: rgba(99, 102, 241, 0.05);
}

.lb-rank {
  font-weight: 700;
  font-size: 0.9rem;
}

.lb-rank.medal {
  color: var(--accent);
}

.lb-col-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Form checkbox */
.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Waitlist badge */
.class-waitlist-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--warning);
  color: #000;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Waitlist button in calendar */
.cal-event-btn.waitlist {
  background: var(--warning);
  color: #000;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Warning button variant */
.btn-warning {
  background: var(--warning);
  color: #000;
  border: none;
}

.btn-warning:hover {
  background: #d97706;
}

/* Revenue small value */
.revenue-stat-value-sm {
  font-size: 1.25rem;
}

/* ==========================================
   LEADERBOARDS — Member View
   ========================================== */

.lb-member-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lb-member-tab {
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.lb-member-tab:hover {
  background: var(--surface-elevated);
}

.lb-member-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.lb-member-board {
  margin-bottom: 24px;
}

.lb-member-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lb-member-board-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.lb-member-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 8px;
}

/* My stats bar */
.lb-my-stats {
  display: flex;
  gap: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.lb-my-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lb-my-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lb-my-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* Rankings list */
.lb-rankings {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.lb-rank-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.lb-rank-row:last-child {
  border-bottom: none;
}

.lb-rank-row.gold {
  background: rgba(255, 215, 0, 0.08);
}

.lb-rank-row.silver {
  background: rgba(192, 192, 192, 0.06);
}

.lb-rank-row.bronze {
  background: rgba(205, 127, 50, 0.06);
}

.lb-rank-pos {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lb-rank-row.gold .lb-rank-pos { color: #ffd700; }
.lb-rank-row.silver .lb-rank-pos { color: #c0c0c0; }
.lb-rank-row.bronze .lb-rank-pos { color: #cd7f32; }

.lb-rank-name {
  font-weight: 500;
}

.lb-rank-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* My history */
.lb-my-history {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.lb-my-history h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.lb-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-history-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.lb-history-value {
  font-weight: 600;
  min-width: 100px;
  font-variant-numeric: tabular-nums;
}

.lb-history-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.lb-history-note {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* Log score form */
.lb-log-form {
  padding: 20px;
  margin-top: 20px;
}

.lb-log-form h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ==========================================
   LEADERBOARD TV DISPLAY
   ========================================== */

.lb-tv-display {
  position: fixed;
  inset: 0;
  background: #000;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.lb-tv-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.lb-tv-header {
  text-align: center;
  margin-bottom: 48px;
}

.lb-tv-gym-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--lb-tv-color, #6366f1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.lb-tv-board-name {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lb-tv-unit {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lb-tv-rankings {
  width: 100%;
  max-width: 800px;
  padding: 0 40px;
}

.lb-tv-rank-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  padding: 16px 24px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 1.4rem;
  transition: all 0.3s;
}

.lb-tv-rank-row:last-child {
  border-bottom: none;
}

.lb-tv-rank-pos {
  font-weight: 800;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.lb-tv-rank-name {
  font-weight: 500;
}

.lb-tv-rank-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
}

/* Gold / Silver / Bronze */
.lb-tv-gold {
  background: rgba(255, 215, 0, 0.1);
}

.lb-tv-gold .lb-tv-rank-pos {
  color: #ffd700;
  font-size: 2.2rem;
}

.lb-tv-gold .lb-tv-rank-name {
  font-weight: 700;
  font-size: 1.6rem;
}

.lb-tv-gold .lb-tv-rank-value {
  color: #ffd700;
  font-size: 1.8rem;
}

.lb-tv-silver .lb-tv-rank-pos {
  color: #c0c0c0;
}

.lb-tv-silver .lb-tv-rank-value {
  color: #c0c0c0;
}

.lb-tv-bronze .lb-tv-rank-pos {
  color: #cd7f32;
}

.lb-tv-bronze .lb-tv-rank-value {
  color: #cd7f32;
}

/* Carousel dots */
.lb-tv-dots {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.lb-tv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.lb-tv-dot.active {
  background: var(--lb-tv-color, #6366f1);
  transform: scale(1.3);
}

.lb-tv-empty {
  text-align: center;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.3);
  padding: 48px;
}

.lb-tv-empty-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
}

/* ==========================================
   RESPONSIVE — Leaderboards
   ========================================== */

@media (max-width: 768px) {
  .lb-board-grid {
    grid-template-columns: 1fr;
  }

  .lb-entries-header,
  .lb-entry-row {
    grid-template-columns: 50px 1fr 80px 60px;
  }

  .lb-col-date {
    display: none;
  }

  .lb-my-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .lb-tv-board-name {
    font-size: 2rem;
  }

  .lb-tv-rank-row {
    font-size: 1.1rem;
    padding: 12px 16px;
  }

  .lb-tv-rank-pos {
    font-size: 1.3rem;
  }

  .lb-tv-gold .lb-tv-rank-pos {
    font-size: 1.6rem;
  }

  .lb-tv-rank-value {
    font-size: 1.2rem;
  }
}

/* ==========================================
   FORMS & WAIVERS
   ========================================== */

.forms-section {
  margin-bottom: 32px;
}

.forms-section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.forms-section-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.forms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-card-pending {
  border-left: 3px solid var(--warning);
}

.form-card-completed {
  border-left: 3px solid var(--success);
  opacity: 0.7;
}

.form-card-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.form-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.form-type-badge {
  background: var(--surface-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.form-required-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.form-completed-badge {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Signature Pad */
.signature-pad-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.signature-pad-canvas {
  width: 100%;
  height: 150px;
  background: var(--surface-elevated);
  cursor: crosshair;
  touch-action: none;
}

.signature-pad-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.signature-pad-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Form Completion */
.form-completion {
  max-width: 640px;
  margin: 0 auto;
}

.waiver-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}

.waiver-agree {
  font-weight: 600;
}

.field-required {
  color: var(--danger);
  margin-left: 2px;
}

/* Form Builder */
.form-builder-section {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.form-builder-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.form-builder-field {
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Submissions */
.submissions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-card {
  padding: 16px;
}

.submission-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.submission-responses {
  display: grid;
  gap: 8px;
}

.submission-field {
  display: flex;
  gap: 8px;
}

.submission-label {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 120px;
  color: var(--text-muted);
}

.submission-value {
  font-size: 0.85rem;
}

.submission-signature {
  margin-top: 12px;
}

.signature-img {
  max-width: 300px;
  height: auto;
  background: var(--surface-elevated);
  border-radius: var(--radius);
}

/* Modal large */
.modal-lg {
  max-width: 700px;
}

/* ==========================================
   ONBOARDING WIZARD
   ========================================== */

.onboarding-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.onboarding-card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.onboarding-header {
  margin-bottom: 32px;
}

.onboarding-header h1 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.step-indicators {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.step-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}

.step-dot.active {
  background: var(--accent);
}

.step-dot.complete {
  background: var(--success);
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.step-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.onboarding-step {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* URL input with prefix */
.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.input-prefix {
  padding: 8px 12px;
  background: var(--surface-elevated);
  border-right: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.input-with-prefix .form-input {
  border: none;
  border-radius: 0;
}

.field-hint {
  font-size: 0.8rem;
  margin-top: 4px;
}

.field-hint-success {
  color: var(--success);
}

.field-hint-error {
  color: var(--danger);
}

/* Color picker */
.color-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-input-row input[type="color"] {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: none;
  padding: 2px;
}

/* Branding preview */
.branding-preview {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
  text-align: center;
}

.preview-header {
  margin-bottom: 12px;
}

.preview-logo {
  max-height: 48px;
  max-width: 200px;
}

.preview-name {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Done step */
.onboarding-done {
  text-align: center;
  padding: 32px 0;
}

.done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.done-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ==========================================
   WORKOUTS
   ========================================== */

.workout-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workout-card {
  padding: 16px;
}

.workout-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.workout-exercises {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.workout-exercise-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.workout-exercise-name {
  font-weight: 500;
}

.workout-exercise-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.workout-notes {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Exercise builder */
.exercise-builder {
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sets-table {
  margin-top: 8px;
  padding-left: 8px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.set-number {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 40px;
}

.set-input {
  max-width: 100px;
}

/* ==========================================
   CHALLENGES (member-facing)
   ========================================== */

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.challenge-card {
  padding: 20px;
}

.challenge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.challenge-card-header h3 {
  font-size: 1.1rem;
}

.challenge-card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.challenge-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.challenge-my-progress {
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.challenge-card-actions {
  display: flex;
  gap: 8px;
}

.challenge-info {
  padding: 16px;
  margin-bottom: 16px;
}

.challenge-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Progress bar */
.progress-bar-container {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
  min-width: 2px;
}

/* ==========================================
   LEADS / CRM
   ========================================== */

.lead-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Leads table */
.leads-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.leads-table-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 120px 80px 40px;
  padding: 10px 16px;
  background: var(--surface-elevated);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.leads-table-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 120px 80px 40px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  align-items: center;
}

.leads-table-row:hover {
  background: var(--surface-elevated);
}

.lead-col-contact {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lead-col-source {
  text-transform: capitalize;
  font-size: 0.8rem;
}

.lead-col-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lead-status-select {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

/* Status badge colors */
.lead-status-new { border-color: var(--accent); }
.lead-status-contacted { border-color: #3b82f6; }
.lead-status-trial { border-color: var(--warning); }
.lead-status-converted { border-color: var(--success); }
.lead-status-lost { border-color: var(--danger); }

.lead-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.lead-status-badge.lead-status-new { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.lead-status-badge.lead-status-contacted { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.lead-status-badge.lead-status-trial { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.lead-status-badge.lead-status-converted { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.lead-status-badge.lead-status-lost { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Lead detail */
.lead-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.lead-detail-info {
  padding: 20px;
}

.lead-detail-info h3 {
  margin-bottom: 12px;
}

.lead-detail-info p {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.lead-detail-timeline {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.lead-detail-timeline h3 {
  margin-bottom: 16px;
}

.interaction-add {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.interaction-add .form-row {
  margin-bottom: 8px;
}

.interaction-add textarea {
  margin-bottom: 8px;
}

.interaction-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-item {
  padding: 12px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.interaction-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
}

.interaction-type-badge {
  background: var(--surface-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.interaction-content {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ==========================================
   RESPONSIVE — Phase 3
   ========================================== */

@media (max-width: 768px) {
  .lead-detail-grid {
    grid-template-columns: 1fr;
  }

  .leads-table-header,
  .leads-table-row {
    grid-template-columns: 1fr 1fr 80px 40px;
  }

  .lead-col-contact,
  .lead-col-date {
    display: none;
  }

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

  .onboarding-card {
    padding: 20px;
  }

  .lead-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .set-row {
    flex-wrap: wrap;
  }

  .set-input {
    max-width: 80px;
  }
}
