:root {
  --bg: #090b0d;
  --surface: #11161b;
  --surface-2: #171d23;
  --muted: #98a2ad;
  --text: #f7fafc;
  --line: rgba(255, 255, 255, 0.1);
  --green: #37ff8b;
  --orange: #ff8a2a;
  --red: #ff4d5f;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: 1.375rem;
  --fs-4: 1.75rem;
  --fs-5: 2.25rem;
  --fs-6: 3rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(55, 255, 139, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 0%, rgba(255, 138, 42, 0.14), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-size: var(--fs-1);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--fs-3);
  font-weight: 900;
  letter-spacing: 0;
}
.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 214, 10, 0.35);
}
.brand-text span { color: var(--green); }
.brand-large {
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}
.brand-large .brand-logo {
  width: 5rem;
  height: 5rem;
}
.sidebar-brand {
  margin-bottom: 1.25rem;
  padding: 0 0.35rem;
}
.footer-brand {
  margin-bottom: 0.75rem;
}
.footer-address {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  font-style: normal;
  color: var(--muted);
  line-height: 1.55;
  max-width: 22rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(9, 11, 13, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.top-nav a,
.side-nav a {
  color: var(--muted);
  padding: 0.72rem 0.9rem;
  border-radius: 0.75rem;
  transition: 180ms ease;
  font-size: 0.95rem;
}
.top-nav a:hover,
.side-nav a:hover,
.side-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.nav-cta {
  color: #061007 !important;
  background: var(--green) !important;
  font-weight: 800;
}

.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem);
}
.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.hero p { max-width: 650px; color: var(--muted); font-size: var(--fs-2); }
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 900;
  font-size: 0.8rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-panel {
  display: grid;
  gap: 1rem;
}
.hero-logo {
  width: min(12rem, 70vw);
  height: auto;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 10, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.metric-card,
.pricing-card,
.panel,
.auth-card,
.mini-card,
.stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.metric-card {
  padding: 1.5rem;
  border-radius: 0.85rem;
}
.metric-card strong { display: block; font-size: 1.85rem; color: var(--orange); }
.metric-card span { color: var(--muted); }

.section { padding: 4.5rem clamp(1rem, 4vw, 4rem); }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section h2,
.panel h2,
.auth-card h1,
.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.4rem);
  line-height: 1.05;
}
.pricing-grid,
.stats-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pricing-card {
  border-radius: 1rem;
  padding: 1.4rem;
  transition: 180ms ease;
}
.pricing-card:hover,
.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(55, 255, 139, 0.45);
}
.pricing-card h3 { margin: 0; font-size: 1.2rem; }
.price { color: var(--green); font-size: 2.05rem; font-weight: 900; margin: 1rem 0 0; }
.duration { color: var(--orange); font-weight: 800; }
.pricing-card ul,
.benefit-list {
  padding-left: 1.1rem;
  color: var(--muted);
}
.pricing-card li::marker,
.benefit-list li::marker { color: var(--green); }

.split {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 2rem;
  align-items: start;
  border-top: 1px solid var(--line);
}
.split p:last-child { color: var(--muted); font-size: var(--fs-2); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.socials { display: flex; gap: 0.8rem; flex-wrap: wrap; color: var(--green); font-weight: 800; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: 180ms ease;
  font-size: 0.95rem;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(55, 255, 139, 0.55); }
.btn.primary { background: linear-gradient(135deg, var(--green), #9dff56); color: #061007; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.full { width: 100%; }
.btn.small { min-height: 2.35rem; padding: 0.55rem 0.8rem; }
.btn.tiny { min-height: 2rem; padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.btn.danger { color: #fff; background: rgba(255, 77, 95, 0.14); border-color: rgba(255, 77, 95, 0.35); }
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
}
.menu-button { display: none; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.auth-shell { width: min(460px, 100%); }
.auth-brand { margin-bottom: 1rem; justify-content: center; width: 100%; }
.auth-card {
  border-radius: 1rem;
  padding: 1.5rem;
}
.auth-card p,
.auth-switch { color: var(--muted); }
.auth-switch a { color: var(--green); font-weight: 800; }
.form {
  display: grid;
  gap: 1rem;
}
.form label { display: grid; gap: 0.4rem; color: var(--muted); font-weight: 700; font-size: 0.92rem; }
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  padding: 0.85rem 0.9rem;
  outline: none;
}
textarea { resize: vertical; }
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(55, 255, 139, 0.6);
  box-shadow: 0 0 0 4px rgba(55, 255, 139, 0.12);
}
.password-field { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.password-field button {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--green);
  padding: 0 0.8rem;
  cursor: pointer;
}
.form-alert {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 77, 95, 0.35);
  background: rgba(255, 77, 95, 0.12);
  border-radius: 0.75rem;
  color: #ffd9de;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  background: rgba(9, 11, 13, 0.88);
  backdrop-filter: blur(18px);
}
.side-nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 2rem;
}
.logout-link { color: var(--red) !important; }
.dashboard-main {
  width: 100%;
  min-width: 0;
  padding: clamp(1rem, 3vw, 2rem);
}
.sidebar-toggle { display: none; margin-bottom: 1rem; }
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(55, 255, 139, 0.1), rgba(255, 138, 42, 0.08));
}
.dashboard-hero p { color: var(--muted); }
.stats-grid { margin: 1rem 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
  border-radius: 0.85rem;
  padding: 1.1rem;
}
.stat-card span,
.mini-card span,
.mini-card em { display: block; color: var(--muted); }
.stat-card strong { font-size: 1.7rem; color: var(--green); }
.panel {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: 1rem;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td {
  padding: 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--green); font-size: 0.78rem; text-transform: uppercase; }
td { color: #dbe3e9; }
.actions,
.inline-form { display: flex; gap: 0.5rem; align-items: center; }
.mini-card {
  border-radius: 0.85rem;
  padding: 1rem;
  transition: 180ms ease;
}
.mini-card p { color: var(--muted); margin-bottom: 0; }
.membership-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.membership-card > div {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}
.membership-card span { display: block; color: var(--muted); }
.membership-card strong { color: var(--orange); font-size: 1.2rem; }
.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}
.span-2 { grid-column: span 2; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}
.modal.active { display: grid; }
.modal-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
  cursor: pointer;
}
.toast {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 60;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.toast.success { border-color: rgba(55, 255, 139, 0.45); }
.toast.error { border-color: rgba(255, 77, 95, 0.45); }
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  background: rgba(9, 11, 13, 0.58);
}
.loader.active { opacity: 1; }
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: 600ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-grid {
  display: grid;
  gap: 1.5rem;
}
.about-lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}
.mission-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.mission-card {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  transition: 180ms ease;
}
.mission-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 138, 42, 0.45);
}
.mission-card h3 {
  margin: 0 0 0.5rem;
  color: var(--orange);
}
.mission-card p {
  margin: 0;
  color: var(--muted);
}
.footer a:hover { color: var(--green); }
.muted-text { color: var(--muted); margin: 0; }
.subsection-title {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-active { color: var(--green); }
.status-expired { color: var(--red); }
.status-pending { color: var(--orange); }

.diet-timetable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.diet-day-card {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  transition: 180ms ease;
}
.diet-day-card:hover {
  border-color: rgba(55, 255, 139, 0.4);
  transform: translateY(-2px);
}
.diet-day-card h3 {
  margin: 0 0 0.75rem;
  color: var(--orange);
  font-size: 1rem;
}
.meal-slot {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
.meal-slot:first-of-type { border-top: 0; padding-top: 0; }
.meal-time {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--green);
  text-transform: uppercase;
}
.meal-details p { margin: 0 0 0.25rem; color: var(--text); font-size: 0.92rem; }
.meal-details span { color: var(--muted); font-size: 0.85rem; }
.diet-table { margin-top: 0.5rem; }
.workout-card strong { color: var(--green); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(255, 138, 42, 0.2);
  border: 1px solid rgba(255, 138, 42, 0.35);
  color: var(--orange);
  font-weight: 900;
  font-size: 0.8rem;
}

.form-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
  margin: 0.35rem 0;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.form-divider::before,
.form-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.choice-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: 180ms ease;
}
.choice-card:hover { border-color: rgba(55, 255, 139, 0.4); transform: translateY(-2px); }
.choice-card input { width: auto; margin: 0; }
.choice-card strong { color: var(--text); }
.choice-card span { color: var(--muted); font-size: 0.9rem; }

.payment-section { margin-top: 0.5rem; }
.online-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.online-method-card {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: 180ms ease;
}
.online-method-card:hover { border-color: rgba(255, 138, 42, 0.45); transform: translateY(-2px); }
.online-method-card input { width: auto; margin: 0; }
.qr-thumb {
  width: 100%;
  max-width: 180px;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-weight: 900;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  text-transform: capitalize;
}
.pill-active,
.pill-approved,
.pill-paid { color: var(--green); border-color: rgba(55, 255, 139, 0.35); background: rgba(55, 255, 139, 0.12); }
.pill-pending,
.pill-pending_admin_approval,
.pill-waiting_cash_confirmation { color: var(--orange); border-color: rgba(255, 138, 42, 0.35); background: rgba(255, 138, 42, 0.12); }
.pill-expired,
.pill-rejected,
.pill-failed,
.pill-blocked { color: #ffd9de; border-color: rgba(255, 77, 95, 0.35); background: rgba(255, 77, 95, 0.12); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}
.gallery-item-btn {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
}
.gallery-item-btn img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 1rem;
  transition: 220ms ease;
}
.gallery-hover {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
  color: var(--text);
  font-weight: 800;
  transform: translateY(15%);
  opacity: 0;
  transition: 220ms ease;
}
.gallery-item-btn:hover img { transform: scale(1.03); }
.gallery-item-btn:hover .gallery-hover { opacity: 1; transform: translateY(0); }

.admin-gallery .gallery-item {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.admin-gallery img { width: 100%; height: 180px; object-fit: cover; display: block; }
.admin-gallery figcaption { padding: 0.85rem; display: grid; gap: 0.35rem; }
.admin-gallery figcaption span { color: var(--muted); font-size: 0.9rem; }

.lightbox-card { width: min(920px, 100%); }
.lightbox-card img { width: 100%; height: auto; border-radius: 1rem; border: 1px solid var(--line); }

.event-banner {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--line);
  margin-top: 0.75rem;
}

.health-grid .stat-card em { display: block; color: var(--muted); margin-top: 0.25rem; font-style: normal; }

@media (max-width: 980px) {
  .hero,
  .split,
  .app-shell { grid-template-columns: 1fr; }
  .pricing-grid,
  .cards-grid,
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar {
    position: fixed;
    z-index: 30;
    width: 280px;
    transform: translateX(-100%);
    transition: 200ms ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: inline-grid; place-items: center; }
}

@media (max-width: 720px) {
  .menu-button { display: inline-grid; place-items: center; }
  .top-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(9, 11, 13, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .top-nav.open { display: flex; }
  .hero { min-height: auto; padding-top: 3rem; }
  .mission-cards,
  .pricing-grid,
  .cards-grid,
  .stats-grid,
  .membership-card,
  .two-col,
  .choice-grid,
  .grid-form,
  .diet-timetable { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .dashboard-hero,
  .footer,
  .panel-head { flex-direction: column; align-items: stretch; }
  .actions { flex-direction: column; align-items: flex-start; }
}

.trainer-badge {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.trainer-badge strong { display: block; font-size: 1.1rem; margin-top: 0.25rem; }
.trainer-badge em { display: block; margin-top: 0.35rem; color: var(--muted); font-style: normal; font-size: 0.9rem; }

.public-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.public-gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.public-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.public-gallery-item figcaption {
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.form-alert.success { border-color: rgba(76, 175, 80, 0.5); color: #9be7a4; }
.stack-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.inline-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
