/* Pulse — design tokens */
:root {
  --bg: #0b0d10;
  --bg-2: #101317;
  --surface: #15191e;
  --surface-2: #1b2026;
  --line: #262c33;
  --line-2: #323a42;
  --text: #eef1f3;
  --muted: #8a949d;
  --faint: #5b646c;
  --accent: #c6ff3d;
  --accent-ink: #0b0d10;
  --accent-soft: rgba(198, 255, 61, .12);
  --fat: #ff8a5b;
  --muscle: #c6ff3d;
  --weight: #7cc4ff;
  --water: #5be0d0;
  --good: #6be38f;
  --bad: #ff6b6b;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5f1;
  --bg-2: #eceee8;
  --surface: #ffffff;
  --surface-2: #f6f7f3;
  --line: #e2e5dd;
  --line-2: #d3d7cd;
  --text: #11140f;
  --muted: #646b60;
  --faint: #9aa194;
  --accent: #1d1f1a;
  --accent-ink: #d8ff5c;
  --accent-soft: rgba(29, 31, 26, .06);
  --muscle: #5f9a00;
  --fat: #e2652f;
  --weight: #2f80d1;
  --water: #129b8c;
  --good: #1f9e4b;
  --shadow: 0 20px 50px -24px rgba(20, 30, 10, .25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none;
  transition: transform .15s ease, background .2s, border-color .2s; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
:root:not([data-theme="light"]) .btn.primary:hover { box-shadow: 0 0 0 6px var(--accent-soft); }
.btn.ghost { background: transparent; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-2); }

/* ---------- campos ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.input {
  height: 48px; width: 100%; padding: 0 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: 90px; padding: 12px 16px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 44px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---------- topbar pública ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid transparent;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.logo-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); position: relative; }
:root[data-theme="light"] .logo-dot { background: var(--muscle); }
.logo-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; color: var(--accent); animation: ping 2.4s infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
.topbar nav { display: flex; gap: 8px; align-items: center; }

/* ---------- landing ---------- */
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
.hero { padding: clamp(40px, 8vw, 100px) 0 60px; display: grid; gap: 48px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.eyebrow b { color: var(--text); }
.hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: .95; letter-spacing: -.045em; margin: 20px 0; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
:root[data-theme="light"] .hero h1 em { color: var(--muscle); }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line-2); animation: spin 60s linear infinite; }
.orbit.o2 { inset: 14%; animation-duration: 40s; animation-direction: reverse; }
.orbit.o3 { inset: 28%; border-style: solid; border-color: var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-card {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow); font-size: 13px; animation: float 6s ease-in-out infinite;
}
.hero-card .big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.hero-card.c1 { top: 8%; left: 0; }
.hero-card.c2 { top: 42%; right: -2%; animation-delay: -2s; }
.hero-card.c3 { bottom: 6%; left: 12%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero-core { position: absolute; inset: 34%; display: grid; place-items: center; }

.section { padding: 70px 0; }
.section h2 { font-size: clamp(30px, 4.5vw, 52px); letter-spacing: -.04em; line-height: 1; margin: 0 0 14px; }
.section .sub { color: var(--muted); max-width: 560px; margin-bottom: 40px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; }
.feature .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
:root[data-theme="light"] .feature .ic { color: var(--muscle); background: rgba(95,154,0,.1); }
.feature h3 { margin: 8px 0 0; font-size: 18px; letter-spacing: -.02em; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.plan.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%); }
.plan .tag { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.plan .price { font-size: 48px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 14px; flex: 1; }
.plan li::before { content: "✓"; color: var(--accent); margin-right: 10px; font-weight: 800; }
:root[data-theme="light"] .plan li::before { color: var(--muscle); }
.paylogos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 26px; color: var(--muted); font-size: 13px; }
.paylogo { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); background: var(--surface); font-size: 13px; }
footer { padding: 40px 0 60px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); margin-top: 40px; }

/* ---------- auth / checkout ---------- */
.center-page { min-height: calc(100vh - 70px); min-height: calc(100dvh - 70px); display: grid; place-items: center; padding: 30px 16px 60px; }
.panel { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.panel h1 { font-size: 30px; letter-spacing: -.04em; margin: 0 0 6px; line-height: 1.1; }
.panel .stack { display: grid; gap: 14px; margin-top: 22px; }
.checkout { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 1.15fr; gap: 16px; align-items: start; }
.summary { position: sticky; top: 90px; }
.summary .line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.summary .total { font-size: 32px; font-weight: 800; letter-spacing: -.04em; }
.plan-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 16px; border: 1px solid var(--line); }
.plan-switch button { border: 0; background: transparent; padding: 10px 6px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.plan-switch button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.method { border: 1px solid var(--line); background: var(--surface-2); border-radius: 16px; padding: 14px 10px; display: grid; justify-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); transition: .2s; }
.method svg { height: 22px; }
.method.on { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.applepay-btn { background: #000; color: #fff; border-radius: 12px; height: 50px; border: 1px solid #333; font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; width: 100%; }
:root[data-theme="light"] .applepay-btn { border-color: #000; }
.demo-note { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; }
.demo-note code { font-family: var(--mono); color: var(--text); }
.secure { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--faint); justify-content: center; }

.mbway-wait { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 10px 0; }
.phone-pulse { width: 92px; height: 92px; border-radius: 28px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.phone-pulse::before, .phone-pulse::after { content: ""; position: absolute; inset: -1px; border-radius: 28px; border: 2px solid var(--accent); animation: ripple 1.8s infinite; }
.phone-pulse::after { animation-delay: .9s; }
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }

.success-code { font-family: var(--mono); font-size: clamp(20px, 6vw, 28px); font-weight: 800; letter-spacing: .06em; padding: 18px; text-align: center; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent); cursor: pointer; }
:root[data-theme="light"] .success-code { color: var(--text); }
.check-anim { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(0); } }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: end center; animation: fade .2s; }
@media (min-width: 640px) { .modal-bg { place-items: center; } }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 28px 28px 0 0; padding: 24px; animation: up .3s cubic-bezier(.2, .9, .3, 1); }
@media (min-width: 640px) { .modal { border-radius: 28px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.sheet-pay { background: #1c1c1e; color: #fff; }
:root[data-theme="light"] .sheet-pay { background: #f2f2f7; color: #000; }
.sheet-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(128,128,128,.25); font-size: 14px; }
.faceid { width: 64px; height: 64px; margin: 18px auto 8px; border-radius: 18px; border: 3px solid currentColor; opacity: .85; position: relative; }
.faceid.scan::after { content: ""; position: absolute; left: 6px; right: 6px; height: 3px; background: #34c759; top: 8px; animation: scan 1s ease-in-out infinite alternate; }
@keyframes scan { to { top: 48px; } }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; background: var(--bg-2); }
.side nav { display: grid; gap: 4px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none; color: var(--muted); font-weight: 600; transition: .15s; }
.navlink:hover { color: var(--text); background: var(--surface); }
.navlink.on { color: var(--text); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
:root[data-theme="light"] .navlink.on { box-shadow: inset 3px 0 0 var(--muscle); }
.side .me { margin-top: auto; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 13px; }
.side .me b { display: block; font-size: 14px; }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-top: 8px; }
:root[data-theme="light"] .plan-chip { color: var(--muscle); }
.main { padding: clamp(18px, 3vw, 36px); padding-bottom: 110px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.045em; line-height: 1; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.tabbar { display: none; }

.grid { display: grid; gap: 14px; }
.g-dash { grid-template-columns: repeat(12, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.kpi .val { font-size: 34px; font-weight: 800; letter-spacing: -.04em; margin-top: 10px; line-height: 1; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-top: 12px; }
.delta.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.delta.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.delta.flat { color: var(--muted); background: var(--surface-2); }
.spark { height: 38px; margin-top: 10px; }

/* body composition ring */
.score-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.ring { width: 170px; height: 170px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-txt { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .ring-txt b { font-size: 40px; letter-spacing: -.05em; line-height: 1; display: block; }
.ring .ring-txt span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.legend { display: grid; gap: 10px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend b { margin-left: auto; font-family: var(--mono); }

/* chart */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity .15s; font-weight: 600; z-index: 3; }
.chart .tip.on { opacity: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip.on { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }

/* lista de avaliações */
.a-list { display: grid; gap: 10px; }
.a-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: .15s; }
.a-item:hover { border-color: var(--line-2); transform: translateY(-1px); }
.a-thumb { width: 64px; height: 80px; border-radius: 12px; background: var(--surface-2) center/cover; border: 1px solid var(--line); }
.a-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 4px; }
.a-meta b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.a-date { font-weight: 700; font-size: 16px; letter-spacing: -.02em; }

/* timeline strip (inovação: "heat strip") */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 14px; }
.strip div { height: 28px; border-radius: 6px; position: relative; }
.strip-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; font-size: 10px; color: var(--faint); margin-top: 6px; text-align: center; }

/* formulário de avaliação */
.form-section { margin-top: 18px; }
.form-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photo-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { aspect-ratio: 3/4; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; font-size: 12px; color: var(--muted); text-align: center; }
.slot.has { border-style: solid; border-color: var(--line); }
.slot.has .slot-lbl { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.slot .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.guide-overlay { position: absolute; inset: 0; pointer-events: none; opacity: .18; }

/* comparador de fotos */
.compare-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 var(--line-2) inset; }
.select { height: 42px; padding: 0 36px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a949d' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); aspect-ratio: 3/4; margin: 0 auto; width: min(100%, calc(74vh * .75)); touch-action: none; user-select: none; -webkit-user-select: none; }
.stage.wide { aspect-ratio: 3/2; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.stage .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 20px rgba(0,0,0,.4); cursor: ew-resize; }
.handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-weight: 800; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.badge { position: absolute; top: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); z-index: 2; }
.badge.l { left: 12px; } .badge.r { right: 12px; }
.sbs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; height: 100%; }
.sbs > div { position: relative; overflow: hidden; }
.sbs > div + div { border-left: 2px solid var(--bg); }
.gridlines { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 100% 10%; z-index: 1; }
.compare-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.diff-list { display: grid; gap: 8px; }
.diff-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.diff-row b { font-family: var(--mono); }
.range { width: 100%; accent-color: var(--accent); }
.flip-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.empty .ic { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); margin: 0 auto 14px; display: grid; place-items: center; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; z-index: 200; animation: up .3s; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
@media (min-width: 900px) { .toast { bottom: 30px; } }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .span-3 { grid-column: span 6; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .compare-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 22px; border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 16px; text-decoration: none; color: var(--muted); font-size: 10px; font-weight: 600; }
  .tabbar a.on { color: var(--text); background: var(--surface-2); }
  .tabbar a.fab { background: var(--accent); color: var(--accent-ink); }
  .mobile-top { display: flex !important; }
}
@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .span-3 { grid-column: span 6; }
  .kpi .val { font-size: 26px; }
  .score-card { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .a-item { grid-template-columns: 52px 1fr; }
  .a-item .chev { display: none; }
  .a-thumb { width: 52px; height: 66px; }
  .hero-card { font-size: 11px; padding: 10px 12px; }
  .hero-card .big { font-size: 20px; }
  .topbar nav .hide-sm { display: none; }
  .methods .method { font-size: 11px; }
}
.mobile-top { display: none; justify-content: space-between; align-items: center; margin-bottom: 18px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v2: multi-cliente ---------- */
.avatar { --h: 120; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; letter-spacing: -.02em;
  background: hsl(var(--h) 55% 30%); color: hsl(var(--h) 90% 85%); border: 2px solid var(--surface); }
:root[data-theme="light"] .avatar { background: hsl(var(--h) 70% 88%); color: hsl(var(--h) 60% 28%); }
.plan-range { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.plan.recommended { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-4px); }
:root[data-theme="light"] .plan.recommended { border-color: var(--muscle); }
.plan { transition: transform .25s, box-shadow .25s, border-color .25s; }
.calc { display: grid; gap: 14px; }
.calc-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: -6px; font-family: var(--mono); }
.usage { display: grid; gap: 8px; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--muscle); transition: width .8s cubic-bezier(.3,.8,.3,1); }
.usage.warn .meter i { background: #ffb547; } .usage.full .meter i { background: var(--bad); }
.usage-bar { display: flex; gap: 16px; align-items: center; padding: 14px 18px; }
.usage-bar .usage { flex: 1; }
.radar { display: grid; place-items: center; margin: 14px 0 6px; }
.radar svg { max-width: 100%; height: auto; }
.radar circle[style*="fill"] { cursor: pointer; }
.radar .sweep { transform-origin: 110px 110px; animation: spin 6s linear infinite; }
.people { display: grid; gap: 6px; margin-top: 10px; }
.person { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; text-decoration: none; transition: background .15s; }
.person:hover { background: var(--surface-2); }
.person > span:nth-child(2):not(.avatar), .person > span[style*="min-width"] { display: grid; }
.person b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .person:not(:has(.rank)) { grid-template-columns: auto 1fr auto; }
.rank { width: 22px; font-family: var(--mono); font-weight: 700; color: var(--faint); text-align: center; }
.dot-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot-status.good::before { background: var(--good); } .dot-status.warn::before { background: #ffb547; } .dot-status.bad::before { background: var(--bad); }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.client-card { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .15s, border-color .15s; min-width: 0; }
.client-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.cname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cstats > div { display: grid; gap: 4px; justify-items: start; }
.cstats span:first-child { font-size: 11px; color: var(--faint); font-weight: 600; }
.client-card .spark { margin: -4px 0 -6px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 42px; height: 44px; }
.backlink { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.backlink:hover { color: var(--text); }
.client-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.client-head h1 { margin: 0; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.045em; line-height: 1.05; }
.client-tags { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.client-tags a { color: var(--muted); text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.client-tags a:hover { color: var(--text); }
@media (max-width: 900px) { .tabbar { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) {
  .client-head > div:last-child { width: 100%; } .client-head > div:last-child .btn { flex: 1; }
  .search { max-width: none; }
  .hide-sm { display: none; }
}
.compare-bar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.compare-bar .seg button { white-space: nowrap; flex: none; }
@media (max-width: 640px) { #modeSeg button svg { display: none; } #modeSeg button { padding: 8px 10px; } }

/* ---------- v3: área de gestão ---------- */
.admin-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.ic-badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
:root[data-theme="light"] .ic-badge { color: var(--muscle); }
.demo-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.demo-banner span { flex: 1; min-width: 200px; } .demo-banner b { color: var(--text); }
.rev-head { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; }
.rev-head > div { display: grid; gap: 2px; } .rev-head span { font-size: 12px; } .rev-head b { font-size: 22px; letter-spacing: -.02em; }
.hbars { display: grid; gap: 14px; margin-top: 14px; }
.hbar { display: grid; gap: 6px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; }
.hbar .meter { height: 10px; }
.meter.warn i { background: #ffb547; } .meter.full i { background: var(--bad); }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-tr] { cursor: pointer; transition: background .12s; }
.table tbody tr[data-tr]:hover { background: var(--surface-2); }
.table .num { text-align: right; }
.table .act { text-align: right; width: 1%; }
.tcell { display: flex; gap: 10px; align-items: center; min-width: 0; }
.tcell b { white-space: nowrap; }
.mini-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--faint); border: 1px solid var(--line); vertical-align: middle; }
.plan-pill { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); white-space: nowrap; }
.plan-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.use { display: grid; gap: 5px; min-width: 90px; font-size: 13px; }
.use .meter { height: 6px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-kpis > div { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.mini-kpis span { font-size: 11px; color: var(--faint); font-weight: 600; }
.mini-kpis b { font-size: 16px; }
.admin-actions { display: grid; gap: 14px; }
.admin .card h3 .seg button { padding: 6px 10px; font-size: 12px; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .table td { border: 0; padding: 0; }
  .table td:first-child { grid-column: 1 / -1; }
  .table td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; margin-bottom: 2px; }
  .table .num { text-align: left; }
  .table .act { display: none; }
  .mini-kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- planos: tantas colunas quantos os planos (até 4), centrados ---------- */
.plans { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); max-width: calc(var(--n, 3) * 400px); margin-left: auto; margin-right: auto; gap: 18px; }
.plan .price { font-size: 42px; }
.seats { display: flex; gap: 8px; align-items: center; }
.seats .input { text-align: center; font-size: 20px; font-weight: 700; }
.seats .icon-btn { width: 48px; height: 48px; font-size: 22px; flex: none; }
.calc-ticks { font-family: var(--font); font-weight: 600; gap: 8px; }
.calc-ticks span { flex: 1; text-align: center; } .calc-ticks span:first-child { text-align: left; } .calc-ticks span:last-child { text-align: right; }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, 1fr); max-width: none; } }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } .calc-ticks { display: none; } .plan-switch button { font-size: 12px; padding: 10px 2px; } }

/* ---------- v5: fotos, notificações, treino e área do aluno ---------- */
.avatar.has-photo { background-size: cover; background-position: center; color: transparent; }
.bell { position: relative; }
.bell i { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 10px/18px var(--font); font-style: normal; text-align: center; border: 2px solid var(--bg-2); }
.photo-pick { display: flex; gap: 16px; align-items: center; }
.photo-slots { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .photo-slots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .tabbar { grid-template-columns: repeat(5, 1fr); } .tabbar a span { font-size: 9.5px; } }

/* vídeos e miniaturas */
.ex-thumb { position: relative; display: grid; place-items: center; width: 64px; aspect-ratio: 16/10; border-radius: 10px; background: var(--surface-2) center/cover; flex: none; overflow: hidden; color: hsl(var(--h, 220) 60% 60%); }
.ex-thumb.none { background: hsl(var(--h, 220) 40% 50% / .14); }
.ex-thumb.big { width: 100%; border-radius: 0; }
.ex-thumb .play { width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.ex-thumb.big .play { width: 44px; height: 44px; }
.video-box { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; }
.video-box.small { border-radius: 12px; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .15s, border-color .15s; }
.ex-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ex-media { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.ex-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.ex-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.muscle-pill { --mh: 220; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: hsl(var(--mh) 70% 55% / .15); color: hsl(var(--mh) 70% 62%); }
:root[data-theme="light"] .muscle-pill { color: hsl(var(--mh) 60% 35%); }
.add-video { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.pick-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.pick { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; cursor: pointer; }
.pick span { display: grid; } .pick small { font-size: 12px; }
.pick-add { width: 32px; height: 32px; border-radius: 50%; display: grid !important; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.pick.added { border-color: var(--good); } .pick.added .pick-add { background: var(--good); color: #fff; border-color: transparent; }

/* acesso do aluno */
.access-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.access-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
:root[data-theme="light"] .access-ic { color: var(--muscle); }
.access-code { display: inline-block; font-size: 20px; font-weight: 800; letter-spacing: .06em; padding: 8px 14px; border-radius: 12px; border: 1px dashed var(--accent); cursor: pointer; }
.access-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* editor de plano */
.plan-bar { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.plan-editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.plan-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.plan-name { flex: 1; min-width: 200px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--good); } .switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.days { display: grid; gap: 12px; }
.day { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: var(--bg-2); display: grid; gap: 10px; }
.day-head { display: flex; gap: 10px; align-items: center; }
.day-letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--accent); color: var(--accent-ink); flex: none; }
.day-letter.big { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
.day-name { font-weight: 700; height: 40px; }
.day-tools, .item-tools { display: flex; gap: 4px; }
.day-tools .icon-btn, .item-tools .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.items { display: grid; gap: 6px; }
.item { display: grid; grid-template-columns: 64px minmax(160px, 1fr) 70px 80px 90px 90px auto; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.item-head { background: none; border: 0; padding: 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.item .input { height: 38px; padding: 0 10px; font-size: 14px; }
.item-thumb { border: 0; padding: 0; background: none; cursor: pointer; }
.item-name { display: grid; gap: 2px; min-width: 0; }
.item-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-name small { font-size: 11px; }
.item-notes { height: 30px !important; font-size: 12px !important; margin-top: 4px; }
.item label { display: block; } .item .lbl { display: none; }
.add-day { border-style: dashed; }
.plan-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.savebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50; display: flex; gap: 14px; align-items: center; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: up .25s; }
@media (max-width: 900px) { .savebar { bottom: calc(96px + env(safe-area-inset-bottom)); } }
@media (max-width: 860px) {
  .item { grid-template-columns: 56px 1fr auto; grid-template-areas: "t n x" "a b c" "d d d"; }
  .item-head { display: none; }
  .item-thumb { grid-area: t; } .item-name { grid-area: n; } .item-tools { grid-area: x; }
  .item > label { display: grid; gap: 2px; } .item .lbl { display: block; font-size: 10px; color: var(--faint); font-weight: 700; text-transform: uppercase; }
  .item > label:nth-of-type(1) { grid-area: a; } .item > label:nth-of-type(2) { grid-area: b; } .item > label:nth-of-type(3) { grid-area: c; } .item > label:nth-of-type(4) { grid-area: d; }
}

/* registos de treino */
.section-title { font-size: 14px; color: var(--muted); font-weight: 600; margin: 6px 0 10px; }
.wk-list { display: grid; gap: 8px; }
.wk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.wk-card summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; cursor: pointer; }
.wk-card summary::-webkit-details-marker { display: none; }
.wk-card[open] summary { border-bottom: 1px solid var(--line); }
.wk-date { width: 48px; height: 52px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; align-content: center; line-height: 1.1; }
.wk-date b { font-size: 18px; } .wk-date span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.wk-meta { font-size: 12px; }
.wk-vol { display: grid; text-align: right; } .wk-vol span { font-size: 11px; }
.wk-body { padding: 12px 14px 14px; }
.wk-ex { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.wk-ex span { color: var(--muted); font-size: 13px; text-align: right; }
.wk-notes { font-style: italic; color: var(--muted); margin: 10px 0 0; }
.week-grid { display: flex; gap: 4px; margin-top: 12px; }
.wg-days, .wg-col { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; }
.wg-days span { font-size: 9px; color: var(--faint); line-height: 12px; }
.wg-col i { width: 12px; height: 12px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.wg-col i.on { background: var(--muscle); border-color: transparent; } .wg-col i.fut { opacity: .3; }

/* ---------- área do aluno ---------- */
.portal { min-height: 100vh; min-height: 100dvh; }
.p-top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.p-tabs { display: flex; gap: 4px; }
.p-tabs a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.p-tabs a.on { background: var(--surface); color: var(--text); }
.p-main { width: min(820px, 100% - 32px); margin: 0 auto; padding: 24px 0 120px; }
.p-bar { display: none; }
@media (max-width: 900px) { .p-tabs { display: none; } .p-bar { display: grid; } }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.banner.warn { background: color-mix(in srgb, #ffb547 12%, transparent); border-color: color-mix(in srgb, #ffb547 40%, transparent); }
.banner.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.banner svg { flex: none; }
.p-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.p-hello h1 { margin: 0; font-size: clamp(28px, 6vw, 38px); letter-spacing: -.045em; }
.p-hello p { margin: 4px 0 0; }
.week-dots { display: flex; gap: 6px; align-items: flex-end; }
.week-dots span { display: grid; justify-items: center; gap: 4px; font-size: 10px; color: var(--faint); font-weight: 700; }
.week-dots i { width: 22px; height: 22px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.week-dots .on i { background: var(--muscle); border-color: transparent; }
.week-dots .today i { box-shadow: 0 0 0 2px var(--text); }
.week-dots b { margin-left: 8px; font-size: 22px; line-height: 1; } .week-dots small { font-size: 12px; color: var(--muted); font-weight: 600; }
.p-plan h2 { margin: 6px 0 4px; letter-spacing: -.03em; }
.p-plan p { margin: 0 0 14px; font-size: 14px; }
.day-cards { display: grid; gap: 10px; }
.day-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .15s, border-color .15s; }
.day-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.session-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; background: var(--bg); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
/* a barra ocupa a largura toda da área (o que passa por baixo desaparece por inteiro, sem cartões "cortados" dos lados) */
.main .session-head { margin-inline: calc(-1 * clamp(18px, 3vw, 36px)); padding-inline: clamp(18px, 3vw, 36px); }
/* na app do aluno: logo abaixo do topo (altura medida: muda entre telemóvel, tablet e computador); o fundo estende-se a toda a largura do ecrã */
.portal .session-head { top: var(--ptop, 61px); border-bottom: 0; border-image: linear-gradient(to top, var(--line) 1px, var(--bg) 1px) fill 0 / 0 / 0 100vmax; } /* (border-image pinta a largura toda sem alargar a página) */
/* computador: o botão "Terminar e guardar treino" com o tamanho dele, à direita (no telemóvel continua a largura toda) */
@media (min-width: 900px) { .session-finish.block { width: fit-content; min-width: 300px; margin-left: auto; display: flex; padding-inline: 28px; } }
.session-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 16px; }
.session-progress i { display: block; height: 100%; background: var(--muscle); transition: width .3s; }
.ex-session { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; margin-bottom: 12px; transition: border-color .2s; }
.ex-session.complete { border-color: color-mix(in srgb, var(--good) 50%, transparent); }
.ex-s-head { display: flex; gap: 12px; align-items: center; }
.ex-s-thumb { border: 0; padding: 0; background: none; cursor: pointer; }
.ex-s-thumb .ex-thumb { width: 84px; }
.targets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.targets span { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); display: inline-flex; gap: 4px; align-items: center; }
.ok-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; flex: none; }
.ex-note { font-size: 13px; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); white-space: pre-line; }
.ex-last { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.sets { display: grid; gap: 6px; margin-top: 12px; }
.set { display: grid; grid-template-columns: 44px 1fr 1fr 52px; gap: 8px; align-items: center; }
.set-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.set-n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 13px; }
.set .input { height: 46px; text-align: center; font-size: 18px; font-weight: 700; }
.set.done .input { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 8%, var(--surface-2)); }
.set-check { width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--faint); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.set.done .set-check { background: var(--good); border-color: transparent; color: #fff; transform: scale(1.04); }
.set-tools { display: flex; gap: 6px; margin-top: 8px; }
.rest-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 60; display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); animation: up .25s; }
.rest-pill span { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.rest-pill b { font-size: 22px; min-width: 56px; text-align: center; }
.rest-pill .chip { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.rest-pill.go { background: var(--good); color: #fff; }
@media (max-width: 900px) { .rest-pill { bottom: calc(96px + env(safe-area-inset-bottom)); } }
.cycle-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cycle-row b { font-size: 24px; letter-spacing: -.03em; }
.evo-v { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.evo-v b { font-size: 28px; letter-spacing: -.03em; } .evo-v small { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .span-4 { grid-column: span 12; } .week-dots i { width: 18px; height: 18px; } }
.access-card > div:nth-child(2) { flex: 1 1 240px; }
@media (max-width: 640px) { .access-actions { width: 100%; } .access-actions .btn { flex: 1; } }
@media (max-width: 860px) {
  .item { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "t n n n" "a b c d" "x x x x"; row-gap: 8px; }
  .item-thumb .ex-thumb { width: 100%; }
  .item-tools { justify-self: end; }
  .item > label .input { width: 100%; }
}
/* desktop: a coluna dos botões tem largura fixa para o cabeçalho (sem botões) alinhar com as linhas */
@media (min-width: 861px) {
  .item { grid-template-columns: 56px minmax(120px, 1fr) 62px 76px 80px 76px 104px; }
  .item-tools { justify-content: flex-end; }
}
.item-head { border: 1px solid transparent; }
/* número de notificações no sino: maior e mais legível */
.bell i { top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; font-size: 12px; line-height: 22px; }
.warn-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* ---------- v6: listas de opções e calendário ---------- */
.ui-hidden { display: none !important; }
.ui-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; width: 100%; color: var(--text); }
.ui-btn.compact { height: 42px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; width: auto; min-width: 140px; }
.ui-btn:hover { border-color: var(--line-2); }
.ui-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ui-btn .ui-val { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-btn .ui-val.ph { color: var(--faint); }
.ui-btn > svg { flex: none; color: var(--muted); transition: transform .2s; }
.ui-dd-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.ui-date-btn > svg { color: var(--accent); }
:root[data-theme="light"] .ui-date-btn > svg { color: var(--muscle); }
.ui-pop { position: fixed; z-index: 400; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.02); overflow: auto; animation: uiIn .14s ease-out; outline: none; }
:root[data-theme="light"] .ui-pop { box-shadow: 0 24px 50px -16px rgba(20,30,10,.35); }
@keyframes uiIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ui-dd { padding: 6px; display: flex; flex-direction: column; }
.ui-search { position: sticky; top: -6px; margin: -6px -6px 6px; padding: 8px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; color: var(--faint); }
.ui-search input { flex: 1; border: 0; background: transparent; outline: none; height: 30px; font-size: 14px; color: var(--text); }
.ui-list { display: grid; gap: 2px; }
.ui-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.ui-opt.act { background: var(--surface-2); }
.ui-opt.sel { font-weight: 700; color: var(--accent); }
:root[data-theme="light"] .ui-opt.sel { color: var(--muscle); }
.ui-opt.dis { opacity: .4; cursor: not-allowed; }
.ui-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.ui-cal { padding: 14px; width: 320px; }
.ui-cal.sheet { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: none !important; border-radius: 22px; padding: 18px; animation: up .25s cubic-bezier(.2,.9,.3,1); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.cal-titles { display: flex; gap: 4px; }
.cal-title { border: 0; background: none; font-weight: 800; font-size: 16px; letter-spacing: -.02em; padding: 6px 8px; border-radius: 10px; cursor: pointer; text-transform: capitalize; color: var(--text); }
button.cal-title:hover { background: var(--surface-2); }
.cal-nav { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.cal-nav:hover { border-color: var(--line-2); }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd span { text-align: center; font-size: 11px; font-weight: 700; color: var(--faint); padding: 4px 0; }
.cal-d { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; font: 600 14px var(--font); color: var(--text); cursor: pointer; position: relative; transition: background .12s; }
.cal-d:hover { background: var(--surface-2); }
.cal-d.we { color: var(--muted); }
.cal-d.out { color: var(--faint); opacity: .5; }
.cal-d.today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
:root[data-theme="light"] .cal-d.today::after { background: var(--muscle); }
.cal-d.sel { background: var(--accent); color: var(--accent-ink); }
.cal-d.sel::after { background: var(--accent-ink); }
.cal-d.dis { opacity: .2; cursor: not-allowed; }
.cal-d:focus-visible, .cal-m:focus-visible, .ui-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cal-mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-m { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font: 600 14px var(--font); color: var(--text); cursor: pointer; text-transform: capitalize; }
.cal-m:hover { border-color: var(--line-2); }
.cal-m.sel { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cal-m.today { border-color: var(--accent); }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-link { border: 0; background: none; font: 700 13px var(--font); color: var(--accent); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
:root[data-theme="light"] .cal-link { color: var(--muscle); }
.cal-link:hover { background: var(--surface-2); }
.cal-link[data-clear] { color: var(--muted); }
/* códigos de oferta */
.hidden { display: none !important; }
.code-pill { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 13px; letter-spacing: .04em; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text); cursor: pointer; }
.code-pill.masked { cursor: default; color: var(--muted); border-style: solid; }
.kind-pill { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.kind-pill.free { background: color-mix(in srgb, var(--weight) 15%, transparent); color: var(--weight); }
.kind-pill.secure { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="light"] .kind-pill.secure { color: var(--muscle); }
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-switch button { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: var(--text); }
.kind-switch button b { display: inline-flex; gap: 6px; align-items: center; font-size: 15px; }
.kind-switch button span { font-size: 12px; color: var(--muted); }
.kind-switch button.on { border-color: var(--accent); background: var(--accent-soft); }
.once-list { display: grid; gap: 6px; max-height: 40vh; overflow: auto; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; font-weight: 700; letter-spacing: .05em; user-select: all; }
@media (max-width: 640px) { .kind-switch { grid-template-columns: 1fr; } }
.gift-link { border: 0; background: none; color: var(--muted); font: 600 13px var(--font); display: inline-flex; gap: 6px; align-items: center; justify-content: center; cursor: pointer; padding: 6px; border-radius: 8px; }
.gift-link:hover { color: var(--text); background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
@media (max-width: 760px) { .table .act-codes { text-align: left !important; } }

/* ---------- v7: janela de confirmação padrão, campo com sugestões, calendário compacto ---------- */
.dlg-bg { z-index: 500; }
.modal.dlg { width: min(420px, 100%); text-align: center; display: grid; justify-items: center; gap: 10px; padding: 28px 24px 22px; }
.dlg-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.dlg-ic svg { width: 26px; height: 26px; }
:root[data-theme="light"] .dlg-ic { color: var(--muscle); }
.dlg.danger .dlg-ic { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.dlg h2 { margin: 0; font-size: 21px; letter-spacing: -.03em; }
.dlg p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dlg p b { color: var(--text); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 10px; }
.dlg-actions .btn { flex: 1 1 auto; white-space: nowrap; }
.btn.btn-danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.btn-danger:hover { filter: brightness(1.08); box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 18%, transparent); }
@media (max-width: 420px) { .dlg-actions .btn { flex-basis: 100%; } .dlg-actions [data-yes] { order: -1; } }
.ui-combo { position: relative; display: block; }
.ui-combo .input { padding-right: 44px; }
.ui-combo-tog { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.ui-combo-tog:hover { background: var(--surface-2); color: var(--text); }
.ui-combo:has([aria-expanded="true"]) .ui-combo-tog svg, .ui-combo[aria-expanded="true"] .ui-combo-tog svg { transform: rotate(180deg); }
.ui-cal { width: 276px; padding: 12px; }
.ui-cal .cal-head { margin-bottom: 6px; }
.ui-cal .cal-title { font-size: 15px; padding: 4px 6px; }
.ui-cal .cal-nav { width: 30px; height: 30px; border-radius: 9px; }
.ui-cal .cal-wd, .ui-cal .cal-grid { gap: 2px; }
.ui-cal .cal-wd span { font-size: 10px; padding: 2px 0; }
.ui-cal .cal-d { font-size: 13px; border-radius: 8px; }
.ui-cal .cal-d.today::after { bottom: 3px; }
.ui-cal .cal-m { height: 40px; font-size: 13px; }
.ui-cal .cal-foot { margin-top: 6px; padding-top: 6px; }
.ui-cal.sheet { width: auto; }

/* ---------- v8: barra lateral recolhível ---------- */
.side-top { display: flex; align-items: center; gap: 6px; }
.side-top .logo { margin-right: auto; min-width: 0; }
.side-toggle svg { width: 18px; height: 18px; }
.me-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.shell { transition: grid-template-columns .25s ease; }
@media (min-width: 901px) {
  .side-collapsed .shell { grid-template-columns: 76px 1fr; }
  .side-collapsed .side { padding: 18px 12px; align-items: center; }
  .side-collapsed .side .nl, .side-collapsed .me-info { display: none; }
  .side-collapsed .side-top { flex-direction: column; gap: 10px; }
  .side-collapsed .side-top .logo { margin: 0; }
  .side-collapsed .side-toggle .st-arrow { transform: rotate(180deg); transform-origin: 14px 12px; }
  .side-collapsed .navlink { justify-content: center; padding: 12px; width: 48px; }
  .side-collapsed .navlink.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .side-collapsed .side [data-newclient] { width: 48px; height: 48px; padding: 0; border-radius: 14px; }
  .side-collapsed .me { padding: 8px; border: 0; background: none; }
  .side-collapsed .me-actions { flex-direction: column; margin-top: 0; }
}
/* página inicial: faixa do acompanhamento online */
.online-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: clamp(22px, 4vw, 40px); border-radius: 28px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 55%); }
.online-mock { display: grid; gap: 10px; }
.om-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.om-row div { display: grid; min-width: 0; } .om-row div span { font-size: 13px; }
.om-day { width: 48px; height: 52px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; align-content: center; line-height: 1.1; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.om-day b { font-size: 18px; color: var(--text); }
@media (max-width: 900px) { .online-card { grid-template-columns: 1fr; } }
@media (min-width: 1101px) { .features { grid-template-columns: repeat(4, 1fr); } }
/* logótipos de pagamento */
.pay-img { display: block; height: 22px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; box-sizing: content-box; }
.pay-img.visa { height: 14px; padding: 7px 8px; }
.paylogo .pay-img { margin: -4px -8px; }
.method .pay-img { height: 20px; }
.method .pay-img.visa { height: 12px; }
#ccBrand .pay-img { height: 12px; }

/* ---------- v9: acompanhamento online ---------- */
.mode-pill { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mode-pill.online { background: color-mix(in srgb, var(--weight) 16%, transparent); color: var(--weight); }
.mode-pill.hibrido { background: color-mix(in srgb, #b18cff 16%, transparent); color: #b18cff; }
.gcard { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.g-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: #4285f4; flex: none; }
.gcard.ok .g-ic { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.day-strip { display: grid; grid-template-columns: repeat(14, minmax(44px, 1fr)); gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.day-strip div { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.day-strip span { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--faint); }
.day-strip b { font-size: 17px; }
.day-strip i { font-style: normal; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; }
.day-strip .has { border-color: var(--accent); } .day-strip .has i { background: var(--accent); color: var(--accent-ink); }
.day-strip .we b { color: var(--muted); }
.sess-day h4 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.sess-day:first-child h4 { margin-top: 0; }
.sess { display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 8px; }
.card .sess:last-child { margin-bottom: 0; }
.sess.live { border-color: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 12%, transparent); }
.sess.past { opacity: .55; }
.sess-time { display: grid; text-align: center; line-height: 1.15; min-width: 52px; }
.sess-time b { font-size: 17px; font-family: var(--mono); } .sess-time span { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.sess b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sess-actions { display: flex; gap: 6px; align-items: center; }
.prov { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.prov.google { color: #4285f4; }
.online-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.prov-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prov-switch button { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: var(--text); }
.prov-switch b { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.prov-switch span { font-size: 11px; color: var(--muted); }
.prov-switch button.on { border-color: var(--accent); background: var(--accent-soft); }
.prov-switch button:disabled { opacity: .45; cursor: not-allowed; }
.next-sess { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; border-color: color-mix(in srgb, var(--weight) 40%, transparent); }
.next-sess.live { border-color: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 12%, transparent); }
.ns-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--weight) 16%, transparent); color: var(--weight); flex: none; }
.ns-more { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.ns-more span { padding: 3px 8px; border-radius: 8px; background: var(--surface-2); }
@media (max-width: 640px) {
  .prov-switch { grid-template-columns: 1fr; }
  .sess { grid-template-columns: auto 1fr auto; } .sess > .avatar { display: none; }
  .sess-actions .btn { padding: 0 10px; }
}

/* ---------- v10: carregamento ---------- */
.ui-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; opacity: 0; overflow: hidden; transition: opacity .2s; }
.ui-progress::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--muscle)); box-shadow: 0 0 12px var(--accent); animation: progSlide 1.1s cubic-bezier(.4,0,.2,1) infinite; }
:root[data-theme="light"] .ui-progress::before { background: linear-gradient(90deg, transparent, var(--muscle), #2f80d1); box-shadow: 0 0 10px var(--muscle); }
.ui-progress.on { opacity: 1; }
.ui-progress.done::before { animation: progDone .35s ease-out forwards; }
@keyframes progSlide { 0% { left: -40%; width: 40%; } 60% { width: 55%; } 100% { left: 100%; width: 30%; } }
@keyframes progDone { to { left: 0; width: 100%; opacity: 0; } }
.ui-loading { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 999; display: flex; gap: 10px; align-items: center; padding: 10px 18px 10px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s cubic-bezier(.2,.9,.3,1); }
.ui-loading.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .ui-loading { bottom: calc(100px + env(safe-area-inset-bottom)); } }
.ui-dots { display: inline-flex; gap: 4px; }
.ui-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: dotPulse 1s ease-in-out infinite; }
:root[data-theme="light"] .ui-dots i { background: var(--muscle); }
.ui-dots i:nth-child(2) { animation-delay: .15s; } .ui-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse { 0%, 80%, 100% { transform: scale(.55); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; }
.boot .logo { font-size: 26px; }
.sk-wrap { display: grid; gap: 14px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .sk-grid { grid-template-columns: repeat(2, 1fr); } }
.sk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--line-2) 70%, var(--surface-2)) 40%, var(--surface-2) 80%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .ui-progress::before { animation: none; left: 0; width: 100%; opacity: .6; } }
/* logótipos de pagamento sem fundo, com versão própria para cada tema */
.pay-img { background: none !important; padding: 0 !important; border-radius: 0 !important; height: 20px; }
.pay-img.visa { height: 13px; }
.paylogo .pay-img { margin: 0; }
.logo-dark { display: none !important; }
:root:not([data-theme="light"]) .logo-light { display: none !important; }
:root:not([data-theme="light"]) .logo-dark { display: block !important; }

/* ---------- v11: mensalidades e valores sensíveis ---------- */
.money .mh { display: none; letter-spacing: .08em; }
.money-hidden .money .mv { display: none; }
.money-hidden .money .mh { display: inline; }
.money-toggle { width: 34px; height: 34px; border-radius: 10px; }
.money-toggle .mt-hide { display: none; }
.money-hidden .money-toggle .mt-show { display: none; }
.money-hidden .money-toggle .mt-hide { display: inline-flex; }
.revenue-card { background: linear-gradient(135deg, color-mix(in srgb, var(--good) 9%, var(--surface)), var(--surface) 60%); }
.rc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.rc-grid > div { display: grid; gap: 4px; }
.rc-grid span.muted { font-size: 12px; font-weight: 600; }
.rc-grid b { font-size: 26px; letter-spacing: -.03em; }
.rc-grid b small { font-size: 14px; }
@media (max-width: 640px) { .rc-grid { grid-template-columns: 1fr 1fr; } .rc-grid b { font-size: 20px; } }
.fee-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--good); }
.fee-chip .money-toggle { width: 28px; height: 28px; border-radius: 8px; }
.fee-mini { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--good); white-space: nowrap; font-family: var(--mono); }
.clients-rev { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--line); white-space: nowrap; }
.clients-rev span { font-size: 12px; } .clients-rev b { font-size: 15px; }
@media (max-width: 640px) { .usage-bar { flex-wrap: wrap; } .clients-rev { border-left: 0; padding-left: 0; width: 100%; } }

/* sessões: "começa daqui a…" e "a decorrer" */
.ph-label { font-weight: 700; } .ph-label:empty { display: none; }
.sess .ph-label { color: #ffb547; } .sess.live .ph-label { color: var(--good); }
.sess.soon { border-color: color-mix(in srgb, #ffb547 55%, transparent); }
.ns-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.next-sess.soon { border-color: color-mix(in srgb, #ffb547 60%, transparent); } .next-sess.soon .ns-label { color: #ffb547; }
.next-sess.live .ns-label { color: var(--good); }
/* barras de ferramentas: o tema fica sempre à parte, no início do grupo */
.tb-group { display: flex; gap: 6px; align-items: center; }
.tb-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; flex: none; }
.topbar nav { gap: 8px; }
.side-collapsed .me-actions .tb-sep { width: 22px; height: 1px; margin: 2px 0; }

/* ---------- v12: textos curtos nunca partem linha ---------- */
.delta, .dot-status, .plan-pill, .kind-pill, .mode-pill, .badge, .code-pill, .chip, .tag, .plan-range, .targets span, .fee-chip, .eyebrow, .navlink, .ctabs a, .seg button, .seg a, .tabbar a span {
  white-space: nowrap; }
.delta, .dot-status { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dot-status { display: inline-flex; min-width: 0; } .dot-status::before { flex: none; }
.person > span:nth-child(2), .person > span[style*="min-width"] { overflow: hidden; }
.kpi .delta { display: inline-block; vertical-align: middle; }
/* listas de opções dentro de títulos de cartões: no telemóvel passam para a linha de baixo, a toda a largura */
.card h3 { flex-wrap: wrap; }
@media (max-width: 640px) { .card h3 > .ui-btn.compact { flex: 1 1 100%; min-width: 0; } }

/* ---------- v13: cartões interativos da página inicial (sombra, contorno e luz que segue o rato) ---------- */
.feature, .om-row, .plan { position: relative; isolation: isolate; transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s, background-color .28s; }
.feature::before, .om-row::before, .plan::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 13%, transparent), transparent 55%); }
:root[data-theme="light"] .feature::before, :root[data-theme="light"] .om-row::before, :root[data-theme="light"] .plan::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--muscle) 12%, transparent), transparent 55%); }
.feature .ic { transition: transform .28s cubic-bezier(.2,.8,.2,1), background-color .28s, box-shadow .28s; }
@media (hover: hover) {
  .feature:hover, .plan:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 22px 50px -18px rgba(0,0,0,.65), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 12px 40px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
  .om-row:hover { transform: translateX(-4px) translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: 0 18px 40px -16px rgba(0,0,0,.6), 0 10px 30px -18px color-mix(in srgb, var(--accent) 50%, transparent); }
  :root[data-theme="light"] .feature:hover, :root[data-theme="light"] .plan:hover, :root[data-theme="light"] .om-row:hover {
    border-color: color-mix(in srgb, var(--muscle) 45%, var(--line)); box-shadow: 0 22px 44px -20px rgba(20,40,10,.35), 0 0 0 1px color-mix(in srgb, var(--muscle) 15%, transparent); }
  .feature:hover::before, .om-row:hover::before, .plan:hover::before { opacity: 1; }
  .feature:hover .ic { transform: scale(1.1) rotate(-4deg); background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 24px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
  .om-row:hover .om-day { background: var(--accent-soft); }
}
.online-card { transition: box-shadow .35s, border-color .35s; }
@media (hover: hover) { .online-card:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--accent) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .feature:hover, .plan:hover, .om-row:hover { transform: none; } }
@media (hover: hover) {
  .plan:hover .btn:not(.primary) { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
  .plan.recommended:hover, .plan.featured:hover { transform: translateY(-8px); }
  .plan:hover .price { color: var(--text); }
}
.plan .btn { transition: background-color .25s, color .25s, border-color .25s, transform .15s; }

/* ---------- v14: códigos de acesso com 4 grupos (PULSE-XXXX-XXXX-XXXX-XXXX) ---------- */
#code { font-size: clamp(14px, 4.1vw, 18px); letter-spacing: .03em; }
.success-code { font-size: clamp(15px, 4.4vw, 24px); letter-spacing: .03em; padding: 16px 12px; overflow-wrap: anywhere; }
.access-code { font-size: clamp(14px, 4vw, 19px); letter-spacing: .03em; max-width: 100%; overflow-wrap: anywhere; }
.code-pill { overflow-wrap: anywhere; }
@media (max-width: 640px) { .access-card .access-ic { display: none; } .access-code { white-space: nowrap; overflow-wrap: normal; } }

/* ---------- v15: aviso 10 minutos antes da sessão ---------- */
.notif-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.sess-alert { position: fixed; bottom: 24px; right: 24px; z-index: 450; width: min(420px, calc(100vw - 24px)); display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  padding: 14px 14px 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid color-mix(in srgb, #ffb547 60%, var(--line));
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.6), 0 0 0 4px color-mix(in srgb, #ffb547 14%, transparent); animation: saIn .4s cubic-bezier(.2,.9,.3,1); }
@keyframes saIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
.sa-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, #ffb547 18%, transparent); color: #ffb547; position: relative; }
.sa-ic::after { content: ""; position: absolute; inset: -4px; border-radius: 18px; border: 2px solid #ffb547; opacity: 0; animation: ping 1.8s infinite; }
.sa-body { display: grid; min-width: 0; } .sa-body b { font-size: 15px; } .sa-body span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 900px) { .sess-alert { bottom: auto; top: 10px; right: 12px; } }

/* ---------- v16: treino do aluno ---------- */
/* títulos das séries centrados por cima de cada campo (mesmas colunas que as linhas) */
.set-head > span { text-align: center; white-space: nowrap; }
.set-head > span:first-child { text-align: center; }
.set > .set-n { justify-self: center; }
.set .input { min-width: 0; width: 100%; padding: 0 6px; }
.set-check { justify-self: center; }
@media (max-width: 420px) { .set { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 6px; } .set-check { width: 44px; height: 44px; } .set-head { font-size: 10px; letter-spacing: .03em; } }
/* descanso em atraso: tempo negativo a vermelho */
.rest-pill.over { background: var(--bad); color: #fff; animation: restPulse 1.2s ease-in-out infinite; }
.rest-pill.over .chip { color: #fff; border-color: rgba(255,255,255,.45); }
.rest-pill.over b { color: #fff; }
@keyframes restPulse { 0%, 100% { box-shadow: var(--shadow), 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); } 50% { box-shadow: var(--shadow), 0 0 0 10px color-mix(in srgb, var(--bad) 0%, transparent); } }
/* sem "puxar para atualizar" durante o treino (telemóvel) */
html.no-pull, html.no-pull body { overscroll-behavior-y: none; }
.rest-pill { max-width: calc(100vw - 20px); white-space: nowrap; }
.rest-pill span { white-space: nowrap; }
@media (max-width: 420px) { .rest-pill { gap: 6px; padding: 6px 6px 6px 12px; } .rest-pill span { font-size: 13px; } .rest-pill b { font-size: 19px; min-width: 50px; } .rest-pill .chip { padding: 0 9px; } }

/* v16 — mobile: rótulos numa só linha */
.logo, .admin-tag { white-space: nowrap; }
.kpi h3 { flex-wrap: nowrap; }
.kpi h3 > .kpi-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi h3 > svg { flex: none; }
.kpi .val { white-space: nowrap; }
/* cabeçalhos "ícone + título + subtítulo": título junto ao ícone, subtítulo à direita (ou por baixo em mobile) */
.card h3:has(> svg:first-child) { justify-content: flex-start; }
.card h3:has(> svg:first-child) > span.muted:last-child { margin-left: auto; white-space: nowrap; }
@media (max-width: 640px) {
  .kpi h3 { font-size: 13px; }
  .card h3:has(> svg:first-child) > span.muted:last-child { flex-basis: 100%; margin-left: 26px; font-size: 12px; }
  .calc-res #calcP { display: block; margin-top: 4px; }
  .paylogos-t { flex-basis: 100%; }
}
/* linhas de sessões online (landing) */
.om-row div > b, .om-row div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-row .btn { white-space: nowrap; }
@media (max-width: 420px) { .om-row { gap: 10px; padding: 10px; } .om-row .btn.sm { padding: 0 10px; } }
/* ranking: objetivo numa linha, deltas empilhados */
.person > span[style*="min-width"] > .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .person { gap: 10px; padding: 8px 6px; }
  .person > span[style*="flex-wrap"] { flex-direction: column; align-items: flex-end; gap: 4px !important; }
}
/* resgates de códigos */
.diff-row.redeem { gap: 12px; }
.redeem .r-who, .redeem .r-what { display: grid; min-width: 0; }
.redeem .r-what { text-align: right; flex: none; max-width: 50%; }
.redeem span > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.redeem .muted { font-size: 12px; }
@media (max-width: 640px) { .kpi h3 > svg { display: none; } .kpi .delta { max-width: 100%; } }
/* agenda: sessões em mobile — ações numa segunda linha */
.prov { white-space: nowrap; }
@media (max-width: 480px) {
  .sess { grid-template-columns: auto 1fr; gap: 10px 12px; }
  .sess-actions { grid-column: 1 / -1; }
  .sess-actions .btn { flex: 1; justify-content: center; }
}

/* v17 — login em mobile e sem scroll desnecessário */
.error:empty { display: none; }
textarea.input { overflow-y: hidden; resize: none; }
.modal { max-height: 92dvh; }
@media (max-width: 640px) {
  .center-page { padding: 16px 16px 24px; }
  .center-page .panel { padding: 24px 20px; }
  #code { font-size: clamp(12px, 3.9vw, 16px); letter-spacing: 0; padding: 0 12px; text-align: center; }
}
@media (max-width: 640px) { .topbar nav:not(:has(a[href="#/entrar"])) .tb-sep { display: none; } }


/* v19 — mapa muscular (frente/costas) */
/* modo escuro: corpo claro o suficiente para se ver bem no fundo escuro */
:root { --bm-off: #5d6872; --bm-neutral: #444e58; --bm-1: #ffd43b; --bm-2: #ff9f43; --bm-3: #ff4d4d; }
:root[data-theme="light"] { --bm-off: #d6dacf; --bm-neutral: #e7eae2; --bm-1: #f2c418; --bm-2: #f5892a; --bm-3: #e8403c; }
.bodymap { display: grid; gap: 10px; justify-items: center; }
.bm-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; max-width: 340px; }
.bodymap.compact .bm-figs { max-width: 260px; }
.bm-fig { margin: 0; display: grid; justify-items: center; gap: 4px; }
.bm-fig svg { width: 100%; height: auto; display: block; }
.bm-fig figcaption { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.bm-neutral { fill: var(--bm-neutral); }
.bm-z { stroke: var(--bm-gap, var(--surface-2)); stroke-width: .9; stroke-linejoin: round; transition: fill .3s; }
.bm-l0 { fill: var(--bm-off); } .bm-l1 { fill: var(--bm-1); } .bm-l2 { fill: var(--bm-2); } .bm-l3 { fill: var(--bm-3); }
.bm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.bm-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bm-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bm-legend i.bm-l0 { background: var(--bm-off); } .bm-legend i.bm-l1 { background: var(--bm-1); } .bm-legend i.bm-l2 { background: var(--bm-2); } .bm-legend i.bm-l3 { background: var(--bm-3); }
.bm-top { margin: 0; font-size: 13px; color: var(--muted); text-align: center; } .bm-top b { color: var(--text); font-weight: 600; }
.wk-body .bodymap { margin: 4px 0 14px; padding: 14px 10px 12px; border-radius: 16px; background: var(--surface-2); }

/* v20 — série com Começar / Terminar (tempo de cada série) */
.set { grid-template-columns: 44px 1fr 1fr 60px; }
.set-act { width: 60px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; align-content: center; gap: 1px; cursor: pointer; padding: 0; justify-self: center; transition: background .15s, transform .15s; }
.set-act small { font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.set-act:active { transform: scale(.96); }
.set-act.run { background: var(--accent); border-color: transparent; color: var(--accent-ink); animation: setPulse 1.4s ease-in-out infinite; }
.set-act.run small { font-family: var(--mono); font-size: 13px; }
.set-act .sq { width: 10px; height: 10px; border-radius: 2px; background: currentColor; display: block; }
.set-act.done { background: var(--good); border-color: transparent; color: #fff; }
.set-act.done small { font-family: var(--mono); }
.set.running .input { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
:root[data-theme="light"] .set.running .input { border-color: var(--text); }
@keyframes setPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); } }
.targets .ex-time { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
@media (max-width: 420px) { .set { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 58px; } .set-act { width: 58px; } }
@media (prefers-reduced-motion: reduce) { .set-act.run { animation: none; } }
.wk-time { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
:root:not([data-theme="light"]) .set-act.done { color: #0b0d10; }

/* v21 — editor de planos: dias a expandir/colapsar e exercícios compactos em mobile */
.days-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.days-bar-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.days-bar-btns .btn svg { flex: none; }
.day { transition: border-color .2s; }
.day-head .day-name { flex: 1; min-width: 0; }
.day-toggle { flex: none; width: 34px; height: 34px; border-radius: 10px; }
.day-toggle svg { transition: transform .2s; }
.day.collapsed .day-toggle svg { transform: rotate(-90deg); }
.day.collapsed .day-body { display: none; }
.day:not(.collapsed) .day-sum { display: none; }
.day-sum { all: unset; cursor: pointer; display: block; font-size: 13px; padding: 2px 2px 2px 46px; color: var(--text); line-height: 1.4; }
.day-sum:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.day.collapsed { padding-bottom: 12px; }
.day.collapsed:hover { border-color: var(--line-2); }
.day-body { display: grid; gap: 10px; }
.day-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-meta, .item-open { display: none; }

@media (max-width: 860px) {
  /* linha compacta: miniatura · nome + resumo (4 × 8-10 · 45 kg · ⏱ 1:30) · seta */
  .item { grid-template-columns: 44px minmax(0, 1fr) 36px; grid-template-areas: "t n o"; row-gap: 10px; padding: 8px 8px 8px 8px; }
  .item-thumb .ex-thumb { width: 44px; height: 44px; }
  .item-name b { cursor: pointer; }
  .item-meta { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .item-name small { display: none; }
  .item-open { display: grid; grid-area: o; width: 36px; height: 36px; }
  .item-open svg { transition: transform .2s; }
  .item.open .item-open svg { transform: rotate(180deg); }
  .item:not(.open) > label, .item:not(.open) .item-tools, .item:not(.open) .item-notes { display: none; }
  /* aberto: campos em 4 colunas por baixo */
  .item.open { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "t n n o" "a b c d" "x x x x"; border-color: var(--line-2); }
  .item.open .item-meta { display: none; }
  .item.open .item-name small { display: block; }
  .item.open .item-thumb .ex-thumb { width: 100%; height: auto; }
  .item.open .item-open { justify-self: end; }
  .day { padding: 12px; }
  .day-sum { padding-left: 2px; }
}
@media (max-width: 860px) { .item-meta { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 600; } }
.day-foot .day-tools { margin-left: auto; }

/* v22 — histórico: nome do exercício numa linha própria e séries em "chips" que nunca se partem */
.wk-ex { display: grid; gap: 6px; justify-content: stretch; }
.wk-ex-name { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.wk-ex-name b { font-weight: 600; overflow-wrap: anywhere; }
.wk-ex-name .wk-time { flex: none; margin: 0; }
.wk-sets { display: flex; flex-wrap: wrap; gap: 5px; }
.set-chip { white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; }
.set-chip b { color: var(--text); font-weight: 700; }
.wk-body .bodymap + .wk-ex, .wk-ex + .wk-ex { border-top: 0; }
.wk-ex { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 14px; row-gap: 6px; }
.wk-ex-name { flex: 1 1 200px; }
.wk-sets { justify-content: flex-end; }
@media (max-width: 640px) { .wk-ex-name { flex-basis: 100%; } .wk-sets { justify-content: flex-start; } }

/* v23 — funcionalidades não incluídas no plano */
.plan li.no { opacity: .55; text-decoration: line-through; text-decoration-thickness: 1px; }
.plan li.no::before { content: "✕"; color: var(--faint); }
.feature h3 .feat-pill { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); white-space: nowrap; }
:root[data-theme="light"] .feature h3 .feat-pill { color: var(--muscle); }
.app-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.app-note svg { flex: none; margin-top: 2px; } .app-note b { color: var(--text); }

/* Gestão: código do treinador + botão para entrar na conta */
.code-cell { display: inline-flex; align-items: center; gap: 6px; }
.code-cell .login-as { flex: none; height: 32px; padding: 0 12px; gap: 6px; }
.code-cell .login-as:hover { border-color: var(--accent); color: var(--accent); }

/* v25 — Gestão › Treinadores em mobile: cartão compacto, nada cortado, Entrar e Gerir sempre à mão */
.tr-table .act .login-as { display: none; }           /* desktop: o "Entrar" está junto ao código */
.tr-table .act { white-space: nowrap; }
@media (max-width: 1100px) {
  /* mesma base que as outras tabelas em mobile, mas até 1100px (tablet) só para os treinadores */
  .tr-table thead { display: none; }
  .tr-table, .tr-table tbody, .tr-table tr, .tr-table td { display: block; width: 100%; }
  .tr-table td { border: 0; padding: 0; }
  .tr-table td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; margin-bottom: 2px; }
  .tr-table .num { text-align: left; }
  .tr-table tr { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; grid-template-areas:
      "who who who plan" "code code code code" "cli mon paid acc" "act act act act"; gap: 10px 10px; padding: 14px; }
  .tr-table td.t-who { grid-area: who; min-width: 0; } .tr-table .t-plan { grid-area: plan; justify-self: end; align-self: start; }
  .tr-table .t-code { grid-area: code; min-width: 0; } .tr-table .t-cli { grid-area: cli; } .tr-table .t-mon { grid-area: mon; }
  .tr-table .t-paid { grid-area: paid; } .tr-table .t-acc { grid-area: acc; } .tr-table .t-ev { display: none; }
  .tr-table .t-plan::before, .tr-table .t-code::before { display: none !important; }
  .tr-table .tcell { min-width: 0; } .tr-table .tcell > div { min-width: 0; overflow: hidden; }
  .tr-table .tcell b, .tr-table .tcell .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* código em largura total, letra um pouco menor; o "Entrar" passa para a fila dos botões */
  .tr-table .code-cell { display: flex; width: 100%; }
  .tr-table .code-cell .code-pill { flex: 1; min-width: 0; justify-content: center; font-size: 12px; letter-spacing: 0; padding: 7px 8px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tr-table .code-cell .login-as { display: none; }
  .tr-table td.t-cli, .tr-table td.t-mon, .tr-table td.t-paid, .tr-table td.t-acc { font-size: 13px; min-width: 0; }
  .tr-table .use { min-width: 0; } .tr-table .t-acc .dot-status { font-size: 12px; }
  /* fila dos botões: Entrar e Gerir lado a lado, 42px de altura */
  .tr-table td.act { grid-area: act; display: flex !important; gap: 8px; padding-top: 2px; width: auto; min-width: 0; text-align: left; }
  .tr-table .act .login-as, .tr-table .act .t-manage { display: inline-flex; flex: 1; justify-content: center; align-items: center; height: 42px; }
  .tr-table .act .login-as { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  /* tablet: dois cartões por linha */
  .tr-table tbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tr-table tbody tr { width: auto; min-width: 0; }
  .tr-table tbody tr:nth-child(odd) { border-right: 1px solid var(--line); }
}

/* ---------- plano: repetições diferentes em cada série (15/12/10) ---------- */
.set-mode { justify-self: start; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.set-mode:hover { color: var(--text); }
.item .set-reps { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 72px; }
.item .set-reps label { display: flex; align-items: center; gap: 4px; }
.item .set-reps span { font-size: 11px; font-weight: 700; color: var(--faint); }
.item .set-reps .input { width: 64px; height: 34px; padding: 0 6px; text-align: center; }
.item input[readonly] { color: var(--muted); background: var(--surface-2); cursor: default; }
@media (max-width: 860px) {
  .item .set-reps { padding-left: 0; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item .set-reps .input { width: 100%; min-width: 0; }
  .item:not(.open) .set-reps, .item:not(.open) .set-mode { display: none; }
}

/* ================= modelos, calendário, questionários e equipa ================= */
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--accent); }
.tpl-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); flex: none; }
.tpl-uses { font-size: 13px; }
.coach-filter { width: auto; min-width: 170px; height: 42px; }

/* "Mais" (telemóvel) */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.more-item { display: grid; justify-items: center; gap: 8px; padding: 16px 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; text-align: center; }
.more-item:hover { border-color: var(--line-2); }

/* calendário */
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-mnav { display: flex; align-items: center; gap: 8px; }
.cal-mnav h2 { margin: 0 6px; font-size: 22px; letter-spacing: -.03em; text-transform: capitalize; min-width: 170px; text-align: center; }
.cal-legend { margin-bottom: 14px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.cal-card { padding: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: center; padding: 2px 0 6px; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 96px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; overflow: hidden; }
.cal-day:hover { border-color: var(--line-2); }
.cal-day > b { font-size: 13px; font-weight: 700; }
.cal-day.out { opacity: .45; }
.cal-day.today > b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.cal-day.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-items { display: grid; gap: 2px; min-width: 0; }
.cal-item { display: block; font-size: 11px; font-weight: 600; line-height: 1.35; padding: 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item em { font-style: normal; color: var(--muted); font-weight: 700; }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 700; padding-left: 4px; }
.cal-dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.cal-dots i { width: 6px; height: 6px; border-radius: 999px; }
.cal-foot { font-size: 12px; margin: 10px 2px 0; }
.cal-side { position: sticky; top: 16px; }
.cal-side-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.cal-side-head h3 { margin: 0; color: var(--text); font-size: 16px; }
.cal-side-head .muted { font-size: 12px; }
.cal-list { display: grid; gap: 6px; }
.cal-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.cal-row:hover { border-color: var(--line-2); }
.cal-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cal-txt { display: grid; min-width: 0; } .cal-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; } .cal-txt small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } .cal-side { position: static; } }
@media (max-width: 700px) {
  .cal-mnav { width: 100%; }
  .cal-mnav h2 { font-size: 18px; min-width: 0; flex: 1; white-space: nowrap; text-align: center; margin: 0; }
  .cal-card { padding: 8px; }
  .cal-grid { gap: 3px; }
  .cal-day { min-height: 52px; padding: 5px 2px; align-items: center; border-radius: 10px; }
  .cal-items { display: none; }
  .cal-dots { display: flex; }
  .cal-legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .coach-filter { width: 100%; }
}

/* questionários */
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.q-card { display: grid; gap: 12px; }
.q-card-top { display: flex; gap: 10px; align-items: center; } .q-card-top b { display: block; color: var(--text); font-size: 15px; } .q-card-top small { font-size: 12px; }
.q-types { display: flex; flex-wrap: wrap; gap: 4px; } .q-types span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.q-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); } .q-stats b { color: var(--text); }
.q-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qb-list { display: grid; gap: 10px; }
.qb-q { display: grid; gap: 8px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.qb-q-head { display: flex; gap: 8px; align-items: center; }
.qb-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 800; flex: none; }
.qb-type { width: auto; height: 38px; flex: 1; max-width: 220px; }
.qb-tools { display: flex; gap: 4px; margin-left: auto; } .qb-tools .icon-btn { width: 32px; height: 32px; }
.qb-opts { display: grid; gap: 6px; padding-left: 2px; }
.qb-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; } .qb-opt .input { height: 38px; } .qb-opt .icon-btn { width: 32px; height: 32px; }
.qb-mark { width: 16px; height: 16px; border: 2px solid var(--line-2); border-radius: 999px; } .qb-mark.multi { border-radius: 5px; }
.qb-scale .field label { font-size: 12px; }
.qb-req { font-size: 13px; }
.qb-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .qb-add .muted { font-size: 13px; margin-right: 4px; }
.form-fill { display: grid; gap: 18px; }
.ff-q { display: grid; gap: 8px; }
.ff-label { display: flex; gap: 8px; align-items: baseline; } .ff-label b { color: var(--text); font-size: 15px; line-height: 1.4; }
.ff-n { font-size: 12px; font-weight: 800; color: var(--faint); min-width: 16px; }
.ff-req { color: var(--bad); font-weight: 800; }
.ff-opts { display: grid; gap: 6px; }
.ff-opt { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.ff-mark { width: 20px; height: 20px; flex: none; border: 2px solid var(--line-2); border-radius: 999px; display: grid; place-items: center; }
.ff-opt.multi .ff-mark { border-radius: 6px; }
.ff-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.ff-opt.on .ff-mark { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface-2); }
.ff-scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
.ff-scale button { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.ff-scale button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ff-scale-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.form-card { padding: 0; } .form-card > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.form-card > summary::-webkit-details-marker { display: none; }
.form-card[open] > summary svg:last-child { transform: rotate(180deg); }
.fc-txt { display: grid; min-width: 0; } .fc-txt b { color: var(--text); } .fc-txt small { font-size: 12px; }
.fc-body { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ans-list { display: grid; gap: 12px; margin-bottom: 12px; }
.ans-q { display: grid; gap: 4px; }
.ans-text { margin: 0; color: var(--text); white-space: pre-line; }
.ans-chips { display: flex; flex-wrap: wrap; gap: 6px; } .ans-chips span { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); color: var(--text); }
.ans-scale { display: flex; gap: 10px; align-items: center; } .ans-bar { flex: 1; max-width: 220px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; } .ans-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
@media (max-width: 600px) {
  .form-card > summary { grid-template-columns: auto minmax(0, 1fr) auto; } .form-card > summary .dot-status { grid-column: 2; grid-row: 2; }
  .qb-type { max-width: none; }
  .ff-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* equipa */
.team-list { display: grid; gap: 10px; }
.team-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.team-txt { display: grid; gap: 2px; min-width: 0; } .team-txt b { color: var(--text); } .team-txt small { font-size: 13px; overflow-wrap: anywhere; }
.team-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; margin-top: 4px; }
.team-code { font-size: 14px; margin-top: 8px; justify-self: start; }
.team-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) { .team-card { grid-template-columns: auto minmax(0, 1fr); } .team-actions { grid-column: 1 / -1; justify-content: flex-start; } }
.row.qb-scale { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 600px) { .row.qb-scale { grid-template-columns: 1fr; } }
.form-banner { border-color: color-mix(in srgb, #2dd4bf 50%, transparent); background: color-mix(in srgb, #2dd4bf 10%, var(--surface)); color: var(--text); text-decoration: none; }
.form-banner span:nth-child(2) { flex: 1; min-width: 0; }
.form-banner svg { color: #2dd4bf; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
a.cal-row { text-decoration: none; }

/* ---------- plano: arrastar exercícios para mudar a ordem ---------- */
.items > .item { position: relative; padding-left: 36px; }
.items > .item-head { padding-left: 36px; }
.drag-handle { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--faint); cursor: grab; touch-action: none; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--text); background: var(--surface-2); }
.drag-handle:active { cursor: grabbing; }
.item.dragging { position: fixed; z-index: 80; margin: 0; pointer-events: none; box-shadow: 0 18px 40px rgba(0,0,0,.35); border-color: var(--accent); transform: scale(1.015); opacity: .96; }
.item-ph { border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
body.is-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.is-dragging * { cursor: grabbing !important; }

/* ---------- app instalável (PWA): cartões, definições, treinos por enviar ---------- */
.pwa-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 12px; }
.pwa-card b { color: var(--text); }
.pwa-card p { margin: 3px 0 0; font-size: 13px; }
.pwa-how { color: var(--text); margin-top: 8px !important; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pwa-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.pwa-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .pwa-card { grid-template-columns: auto minmax(0, 1fr); } .pwa-act { grid-column: 1 / -1; justify-content: flex-start; } }
.avatar-btn { padding: 0; border: 0; background: none; border-radius: 999px; cursor: pointer; display: grid; }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.set-list { display: grid; gap: 10px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.set-row b { display: flex; gap: 8px; align-items: center; color: var(--text); }
.set-row small { display: block; font-size: 12px; margin-top: 2px; }
.set-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.set-note { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.pend-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pend-row b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* app instalada no iPhone: a barra de estado fica por cima da página */
@supports (padding: env(safe-area-inset-top)) { @media (display-mode: standalone) { .p-top, .mobile-top { padding-top: max(10px, env(safe-area-inset-top)); } } }
.install-help { display: grid; gap: 12px; text-align: left; }
.install-help h1 { margin: 4px 0 0; }
.install-help p { margin: 0; }
.pwa-ic.big { width: 56px; height: 56px; border-radius: 18px; }
.install-steps { margin: 4px 0 6px; padding-left: 20px; display: grid; gap: 8px; color: var(--text); font-size: 15px; }
.good-note { margin: 0; text-align: center; color: var(--good); font-weight: 600; }
.app-note.bad { color: var(--text); } .app-note.bad svg { color: var(--bad); }
.web-row { align-items: center; gap: 14px; } .web-row small { font-size: 12px; line-height: 1.4; }
.web-row > span:first-child, .web-row > span:first-child b { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.rem-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .rem-row .select { width: auto; min-width: 160px; } .check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; cursor: pointer; }
.share-opts { display: grid; gap: 8px; }
.share-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.share-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.share-opt b { display: block; color: var(--text); font-size: 14px; } .share-opt small { display: block; font-size: 12px; margin-top: 2px; }
.share-opt.off { opacity: .55; }
.share-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.input-unit .input { width: 100%; display: block; }

/* campo de hora próprio (hh:mm) */
.input.ui-time { font-family: var(--mono); font-size: 16px; letter-spacing: .04em; text-align: left; }
.input.ui-time.bad { border-color: var(--bad); }
.time-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.time-pair .sep { padding-bottom: 14px; color: var(--muted); }
.time-pair .field { min-width: 0; }
.dur-note { margin: 0; font-size: 12px; min-height: 16px; }

.role-seg { display: flex; flex-wrap: wrap; } .role-seg button { flex: 1 1 auto; justify-content: center; }

.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.sec-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.sec-item > span:first-child { display: flex; gap: 8px; align-items: center; color: var(--text); }

/* ---------- nutrição ---------- */
.nutri-editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.lbl2 { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 4px; }
.nutri-targets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.nutri-targets .field { margin: 0; min-width: 0; }
.nutri-sum { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.nutri-sum b { color: var(--text); } .nutri-sum .meter { flex: 1 1 100%; height: 6px; }
.meals { display: grid; gap: 10px; }
.meal { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--bg-2); display: grid; gap: 8px; }
.meal-head { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto auto; gap: 8px; align-items: center; }
.meal-name { font-weight: 700; }
.meal-kcal { font-size: 12px; white-space: nowrap; }
.meal-tools { display: flex; gap: 4px; } .meal-tools .icon-btn { width: 32px; height: 32px; }
.food-head, .food { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 80px 32px; gap: 6px; align-items: center; }
.food-head span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); padding-left: 4px; }
.food .input { height: 38px; padding: 0 10px; font-size: 14px; }
.food .icon-btn { width: 32px; height: 32px; }
.foods { display: grid; gap: 6px; }
.meal-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.meal-notes { flex: 1; min-width: 180px; height: 34px !important; font-size: 13px !important; }
.nutri-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.nutri-client { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.nc-txt { display: grid; min-width: 0; } .nc-txt b { color: var(--text); } .nc-txt small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-form { display: grid; gap: 8px; margin-top: 10px; }
.note-list { display: grid; gap: 8px; margin-top: 14px; }
.note-row { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.note-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; } .note-meta b { color: var(--text); }
.note-row p { margin: 6px 0 0; white-space: pre-line; font-size: 14px; color: var(--text); }
.nutri-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.nutri-goals .card { display: grid; gap: 4px; padding: 12px 14px; } .nutri-goals span { font-size: 12px; color: var(--muted); font-weight: 600; }
.nutri-goals b { font-size: 22px; color: var(--text); } .nutri-goals small { font-size: 12px; color: var(--muted); }
.meals-view { display: grid; gap: 10px; }
.mv-head { display: flex; gap: 10px; align-items: baseline; } .mv-head b { color: var(--text); font-size: 16px; }
.meal-view ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.meal-view li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); }
.mv-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
@media (max-width: 760px) {
  .nutri-targets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meal-head { grid-template-columns: minmax(0, 1fr) 84px; } .meal-kcal { grid-column: 1; } .meal-tools { grid-column: 2; justify-self: end; }
  .food-head { display: none; }
  .food { grid-template-columns: minmax(0, 1fr) 90px 32px; } .food [data-ff="food"] { grid-column: 1 / -1; }
}

.time-block { display: grid; gap: 6px; }
.kind-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kind-opt { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.25; }
.kind-opt:hover { border-color: var(--line-2); color: var(--text); }
.kind-opt.on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); box-shadow: 0 0 0 1px var(--accent) inset; }
.kind-opt.on svg { color: var(--accent); }
:root[data-theme="light"] .kind-opt.on svg { color: var(--muscle); }
@media (max-width: 600px) { .kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kind-opt { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 12px; } }
.modal .stack { display: grid; gap: 14px; }
.update-bar { position: fixed; left: 0; right: 0; margin: 0 auto; top: calc(12px + env(safe-area-inset-top)); z-index: 300; width: min(520px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: #15191e; border: 1px solid rgba(198, 255, 61, .45); box-shadow: var(--shadow); animation: up .3s; color: #fff; }
/* fundo escuro e texto branco nos dois temas */
.update-txt { display: grid; gap: 2px; flex: 1; min-width: 0; font-size: 13px; color: rgba(255, 255, 255, .85); }
.update-txt b { color: #fff; font-size: 14px; }
.update-bar .btn { flex: none; white-space: nowrap; }
.update-bar .btn.primary { background: #c6ff3d; color: #0b0d10; }
.update-x { flex: none; width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
@media (max-width: 420px) { .update-bar { flex-wrap: wrap; } .update-txt { flex-basis: calc(100% - 44px); } .update-bar .btn { flex: 1; } .update-x { order: 2; } }
.note-form { gap: 12px; margin-top: 14px; }
.nf-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.nf-side { display: grid; gap: 12px; align-content: start; }
.nf-text { grid-template-rows: auto 1fr; }
.nf-text textarea { height: auto; min-height: 112px; resize: vertical; }
.nf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nf-foot p { margin: 0; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.nf-foot .btn { flex: none; }
@media (max-width: 700px) {
  .nf-grid { grid-template-columns: minmax(0, 1fr); }
  .nf-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-foot { flex-direction: column-reverse; align-items: stretch; }
  .nf-foot .btn { width: 100%; }
}
@media (max-width: 440px) { .nf-side { grid-template-columns: minmax(0, 1fr); } }
.plan-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 6px; padding-bottom: 4px; scrollbar-width: none; }
.plan-tabs::-webkit-scrollbar { display: none; }
.plan-tab { flex: none; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; cursor: pointer; max-width: 220px; }
.plan-tab b { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-tab small { font-size: 12px; }
.plan-tab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); box-shadow: 0 0 0 1px var(--accent) inset; }
/* cardio no editor do plano: minutos, km e intensidade em vez de séries/reps/carga */
@media (min-width: 861px) {
  .item.cardio .cardio-level { grid-column: span 2; }
  .item.cardio > label { display: grid; gap: 2px; }
  .item.cardio .lbl { display: block; font-size: 10px; color: var(--faint); font-weight: 700; text-transform: uppercase; }
}
@media (max-width: 860px) {
  .item.cardio.open { grid-template-areas: "t n n o" "a b c c" "x x x x"; }
}
/* ordem dos planos: arrastar os separadores */
.plan-chips .chip { touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.chip-grip { display: inline-grid; place-items: center; margin-left: -4px; color: var(--faint); cursor: grab; touch-action: none; padding: 4px 0; }
.chip-dragging { position: fixed; z-index: 80; margin: 0; pointer-events: none; box-shadow: 0 12px 28px rgba(0,0,0,.35); border-color: var(--accent) !important; background: var(--surface-2); color: var(--text); }
.chip-ph { display: inline-block; border: 2px dashed var(--accent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
@media (hover: hover) { .plan-chips .chip { cursor: grab; } .plan-chips .chip:active { cursor: grabbing; } }
/* adicionar ao calendário */
.cal-row-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.cal-add { position: relative; width: 38px; height: 38px; flex: none; }
.cal-add i { position: absolute; right: 5px; bottom: 4px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--accent); line-height: 1; }
.cal-targets { display: grid; gap: 8px; }
.cal-target { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; }
.cal-target:hover { border-color: var(--accent); }
.cal-target span { display: grid; gap: 2px; } .cal-target small { font-size: 12px; }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: inline; } }
/* centro de notificações (sino) */
.notif-sect { margin-top: 14px; }
.notif-sect:first-of-type { margin-top: 4px; }
.notif-sect h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 0 0 6px; font-weight: 700; }
.notif-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--text); position: relative; }
.notif-row:hover { background: var(--surface-2); }
.notif-row.new::before { content: ''; position: absolute; left: -2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.notif-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.notif-row.soon .notif-ic { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent); }
.notif-txt { display: grid; gap: 2px; min-width: 0; }
.notif-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-txt small { font-size: 12px; }
.notif-empty { font-size: 13px; margin: 2px 0 0 10px; }
/* calendário: a lista do dia só fica ao lado quando há espaço para dias grandes (tablet: por baixo) */
.cal-wrap { container-type: inline-size; }
@container (max-width: 1040px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-side { position: static; }
}
/* número de notificações no sino: maior, vermelho inteiro (o contorno fica por fora e não come o vermelho) */
.bell i { top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box; border: 0; border-radius: 999px;
  font: 800 13px/24px var(--font); letter-spacing: -.01em; box-shadow: 0 0 0 2px var(--bg), 0 2px 6px rgba(0,0,0,.35); z-index: 1; pointer-events: none; }
/* frases motivacionais (treinador) */
.q-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.q-layout .q-recent { grid-column: 1 / -1; }
.q-layout h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 16px; }
.q-side { display: grid; gap: 14px; }
.q-cats { margin: 12px 0 10px; }
.q-box { position: relative; }
.q-box textarea { min-height: 120px; font-size: 17px; line-height: 1.45; padding: 14px 16px 26px; resize: vertical; }
.q-count { position: absolute; right: 12px; bottom: 8px; font-size: 11px; }
.q-tools { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.q-tools .btn { flex: none; }
.q-tools .muted { flex: 1; min-width: 200px; }
.q-to { display: flex; flex-wrap: wrap; }
.q-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 220px; overflow: auto; }
.q-person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.q-person.on { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.q-row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.q-bulk { display: flex; gap: 6px; margin: 10px 0 6px; }
.q-clients { display: grid; gap: 2px; max-height: 360px; overflow: auto; }
.q-client { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.q-client > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-client:hover { background: var(--surface-2); }
.q-item { padding: 12px 0; border-top: 1px solid var(--line); }
.q-item:first-of-type { border-top: 0; }
.q-item p { margin: 0 0 4px; font-size: 15px; color: var(--text); line-height: 1.45; }
.q-item small { font-size: 12px; }
.q-recent h3 { margin-bottom: 6px; }
@media (max-width: 900px) { .q-layout { grid-template-columns: minmax(0, 1fr); } }
/* frase motivacional (aluno) */
.quote-card { position: relative; overflow: hidden; margin-bottom: 12px; padding: 18px 18px 16px 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); }
.quote-card .q-mark { position: absolute; right: 14px; top: 8px; color: color-mix(in srgb, var(--accent) 40%, transparent); }
.quote-card .q-label { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.quote-card p { margin: 8px 0 8px; font-size: 18px; line-height: 1.4; color: var(--text); font-weight: 600; letter-spacing: -.01em; padding-right: 30px; }
.quote-card small { font-size: 12px; }
.notif-head-act { display: flex; align-items: center; gap: 6px; }
.notif-head-act .btn { height: 34px; }
/* fechar a frase do dia */
.quote-card .q-mark { right: 56px; }
.quote-card .q-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); z-index: 1; }
.quote-card.q-gone { opacity: 0; transform: scale(.98); transition: opacity .2s, transform .2s; }
.cal-sub-hint { font-size: 12px; margin: 12px 0 0; }
.cal-target[data-copy] { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.cal-target.main { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }
.cal-back { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--muted); line-height: 1.4; }
.cal-back b { flex: none; color: var(--accent); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* ---------- mensagens (chat) ---------- */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font: 800 11px/20px var(--font); font-style: normal; text-align: center; }
.tabbar [data-more] { position: relative; }
.tabbar [data-more] .nav-badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; }
.more-item { position: relative; }
.more-item .nav-badge { position: absolute; top: 6px; right: 8px; }
.chat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; height: calc(100dvh - 190px); min-height: 460px; }
.chat-side { display: flex; flex-direction: column; padding: 12px; min-height: 0; }
.chat-search { max-width: none; margin-bottom: 8px; }
.chat-list { overflow: auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.chat-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 10px 8px 4px; font-weight: 700; }
.chat-conv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-conv:hover { background: var(--surface-2); }
.chat-conv.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.chat-conv-txt { display: grid; gap: 1px; min-width: 0; }
.chat-conv-txt b, .chat-conv-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-txt b { font-size: 14px; } .chat-conv-txt small { font-size: 12px; }
.chat-conv-meta { display: grid; justify-items: end; gap: 4px; }
.chat-conv-meta small { font-size: 11px; }
.chat-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #0b0d10); font: 800 11px/20px var(--font); font-style: normal; text-align: center; }
.chat-pane { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 0; }
.chat-pane.student { height: calc(100dvh - 250px); min-height: 420px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-head-txt { display: grid; flex: 1; min-width: 0; } .chat-head-txt b { font-size: 15px; } .chat-head-txt small { font-size: 12px; }
.chat-back { display: none; }
.chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.chat-loading { margin: auto; font-size: 13px; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 30px 20px; font-size: 14px; }
.chat-empty svg { color: var(--faint); }
.chat-empty.big { height: 100%; align-content: center; }
.chat-day { text-align: center; margin: 10px 0 6px; }
.chat-day span { font-size: 11px; font-weight: 700; color: var(--faint); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; text-transform: capitalize; }
.chat-msg { display: flex; flex-direction: column; max-width: min(78%, 520px); }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; }
.chat-name { font-size: 11px; color: var(--muted); margin: 6px 10px 2px; }
.chat-bubble { position: relative; padding: 8px 12px 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-msg.me .chat-bubble { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-bottom-right-radius: 6px; }
.chat-msg.them .chat-bubble { border-bottom-left-radius: 6px; }
.chat-text a { color: var(--accent); }
.chat-time { display: block; text-align: right; font-size: 10px; color: var(--faint); margin-top: 2px; }
.chat-img { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; margin: -2px -6px 4px; }
.chat-img img { display: block; max-width: min(260px, 60vw); max-height: 320px; border-radius: 12px; object-fit: cover; }
.chat-full { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; border-radius: 12px; cursor: zoom-out; }
.chat-compose { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 8px; background: var(--surface); }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row textarea { flex: 1; min-height: 42px; max-height: 140px; height: 42px; resize: none; padding: 10px 14px; line-height: 1.35; font-size: 15px; }
.chat-img-btn { flex: none; cursor: pointer; }
.chat-send { flex: none; width: 46px; height: 42px; padding: 0; }
.chat-attach { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.chat-attach img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.chat-attach .icon-btn { width: 30px; height: 30px; margin-left: auto; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 230px); }
  .chat-layout .chat-pane { display: none; }
  .chat-layout.has-conv .chat-side { display: none; }
  .chat-layout.has-conv .chat-pane { display: flex; }
  .chat-back { display: grid; }
  .chat-msg { max-width: 86%; }
}
@media (max-width: 860px) {
  .chat-layout { height: calc(100dvh - 300px - env(safe-area-inset-bottom)); min-height: 360px; }
  .chat-pane.student { height: calc(100dvh - 290px - env(safe-area-inset-bottom)); min-height: 360px; }
}
.chat-compose textarea.input { height: 42px; min-height: 42px; padding: 10px 14px; overflow-y: auto; }
/* mensagens v2: altura calculada no aparelho; caixa de escrita em barra arredondada */
.chat-layout, .chat-pane.student { height: auto; }
@media (max-width: 860px) { .chat-layout, .chat-pane.student { height: auto; min-height: 0; } }
@media (max-width: 860px) { .page-head:has(+ .chat-layout.has-conv) { display: none; } }
.chat-pane.student .chat-head { padding: 10px 14px; }
.chat-compose { padding: 8px 10px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.chat-row { align-items: flex-end; gap: 4px; padding: 4px; border-radius: 26px; border: 1px solid var(--line); background: var(--surface-2); transition: border-color .15s; }
.chat-row:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.chat-compose textarea.input { flex: 1; border: 0; background: transparent; box-shadow: none; outline: none; height: 40px; min-height: 40px; max-height: 140px; padding: 10px 6px; font-size: 15px; line-height: 1.35; }
.chat-compose textarea.input:focus { box-shadow: none; }
.chat-img-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.chat-img-btn:hover { background: var(--surface); color: var(--text); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; padding: 0; display: grid; place-items: center; }
.chat-attach { padding: 0 6px 8px; }
.chat-msgs { padding: 12px 14px 8px; }
/* aviso de mensagem nova (treinador) */
.chat-toast { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; border: 0; max-width: min(420px, calc(100% - 32px)); font: inherit; }
.chat-toast span { display: grid; gap: 2px; min-width: 0; }
.chat-toast small { font-weight: 500; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-bar a { position: relative; }
.p-bar .nav-badge { position: absolute; top: 2px; left: 50%; margin-left: 4px; }
.p-tabs a .nav-badge { margin-left: 6px; position: static; }
.chat-side .chat-search { flex: none; min-width: 0; }
/* barra lateral: em ecrãs baixos desliza sozinha (o "Sair" e o cartão do plano ficam sempre ao alcance) */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side::-webkit-scrollbar { width: 6px; } .side::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
/* chamar a atenção (📳) e apagar mensagens */
@keyframes pulse-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-12px, 4px) rotate(-1deg); } 20% { transform: translate(10px, -6px) rotate(1deg); }
  30% { transform: translate(-10px, 6px) rotate(-.6deg); } 40% { transform: translate(12px, -3px) rotate(.8deg); }
  50% { transform: translate(-8px, 5px) rotate(-.5deg); } 60% { transform: translate(8px, -5px) rotate(.5deg); }
  70% { transform: translate(-6px, 3px); } 80% { transform: translate(5px, -2px); } 90% { transform: translate(-2px, 1px); }
}
html.pulse-shake body { animation: pulse-shake .85s cubic-bezier(.36, .07, .19, .97) both; }
@media (prefers-reduced-motion: reduce) { html.pulse-shake body { animation-duration: .4s; } }
.chat-nudge { font-size: 18px; line-height: 1; }
.chat-nudge[disabled] { opacity: .35; cursor: not-allowed; }
.chat-sys { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 8px 0; }
.chat-sys span { font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 4px 12px; border-radius: 999px; }
.chat-sys.gone span { color: var(--faint); background: var(--surface-2); font-weight: 600; }
.chat-bubble { padding-right: 12px; }
.chat-del { position: absolute; top: -10px; left: -10px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--bad); display: none; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.chat-sys .chat-del { position: static; display: none; }
@media (hover: hover) { .chat-msg.me:hover .chat-del, .chat-sys:hover .chat-del { display: grid; } }
.chat-msg.show-del .chat-del { display: grid; }
.chat-msg.gone .chat-bubble { background: transparent; border-style: dashed; }
.chat-gone { color: var(--faint); font-style: italic; font-size: 14px; display: flex; align-items: center; gap: 6px; }
/* ícone de "chamar a atenção" (traço, como o resto da app) */
.chat-sys span { display: inline-flex; align-items: center; gap: 6px; }
.chat-sys svg { flex: none; }
.chat-conv-txt small svg { vertical-align: -2px; color: var(--accent); }
.nudge-ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.chat-nudge { color: var(--muted); }
.chat-nudge:not([disabled]):hover { color: var(--accent); }
.chat-toast .nudge-ic { background: var(--accent); color: #0b0d10; }


/* Definições do aluno: emails que quer receber */
.set-group { display: grid; gap: 8px; margin-top: 6px; }
.set-group h4 { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; font-size: 14px; }
.set-group > .set-note { margin-bottom: 2px; }
.set-mail { cursor: pointer; }

/* telemóvel: o "Novo cliente" fica ao lado do título (compacto), para se poder criar clientes em qualquer ecrã */
@media (max-width: 900px) {
  .page-head:has(> .head-newclient) { flex-wrap: nowrap; align-items: center; }
  .page-head:has(> .head-newclient) > div { min-width: 0; }
  .head-newclient { flex: none; padding: 10px 14px; font-size: 14px; gap: 6px; }
}

/* ---- Análise por IA (beta) */
.ai-beta { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #3a2a00; background: #ffc94d; }
.ai-banner { display: flex; flex-direction: column; gap: 4px; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, #ffc94d 45%, transparent); background: color-mix(in srgb, #ffc94d 12%, transparent); font-size: 13px; }
.ai-banner b { display: inline-flex; align-items: center; gap: 6px; }
.ai-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-pick .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.ai-preview { position: relative; margin: 12px 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.ai-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.ai-preview .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; }
.ai-tips { margin: 14px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.ai-score { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.ai-ring-n { font-size: 38px; font-weight: 800; fill: var(--text); font-family: inherit; }
.ai-verdict { display: inline-block; font-weight: 800; font-size: 17px; }
.ai-verdict.good { color: var(--good); } .ai-verdict.bad { color: var(--bad); } .ai-verdict.flat { color: var(--text); }
.ai-thumb { width: 76px; height: 100px; object-fit: cover; border-radius: 12px; margin-left: auto; background: var(--surface-2); }
.ai-comp { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.ai-comp svg { flex: none; margin-top: 2px; }
.ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ai-cols h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; }
.ai-cols ul { margin: 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.ai-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ai-hist-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.ai-hist-item:hover { background: var(--surface-2); }
.ai-hist-item img { width: 44px; height: 58px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.ai-hist-item b { font-size: 18px; }
.ai-big { display: block; width: 100%; max-height: 380px; object-fit: contain; border-radius: 14px; background: var(--surface-2); margin-bottom: 6px; }
.ai-entry { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.ai-entry > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ai-entry small { font-size: 13px; }
.ai-entry-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
@media (max-width: 600px) { .ai-cols { grid-template-columns: 1fr; } .ai-score { gap: 12px; } .ai-score .ai-ring { width: 104px; height: 104px; } }
/* Gestão: quota da IA */
.aiq-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.aiq-top > div { display: flex; flex-direction: column; gap: 2px; }
.aiq-top span { font-size: 12px; } .aiq-top b { font-size: 20px; } .aiq-top small { font-size: 12px; font-weight: 500; }
.aiq-list { display: grid; gap: 6px; margin-top: 14px; }
.aiq-tr { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.aiq-tr summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.aiq-tr summary::-webkit-details-marker { display: none; }
.aiq-tr summary > span:first-child, .aiq-st > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aiq-tr small, .aiq-st small { font-size: 12px; }
.aiq-st { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 700px) { .aiq-top { grid-template-columns: 1fr 1fr; } }

/* v31 — barra de baixo (telemóvel e PWA) em "liquid glass": vidro translúcido com blur, aresta de luz fina
   e uma lente de vidro na opção ativa que desliza entre opções e se pode arrastar com o dedo (glass.js) */
:root {
  --bar-tint: rgba(24, 28, 34, .46); --bar-rim: rgba(255, 255, 255, .16); --bar-hi: rgba(255, 255, 255, .34);
  --bar-shade: 0 16px 40px -14px rgba(0, 0, 0, .7), 0 2px 8px -2px rgba(0, 0, 0, .3);
  --bar-ink: rgba(255, 255, 255, .72); --bar-on: var(--accent);
  --lens-fill: rgba(255, 255, 255, .13); --lens-rim: rgba(255, 255, 255, .26);
}
:root[data-theme="light"] {
  --bar-tint: rgba(255, 255, 255, .55); --bar-rim: rgba(255, 255, 255, .9); --bar-hi: rgba(255, 255, 255, 1);
  --bar-shade: 0 14px 34px -14px rgba(15, 23, 42, .38), 0 1px 4px rgba(15, 23, 42, .08);
  --bar-ink: rgba(17, 20, 15, .62); --bar-on: var(--text);
  --lens-fill: rgba(17, 20, 15, .07); --lens-rim: rgba(255, 255, 255, .95);
}
@media (prefers-reduced-transparency: reduce) { :root { --bar-tint: rgba(24, 28, 34, .95); } :root[data-theme="light"] { --bar-tint: rgba(255, 255, 255, .96); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { :root { --bar-tint: rgba(24, 28, 34, .95); } :root[data-theme="light"] { --bar-tint: rgba(255, 255, 255, .96); } }

@media (max-width: 900px) {
  .tabbar {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; gap: 2px; border: 0; border-radius: 32px; isolation: isolate;
    background: var(--bar-tint);
    -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%);
    box-shadow: var(--bar-shade), inset 0 .5px 0 var(--bar-hi);
    touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  }
  /* aresta de luz: mais clara nos cantos de cima à esquerda e de baixo à direita */
  .tabbar::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
    background: linear-gradient(140deg, var(--bar-hi), var(--bar-rim) 25%, transparent 48%, transparent 60%, var(--bar-rim) 82%, var(--bar-hi));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  .tabbar a {
    position: relative; z-index: 1; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 3px;
    padding: 7px 0 6px; border-radius: 26px; background: none !important; box-shadow: none !important;
    color: var(--bar-ink); transition: color .25s, transform .2s cubic-bezier(.3, 1.5, .5, 1);
  }
  .tabbar a::before { display: none !important; }
  .tabbar a svg { width: 23px; height: 23px; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
  .tabbar a span { font-size: 10.5px !important; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-shadow: none; }
  .tabbar a.on:not(.fab), .tabbar a.near { color: var(--bar-on); }
  .tabbar a.on span { font-weight: 750; }
  .tabbar > a:active { transform: scale(.92); }
  /* "Treino": círculo verde maior, a sair por cima da barra, com o nome por baixo na cor da opção ativa */
  .tabbar a.fab { color: var(--bar-on); padding-top: 0; align-content: end; overflow: visible; }
  .tabbar a.fab .fab-ic { display: grid; place-items: center; width: 56px; height: 56px; margin: -30px auto 1px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 0 0 5px var(--bg), 0 12px 26px -10px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
  .tabbar a.fab .fab-ic svg { width: 26px; height: 26px; stroke-width: 2.4; }
  .tabbar a.fab span { font-weight: 750; }
  .tabbar > a.fab:active { transform: none; }
  .tabbar > a.fab:active .fab-ic { transform: scale(.9); }
  .tabbar.dragging > a { transition: color .15s; }
  .tabbar.dragging > a.on:not(.near) { color: var(--bar-ink); }
}
@media (max-width: 360px) { .tabbar { left: 8px; right: 8px; } .tabbar a span { font-size: 9.5px !important; } }

/* lente de vidro: desliza até à opção ativa, estica como uma gota a meio do caminho e cresce ao arrastar */
.glass-lens {
  position: absolute; left: 0; top: 0; z-index: 0; opacity: 0; pointer-events: none; border-radius: 26px;
  background: var(--lens-fill);
  box-shadow: inset 0 0 0 .5px var(--lens-rim), inset 0 1px 0 var(--lens-rim);
  transition: translate .5s cubic-bezier(.3, 1.35, .45, 1), width .5s cubic-bezier(.3, 1.35, .45, 1), height .4s, scale .35s cubic-bezier(.3, 1.5, .5, 1), opacity .2s, background .2s;
  will-change: translate;
}
.glass-lens.press { scale: 1.07 1.05; background: color-mix(in srgb, var(--lens-fill) 60%, rgba(255, 255, 255, .14)); }
.dragging > .glass-lens { transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), background .2s; scale: 1.14 1.1;
  background: color-mix(in srgb, var(--lens-fill) 70%, rgba(255, 255, 255, .12)); }
:root[data-theme="light"] .glass-lens { box-shadow: inset 0 0 0 .5px var(--lens-rim), inset 0 1px 0 var(--lens-rim), 0 0 0 .5px rgba(17, 20, 15, .05); }
@media (prefers-reduced-motion: reduce) { .tabbar a svg { animation: none !important; } .glass-lens { transition: opacity .2s; } }

/* ao arrastar (e enquanto desliza), a lente vira uma bolha de vidro como no iPhone: sai da barra, amplia as opções
   que estão por baixo (uma cópia das opções dentro da lente) e tem reflexos coloridos na borda */
:root { --bubble-fill: radial-gradient(120% 100% at 50% 35%, rgba(62, 67, 76, .97), rgba(36, 40, 47, .98)); }
:root[data-theme="light"] { --bubble-fill: radial-gradient(120% 100% at 50% 35%, rgba(255, 255, 255, .98), rgba(238, 240, 243, .98)); }
.glass-lens { overflow: hidden; font-style: normal; }
.lens-mag { position: absolute; left: 0; top: 0; display: grid; box-sizing: border-box; opacity: 0; pointer-events: none;
  transition: translate .5s cubic-bezier(.3, 1.35, .45, 1), opacity .18s; }
.lens-mag a { color: var(--bar-ink) !important; }
.lens-mag a.near { color: var(--bar-on) !important; }
.lens-mag a svg { animation: none !important; }
.dragging > .glass-lens {
  z-index: 4; background: var(--bubble-fill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5),
    inset 5px 2px 7px -4px rgba(255, 80, 170, .8), inset -5px -2px 7px -4px rgba(60, 200, 255, .8),
    inset 0 6px 8px -6px rgba(255, 230, 120, .75), inset 0 -6px 9px -6px rgba(110, 255, 190, .6),
    inset 0 0 18px rgba(255, 255, 255, .16), 0 14px 30px -10px rgba(0, 0, 0, .6);
}
:root[data-theme="light"] .dragging > .glass-lens {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95),
    inset 5px 2px 7px -4px rgba(255, 60, 160, .55), inset -5px -2px 7px -4px rgba(40, 170, 255, .55),
    inset 0 6px 8px -6px rgba(255, 200, 60, .55), inset 0 -6px 9px -6px rgba(60, 220, 160, .45),
    0 0 0 .5px rgba(17, 20, 15, .08), 0 14px 30px -12px rgba(15, 23, 42, .4);
}
.dragging > .glass-lens { scale: 1.4 1.36; }
.dragging .lens-mag { opacity: 1; }
.dragging .lens-mag { transition: opacity .18s; }
/* borda da bolha ligeiramente desfocada (refração) e um brilho de luz em cima à esquerda */
.glass-lens::before, .glass-lens::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .18s; }
.glass-lens::before { -webkit-backdrop-filter: blur(1.5px) saturate(160%); backdrop-filter: blur(1.5px) saturate(160%);
  -webkit-mask: radial-gradient(closest-side, transparent 72%, #000); mask: radial-gradient(closest-side, transparent 72%, #000); }
.glass-lens::after { background: radial-gradient(38% 22% at 28% 13%, rgba(255, 255, 255, .55), transparent 70%), radial-gradient(30% 18% at 74% 90%, rgba(255, 255, 255, .22), transparent 70%); }
.dragging > .glass-lens::before, .dragging > .glass-lens::after { opacity: 1; }

/* frase do dia: hora de envio escolhida pelo treinador */
.q-hour { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.q-hour label { font-size: 13px; font-weight: 600; }
.q-hour .input { width: auto; min-width: 116px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- línguas (bandeiras) */
.lang-cur svg { width: 22px; height: 15px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 9px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.lang-btn svg { width: 24px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang-btn:hover { border-color: var(--line-2); }
.lang-btn:active { transform: scale(.97); }
.lang-btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.lang-pop { position: fixed; z-index: 200; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.lang-pop .lang-pick { flex-direction: column; gap: 6px; }
.lang-pop .lang-btn { width: 100%; min-width: 160px; }
.card.set-lang { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.card.set-lang p { margin: 4px 0 0; }
.set-lang-row { grid-template-columns: 1fr; }

/* aba Avaliações: botão de nova avaliação por cima da lista */
.a-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* início do aluno: "Treinar" — separadores (planos + Treino livre) em grelha, todos à vista, e o painel escolhido */
.train-block { margin-top: 18px; }
.train-title { margin: 0 0 10px; font-size: 20px; letter-spacing: -.03em; }
.train-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 14px; }
.tt { min-width: 0; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--muted); font: inherit; cursor: pointer; }
.tt b { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tt small { font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.tt small span { display: inline-flex; align-items: center; gap: 4px; }
.tt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); box-shadow: 0 0 0 1px var(--accent) inset; }
.tt.free { border-style: dashed; }
.tt.free.on { border-style: solid; }
.tt.free b svg { color: var(--accent); }
:root[data-theme="light"] .tt.free b svg { color: var(--text); }
.tt-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffb547; display: inline-block; }
.plan-note { margin: 0 0 12px; font-size: 14px; }
.free-panel { display: grid; gap: 10px; }
.add-ex { margin-top: 4px; border-style: dashed; }

/* Gestão: ficha do treinador — larga no computador (duas colunas), empilhada no telemóvel sem textos a sair */
.modal.modal-xl { width: min(1040px, 100%); }
.tm .tm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 22px; }
.tm .tm-col { min-width: 0; }
@media (min-width: 900px) {
  .tm .tm-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .tm .tm-col:last-child > .form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
}
.tm .mini-kpis > div { min-width: 0; }
.tm .mini-kpis b { overflow-wrap: anywhere; }
.tm .mini-kpis small { font-size: 12px; }
.tm .diff-row { flex-wrap: wrap; gap: 6px 12px; }
.tm .diff-row > span { min-width: 0; }
.tm .diff-row > span:last-child { margin-left: auto; text-align: right; }
.tm .web-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.tm .web-row > :last-child { margin-left: 0; }
.tm .tm-code .code-cell { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.tm .tm-code .code-pill { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .modal.tm { padding: 18px 14px 22px; }
  .tm .tm-code { flex-direction: column; align-items: stretch; }
  .tm .tm-code > span:last-child { margin-left: 0; }
  .tm .tm-code .code-cell { display: flex; width: 100%; flex-wrap: nowrap; }
  .tm .tm-code .code-pill { flex: 1; min-width: 0; justify-content: center; font-size: 12px; letter-spacing: 0; padding: 8px; }
  .tm .sec-grid { grid-template-columns: 1fr; }
  .tm .admin-actions .field > div { flex-wrap: wrap; }
  .tm .admin-actions .field > div > .select, .tm .admin-actions .field > div > .input[type="email"] { flex: 1 1 100% !important; }
  .tm .rem-row .select { width: 100%; }
  .tm #delGo { margin-left: 0 !important; }
}

/* planos: Mensal / Anual (com o desconto) */
.cycle-row { display: flex; justify-content: center; margin-top: 18px; }
.cycle-seg button { padding: 9px 18px; font-size: 14px; }
/* desconto: etiqueta sólida, legível no botão selecionado (fundo claro) e no escuro */
.save-tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: 0;
  background: var(--good); color: #04210d; vertical-align: middle; line-height: 1.2; }
.cycle-seg button.on .save-tag { box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 35%, transparent); }
.price .save-tag { font-size: 13px; margin-left: 8px; position: relative; top: -4px; }
.price-old { display: block; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: line-through; letter-spacing: 0; margin-bottom: 2px; }

/* Gestão → Planos: formulário à esquerda, pré-visualização do cartão do site à direita */
.plan-ed { margin-bottom: 16px; }
.plan-ed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.plan-ed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 1100px) { .plan-ed-grid { grid-template-columns: minmax(0, 1fr) 340px; } .plan-prev { position: sticky; top: 16px; align-self: start; } }
.plan-ed-form .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.plan-ed-form .form-grid .field:has(textarea) { grid-column: span 1; }
.plan-ed-form textarea { min-height: 140px; resize: vertical; }
.plan-ed-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.plan-ed-h { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.plan-prev-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.plan-prev .plan { margin: 0; }
.plan-prev .plan a { pointer-events: none; }
.plan-ed-bar { position: sticky; bottom: 12px; z-index: 5; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); }
.plan-ed-bar.on { display: flex; }
@media (max-width: 900px) { .plan-ed-bar { bottom: calc(96px + env(safe-area-inset-bottom)); } }
@media (max-width: 640px) { .plan-ed-h { flex-wrap: wrap; } .plan-ed-h .btn { margin-left: 0 !important; } .plan-ed-form .form-grid { grid-template-columns: 1fr; } }
.custom-tag { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700; background: color-mix(in srgb, #ffb547 18%, transparent); color: #ffb547; vertical-align: middle; font-family: var(--font); }
.sheet-h { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.modal .sheet-h:first-of-type { margin-top: 4px; }

/* treino livre: escolha de exercícios num só ecrã — só a lista desliza */
.modal.free-pick { display: flex; flex-direction: column; height: min(92dvh, 900px); overflow: hidden; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.free-pick .modal-head { flex: none; margin-bottom: 10px; }
.fp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.fp-search { max-width: none; margin: 0; flex: none; }
.fp-search .input { height: 44px; }
.fp-chips { flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0; padding-bottom: 2px; }
.fp-chips::-webkit-scrollbar { display: none; }
.fp-chips .chip { flex: none; }
.fp-list { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; gap: 6px; }
.fp-list .pick { padding: 7px 10px; }
.fp-list .ex-thumb { width: 52px; }
.fp-own { flex: none; border-top: 1px solid var(--line); padding-top: 8px; }
.fp-own h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fp-own-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
.fp-own-row .input { height: 42px; }
.fp-own-row select.input { width: auto; max-width: 128px; padding-right: 28px; }
.fp-add { width: 42px; height: 42px; padding: 0; justify-content: center; }
.fp-save { margin-top: 6px; font-size: 13px; }
.fp-note { font-size: 11.5px; margin: 5px 0 0; line-height: 1.35; }
.fp-sel { flex: none; }
.fp-sel:empty { display: none; }
.fp-sel-n { flex: none; align-self: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-right: 2px; }
.fp-foot { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
@media (max-width: 640px) { .fp-foot .btn { flex: 1; } }

/* Gestão → Novidades (changelog) */
.modal.changelog { width: min(820px, 100%); }
.cl-day { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.cl-day:first-child { margin-top: 0; }
.cl-item { border-radius: 12px; background: var(--surface-2); margin-bottom: 6px; }
.cl-item summary, .cl-sum { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 12px; cursor: pointer; list-style: none; }
.cl-sum { cursor: default; }
.cl-item summary::-webkit-details-marker { display: none; }
.cl-item summary::after { content: ''; }
.cl-time { font-size: 12.5px; color: var(--muted); }
.cl-s { font-size: 14px; line-height: 1.4; color: var(--text); }
.cl-item[open] summary .cl-s { font-weight: 650; }
.cl-item ul { margin: 0; padding: 0 14px 12px 70px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .cl-item ul { padding-left: 30px; } }
.fp-empty { display: grid; gap: 10px; align-content: start; padding: 2px; }
.fp-empty p { margin: 0; }
.fp-empty-card { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.fp-empty-name { font-size: 17px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fp-empty-cat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; }
.fp-empty-cat .input { height: 42px; }
.fp-empty-card small { font-size: 12px; }
.modal.fp-noresult .fp-own { display: none; }

/* cartões dos planos: lista com o espaçamento normal (não estica para encher o cartão), preço e nota sempre
   com a mesma altura (as listas começam todas à mesma altura) e o recomendado não sobe em relação aos outros */
.plan ul { align-content: start; gap: 9px; line-height: 1.4; }
.plan li { display: flex; gap: 10px; }
.plan li::before { margin-right: 0; flex: none; }
.plan .price-note { font-size: 13px; margin-top: -10px; min-height: 2.8em; line-height: 1.4; }
.plan.recommended { transform: none; }
@media (hover: hover) { .plan.recommended:hover, .plan.featured:hover { transform: translateY(-4px); } }

/* treino livre: a lista não estica as linhas (era o que punha um exercício "gigante" quando havia só um);
   exercício novo — um só cartão, sempre igual: nome, categoria, equipamento, guardar (PT) e adicionar */
.fp-list { align-content: start; }
.fp-none { margin: 0 0 2px; }
.fp-new-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.fp-empty-card .input { height: 44px; }
.fp-new-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fp-new-row label { display: grid; gap: 4px; font-size: 12px; min-width: 0; }
.fp-create { border-style: dashed; }
.fp-create .ex-thumb { color: var(--accent); }
:root[data-theme="light"] .fp-create .ex-thumb { color: var(--text); }

/* checkout: tudo à vista sem deslizar (resumo compacto; "o que inclui" em duas colunas no computador, fechado no telemóvel) */
.checkout .summary .line { padding: 8px 0; font-size: 13.5px; gap: 12px; }
.checkout .summary .line > span:last-child { text-align: right; }
.checkout .plan-switch button { padding: 8px 6px; }
.checkout .cycle-seg button { padding: 7px 14px; font-size: 13px; }
.sum-seats { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 8px 0 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.sum-seats label { display: grid; gap: 2px; font-size: 13.5px; }
.sum-seats label small { font-size: 11.5px; }
.sum-seats .seats { gap: 6px; }
.sum-seats .seats .input { width: 74px; height: 40px; font-size: 17px; padding: 0 6px; }
.sum-seats .seats .icon-btn { width: 40px; height: 40px; }
.sum-total { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 12px; }
.sum-total > span:first-child { display: grid; gap: 2px; }
.sum-total small { font-size: 11.5px; opacity: .8; }
.summary .sum-total .total { font-size: 28px; line-height: 1; }
.sum-perks { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.sum-perks summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.sum-perks summary::-webkit-details-marker { display: none; }
.sum-perks summary::after { content: '▾'; font-size: 11px; transition: transform .2s; }
.sum-perks[open] summary::after { transform: rotate(180deg); }
.sum-perks ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 5px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.sum-perks li.no { opacity: .6; }
@media (min-width: 901px) {
  .checkout .center-page, .center-page:has(.checkout) { padding-top: 20px; padding-bottom: 20px; }
  .sum-perks ul { grid-template-columns: 1fr 1fr; }
  .checkout .panel { padding: 26px 28px; }
  .checkout h1 { margin-top: 0; }
}
@media (max-width: 900px) {
  .center-page:has(.checkout) { padding: 10px 12px 16px; align-items: start; }
  .checkout { gap: 10px; }
  .checkout .panel { padding: 16px 16px 18px; border-radius: 22px; }
  .checkout .summary > .muted:first-child { display: none; }
  .checkout .plan-switch { margin: 0 0 4px !important; }
  .checkout h1 { font-size: 24px; margin: 0 0 4px; }
  .checkout .banner { margin: 10px 0 !important; padding: 10px 12px; font-size: 13px; }
  .checkout .stack { gap: 10px; }
}

.sum-mini { display: none; }
@media (max-width: 900px) {
  .checkout.co-form:not(.sum-open) .summary > :not(.sum-mini) { display: none; }
  .checkout.co-form .summary { padding: 10px 12px; }
  .checkout.co-form .sum-mini { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; padding: 2px; }
  .checkout.co-form.sum-open .sum-mini { margin-bottom: 8px; }
  .sum-mini > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sum-mini-edit { font-size: 12.5px; font-weight: 700; color: var(--accent); }
  :root[data-theme="light"] .sum-mini-edit { color: var(--text); text-decoration: underline; }
}

/* "Treino a decorrer" (PT): aviso fixo em todas as páginas enquanto houver um treino por terminar */
.live-pill { position: fixed; z-index: 45; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 6px; max-width: min(440px, calc(100vw - 24px));
  padding: 6px 6px 6px 8px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--accent);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: up .3s cubic-bezier(.2, .9, .3, 1); }
.lp-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 4px 4px 6px; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a5a; flex: none; box-shadow: 0 0 0 0 rgba(255, 90, 90, .6); animation: lpPulse 1.6s infinite; }
@keyframes lpPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 90, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 90, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); } }
.lp-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.lp-txt b { font-size: 13.5px; }
.lp-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-more { display: inline-block; padding: 0 6px; border-radius: 99px; background: var(--surface-2); font-size: 11px; color: var(--muted); margin-left: 4px; }
.lp-time { font-size: 13px; color: var(--muted); flex: none; }
.lp-cta { flex: none; padding: 8px 12px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 750; }
.lp-x { flex: none; width: 30px; height: 30px; border-radius: 10px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.lp-x:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 900px) {
  /* por cima da barra de baixo e do botão do meio */
  .live-pill { left: 12px; right: 12px; bottom: calc(112px + env(safe-area-inset-bottom)); max-width: none; }
  .lp-cta { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .lp-dot { animation: none; } }

/* checkout: itens de "o que inclui" alinhados (✓ numa coluna; o texto que passa para a linha de baixo fica alinhado com o texto) */
.sum-perks li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 6px; align-items: start; }
.sum-perks li i { font-style: normal; color: var(--accent); font-weight: 800; }
:root[data-theme="light"] .sum-perks li i { color: var(--muscle); }
.sum-perks li.no i { color: var(--faint); }
/* computador com altura suficiente: maior (continua sem deslizar) */
@media (min-width: 901px) and (min-height: 760px) {
  .checkout { width: min(1100px, 100%); grid-template-columns: 1.05fr 1fr; gap: 20px; }
  .checkout .panel { padding: 30px 34px; }
  .checkout .summary .line { padding: 11px 0; font-size: 15px; }
  .checkout .plan-switch button { padding: 11px 8px; font-size: 14px; }
  .checkout .cycle-seg button { padding: 9px 18px; font-size: 14px; }
  .summary .sum-total .total { font-size: 36px; }
  .sum-total { margin-top: 16px; }
  .sum-total > span:first-child { font-size: 15px; }
  .sum-perks { margin-top: 16px; padding-top: 14px; }
  .sum-perks summary { font-size: 14px; }
  .sum-perks ul { font-size: 13.5px; gap: 9px 22px; margin-top: 12px; }
  .sum-seats label { font-size: 15px; }
  .sum-seats .seats .input { width: 84px; height: 44px; }
  .sum-seats .seats .icon-btn { width: 44px; height: 44px; }
  .checkout h1 { font-size: 34px; }
}

/* cartões dos planos (o que decide a compra): nome, preço e botão no topo; o que inclui por baixo, compacto;
   o que não inclui numa linha que abre. Mais largos e mais curtos. */
.plan { gap: 14px; padding: 26px 26px 22px; }
.plan-top { display: grid; gap: 8px; justify-items: start; }
.plan.featured .plan-top { padding-right: 104px; }
.plan-name { font-weight: 750; font-size: 20px; letter-spacing: -.02em; }
.plan-range { margin-top: 0; }
.plan-price { display: grid; gap: 6px; }
.plan-price .price-note { margin-top: 0; min-height: 2.8em; }
.plan > .btn { margin: 2px 0 4px; }
.plan ul.plan-feat { flex: none; gap: 8px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.plan-no { margin-top: -4px; font-size: 13px; color: var(--muted); }
.plan-no summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--faint); padding: 4px 0; }
.plan-no summary::-webkit-details-marker { display: none; }
.plan-no summary::after { content: '▾'; font-size: 11px; transition: transform .2s; }
.plan-no[open] summary::after { transform: rotate(180deg); }
.plan-no ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.plan.free .price { color: var(--accent); }
:root[data-theme="light"] .plan.free .price { color: var(--good); }
@media (max-width: 640px) { .plan { padding: 22px 20px 18px; } }

/* aniversários e notificações */
.bday-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, #ff7ab6 50%, var(--line));
  background: color-mix(in srgb, #ff7ab6 14%, transparent); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.bday-card h3 { margin-bottom: 10px; }
.bday-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; }
.bday-groups h4 { margin: 0 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.bday-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.bday-row a { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
.bday-row a span { display: grid; min-width: 0; }
.bday-row b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bday-row small { font-size: 12px; }
.btn.icon-only { width: 44px; padding: 0; justify-content: center; }
.bell-mute { position: relative; }
.bell-mute.is-muted { color: var(--faint); }
.bell-mute.is-muted::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%) rotate(-45deg); }
.pw-show { width: 100%; justify-content: center; font-size: 16px; padding: 14px 10px; letter-spacing: .04em; overflow-wrap: anywhere; }

/* ficha do treinador (Gestão): secções com nome curto numa linha; detalhe e "ajustado" por baixo, pequenos */
.tm-sec .sec-item { min-height: 52px; }
.sec-l { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sec-l > svg { flex: none; }
.sec-l > span { display: grid; gap: 1px; min-width: 0; }
.sec-l b { font-weight: 550; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-l small { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-l small .custom-tag { font-style: normal; padding: 0 6px; font-size: 10.5px; }
.sec-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-card > div { min-width: 0; flex: 1 1 320px; }

/* Definições (app do treinador) */
.set-wrap { display: grid; gap: 14px; max-width: 920px; }
.set-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.set-card.set-col { display: grid; justify-content: stretch; }
.set-h { min-width: 0; flex: 1 1 280px; }
.set-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.set-h p { margin: 4px 0 0; font-size: 13px; }
.set-sub { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.set-sub h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-muted { display: grid; gap: 8px; }
.set-mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set-mname { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.set-mname > span { display: grid; min-width: 0; }
.set-mname b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-mname small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--text); color: var(--bg); }
.sec-item.is-off { opacity: .55; }
.me-actions a.icon-btn.on { color: var(--accent, var(--text)); }
.set-kinds { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width: 560px) { .set-kinds { grid-template-columns: minmax(0, 1fr); } }

/* Início → Aniversários no computador: cada aluno num bloco pequeno, com o botão ao lado (no telemóvel fica em lista) */
@media (min-width: 768px) {
  .bday-groups.one { grid-template-columns: minmax(0, 1fr); }
  .bday-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
  .bday-groups.one .bday-list { grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); }
  .bday-row { padding: 9px 10px 9px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
  .bday-row.is-today { border-color: color-mix(in srgb, #ff7ab6 45%, var(--line)); background: color-mix(in srgb, #ff7ab6 7%, var(--surface-2)); }
}

/* Aniversários (app do treinador) */
.bday-card h3 { display: flex; align-items: center; gap: 8px; }
.bday-all { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.bday-all:hover { color: var(--text); }
.bd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bd-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.bd-stat b { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.bd-stat span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-stat.on { border-color: color-mix(in srgb, #ff7ab6 50%, var(--line)); background: color-mix(in srgb, #ff7ab6 8%, var(--surface)); }
.bd-stat.on b { color: #ff7ab6; }
.bd-stat.warn b { color: var(--fat, #f5a524); }
.bd-sec { margin-bottom: 14px; min-width: 0; }
.bd-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.bd-empty { margin: 0; font-size: 14px; }
.bd-hint { margin: 0 0 10px; font-size: 12.5px; }
.bd-hint a { color: var(--text); }
.bd-today { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.bd-tile { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, #ff7ab6 45%, var(--line)); background: color-mix(in srgb, #ff7ab6 7%, var(--surface-2)); min-width: 0; }
.bd-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.bd-who > span, .bd-txt { display: grid; min-width: 0; }
.bd-who b, .bd-txt b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-who small, .bd-txt small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-sent { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--good); font-weight: 600; white-space: nowrap; }
.bd-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.bd-cols .bd-sec { margin-bottom: 14px; }
.bd-list { display: grid; gap: 4px; max-height: 360px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.bd-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; min-width: 0; }
.bd-row:hover { background: var(--surface-2); }
.bd-txt { flex: 1; }
.bd-in { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.bd-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bd-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bd-month { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.bd-month.cur { border-color: color-mix(in srgb, #ff7ab6 45%, var(--line)); }
.bd-month h4 { margin: 0 0 6px; font-size: 13px; font-weight: 650; display: flex; justify-content: space-between; }
.bd-month p { margin: 0; font-size: 13px; }
.bd-mrow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 0; color: inherit; text-decoration: none; font-size: 13px; }
.bd-mrow .mono { color: var(--muted); font-size: 12px; }
.bd-mrow b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-mrow small { font-size: 11.5px; }
.bd-mrow.past { opacity: .55; }
.bd-mrow.is-today b, .bd-mrow.is-today .mono { color: #ff7ab6; }
.bd-nob { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px dashed var(--line-2); background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; max-width: 100%; }
.bd-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-chip:hover { border-style: solid; }
@media (max-width: 760px) {
  .bd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bd-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bd-today { grid-template-columns: minmax(0, 1fr); }
  .bd-months { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bd-month.empty:not(.cur) { display: none; } /* no telemóvel só os meses com aniversários */
}
.bd-count { font-size: 12px; font-weight: 700; color: var(--muted); padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.p-chat.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.more-item.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* reações às mensagens */
.chat-msg { position: relative; }
.chat-react { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: none; place-items: center; cursor: pointer; padding: 0; }
.chat-msg.me .chat-react { right: calc(100% + 6px); }
.chat-msg.them .chat-react { left: calc(100% + 6px); }
.chat-react:hover { color: var(--text); border-color: var(--line-2); }
@media (hover: hover) { .chat-msg:not(.gone):hover .chat-react, .chat-msg.picking .chat-react { display: grid; } }
/* a área do botão cobre o espaço até à bolha: o rato passa da mensagem para o botão sem ele desaparecer */
.chat-react::before { content: ''; position: absolute; top: -10px; bottom: -10px; left: -12px; right: -12px; }
.chat-msg.me .chat-react::before { right: -14px; }
.chat-msg.them .chat-react::before { left: -14px; }
.chat-rxwrap:empty { display: none; }
.chat-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; padding: 0 8px; position: relative; z-index: 1; }
.chat-rx { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; min-height: 24px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; line-height: 1; cursor: pointer; color: var(--text); }
.chat-rx b { font-size: 11px; font-weight: 700; color: var(--muted); }
.chat-rx.mine { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.chat-picker { position: absolute; bottom: calc(100% + 4px); z-index: 5; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.chat-msg.me .chat-picker { right: 0; }
.chat-msg.them .chat-picker { left: 0; }
.chat-picker.below { bottom: auto; top: calc(100% + 4px); }
.chat-picker button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; font-size: 21px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .12s; }
.chat-picker button:hover { transform: scale(1.18); background: var(--surface-2); }
.chat-picker button.on { background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); }
.chat-picker .chat-pick-more { font-size: 20px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line-2); }
.chat-pick-form { display: flex; gap: 6px; align-items: center; padding: 2px 2px 2px 6px; }
.chat-pick-form .input { width: 90px; height: 34px; padding: 4px 10px; font-size: 18px; text-align: center; }
.chat-pick-form .btn { width: auto; height: 34px; border-radius: 99px; font-size: 13px; }
.chat-rx.ro { cursor: default; }

/* Definições do aluno: barra de baixo (pré-visualização e favoritas) */
.bar-prev { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 8px 6px; margin: 2px 0 10px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.bar-prev span { display: grid; justify-items: center; gap: 3px; color: var(--muted); min-width: 0; }
.bar-prev small { font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bar-prev .fab-p { color: var(--accent); }
.bar-prev .fab-p svg { background: var(--accent); color: var(--bg); border-radius: 50%; padding: 4px; width: 24px; height: 24px; box-sizing: border-box; }
.set-out { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; }
.set-out .btn { width: 100%; justify-content: center; }
.bar-sort { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; user-select: none; -webkit-user-select: none; }
.bar-row > span { flex: 1; min-width: 0; }
.bar-row.in-bar { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.bar-row.dragging { box-shadow: 0 10px 26px rgba(0,0,0,.4); transform: scale(1.02); z-index: 2; position: relative; opacity: .95; }
.bar-grip { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: grab; touch-action: none; border-radius: 10px; padding: 0; }
.bar-grip:active { cursor: grabbing; }
.bar-grip:focus-visible { outline: 2px solid var(--accent); }
.bar-where { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bar-row.in-bar .bar-where { color: var(--accent); }
.bar-div { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px 0; display: flex; align-items: center; gap: 8px; }
.bar-div::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bar-sort, .bar-div { user-select: none; -webkit-user-select: none; }

/* treino a decorrer: o progresso (séries feitas) é a linha verde por baixo da barra de cima */
.sh-sub { font-size: 12.5px; display: flex; gap: 6px; justify-content: center; align-items: center; white-space: nowrap; }
.sh-sub .mono { font-size: 13px; }
.sh-dot { opacity: .6; }
.sh-prog { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 0 2px 2px 0; transition: width .35s ease; pointer-events: none; }

/* ficha do aluno: separadores (sublinhado no ativo; com setas e pontas esbatidas quando não cabem todos) */
.cnav { position: relative; margin: 2px 0 20px; border-bottom: 1px solid var(--line); }
.cnav-track { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.cnav-track::-webkit-scrollbar { display: none; }
.cnav a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px 13px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 10px 10px 0 0; transition: color .15s, background-color .15s; }
.cnav a svg { opacity: .75; transition: color .15s, opacity .15s; }
.cnav a:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cnav a.on { color: var(--text); }
.cnav a.on svg { color: var(--accent); opacity: 1; }
.cnav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.cnav-arrow { position: absolute; top: 0; bottom: 1px; width: 52px; display: none; align-items: center; padding: 0; border: 0; cursor: pointer; color: var(--text); z-index: 2; }
.cnav-arrow.l { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--bg) 45%, transparent); }
.cnav-arrow.r { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--bg) 45%, transparent); }
.cnav-arrow span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.cnav-arrow.l span svg { transform: scaleX(-1); }
.cnav.can-l .cnav-arrow.l, .cnav.can-r .cnav-arrow.r { display: flex; }
/* tablet: sem ícones, para caberem todos */
@media (max-width: 1400px) { .cnav a svg { display: none; } .cnav-track { gap: 0; } .cnav a { padding: 11px 7px 13px; font-size: 13.5px; } .cnav a.on::after { left: 6px; right: 6px; } }
@media (max-width: 640px) { .cnav { margin-inline: -4px; } .cnav a { padding: 11px 11px 13px; font-size: 13.5px; } .cnav-arrow { width: 44px; } .cnav-arrow span { width: 26px; height: 26px; } }


/* "Mais" do menu lateral: painel ao lado do menu (sem janela por cima) */
.side-more .more-chev { margin-left: auto; display: inline-grid; opacity: .5; transition: transform .2s, opacity .2s; }
.side-more.open { background: var(--surface); color: var(--text); }
.side-more.open .more-chev { opacity: 1; transform: translateX(2px); color: var(--accent); }
.side-collapsed .side-more .more-chev { display: none; }
.side-fly { position: fixed; z-index: 60; min-width: 230px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 8px; display: grid; gap: 2px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 22px 60px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(-10px) scale(.98); transform-origin: left top; transition: opacity .16s ease, transform .2s cubic-bezier(.2,.8,.2,1); }
.side-fly.open { opacity: 1; transform: none; }
.side-fly h5 { margin: 4px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint, var(--muted)); }
.side-fly .navlink { padding: 10px 12px; }
.side-fly .navlink .nav-badge { margin-left: auto; position: static; }
/* "Mais" no telemóvel: sobe da barra de baixo */
.more-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .2s; }
.more-scrim.open { opacity: 1; }
.more-sheet { position: fixed; z-index: 56; left: 12px; right: 12px; max-width: 560px; margin: 0 auto; bottom: calc(92px + env(safe-area-inset-bottom)); padding: 12px 14px 14px;
  border-radius: 24px; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); opacity: 0; transform: translateY(24px); transition: opacity .18s ease, transform .24s cubic-bezier(.2,.8,.2,1); touch-action: pan-x; }
.more-sheet.open { opacity: 1; transform: none; }
.more-sheet .grab { display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.more-sheet .more-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.more-item.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tabbar a.open { color: var(--text); background: var(--surface-2); }

/* Início: faturação a meia largura (ao lado dos aniversários ou do ranking) */
.revenue-card.half .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.revenue-card.half .rc-grid b { font-size: 24px; }
/* radar sozinho na linha: o círculo à esquerda e a lista à direita */
.radar-wide { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: start; }
.radar-wide > h3 { grid-column: 1 / -1; }
.radar-wide .people { align-self: center; }
@media (max-width: 760px) { .radar-wide { grid-template-columns: minmax(0, 1fr); } }
/* listas de arrastar (menu do treinador, barra do aluno): olho para mostrar/ocultar */
.bar-eye { width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; margin-left: 2px; }
.bar-eye:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.bar-eye:focus-visible { outline: 2px solid var(--accent); }
.bar-eye.fixed { opacity: .3; cursor: default; }
.bar-eye.fixed:hover { background: none; border-color: transparent; color: var(--muted); }
.bar-row.is-hidden { opacity: .55; border-style: dashed; background: none; }
.bar-row.is-hidden > span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.bar-row.is-hidden .bar-eye { color: var(--text); opacity: 1; }
/* Exercícios: filtro "Criados por mim" (separado dos músculos) */
.chip-mine { display: inline-flex; align-items: center; gap: 6px; }
.chip-mine .muted { font-size: 11px; font-weight: 700; }
.chip-mine.on .muted { color: inherit; opacity: .75; }
.chip-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line); }

/* ---------- Dia a dia do aluno (Diário) e calculadora TDEE ---------- */
.dh-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.dh-ring svg { display: block; }
.dh-ring > b { position: absolute; font-size: 12px; font-weight: 700; text-align: center; display: grid; line-height: 1.15; }
.dh-ring.big > b { font-size: 17px; }
.dh-ring.big > b small { font-size: 11px; font-weight: 600; }
.dr-bg { fill: none; stroke: var(--line-2); stroke-width: 7; }
.dr-fg { fill: none; stroke: #4cc3ff; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.dh-bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.dh-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.dh-bar.big { height: 9px; margin-top: 12px; }
/* início (aluno): cartão "Hoje" */
.daily-home { margin-bottom: 14px; }
.dh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dh-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.dh-all { font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.dh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.dh-item { display: grid; align-content: center; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.dh-item b { font-size: 18px; letter-spacing: -.02em; }
.dh-item b small { font-size: 12px; color: var(--muted); }
.dh-water { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.dh-water > span:nth-child(2) { display: grid; }
/* página Diário */
.daily-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 14px; }
.daily-nav b { min-width: 170px; text-align: center; font-size: 15px; }
.daily-nav .flip svg { transform: scaleX(-1); }
.daily-nav .icon-btn:disabled { opacity: .3; }
.daily-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.daily-grid h3, .daily-week h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.daily-kcal { grid-column: 1 / -1; }
.dw-main { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dw-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-row { display: flex; align-items: center; gap: 10px; }
.ds-row .input { max-width: 160px; font-size: 20px; font-weight: 700; }
.ds-hint { font-size: 12.5px; margin: 10px 0 0; }
.dm-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-dot { width: 44px; height: 44px; border-radius: 50%; border: 1px dashed var(--line-2); background: none; color: var(--muted); font: inherit; font-weight: 700; display: grid; place-items: center; cursor: pointer; transition: .15s; }
.dm-dot.on { border: 1px solid transparent; background: var(--accent); color: var(--accent-ink, #111); }
.dk-list { display: grid; gap: 6px; }
.dk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.dk-item input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.dk-item > span { display: grid; min-width: 0; }
.dk-item small { font-size: 12px; }
.dk-item:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dk-item:has(input:checked) > span > b, .dk-item:has(input:checked) > span:only-of-type { opacity: .85; }
.daily-week { margin-bottom: 14px; }
.dwk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.dwk-day { display: grid; justify-items: center; gap: 4px; }
.dwk-day small { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.dwk-day b { font-size: 11px; }
.dwk-day.today small { color: var(--text); font-weight: 700; }
.dwk-bar { width: 100%; max-width: 34px; height: 64px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: flex-end; overflow: hidden; }
.dwk-bar > i { display: block; width: 100%; border-radius: 10px; background: var(--muted); }
.dwk-bar.good > i { background: var(--good); } .dwk-bar.warn > i { background: #ffb547; } .dwk-bar.low > i { background: var(--fat); } .dwk-bar.none > i { background: transparent; }
/* ficha do aluno (treinador): tabela e objetivos */
.dtable-wrap { overflow-x: auto; margin-top: 10px; max-height: 520px; overflow-y: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 8px; position: sticky; top: 0; background: var(--surface); }
.dtable td { padding: 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.dtable tr.dnone td { color: var(--faint, var(--muted)); }
.dscore { display: inline-block; min-width: 44px; text-align: center; padding: 2px 8px; border-radius: 99px; font-weight: 700; font-size: 12px; background: var(--surface-2); }
.dscore.good { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.dscore.warn { background: color-mix(in srgb, #ffb547 20%, transparent); color: #ffb547; }
.dscore.low { background: color-mix(in srgb, var(--fat) 20%, transparent); color: var(--fat); }
.dcfg h4 { margin: 16px 0 8px; font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.dcfg h4 .muted { font-weight: 500; font-size: 12px; }
.dcfg-on { margin: 6px 0 10px; }
.dcfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dlist { display: grid; gap: 6px; margin-bottom: 8px; }
.dli { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.dli.sup { grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .9fr) auto; }
@media (max-width: 560px) { .dli.sup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .dli.sup input:first-child { grid-column: 1 / -1; } .dcfg-grid { grid-template-columns: minmax(0, 1fr); } }
/* calculadora TDEE: no computador e no tablet cabe tudo sem deslizar (dados à esquerda, resultado à direita) */
.tdee-modal .modal-head { margin-bottom: 6px; }
.tdee-intro { margin: 0 0 14px; font-size: 12.5px; }
.tdee-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tdee-left { display: grid; gap: 10px; }
.tdee-left .field { margin: 0; }
.tdee-left .field label { font-size: 12px; }
.tdee-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tdee-left .input { padding-top: 9px; padding-bottom: 9px; }
.tdee-seg { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
.tdee-seg button { justify-content: center; }
.tdee-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tdee-goals button { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; cursor: pointer; min-width: 0; }
.tdee-goals button b { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdee-goals button small { font-size: 11px; }
.tdee-goals button.on { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.tdee-goals button.on small { color: var(--accent); }
.tdee-right { display: grid; gap: 12px; }
.tdee-out { padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.tdee-kcal { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tdee-kcal span { font-size: 12px; font-weight: 600; }
.tdee-kcal b { font-size: 34px; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.tdee-kcal b small, .tdee-main b small { font-size: 12px; color: var(--muted); }
.tdee-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tdee-main > div { display: grid; gap: 2px; }
.tdee-main span { font-size: 11.5px; font-weight: 600; }
.tdee-main b { font-size: 19px; }
.tdee-macros { display: grid; gap: 6px; margin-top: 12px; }
.tdee-macros > div { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tdee-macros i { width: 8px; height: 22px; border-radius: 4px; background: var(--c); }
.tdee-macros span { font-size: 13px; font-weight: 600; }
.tdee-macros b { font-size: 15px; }
.tdee-macros small { font-size: 11px; min-width: 62px; text-align: right; }
.tdee-note { font-size: 11.5px; margin: 10px 0 0; line-height: 1.4; }
.tdee-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.tdee-actions .btn { white-space: nowrap; }
@media (max-width: 700px) { .tdee-body { grid-template-columns: minmax(0, 1fr); } .tdee-actions .btn { flex: 1; justify-content: center; } }
/* período experimental */
.plan-trial { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: -4px; font-size: 12px; color: var(--muted); }
.plan-trial svg { color: var(--good); }
.plan-chip.trial { background: color-mix(in srgb, #ffb547 16%, transparent); color: #ffb547; }
.trial-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-color: color-mix(in srgb, #ffb547 45%, var(--line)); background: color-mix(in srgb, #ffb547 7%, var(--surface)); flex-wrap: wrap; }
.trial-bar > span:nth-child(2) { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.trial-bar small { font-size: 12.5px; }
.trial-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, #ffb547 18%, transparent); color: #ffb547; flex: none; }

/* início (aluno): faixa discreta "Hoje" do Diário, no fim da página */
.dstrip { display: flex; align-items: center; gap: 8px; margin: 14px 0 16px; padding: 8px 8px 8px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.dstrip-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.dstrip-main > svg { color: var(--muted); flex: none; }
.dstrip .dh-ring { flex: none; }
.dstrip .dr-bg, .dstrip .dr-fg { stroke-width: 5; }
.dstrip-txt { display: grid; min-width: 0; }
.dstrip-txt b { font-size: 14px; }
.dstrip-txt small { font-size: 12px; white-space: nowrap; }
.dstrip-chips { display: flex; gap: 6px; margin-left: auto; min-width: 0; overflow: hidden; }
.dstrip-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 12px; white-space: nowrap; }
.dstrip-chip b { color: var(--text); font-size: 12px; }
.dstrip-chip small { font-size: 11px; }
.dstrip-plus { flex: none; }
@media (max-width: 420px) { .dstrip-chips .dstrip-chip:nth-child(n+3) { display: none; } }
/* ficha do aluno (tablet): o nome e os botões na 1.ª linha; os dados pessoais por baixo, a toda a largura (não se apertam ao lado dos botões) */
@media (min-width: 641px) and (max-width: 1400px) {
  .client-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px; align-items: center; }
  .client-head > :first-child { grid-row: 1 / span 3; align-self: start; }
  .client-head > div:nth-child(2) { display: contents; }
  .client-head .ch-title { grid-column: 2; grid-row: 1; }
  .client-head > div:last-child { grid-column: 3; grid-row: 1; }
  .client-head .client-tags { grid-column: 2 / -1; }
}

/* cabeçalho do cliente: nome e selos (presencial/online, objetivo) na 1.ª linha; dados pessoais na 2.ª; estado na 3.ª */
.ch-title { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; min-width: 0; }
.ch-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-chips { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.ch-personal { flex-wrap: nowrap; overflow: hidden; }
.ch-personal > * { white-space: nowrap; flex: none; }
.ch-personal > a:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
@media (max-width: 640px) { .ch-personal { flex-wrap: wrap; } }
/* diário (treinador): em tablet e portátil pequeno a tabela e os objetivos ocupam a largura toda */
@media (max-width: 1400px) { .g-dash > .dlog-main, .g-dash > .dlog-side { grid-column: span 12; } }
.dtable td.dday { font-weight: 600; }
.dtable tr.dnone td { opacity: .55; }
.dtable tr.dnone td.dday { opacity: .8; }
.dtable th:not(:first-child), .dtable td:not(:first-child) { text-align: center; }
/* checkout: dias grátis e data final mesmo antes de pagar */
.co-trial { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  background: color-mix(in srgb, var(--good) 12%, transparent); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.co-trial > svg { flex: none; margin-top: 1px; color: var(--good); }
.co-trial.muted { background: var(--surface-2); border-color: var(--line); }
.co-trial.muted > svg { color: var(--muted); }
/* diário: as calorias são a métrica principal */
.daily-kcal { border-color: color-mix(in srgb, #ff8a3d 40%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #ff8a3d 10%, var(--surface)), var(--surface) 60%); }
.daily-kcal h3 .muted { font-size: 13px; font-weight: 500; margin-left: 4px; }
.dh-ring.kc .dr-fg { stroke: #ff8a3d; }
.dh-ring.kc > svg + svg { position: absolute; color: #ff8a3d; }
.dh-ring.big.kc > b { font-size: 26px; }
.dh-ring.big.kc > b small { font-size: 12px; }
.dk-main { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.dk-side { display: grid; gap: 12px; flex: 1; min-width: 240px; }
.dk-left { margin: 0; font-size: 18px; font-weight: 700; }
.dk-left.over { color: var(--fat); }
.dk-add { display: flex; gap: 8px; }
.dk-add .input { max-width: 140px; }
.dstrip.kcal { border-color: color-mix(in srgb, #ff8a3d 35%, var(--line)); }
.dstrip.kcal .dstrip-txt b { font-weight: 600; }
.dstrip.kcal .dstrip-txt b .mono, .dstrip.kcal .dstrip-txt b.mono { font-weight: 800; }
.dstrip-plus { text-decoration: none; }
.dtable td.dkc { font-weight: 700; color: #ff8a3d; }
.dtable td.dkc.over { color: var(--fat); }
.kpi-kcal .val { color: #ff8a3d; }
.train-hint { margin: 0; font-size: 13px; }
@media (max-width: 560px) {
  .daily-kcal h3 { flex-wrap: wrap; } .daily-kcal h3 .muted { flex-basis: 100%; margin: 0; }
  .dk-main { flex-direction: column; align-items: stretch; gap: 14px; }
  .dk-main > .dh-ring { align-self: center; }
  .dk-side { min-width: 0; width: 100%; }
  .dk-left { text-align: center; }
  .dk-side .dw-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dk-side .dw-btns .btn { padding-left: 0; padding-right: 0; justify-content: center; }
  .dk-add .input { max-width: none; flex: 1; min-width: 0; }
}
@media (max-width: 480px) { .dstrip.kcal .dstrip-chips { display: none; } .dstrip.kcal .dstrip-main > svg:last-child { display: none; } }
/* dica moderna ao passar/focar (data-tip, traduzida pelo i18n) */
.tip-btn { position: relative; }
.tip-btn::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 9px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s ease, transform .15s ease; z-index: 20; }
.tip-btn::before { content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translate(-50%, 4px); border: 5px solid transparent; border-top-color: var(--text); border-bottom: 0;
  opacity: 0; transition: opacity .15s ease, transform .15s ease; pointer-events: none; z-index: 20; }
.tip-btn:hover::after, .tip-btn:focus-visible::after, .tip-btn:hover::before, .tip-btn:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
.kpi-kcal { position: relative; }
.kpi-tdee { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; color: #ff8a3d; border-color: color-mix(in srgb, #ff8a3d 40%, var(--line)); }
.kpi-tdee::after { left: auto; right: 0; transform: translate(0, 4px); }
.kpi-tdee:hover::after, .kpi-tdee:focus-visible::after { transform: translate(0, 0); }
.tdee-split { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); margin: 2px 0 8px; }
.tdee-split button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 4px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.tdee-split button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
/* aluno no browser: instala a app */
.install-gate { max-width: 440px; margin: 40px auto; padding: 28px 22px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.install-gate h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.install-gate > p { margin: 0; }
.ig-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: #0b0d0e; }
.ig-steps { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 10px; width: 100%; text-align: left; }
.ig-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.ig-steps li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 12px; }
.ig-foot { font-size: 13px; }
/* checkout: pagamentos online ainda não ligados */
.pay-later { display: grid; gap: 14px; justify-items: center; text-align: center; }
.pay-later h1 { margin: 0; }
.pay-later > p { margin: 0; }
.pl-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); color: var(--accent); }
.pl-sum { width: 100%; display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; }
.pl-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; }
.pl-sum > div + div { border-top: 1px solid var(--line); }
.pl-note { font-size: 12px; margin: -6px 0 0; }

/* Diário do aluno: interruptor "No início" (mostrar o resumo na página inicial) */
.page-head .daily-home-sw { flex: none; align-self: center; color: var(--muted); }

/* Diário do aluno: slider dos passos (preenchido até ao valor; a marca mostra o objetivo) */
.ds-range { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 10px 0 2px; background: transparent; cursor: pointer; touch-action: pan-y; }
.ds-range:focus-visible { outline: none; }
.ds-range::-webkit-slider-runnable-track { height: 12px; border-radius: 99px;
  background: linear-gradient(90deg, transparent calc(var(--goal) - 1px), color-mix(in srgb, var(--text) 45%, transparent) calc(var(--goal) - 1px), color-mix(in srgb, var(--text) 45%, transparent) calc(var(--goal) + 1px), transparent calc(var(--goal) + 1px)),
    linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
.ds-range::-moz-range-track { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-2) var(--p)); }
.ds-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); transition: transform .12s; }
.ds-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.ds-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.ds-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); }

/* Diário do aluno: calculadora TDEE como ícone no cartão das calorias */
.daily-kcal h3 .dk-tdee { margin-left: auto; width: 36px; height: 36px; }
@media (max-width: 560px) { .daily-kcal h3 .dk-tdee { position: absolute; top: 14px; right: 14px; } .daily-kcal { position: relative; } .daily-kcal h3 { padding-right: 44px; } }

/* Diário do aluno: alimentos por refeição */
.daily-food { grid-column: 1 / -1; }
.daily-food h3 .muted { font-size: 13px; font-weight: 500; margin-left: 4px; }
@media (max-width: 560px) { .daily-food h3 { flex-wrap: wrap; } .daily-food h3 .muted { flex-basis: 100%; margin: 0; } }
.df-sum { display: flex; align-items: center; gap: 18px; padding: 4px 0 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.df-kcal { display: grid; line-height: 1.1; }
.df-kcal b { font-size: 30px; letter-spacing: -.02em; }
.df-kcal small { font-size: 12px; }
.df-macros { flex: 1; min-width: 220px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.df-macro { display: grid; gap: 3px; font-size: 12px; }
.df-macro span { color: var(--muted); }
.df-macro b { font-size: 14px; }
.df-macro > i { display: block; height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.df-macro > i > i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.df-macro.p, .fq-mac .p { --c: var(--muscle); } .df-macro.c, .fq-mac .c { --c: #ffb547; } .df-macro.f, .fq-mac .f { --c: var(--fat); }
.df-meals { display: grid; }
.df-meal { padding: 10px 0; border-bottom: 1px solid var(--line); }
.df-meal:last-child { border-bottom: 0; padding-bottom: 0; }
.df-mhead { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.df-mhead b { font-size: 15px; }
.df-mhead .muted { font-size: 13px; }
.df-mhead .df-add { margin-left: auto; }
.df-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; margin-top: 6px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.df-item:hover { border-color: var(--line-2); }
.df-item span { display: grid; gap: 2px; min-width: 0; }
.df-item span b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-item small { font-size: 12px; }
.df-item > b { flex: none; font-size: 15px; }

/* janela de escolher o alimento */
.fp-search { position: relative; margin-bottom: 10px; }
.fp-search .input { padding-left: 40px; }
.fp-sicon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.fp-list { max-height: min(56vh, 520px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; overscroll-behavior: contain; }
.fp-h { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fp-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.fp-item:hover { border-color: var(--accent); }
.fp-item span { display: grid; gap: 2px; min-width: 0; }
.fp-item b { font-weight: 600; font-size: 14px; }
.fp-item small { font-size: 12px; }
.fp-item > svg { flex: none; color: var(--muted); }
.fp-empty { margin: 14px 2px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.fp-create { margin-top: 10px; }

/* quantidade */
.fq-per { margin: -4px 0 14px; font-size: 13px; }
.fq-row { display: flex; align-items: center; gap: 8px; }
.fq-row .input { max-width: 140px; font-size: 18px; }
.fq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fq-meals { display: flex; flex-wrap: wrap; width: 100%; }
.fq-meals button { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; }
.fq-out { display: flex; align-items: center; gap: 18px; padding: 14px; margin: 6px 0 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.fq-kcal { display: grid; line-height: 1.05; }
.fq-kcal b { font-size: 32px; letter-spacing: -.02em; }
.fq-mac { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.fq-mac span { display: grid; gap: 2px; padding-left: 9px; border-left: 3px solid var(--c); }
.fq-mac b { color: var(--text); font-size: 14px; }
.fq-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fc-wide { grid-column: 1 / -1; }

/* ler o rótulo (foto) */
.fp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fp-note { font-size: 12px; margin: 8px 2px 0; }
.fc-cam { margin-bottom: 12px; }
label.btn.busy { pointer-events: none; opacity: .85; }
.fc-read { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px;
  background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--text); }
.fc-read svg { flex: none; color: var(--good); margin-top: 1px; }

/* área do treinador: separador Alimentos */
.tf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tf-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.tf-head p { margin: 0; font-size: 14px; }
.tf-avg { display: grid; text-align: right; line-height: 1.2; }
.tf-avg span { font-size: 12px; }
.tf-avg b { font-size: 24px; }
.tf-avg b small { font-size: 13px; color: var(--muted); }
.tf-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tf-day { display: grid; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.tf-day small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-day b { font-size: 14px; }
.tf-day.empty b { color: var(--faint); }
.tf-day.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.df-item.ro { cursor: default; }
.df-macro small { font-size: 11px; }
@media (max-width: 560px) { .tf-avg { text-align: left; } .tf-day small { font-size: 10px; } }

/* arrastar para ordenar no telemóvel: a pega "acende" enquanto se segura (~0,25 s) antes de a linha levantar */
.bar-grip, .drag-handle, .chip-grip { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-arm { transition: transform .25s ease, background-color .25s ease, color .25s ease; transform: scale(1.15); background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.drag-handle.drag-arm { transform: translateY(-50%) scale(1.15); }

/* refeições feitas pelo aluno */
/* os botões encolhem com a janela (sem scroll para o lado); no telemóvel "Ler rótulo" fica numa linha e os outros dois por baixo */
.fp-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fp-actions.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fp-actions .btn { min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding-left: 10px; padding-right: 10px; }
@media (max-width: 640px) { .fp-actions.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fp-actions.three .fp-label { grid-column: 1 / -1; } }
/* 2 ou 4 botões em grelha 2×2; com 3, o primeiro (Foto do prato ou Ler rótulo) ocupa a linha toda */
/* número ímpar de botões: o primeiro ocupa a linha toda */
.fp-actions:has(> :last-child:nth-child(odd)) > :first-child { grid-column: 1 / -1; }
.modal:has(.fp-list), .modal:has(.rc-list), .modal:has(.fq-out) { overflow-x: hidden; }
.fp-rec { display: flex; gap: 6px; align-items: stretch; margin-bottom: 6px; }
.fp-rec .fp-item { margin-bottom: 0; flex: 1; min-width: 0; }
.fp-rec .fp-edit { flex: none; width: 44px; height: auto; border-radius: 12px; }
.rc-top { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.rc-serv { display: flex; gap: 6px; align-items: center; }
.rc-serv .input { width: 64px; text-align: center; }
.rc-list { display: grid; gap: 6px; margin-bottom: 10px; }
.rc-item { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rc-name { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rc-name b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-name small { font-size: 12px; }
.rc-g { display: flex; align-items: center; gap: 4px; flex: none; }
.rc-g .input { width: 76px; padding: 8px; text-align: right; }
.rc-out { margin-top: 12px; }
@media (max-width: 420px) { .rc-top { grid-template-columns: 1fr; } }

/* dica alinhada à direita (botões encostados à margem direita): não sai do ecrã nem cria scroll para o lado */
.tip-btn.tip-end::after { left: auto; right: 0; transform: translate(0, 4px); }
.tip-btn.tip-end:hover::after, .tip-btn.tip-end:focus-visible::after { transform: translate(0, 0); }
/* subtítulos dos cartões do Diário: partem a linha (a regra geral dos cartões deixa-os numa só e sai do ecrã) */
.card.daily-food.daily-food h3 > span.muted:last-child, .card.daily-kcal.daily-kcal h3 > span.muted:last-child { white-space: normal; min-width: 0; }

/* Gestão → IA: definições (ligar/desligar, limite por aluno, teto diário) */
.aic { margin-top: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.aic-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.aic-row:first-of-type { border-top: 0; }
.aic-l { flex: 1; min-width: 160px; display: grid; gap: 1px; }
.aic-l small { font-size: 12px; }
.aic-n { display: flex; align-items: center; gap: 6px; }
.aic-n .input { width: 84px; text-align: right; padding: 7px 9px; }
.aic-n small { font-size: 11px; }
.aic-budget .aic-n .input { width: 110px; }

/* "O teu prato": cada alimento com um slider das gramas por baixo */
.pl-item { display: grid; gap: 2px; padding-bottom: 2px; }
.pl-range { margin: 0 4px; height: 30px; }
.pl-swap { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pl-swap b svg { color: var(--muted); vertical-align: -1px; }
.ai-beta.sm { margin-left: 2px; padding: 2px 6px; font-size: 9.5px; }
.btn.primary .ai-beta { background: rgba(0, 0, 0, .14); color: inherit; border-color: transparent; }

/* código de barras */
.bc-cam { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin-bottom: 8px; }
.bc-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: bcScan 1.6s ease-in-out infinite alternate; }
@keyframes bcScan { from { transform: translateY(-40px); } to { transform: translateY(40px); } }
@media (prefers-reduced-motion: reduce) { .bc-line { animation: none; } }
.bc-hint { font-size: 13px; margin: 0 0 10px; }
.bc-photo { margin-bottom: 10px; }
.bc-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.bc-miss { margin: 12px 0 0; font-size: 14px; }
.bc-miss .fp-actions { margin-top: 8px; }

/* régua de quantidade (como o temporizador do iOS) */
.rl-card { border-radius: 22px; background: #0b0c0d; padding: 14px 0 12px; margin: 4px 0 12px; color: var(--accent); --rl-on: var(--accent); --rl-off: color-mix(in srgb, var(--accent) 32%, transparent); }
:root[data-theme="light"] .rl-card { background: #111312; --rl-on: #c6ff3d; --rl-off: rgba(198, 255, 61, .3); color: #c6ff3d; }
.rl { position: relative; }
.rl-track { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x; outline: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.rl-track::-webkit-scrollbar { display: none; }
.rl-track:focus-visible { box-shadow: inset 0 0 0 2px var(--rl-on); border-radius: 12px; }
.rl-inner { display: flex; width: max-content; }
.rl-pad { flex: none; display: block; }
.rl-scale { position: relative; height: 78px; flex: none; }
/* marcas: finas a cada 5 g, médias a cada 10 g, compridas a cada 50 g (só fundos: leve mesmo com muitas marcas) */
.rl-ticks { position: absolute; left: -1.5px; right: 0; bottom: 0; height: 52px;
  background: repeating-linear-gradient(90deg, var(--rl-c) 0 3px, transparent 3px 120px) bottom left / 100% 52px no-repeat,
    repeating-linear-gradient(90deg, var(--rl-c) 0 3px, transparent 3px 24px) bottom left / 100% 40px no-repeat,
    repeating-linear-gradient(90deg, var(--rl-c) 0 2px, transparent 2px 12px) bottom left / 100% 28px no-repeat;
  --rl-c: var(--rl-on); border-radius: 2px; }
.rl-ticks.dim { --rl-c: var(--rl-off); }
.rl-fill { position: absolute; left: 0; bottom: 0; height: 52px; overflow: hidden; }
.rl-fill .rl-ticks { left: -1.5px; right: auto; }
.rl-num { position: absolute; top: 0; transform: translateX(-50%); font: 700 15px/1 var(--font); color: var(--rl-off); font-variant-numeric: tabular-nums; }
.rl-num.on { color: var(--rl-on); }
.rl-mark { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); width: 0; height: 0; border: 7px solid transparent; border-bottom: 10px solid var(--rl-on); border-top: 0; pointer-events: none; }
.rl-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 18px 16px 0; flex-wrap: wrap; }
.rl-foot .fq-chips { margin: 0; flex: 1 1 180px; }
.rl-foot .fq-chips .btn { background: color-mix(in srgb, var(--rl-on) 16%, #0b0c0d); border-color: transparent; color: var(--rl-on); }
.rl-foot .fq-chips .btn.primary { background: var(--rl-on); color: #111; }
.rl-foot .fq-chips .btn small { color: inherit; opacity: .7; }
.rl-val { display: flex; align-items: baseline; gap: 4px; color: var(--rl-on); margin-left: auto; }
.rl-val input { width: 4.2ch; background: none; border: 0; padding: 0; color: inherit; font-size: 46px; font-weight: 300; line-height: 1; text-align: right; outline: none; -moz-appearance: textfield; }
.rl-val input::-webkit-inner-spin-button, .rl-val input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rl-val input:focus { border-bottom: 2px solid var(--rl-on); }
.rl-val span { font-size: 22px; font-weight: 400; }

/* cartão único das calorias (com Alimentos): total do dia no topo */
.df-total { display: flex; align-items: center; gap: 14px; }
.df-total .dh-ring { flex: none; }
.df-total > div { display: grid; line-height: 1.15; }
.df-total b { font-size: 30px; letter-spacing: -.02em; }
.df-total small { font-size: 13px; }
.df-total .dk-left { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.df-total .ds-hint { margin: 4px 0 0; font-size: 12px; }
.df-manual { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.df-manual summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; list-style: none; }
.df-manual summary::-webkit-details-marker { display: none; }
.df-manual .dk-add { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.df-manual .dk-add .input { flex: 1 1 120px; min-width: 0; }
.tdee-from { font-weight: 500; font-size: 12px; margin-left: 4px; }











/* estado de espírito — app do aluno: cartão das 3 perguntas */
.mood-card { margin: 14px 0; padding: 16px; border-color: color-mix(in srgb, #8b7cff 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #8b7cff 14%, var(--surface)), var(--surface) 65%); }
.mood-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.mood-head h3 { margin: 0; font-size: 17px; }
.mood-head p { margin: 2px 0 0; font-size: 13px; }
.mood-ic { font-size: 28px; line-height: 1; flex: none; }
.mood-q { margin-top: 12px; }
.mood-q > b { display: block; font-size: 14px; margin-bottom: 6px; }
.mood-faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mood-faces button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; cursor: pointer; min-width: 0; transition: transform .12s, border-color .12s, background-color .12s; }
.mood-faces button span { font-size: 26px; line-height: 1; filter: grayscale(.5); opacity: .8; transition: filter .12s, opacity .12s; }
.mood-faces button small { font-size: 10px; line-height: 1.15; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mood-faces button.on { border-color: #8b7cff; background: color-mix(in srgb, #8b7cff 22%, var(--surface-2)); color: var(--text); transform: scale(1.04); }
.mood-faces button.on span { filter: none; opacity: 1; }
.mood-note { margin: 12px 0 10px; resize: none; font-size: 14px; }
.mood-done .mood-head { margin: 0; }
@media (max-width: 360px) { .mood-faces button small { display: none; } }

/* estado de espírito — área do treinador: separador Bem-estar */
.mood-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.mood-kpi .val { display: flex; align-items: baseline; gap: 6px; }
.mood-kpi .mood-big { font-size: 26px; align-self: center; }
.mood-kpi .val b { font-size: 24px; }
.mood-alert { margin-bottom: 14px; }
.mood-chart-card, .mood-list { margin-bottom: 14px; }
.mood-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 120px; align-items: end; margin-top: 6px; }
.mc-day { height: 100%; display: flex; gap: 1px; align-items: flex-end; border-radius: 4px; }
.mc-day.none { background: repeating-linear-gradient(0deg, transparent 0 6px, color-mix(in srgb, var(--line) 60%, transparent) 6px 7px); }
.mc-day i { flex: 1; border-radius: 3px 3px 0 0; min-height: 0; }
.mc-mood, i.mc-mood { --c: #8b7cff; } .mc-energy, i.mc-energy { --c: #ffb547; } .mc-sleep, i.mc-sleep { --c: #2f9be0; }
.mc-day i { background: var(--c); }
.mood-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mood-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.ml-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ml-row:first-of-type { border-top: 0; }
.ml-day { font-size: 14px; }
.ml-vals { display: flex; gap: 14px; flex-wrap: wrap; }
.ml-vals span { display: inline-flex; align-items: center; gap: 5px; }
.ml-vals em { font-style: normal; font-size: 20px; }
.ml-vals small { font-size: 12px; }
.ml-note { grid-column: 2; margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
@media (max-width: 560px) { .mood-kpis { gap: 8px; } .mood-kpi .val b { font-size: 18px; } .mood-kpi .mood-big { font-size: 20px; } .ml-row { grid-template-columns: minmax(0, 1fr); } .ml-note { grid-column: 1; } .mood-chart { height: 90px; gap: 2px; } }
/* Definições do treinador */
.set-mood { display: flex; align-items: center; gap: 10px; }
.set-mood .input { width: 120px; }
.set-mood-h { font-size: 13px; color: var(--muted); }
.mood-sub { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }







/* ===== Calculadora TDEE ===== */
.tdee-go, .tdee-sum { display: none; }
.tdee-goal-l { font-style: normal; font-size: 12px; color: var(--muted); }
.tdee-macros > div { position: relative; }

/* telemóvel: 2 ecrãs — "resultado" (abre aqui) e "os teus dados" — cada um com espaço e sem scroll */
@media (max-width: 700px) {
  .modal:has(.tdee-modal) { padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .tdee-modal .modal-head { margin-bottom: 14px; }
  .tdee-modal .modal-head h2 { font-size: 21px; }
  .tdee-intro { display: none; }
  .tdee-modal[data-step="out"] .tdee-left { display: none; }
  .tdee-modal[data-step="in"] .tdee-right { display: none; }
  .tdee-modal .mono { font-family: var(--font); font-variant-numeric: tabular-nums; }

  /* --- os teus dados --- */
  .tdee-left { display: grid; gap: 16px; }
  .tdee-left .field { margin: 0; }
  .tdee-left .field label { font-size: 13px; margin-bottom: 6px; }
  .tdee-seg button { padding: 11px 8px; font-size: 15px; }
  .tdee-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tdee-left .input { padding: 12px 14px; font-size: 16px; }
  .tdee-left .input::placeholder { color: var(--faint); }
  .tdee-from { display: block; margin: 2px 0 0; font-size: 12px; font-weight: 500; }
  .tdee-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tdee-goals button { padding: 11px 12px; border-radius: 14px; gap: 2px; }
  .tdee-goals button b { font-size: 14px; }
  .tdee-goals button small { font-size: 12px; }
  .tdee-go { display: flex; margin-top: 4px; padding: 13px; font-size: 15px; }

  /* --- resultado --- */
  .tdee-right { display: grid; gap: 14px; }
  .tdee-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
  .tdee-sum span { display: grid; gap: 2px; min-width: 0; }
  .tdee-sum b { font-size: 14px; font-weight: 600; }
  .tdee-sum small { font-size: 12.5px; }
  .tdee-sum em { flex: none; font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }
  .tdee-out { padding: 0; border: 0; background: none; display: grid; gap: 14px; }
  .tdee-kcal { text-align: center; padding: 18px 12px 16px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 20px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--surface-2); gap: 4px; justify-items: center; }
  .tdee-kcal span { font-size: 13px; }
  .tdee-kcal b { font-size: 48px; font-weight: 800; letter-spacing: -.035em; line-height: 1; display: inline-flex; align-items: baseline; gap: 6px; }
  .tdee-kcal b small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
  .tdee-goal-l { font-size: 13px; }
  .tdee-main { grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
  .tdee-main > div { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); gap: 4px; }
  .tdee-main span { font-size: 12px; font-weight: 600; }
  .tdee-main b { font-size: 20px; font-weight: 700; }
  .tdee-main b small { font-size: 12px; font-weight: 600; color: var(--muted); }
  .tdee-split { margin: 0; }
  .tdee-split button { padding: 8px 4px; font-size: 13px; }
  .tdee-macros { margin: 0; gap: 8px; }
  .tdee-macros > div { grid-template-columns: 4px minmax(0, 1fr) auto auto; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); overflow: hidden; }
  .tdee-macros > div > i { width: 4px; height: 26px; }
  .tdee-macros > div::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w); background: var(--c); opacity: .55; }
  .tdee-macros span { font-size: 14px; }
  .tdee-macros b { font-size: 17px; font-weight: 800; }
  .tdee-macros small { font-size: 12px; min-width: 64px; }
  .tdee-note { font-size: 11.5px; margin: 0; }
  .tdee-actions { margin-top: 2px; }
  .tdee-actions.only-close { display: none; }
  .tdee-actions [data-close] { display: none; }
  .tdee-actions #tdSave { flex: 1 1 100%; padding: 13px; }
}
/* ecrãs baixos (ex.: iPhone SE): o mesmo desenho, um pouco mais junto */
@media (max-width: 700px) and (max-height: 700px) {
  .modal:has(.tdee-modal) { padding-top: 14px; max-height: calc(100dvh - 8px); }
  .tdee-modal .modal-head { margin-bottom: 10px; }
  .tdee-left { gap: 11px; }
  .tdee-left .input { padding: 9px 12px; }
  .tdee-seg button { padding: 8px; }
  .tdee-goals button { padding: 8px 10px; }
  .tdee-go { padding: 11px; }
  .tdee-right, .tdee-out { gap: 10px; }
  .tdee-kcal { padding: 12px 10px; }
  .tdee-kcal b { font-size: 38px; }
  .tdee-main > div { padding: 9px 12px; }
  .tdee-macros > div { padding: 9px 12px; }
  .tdee-note { display: none; }
}
@media (max-width: 700px) and (max-height: 600px) {
  .tdee-from, .tdee-goal-l, .tdee-goals button small, .tdee-macros small { display: none; }
  .tdee-left .field label { margin-bottom: 4px; font-size: 12px; }
  .tdee-sum { padding: 9px 12px; }
  .tdee-kcal b { font-size: 32px; }
}
@media (max-width: 700px) { .tdee-opt { display: none; } }
@media (max-width: 700px) and (max-height: 700px) {
  .tdee-left { gap: 9px; }
  .tdee-form { gap: 8px; }
  .tdee-goals { gap: 6px; }
  .tdee-left .field label { margin-bottom: 4px; }
  .tdee-from { display: inline; margin-left: 4px; }
}

/* estado de espírito: pontuação geral (0–100) */
.mood-ring { position: relative; display: inline-grid; place-items: center; flex: none; --c: #8b7cff; }
.mood-ring.top { --c: var(--good); } .mood-ring.good { --c: #8bd35a; } .mood-ring.mid { --c: #ffb547; } .mood-ring.low { --c: var(--bad); }
.mood-ring svg { position: absolute; inset: 0; }
.mood-ring .mr-bg { fill: none; stroke: var(--line-2); stroke-width: 7; }
.mood-ring .mr-fg { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.mood-ring b { position: relative; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* quadro final do aluno (fica até carregar no ✕) */
.mood-done { position: relative; }
.mood-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; }
.mood-sum { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.mood-k { font-size: 12px; font-weight: 600; }
.mood-sum h3 { margin: 2px 0; font-size: 19px; }
.mood-sum h3 small { font-size: 13px; font-weight: 600; }
.mood-sum p { margin: 0; font-size: 13px; }
.mood-ans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.mood-ans span { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.mood-ans em { font-style: normal; font-size: 24px; line-height: 1; }
.mood-ans b { font-size: 13px; }
.mood-ans small { font-size: 11.5px; }
.mood-anote { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); font-style: italic; }
/* treinador: pontuação geral da semana e de cada dia */
.mood-score-card { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.mood-score-card h3 { margin: 2px 0; font-size: 20px; }
.mood-score-card h3 small { font-size: 13px; font-weight: 600; }
.mood-score-card p { margin: 0; font-size: 13px; }
.mood-score-card .mood-ring b { font-size: 24px; }
.ml-row { grid-template-columns: 110px minmax(0, 1fr) auto; }
.ml-note { grid-column: 2 / -1; }
.ml-score { min-width: 42px; text-align: center; padding: 4px 8px; border-radius: 99px; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
  --c: #8b7cff; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.ml-score.top { --c: var(--good); } .ml-score.good { --c: #8bd35a; } .ml-score.mid { --c: #ffb547; } .ml-score.low { --c: var(--bad); }
@media (max-width: 560px) { .ml-row { grid-template-columns: minmax(0, 1fr) auto; } .ml-vals { grid-column: 1 / -1; grid-row: 2; } .ml-note { grid-column: 1 / -1; } }
.mood-card.q-gone { opacity: 0; transform: scale(.98); transition: opacity .2s, transform .2s; }
.mood-sum h3, .mood-score-card h3 { display: block; color: var(--text); } .mood-sum h3 small, .mood-score-card h3 small { margin-left: 2px; }

/* estado de espírito: gráfico da pontuação geral por dia */
.mood-chart-k { font-size: 12px; font-weight: 500; margin-left: 4px; }
.mc-day i.mc-score { --c: #8b7cff; background: var(--c); border-radius: 4px 4px 0 0; }
.mc-score.top { --c: var(--good); } .mc-score.good { --c: #8bd35a; } .mc-score.mid { --c: #ffb547; } .mc-score.low { --c: var(--bad); }
.mood-kpi .kpi-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Definições: editor das perguntas */
.mq-list { display: grid; gap: 10px; }
.mq-item { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 8px; }
.mq-top { display: flex; align-items: center; gap: 8px; }
.mq-top .input { flex: 1; min-width: 0; }
.mq-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: color-mix(in srgb, #8b7cff 22%, transparent); color: var(--text); }
.mq-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.mq-row label { display: grid; gap: 3px; min-width: 0; }
.mq-row span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mq-row .input { padding: 8px 10px; font-size: 14px; min-width: 0; }
.mq-rev { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.mq-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.mq-note { font-size: 12px; margin: 8px 0 0; }
@media (max-width: 560px) { .mq-row { grid-template-columns: 1fr 1fr; } .mq-row label:first-child { grid-column: 1 / -1; } }

/* Diário do aluno: estado de espírito do dia escolhido */
.mood-day { margin: 16px 0; }
.mood-day .mood-dh { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }

/* Definições → estado de espírito: legenda de cada um dos 5 níveis */
.mq-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mq-lv { display: grid; gap: 4px; min-width: 0; }
.mq-lv span { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mq-lv em { font-style: normal; font-size: 16px; line-height: 1; }
.mq-lv .input { padding: 8px; font-size: 13.5px; min-width: 0; }
@media (max-width: 640px) {
  .mq-scale { grid-template-columns: 1fr; gap: 6px; }
  .mq-lv { grid-template-columns: 46px minmax(0, 1fr); align-items: center; }
}
/* pré-visualização */
.mood-pv-note { margin: -4px 0 12px; font-size: 13.5px; }
.mood-pv .mood-card { margin: 0 0 10px; }
/* Diário: as secções seguem a ordem do aluno; estado de espírito e últimos 7 dias ocupam a largura toda */
.daily-grid > .daily-week, .daily-grid > .mood-day { grid-column: 1 / -1; margin: 0; }
/* Definições da app → Secções do Diário */
.dorder { margin-top: 10px; }
.dorder-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
/* início: estado de espírito respondido, numa linha */
.mood-card.mood-mini { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; }
.mood-mini-a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.mood-mini .mood-ring b { font-size: 15px; }
.mood-mini .mood-ring .mr-bg, .mood-mini .mood-ring .mr-fg { stroke-width: 5; }
.mood-mini-t { display: grid; gap: 1px; min-width: 0; }
.mood-mini-t small { font-size: 12px; }
.mood-mini-t b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mood-mini-t b .muted { font-weight: 600; font-size: 13px; }
.mood-mini-f { margin-left: auto; display: flex; gap: 2px; flex: none; }
.mood-mini-f em { font-style: normal; font-size: 19px; line-height: 1; }
.mood-mini .mood-x { position: static; flex: none; width: 32px; height: 32px; }
@media (max-width: 340px) { .mood-mini-f { display: none; } }
.dorder-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; font-size: 14px; }

/* ---- início do aluno (painel do dia): data e saudação, semana, "Hoje" em mosaicos, pendentes, treinar */
.h-top { margin: 2px 0 16px; }
.h-date { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.h-top h1 { margin: 0; font-size: clamp(28px, 7vw, 38px); letter-spacing: -.045em; line-height: 1.05; }
.h-top p { margin: 4px 0 0; font-size: 14px; }
.h-week { padding: 14px 14px 12px; margin-bottom: 18px; }
.h-week-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.h-week-h .muted b { color: var(--text); font-size: 15px; }
.h-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.h-day { display: grid; justify-items: center; gap: 5px; }
.h-day small { font-size: 10.5px; font-weight: 700; color: var(--faint); }
.h-day i { font-style: normal; width: 100%; max-width: 40px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.h-day.on i { background: var(--accent); border-color: transparent; color: #0b0d0a; }
.h-day.today i { box-shadow: 0 0 0 2px var(--text); color: var(--text); }
.h-day.today small { color: var(--text); }
.h-day.later i { opacity: .55; }
.h-sec, .train-block .train-title { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h-sec[hidden] { display: none; }
.h-today { display: grid; gap: 10px; margin-bottom: 18px; }
.h-today > div:empty { display: none; }
.h-today .mood-card, .h-today .mood-ask { margin: 0; }
.h-today .dstrip { margin: 0; }
.h-tasks { display: grid; gap: 10px; margin-bottom: 18px; }
.h-tasks > .banner { margin: 0; }
.train-block { margin-bottom: 18px; }
/* estado de espírito por responder: convite numa linha */
.mood-ask { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-color: color-mix(in srgb, #8b7cff 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #8b7cff 14%, var(--surface)), var(--surface) 70%); }
.mood-ask-ic { font-size: 26px; line-height: 1; flex: none; }
.mood-ask-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.mood-ask-t b { font-size: 15.5px; }
.mood-ask-t small { font-size: 12.5px; }
.mood-ask .btn { flex: none; }
.mood-sheet .mood-card { margin: 0; padding: 0; border: 0; background: none; }
.mood-form-sub { margin: -4px 0 12px; font-size: 13.5px; }
/* calorias em destaque */
.h-kcal { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-color: color-mix(in srgb, #ff8a3d 35%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, #ff8a3d 9%, var(--surface)), var(--surface) 65%); }
.h-kcal-a { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.h-kcal .dh-ring { flex: none; }
.h-kcal .dr-bg, .h-kcal .dr-fg { stroke-width: 6; }
.h-kcal-t { display: grid; gap: 1px; min-width: 0; }
.h-kcal-t > small { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.h-kcal-t b { font-size: 22px; letter-spacing: -.02em; white-space: nowrap; }
.h-kcal-t b small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.h-kcal-t em { font-style: normal; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-kcal-add { flex: none; text-decoration: none; }
/* os outros objetivos do dia */
.h-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .h-tiles.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .h-tiles.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.h-tile { display: grid; gap: 6px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; min-width: 0; --tc: var(--accent); }
.h-tile.water { --tc: #2f9be0; } .h-tile.steps { --tc: #3fc28a; } .h-tile.habits { --tc: #8b7cff; } .h-tile.supps { --tc: #ffb547; }
.h-tile-h { display: flex; align-items: center; gap: 6px; color: var(--tc); }
.h-tile-h small { font-size: 12px; font-weight: 700; color: var(--muted); }
.h-tile b { font-size: 19px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-tile b small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.h-bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.h-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tc); }
@media (hover: hover) { .h-tile:hover, .h-kcal-a:hover { filter: brightness(1.06); } }
.h-tile b, .h-kcal-t b { font-variant-numeric: tabular-nums; font-weight: 800; }
@media (max-width: 639px) { .h-tiles > .h-tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* Definições: Menu e Ficha do aluno fechados (resumo + Editar) */
.set-fold .fold-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.set-fold .fold-h h3 { grid-column: 1; }
.set-fold .fold-sum { grid-column: 1; margin: 2px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-fold .fold-btn { grid-column: 2; grid-row: 1 / span 2; }
.set-fold .fold-body { display: none; }
.set-fold.open .fold-body { display: block; margin-top: 12px; }
.set-fold.open .fold-sum { display: none; }
.set-fold .fold-desc { margin: 0 0 10px; font-size: 13.5px; }
.set-fold .fold-h h3 { flex-wrap: nowrap; min-width: 0; }
.set-fold .fold-h h3 svg { flex: none; }
/* início: frase e estado de espírito logo no topo; o resto com espaço igual */
.h-top + .quote-card, .h-top + .h-mood { margin-top: 0; }
.h-mood:not(:empty) { margin-bottom: 14px; }
.h-mood .mood-card, .h-mood .mood-ask { margin: 0; }
.h-daily:not(:empty) { display: grid; gap: 10px; margin-bottom: 18px; }
.quote-card { margin-bottom: 14px; }

/* ==== início do aluno: saudação e semana, estado de espírito, frase, planos (moderno e fluido) ==== */
.hx { display: grid; gap: 14px; }
.hx > .banner, .hx > #pwaCards .pwa-card { margin: 0; }
.hx > #pwaCards:empty, .hx > .hx-mood:empty { display: none; }
/* entrada suave, um bloco de cada vez */
@keyframes hxIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hx-in { animation: hxIn .42s cubic-bezier(.2, .7, .2, 1) both; }
.hx > :nth-child(2).hx-in { animation-delay: .05s; } .hx > :nth-child(3).hx-in { animation-delay: .1s; }
.hx > :nth-child(4).hx-in { animation-delay: .15s; } .hx > :nth-child(5).hx-in { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .hx-in { animation: none; } }
/* saudação + semana num só cartão */
.hx-hero { position: relative; overflow: hidden; padding: 20px 20px 18px; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--surface); }
.hx-date { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.hx-hero h1 { margin: 6px 0 0; font-size: clamp(30px, 8vw, 40px); line-height: 1.02; letter-spacing: -.05em; }
.hx-hero p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.hx-week { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.hx-count { display: flex; align-items: center; gap: 10px; flex: none; }
.hx-count b { font-size: 44px; line-height: .9; font-weight: 800; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.hx-count span { display: grid; font-size: 14px; font-weight: 700; line-height: 1.15; }
.hx-count small { font-size: 12px; font-weight: 500; color: var(--muted); }
.hx-days { display: flex; gap: 5px; min-width: 0; }
.hx-days span { display: grid; justify-items: center; gap: 4px; }
.hx-days i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: #0b0d0a; transition: transform .2s; }
.hx-days small { font-size: 10px; font-weight: 700; color: var(--faint); }
.hx-days .on i { background: var(--accent); border-color: transparent; }
.hx-days .today i { box-shadow: 0 0 0 2px var(--bg, #0b0d0a), 0 0 0 4px var(--text); }
.hx-days .today small { color: var(--text); }
.hx-days .later i { opacity: .5; }
@media (max-width: 360px) { .hx-days i { width: 22px; height: 22px; } .hx-count b { font-size: 38px; } }
/* estado de espírito e frase: cartões leves, mesmos cantos */
.hx-mood .mood-card, .hx-mood .mood-ask { margin: 0; border-radius: 20px; }
.hx .quote-card { margin: 0; padding: 14px 16px; border-radius: 20px; }
.hx .quote-card p { font-size: 16px; margin: 6px 0 4px; }
.hx .quote-card .q-mark { transform: scale(.75); transform-origin: top right; top: 6px; }
/* planos: cartões que deslizam para o lado (no telemóvel) */
.hx-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0 10px; }
.hx-sec .train-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; text-transform: none; color: var(--text); }
.hx-sec small { font-size: 12.5px; }
.hx .train-block { margin: 0; }
.hx .train-tabs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; margin: 0 -16px 14px; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hx .train-tabs::-webkit-scrollbar { display: none; }
.hx .tt { flex: 0 0 min(72%, 250px); scroll-snap-align: start; min-height: 118px; display: grid; align-content: space-between; gap: 10px; padding: 14px; border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 8%, var(--surface-2)), var(--surface)); transition: transform .15s ease, border-color .2s, box-shadow .2s; }
.hx .tt:active { transform: scale(.97); }
.hx .tt b { font-size: 16px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
.hx .tt small { color: var(--muted); }
.tt-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.hx .tt.on { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface)); }
.hx .tt.on .tt-ic { background: var(--accent); color: #0b0d0a; }
.hx .tt.free { background: var(--surface); }
.hx .train-panel { animation: hxIn .3s ease both; }
@media (min-width: 760px) {
  .hx .train-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; margin: 0 0 14px; padding: 0; }
  .hx .tt { flex: none; }
}
.hx-tasks { display: grid; gap: 10px; }
.hx-tasks > .banner { margin: 0; }
.hx-days { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 250px; }
.hx-days i { width: 100%; max-width: 28px; height: auto; aspect-ratio: 1; }
.hx-sec small { text-align: right; }

/* início: planos de treino numa lista (um por baixo do outro) */
.hx .train-tabs { display: grid; grid-template-columns: 1fr; gap: 10px; overflow: visible; margin: 0 0 14px; padding: 0; scroll-snap-type: none; }
.hx .tt { flex: none; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic name go" "ic info go"; align-items: center; column-gap: 12px; row-gap: 2px; padding: 12px 14px; border-radius: 18px; }
.hx .tt .tt-ic { grid-area: ic; width: 40px; height: 40px; }
.hx .tt b { grid-area: name; -webkit-line-clamp: 1; }
.hx .tt small { grid-area: info; }
.hx .tt::after { content: ''; grid-area: go; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-right: 4px; transition: transform .2s; }
.hx .tt.on::after { transform: rotate(45deg); border-color: var(--accent); }
@media (min-width: 760px) { .hx .train-tabs { grid-template-columns: 1fr; } }
.hx .train-tabs > .train-panel { margin: -2px 0 4px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
/* cartão da saudação: pontuação do estado de espírito de hoje à direita */
.hx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hx-hi { min-width: 0; }
.hx-moodslot:empty { display: none; }
.hx-score { display: grid; justify-items: center; gap: 2px; flex: none; color: inherit; text-decoration: none; padding: 2px 0 0; }
.hx-score .mood-ring b { font-size: 18px; }
.hx-score .mood-ring .mr-bg, .hx-score .mood-ring .mr-fg { stroke-width: 6; }
.hx-score > b { margin-top: 4px; font-size: 13px; font-weight: 800; line-height: 1.1; }
.hx-score > small { font-size: 11px; color: var(--muted); line-height: 1; }
@media (max-width: 360px) { .hx-score .mood-ring { transform: scale(.85); } }
/* botão Treino: os planos como na página inicial */
.sheet-plans { margin-top: 4px; }
.sheet-plans .train-panel[hidden] { display: none; }
.sheet-plans .tt.free { text-decoration: none; color: inherit; }
.sheet-plans .tt.free::after { transform: rotate(-45deg); }
/* planos no início: botão "vista" (lista ou cartões) */
.hx-sec { align-items: center; }
.hx-sec .hx-view { width: 38px; height: 38px; flex: none; border-radius: 12px; }
.hx-sec .hx-view.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.hx .tt .tt-n { display: none; }
/* vista em cartões: grelha de 2 (3 no computador) */
.hx .is-cards .train-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .hx .is-cards .train-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hx .is-cards .tt { position: relative; grid-template-columns: auto 1fr; grid-template-areas: "ic n" "name name" "info info"; align-content: start; align-items: center; row-gap: 0; column-gap: 8px;
  min-height: 136px; padding: 14px 14px 12px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface-2)) 0%, var(--surface) 70%); }
.hx .is-cards .tt::after { display: none; }
.hx .is-cards .tt .tt-ic { width: 42px; height: 42px; border-radius: 14px; }
.hx .is-cards .tt .tt-n { display: inline-flex; grid-area: n; justify-self: end; align-self: start; padding: 4px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.hx .is-cards .tt b { margin-top: 14px; font-size: 15.5px; line-height: 1.25; -webkit-line-clamp: 2; }
.hx .is-cards .tt small { margin-top: 4px; white-space: normal; }
.hx .is-cards .tt small > span:first-child { display: none; } /* o número de treinos já está no canto */
.hx .is-cards .tt small > span:first-child + span::before { content: none; }
.hx .is-cards .tt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 10px 30px -18px color-mix(in srgb, var(--accent) 70%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)) 0%, var(--surface) 75%); }
.hx .is-cards .tt.on .tt-n { color: #0b0d0a; background: var(--accent); border-color: transparent; }
.hx .is-cards .tt.free { border-style: dashed; background: var(--surface); }
.hx .is-cards .tt.free small { color: var(--muted); }
.hx .is-cards .train-tabs > .train-panel { grid-column: 1 / -1; margin: 4px 0 0; padding-left: 0; border-left: 0; }
.tt-last::before { content: '· '; }
.hx .is-cards .tt-last::before { content: none; }
.hx.no-anim .hx-in, .hx.no-anim .train-panel { animation: none; }
/* Gestão → Notificações */
.ps-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ps-head h3 { margin: 0; }
.ps-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ps-day { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; }
.ps-day > b { font-size: 13px; text-transform: capitalize; margin-bottom: 2px; }
.ps-row { display: flex; justify-content: space-between; gap: 8px; }
.ps-ok { color: var(--good, #3fc28a); font-weight: 700; }
.ps-fail { color: var(--bad, #ff5d6c); font-weight: 700; }

/* Gestão → Jobs */
.jb-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.jb-head { display: flex; align-items: flex-start; gap: 12px; }
.jb-head > div { flex: 1; min-width: 0; }
.jb-head h3 { margin: 0; }
.jb-head p { margin: 2px 0 0; font-size: 13px; }
.jb-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.jb-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.jb-kpis > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.jb-kpis small { font-size: 11.5px; font-weight: 600; }
.jb-kpis b { font-size: 15px; font-variant-numeric: tabular-nums; }
.jb-kpis b .muted { font-weight: 500; font-size: 12.5px; }
.jb-bad { color: var(--bad, #ff5d6c); }
.jb-last { margin: 12px 0 0; font-size: 13px; }
.jb-days { margin-top: 12px; }
.jb-days summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.jb-table { display: grid; gap: 2px; margin-top: 8px; font-size: 13px; }
.jb-tr { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 8px; padding: 6px 8px; border-radius: 8px; }
.jb-tr:nth-child(odd):not(.jb-th) { background: var(--surface-2); }
.jb-th { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.jb-tr > span:first-child { text-transform: capitalize; }
.jb-runs { display: grid; gap: 4px; }
.jb-run { display: grid; grid-template-columns: auto 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.jb-run.err { border: 1px solid color-mix(in srgb, var(--bad, #ff5d6c) 50%, transparent); }
.jb-run > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .jb-run { grid-template-columns: auto minmax(0, 1fr) auto; } .jb-run > .muted:nth-child(3) { grid-column: 1 / -1; white-space: normal; } .jb-tr { grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); font-size: 12px; } }
.jb-kpis { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }

/* Ficha do aluno → Aulas */
.au-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.au-score-top { display: flex; align-items: center; gap: 16px; }
.au-score-top h3 { margin: 2px 0 4px; }
.au-score-top p { margin: 0; font-size: 13px; }
.au-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.au-score .mood-ring b { font-size: 24px; }
.au-rows { display: grid; gap: 10px; margin: 16px 0 12px; }
.au-row { display: grid; grid-template-columns: 96px auto minmax(0, 1fr); grid-template-areas: "l v bar" ". s s"; align-items: center; column-gap: 10px; row-gap: 2px; font-size: 13.5px; }
.au-row > span:first-child { grid-area: l; color: var(--muted); font-weight: 600; }
.au-row > b { grid-area: v; white-space: nowrap; }
.au-row > .au-bar { grid-area: bar; }
.au-row > small { grid-area: s; font-size: 12px; }
.au-bar { display: block; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.au-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.au-bar.freq i { background: #2f9be0; }
.au-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.au-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.au-chip b { color: var(--text); font-size: 13.5px; }
.au-chip.good b { color: var(--good, #3fc28a); } .au-chip.bad b { color: var(--bad, #ff5d6c); } .au-chip.warn b { color: #ffb547; }
.au-sched h3, .au-list h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.au-sched > p { margin: 0 0 12px; font-size: 13px; }
.au-per { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.au-step { display: flex; align-items: center; gap: 10px; }
.au-step b { min-width: 22px; text-align: center; font-size: 18px; }
.au-step .icon-btn { width: 34px; height: 34px; font-size: 18px; font-weight: 700; }
.au-slots { display: grid; gap: 8px; }
.au-slot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.au-slot .input { padding: 9px 10px; font-size: 14px; min-width: 0; }
.au-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.au-note { margin: 10px 0 0; font-size: 12.5px; }
.au-list { margin-bottom: 14px; }
.au-list-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.au-list-h .au-acts { margin: 0; }
.au-ev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.au-list h3 + .au-ev, .au-list-h + .au-ev, .au-list p + .au-ev { border-top: 0; }
.au-ev-main { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "k w" "k s"; column-gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.au-ev-main b { grid-area: w; font-size: 14px; text-transform: capitalize; }
.au-ev-main small { grid-area: s; font-size: 12px; }
.au-ev-k { grid-area: k; padding: 4px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); white-space: nowrap; }
.au-ev-k.extra { background: color-mix(in srgb, #2f9be0 18%, transparent); color: #2f9be0; }
.au-ev-k.compensacao { background: color-mix(in srgb, #ffb547 18%, transparent); color: #ffb547; }
.au-ev.cancelled .au-ev-main b { text-decoration: line-through; color: var(--muted); }
.au-tag { font-size: 12px; color: var(--muted); }
.au-att, .att-seg { display: flex; gap: 4px; flex: none; }
.att-b { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.att-b.present.on { background: color-mix(in srgb, var(--good, #3fc28a) 22%, var(--surface-2)); border-color: var(--good, #3fc28a); color: var(--text); }
.att-b.absent.on { background: color-mix(in srgb, var(--bad, #ff5d6c) 22%, var(--surface-2)); border-color: var(--bad, #ff5d6c); color: var(--text); }
.att-b.cancelled.on { background: var(--surface); border-color: var(--muted); color: var(--text); }
@media (max-width: 640px) {
  .au-att .att-b span { display: none; } .au-att .att-b { padding: 8px; }
  .au-row { grid-template-columns: 84px auto minmax(0, 1fr); }
}
.au-score-top h3 { display: block; }
.au-score-top h3 small { font-size: 13px; font-weight: 600; }
.au-score-top > div { min-width: 0; }

.au-slot { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, .9fr) auto; }
.au-slot .input { padding: 9px 8px; }
/* treino: data (registar um treino de outro dia) */
.ws-date-row { display: flex; gap: 8px; align-items: center; }
.ws-date-row .input { flex: 1; min-width: 0; width: 100%; max-width: none; font-size: 16px; }
.ws-date-row .btn { flex: none; }
.ws-date small { display: block; margin-top: 4px; font-size: 12.5px; }
.sh-past { color: var(--accent); font-weight: 700; }
/* ficha → Treinos: aulas por cima, treinos registados por baixo */
.ct-sec { margin: 22px 0 12px; font-size: 19px; letter-spacing: -.02em; }
/* fim do treino: auto-avaliação */
.feel-box { width: 100%; display: grid; gap: 6px; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, #8b7cff 40%, var(--line)); background: color-mix(in srgb, #8b7cff 10%, var(--surface)); }
.feel-box > b { font-size: 15px; }
.feel-box > span { font-size: 13px; }
.feel-faces { margin-top: 4px; }
.mood-train { margin: 8px 0 0; font-size: 12.5px; }

/* fim do treino (app do aluno): sem deslizar — resumo, mostrador de intensidade, como te sentiste */
.rate-modal { overflow: hidden; padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); }
.rate { display: grid; gap: 12px; }
.rate.shake { animation: rateShake .35s; }
@keyframes rateShake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.rate-head { display: flex; align-items: center; gap: 12px; }
.rate-head h2 { margin: 0; font-size: 21px; }
.rate-head p { margin: 2px 0 0; font-size: 13px; }
.rate-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--accent); color: #0b0d0a; }
.rate-dial { display: grid; place-items: center; }
.eff { --eff: #b39bff; position: relative; width: min(232px, 64vw); aspect-ratio: 1; border-radius: 50%; outline: none; touch-action: none;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--eff) 30%, transparent), color-mix(in srgb, var(--eff) 8%, transparent) 62%, transparent 72%); transition: background .3s; }
.eff:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); }
.eff svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.eff-track { fill: none; stroke: color-mix(in srgb, var(--text) 10%, transparent); stroke-width: 22; stroke-linecap: round; }
.eff-fill { fill: none; stroke: url(#effG); stroke-width: 22; stroke-linecap: round; transition: d .15s; }
.eff-dot { fill: color-mix(in srgb, var(--text) 45%, transparent); }
.eff-dot.mid { fill: color-mix(in srgb, var(--text) 25%, transparent); }
.eff-knob .k1 { fill: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.eff-knob { transition: transform .15s; }
.eff-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; gap: 4px; padding: 0 22%; }
.eff-c span { font-size: 13px; color: var(--muted); line-height: 1.2; }
.eff-c b { font-size: clamp(20px, 6.4vw, 26px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.eff-ok { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, #6d7cff 75%, var(--surface)); color: #fff; box-shadow: 0 6px 18px -6px #6d7cff; }
.eff.ok .eff-ok { background: var(--good, #3fc28a); }
.rate-feel { display: grid; gap: 6px; }
.rate-feel > b { font-size: 15px; }
.rate-feel > small { font-size: 12px; }
.rate-feel .mood-faces button { padding: 6px 2px 5px; }
.rate-feel .mood-faces button span { font-size: 22px; }
.rate-hint { margin: -4px 0 0; text-align: center; font-size: 12.5px; }
.rate-done:disabled { opacity: .45; }
@media (max-height: 700px) { .eff { width: min(196px, 56vw); } .rate { gap: 9px; } }
/* treinos registados: auto-avaliação do aluno */
.wk-rate { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wk-rate span { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.wk-eff.e1 { color: #8fb0ff; } .wk-eff.e2 { color: #b39bff; } .wk-eff.e3 { color: #f4c09c; } .wk-eff.e4 { color: #ff9a5c; } .wk-eff.e5 { color: #ff5d4d; }
.rate-sum { padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); }
.rate-sum .rate { justify-items: stretch; }
.rate-sum .rate > :not(.rate-head):not(.mini-kpis):not(.btn):not(p) { justify-self: center; }
/* Terminar o treino: manter carregado (o botão enche-se) */
.hold-btn { position: relative; overflow: hidden; isolation: isolate; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; --hold: 0; }
.hold-btn .hold-fill { position: absolute; inset: 0; z-index: -1; transform-origin: left center; transform: scaleX(var(--hold)); background: color-mix(in srgb, #0b0d0a 28%, transparent); }
.hold-btn .hold-txt { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.hold-btn.holding { transform: scale(.98); }
.hold-btn.held { background: var(--good, #3fc28a); }
.hold-btn.hold-nudge { animation: rateShake .35s; }
.session-finish.hold-btn::after { content: 'Mantém carregado para terminar'; position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10px; font-weight: 600; opacity: .6; letter-spacing: .02em; }
.session-finish.hold-btn { padding-bottom: 16px; }
.hold-btn:disabled { opacity: .45; }
.session-finish.no-sets::after { content: 'Regista pelo menos uma série para terminar'; }

/* marca: "pulse" com a bolinha a respirar e "coach" mais pequeno ao lado, na mesma linha de base */
.logo { align-items: baseline; }
.logo-dot { align-self: center; animation: breathe 2.4s ease-in-out infinite; }
.logo-sub { font-size: .6em; font-weight: 650; letter-spacing: .01em; margin-left: .2em; color: #c6ff3d; }
/* "pulse" na cor do texto (branco no tema escuro, como na abertura) e "coach" a verde; no tema claro o verde mais escuro, para se ler */
:root[data-theme="light"] .logo-sub { color: var(--muscle); }
.logo > .nl { display: inline-flex; align-items: baseline; }
.side-collapsed .logo-sub { display: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }
@media (prefers-reduced-motion: reduce) { .logo-dot, .logo-dot::after { animation: none; } }
.logo > .logo-sub { margin-left: calc(-9px + .2em); }

/* ---------- app iPhone (Capacitor): topo por baixo da barra de estado, abertura e boas-vindas ---------- */
.native .topbar { padding-top: calc(env(safe-area-inset-top) + 8px); }
.native .p-top, .native .mobile-top { padding-top: max(10px, env(safe-area-inset-top)); }
.app-splash { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .6s ease;
  background: #0b0d0a; color: #fff; transition: opacity .5s ease; }
.app-splash.out { opacity: 0; pointer-events: none; }
.app-splash .as-mark { animation: as-breathe 1.5s ease-in-out infinite; filter: drop-shadow(0 0 0 rgba(198, 255, 61, 0)); }
.app-splash .as-dot { transform-origin: 50px 50px; animation: as-dot 1.5s ease-in-out infinite; }
.app-splash .as-name { font-weight: 800; font-size: 34px; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 6px; animation: as-in .7s ease both .2s; }
.app-splash .as-name small { font-size: .6em; font-weight: 600; color: #c6ff3d; }
@keyframes as-breathe { 0%, 100% { transform: scale(.92); filter: drop-shadow(0 0 0 rgba(198, 255, 61, 0)); } 50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(198, 255, 61, .45)); } }
@keyframes as-dot { 0%, 100% { transform: scale(.85); } 50% { transform: scale(1.12); } }
@keyframes as-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app-splash .as-mark, .app-splash .as-dot { animation: none; } }
.welcome-app { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.welcome-app .wa-hero h1 { font-size: clamp(28px, 8vw, 38px); line-height: 1.08; letter-spacing: -.03em; margin: 12px 0 8px; }
.welcome-app .wa-hero p { margin: 0; font-size: 16px; }
.welcome-app .wa-code { height: 52px; }
.welcome-app .wa-h { font-size: 20px; margin: 14px 0 0; }
.welcome-app .wa-note { margin: -8px 0 0; font-size: 14px; }
.welcome-app .wa-plans { grid-template-columns: 1fr; max-width: none; }
.welcome-app .plan { padding: 22px; gap: 14px; }

/* ---------- barra de baixo encostada ao fundo do telemóvel (só a distância da barra de "casa" do iPhone) ---------- */
@media (max-width: 900px) {
  .tabbar { bottom: max(18px, calc(env(safe-area-inset-bottom) - 4px)); }
  .rest-pill { bottom: calc(92px + max(18px, calc(env(safe-area-inset-bottom) - 4px))); }
}
/* ---------- descanso entre séries: laranja, com sombras suaves ---------- */
.rest-pill:not(.over):not(.go) {
  background: linear-gradient(135deg, #ffa24a 0%, #ff7a1a 55%, #f25c05 100%); color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 14px 34px -8px rgba(242, 92, 5, .55), 0 4px 12px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 6px rgba(160, 50, 0, .25);
}
.rest-pill:not(.over):not(.go) b { color: #fff; text-shadow: 0 1px 2px rgba(120, 40, 0, .35); }
.rest-pill:not(.over):not(.go) .chip { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .38); box-shadow: 0 1px 3px rgba(120, 40, 0, .25); }
.rest-pill:not(.over):not(.go) .chip:active { background: rgba(255, 255, 255, .28); }
