/* Paramount coach app: fonts bundled with the app (SIL Open Font License, see fonts/LICENSE-*.txt). */
@font-face { font-family: "Barlow"; src: url("fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("fonts/tajawal-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Tajawal"; src: url("fonts/tajawal-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Tajawal"; src: url("fonts/tajawal-700.woff2") format("woff2"); font-weight: 600 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Tajawal"; src: url("fonts/tajawal-800.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  /* brand */
  --navy: #1B1F3B; --navy-2: #262B4F; --navy-3: #3A3F66; --navy-line: rgba(255, 255, 255, .18);
  --on-navy: #FFFFFF; --on-navy-muted: #C9CCE3; --on-navy-soft: #9EA3C7; --peach: #FFD2B3; --peach-link: #FFB98A;
  --accent: #E0262F; --accent-hover: #B81D25; --accent-ink: #FFFFFF; --accent-soft: #FDE2E3;
  --orange: #FF8A3D; --orange-ink: #1B1F3B;
  /* surfaces */
  --bg: #F5F6FA; --surface: #FFFFFF; --surface-2: #F5F6FA; --ink: #1B1F3B; --muted: #5B6178;
  --line: #E3E5EE; --dash: #C9CCE3; --track: #EEF0F5;
  /* states */
  --ok: #1D7A4C; --ok-soft: #E3F3EA; --wait: #9A5B00; --wait-soft: #FDF0DC;
  --dispute: #B81D25; --dispute-soft: #FDE2E3; --cover: #4B3FB8; --cover-soft: #E6E3FB;
  --renew: #A34A0E; --renew-soft: #FFE8D6; --trial: #0B6E6E; --trial-soft: #DDF3F3;
  --focus: #4B3FB8;
  /* initials avatars */
  --t1-bg: #FDE2E3; --t1-fg: #B81D25; --t2-bg: #FFE8D6; --t2-fg: #A34A0E; --t3-bg: #E6E3FB; --t3-fg: #4B3FB8;
  --t4-bg: #DDF3F3; --t4-fg: #0B6E6E;
  --shadow: 0 1px 2px rgba(27, 31, 59, .08);
  --shadow-lg: 0 12px 40px rgba(27, 31, 59, .18);
  --r-card: 20px; --r-item: 16px; --r-btn: 16px; --r-input: 14px;
  --font: "Barlow", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Tajawal", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #12152B; --navy-2: #1E2242; --navy-3: #30365E; --bg: #0E1022; --surface: #191C36; --surface-2: #22264A;
    --ink: #EEF0F8; --muted: #A3A8C6; --line: #2C3157; --dash: #3E4470; --track: #2A2F55;
    --accent: #FF4752; --accent-hover: #FF6B74; --accent-soft: #3B1820;
    --ok: #4FC58A; --ok-soft: #133224; --wait: #F1B04C; --wait-soft: #35270F;
    --dispute: #FF7A82; --dispute-soft: #3B1820; --cover: #A99CFF; --cover-soft: #272250;
    --renew: #FFAA70; --renew-soft: #3A2414; --trial: #5ED1D1; --trial-soft: #123334; --focus: #A99CFF;
    --t1-bg: #3B1820; --t1-fg: #FF9AA0; --t2-bg: #3A2414; --t2-fg: #FFB98A; --t3-bg: #272250; --t3-fg: #C2B8FF;
    --t4-bg: #123334; --t4-fg: #7FDCDC; --t5-bg: #133224; --t5-fg: #7FD9A8;
    --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #12152B; --navy-2: #1E2242; --navy-3: #30365E; --bg: #0E1022; --surface: #191C36; --surface-2: #22264A;
  --ink: #EEF0F8; --muted: #A3A8C6; --line: #2C3157; --dash: #3E4470; --track: #2A2F55;
  --accent: #FF4752; --accent-hover: #FF6B74; --accent-soft: #3B1820;
  --ok: #4FC58A; --ok-soft: #133224; --wait: #F1B04C; --wait-soft: #35270F;
  --dispute: #FF7A82; --dispute-soft: #3B1820; --cover: #A99CFF; --cover-soft: #272250;
  --renew: #FFAA70; --renew-soft: #3A2414; --trial: #5ED1D1; --trial-soft: #123334; --focus: #A99CFF;
  --t1-bg: #3B1820; --t1-fg: #FF9AA0; --t2-bg: #3A2414; --t2-fg: #FFB98A; --t3-bg: #272250; --t3-fg: #C2B8FF;
  --t4-bg: #123334; --t4-fg: #7FDCDC; --t5-bg: #133224; --t5-fg: #7FD9A8;
  --shadow: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
html[lang="ar"] body { font-family: "Tajawal", "Barlow", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: 0; }
h1 { font-size: 30px; line-height: 1.05; font-weight: 700; margin: 0; }
h2 { font-size: 22px; line-height: 1.15; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: end; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.side { display: none; }
main { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); max-width: 1200px; width: 100%; margin: 0 auto; }
main.bleed { padding-top: 0; }
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--surface);
  border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: max(6px, env(safe-area-inset-bottom)); min-height: 74px;
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; font-size: 12px; color: var(--muted); position: relative; padding: 6px 2px;
}
.tabs a svg { width: 22px; height: 22px; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tabs .dot { top: 4px; inset-inline-end: calc(50% - 22px); }
.dot {
  position: absolute; top: 4px; inset-inline-end: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--orange); color: var(--orange-ink); font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent;
  background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: inherit; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ring { border-color: var(--navy-line); }
.navy .icon-btn:hover, .side .icon-btn:hover { background: rgba(255, 255, 255, .08); }
.pbadge {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center;
  font: 800 18px/1 "Barlow Condensed", sans-serif; flex: none;
}
.pbadge.l { width: 40px; height: 40px; border-radius: 12px; font-size: 24px; }
.pbadge.xl { width: 64px; height: 64px; border-radius: 16px; font-size: 36px; }
/* The gym's own logo (square PNG, transparent kept) in place of the initial badge. */
img.pbadge.logo { background: none; border-radius: 0; object-fit: contain; }
.logo-row { flex-wrap: wrap; }

@media (min-width: 900px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--navy); color: var(--on-navy); padding: 24px 16px;
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
  .side .brand div b { display: block; font-size: 15px; }
  .side .brand div span { display: block; font-size: 12px; color: var(--on-navy-muted); }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a {
    min-height: 44px; border-radius: 12px; color: var(--on-navy); display: flex; align-items: center; gap: 10px;
    padding: 0 12px; text-decoration: none; position: relative;
  }
  .side nav a svg { display: none; }
  .side nav.extra { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--navy-3); }
  .side nav.extra a { min-height: 36px; font-size: 14px; color: var(--on-navy-muted); }
  .side nav a:hover { background: rgba(255, 255, 255, .08); color: var(--on-navy); }
  .side nav a[aria-current="page"] { background: var(--accent); font-weight: 700; }
  .side nav a[aria-current="page"] svg { opacity: 1; }
  .side nav .count { margin-inline-start: auto; background: var(--orange); color: var(--orange-ink); border-radius: 10px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
  .side .foot { margin-top: auto; padding: 0 8px; }
  .side .foot .btn { color: var(--on-navy-muted); }
  .tabs { display: none; }
  main { padding: 28px 32px 48px; }
  main.bleed { padding-top: 28px; }
}

/* ---------- navy header (coach screens) ---------- */
.navy {
  background: var(--navy); color: var(--on-navy); border-radius: 0 0 28px 28px; padding: 18px 20px 20px;
  margin: 0 -16px 14px; display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 900px) { .navy { margin: 0 0 18px; border-radius: 24px; } }
.navy .topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.navy .brandline { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; min-width: 0; }
.navy .brandline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navy .hello { display: flex; align-items: center; gap: 14px; }
.navy .hello .sub { font-size: 14px; color: var(--on-navy-muted); }
.navy .hello .big { font: 700 34px/1 var(--font-display); }
html[lang="ar"] .navy .hello .big { font: 800 28px/1.1 "Tajawal", sans-serif; }
.navy h1 { font-weight: 800; font-size: 34px; color: var(--on-navy); }
.navy .note { font-size: 12px; color: var(--on-navy-muted); }
.navy a { color: var(--peach-link); }
.navy a.icon-btn { color: #fff; }
.coachpic { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--orange); object-fit: cover; flex: none; }
.coachpic.av { border: 3px solid var(--orange); }
.targetcard { background: var(--navy-2); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.targetcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.targetcard .lbl { font-size: 14px; color: var(--on-navy-muted); }
.targetcard .fig { font: 700 22px/1 var(--font-display); direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.targetcard .fig small { color: var(--on-navy-soft); font-weight: 600; font-size: 16px; }
.targetcard .track { height: 10px; border-radius: 5px; background: var(--navy-3); overflow: hidden; }
.targetcard .track i { display: block; height: 100%; background: var(--orange); border-radius: 5px; }
.targetcard .track.done i { background: #2FA36B; }
.targetcard .left { font-size: 13px; color: var(--peach); }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.counts > * { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.counts b { font: 700 26px/1.1 var(--font-display); }
.counts span { font-size: 12px; color: var(--on-navy-muted); }

/* ---------- day strip and session rail ---------- */
.daystrip { display: flex; gap: 8px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.daystrip::-webkit-scrollbar { display: none; }
.daystrip button.d {
  flex: none; width: 46px; height: 58px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; padding: 0;
}
.daystrip button.d span { font-size: 11px; }
.daystrip button.d b { font-weight: 700; font-size: 17px; color: var(--ink); line-height: 1.1; }
.daystrip button.d[aria-current="date"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.daystrip button.d[aria-current="date"] b { color: #fff; }
.daystrip button.d.today:not([aria-current]) { border-color: var(--accent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sr-only:focus { position: static !important; width: auto; height: auto; margin: 0; clip: auto; }
.daystrip { padding: 0 0 6px; }
.rail { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.slot { display: flex; gap: 12px; align-items: stretch; }
.slot .time { width: 46px; flex: none; display: flex; flex-direction: column; padding-top: 10px; font-weight: 700; font-size: 15px; line-height: 1.1; }
.slot .time small { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 3px; }
html[lang="ar"] .slot .time { font-family: var(--font-display); font-size: 17px; }
html[lang="ar"] .slot .time small { font-size: 14px; }
.slot .block {
  flex: 1; min-width: 0; min-height: 60px; border: 1.5px dashed var(--dash); border-radius: var(--r-item); background: transparent;
  display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--muted);
  cursor: pointer; text-align: start;
}
.slot .block:hover { border-color: var(--muted); color: var(--ink); }
.slot .block .plus {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 20px; line-height: 1; flex: none;
}
.slot.filled .block {
  border: 0; background: var(--surface); box-shadow: var(--shadow); padding: 10px 12px; color: var(--ink); font-weight: 400;
}
.slot .block .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.slot .block .names { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; line-height: 1.25; }
html[lang="ar"] .slot .block .names { font-weight: 700; }
.slot .block .meta { font-size: 12px; color: var(--muted); }
.slot .block .meta.cover { color: var(--cover); font-weight: 600; }
.slot .block .meta.renew { color: var(--renew); font-weight: 600; }
.slot .block .meta.goal { display: flex; gap: 4px; min-width: 0; white-space: nowrap; }
.slot .block .meta.goal > span:first-child { flex: none; }
.slot .block .meta.goal .gv { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.slot .block .pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.slot.extra .time { color: var(--trial); }
.avstack { display: flex; flex: none; }
.avstack > * + * { margin-inline-start: -12px; box-shadow: 0 0 0 2px var(--surface); }
.now-line { height: 0; border-top: 2px solid var(--accent); margin: 2px 0 2px 58px; position: relative; }
.now-line::before { content: ""; position: absolute; inset-inline-start: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
[dir="rtl"] .now-line { margin: 2px 58px 2px 0; }

/* ---------- avatars ---------- */
.av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  flex: none; background: var(--t1-bg); color: var(--t1-fg); overflow: hidden; object-fit: cover; line-height: 1;
}
html[lang="ar"] .av { font-size: 15px; }
.av.t1 { background: var(--t1-bg); color: var(--t1-fg); } .av.t2 { background: var(--t2-bg); color: var(--t2-fg); }
.av.t3 { background: var(--t3-bg); color: var(--t3-fg); } .av.t4 { background: var(--t4-bg); color: var(--t4-fg); }

.av.s44 { width: 44px; height: 44px; } .av.s52 { width: 52px; height: 52px; font-size: 16px; }
.av.s64 { width: 64px; height: 64px; font-size: 20px; }
img.av { background: var(--surface-2); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 16px; box-shadow: var(--shadow); border: 1px solid transparent; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .list, :root[data-theme="dark"] .tablewrap { border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .list, :root:not([data-theme="light"]) .tablewrap { border-color: var(--line); } }
.card + .card { margin-top: 12px; }
.card > h2:first-child { margin-top: 0; }
.section { margin-top: 22px; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { margin-inline-end: auto; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sechead h2 { margin: 0; font-size: 24px; }
.sechead span { font-size: 13px; color: var(--muted); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.dark:hover { filter: brightness(1.15); color: #fff; }
.btn.outline { border-color: var(--ink); background: var(--surface); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.btn.big { min-height: 54px; border-radius: var(--r-btn); font: 700 22px/1 var(--font-display); }
html[lang="ar"] .btn.big { font: 700 19px/1 "Tajawal", sans-serif; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.actiongrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actiongrid .btn { min-height: 52px; border-radius: var(--r-btn); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.field > span { font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=month], input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 46px; padding: 9px 13px; border-radius: var(--r-input); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 15px;
}
textarea { min-height: 74px; resize: vertical; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.grid3 { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } .grid2.keep { grid-template-columns: 1fr 1fr; } .grid2:not(.keep) { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px;
  font-size: 14px; cursor: pointer; min-height: 38px; font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg { display: inline-grid; grid-auto-flow: column; background: var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 38px; border-radius: 11px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.seg.full { display: grid; grid-auto-columns: 1fr; width: 100%; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 10px; padding: 4px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.2; }
html[lang="ar"] .pill { font-weight: 700; }
.pill.awaiting, .pill.pending, .pill.awaiting_payment { color: var(--wait); background: var(--wait-soft); }
.pill.confirmed, .pill.approved, .pill.active { color: var(--ok); background: var(--ok-soft); }
.pill.disputed, .pill.rejected, .pill.expired { color: var(--dispute); background: var(--dispute-soft); }
.pill.cancelled, .pill.archived, .pill.finished, .pill.locked, .pill.open { color: var(--muted); background: var(--track); }
.pill.trial { color: var(--trial); background: var(--trial-soft); }
.pill.cover { color: var(--cover); background: var(--cover-soft); }
.pill.noemail { color: var(--wait); background: var(--wait-soft); }
.hint.warn { margin: 0; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--wait); background: var(--wait-soft); }
.hint.warn[hidden] { display: none; }
.hint.info { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- lists and tables ---------- */
.list { background: var(--surface); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); border: 1px solid transparent; }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list > .item:last-child { border-bottom: 0; }
.list > a.item:hover, .list > button.item:hover { background: var(--surface-2); }
.list > button.item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: start; cursor: pointer; }
.list > button.item:disabled { cursor: not-allowed; opacity: .55; }
.cards { display: flex; flex-direction: column; gap: 10px; }
.cards > .item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; border: 1px solid transparent;
}
.cards > a.item:hover { border-color: var(--line); }
.item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--ink); }
.item a.title { text-decoration: none; }
.item .sub { font-size: 13px; color: var(--muted); }
.item .sub.renew { color: var(--renew); font-weight: 600; }
.item > svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.item.selected { background: var(--accent-soft) !important; }
.item .check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; font-size: 13px; }
.item.selected .check { background: var(--accent); border-color: var(--accent); color: #fff; }
.callbtn { width: 44px; height: 44px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.callbtn svg { width: 20px; height: 20px; }
.tablewrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); border: 1px solid transparent; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; background: var(--surface-2); }
th.num, td.num { text-align: end; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
tr.detail td { background: var(--surface-2); padding: 0; }
tr.detail .inner { padding: 12px 14px; }

/* ---------- figures, bars, charts ---------- */
.figures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.figure { background: var(--surface); border-radius: var(--r-card); padding: 16px 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
a.figure:hover { color: inherit; filter: brightness(.98); }
.figure .label { font-size: 14px; color: var(--muted); }
.figure .value { font: 800 clamp(28px, 3.4vw, 40px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.figure .foot { font-size: 13px; color: var(--muted); }
.figure.alert, .figure.red { background: var(--accent); color: #fff; }
.figure.alert .label, .figure.red .label { color: #FFE1E2; }
.figure.alert .foot, .figure.red .foot { color: #fff; }
.figure.navyfig { background: var(--navy); color: #fff; }
.figure.navyfig .label { color: var(--on-navy-muted); }
.figure.navyfig .foot { color: var(--peach); }
.figure.total { background: var(--navy); color: #fff; }
.figure.total .label { color: var(--on-navy-muted); }
.figure .value.sm { font-size: 28px; }
.bar { height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.bar.low > i { background: var(--orange); }
.bar.done > i { background: var(--ok); }
.bar.go > i { background: var(--orange); }
.card.target .bar { margin: 8px 0 6px; }
.card.target .bar > i { background: var(--orange); }
.card.target .bar.done > i { background: var(--ok); }
.targetrow { display: flex; flex-direction: column; gap: 6px; }
.targetrow + .targetrow { margin-top: 16px; }
.targetrow .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.targetrow .top b.n { font: 700 20px/1 var(--font-display); }
.picklist { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.pkg { display: flex; flex-direction: column; gap: 6px; }
.pkg .line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pkg .big { font: 700 26px/1 var(--font-display); }
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.money b { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.ringcard { display: flex; gap: 16px; align-items: center; }
.ringcard svg { flex: none; }
.ringcard .txt { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ringcard .txt b { font-size: 16px; }
.ringcard .ok { color: var(--ok); font-weight: 600; font-size: 13px; }
.ringcard .owe { color: var(--dispute); font-weight: 600; font-size: 13px; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; min-width: 0; }
.stat span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat b { font: 700 20px/1.1 var(--font-display); }
.stat i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.stat i.good { color: var(--ok); } .stat i.bad { color: var(--renew); }
@media (max-width: 380px) { .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart { width: 100%; height: auto; display: block; }
.chart .ln { stroke: var(--orange); } .chart .base { stroke: var(--line); }
.chart .lbl { fill: var(--muted); font: 12px var(--font); } .chart .lbl.b { fill: var(--ink); font-weight: 700; }
.chart .dot1 { fill: var(--orange); } .chart .dot2 { fill: var(--accent); }
.photos2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photos2 figure { margin: 0; position: relative; height: 150px; border-radius: 14px; overflow: hidden; background: var(--cover-soft); }
.photos2 figure:nth-child(2) { background: var(--renew-soft); }
.photos2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos2 figcaption { position: absolute; inset-inline-start: 8px; bottom: 8px; background: rgba(27, 31, 59, .72); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 8px; }
.trend { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 150px; padding-top: 18px; }
.trend .col { display: grid; justify-items: center; gap: 4px; height: 100%; align-content: end; }
.trend .col i { width: 100%; max-width: 34px; background: var(--navy); border-radius: 6px 6px 0 0; min-height: 2px; }
.trend .col:last-child i { background: var(--accent); }
.trend .col span { font-size: 11px; color: var(--muted); }
.trend .col b { font-size: 11px; font-weight: 500; }
.advrow { display: flex; gap: 12px; align-items: center; }
.advrow + .advrow { margin-top: 10px; }
.advrow .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.advrow .ic.hw { background: var(--accent-soft); color: var(--accent-hover); }
.advrow .ic svg { width: 20px; height: 20px; }

/* ---------- client header ---------- */
.clienthead { gap: 14px; padding-top: 14px; padding-bottom: 22px; }
.clienthead .who { display: flex; gap: 16px; align-items: center; }
.clienthead .pic { position: relative; flex: none; }
.clienthead .pic .ph { width: 92px; height: 92px; border-radius: 26px; background: var(--navy-3); display: grid; place-items: center; color: var(--on-navy-muted); overflow: hidden; }
.clienthead .pic .ph img { width: 100%; height: 100%; object-fit: cover; }
.clienthead .pic .ph svg { width: 36px; height: 36px; }
.clienthead .pic .ph.ini { font: 700 30px/1 var(--font-display); }
.clienthead .pic .cam { position: absolute; inset-inline-end: -6px; bottom: -6px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--navy); background: var(--orange); color: var(--orange-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.clienthead .pic .cam svg { width: 16px; height: 16px; }
.clienthead h1 { font-size: 32px; line-height: 1; color: #fff; }
.clienthead .line1 { font-size: 14px; color: var(--on-navy-muted); }
.clienthead .line2 { font-size: 13px; color: var(--peach); }
.goalbtn { align-self: flex-start; border: 0; background: none; padding: 2px 0; text-align: start; cursor: pointer; font: inherit; font-size: 13px; color: var(--peach); min-height: 24px; }
.goalbtn:hover { text-decoration: underline; text-underline-offset: 2px; }
.clienthead .tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- team ---------- */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.podium .p { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.podium .p .nm { font-weight: 600; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .p.first .nm { font-weight: 700; font-size: 15px; }
.podium .p .blk { width: 100%; border-radius: 12px 12px 0 0; background: var(--navy-3); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.podium .p.first .blk { background: var(--accent); }
.podium .p .blk b { font: 700 24px/1 var(--font-display); }
.podium .p.first .blk b { font-weight: 800; font-size: 30px; }
.podium .p .blk span { font-size: 11px; color: var(--on-navy-muted); }
.podium .p.first .blk span { color: #FFE1E2; }
.podium .av { background: var(--navy-3); color: #fff; }
.podium .coachpic { width: 64px; height: 64px; }
.podium .av.s52 { border: 0; }
.board .item .rank { width: 26px; text-align: center; font: 700 18px/1 var(--font-display); color: var(--muted); flex: none; }

/* ---------- manager today ---------- */
.hero {
  border-radius: 24px; padding: 34px 32px; color: #fff; display: flex; flex-direction: column; gap: 8px; min-height: 188px; justify-content: flex-end;
  background: linear-gradient(90deg, rgba(27, 31, 59, .94), rgba(27, 31, 59, .40)), url("img/mood-rack.jpg") center 60% / cover;
  margin-bottom: 24px;
}
[dir="rtl"] .hero { background: linear-gradient(270deg, rgba(27, 31, 59, .94), rgba(27, 31, 59, .40)), url("img/mood-rack.jpg") center 60% / cover; }
.hero .sub { font-size: 16px; color: var(--peach); }
.hero h1 { color: #fff; font-weight: 800; font-size: 48px; }
@media (max-width: 600px) { .hero { padding: 22px 20px; } .hero h1 { font-size: 34px; } }
.twocol { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 24px; }
.livetable a { color: var(--ink); text-decoration: none; }
.livetable a:hover { text-decoration: underline; }
.twocol > .wide { flex: 3 1 420px; min-width: 0; }
.twocol > .narrow { flex: 2 1 300px; min-width: 0; }
.approverow { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.approverow + .approverow { padding-top: 12px; }
.approverow:last-child { border-bottom: 0; padding-bottom: 0; }
.approverow .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.approverow .main b { font-weight: 600; }
.approverow .main span { font-size: 13px; color: var(--muted); }
td.good { color: var(--ok); font-weight: 600; } td.bad { color: var(--dispute); font-weight: 600; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(14, 16, 34, .5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
.sheet .sheethead { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sheet .sheethead h2 { margin: 0; flex: 1; font-size: 24px; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--surface); padding: 10px 0 0; flex-wrap: wrap; }
.sheet .actions .btn { flex: 1; min-height: 50px; }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; padding-bottom: 20px; }
  .sheet .grab { display: none; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

/* ---------- full pages (progress, advice) ---------- */
.pagehead { display: flex; align-items: center; gap: 8px; padding: 14px 16px; margin: -16px -16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .pagehead { margin: -28px -32px 20px; padding: 14px 32px; } }
body.fullpage .tabs { display: none; }
body.fullpage main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.pageform { display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 110px); }
.pageform > .bottom { margin-top: auto; }
.pagehead .t { display: flex; flex-direction: column; min-width: 0; }
.pagehead .t b { font: 700 26px/1 var(--font-display); }
.pagehead .t span { font-size: 13px; color: var(--muted); }
.measures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.measure { background: var(--surface); border-radius: var(--r-item); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); box-shadow: var(--shadow); }
.measure input { border: 0 !important; padding: 0 !important; min-height: 0 !important; font: 700 28px/1.1 var(--font-display) !important; color: var(--ink); background: transparent !important; }
.photodrop {
  min-height: 110px; border-radius: var(--r-item); border: 1.5px dashed var(--dash); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 14px; cursor: pointer; padding: 12px; text-align: center;
}
.photodrop b { color: var(--ink); font-weight: 600; }
.photodrop [data-dropin] { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photodrop svg { width: 26px; height: 26px; color: var(--accent); }
.photodrop img { max-height: 160px; border-radius: 12px; }
.tplbtn {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-item); padding: 12px 14px;
  display: flex; gap: 12px; align-items: center; text-align: start; cursor: pointer; color: var(--ink);
}
.tplbtn[aria-pressed="true"] { border: 2px solid var(--accent); padding: 11px 13px; }
.tplbtn .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; font: 700 16px/1 var(--font-display); }
.tplbtn .tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tplbtn .tx b { font-size: 15px; }
.tplbtn .tx span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tplbtn .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.banner { width: 100%; height: 104px; object-fit: cover; object-position: 50% 45%; border-radius: var(--r-item); display: block; }

/* ---------- toast, errors ---------- */
.toast {
  position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(86px + env(safe-area-inset-bottom));
  margin: 0 auto; max-width: 480px; background: var(--navy); color: #fff; border-radius: 14px;
  padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg);
}
.toast.error { background: var(--accent); color: #fff; }
.toast button { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 10px; padding: 4px 10px; font-weight: 700; cursor: pointer; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.err { color: var(--accent); font-size: 14px; font-weight: 600; }
.notice { border-radius: 12px; padding: 10px 12px; background: var(--wait-soft); color: var(--wait); font-size: 14px; }
.skeleton { color: var(--muted); padding: 24px 0; }

/* ---------- sign in ---------- */
/* Phones: photos, then logo and headline, then the form, all in the page flow (nothing covers the form).
   dvh follows the browser bars of iPhone and in-app browsers (vh first for older browsers). */
.login { min-height: 100vh; min-height: 100dvh; background: #1B1F3B; color: #fff; display: flex; flex-direction: column; }
.login .intro { flex: none; display: flex; flex-direction: column; }
.login .grid4 {
  height: clamp(180px, 32vh, 300px); height: clamp(180px, 32dvh, 300px); flex: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; background: #2B2F5A;
}
.login .grid4 img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.login .shade { display: none; }
.login .claim { display: flex; flex-direction: column; gap: 8px; padding: 18px 24px 0; width: 100%; max-width: 480px; margin: 0 auto; }
.login .claim .brandline { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.login h1 { font: 800 42px/.95 var(--font-display); color: #fff; }
html[lang="ar"] .login h1 { font: 800 34px/1.15 "Tajawal", sans-serif; }
.login form { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 24px calc(16px + env(safe-area-inset-bottom)); width: 100%; max-width: 480px; margin: 0 auto; }
.login label.field { color: #C9CCE3; font-size: 14px; }
.login input[type=email], .login input[type=password] { height: 50px; border: 1px solid #3A3F66; background: #262B4F; color: #fff; padding: 0 16px; font-size: 16px; }
.login .btn.big { margin-top: 6px; }
.login .err { color: #FFB3B7; }
.login .langs { display: flex; justify-content: center; gap: 6px; margin-top: auto; padding-top: 12px; }
.login .langs button { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #3A3F66; background: transparent; color: #fff; cursor: pointer; }
.login .langs button[aria-pressed="true"] { border-color: #fff; background: #fff; color: #1B1F3B; font-weight: 600; }
.login .powered { margin: 10px 0 0; text-align: center; font-size: 12px; color: #8A8FB3; letter-spacing: .02em; }
.login .card.empty { margin: auto; max-width: 380px; color: var(--muted); }
/* Short phone screens (iPhone SE, WhatsApp/Instagram browsers): two photos in one row, a smaller
   headline, so the fields and Sign in fit without scrolling; very short screens drop the photos. */
@media (max-width: 899px) and (max-height: 720px) {
  .login .grid4 { height: clamp(110px, 21dvh, 150px); grid-template-rows: minmax(0, 1fr); }
  .login .grid4 img:nth-child(2), .login .grid4 img:nth-child(4) { display: none; }
  .login .claim { padding-top: 12px; gap: 6px; }
  .login .claim .brandline img.pbadge.logo { width: 40px; height: 40px; }
  .login h1 { font-size: 30px; }
  html[lang="ar"] .login h1 { font-size: 26px; }
  .login form { gap: 10px; padding-top: 16px; }
  .login input[type=email], .login input[type=password] { height: 46px; }
  .login .langs { padding-top: 8px; }
  .login .langs button { height: 36px; }
  .login .powered { margin-top: 6px; }
}
@media (max-width: 899px) and (max-height: 540px) {
  .login .grid4 { display: none; }
}
/* Wide screens: the photos fill the left half with the headline over them; the form on the right. */
@media (min-width: 900px) {
  .login { flex-direction: row; }
  .login .intro { flex: 1.2; position: relative; justify-content: flex-end; padding: 48px; min-height: 100vh; min-height: 100dvh; }
  .login .grid4 { position: absolute; inset: 0; height: auto; }
  .login .shade { display: block; position: absolute; inset-inline: 0; bottom: 0; height: 260px; background: #1B1F3B; opacity: .86; }
  .login .claim { position: relative; padding: 0; margin: 0; max-width: none; }
  .login h1 { font-size: 46px; }
  html[lang="ar"] .login h1 { font-size: 38px; }
  .login form { flex: 1; justify-content: center; max-width: 460px; padding: 48px; }
  .login .langs { margin-top: 18px; }
}

/* ---------- front desk ---------- */
.desk { position: fixed; inset: 0; z-index: 30; background: #1B1F3B; color: #fff; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desk .l {
  padding: 48px; display: flex; flex-direction: column; gap: 24px; justify-content: center;
  background: linear-gradient(rgba(27, 31, 59, .62), rgba(27, 31, 59, .9)), url("img/mood-deadlift.jpg") 60% center / cover;
}
.desk .l .brandline { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 20px; }
.desk .l .pbadge { width: 56px; height: 56px; border-radius: 14px; font-size: 28px; }
.desk h1 { font: 800 72px/.92 var(--font-display); color: #fff; }
.desk .ar { margin: 0; font: 700 34px/1.3 "Tajawal", sans-serif; color: #FFD2B3; }
.desk .help { margin: 0; font-size: 18px; color: #C9CCE3; max-width: 420px; }
.desk .r { background: #262B4F; padding: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.desk .qr { width: 340px; height: 340px; max-width: 70vw; max-height: 70vw; border-radius: 28px; background: #fff; padding: 22px; display: grid; place-items: center; }
.desk .qr svg { width: 100%; height: 100%; display: block; }
.desk .qr svg path, .desk .qr svg rect:not([fill="white"]):not([fill="#fff"]) { fill: #1B1F3B; }
.desk .qrnote { color: #C9CCE3; font-size: 14px; }
.desk .welcome { width: 100%; max-width: 400px; background: #1D7A4C; border-radius: 20px; padding: 16px 20px; display: flex; gap: 14px; align-items: center; }
.desk .welcome .av { width: 52px; height: 52px; background: #E3F3EA; color: #1D7A4C; font-size: 18px; }
.desk .welcome b { display: block; font: 700 26px/1 var(--font-display); }
.desk .welcome span { font-size: 15px; color: #E3F3EA; }
.desk .exit { position: absolute; top: 8px; inset-inline-end: 8px; color: #C9CCE3; opacity: .35; }
.desk .exit:hover, .desk .exit:focus-visible { opacity: 1; }
@media (max-width: 760px) {
  .desk { grid-template-columns: 1fr; overflow-y: auto; position: fixed; }
  .desk .l { padding: 28px 22px; } .desk h1 { font-size: 52px; } .desk .ar { font-size: 26px; }
  .desk .r { padding: 28px 22px; }
}
.linkbtn { align-self: flex-start; border: 0; background: none; padding: 2px 0; color: var(--muted); font-weight: 500; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cards > .item > a { text-decoration: none; }
.cards .item a.title { color: var(--ink); }
.twocol > .card + .card { margin-top: 0; }
.measure input::placeholder { color: var(--dash); opacity: 1; }
.login .err:empty { display: none; }

/* ---------- meal builder (design-batch-c) ---------- */
.mealhead { gap: 14px; padding-top: 14px; padding-bottom: 22px; }
.mealhead h1 { font-weight: 800; font-size: 38px; }
.tgt3 { background: var(--navy-2); border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tgt3 > div { display: flex; flex-direction: column; min-width: 0; }
.tgt3 span { font-size: 12px; color: var(--on-navy-muted); }
.tgt3 b { font-weight: 700; font-size: 16px; }
.tgt3 b.peach { color: var(--peach); }
.tgt3 b.fig { font: 700 22px/1.1 var(--font-display); }
.linkbtn.onnavy { color: var(--peach-link); font-size: 12px; text-decoration: none; padding: 0 2px; }
.startcard { width: 100%; border-radius: 22px; padding: 18px; display: flex; gap: 14px; align-items: center; text-align: start; cursor: pointer; font: inherit; color: var(--ink); }
.startcard:disabled { opacity: .5; cursor: not-allowed; }
.startcard .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--bg); }
.startcard .ic svg { width: 26px; height: 26px; }
.startcard .tx { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.startcard .tx b { font: 700 24px/1 var(--font-display); }
html[lang="ar"] .startcard .tx b { font: 800 20px/1.2 "Tajawal", sans-serif; }
.startcard .tx span { font-size: 14px; color: var(--muted); }
.startcard.red { background: var(--accent); color: #fff; border: 0; }
.startcard.red .ic { background: rgba(255, 255, 255, .18); color: #fff; }
.startcard.red .tx span { color: #FFE1E2; }
.startcard.outline { background: var(--surface); border: 1.5px solid var(--ink); }
.startcard.plain { background: var(--surface); border: 1px solid var(--line); padding: 14px 18px; }
.startcard.plain .tx b { font: 700 15px/1.3 var(--font); }
.startcard.plain .tx span { font-size: 13px; }
.startcard.plain > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.suppcard { border-radius: 16px; padding: 12px 14px; }
.suppcard .chip { min-height: 36px; border-radius: 18px; padding: 0 12px; font-size: 14px; font-weight: 400; }
.suppcard .chip[aria-pressed="true"] { font-weight: 600; }
.planhead { gap: 12px; padding: 12px 18px 18px; border-radius: 0 0 26px 26px; }
.planhead .ttl { font: 700 22px/1 var(--font-display); }
html[lang="ar"] .planhead .ttl { font: 800 19px/1.2 "Tajawal", sans-serif; }
.planhead .peach { color: var(--peach); }
.btn.navyghost { background: transparent; border-color: var(--navy-3); color: #fff; border-radius: 18px; }
.mbar .top { display: flex; justify-content: space-between; font-size: 13px; }
.mbar .trk { height: 7px; border-radius: 4px; background: var(--navy-3); overflow: hidden; margin-top: 3px; }
.mbar .trk i { display: block; height: 100%; background: #4FC58A; }
.mbar .trk i.off { background: var(--orange); }
.mtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mtile { display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 12px; padding: 6px 2px; min-width: 0; }
.mtile b { font: 700 18px/1.1 var(--font-display); }
.mtile span { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtile.green { background: var(--ok-soft); color: var(--ok); }
.mtile.orange { background: var(--wait-soft); color: var(--wait); }
.mtile.red { background: var(--accent-soft); color: var(--accent-hover); }
.tipbox { background: #FFF4EC; border-radius: 14px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
:root[data-theme="dark"] .tipbox { background: var(--renew-soft); }
.mealcard { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; }
.mealcard .mt { font: 700 20px/1 var(--font-display); }
html[lang="ar"] .mealcard .mt { font: 800 18px/1.2 "Tajawal", sans-serif; }
.frow { display: flex; align-items: center; gap: 8px; min-height: 40px; border-top: 1px solid var(--track); }
.frow.hl { background: #FFF4EC; margin: 0 -14px; padding: 0 14px; }
.frow .nm { flex: 1; min-width: 0; font-size: 15px; }
.frow .kc { font-size: 14px; color: var(--muted); }
.swapbtn { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; color: var(--ink); border: 0; cursor: pointer; flex: none; }
.frow.hl .swapbtn { background: var(--accent); color: #fff; }
.swapbtn svg { width: 18px; height: 18px; }
.addfood { color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; padding: 8px 0; }
.searchbox { display: flex; align-items: center; gap: 8px; height: 46px; border-radius: 14px; background: var(--bg); padding: 0 12px; }
.searchbox svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.searchbox input { border: 0 !important; background: transparent !important; min-height: 0 !important; padding: 0 !important; flex: 1; }
.bestlbl { font-weight: 600; color: var(--ok); display: block; margin: 12px 0 8px; }
.swapsub { margin: -10px 0 12px; }
.swapopt { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; background: var(--surface); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.swapopt.best { border: 2px solid var(--ok); padding: 9px 11px; }
.swapopt .tx { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.swapopt .tx b { font-size: 15px; }
.swapopt .tx span { font-size: 13px; color: var(--muted); }
.swapopt .dk { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 9px; white-space: nowrap; }
.swapopt .dk.good { color: var(--ok); background: var(--ok-soft); }
.swapopt .dk.warn { color: var(--wait); background: var(--wait-soft); }
.portionbar { display: flex; align-items: center; gap: 10px; margin-top: 14px; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.portionbar b { font: 700 20px/1 var(--font-display); min-width: 70px; text-align: center; }
.pbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; cursor: pointer; color: var(--ink); }
body.fullpage main.bleed { padding-bottom: 24px; }

/* ---------- first sign-in ---------- */
.firstrun { min-height: 100vh; background: #1B1F3B; color: #fff; display: grid; place-items: start center; padding: 28px 22px; }
.frbox { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.firstrun .brandline { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.firstrun h1 { font: 800 40px/1 var(--font-display); color: #fff; }
html[lang="ar"] .firstrun h1 { font: 800 32px/1.2 "Tajawal", sans-serif; }
.firstrun .lead { color: #C9CCE3; margin: 0; }
.firstrun label.field { color: #C9CCE3; font-size: 14px; }
.firstrun input[type=password] { height: 50px; border: 1px solid #3A3F66; background: #262B4F; color: #fff; }
.firstrun .frhint { color: #9EA3C7; margin: 0; }
.firstrun .err { color: #FFB3B7; }
.firstrun .err:empty { display: none; }
.firstrun .btn.ghost { color: #C9CCE3; }
.frsteps { display: flex; gap: 6px; }
.frsteps i { flex: 1; height: 4px; border-radius: 2px; background: #3A3F66; }
.frsteps i.on { background: var(--orange); }
.frlangs { display: grid; gap: 10px; }
.frlangs button { border: 1px solid #3A3F66; background: #262B4F; color: #fff; border-radius: 18px; padding: 16px 18px; text-align: start; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.frlangs button b { font-size: 20px; }
.frlangs button span { color: #C9CCE3; font-size: 14px; }
.frlangs button[aria-pressed="true"] { border: 2px solid var(--orange); padding: 15px 17px; }
.frphoto { display: flex; align-items: center; gap: 16px; border: 1.5px dashed #3A3F66; border-radius: 18px; padding: 16px; cursor: pointer; color: #FFD2B3; }
.frphoto svg { width: 18px; height: 18px; vertical-align: -3px; }
.frphoto .av { background: #3A3F66; color: #fff; }

/* ---------- tour ---------- */
.tour { position: fixed; inset: 0; z-index: 70; }
.tourhole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(14, 16, 34, .62); border: 2px solid var(--orange); transition: all .2s ease; pointer-events: none; }
.tourhole.none { left: 50%; top: 50%; width: 0; height: 0; border: 0; }
.tourcard { position: fixed; inset-inline: 16px; max-width: 380px; margin: 0 auto; background: var(--surface); color: var(--ink); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px; }
.tourcard b { font: 700 22px/1.1 var(--font-display); }
html[lang="ar"] .tourcard b { font: 800 19px/1.2 "Tajawal", sans-serif; }
.tourcard p { margin: 0 0 6px; color: var(--muted); }
.temppw { font: 700 28px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 2px; background: var(--bg); border-radius: 14px; padding: 12px; text-align: center; user-select: all; }
.suppnotes { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; }
.suppnotes p { margin: 0; }
.searchbox:focus-within { box-shadow: inset 0 0 0 1.5px var(--dash); }
.searchbox input:focus-visible { outline: none; }
.startpage { display: flex; flex-direction: column; min-height: calc(100vh - 360px); }
.startpage > * + * { margin-top: 14px; }
.startpage .suppcard { margin-top: auto !important; }
.tgt3 b.fig { text-align: start; }

/* gym logo sizes: larger where the brand leads (sign-in, first sign-in, front desk) */
.login .claim img.pbadge.logo, .firstrun img.pbadge.logo { width: 56px; height: 56px; }
.desk .l img.pbadge.logo { width: 72px; height: 72px; }
.navy .topline img.pbadge.logo { width: 44px; height: 44px; }
.side .brand img.pbadge.logo { width: 52px; height: 52px; }
/* On dark screens a dark logo gets a faint light edge that follows its shape (transparent outside kept). */
.desk img.pbadge.logo, .side img.pbadge.logo, .navy img.pbadge.logo, .login img.pbadge.logo {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .55)) drop-shadow(0 0 6px rgba(255, 255, 255, .12));
}

/* ---------- owner's money screens ---------- */
.figure.okfig { background: var(--ok-soft); }
.figure.okfig .value { color: var(--ok); }
.begauge .bignums { display: flex; gap: 28px; flex-wrap: wrap; margin: 4px 0 14px; }
.begauge .bignums > div { display: flex; flex-direction: column; }
.begauge .bignums .label { font-size: 14px; color: var(--muted); }
.begauge .bignums b { font: 800 clamp(30px, 6vw, 46px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.begauge .bignums small { color: var(--muted); font-size: 13px; }
.gauge { position: relative; height: 22px; border-radius: 11px; background: var(--track); margin: 26px 0 8px; }
.gauge i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 11px; }
.gauge i.fill { background: var(--orange); z-index: 1; }
.gauge.done i.fill { background: var(--ok); }
.gauge i.proj { background: repeating-linear-gradient(45deg, rgba(255, 138, 61, .45) 0 6px, rgba(255, 138, 61, .18) 6px 12px); border-radius: 0 11px 11px 0; }
[dir="rtl"] .gauge i.proj { border-radius: 11px 0 0 11px; }
.gauge .mark { position: absolute; top: -8px; bottom: -8px; width: 3px; margin-inline-start: -1px; background: var(--ink); z-index: 2; border-radius: 2px; }
.gauge .mark em { position: absolute; bottom: 100%; transform: translateX(-50%); white-space: nowrap; font: 600 12px/1.6 inherit; font-style: normal; color: var(--ink); }
[dir="rtl"] .gauge .mark em { transform: translateX(50%); }
.gaugelegend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.gaugelegend .k { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }
.gaugelegend .k.fill { background: var(--orange); }
.gaugelegend .k.proj { background: repeating-linear-gradient(45deg, rgba(255, 138, 61, .55) 0 4px, rgba(255, 138, 61, .2) 4px 8px); }
.gaugelegend .k.rev { background: var(--navy); }
.gaugelegend .k.cost { background: var(--orange); }
.gaugelegend .k.profitk { background: var(--ok); height: 3px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.kv > span { color: var(--muted); }
.kv.small { font-size: 14px; margin-top: 8px; }
.trendsvg { width: 100%; height: auto; display: block; direction: ltr; }
.trendsvg rect.rev { fill: var(--navy); }
[data-theme="dark"] .trendsvg rect.rev { fill: #7A80B8; }
.trendsvg rect.cost { fill: var(--orange); }
.trendsvg polyline.profit { fill: none; stroke: var(--ok); stroke-width: 2.5; }
.trendsvg circle.profit { fill: var(--ok); }
.trendsvg line.zero { stroke: var(--line); stroke-width: 1; }
.trendsvg text { fill: var(--muted); font-size: 12px; }
table.pnl tr.strong td { font-weight: 700; }
table.pnl tr.sub td { border-top: 2px solid var(--line); }
.up { color: var(--ok); }
.down { color: var(--accent); }
ul.insights { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.aireport + .aireport { margin-top: 12px; }
.aireport .aibadge { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 10px; background: var(--wait-soft); color: var(--wait); font-size: 13px; font-weight: 600; }
.aireport .aitext { white-space: pre-wrap; line-height: 1.6; }
.aireport .ainote { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.aireport h3 { font-size: 16px; margin: 14px 0 6px; }
.aireport details { margin-top: 12px; }
.aireport summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.list.flat { box-shadow: none; background: transparent; }
.list.flat > .item { padding-inline: 0; }
.item .amt { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }
.item .ic.catic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.item .ic.catic svg { width: 18px; height: 18px; }
.catbar + .catbar { margin-top: 10px; }
.catbar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.catedit { display: grid !important; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; }
@media (max-width: 600px) { .catedit { grid-template-columns: 1fr 1fr; } }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* Email delivery failing: red bar above every manager and owner screen (app.js paintAlerts). */
.alertbar { margin: 12px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--accent); color: #fff;
  font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.alertbar[hidden] { display: none; }
.alertbar strong { font-weight: 600; }
