@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000000;
  --card: #1c1c1e;
  --card-hover: #2c2c2e;
  --border: rgba(255,255,255,0.08);
  --input: #2c2c2e;
  --muted: #888;
  --red: #e63030;
  --red-dark: #c72828;
  --gold: #f5a623;
  --white: #ededed;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-green { color: #4ade80; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.1; }
.leading-relaxed { line-height: 1.6; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.rounded { border-radius: 10px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-red { border-color: var(--red); }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.self-start { align-self: flex-start; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.2s; }
.block { display: block; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .text-5xl { font-size: 2.25rem; }
}

/* Components */
.card {
  background: #1c1c1e;
  border-radius: 16px;
  padding: 1.25rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--input); color: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--card-hover); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: #fff; background: var(--card); }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, .select-input {
  background: var(--input);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.input:focus, .select-input:focus { border-color: var(--red); }
.input::placeholder { color: var(--muted); }
.select-input { cursor: pointer; }

.input-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  display: block;
}

.form-group { display: flex; flex-direction: column; gap: 0.25rem; }

/* Layout */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 14rem;
  background: #1c1c1e;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-logo { padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-link.active { color: var(--red); background: rgba(230,48,48,0.1); }
.sidebar-group-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: #555; padding: 0.85rem 0.85rem 0.3rem;
  user-select: none;
}

.topbar {
  height: 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #1c1c1e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page-content { flex: 1; overflow-y: auto; padding: 1.5rem; }

/* ===== Page transitions & animations ===== */
@keyframes pageFadeIn {
  from { opacity:0; transform:translateY(12px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes cardSlideUp {
  from { opacity:0; transform:translateY(16px); }
  to { opacity:1; transform:translateY(0); }
}
.page-content {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.page-content > div {
  animation: pageFadeIn 0.25s ease-out;
}
.app-shell {
  animation: pageFadeIn 0.3s ease-out;
}

/* Dashboard widget stagger */
.db-grid > * {
  animation: cardSlideUp 0.4s ease-out both;
}
.db-grid > *:nth-child(1) { animation-delay:0.05s; }
.db-grid > *:nth-child(2) { animation-delay:0.1s; }
.db-grid > *:nth-child(3) { animation-delay:0.15s; }
.db-grid > *:nth-child(4) { animation-delay:0.2s; }
.db-grid > *:nth-child(5) { animation-delay:0.25s; }
.db-grid > *:nth-child(6) { animation-delay:0.3s; }
.db-grid > *:nth-child(7) { animation-delay:0.35s; }
.db-grid > *:nth-child(8) { animation-delay:0.4s; }
.db-grid > *:nth-child(9) { animation-delay:0.45s; }
.db-grid > *:nth-child(10) { animation-delay:0.5s; }

/* Widget cards animate in */
.mr-detail, .w-widget, .kpi-card, .pay-stat-card {
  animation: cardSlideUp 0.35s ease-out both;
}

/* Smooth sidebar link transitions */
.sidebar-link { transition: all 0.25s ease; }

/* Button press feedback */
.btn { transition: all 0.15s ease; }
.btn:active { transform: scale(0.97); }

/* Card hover lift */
.db-widget { transition: transform 0.2s ease, background 0.2s ease; }
.db-widget:hover { transform: translateY(-2px); }

/* Smooth ring animation */
@keyframes ringFill {
  from { stroke-dashoffset: 182; }
}
.db-ring-wrap svg circle:last-child,
.mr-ring-wrap svg circle:last-child,
.kpi-ring-wrap svg circle:last-child {
  animation: ringFill 0.8s ease-out;
}

/* Muscle tags */
.muscle-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  color: #ccc;
  background: var(--input);
  transition: all 0.2s;
}
.muscle-tag.selected { background: var(--red); border-color: var(--red); color: #fff; }
.muscle-tag:hover:not(.selected) { border-color: var(--red); color: var(--red); }
.muscle-tag-other { border-style: dashed; color: var(--red); border-color: var(--red); background: transparent; }
.muscle-tag-other:hover { background: rgba(230,48,48,0.1); }
.muscle-tag-x {
  background: rgba(0,0,0,0.25); border: none; color: #fff; cursor: pointer;
  border-radius: 9999px; width: 16px; height: 16px; padding: 0; margin-left: 0.35rem;
  font-size: 0.7rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.muscle-tag-x:hover { background: rgba(0,0,0,0.5); }
.muscle-other-input {
  background: var(--input); border: 1px solid var(--red); border-radius: 9999px;
  color: #fff; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600;
  outline: none; width: 140px; text-transform: uppercase;
}

/* ===== Notifications (bell + dropdown) ===== */
.notif-wrap { position: relative; display: inline-flex; }
.notif-bell-btn {
  position: relative; background: transparent; border: none; cursor: pointer;
  color: #ccc; font-size: 1.25rem; padding: 0.4rem 0.5rem; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.notif-bell-btn:hover { background: var(--card-hover); color: #fff; }
.notif-badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px;
  background: var(--red); color: #fff; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 700; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card); line-height: 1;
}
.notif-panel {
  /* Fixed so it escapes the .main-content overflow:hidden clip (was invisible
     in portrait on mobile because the dropdown fell into the clipped zone). */
  position: fixed; top: calc(3.5rem + 8px); right: 1rem;
  width: 340px; max-height: calc(100vh - 4.5rem);
  background: #1c1c1e; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  overflow: hidden; display: flex; flex-direction: column;
  z-index: 200;
}
.notif-panel.hidden { display: none; }
.notif-header {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card-hover);
}
.notif-header strong { font-size: 0.9rem; color: #fff; }
.notif-mark-all {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-size: 0.72rem; font-weight: 600;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; gap: 0.65rem; align-items: flex-start;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--card-hover); }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
  width: 30px; height: 30px; border-radius: 9999px; flex-shrink: 0;
  background: rgba(230,48,48,0.15); color: var(--red);
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 0.82rem; color: #eee; line-height: 1.35; word-wrap: break-word; }
.notif-msg strong { color: #fff; }
.notif-time { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }
.notif-ack {
  background: transparent; border: 1px solid var(--border); color: #ccc;
  padding: 0.28rem 0.55rem; border-radius: 6px; cursor: pointer; font-size: 0.68rem;
  font-weight: 600; flex-shrink: 0; transition: all 0.15s; white-space: nowrap;
}
.notif-ack:hover { border-color: var(--red); color: var(--red); }
.notif-empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 480px) {
  .notif-panel { left: 0.75rem; right: 0.75rem; width: auto; }
}

/* ===== Events & Classes section ===== */
.events-grid {
  display: flex; flex-direction: column; gap: 1.5rem;
  max-width: 960px; margin: 0 auto; align-items: stretch;
}

/* ===== Event card (Option B) ===== */
.event-card {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
}
.event-card-img {
  background: #222 center / cover no-repeat;
  min-height: 320px;
  position: relative;
}
.event-card-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0) 40%, rgba(230,48,48,0.22));
  pointer-events: none;
}
.event-card-body {
  padding: 1.75rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.event-kicker {
  color: var(--red); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; margin: 0 0 0.5rem;
}
.event-title {
  font-size: 1.85rem; font-weight: 900; margin: 0 0 0.45rem; line-height: 1.15;
}
.event-sub {
  color: var(--muted); margin: 0 0 1.25rem; font-size: 1rem;
}
.event-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.event-meta-item { display: flex; flex-direction: column; gap: 0.15rem; }
.event-meta-lbl {
  font-size: 0.65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.event-meta-val { color: #fff; font-weight: 800; font-size: 1rem; }
.event-price { color: var(--red); font-size: 1.1rem; }
.event-meta-link {
  color: var(--red); font-weight: 800; font-size: 0.92rem;
  text-decoration: none; transition: filter .15s;
}
.event-meta-link:hover { filter: brightness(1.2); }
.event-powered-by {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(0,0,0,0.45);
  border-top: 1px solid var(--border);
  font-size: 0.72rem; color: rgba(255,255,255,0.65);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
}
.event-powered-by img { height: 28px; width: auto; }
@media (max-width: 720px) {
  .event-card { grid-template-columns: 1fr; }
  .event-card-img { min-height: 220px; }
  .event-card-body { padding: 1.5rem 1.25rem; }
  .event-title { font-size: 1.5rem; }
}

/* ===== Event modal ===== */
.event-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
  backdrop-filter: blur(4px);
}
.event-modal-backdrop.hidden { display: none; }
.event-modal {
  background: #1c1c1e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 48px rgba(0,0,0,0.6);
}
.event-modal-close {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: transparent; border: none; color: #ccc;
  font-size: 1.1rem; width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; transition: all 0.15s;
}
.event-modal-close:hover { background: var(--card-hover); color: #fff; }
.event-modal-title { font-size: 1.4rem; font-weight: 900; margin: 0 0 0.4rem; line-height: 1.2; }
.event-modal-sub { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.9rem; }

/* ===== App Preview Carousel ===== */
.app-carousel-wrap { position:relative; overflow:hidden; }
.app-carousel-track {
  display:flex; gap:40px; transition:transform 0.5s cubic-bezier(0.25,0.1,0.25,1);
  padding:0 calc(50% - 160px);
}
.app-phone { flex-shrink:0; width:320px; transition:transform 0.4s, opacity 0.4s; }
.app-phone:not(.active) { transform:scale(0.85); opacity:0.3; }
.app-phone.active { transform:scale(1); opacity:1; }
.app-phone-frame {
  background:#1c1c1e; border-radius:36px; border:3px solid #333; overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}
.app-phone-notch { height:28px; background:#000; border-radius:0 0 18px 18px; width:130px; margin:0 auto; }
.app-phone-screen { background:#000; padding:10px 16px 24px; min-height:480px; }
.app-carousel-dots { display:flex; gap:8px; justify-content:center; margin-top:1.5rem; }
.app-dot { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.15); cursor:pointer; border:none; transition:all .3s; }
.app-dot.active { background:#e63030; width:24px; border-radius:4px; }
@media (max-width:640px) {
  .app-carousel-track { padding:0 calc(50% - 140px); gap:30px; }
  .app-phone { width:280px; }
  .app-phone-screen { min-height:420px; }
}

/* ===== Sponsor strip (landing page, above footer) ===== */
.sp-strip {
  background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem; text-align: center;
}
.sp-kicker {
  display: block; color: var(--muted); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.sp-row {
  display: flex; flex-wrap: wrap; gap: 2rem 3rem;
  justify-content: center; align-items: center;
}
.sp-logo {
  width: 200px; height: 60px; object-fit: contain; object-position: center;
  opacity: 0.7; transition: opacity 0.25s, transform 0.25s;
}
.sp-logo:hover { opacity: 1; transform: scale(1.04); }
/* Square/round logos get a bigger box so the visual mass matches wide wordmarks. */
.sp-logo-square { width: 90px; height: 90px; }
@media (max-width: 480px) {
  .sp-logo { width: 150px; height: 50px; }
  .sp-logo-square { width: 72px; height: 72px; }
  .sp-row { gap: 1.5rem 2rem; }
}

/* ===== Week status tags (members list) ===== */
.week-tag { display:inline-block; font-size:0.65rem; font-weight:700; padding:2px 8px; border-radius:9999px; letter-spacing:0.02em; }
.week-tag-pending { background:rgba(234,179,8,0.15); color:#eab308; }
.week-tag-done { background:rgba(74,222,128,0.15); color:#4ade80; }
.week-tag-none { background:rgba(136,136,136,0.15); color:#888; }

/* ===== Trainers & Assignments page ===== */
.ta-list { display: flex; flex-direction: column; gap: 0.75rem; }
.ta-card {
  background: #1c1c1e; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  overflow: hidden; transition: border-color .15s;
}
.ta-card.ta-open { border-color: rgba(230,48,48,0.35); }
.ta-card-unassigned { border-style: dashed; }
.ta-card-head {
  display: flex; align-items: center; gap: 0.85rem;
  width: 100%; padding: 1rem 1.15rem;
  background: transparent; border: none; cursor: pointer; color: inherit;
  text-align: left; transition: background .15s;
}
.ta-card-head:hover { background: var(--card-hover); }
.ta-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(245,166,35,0.15); color: #f5a623;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.ta-avatar-muted { background: rgba(255,255,255,0.06); color: var(--muted); }
.ta-card-head-body { flex: 1; min-width: 0; }
.ta-card-head-name { font-weight: 700; color: #fff; font-size: 0.95rem; }
.ta-card-head-email { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.ta-count-pill {
  background: var(--red); color: #fff; font-weight: 800; font-size: 0.8rem;
  padding: 0.2rem 0.6rem; border-radius: 9999px; min-width: 26px; text-align: center;
}
.ta-card-unassigned .ta-count-pill { background: #666; }
.ta-chevron {
  color: var(--muted); font-size: 0.9rem; transition: transform .2s;
  margin-left: 0.25rem;
}
.ta-card.ta-open .ta-chevron { transform: rotate(180deg); color: var(--red); }

.ta-card-body {
  border-top: 1px solid var(--border); padding: 0.5rem 0.75rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.ta-card-body[hidden] { display: none; }
.ta-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.65rem; border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.ta-row-name { flex: 1; min-width: 0; }
.ta-row-name-main { font-weight: 600; font-size: 0.9rem; }
.ta-row-name-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.ta-select {
  background: var(--input); border: 1px solid var(--border); color: #fff;
  padding: 0.35rem 0.55rem; border-radius: 10px; font-size: 0.82rem;
  cursor: pointer; min-width: 150px; transition: border-color .3s, box-shadow .3s;
}
.ta-select:focus { outline: none; border-color: var(--red); }
.ta-select:disabled { opacity: 0.6; cursor: progress; }
.ta-select.ta-saved {
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.25);
}
.ta-empty { padding: 1rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 520px) {
  .ta-row { flex-wrap: wrap; }
  .ta-select { width: 100%; min-width: 0; }
}

/* ===== Registrations table ===== */
.reg-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.reg-table th, .reg-table td {
  padding: 0.55rem 0.65rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.reg-table th {
  color: var(--muted); font-weight: 700; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--card-hover);
}
.reg-table td a { color: #ccc; text-decoration: none; }
.reg-table td a:hover { color: var(--red); }
.reg-table tr:last-child td { border-bottom: none; }

/* Exercise block */
.exercise-block {
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.875rem;
  margin-bottom: 0.625rem;
  position: relative;
}

.slash-divider { color: var(--red); font-weight: 700; font-size: 1.125rem; text-align: center; margin: 0.25rem 0; }

.note-input {
  width: 100%;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #2c2c2e;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  outline: none;
  font-family: inherit;
}
.note-input:focus { border-color: var(--red); }

/* Preview */
.preview-panel { background: #000; border-radius: 16px; overflow: hidden; }
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #111;
  border-bottom: 1px solid var(--border);
}

/* Exercise picker */
.exercise-picker {
  position: absolute;
  z-index: 50;
  width: 100%;
  margin-top: 0.25rem;
  max-height: 12rem;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.exercise-picker-item {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: #ccc;
  cursor: pointer;
}
.exercise-picker-item:hover { background: var(--red); color: #fff; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.cal-day.has-workout { background: #16a34a; color: #fff; }
.cal-day.today { border: 1px solid var(--red); color: var(--red); }
.cal-day-header { font-size: 0.75rem; color: var(--muted); font-weight: 500; text-align: center; padding: 0.25rem 0; }

/* Weekly toggle (routine builder) */
.weekly-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  user-select: none;
}
.weekly-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--red); cursor: pointer; }
.weekly-toggle:has(input:checked) { background: rgba(230,48,48,0.12); border-color: var(--red); color: #fff; }

/* Weekly public page */
.weekly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.weekly-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.weekly-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.weekly-card-header h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.weekly-canvas { width: 100%; display: block; background: #000; }
.weekly-card-clickable { cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.weekly-card-clickable:hover { transform: translateY(-2px); border-color: var(--red); }
.weekly-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--red);
  font-weight: 600;
  text-align: right;
}

/* Member picker (routine builder) */
.member-picker-wrap { position: relative; }
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--red);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.member-chip-x {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.member-chip-x:hover { background: rgba(255,255,255,0.35); }

/* Responsive sidebar */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; z-index: 100; height: 100vh; }
  .mobile-menu-btn { display: inline-flex !important; }
  .builder-layout { flex-direction: column !important; }
  .preview-side { width: 100% !important; position: static !important; }
  /* Prevent iOS zoom on focus */
  .input, .select-input, .note-input { font-size: 16px !important; }
  /* Bigger tap targets */
  .muscle-tag { padding: 0.5rem 1rem; font-size: 0.8125rem; }
  .btn-sm { min-height: 2.25rem; padding: 0.45rem 0.75rem; }
  .exercise-block { padding: 1rem; }
  .exercise-picker-item { padding: 0.625rem 0.75rem; font-size: 0.9375rem; }
}
@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--card); }
::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #777; }

/* ===== Landing Page ===== */
.landing-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 80rem;
  margin: 0 auto;
}

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 70%, #000 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  max-width: 48rem;
  animation: fadeUp 1s ease-out;
}
.hero-content h1 {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1rem;
}
.hero-content h1 span {
  color: var(--red);
}
.hero-content p {
  font-size: 1.25rem;
  color: #bbb;
  line-height: 1.6;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.feature-card {
  position: relative;
  height: 22rem;
  border-radius: 16px;
  overflow: hidden;
  cursor: default;
}
.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.feature-card:hover img {
  transform: scale(1.05);
}
.feature-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}
.feature-card-overlay h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.feature-card-overlay p {
  font-size: 0.875rem;
  color: #aaa;
  line-height: 1.5;
}
.feature-card-link { cursor: pointer; }
.feature-card-link:hover .feature-card-cta { color: var(--red); }
.feature-card-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  padding: 0 0 1.5rem;
  text-align: center;
}
.team-photo {
  width: 100%;
  height: 20rem;
  overflow: hidden;
  background: #111;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.team-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 1.25rem 1.25rem 0;
}
.team-card p {
  margin: 0.75rem 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 768px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-photo { height: 22rem; }
}

.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-img {
  border-radius: 16px;
  overflow: hidden;
  height: 28rem;
}
.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-banner {
  background: var(--red);
  text-align: center;
  padding: 4rem 2rem;
}
.cta-banner h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
}
.cta-banner p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
}
.btn-white {
  background: #fff;
  color: #000;
  font-weight: 700;
}
.btn-white:hover {
  background: #ddd;
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero-content h1 { font-size: 3rem; }
  .hero-content { padding: 2rem 1.5rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { height: 16rem; }
  .about-section { grid-template-columns: 1fr; }
  .about-img { height: 18rem; }
  .cta-banner h2 { font-size: 1.75rem; }
  .landing-nav { padding: 1rem 1.25rem; }
}

/* ===== Mobile home button in topbar ===== */
.mobile-home-btn { display: none; }

/* ===== Mobile sidebar backdrop + close button (hidden on desktop) ===== */
.sidebar-backdrop { display: none; }
.sidebar-close-btn { display: none; }

/* ===== Dashboard — Option B (Activity Rings) ===== */
.db-dash { margin: 0 auto; }
.db-greeting { font-size: 0.85rem; color: var(--muted); margin-bottom: 2px; }
.db-name { font-size: 1.75rem; font-weight: 700; margin-bottom: 28px; letter-spacing: -0.02em; }
.db-section-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #666; margin-bottom: 10px; padding-left: 4px; }
.db-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.db-widget {
  background: #1c1c1e;
  border-radius: 20px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.db-widget:active { transform: scale(0.96); }
.db-widget-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.db-widget-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.db-ring-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.db-ring-wrap svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.db-ring-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 1.1rem; line-height: 1; }
.db-widget-body { flex: 1; min-width: 0; }
.db-widget-count { font-size: 1.6rem; font-weight: 800; line-height: 1; margin-bottom: 3px; letter-spacing: -0.03em; }
.db-widget-label { font-size: 0.75rem; font-weight: 600; color: #999; line-height: 1.2; }
.db-widget-sub { font-size: 0.68rem; color: #555; margin-top: 2px; }

@media (max-width: 640px) {
  .mobile-home-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    padding: 6px 12px;
    margin-left: 4px;
  }
  .mobile-menu-btn {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
  }
  .mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.12);
  }

  .sidebar-hide-mobile { display: none !important; }
  .topbar-welcome { display: none; }
  .topbar-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: background .25s ease, opacity .25s ease;
  }
  .sidebar-backdrop.open {
    background: rgba(0, 0, 0, 0.55);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar { z-index: 50; }

  .sidebar-close-btn {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }
  .sidebar-close-btn:active { background: rgba(255,255,255,0.08); }
}

