/* Combate Gym — preto de ringue e vermelho combate. Vermelho = ação e disputa; dourado só em medalhas e pódio;
   verde = meta batida; âmbar = atenção. */
:root {
  --bg: #F3F3F1; --panel: #FFFFFF; --panel2: #ECECE8; --ink: #0B0B0D; --muted: #5D6067; --line: #DFDFDA;
  --primary: #D40000; --primary-ink: #FFFFFF; --primary-soft: #FDE7E7; --gold: #FF1F1F; --side: #0B0B0D;
  --danger: #B42318; --danger-soft: #FDE7E4;
  --red: #FF1F1F; --gold-ink: #B00000; --gold-soft: #FFECEC; --hero1: #17171B; --hero2: #0B0B0D;
  --serif: "Archivo Black", "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
  --display: "Archivo Black", "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0B0B0D; --panel: #16161A; --panel2: #1F1F24; --ink: #F2F2F2; --muted: #A3A5AB; --line: #2A2B30;
  --primary: #FF3B3B; --primary-ink: #0B0B0D; --primary-soft: #2C1214; --gold: #FF3B3B; --side: #050506;
  --gold-ink: #FF6B6B; --gold-soft: #2A1416; --hero1: #1A1A1F; --hero2: #050506;
}


.page { min-width: 0; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 11.5px; line-height: 1.45; color: rgba(243, 236, 224, .55); }
.side-foot p { margin: 0; }
.hello { white-space: nowrap; }

/* Chip de nível no topo */
.level-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; font-size: 13px; text-decoration: none; border: 1px solid rgba(201, 164, 92, .45); }
.level-chip:hover { text-decoration: none; filter: brightness(1.03); }
.level-chip .lv { background: linear-gradient(135deg, #a67c2e, #e8cf94); color: #3a0a0e; border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.level-chip .lv-pts { color: var(--muted); font-weight: 500; }
@media (max-width: 600px) { .level-chip .lv-name { display: none; } }

/* Barra de progresso */
.bar { flex: 1; }
.bar.gold > span { background: linear-gradient(90deg, #a67c2e, #e8cf94); }
.bar.ok > span { background: var(--ok); }
.bar.water > span { background: #3d8bd4; transition: width .3s; }
.bar.water.done > span { background: var(--ok); }

/* Anel de nível */
.ring-wrap { position: relative; flex: none; }
.ring { display: block; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 8; }
.ring-fg { fill: none; stroke: #e1c27f; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .8s ease-out; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.ring-label strong { font-family: var(--serif); font-size: 22px; }
.ring-label span { font-size: 11px; opacity: .85; max-width: 74px; }

/* Herói do painel */
.hero { position: relative; overflow: hidden; border-radius: 14px; padding: 22px 24px; color: #f4e9d6;
  background: radial-gradient(600px 300px at 90% 0%, rgba(201, 164, 92, .25), transparent 60%), linear-gradient(140deg, var(--hero1), var(--hero2));
  box-shadow: 0 10px 30px rgba(60, 5, 10, .25); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 28px; align-items: center; }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border: 1px solid rgba(201, 164, 92, .25); transform: rotate(45deg); pointer-events: none; }
.hero-main { display: flex; gap: 18px; align-items: center; min-width: 0; }
.hero-text { min-width: 0; flex: 1; }
.hero-hello { font-size: 14px; color: #e8cf94; }
.hero-pts { font-family: var(--serif); font-size: 34px; line-height: 1.1; font-weight: 600; }
.hero-pts span { font-size: 42px; }
.hero-next { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; color: rgba(244, 233, 214, .8); }
.hero-next .bar { background: rgba(255, 255, 255, .15); flex: none; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; position: relative; z-index: 1; }
.hs { background: rgba(255, 255, 255, .07); border: 1px solid rgba(232, 207, 148, .18); border-radius: 10px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.hs-v { font-family: var(--serif); font-size: 24px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-variant-numeric: tabular-nums; }
.hs-l { font-size: 11.5px; color: rgba(244, 233, 214, .75); line-height: 1.25; }
.hs.flame .icon { width: 20px; height: 20px; color: rgba(255, 255, 255, .45); }
.hs.flame.hot .icon { color: #ff9a3c; fill: rgba(255, 154, 60, .35); animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.hero-foot { grid-column: 1 / -1; color: #e8cf94; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 18px; } .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-pts span { font-size: 34px; } }

/* Primeiros passos */
.onboarding { border-color: rgba(201, 164, 92, .6); background: linear-gradient(180deg, var(--gold-soft), var(--panel) 70%); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 10px; }
.steps .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gold); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.steps li.done { color: var(--muted); text-decoration: line-through; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps a { font-weight: 600; }

/* Diário: formulário */
.habit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.habit-form > .row:last-child { grid-column: 1 / -1; }
.habit-form.compact { gap: 10px; }
.hb { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); min-width: 0; }
.hb-head { display: flex; align-items: center; gap: 6px; }
.hb-head .icon { color: var(--gold-ink); width: 16px; height: 16px; }
.hb-head .muted { margin-left: auto; }
.hb input[type="number"] { max-width: 140px; }
.hb .field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--muted); }
.hb .field.mini input { width: 90px; }
.hb .trained-extra { gap: 8px; }
.check.pill { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check.pill:has(input:checked) { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.seg button { border: 0; background: var(--panel); padding: 6px 12px; cursor: pointer; font-weight: 600; min-width: 38px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--primary); color: var(--primary-ink); }
.seg.mood button { font-size: 18px; padding: 4px 9px; }
.seg.mood button.on { background: var(--gold-soft); }
@media (max-width: 700px) { .habit-form { grid-template-columns: minmax(0, 1fr); } }

/* Semana em pontos */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.wd:hover { text-decoration: none; border-color: var(--gold); }
.wd.today { border-color: var(--primary); box-shadow: inset 0 2px 0 var(--primary); }
.wd-dow { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.wd-dot { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
  background: conic-gradient(#c9a45c calc(var(--fill, 0) * 360deg), var(--panel2) 0); }
.wd:not(.on) .wd-dot { background: var(--panel2); }
.wd-pts { font-size: 12px; font-weight: 700; }

/* Calendário do diário */
.hcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hdow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 2px; }
.hcell { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; min-width: 0; }
.hcell.empty { border: 0; background: none; cursor: default; }
.hcell.on { background: color-mix(in srgb, #c9a45c calc(var(--fill, 0) * 75%), var(--panel)); border-color: rgba(201, 164, 92, .6); }
.hcell.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.hcell.future, .hcell:disabled { opacity: .45; cursor: default; }
.hcell:not(:disabled):hover { border-color: var(--primary); }
.hnum { font-size: 12px; color: var(--muted); }
.hcell.on .hnum { color: var(--ink); }
.hpts { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1; }
.htr { position: absolute; top: 2px; right: 4px; font-size: 10px; }
@media (max-width: 520px) { .hpts { font-size: 14px; } .hcal { gap: 3px; } .hcell { border-radius: 7px; } }
ul.legend { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }

/* Missões */
.mission { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.mission:last-child { border-bottom: 0; }
.mission .m-title { font-weight: 500; }
.mission.done .m-title { color: var(--ok); font-weight: 600; }

/* Evolução */
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-kpis > div { display: flex; flex-direction: column; gap: 1px; background: var(--panel2); border-radius: 8px; padding: 8px 10px; }
.mini-kpis strong { font-family: var(--serif); font-size: 19px; font-variant-numeric: tabular-nums; }
.delta { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Gráfico */
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .08; }
.chart .dot { fill: var(--panel); stroke-width: 2.5; }
.chart .dot.pending { stroke-dasharray: 2 2; fill: var(--panel2); }
.chart .goal { stroke: var(--ok); stroke-dasharray: 5 4; }
.chart .goal-t { fill: var(--ok); }

/* Foco / análise */
.focus { border-left: 4px solid var(--warn); padding: 8px 10px; background: var(--warn-soft); border-radius: 0 8px 8px 0; margin-bottom: 8px; }
.focus.alerta { border-left-color: var(--danger); background: var(--danger-soft); }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.an-item { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.an-item.ok { border-top-color: var(--ok); } .an-item.atencao { border-top-color: var(--warn); } .an-item.alerta { border-top-color: var(--danger); }
.an-title { font-weight: 600; }
.an-value { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.an-item p { margin: 4px 0 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pg { background: var(--gold-soft); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.pg-v { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold-ink); line-height: 1.1; }
.pg-l { font-weight: 600; font-size: 13px; }
.pg-s { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ai-note { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; font-size: 14px; }
input.found, select.found { border-color: #c9a45c; background: var(--gold-soft); box-shadow: 0 0 0 2px rgba(201, 164, 92, .25); }

/* Importação */
.importing { text-align: center; padding: 10px 0; }
.spin { width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 50%; border: 4px solid var(--panel2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details.how summary { cursor: pointer; }
details.how ul { margin: 10px 0; padding-left: 18px; display: grid; gap: 4px; }

/* Medalhas */
.medal-row { display: flex; flex-wrap: wrap; gap: 6px; }
.medal-mini { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: radial-gradient(circle at 35% 30%, #fff6dc, #e8cf94 45%, #a67c2e); box-shadow: 0 2px 6px rgba(120, 80, 20, .3); }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.medal { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.medal .medal-ico { width: 52px; height: 52px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; background: var(--panel2); }
.medal.earned { border-color: rgba(201, 164, 92, .6); }
.medal.earned .medal-ico { background: radial-gradient(circle at 35% 30%, #fff6dc, #e8cf94 45%, #a67c2e); box-shadow: 0 3px 10px rgba(120, 80, 20, .35); }
.medal.locked .medal-ico { filter: grayscale(1); opacity: .45; }
.medal.locked strong { color: var(--muted); }
.medal.big { border: 0; padding: 6px 0; }
.medal.big .medal-ico { width: 72px; height: 72px; font-size: 36px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.celebrate { display: flex; flex-direction: column; gap: 10px; }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.lvl { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.lvl-n { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--muted); }
.lvl-name { font-weight: 600; font-size: 13px; }
.lvl-pts { font-size: 12px; color: var(--muted); }
.lvl.past { background: var(--gold-soft); border-color: rgba(201, 164, 92, .5); }
.lvl.past .lvl-n { color: var(--gold-ink); }
.lvl.cur { background: linear-gradient(135deg, #a67c2e, #e8cf94); border-color: #a67c2e; color: #3a0a0e; box-shadow: 0 6px 16px rgba(166, 124, 46, .35); }
.lvl.cur .lvl-n, .lvl.cur .lvl-pts { color: #3a0a0e; }

/* Ranking */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 6px 0 18px; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; text-align: center; }
.pd-medal { font-size: 26px; }
.pd-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-pts { font-size: 13px; color: var(--muted); }
.pd-step { width: 100%; border-radius: 10px 10px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: #3a0a0e; }
.pd.p1 .pd-step { height: 110px; background: linear-gradient(180deg, #e8cf94, #a67c2e); }
.pd.p2 .pd-step { height: 80px; background: linear-gradient(180deg, #e4e4e4, #a8a8a8); }
.pd.p3 .pd-step { height: 60px; background: linear-gradient(180deg, #e7b98c, #a8693a); }
.pd.me .pd-name { color: var(--primary); }
.podium-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.podium-mini li { display: flex; align-items: center; gap: 10px; }
.pm-pos { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #3a0a0e; }
.pm-pos.p1 { background: #e1c27f; } .pm-pos.p2 { background: #cfcfcf; } .pm-pos.p3 { background: #d9a273; }
@media (max-width: 520px) { .pd { width: 31%; } .pd.p1 .pd-step { height: 90px; } .pd.p2 .pd-step { height: 66px; } .pd.p3 .pd-step { height: 48px; } }

/* Treinos */
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wk { text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 140px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: inherit; color: inherit; }
.wk:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.wk.on { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.wk.off { opacity: .6; }
.wk-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.ex-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.ex-list li::marker { color: var(--gold-ink); font-weight: 700; }
.ex-name { font-weight: 600; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.workout-cta { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.workout-cta:hover { text-decoration: none; border-color: var(--gold); }
.workout-cta > .icon { width: 28px; height: 28px; color: var(--gold-ink); }

/* Academia */
.checkin-todo, .checkin-done { display: flex; gap: 14px; align-items: flex-start; }
.checkin-todo > .icon { width: 44px; height: 44px; color: var(--gold-ink); flex: none; }
.ci-big { width: 54px; height: 54px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: #fff; background: var(--ok); flex: none; }
.checkin-done.warn .ci-big, .ci-big.warn { background: var(--warn); }
.checkin-screen { text-align: center; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.checkin-screen .ci-big { width: 96px; height: 96px; font-size: 50px; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.ph-preview { display: block; max-width: 100%; max-height: 260px; margin: 0 auto 10px; border-radius: 10px; }

/* Fotos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ph { margin: 0; background: var(--panel2); border-radius: 10px; overflow: hidden; }
.ph img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.ph figcaption { padding: 6px 8px; font-size: 13px; text-transform: capitalize; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compare figure { margin: 0; text-align: center; }
.compare img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 10px; background: var(--panel2); }
.ph-empty { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--panel2); border-radius: 10px; color: var(--muted); }
.review-ck img { aspect-ratio: 1 / 1; }

/* Dicas */
.filter-chips { gap: 6px; margin-bottom: 14px; }
.tips { columns: 2 320px; column-gap: 14px; }
.tips .card { break-inside: avoid; margin-bottom: 14px; }
.tip-cat { display: flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-ink); font-weight: 700; margin-bottom: 4px; }
.tip-cat .icon { width: 15px; height: 15px; }
.tip h3 { margin: 2px 0 6px; }
.tip p, .tip-card p { margin: 0 0 6px; font-size: 14px; }
.tip.off { opacity: .6; }
.tip-card { background: linear-gradient(180deg, var(--gold-soft), var(--panel)); border-color: rgba(201, 164, 92, .5); }
.prize { background: linear-gradient(180deg, var(--gold-soft), var(--panel)); }

/* Organização */
.review .rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.review .rv-grid > div { background: var(--panel2); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; }
.review { margin-bottom: 12px; }
.gym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.gym { display: flex; gap: 14px; align-items: flex-start; }
.gym.off { opacity: .6; }
.gym-qr { flex: none; background: #fff; border-radius: 8px; padding: 4px; line-height: 0; }
.gym-qr svg { width: 120px; height: 120px; }
.qr-poster { text-align: center; color: #1d1517; background: #fff; padding: 24px; border-radius: 10px; }
.qr-poster h1 { color: #6b0e14; margin: 6px 0 0; font-size: 28px; }
.qr-poster .qp-logo { width: 240px; max-width: 70%; }
.qr-poster .qp-sub { font-size: 18px; margin: 4px 0 10px; color: #8a6420; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qr-poster svg { width: 320px; height: 320px; max-width: 100%; }
.qr-poster .qp-how { font-size: 16px; margin: 10px 0 4px; }
.qr-poster .qp-gym { font-weight: 700; font-size: 18px; margin: 0; }
@media print {
  body.printing-qr > *:not(.backdrop) { display: none !important; }
  body.printing-qr .backdrop { position: static; background: none; padding: 0; display: block; }
  body.printing-qr .modal { box-shadow: none; border: 0; max-width: none; }
  body.printing-qr .modal-head, body.printing-qr .modal-foot { display: none !important; }
  body.printing-qr .qr-poster svg { width: 12cm; height: 12cm; }
}

/* Termo */
.consent-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #6a0b11 0%, #4a0509 55%, #350306 100%); }
.consent { max-width: 680px; width: 100%; padding: 26px; }
.consent-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.consent-head .icon { width: 40px; height: 40px; color: var(--gold-ink); }
.consent h3 { margin: 16px 0 6px; }
.consent-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.consent-check { margin-top: 14px; padding: 12px; border-radius: 8px; background: var(--gold-soft); font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }

/* Entrada */
.auth-tag { font-weight: 600; }
.auth-sub { font-family: var(--sans); font-size: 15px; font-weight: 400; color: rgba(244, 233, 214, .8); }

/* Confete */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* Barra inferior no celular */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: sticky; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); margin-top: auto; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--muted); text-decoration: none; border-radius: 8px; }
  .bottom-nav a[aria-current] { color: var(--primary); background: var(--primary-soft); }
  .main { min-height: 100vh; min-height: 100dvh; }
  .toasts { bottom: 72px; }
  .hello { display: none; }
}
@media (max-width: 520px) { .page-head .btn { flex: 1; } .gym-grid { grid-template-columns: minmax(0, 1fr); } .gym { flex-direction: column; align-items: center; text-align: center; } .gym .row { justify-content: center; } }
@media (max-width: 1250px) { .diario-grid .habit-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Combate Gym: social ---------- */
.chip.red { background: #FF1F1F; color: #0B0B0D; }
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.feed-wrap { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.feed-list { display: flex; flex-direction: column; gap: 16px; }
.fight-strip { max-width: 620px; margin: 0 auto 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #0B0B0D; color: #EDEDED; border-radius: 16px; padding: 12px 14px; border: 1px solid #26272C; }
.fs-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fs-v { font-family: var(--display); font-weight: 900; font-size: 22px; display: inline-flex; align-items: center; gap: 4px; }
.fs-v .icon { color: #FF5C2C; fill: rgba(255, 92, 44, .35); }
.fs-l { font-size: 12px; color: #A3A5AB; }
.fs-item .bar { background: #26272C; min-width: 120px; }
.fs-cta { margin-left: auto; }
.post { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.pts-pill { background: #0B0B0D; color: #FF3B3B; font-weight: 900; font-size: 13px; border-radius: 999px; padding: 5px 11px; white-space: nowrap; border: 1px solid #2A2B30; }
.post-photo { position: relative; background: #111114; }
.post-photo img { display: block; width: 100%; max-height: 560px; object-fit: cover; aspect-ratio: 4 / 5; }
.post-tags { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 10px; }
.tag.dark { background: rgba(11, 11, 13, .85); color: #fff; }
.tag.red { background: #FF1F1F; color: #0B0B0D; }
.post-workout { padding: 10px 14px 0; color: var(--gold-ink); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.post-workout .icon { width: 16px; height: 16px; }
.post-caption { margin: 8px 14px 0; font-size: 15px; }
.post-comments { margin: 8px 14px 0; display: grid; gap: 3px; }
.post-actions { display: flex; gap: 6px; padding: 8px 8px 10px; }
.react-btn, .comment-btn { min-height: 44px; border: 0; border-radius: 12px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 800; cursor: pointer; background: transparent; color: var(--muted); }
.react-btn:hover, .comment-btn:hover { background: var(--panel2); }
.react-btn.on { background: rgba(255, 31, 31, .14); color: #FF3B3B; }
.react-btn.on .icon { fill: #FF3B3B; }
.react-btn.pop .icon { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.comments-list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow: auto; }
.comment { display: flex; gap: 10px; align-items: flex-start; }

/* Novo check-in */
.ck-grid { align-items: start; }
.selfie { position: relative; border-radius: 20px; overflow: hidden; background: #0B0B0D; min-height: 380px; display: flex; }
.selfie img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.selfie-btn { flex: 1; min-height: 380px; border: 2px dashed #FF1F1F; border-radius: 20px; background: radial-gradient(400px 300px at 50% 40%, rgba(255, 31, 31, .18), transparent 70%), #0B0B0D; color: #EDEDED; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: inherit; cursor: pointer; }
.selfie-btn .icon { width: 56px; height: 56px; color: #FF1F1F; }
.selfie-btn strong { font-family: var(--display); font-style: italic; font-size: 22px; text-transform: uppercase; }
.selfie-redo { position: absolute; right: 12px; bottom: 12px; }
.lbl { font-weight: 700; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; padding: 0 14px; cursor: pointer; }
.chip-btn.on { background: #0B0B0D; color: #FF3B3B; border-color: #FF1F1F; font-weight: 800; }
:root[data-theme="dark"] .chip-btn.on { background: #FF1F1F; color: #0B0B0D; }
.ck-preview { display: flex; align-items: center; gap: 12px; background: var(--panel2); border-radius: 12px; padding: 10px 12px; }
.ck-pts { font-family: var(--display); font-size: 26px; color: var(--gold-ink); }
.warn-t { color: var(--warn); font-weight: 700; }
.btn.big { min-height: 52px; font-family: var(--display); font-style: italic; font-size: 18px; text-transform: uppercase; }
.ck-workout { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }

/* Chat */
.chat-card { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px; max-width: 760px; margin: 0 auto; }
.chat-box { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { position: relative; background: var(--panel2); border-radius: 16px 16px 16px 4px; padding: 8px 12px 6px; }
.msg.mine .bubble { background: #FF1F1F; color: #0B0B0D; border-radius: 16px 16px 4px 16px; }
.who { font-size: 12px; font-weight: 800; color: var(--gold-ink); }
.txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.when { font-size: 11px; opacity: .65; text-align: right; }
.msg-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; display: none; }
.bubble:hover .msg-del, .bubble:focus-within .msg-del { display: block; }
.msg-sys { align-self: center; display: flex; align-items: center; gap: 8px; background: #0B0B0D; color: #EDEDED; border: 1px solid #2A2B30; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; max-width: 90%; }
.msg-sys .icon { color: #FF3B3B; fill: rgba(255, 59, 59, .3); flex: none; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input input { min-height: 44px; }

/* Treinos com imagem do aparelho */
.ex-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ex-card { display: flex; gap: 12px; background: var(--panel2); border-radius: 14px; padding: 10px; align-items: flex-start; }
.ex-img { flex: none; width: 112px; height: 84px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; background: #F2F2F0; cursor: zoom-in; }
.ex-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-img.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: default; background: var(--panel); }
.ex-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ex-name { font-weight: 800; display: flex; gap: 8px; align-items: baseline; }
.ex-n { font-family: var(--display); color: #FF3B3B; }
.ex-big { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #F2F2F0; }
.wk { overflow: hidden; }
.wk-cover { margin: -14px -14px 6px; width: calc(100% + 28px); height: 110px; object-fit: cover; background: #F2F2F0; }
.ed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ed-row { display: flex; gap: 12px; background: var(--panel2); border-radius: 12px; padding: 10px; }
.ed-pic { flex: none; width: 96px; height: 96px; border-radius: 10px; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.ed-pic img { width: 100%; height: 100%; object-fit: cover; }
.ed-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ed-line .grow { flex: 1; min-width: 160px; }
.ed-line .w-day { width: 140px; }
.ed-line .w-s { width: 96px; }
.ed-line select.sm { width: auto; padding: 4px 8px; font-size: 13px; }

/* Times */
.teams { display: flex; flex-direction: column; gap: 10px; }
.team-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.team-row.lead { border-color: #FF1F1F; box-shadow: 0 0 0 1px #FF1F1F inset; }
.team-pos { font-family: var(--display); font-size: 24px; width: 26px; }
.team-badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--display); color: #0B0B0D; font-size: 16px; }
.team-row .bar { margin: 6px 0 4px; }
.team-admin { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.team-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.qp-comp { font-weight: 700; color: #5D6067; }

/* Barra inferior: botão central de check-in */
@media (max-width: 860px) {
  .bottom-nav { background: #0B0B0D; border-top-color: #1d1d22; }
  .bottom-nav a { color: #9A9CA3; }
  .bottom-nav a[aria-current] { color: #FF3B3B; background: rgba(255, 31, 31, .12); }
  .bottom-nav a.bn-plus { justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 18px; background: #FF1F1F; color: #0B0B0D; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(255, 31, 31, .4); padding: 0; }
  .bottom-nav a.bn-plus .icon { width: 28px; height: 28px; stroke-width: 2.6; }
  .chat-card { height: calc(100vh - 250px); }
  .fs-cta { width: 100%; }
}


/* ---------- Identidade Combate Gym por cima das regras herdadas ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 900; letter-spacing: -0.01em; }
h1 { font-style: italic; text-transform: uppercase; }
.sidebar { background: var(--side); border-right: 1px solid #1d1d22; color: #EDEDED; }
.nav a { color: #D8D8DA; }
.nav a[aria-current="page"] { background: rgba(255, 31, 31, .16); color: #FF5C5C; box-shadow: inset 3px 0 0 #FF1F1F; }
.nav .count { background: #FF1F1F; color: #0B0B0D; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand svg { flex: none; }
.brand .bw { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 21px; line-height: .9; color: #fff; text-transform: uppercase; }
.brand .bw span { display: inline-block; margin-top: 3px; background: #FF1F1F; color: #0B0B0D; font-style: normal; font-size: 12px; letter-spacing: .45em; padding: 2px 4px 1px 8px; }
.auth { background: radial-gradient(700px 500px at 85% 10%, rgba(255, 31, 31, .35), transparent 60%), linear-gradient(160deg, #141418 0%, #0B0B0D 60%, #050506 100%); color: #EDEDED; }
.auth-lines i { border-color: rgba(255, 31, 31, .25); }
.auth .card::before { background: #FF1F1F; }
.auth .card::after { display: none; }
.auth h1 { color: #0B0B0D; }
.auth .btn.primary { background: #D40000; box-shadow: 0 8px 20px rgba(212, 0, 0, .35); }
.auth a { color: #B00000; }
.auth-logo-svg { width: 150px; height: auto; filter: drop-shadow(0 10px 30px rgba(255, 31, 31, .35)); }
.auth-word { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 64px; line-height: .85; color: #fff; text-transform: uppercase; }
.auth-word span { display: inline-block; margin-top: 6px; background: #FF1F1F; color: #0B0B0D; font-style: normal; font-size: 30px; letter-spacing: .5em; padding: 4px 8px 2px 18px; }
.auth-points li::before { background: #FF1F1F; box-shadow: 0 0 10px rgba(255, 31, 31, .7); }
.auth-points li { color: rgba(237, 237, 237, .85); }
.auth-sub { color: #FF5C5C; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; font-size: 13px; }
@media (max-width: 899px) { .auth-word { font-size: 44px; } .auth-word span { font-size: 22px; } .auth-logo-svg { width: 96px; } }
.consent-page { background: radial-gradient(700px 500px at 85% 10%, rgba(255, 31, 31, .3), transparent 60%), #0B0B0D; }
.ring-fg { stroke: #FF1F1F; }
.level-chip { background: var(--gold-soft); color: var(--gold-ink); border-color: rgba(255, 31, 31, .4); }
.level-chip .lv { background: #FF1F1F; color: #0B0B0D; }
.bar.gold > span { background: linear-gradient(90deg, #B00000, #FF1F1F); }
.hero { background: radial-gradient(600px 300px at 90% 0%, rgba(255, 31, 31, .32), transparent 60%), linear-gradient(140deg, var(--hero1), var(--hero2)); color: #EDEDED; }
.hero::after { border-color: rgba(255, 31, 31, .25); }
.hero-hello, .hero-foot { color: #FF6B6B; }
.hs { border-color: rgba(255, 255, 255, .1); }
.hs-l { color: rgba(237, 237, 237, .7); }
.wd-dot { background: conic-gradient(#FF1F1F calc(var(--fill, 0) * 360deg), var(--panel2) 0); }
.hcell.on { background: color-mix(in srgb, #FF1F1F calc(var(--fill, 0) * 70%), var(--panel)); border-color: rgba(255, 31, 31, .5); }
.pg { background: var(--gold-soft); }
.lvl.past { background: var(--gold-soft); border-color: rgba(255, 31, 31, .4); }
.lvl.cur { background: #FF1F1F; border-color: #B00000; color: #0B0B0D; box-shadow: 0 6px 16px rgba(212, 0, 0, .35); }
.tip-card, .prize { background: linear-gradient(180deg, var(--gold-soft), var(--panel)); border-color: rgba(255, 31, 31, .35); }
.onboarding { border-color: rgba(255, 31, 31, .5); background: linear-gradient(180deg, var(--gold-soft), var(--panel) 70%); }
.steps .tick { border-color: #FF1F1F; }
.wk:hover { border-color: #FF1F1F; }
.qr-poster h1 { color: #0B0B0D; }
.qr-poster .qp-sub { color: #D40000; }
.wk-cover { object-fit: contain; height: 120px; }
.post-tags .tag.red { background: #FF1F1F; color: #0B0B0D; }
