/* fit.by.ameer client site. Look agreed in the interface mockups: light neutral ground,
   black feature cards, one red-orange accent, pill buttons. */
:root{
  --bg:#f5f5f7; --surface:#ffffff; --sunken:#eeeff2; --line:#e3e4e8; --line-strong:#c9ccd2;
  --ink:#111214; --muted:#5f646b;
  --accent:#c8371f; --accent-ink:#a82c17; --accent-soft:#fbe9e4; --on-accent:#ffffff;
  --feature:#111214; --on-feature:#ffffff; --feature-muted:#a7abb2; --feature-track:#2c2e33; --feature-accent:#ff6a4d;
  --ok:#1c7f55; --ok-soft:#e1f3ea; --warn:#8f5a00; --warn-soft:#fbefd2; --water:#2563c9;
  --body:"Inter","IBM Plex Sans Arabic",system-ui,"Segoe UI",Tahoma,sans-serif;
  --r:24px; --r-sm:12px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0c0d0f; --surface:#1a1b1e; --sunken:#232428; --line:#2e3035; --line-strong:#454850;
    --ink:#f2f3f5; --muted:#a3a8b0;
    --accent:#ff6a4d; --accent-ink:#ff8d75; --accent-soft:#3b1e18; --on-accent:#1b0b07;
    --feature:#26272b; --feature-track:#3a3c42;
    --ok:#4cc38f; --ok-soft:#14301f; --warn:#e3b04b; --warn-soft:#3a2e12; --water:#6aa0f5;
    color-scheme:dark;
  }
}
*{box-sizing:border-box}
html,body{min-height:100%;margin:0}
body{background:var(--bg);color:var(--ink);font:400 15px/1.5 var(--body);-webkit-text-size-adjust:100%}
button,input,select{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[hidden]{display:none !important}
.muted{color:var(--muted)}
h1,h2,h3{margin:0;letter-spacing:-.02em;line-height:1.12}
h1{font-size:30px;font-weight:700;letter-spacing:-.03em}
h2{font-size:19px;font-weight:700}
h3{font-size:16px;font-weight:600;letter-spacing:-.01em}
p{margin:0}
a{color:var(--ink)}
.ltr{direction:ltr;unicode-bidi:isolate}
.num{font-variant-numeric:tabular-nums}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:48px;padding:8px 20px;border:1px solid var(--ink);border-radius:999px;background:var(--surface);cursor:pointer;font-weight:600;white-space:nowrap;text-decoration:none;color:var(--ink)}
.btn:hover{background:var(--sunken)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn.primary:hover{filter:brightness(1.07);background:var(--accent)}
.btn.quiet{border-color:transparent;background:transparent;color:var(--muted);font-weight:500}
.btn.quiet:hover{color:var(--ink);background:var(--sunken)}
.btn.sm{min-height:44px;padding:4px 14px;font-size:14px}
.btn.wide{width:100%}
.btn[disabled]{opacity:.6;cursor:default}
.linkish{border:0;background:none;padding:10px 0;min-height:44px;color:var(--accent-ink);cursor:pointer;text-decoration:underline;font-weight:500;text-align:start}

.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field > span{font-size:13px;color:var(--muted)}
.inp{width:100%;min-height:48px;padding:8px 14px;border:1px solid var(--line-strong);border-radius:var(--r-sm);background:var(--surface);font-size:16px}
.inp:hover{border-color:var(--muted)}
input.ltr{direction:ltr;text-align:left}
[dir="rtl"] input.ltr{text-align:right}

.brand{font-weight:700;font-size:16px;letter-spacing:-.01em;direction:ltr}
.brand b{color:var(--accent)}

.note{padding:12px 14px;border-radius:var(--r-sm);font-size:14px;border:1px solid var(--line);background:var(--sunken)}
.note.err{background:var(--accent-soft);border-color:var(--accent);color:var(--ink)}
.note.ok{background:var(--ok-soft);border-color:var(--ok)}
.note.warn{background:var(--warn-soft);border-color:var(--warn)}

/* ---------- sign-in pages ---------- */
.auth{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px 16px}
.card{width:100%;max-width:400px;background:var(--surface);border-radius:var(--r);padding:24px;display:flex;flex-direction:column;gap:14px}
.card form{display:flex;flex-direction:column;gap:14px}
.auth-top{width:100%;max-width:400px;display:flex;align-items:center;justify-content:space-between}

/* ---------- signed-in shell ---------- */
.top{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:12px 20px;max-width:960px;margin:0 auto}
.top .spacer{flex:1 1 auto}
.who{font-size:13px;color:var(--muted);max-width:40vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page{max-width:960px;margin:0 auto;padding:6px 20px 110px;display:flex;flex-direction:column;gap:16px}
.page.narrow{max-width:560px}
.stack{display:flex;flex-direction:column;gap:16px}
.panel{background:var(--surface);border-radius:var(--r);padding:20px;display:flex;flex-direction:column;gap:14px;min-width:0}
.panel form{display:flex;flex-direction:column;gap:12px}
.panel.feature{background:var(--feature);color:var(--on-feature)}
.panel.feature .muted{color:var(--feature-muted)}
.eyebrow{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.feature .eyebrow{color:var(--feature-muted)}
.big{font-size:24px;font-weight:700;letter-spacing:-.02em;line-height:1.1}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stat{display:flex;flex-direction:column;gap:2px;min-width:0}
.stat span{font-size:12px;color:var(--muted)}
.feature .stat span{color:var(--feature-muted)}
.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.between{display:flex;gap:10px;align-items:baseline;justify-content:space-between;flex-wrap:wrap}
.count{font-weight:700;font-size:22px;font-variant-numeric:tabular-nums}
.bar{height:8px;border-radius:4px;background:var(--sunken);overflow:hidden}
.bar > i{display:block;height:100%;border-radius:4px;background:var(--ink)}
.feature .bar{background:var(--feature-track)}
.feature .bar > i{background:var(--feature-accent)}

.clients{list-style:none;margin:0;padding:0}
.clients li{display:flex;gap:8px 12px;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line)}
.clients li:last-child{border-bottom:0}
.clients .name{font-weight:600;min-width:0;overflow-wrap:anywhere}
.clients .mail{color:var(--muted);font-size:13px;direction:ltr;overflow-wrap:anywhere}
.clients a.grow{text-decoration:none;color:inherit;min-height:44px;justify-content:center}
.clients a.grow:hover .name{text-decoration:underline}
.clients .grow{flex:1 1 180px;min-width:0;display:flex;flex-direction:column}
.chip{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:var(--sunken);font-size:12px;font-weight:600;white-space:nowrap}
.chip.on{background:var(--ok-soft);color:var(--ok)}
.chip.now{background:var(--accent-soft);color:var(--accent-ink)}
.empty{padding:18px 12px;color:var(--muted);text-align:center}
#coachView,#clientView{display:flex;flex-direction:column;gap:16px}

/* ---------- bottom navigation ---------- */
.tabs{position:fixed;inset-inline:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:center;padding:6px 12px calc(8px + env(safe-area-inset-bottom));z-index:5}
.tabs a{flex:0 1 180px;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:12px;font-weight:500;color:var(--muted);text-decoration:none}
.tabs a[aria-current="page"]{color:var(--accent-ink);font-weight:700}

/* ---------- training week ---------- */
.weekbar{display:flex;align-items:center;justify-content:space-between;gap:10px}
.weekbar .btn{min-width:48px;padding:0}
.days{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.day{display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:20px;padding:14px 16px;text-decoration:none;color:var(--ink);min-height:68px}
a.day:hover{background:var(--sunken)}
.day .n{flex:0 0 36px;height:36px;border-radius:18px;background:var(--sunken);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}
.day.done .n{background:var(--ok-soft);color:var(--ok)}
.day.next .n{background:var(--accent);color:var(--on-accent)}
.day .grow{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.day .grow b{font-weight:600;overflow-wrap:anywhere}
.day .grow span{font-size:13px;color:var(--muted)}
.day.rest{background:transparent;border:1px dashed var(--line-strong);color:var(--muted);min-height:52px}

/* ---------- session and logbook ---------- */
.back{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:500;text-decoration:none;color:var(--muted)}
.ex{gap:12px}
.ex .meta{font-size:14px;color:var(--muted)}
.video{position:relative;width:100%;max-width:300px;aspect-ratio:9/16;border-radius:16px;overflow:hidden;background:#000;align-self:center}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.video button{position:absolute;inset:0;width:100%;height:100%;border:0;padding:0;cursor:pointer;background:#000 center/cover no-repeat;display:flex;align-items:center;justify-content:center}
.video button span{width:64px;height:64px;border-radius:32px;background:rgba(17,18,20,.78);color:#fff;display:flex;align-items:center;justify-content:center}
.demo-toggle{align-self:flex-start}
details.how{border-top:1px solid var(--line);padding-top:4px}
details.how summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600;font-size:14px}
details.how ol{margin:0 0 6px;padding-inline-start:20px;display:flex;flex-direction:column;gap:6px;font-size:14px}
.last{background:var(--sunken);border-radius:var(--r-sm);padding:10px 12px;display:flex;flex-direction:column;gap:4px;font-size:14px}
.last .sets{font-weight:600;font-variant-numeric:tabular-nums}
.sets-grid{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr) auto;gap:8px 10px;align-items:center}
.sets-grid .hd{font-size:12px;color:var(--muted);font-weight:600}
.sets-grid .sn{font-weight:700;font-size:14px;min-width:20px;text-align:center}
.sets-grid .inp{min-height:48px;text-align:center;padding:6px 4px;font-size:17px;font-variant-numeric:tabular-nums}
.sets-grid .prev{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;min-width:64px;text-align:end}
.hist{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.hist .row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:14px}
.hist .row:last-child{border-bottom:0}
.hist .row b{font-variant-numeric:tabular-nums;font-weight:600;text-align:end}
.savestate{font-size:13px;color:var(--muted);min-height:20px}
.savestate.err{color:var(--accent-ink);font-weight:600}

/* ---------- body measurements ---------- */
.bf{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.bf .pct{font-size:44px;font-weight:700;letter-spacing:-.03em;line-height:1}
.kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.kv div{display:flex;flex-direction:column;font-size:13px;color:var(--muted)}
.kv b{font-size:17px;color:var(--ink);font-variant-numeric:tabular-nums}
.methods{font-size:13px;color:var(--muted)}
bdi{unicode-bidi:isolate}
.grid-m{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:520px){.who{display:none} h1{font-size:28px}}
@media (min-width:760px){.cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}}

/* ---------- coach: one client ---------- */
.sess{border-top:1px solid var(--line);padding:12px 0;display:flex;flex-direction:column;gap:6px}
.sess:first-of-type{border-top:0}
.sess .lift{display:flex;justify-content:space-between;gap:12px;font-size:14px}
.sess .lift b{font-variant-numeric:tabular-nums;font-weight:600;text-align:end;white-space:nowrap}
.table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.table th{font-size:12px;color:var(--muted);font-weight:600;text-align:start;padding:6px 8px 6px 0}
.table td{padding:8px 8px 8px 0;border-top:1px solid var(--line)}
.scroll{overflow-x:auto}
