/* GRADUS panels v4 — the panels look like the GRADUS app (Codex designs docs/design/paineis-app, 15/10/2026).
   Loaded after panels.css / v2 / v3: huge titles, Graphite cards with radius 20, Volt actions, ring avatars,
   timeline, weekday pills and segmented bars from the app. */
:root { --r: 20px; --brand: var(--volt); --ok: #3ddc97; --warn: #ff9f1c; --bad: #ff6b6b; --ink: #c4cbd5; }
.app[data-role="nutri"] { --brand: #48cfea; }
.app[data-role="academia"] { --brand: #ff9f1c; }
body { background: var(--void); }

/* ── sidebar ── */
.app { grid-template-columns: 288px minmax(0, 1fr); }
.side { background: #0d1013; border-right: 1px solid #1b2027; padding: 30px 18px 22px; gap: 6px; }
.side-brand { flex-wrap: nowrap; gap: 12px; padding: 0 10px 30px; font-size: 25px; font-weight: 900; letter-spacing: 0.01em; }
.side-brand svg { width: 36px; height: 36px; }
.side-brand small { order: 0 !important; margin-left: 0 !important; padding: 4px 9px; border-radius: 8px; background: var(--brand); color: var(--void); font-size: 12px; font-weight: 900; letter-spacing: 0.06em; }
.side a.nav { min-height: 54px; padding: 0 16px; gap: 16px; border-radius: 14px; font-size: 17px; color: var(--ink); font-weight: 500; }
.side a.nav svg { width: 24px; height: 24px; stroke-width: 1.7; }
.side a.nav:hover { background: #15191e; color: var(--snow); }
.side a.nav.on { background: #15191e; color: var(--volt); font-weight: 600; box-shadow: inset 3px 0 0 var(--volt); }
.side a.nav.on svg { color: var(--volt); }
.side a.nav .badge { background: var(--brand); color: var(--void); }
.side-foot { gap: 12px; }
.side-foot .me { padding: 16px 12px 4px; border-top: 1px solid #1b2027; gap: 12px; }
.side-foot .me b { font-size: 15px; }
.side-foot .me small { font-size: 13px; color: var(--mist); line-height: 1.4; }

/* ── page header: breadcrumb, huge title (like "Treinos" in the app) ── */
.top { position: static; padding: 34px 40px 8px; background: transparent; border-bottom: 0; align-items: flex-end; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-title { min-width: 0; }
.top .crumb { font-size: 12.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mist); font-weight: 600; margin-bottom: 10px; }
.top h1 { font-size: clamp(42px, 4.4vw, 68px); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; }
.top .sub { font-size: 19px; color: var(--mist); margin-top: 10px; }
.top-actions { align-self: flex-end; padding-bottom: 6px; }
.content { padding: 22px 40px 48px; gap: 18px; }

/* ── cards, labels ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; gap: 16px; }
.card-h h2, .card-h h3 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; }
.card-h h2 svg { display: none; }
.over { display: block; font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--mist); font-weight: 600; }
.kpi::before { display: none; }

/* ── buttons (app: Volt pill with arrow, outline with chevron) ── */
.btn { border-radius: 14px; font-weight: 700; }
.btn-p { background: var(--volt); color: var(--void); font-weight: 800; }
.btn-p:hover { background: #ccff70; }
.btn-s { background: transparent; border: 1px solid #39424e; color: var(--snow); }
.btn-s:hover { border-color: var(--mist); background: rgba(255, 255, 255, 0.03); }
.btn .chev, .tl2-card .chev { width: 18px; height: 18px; opacity: 0.8; }

/* ── tabs → app segmented control ── */
.tabs { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: #11151a; border-bottom: 1px solid var(--line); }
.tabs a { flex: 1 1 0; text-align: center; padding: 12px 18px; border-radius: 12px; color: var(--ink); font-weight: 500; border: 0 !important; margin: 0; }
.tabs a.on { background: var(--volt); color: var(--void); font-weight: 800; }
.tabs a.on .tcount { background: rgba(11, 13, 16, 0.18); color: var(--void); }

/* ── avatars: dark disc, coloured ring ── */
.av { background: #15191e !important; border: 2px solid var(--hue, var(--volt)); color: var(--snow) !important; font-weight: 800; }
.av.xl { width: 104px; height: 104px; font-size: 32px; border-width: 4px; flex: none; }

/* ── profile header (student / client file) ── */
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.phead-name { font-size: clamp(38px, 4vw, 60px); font-weight: 900; letter-spacing: -0.045em; line-height: 1; }
.phead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: 19px; color: var(--mist); }
.phead-meta .fire { color: var(--warn); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.phead-meta .fire svg { width: 20px; height: 20px; }
.phead-acts { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── stat tiles (like Água / Sono / Nutrição in the app) ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile2 { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile2-l { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--snow); font-weight: 600; }
.tile2-l svg { width: 22px; height: 22px; color: var(--mist); }
.tile2-v { display: block; font-size: 44px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; margin-top: 6px; }
.tile2-v .of { font-size: 26px; color: var(--mist); font-weight: 800; }
.tile2 small { display: block; color: var(--mist); font-size: 14px; margin-top: 4px; }
.tile2 .bar { height: 8px; border-radius: 4px; background: var(--surface3); margin-top: 10px; overflow: hidden; }
.tile2 .bar i { display: block; height: 100%; border-radius: 4px; }
.tile2-d { margin-left: auto; align-self: center; font-size: 14px; color: var(--mist); text-align: right; }
.tile2-d b { color: var(--volt); font-size: 16px; }
.tile2-d.bad b { color: var(--bad); }

/* ── the app's timeline ── */
.tl2 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tl2 li { position: relative; display: grid; grid-template-columns: 58px 30px minmax(0, 1fr); align-items: center; gap: 12px; }
.tl2 li:not(:last-child)::after { content: ''; position: absolute; left: 84px; top: 50%; bottom: -50%; width: 2px; background: var(--line2); }
.tl2 time { color: var(--mist); font-size: 15px; }
.tl2-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--mist); background: var(--void); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.tl2-dot.done { background: var(--ok); border-color: var(--ok); color: var(--void); }
.tl2-dot.done svg { width: 16px; height: 16px; stroke-width: 3; }
.tl2-dot.now { border-color: var(--volt); background: var(--volt); }
.tl2-dot.warn { background: var(--warn); border-color: var(--warn); color: var(--void); }
.tl2-card { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: 16px; background: #11151a; border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
a.tl2-card:hover { border-color: var(--line2); }
.tl2-card b { display: block; font-size: 16px; }
.tl2-card small { display: block; color: var(--mist); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl2-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--surface3); display: grid; place-items: center; color: var(--snow); }
.tl2-ic svg { width: 22px; height: 22px; }

/* ── weekday pills + segmented bar (Treinos tab of the app) ── */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.dayp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 8px 4px; border-radius: 14px; background: #11151a; border: 1px solid var(--line); text-align: center; }
.dayp small { font-size: 13px; color: var(--mist); }
.dayp b { font-size: 20px; font-weight: 800; }
.dayp.on { background: var(--volt); border-color: var(--volt); color: var(--void); }
.dayp.on small, .dayp.on b { color: var(--void); }
.dayp.on small { font-weight: 700; }
.dayp-mark { font-style: normal; font-size: 12px; color: var(--mist); }
.dayp.on .dayp-mark { color: var(--void); }
.segbar2 { display: flex; gap: 6px; }
.segbar2 i { flex: 1; height: 14px; border-radius: 7px; background: var(--surface3); }
.segbar2 i.on { background: var(--volt); }
.segbar2 i.cur { background: transparent; border: 2px solid var(--volt); }

/* ── "Precisa de você" rows (card "Plano de hoje" of the app) ── */
.needs2 { display: flex; flex-direction: column; }
.need2 { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.need2:first-child { border-top: 0; }
.need2 .grow b { display: block; font-size: 17px; }
.need2 .grow small { display: block; font-size: 15px; color: var(--mist); margin-top: 2px; }
.need2 .grow small.hot { color: var(--warn); }
.need2 .btn { flex: none; }

/* ── 2×2 summary (Resumo do mês in Progresso) ── */
.sum4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sum4 > div { padding: 20px 22px; border-top: 1px solid var(--line); }
.sum4 > div:nth-child(-n+2) { border-top: 0; }
.sum4 > div:nth-child(even) { border-left: 1px solid var(--line); }
.sum4 b { display: block; font-size: 40px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; }
.sum4 span { display: block; color: var(--mist); font-size: 16px; margin-top: 4px; }
.sum4 em { font-style: normal; color: var(--volt); font-size: 14px; margin-left: 8px; font-weight: 700; }

/* ── macro / adherence bars ── */
.mbar { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto; align-items: center; gap: 14px; font-size: 15px; }
.mbar .track { height: 10px; border-radius: 5px; background: var(--surface3); overflow: hidden; }
.mbar .track i { display: block; height: 100%; border-radius: 5px; }
.mbar b { font-variant-numeric: tabular-nums; }
.mbars { display: flex; flex-direction: column; gap: 16px; }

/* ── layout helpers ── */
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols.wide-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.bigval { font-size: 64px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.chips2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip2 { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); color: var(--snow); font-size: 15px; }
.chip2 svg { width: 18px; height: 18px; color: var(--mist); }
.chips2 > .muted { display: inline-flex; align-items: center; gap: 8px; }
.chips2 > .muted svg { width: 20px; height: 20px; }
.chip2.off { color: var(--dim); border-style: dashed; }
.vbars { display: flex; align-items: flex-end; gap: 12px; height: 170px; }
.vbars span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; font-size: 13px; color: var(--mist); }
.vbars span i { width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: #39424e; }
.vbars span.on i { background: var(--volt); }
.vbars span.on { color: var(--snow); font-weight: 700; }

@media (max-width: 1100px) { .cols, .cols.even, .cols.wide-r { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .top { padding: 22px 18px 6px; }
  .content { padding: 16px 18px 40px; }
  .top h1 { font-size: 40px; }
  .days { gap: 6px; }
  .dayp { min-height: 56px; }
  .dayp b { font-size: 16px; }
  .tl2 li { grid-template-columns: 48px 26px minmax(0, 1fr); }
  .tl2 li:not(:last-child)::after { left: 73px; }
}

/* ── program editor (03-coach-programa): weeks as the app's segmented bar, days as pills, workouts as cards ── */
.weeks { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.wk { min-height: 48px; border-radius: 10px; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; background: var(--surface3) !important; color: var(--ink) !important; border: 0 !important; }
.wk small { display: none; }
.wk.on { background: var(--volt) !important; color: var(--void) !important; }
.weekgrid { gap: 10px; }
.day { border-radius: 16px; background: #11151a; border: 1px solid var(--line); min-height: 0; padding: 12px; align-items: stretch; text-align: center; }
.day.today { border-color: var(--volt); }
.day > b { font-size: 14px; color: var(--mist); font-weight: 500; letter-spacing: 0; text-transform: capitalize; }
.day .slot { background: transparent !important; font-size: 20px; font-weight: 800; padding: 2px 0; color: var(--snow) !important; }
.day .slot span { font-size: 13px; font-weight: 500; color: var(--mist); }
.day .slot.k-run, .day .slot.k-other { color: var(--blue) !important; }
.day .slot.k-rest { font-size: 15px; font-weight: 600; color: var(--mist) !important; }
.wtabs { gap: 12px; }
.wtab { min-height: 64px; padding: 0 18px 0 12px; border-radius: 16px; background: #11151a; border: 1px solid var(--line); color: var(--snow); font-size: 16px; gap: 12px; }
.wtab i { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; background: var(--surface3); color: var(--snow); }
.wtab.on { border: 2px solid var(--volt); background: #15191e; }
.exc { border-radius: 16px; background: #11151a; border: 1px solid var(--line); padding: 16px 18px; }
.exc-top .n { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; background: var(--surface3); color: var(--snow); }
.exc-top .nm b { font-size: 18px; }
.exc-top .nm small { font-size: 13px; }
.num-box { background: var(--surface); border-radius: 12px; padding: 8px 10px; }
.num-box span { font-size: 10.5px; color: var(--mist); }
.num-box input { font-size: 16px; }
.exc-bottom { padding-left: 52px; }
.lib { background: var(--surface); }
.lib-item { background: #11151a; border: 1px solid var(--line); border-radius: 14px; }
.lib-item b { font-size: 14.5px; }
.phases .phase-row.head span { color: var(--mist); }
.phase-note .pill { font-weight: 800; }

/* list rows: no content-visibility placeholder (rows jumped from 120px to their real height while scrolling) */
.li { content-visibility: visible; contain-intrinsic-size: none; }

/* ── enrolment (08-gym-matricula) ── */
.stepper2 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stepper2 li { display: flex; flex-direction: column; gap: 14px; color: var(--mist); font-size: 16px; }
.stepper2 .n { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; font-weight: 800; color: var(--snow); }
.stepper2 .n svg { width: 18px; height: 18px; stroke-width: 3; }
.stepper2 .bar { display: block; height: 8px; border-radius: 4px; background: var(--surface3); }
.stepper2 li.on, .stepper2 li.done { color: var(--snow); font-weight: 600; }
.stepper2 li.on .n, .stepper2 li.done .n { background: var(--volt); border-color: var(--volt); color: var(--void); }
.stepper2 li.on .bar, .stepper2 li.done .bar { background: var(--volt); }
.goal-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.goal-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 160px; padding: 22px; border-radius: 18px; background: #11151a; border: 1px solid var(--line); color: var(--snow); font: inherit; text-align: left; cursor: pointer; }
.goal-card svg { width: 40px; height: 40px; stroke-width: 1.6; color: var(--snow); margin-bottom: 14px; }
.goal-card b { font-size: 19px; }
.goal-card small { color: var(--mist); font-size: 15px; }
.goal-card:hover { border-color: var(--line2); }
.goal-card.on { border: 2px solid var(--volt); }
.goal-card.on > svg { color: var(--volt); }
.goal-ok { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--volt); color: var(--void); display: grid; place-items: center; }
.goal-ok svg { width: 16px !important; height: 16px !important; margin: 0 !important; color: var(--void) !important; stroke-width: 3; }
.invite-side { gap: 18px; }
.invite-side .qr { display: grid; place-items: center; }
@media (max-width: 900px) { .stepper2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── assessment page (09-gym-avaliacao) ── */
.as-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.bodyfig { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 720 / 740; }
.bodyfig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bf-call { position: absolute; transform: translateY(-50%); display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); white-space: nowrap; }
.bf-call span { grid-column: 1 / -1; color: var(--mist); font-size: 13px; }
.bf-call b { color: var(--volt); font-size: 20px; font-weight: 800; }
.bf-call em { font-style: normal; color: var(--mist); font-size: 13px; }
.wchart { width: 100%; height: auto; display: block; }
.wchart text { fill: var(--mist); font-size: 14px; font-family: inherit; }
.sum22 { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sum22 > div { display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; min-height: 130px; justify-content: center; }
.sum22 > div:nth-child(odd) { border-right: 1px solid var(--line); }
.sum22 > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.sum22 b { white-space: nowrap; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.sum22 span { color: var(--mist); font-size: 16px; }
.sum22 em { font-style: normal; font-weight: 700; font-size: 16px; }
.warnpill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 9%, transparent); color: var(--bad); font-size: 14px; font-weight: 600; }
.htl { list-style: none; margin: 0; padding: 8px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); text-align: center; }
.htl li { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.htl li > b { font-size: 17px; font-weight: 600; color: var(--mist); }
.htl li > span { color: var(--mist); font-size: 16px; }
.htl li > small { color: var(--mist); font-size: 16px; }
.htl li.on > b, .htl li.on > span { color: var(--snow); }
.htl-dot { position: relative; width: 100%; height: 44px; display: block; }
.htl-dot::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: var(--line2); }
.htl li:first-child .htl-dot::before { left: 50%; }
.htl li:last-child .htl-dot::before { right: 50%; }
.htl li:only-child .htl-dot::before { display: none; }
.htl-dot::after { content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); border: 3px solid var(--mist); box-sizing: border-box; }
.htl li.on .htl-dot::after { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 5px solid var(--volt); background: var(--void); }
@media (max-width: 1280px) { .as-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .as-grid > :first-child { grid-row: span 2; } }
@media (max-width: 820px) { .as-grid { grid-template-columns: 1fr; } .as-grid > :first-child { grid-row: auto; } .htl { grid-auto-flow: row; text-align: left; } }
