/* ============================================================
   BodyCoach — design system "Performance Lab" v2
   Dark premium · glass surfaces · lime/blue duotone
   ============================================================ */

:root {
  --bg: #070708;
  --surface: rgba(21, 24, 31, .82);
  --surface-solid: #14171d;
  --surface-2: #1a1e26;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .13);
  --text: #eef0f4;
  --muted: #8b92a3;
  --faint: #5b6172;
  --accent: #c4a574;
  --accent-2: #c4a574;
  --blue: #5ea2ff;
  --red: #ff6b6b;
  --amber: #f5b942;
  --grad-accent: linear-gradient(135deg, #d9bd8e 0%, #c4a574 40%, #a8845c 100%);
  --glow-lime: 0 0 24px rgba(196, 165, 116, .18), 0 8px 28px rgba(0, 0, 0, .45);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Archivo Narrow", "Arial Narrow", "Instrument Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(196, 165, 116, .07), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(94, 162, 255, .06), transparent 55%),
    radial-gradient(700px 500px at 60% 110%, rgba(122, 107, 255, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(196, 165, 116, .25); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262b35; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333a48; }

/* ---------------- nav ---------------- */

nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 42px);
  background: rgba(10, 12, 16, .72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em;
  text-decoration: none;
  background: linear-gradient(100deg, #eef0f4 20%, var(--accent) 75%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.logo:hover { text-decoration: none; filter: brightness(1.1); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }

.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem;
  padding: 7px 14px; border-radius: 999px;
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); text-decoration: none; }
.nav-links a:active { transform: translateY(1px); }

.who {
  font-size: .8rem; font-weight: 700; color: var(--accent);
  padding: 6px 13px; border-radius: 999px;
  background: rgba(196, 165, 116, .08);
  border: 1px solid rgba(196, 165, 116, .22);
  text-transform: lowercase; letter-spacing: .02em;
}

/* ---------------- layout ---------------- */

main {
  max-width: 1060px; margin: 0 auto;
  padding: clamp(18px, 3.5vw, 34px) clamp(14px, 3.5vw, 28px) 70px;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
}

h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.025em; margin: 0 0 6px;  font-family: var(--font-display); letter-spacing: -.01em; }
h2 { font-size: 1.02rem; font-weight: 750; letter-spacing: -.015em; margin: 0 0 10px; color: #dfe3ea;  font-family: var(--font-display); }
.sub { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.section-gap { margin-top: 22px; }

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* ---------------- buttons & forms ---------------- */

button {
  font-family: inherit; font-size: .92rem; font-weight: 700; color: #10130a;
  background: var(--grad-accent);
  border: none; border-radius: 12px; padding: 10px 20px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(196, 165, 116, .16);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
button:hover { filter: brightness(1.06); box-shadow: var(--glow-lime); transform: translateY(-1px); }
button:active { transform: translateY(1px); box-shadow: none; }
button:disabled { filter: grayscale(.7) brightness(.7); cursor: wait; transform: none; }

button.danger {
  background: rgba(255, 107, 107, .1); color: var(--red);
  border: 1px solid rgba(255, 107, 107, .3); box-shadow: none;
  font-size: .78rem; padding: 5px 12px;
}
button.danger:hover { background: rgba(255, 107, 107, .18); box-shadow: none; transform: none; }

button.ghost, .edit-row button.ghost {
  background: rgba(255, 255, 255, .05); color: var(--muted);
  border: 1px solid var(--line-strong); box-shadow: none;
}
button.ghost:hover { box-shadow: none; transform: none; background: rgba(255, 255, 255, .09); }

button.linklike {
  background: none; border: none; box-shadow: none; color: var(--muted);
  font-weight: 600; padding: 7px 14px; font-size: .9rem;
}
button.linklike:hover { color: var(--red); background: rgba(255, 107, 107, .07); box-shadow: none; transform: none; }

form.inline { display: inline; margin: 0; }

label {
  display: block; font-size: .74rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin: 14px 0 6px;
}

input, textarea, select {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--text);
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, textarea:focus {
  border-color: rgba(196, 165, 116, .55);
  box-shadow: 0 0 0 3px rgba(196, 165, 116, .12);
  background: rgba(0, 0, 0, .42);
}
textarea { resize: vertical; min-height: 64px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.flash { padding: 10px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin: 12px 0; }
.flash.err { background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .3); color: #ffb3b3; }

/* ---------------- auth ---------------- */

.auth-wrap { display: flex; justify-content: center; padding-top: clamp(30px, 9vh, 90px); }
.auth-card { width: min(400px, 100%); text-align: center; padding: 40px 34px; position: relative; overflow: hidden; }
.auth-card::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 60%;
  background: radial-gradient(50% 60% at 50% 0%, rgba(196, 165, 116, .12), transparent);
  pointer-events: none;
}
.logo-big {
  width: 72px; height: 72px; margin: 0 auto 14px; display: grid; place-items: center;
  font-size: 2rem; border-radius: 22px;
  background: var(--grad-accent);
  box-shadow: var(--glow-lime);
}
.auth-card h1 { font-size: 1.6rem; }
.auth-card > p { color: var(--muted); margin: 2px 0 8px; }
.auth-alt { margin-top: 20px; font-size: .86rem; color: var(--muted); }
.auth-alt a { font-weight: 700; }

/* ---------------- chips (resumo do perfil) ---------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: .84rem; color: #cfd4dd;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip b { color: var(--text); }
.chip a { color: inherit; text-decoration: none; font-weight: 600; }
.chip a:hover { color: var(--accent); text-decoration: none; }

/* ---------------- chat ---------------- */

.chat-shell { display: flex; flex-direction: column; padding: 0; overflow: hidden; }

.chat-stream {
  min-height: 300px; max-height: 62vh; overflow-y: auto;
  padding: 22px clamp(14px, 2.5vw, 24px);
  display: flex; flex-direction: column; gap: 18px;
}

.msg { display: flex; gap: 12px; max-width: 92%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }

.avatar {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.05rem;
  background: var(--surface-2); border: 1px solid var(--line-strong);
}
.msg:not(.me) .avatar {
  background: linear-gradient(140deg, rgba(196, 165, 116, .18), rgba(94, 162, 255, .12));
  border-color: rgba(196, 165, 116, .3);
}

.bubble {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  padding: 12px 16px 9px;
  min-width: 0;
}
.msg.me .bubble {
  background: linear-gradient(140deg, rgba(196, 165, 116, .13), rgba(196, 165, 116, .05));
  border-color: rgba(196, 165, 116, .22);
  border-radius: 16px 16px 6px 16px;
}

.msg-body { overflow-wrap: anywhere; font-size: .95rem; }
.msg-body p { margin: 0 0 9px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body h1, .msg-body h2, .msg-body h3 { font-size: 1.02rem; margin: 12px 0 6px; }
.msg-body ul, .msg-body ol { margin: 6px 0 9px; padding-left: 22px; }
.msg-body table { border-collapse: collapse; margin: 10px 0; font-size: .85rem; display: block; overflow-x: auto; }
.msg-body th, .msg-body td { border: 1px solid var(--line-strong); padding: 6px 11px; text-align: left; }
.msg-body th { background: rgba(255, 255, 255, .05); }
.msg-body code { background: rgba(0, 0, 0, .35); border-radius: 6px; padding: 1.5px 6px; font-size: .85em; }
.msg-body pre { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.msg-body blockquote { border-left: 3px solid rgba(196, 165, 116, .4); margin: 8px 0; padding: 2px 0 2px 12px; color: var(--muted); }

.when { display: block; text-align: right; font-size: .68rem; color: var(--faint); margin-top: 6px; }

.msg-actions { margin-top: 4px; }
.edit-btn {
  background: none; border: none; box-shadow: none; color: var(--faint);
  font-size: .74rem; font-weight: 700; padding: 2px 4px; cursor: pointer;
}
.edit-btn:hover { color: var(--accent); box-shadow: none; transform: none; }

.edit-area { margin-bottom: 8px; }
.edit-area textarea { min-height: 70px; margin-bottom: 8px; }
.edit-row { display: flex; gap: 8px; }
.edit-row button { font-size: .8rem; padding: 8px 16px; }

/* reasoning */
details.reason {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(94, 162, 255, .5);
  background: rgba(94, 162, 255, .05);
  border-radius: 10px; overflow: hidden;
}
details.reason summary {
  cursor: pointer; padding: 7px 12px; font-size: .78rem; font-weight: 700;
  color: var(--blue); list-style: none; user-select: none;
}
details.reason summary::before { content: "▸ "; }
details.reason[open] summary::before { content: "▾ "; }
.reason-body {
  padding: 4px 14px 12px; font-size: .8rem; color: var(--muted);
  white-space: pre-wrap; max-height: 220px; overflow-y: auto;
}

/* queue + anexos */
.queue-bar, .attach-bar { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 16px 0; }
.queue-item, .attach-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(94, 162, 255, .09); border: 1px solid rgba(94, 162, 255, .3);
  color: #bcd2f5; border-radius: 999px; padding: 4px 12px; font-size: .78rem;
  max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.attach-chip { background: rgba(196, 165, 116, .08); border-color: rgba(196, 165, 116, .3); color: #e6d9c2; }
.attach-chip.uploading { opacity: .55; }
.queue-x, .attach-x {
  background: none; border: none; box-shadow: none; color: inherit;
  font-size: .72rem; padding: 0 2px; opacity: .7; cursor: pointer;
}
.queue-x:hover, .attach-x:hover { color: var(--red); opacity: 1; box-shadow: none; transform: none; }

.composer {
  display: flex; align-items: stretch; gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
}
.composer textarea {
  flex: 1; min-height: 48px; max-height: 140px;
  border-radius: 14px; background: rgba(0, 0, 0, .32);
}
.attach-btn {
  align-self: stretch; padding: 0 15px; font-size: 1.15rem;
  background: rgba(255, 255, 255, .05); color: var(--muted);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.attach-btn:hover { background: rgba(196, 165, 116, .1); color: var(--accent); box-shadow: none; transform: none; }
.composer button[type="submit"] { align-self: stretch; padding: 0 22px; }

.msg-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.msg-att {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .05); color: #cfd4dd; text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 11px; font-size: .76rem;
  max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-att:hover { border-color: rgba(196, 165, 116, .4); color: var(--accent); text-decoration: none; }

.hint { padding: 9px 16px 13px; font-size: .74rem; color: var(--faint); text-align: center; }

/* ---------------- cockpit de exames ---------------- */

.cockpit-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 6px; }
.ck-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 15px;
  display: flex; flex-direction: column; gap: 3px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.ck-card::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 78px; height: 78px;
  background: radial-gradient(closest-side, rgba(196, 165, 116, .13), transparent); border-radius: 50%;
}
.ck-card.ck-alert::after { background: radial-gradient(closest-side, rgba(255, 107, 107, .16), transparent); }
.ck-num {
  font-size: 2rem; font-weight: 800; font-family: var(--font-display); letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ck-card.ck-alert .ck-num {
  background: linear-gradient(135deg, #ff9a8a, var(--red));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ck-num.ck-date { font-size: 1.2rem; padding-top: 8px; }
.ck-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

.fora-card { border-color: rgba(255, 107, 107, .28); }
.fora-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fora-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm); padding: 11px 15px; font-size: .92rem;
  transition: background .18s;
}
.fora-item:hover { background: rgba(0, 0, 0, .32); }
.fora-item.alto { border-left-color: var(--red); }
.fora-item.baixo { border-left-color: var(--amber); }
.fora-item.sref { border-left-color: var(--faint); }
.fora-valor { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.fora-ref { color: var(--muted); font-size: .78rem; }

.status-pill {
  margin-left: auto; font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  border-radius: 999px; padding: 4px 12px;
  background: #23272f; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.status-pill.ok { background: rgba(196, 165, 116, .12); color: #d4b98c; box-shadow: 0 0 12px rgba(196, 165, 116, .12); }
.status-pill.alto { background: rgba(255, 107, 107, .13); color: #ff8f8f; box-shadow: 0 0 12px rgba(255, 107, 107, .14); }
.status-pill.baixo { background: rgba(245, 185, 66, .13); color: #f8cd7a; box-shadow: 0 0 12px rgba(245, 185, 66, .12); }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 14px; }
.chart-box {
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 16px 11px;
  transition: border-color .2s;
}
.chart-box:hover { border-color: var(--line-strong); }
.chart-title {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-weight: 700; font-size: .9rem; margin-bottom: 10px; letter-spacing: -.01em;
}
.chart-title .status-pill { margin-left: 0; }

/* tabela de exames */
.exam-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 10px; }
.exam-table th {
  text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
}
.exam-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #d5dae2; font-variant-numeric: tabular-nums; }
.exam-table tr:hover td { background: rgba(255, 255, 255, .025); }
.exam-date { color: var(--muted); white-space: nowrap; font-size: .8rem; }

/* painel admin */
.cliente-card { transition: border-color .2s; }
.cliente-card:hover { border-color: var(--line-strong); }
.cliente-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cliente-nome { font-size: 1.06rem; letter-spacing: -.01em; }
.cliente-meta { color: var(--muted); font-size: .8rem; }
details summary { cursor: pointer; padding: 9px 0 3px; color: var(--muted); font-size: .84rem; }
details summary:hover { color: var(--text); }

@media (max-width: 640px) {
  .msg { max-width: 100%; }
  .chat-stream { max-height: 58vh; }
  .ck-num { font-size: 1.5rem; }
  .status-pill { margin-left: 0; }
  nav { gap: 10px; }
  .nav-links a { padding: 7px 10px; font-size: .84rem; }
}

/* ---------------- cockpit interativo: categorias e cards ---------------- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.cat-tab {
  background: rgba(255,255,255,.04); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: all .18s;
}
.cat-tab:hover { color: var(--text); border-color: var(--line-strong); transform: none; box-shadow: none; }
.cat-tab.active {
  background: rgba(196,165,116,.1); color: var(--accent);
  border-color: rgba(196,165,116,.4); box-shadow: 0 0 14px rgba(196,165,116,.1);
}
.cat-count { opacity: .55; font-weight: 600; margin-left: 2px; }

.marker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.marker-card {
  background: rgba(0,0,0,.22); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px 11px; cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  display: flex; flex-direction: column; gap: 7px;
}
.marker-card:hover {
  border-color: rgba(196,165,116,.35); transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.4);
}
.mc-top { display: flex; align-items: center; gap: 7px; font-size: .7rem; color: var(--muted); }
.mc-cat { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.trend { margin-left: auto; font-size: .72rem; font-weight: 800; }
.trend.up { color: #ff8f8f; }
.trend.down { color: #d4b98c; }
.trend.flat { color: var(--faint); }
.mc-nome { font-size: .93rem; letter-spacing: -.01em; }
.spark { width: 100%; height: 44px; display: block; }
.mc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mc-bottom .status-pill { margin-left: 0; }
.mc-n { font-size: .72rem; color: var(--faint); }

.marker-detail {
  margin-top: 18px; background: rgba(0,0,0,.25); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 18px 20px;
}
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-head b { font-size: 1.02rem; }
.detail-close { margin-left: auto; }
.detail-head .status-pill { margin-left: 0; }

/* ---------------- fotos de evolução ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }
input[type="file"] { padding: 9px; }
input[type="file"]::file-selector-button {
  font-family: inherit; font-size: .82rem; font-weight: 700; color: #10130a;
  background: var(--grad-accent); border: none; border-radius: 10px;
  padding: 8px 15px; margin-right: 12px; cursor: pointer;
}

.photo-day { margin-bottom: 26px; }
.photo-day-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.photo-day-head b { font-size: .95rem; }
.photo-peso { color: var(--accent); font-weight: 700; font-size: .86rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo-item { margin: 0; }
.photo-item img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  cursor: zoom-in; transition: transform .2s, border-color .2s;
  background: rgba(0,0,0,.3);
}
.photo-item img:hover { transform: scale(1.02); border-color: rgba(196,165,116,.4); }
.photo-item figcaption { text-align: center; padding: 6px 0 0; }

.compare-pickers { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 16px; }
.compare-pickers select { width: auto; min-width: 180px; }
.compare-arrow { color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.compare-view { display: flex; gap: 16px; flex-wrap: wrap; }
.compare-col { flex: 1; min-width: 240px; }
.compare-date { display: block; text-align: center; color: var(--muted); font-size: .82rem; margin-bottom: 8px; letter-spacing: .04em; }
.compare-col img {
  width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  margin-bottom: 8px; background: rgba(0,0,0,.3);
}

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center; padding: 30px;
  background: rgba(5,6,9,.92); backdrop-filter: blur(10px); cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.6); }

/* ---------------- painel multi-marcador ---------------- */
.panel-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
.range-btns { display: flex; gap: 6px; }
.range-btn, .norm-btn {
  background: rgba(255,255,255,.04); color: var(--muted);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 14px; font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: all .15s; box-shadow: none;
}
.range-btn:hover, .norm-btn:hover { color: var(--text); border-color: var(--line-strong); transform: none; box-shadow: none; }
.range-btn.active, .norm-btn.active {
  background: rgba(196,165,116,.1); color: var(--accent);
  border-color: rgba(196,165,116,.4);
}
.panel-chart-wrap {
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px 12px;
}
.panel-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.legend-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 5px 13px;
  font-size: .78rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.legend-chip:hover { color: var(--text); border-color: var(--line-strong); transform: none; box-shadow: none; }
.legend-chip:not(.on) { opacity: .35; text-decoration: line-through; }
.legend-line { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }


/* ---------------- health cockpit summary (aba exames) ---------------- */
.hc-summary { margin-bottom: 16px; }
.hc-head { display: flex; gap: 26px; flex-wrap: wrap; align-items: stretch; }
.hc-score-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 150px; padding: 8px 18px; border-radius: var(--radius); background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.hc-score { font-size: 3.2rem; font-weight: 800; font-family: var(--font-display); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hc-score.hc-exc { color: #d4b98c; text-shadow: 0 0 26px rgba(126,224,138,.35); }
.hc-score.hc-bom { color: var(--accent); text-shadow: 0 0 26px rgba(196,165,116,.3); }
.hc-score.hc-aten { color: var(--amber); text-shadow: 0 0 26px rgba(245,185,66,.3); }
.hc-score.hc-crit { color: var(--red); text-shadow: 0 0 26px rgba(255,107,107,.35); }
.hc-verdict { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hc-cols { display: flex; gap: 26px; flex-wrap: wrap; flex: 1; }
.hc-col { flex: 1; min-width: 240px; }
.hc-col-title { display: block; font-size: .8rem; margin-bottom: 8px; }
.hc-row { display: flex; align-items: center; gap: 8px; padding: 3.5px 0; font-size: .86rem; color: #cfd4dd; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hc-dot.verde { background: #6fd077; box-shadow: 0 0 8px rgba(111,208,119,.5); }
.hc-dot.ambar { background: var(--amber); box-shadow: 0 0 8px rgba(245,185,66,.5); }
.hc-dot.vermelho { background: var(--red); box-shadow: 0 0 8px rgba(255,107,107,.5); }
.hc-note { margin-left: auto; color: var(--muted); font-size: .76rem; text-align: right; }
.hc-more { color: var(--faint); font-size: .76rem; }


/* ---------------- RangeBar (faixa de referencia) ---------------- */
.rangebar-wrap { margin: 4px 0 14px; }
.rangebar-track {
  position: relative; display: flex; height: 10px; border-radius: 6px; overflow: visible;
  background: #23272f; border: 1px solid var(--line);
}
.rb-seg { height: 100%; }
.rb-seg.rb-lo { background: rgba(245,185,66,.35); border-radius: 5px 0 0 5px; }
.rb-seg.rb-ok { background: rgba(111,208,119,.45); }
.rb-seg.rb-hi { background: rgba(255,107,107,.32); border-radius: 0 5px 5px 0; }
.rb-pointer {
  position: absolute; top: 50%; width: 4px; height: 18px; border-radius: 3px;
  transform: translate(-50%, -50%); box-shadow: 0 0 10px rgba(0,0,0,.6);
}
.rb-okp { background: #7ee08a; }
.rb-bp { background: var(--amber); }
.rb-ap { background: var(--red); }
.rb-labels { display: flex; justify-content: space-between; font-size: .68rem; color: var(--faint); margin-top: 5px; font-variant-numeric: tabular-nums; }
.rangebar.mini { margin-top: 2px; }
.rangebar.mini .rangebar-track { height: 5px; }
.rangebar.mini .rb-pointer { height: 11px; width: 3px; }
.rangebar.mini .rb-labels { display: none; }


/* ---------------- comparador de fotos (slider) ---------------- */
.pcompare { margin-bottom: 18px; }
.pcompare-stage {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line-strong); aspect-ratio: 3/4; max-width: 560px; margin: 0 auto;
  background: #0d0f12;
}
.pcompare-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; user-select: none; pointer-events: none;
  filter: saturate(.96) contrast(1.04);
}
.pcompare-top {
  position: absolute; inset: 0; clip-path: inset(0 50% 0 0);
  border-right: 2px solid var(--accent);
}
.pcompare-top img { position: absolute; }
.pcompare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--accent); transform: translateX(-50%);
  box-shadow: 0 0 16px rgba(0,0,0,.7); pointer-events: none;
}
.pcompare-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #17130c;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.pcompare-handle span::before { content: "⇆"; }
.pcompare-tag {
  position: absolute; bottom: 10px; font-size: .68rem; font-weight: 700;
  background: rgba(7,7,8,.75); border: 1px solid var(--line-strong);
  color: #d9cdb8; padding: 3px 10px; border-radius: 999px; letter-spacing: .05em;
}
.pcompare-tag.left { left: 10px; }
.pcompare-tag.right { right: 10px; }
.pcompare-range {
  margin: 12px auto 0; display: block; max-width: 560px; padding: 0;
  -webkit-appearance: none; appearance: none; height: 4px; border: none; border-radius: 4px;
  background: linear-gradient(90deg, rgba(196,165,116,.25), rgba(196,165,116,.6));
}
.pcompare-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #17130c; cursor: ew-resize;
  box-shadow: 0 0 12px rgba(196,165,116,.5);
}


/* ---------------- health cockpit: stats, score circle, bars, preds ---------------- */
.hc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hc-stat {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; cursor: pointer; transition: border-color .18s, transform .15s; box-shadow: none;
}
.hc-stat:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: none; }
.hc-stat.active { border-color: rgba(196,165,116,.5); }
.hc-stat .n { font-size: 1.7rem; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.hc-stat .n.crit { color: var(--red); }
.hc-stat .n.warn { color: var(--amber); }
.hc-stat .n.good { color: #7ee08a; }
.hc-stat .l { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hc-circle {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 148px; height: 148px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--line-strong); background: rgba(0,0,0,.3);
}
.hc-circle.hc-ok { border-color: rgba(196,165,116,.65); box-shadow: 0 0 30px rgba(196,165,116,.15); }
.hc-circle.hc-aten { border-color: rgba(245,185,66,.6); box-shadow: 0 0 30px rgba(245,185,66,.12); }
.hc-circle.hc-crit { border-color: rgba(255,107,107,.6); box-shadow: 0 0 30px rgba(255,107,107,.14); }
.hc-num { font-size: 2.9rem; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.hc-den { font-size: .8rem; color: var(--faint); }
.hc-verdict { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.hc-bars { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 7px; }
.hc-bar-row { display: flex; align-items: center; gap: 10px; font-size: .82rem; }
.hc-bar-label { width: 170px; color: #cfd4dd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-bar-track { flex: 1; height: 8px; border-radius: 5px; background: rgba(0,0,0,.35); overflow: hidden; }
.hc-bar-fill { height: 100%; border-radius: 5px; transition: width .5s ease; }
.hc-bar-fill.hc-ok { background: #6fd077; }
.hc-bar-fill.hc-aten { background: var(--amber); }
.hc-bar-fill.hc-crit { background: var(--red); }
.hc-bar-val { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.hc-preds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hc-pred {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm); padding: 11px 14px; display: flex; flex-direction: column; gap: 3px;
}
.hc-pred.critical { border-left-color: var(--red); }
.hc-pred-label { font-weight: 700; font-size: .88rem; }
.hc-pred-eta { font-size: .78rem; color: var(--amber); font-weight: 600; }
.hc-pred.critical .hc-pred-eta { color: #ff8f8f; }
.hc-pred-meta { font-size: .72rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.status-pill.atencao { background: rgba(245,185,66,.13); color: #f8cd7a; }
.status-pill.critico { background: rgba(255,107,107,.15); color: #ff8f8f; }

.upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.upload-row input[type="file"] { flex: 1; min-width: 240px; }


/* ---------------- rotina de treinos (semana) ---------------- */
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 18px; }
.day-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.day-head { display: flex; align-items: baseline; justify-content: space-between; }
.day-name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; }
.day-count { font-size: .72rem; color: var(--faint); }
.day-title-form { display: flex; gap: 6px; }
.day-title-form input { padding: 7px 10px; font-size: .84rem; }
button.mini { font-size: .74rem; padding: 6px 12px; border-radius: 9px; }
button.ghost.mini { color: var(--muted); }
.ex-list { display: flex; flex-direction: column; gap: 6px; min-height: 30px; }
.ex-row {
  display: flex; align-items: center; gap: 9px;
  background: rgba(0,0,0,.22); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.ex-row.done .ex-info b { color: var(--faint); text-decoration: line-through; }
.ex-check {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: rgba(255,255,255,.05); border: 1px solid var(--line-strong);
  color: #10130a; font-weight: 800; cursor: pointer; box-shadow: none; padding: 0;
}
.ex-check:hover { border-color: rgba(196,165,116,.5); box-shadow: none; transform: none; }
.ex-check.on { background: var(--grad-accent); border-color: transparent; }
.ex-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-info b { font-size: .9rem; }
.ex-meta { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-empty { font-size: .76rem; padding: 4px 2px; }
.ex-add { display: flex; flex-direction: column; gap: 7px; border-top: 1px dashed var(--line); padding-top: 10px; }
.ex-add input { padding: 8px 10px; font-size: .84rem; }
.ex-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ex-nome { width: 100%; }
.coach-btn {
  margin-top: 6px; background: var(--grad-accent); color: #17130c; font-weight: 700;
  border: none; border-radius: 12px; padding: 11px 18px; cursor: pointer; font-size: .88rem;
}
.coach-btn:hover { box-shadow: var(--glow-lime); }

/* curvas PK (ciclos/TRT) */
.pk-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 14px; }
.pk-chip { font-size: .72rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.02); }
.pk-chip.pk-measure { border-color: rgba(196,165,116,.5); color: var(--gold, #c4a574); }
/* curva TRT gravada pelo coach (PNG estático, cadeada ao registro) */
.pk-figure { margin: 10px 0 0; }
.pk-img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; display: block; }
.pk-figure figcaption { margin-top: 6px; font-size: .78rem; }
.pk-stale { color: #d9a441; font-size: .82rem; margin: 6px 0 0; }
.coach-curve { margin: 10px 0 0; }
