/* Northside Fitness - shared styles */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --page: #ffffff;
  --surface: #f8fafc;
  --ink: #0b1220;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-tint: #fef2f2;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 12px 32px rgba(15,23,42,.08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100%;
}

h1, h2, h3, h4 {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 .5em;
}
h3, h4 { font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
a.btn.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; height: auto; padding: 8px 4px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Forms */
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 18px; }

/* ===== Public header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 34px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--surface); color: var(--ink); }
.main-nav a.active { background: var(--accent-tint); color: var(--accent-hover); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-staff-login { display: none; }

@media (max-width: 860px) {
  .site-header .bar { flex-wrap: nowrap; height: 68px; }
  .brand { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 2px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 14px 16px; }
  .nav-staff-login {
    display: block;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 16px !important;
    font-weight: 700;
    color: var(--accent);
  }
  .nav-toggle { display: flex; }
  .header-actions { display: none; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 64px 0 32px;
  margin-top: 96px;
}
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-grid a, .footer-grid p { color: #94a3b8; font-size: 14.5px; }
.footer-grid a { display: block; padding: 4px 0; transition: color .15s ease; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
  color: #64748b;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Sections ===== */
section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* Hero */
.hero { padding: 64px 0 96px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: 'Manrope', sans-serif; font-size: 28px; font-weight: 800; color: var(--ink); }
.hero-stats div span { font-size: 14px; color: var(--muted); }
.hero-media { position: relative; }
.hero-media img {
  border-radius: 24px;
  width: 100%;
  height: 460px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.hero-media .floating-card {
  position: absolute;
  bottom: -24px;
  left: -24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 260px;
}
.hero-media .floating-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media .floating-card { position: static; margin-top: 16px; max-width: none; }
}

/* Grids and cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }

.trainer-card { text-align: center; }
.trainer-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.trainer-card .specialty { color: var(--accent); font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.trainer-card p.bio { color: var(--muted); font-size: 15px; }

.band { background: var(--accent-tint); }
.band-dark { background: var(--ink); color: #cbd5e1; }
.band-dark h2, .band-dark h3 { color: #fff; }

/* Timetable */
.timetable-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.day-pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.day-pill:hover { border-color: var(--accent); }
.day-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.class-row {
  display: grid;
  grid-template-columns: 110px 1.4fr 1fr 90px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
}
.class-row .time { font-family: 'Manrope', sans-serif; font-weight: 800; color: var(--ink); }
.class-row .name { font-weight: 700; color: var(--ink); }
.class-row .meta { font-size: 14px; color: var(--muted); }
.class-row .cap { font-size: 13px; color: var(--muted); text-align: right; }
@media (max-width: 700px) {
  .class-row { grid-template-columns: 1fr 1fr; grid-template-areas: "time cap" "name name" "meta meta"; }
  .class-row .time { grid-area: time; } .class-row .cap { grid-area: cap; } .class-row .name { grid-area: name; } .class-row .meta { grid-area: meta; }
}

/* Pricing */
.plan-card { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 36px 30px; display: flex; flex-direction: column; }
.plan-card.highlight { border-color: var(--accent); box-shadow: var(--shadow); }
.plan-card .badge { position: absolute; top: -14px; left: 30px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.plan-card .price { font-family: 'Manrope', sans-serif; font-size: 42px; font-weight: 800; color: var(--ink); margin: 12px 0 4px; }
.plan-card .price span { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 24px 0 32px; flex: 1; }
.plan-card li { display: flex; gap: 10px; padding: 8px 0; font-size: 15px; color: var(--text); border-top: 1px solid var(--line); }
.plan-card li:first-child { border-top: none; }
.plan-card li svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
.contact-info .item { display: flex; gap: 16px; margin-bottom: 28px; }
.contact-info .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-msg { padding: 14px 16px; border-radius: 10px; font-size: 14.5px; font-weight: 600; margin-bottom: 18px; }
.form-msg.success { background: #ecfdf5; color: #047857; }
.form-msg.error { background: #fef2f2; color: #b91c1c; }

altcha-widget {
  color-scheme: light;
  --altcha-color-base: #ffffff;
  --altcha-color-base-content: #0b1220;
  --altcha-border-color: #e2e8f0;
  --altcha-border-radius: 10px;
  --altcha-max-width: 100%;
}

/* ===== App shell (member + staff areas) ===== */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.app-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--ink);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.app-sidebar .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 28px; margin-bottom: 22px; }
.app-sidebar .sidebar-brand img, .app-topbar .sidebar-brand img {
  height: 27px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.app-topbar .sidebar-brand { padding: 0; width: fit-content; }
.app-sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  color: #cbd5e1;
  transition: background .15s ease, color .15s ease;
}
.app-sidebar nav a svg { flex-shrink: 0; opacity: .85; }
.app-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-sidebar nav a.active { background: var(--accent); color: #fff; }
.app-sidebar .sidebar-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; margin-top: 16px; }
.app-sidebar .sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 14px; font-size: 13.5px; }
.app-sidebar .sidebar-user strong { display: block; color: #fff; font-size: 14px; }
.sidebar-signout {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(255,255,255,.06); color: #fca5a5; font-weight: 600; font-size: 14.5px;
  font-family: inherit;
}
.sidebar-signout:hover { background: rgba(220,38,38,.18); }
.sidebar-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.app-topbar { display: none; }

.app-main { flex: 1; min-width: 0; padding: 40px 44px 64px; }
.app-main .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.app-main .page-head h1 { font-size: 28px; margin-bottom: 4px; }
.app-main .page-head p { color: var(--muted); margin: 0; }

@media (max-width: 980px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { display: none; }
  .app-sidebar.open { display: flex; position: fixed; z-index: 60; width: 82%; max-width: 300px; box-shadow: var(--shadow); }
  .app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; padding: 0 18px; background: var(--ink); position: sticky; top: 0; z-index: 50;
  }
  .app-topbar .sidebar-brand img { height: 22px; }
  .sidebar-toggle { display: flex; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 55; }
  .sidebar-backdrop.open { display: block; }
  .app-main { padding: 28px 20px 48px; }
}

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.stat-card .label { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.stat-card .value { font-family: 'Manrope', sans-serif; font-size: 30px; font-weight: 800; color: var(--ink); }
.stat-card .value.accent { color: var(--accent); }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }

/* Panels + tables */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }
.panel h3 { margin-bottom: 4px; }
.panel .panel-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface); }

.badge-status { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; text-transform: capitalize; }
.badge-status.booked, .badge-status.active, .badge-status.paid, .badge-status.approved { background: #ecfdf5; color: #047857; }
.badge-status.pending { background: #fffbeb; color: #b45309; }
.badge-status.cancelled, .badge-status.failed { background: #fef2f2; color: #b91c1c; }

.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; border-radius: 999px; }
.btn-danger-ghost { background: transparent; color: #b91c1c; border: 1.5px solid #fecaca; }
.btn-danger-ghost:hover { background: #fef2f2; }

/* Class picker cards (book a class) */
.pick-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.pick-card .info strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 3px; }
.pick-card .info span { color: var(--muted); font-size: 14px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,18,32,.55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; padding: 30px; max-width: 400px; width: 100%; box-shadow: var(--shadow); }
.modal-box h3 { margin-bottom: 10px; }
.modal-box p { color: var(--muted); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* Auth card */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px; box-shadow: var(--shadow); }
.auth-card .auth-brand { display: flex; justify-content: center; margin-bottom: 24px; }
.auth-card .auth-brand img { height: 36px; }
.auth-tabs { display: flex; background: var(--surface); border-radius: 999px; padding: 4px; margin-bottom: 28px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 999px; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
