/* Alloy brand: lime #E1E000, black #2C2A29, silver #A6A8AC.
   Fonts: United Sans (headlines) + DIN Pro (body) — the licensed brand fonts, hosted on the
   GHL/filesafe CDN (CORS *). Saira SemiCondensed / Barlow load as fallbacks. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&family=Saira+SemiCondensed:wght@600;700&display=swap');
@font-face{font-family:'United Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://assets.cdn.filesafe.space/Y5bMONHRAsqpEoPu6lQQ/media/6a43ed8121b1234da3d1d298.woff2') format('woff2')}
@font-face{font-family:'United Sans';font-style:normal;font-weight:800;font-display:swap;src:url('https://assets.cdn.filesafe.space/Y5bMONHRAsqpEoPu6lQQ/media/6a43ed81a7501a002affa29b.woff2') format('woff2')}
@font-face{font-family:'DIN Pro';font-style:normal;font-weight:400;font-display:swap;src:url('https://assets.cdn.filesafe.space/Y5bMONHRAsqpEoPu6lQQ/media/6a43ed814c02d14b8da5cada.woff2') format('woff2')}
@font-face{font-family:'DIN Pro';font-style:normal;font-weight:500;font-display:swap;src:url('https://assets.cdn.filesafe.space/Y5bMONHRAsqpEoPu6lQQ/media/6a43ed810f3445329fbf140a.woff2') format('woff2')}
@font-face{font-family:'DIN Pro';font-style:normal;font-weight:700;font-display:swap;src:url('https://assets.cdn.filesafe.space/Y5bMONHRAsqpEoPu6lQQ/media/6a43ed81b76c4ad15a93bf45.woff2') format('woff2')}

:root {
  --lime: #E1E000;
  --black: #2C2A29;
  --silver: #A6A8AC;
  --bg: #f4f4f2;
  --card: #ffffff;
  --line: #e4e4e1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DIN Pro', 'Barlow', system-ui, sans-serif;
  color: var(--black);
  background: var(--bg);
  line-height: 1.45;
}
h1, h2, h3, .brand { font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; letter-spacing: .01em; }
.muted { color: #6b6b69; }
.err { color: #b00020; font-weight: 500; }
.link { color: var(--black); text-decoration: underline; text-underline-offset: 3px; }

.brand { font-weight: 700; font-size: 1.4rem; color: var(--black); }
.brand span { color: var(--silver); font-weight: 600; font-size: .62em; letter-spacing: .18em; }
.brand.sm { font-size: 1.1rem; }

/* --- login --- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card {
  background: var(--card); width: 100%; max-width: 380px; padding: 34px 30px;
  border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.08); border-top: 5px solid var(--lime);
}
.card h1 { margin: 18px 0 8px; font-size: 1.7rem; }
.inp {
  width: 100%; padding: 13px 14px; margin: 18px 0 12px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 1rem; font-family: inherit;
}
.inp:focus { outline: 2px solid var(--lime); border-color: var(--lime); }
.seg { display: flex; gap: 18px; margin-bottom: 18px; font-size: .95rem; }
.seg label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.btn {
  width: 100%; padding: 13px; border: 0; border-radius: 9px; background: var(--lime);
  color: var(--black); font-weight: 700; font-size: 1rem; font-family: 'United Sans', 'Saira SemiCondensed', sans-serif;
  letter-spacing: .03em; text-transform: uppercase; cursor: pointer;
}
.btn:hover { filter: brightness(.96); }

/* --- dashboard --- */
.top {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  background: var(--black); color: #fff; padding: 14px 20px;
}
.top .brand { color: #fff; }
.who { font-size: .92rem; color: var(--silver); }
.who .dot { margin: 0 7px; }
.who .link { color: var(--lime); margin-left: 14px; }

/* Alloy logo (real lockup PNG) in the black top bar */
.logo-img { height: 40px; width: auto; display: block; }

/* top-bar right side: Member Resources button + Log out */
.top-right { display: flex; align-items: center; gap: 16px; }
.top-btn {
  text-decoration: none; background: var(--lime); color: var(--black);
  font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .03em;
  padding: 9px 14px; border-radius: 8px; white-space: nowrap;
}
.top-btn:hover { filter: brightness(.96); }
.top-logout { color: #fff; text-decoration: none; font-size: .9rem; opacity: .82; white-space: nowrap; }
.top-logout:hover { opacity: 1; text-decoration: underline; }

/* member name + location, pinned in the white nav bar on its own line above the tabs */
.nav-name { display: flex; align-items: baseline; gap: 9px; }
.nav-name .mname {
  font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; font-weight: 800;
  font-size: 1.15rem; color: var(--black); text-transform: uppercase; letter-spacing: .01em;
}
.nav-name .mloc { color: var(--silver); font-size: .88rem; }

/* sticky header keeps the black bar + nav fixed while scrolling/jumping tabs */
.sticky-header { position: sticky; top: 0; z-index: 30; }

/* jump/action nav (sits inside the sticky header) */
.nav { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.nav .inner { max-width: 880px; margin: 0 auto; padding: 9px 14px; display: flex; flex-direction: column; gap: 7px; }
.nav-tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; font-weight: 700; font-size: .9rem; }
.nav .jump { color: var(--black); padding: 7px 4px; border-bottom: 2px solid transparent; }
.nav .jump:hover { border-bottom-color: var(--lime); }
.nav .btn-nav {
  padding: 9px 14px; border-radius: 8px; background: var(--lime); color: var(--black);
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.nav .btn-nav.dark { background: var(--black); color: var(--lime); }
.nav .btn-nav:hover { filter: brightness(.96); }
.nav .btn-nav.dark:hover { filter: brightness(1.18); }
.nav-tabs .btn-nav:first-of-type { margin-left: auto; }   /* push the action buttons right on wide screens */
.nav .btn-nav.disabled { opacity: .45; pointer-events: none; }
.nav button.btn-nav { border: 0; cursor: pointer; line-height: 1; }   /* <button> needs these to match the <a> buttons */
section.tile { scroll-margin-top: 120px; }           /* clear the sticky black bar + nav on jump */

/* Schedule-a-Session modal (native <dialog>) */
.modal { border: 0; border-radius: 14px; padding: 0; width: min(560px, 94vw); max-width: 94vw; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.modal::backdrop { background: rgba(0,0,0,.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 18px; background: var(--black); color: #fff; }
.modal-head h3 { margin: 0; color: #fff; font-size: 1.1rem; }
.modal-x { background: none; border: 0; color: var(--lime); font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal iframe { width: 100%; height: min(72vh, 640px); border: 0; display: block; }
.wrap { max-width: 880px; margin: 0 auto; padding: 22px 18px 48px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 16px;
}
.tile h2 { margin: 0 0 10px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.tile h3 { margin: 16px 0 6px; font-size: 1rem; }
.big { font-size: 2.6rem; font-weight: 700; font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; line-height: 1; }
.big span { font-size: .9rem; color: var(--silver); margin-left: 6px; }
.facts { list-style: none; padding: 0; margin: 14px 0 0; }
.facts li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.facts b { font-weight: 600; }

.trend { width: 100%; border-collapse: collapse; font-size: .94rem; }
.trend th, .trend td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.trend th { color: #777; font-weight: 600; text-transform: uppercase; font-size: .76rem; letter-spacing: .04em; }
.trend tbody tr:first-child td { font-weight: 600; }   /* most-recent scan (top row) stands out */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 12px; }
.table-scroll .trend { min-width: 460px; }

/* sessions remaining — per-package breakdown */
.sessions-box { margin-bottom: 16px; }
.sb-label { color: #555; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.pkg-list { list-style: none; padding: 0; margin: 0; }
.pkg-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.pkg-list li:first-child { border-top: 0; }
.pkg-list b { font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; font-size: 1.5rem; line-height: 1; }
.pkg-list .exp { color: var(--silver); font-size: .9rem; margin-left: auto; }

/* progress stats + chart */
.stat-row { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 8px; }
.stat { flex: 1; min-width: 120px; }
.big.sm { font-size: 1.3rem; }
.small { font-size: .85rem; }
.chart-container { position: relative; height: 260px; margin: 14px 0 6px; }
.deltas li b.good { color: #2d8a6e; }
.deltas li b.bad { color: #b00020; }

/* session lists (attended + upcoming) */
.sess-list { list-style: none; padding: 0; margin: 0 0 14px; }
.sess-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.sess-list li:first-child { border-top: 0; }
.sess-list .when { font-weight: 600; }
.sess-list .when i { font-style: normal; color: var(--silver); margin-left: 8px; font-weight: 400; }
.sess-list .what { color: #555; text-align: right; }

/* expandable sections (native <details>) */
.acc { border-top: 1px solid var(--line); }
.acc > summary {
  cursor: pointer; list-style: none; padding: 12px 0; font-weight: 600;
  font-family: 'United Sans', 'Saira SemiCondensed', sans-serif; letter-spacing: .01em;
  display: flex; justify-content: space-between; align-items: center;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary em { color: var(--silver); font-style: normal; font-weight: 400; margin-left: 6px; }
.acc > summary::after { content: '\203A'; color: var(--silver); font-size: 1.3rem; line-height: 1; transition: transform .15s ease; }
.acc[open] > summary::after { transform: rotate(90deg); }
.acc .sess-list { margin-top: 0; margin-bottom: 12px; }

/* button row */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn-row .btn { width: auto; flex: 1; min-width: 200px; text-align: center; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; }
.btn.ghost { background: transparent; color: var(--black); border: 2px solid var(--black); }
.btn.ghost:hover { background: var(--black); color: #fff; }
.btn.dark { background: var(--black); color: var(--lime); }
.btn.dark:hover { filter: brightness(1.18); }
.btn.disabled { opacity: .45; pointer-events: none; cursor: default; }

.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.kv li:first-child { border-top: 0; }
.kv span { color: #555; }
.kv b { font-weight: 600; text-align: right; }
.kv i { font-style: normal; }
.goals-simple { margin: 4px 0 0; padding-left: 20px; }
.goals-simple li { padding: 5px 0; }
