/* Zulvor Fit — tema escuro por padrão, claro opcional */
:root {
  --bg: #0b0d10;
  --surface: #13161b;
  --surface-2: #1a1e25;
  --surface-3: #232831;
  --border: #262b34;
  --text: #f1f3f6;
  --muted: #8d95a3;
  --accent: #c6ff3d;
  --accent-ink: #0b0d10;
  --accent-soft: rgba(198, 255, 61, 0.12);
  --orange: #ff7a45;
  --blue: #4da3ff;
  --danger: #ff5c6c;
  --ok: #33d69f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Space Grotesk', var(--font);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e5e8ed;
  --border: #e1e4ea;
  --text: #12151a;
  --muted: #646d7c;
  --accent: #5a7d00;
  --accent-ink: #ffffff;
  --accent-soft: rgba(90, 125, 0, 0.1);
  --shadow: 0 10px 30px rgba(20, 30, 50, 0.08);
  color-scheme: light;
}
/* a cor de destaque no claro é escura para manter contraste; o "lima" vira detalhe */
:root[data-theme='light'] .btn.primary { background: #12151a; color: #c6ff3d; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 8px; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------ layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; padding: 20px 14px; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; font: 700 20px var(--font-head); padding: 6px 10px 18px; }
.brand svg { width: 34px; height: 34px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 500; position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active .ico { color: var(--accent); }
.nav-item .badge { margin-left: auto; }
.ico { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; }
.ico svg { width: 100%; height: 100%; }
.sidebar .spacer { flex: 1; }
.main { flex: 1; min-width: 0; padding: 28px 32px 60px; max-width: 1180px; margin: 0 auto; width: 100%; }
.topbar { display: none; }
.tabbar { display: none; }
/* botão "Personal Presencial" no topo, ao lado do nome do app */
.top-pres { display: inline-flex; align-items: center; gap: 5px; background: var(--accent); color: #0b0d10; font-weight: 800; font-size: 13px; padding: 7px 11px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.top-pres .ico svg { width: 16px; height: 16px; }
.top-pres.side { margin: -6px 10px 14px; justify-content: center; font-size: 14px; padding: 9px 12px; }
.top-pres.active, .top-pres:hover { filter: brightness(1.08); }
@media (max-width: 420px) { .topbar .brand span { font-size: 16px; } .topbar .top-pres { font-size: 12px; padding: 6px 9px; gap: 4px; } }
@media (max-width: 350px) { .topbar .brand span { display: none; } }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .topbar .brand { padding: 0; font-size: 18px; }
  .topbar .brand svg { width: 28px; height: 28px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 6px 0; position: relative; }
  .tabbar a.active { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 20px); }
  h1 { font-size: 24px; }
}

/* ------------------------------------------------ componentes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card.flat { background: var(--surface-2); border-color: transparent; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 860px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.section { margin-top: 26px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.icon { padding: 9px; border-radius: 12px; }
.btn.icon .ico { width: 20px; height: 20px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 13px; outline: none; font-size: 15px; font-weight: 400; color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type='checkbox'] { width: auto; accent-color: var(--accent); }
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .form .three { grid-template-columns: 1fr 1fr; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.orange { background: rgba(255, 122, 69, 0.14); color: var(--orange); }
.chip.blue { background: rgba(77, 163, 255, 0.14); color: var(--blue); }
.chip.ok { background: rgba(51, 214, 159, 0.14); color: var(--ok); }
.chip.danger { background: rgba(255, 92, 108, 0.14); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips button { border: 1px solid var(--border); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--muted); }
.filter-chips button.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font: 700 16px var(--font-head); color: #0b0d10; position: relative;
}
.avatar.lg { width: 84px; height: 84px; border-radius: 26px; font-size: 30px; }
.avatar.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.verified { color: var(--blue); display: inline-flex; width: 18px; height: 18px; vertical-align: -3px; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font: 700 28px var(--font-head); margin-top: 4px; letter-spacing: -0.02em; }
.stat .delta { font-size: 12px; font-weight: 600; }
.stat .delta.up { color: var(--ok); }
.stat .delta.down { color: var(--orange); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.list-item:hover { background: var(--surface-2); border-radius: 12px; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 38px; margin-bottom: 6px; }

table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------ hero / boas-vindas */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(198, 255, 61, 0.22), transparent 55%), linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
}
.hero h1 { font-size: 30px; max-width: 560px; }
.hero .pulse-line { position: absolute; right: -20px; bottom: -10px; width: 320px; opacity: 0.25; pointer-events: none; }
@media (max-width: 860px) { .hero { padding: 20px; } .hero h1 { font-size: 24px; } }

.streak-card { display: flex; align-items: center; gap: 16px; }
.streak-flame { font-size: 40px; line-height: 1; filter: drop-shadow(0 0 16px rgba(255, 122, 69, 0.5)); }
.week-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.week-dots span { width: 26px; height: 26px; border-radius: 9px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.week-dots span.on { background: var(--accent); color: var(--accent-ink); }
.week-dots span.today { outline: 2px solid var(--accent); outline-offset: 1px; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge-tile { text-align: center; padding: 12px 6px; border-radius: 14px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.badge-tile .em { font-size: 28px; display: block; margin-bottom: 4px; }
.badge-tile.off { opacity: 0.35; filter: grayscale(1); }

.level-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
/* 10 níveis do aluno: selo redondo com ícone de academia */
.lvl-badge { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #0b0d10;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--lc) 55%, #fff) 0%, var(--lc) 55%, color-mix(in srgb, var(--lc) 70%, #000) 100%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc) 45%, transparent), 0 4px 14px color-mix(in srgb, var(--lc) 35%, transparent); }
.lvl-badge svg { width: 58%; height: 58%; }
.lvl-badge.locked { filter: grayscale(1); opacity: .35; box-shadow: none; }
.lvl-badge.locked i { position: absolute; right: -4px; bottom: -4px; font-size: 13px; font-style: normal; filter: none; }
.lvl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0 10px; }
.lvl-item { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--surface-2); }
.lvl-item b { font-size: 11.5px; line-height: 1.2; }
.lvl-item small { font-size: 10.5px; color: var(--muted); }
.lvl-item.off b { color: var(--muted); }
.lvl-item.cur { outline: 2px solid var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) { .lvl-grid { grid-template-columns: repeat(3, 1fr); } }
/* validade do programa: selo pequeno no canto */
.prog-card { position: relative; }
.prog-flag { position: absolute; top: 10px; right: 12px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); z-index: 1; }
.prog-flag.soon { background: rgba(255, 122, 69, .16); color: #ff9a6b; }
.prog-flag.expired { background: rgba(255, 92, 108, .16); color: var(--danger); border: 1px solid rgba(255, 92, 108, .4); text-decoration: none; animation: flagPulse 2s ease-in-out infinite; }
@keyframes flagPulse { 50% { box-shadow: 0 0 0 4px rgba(255, 92, 108, .15); } }
.prog-card.has-flag .card-head { padding-right: 150px; }
@media (max-width: 560px) { .prog-card.has-flag .card-head { padding-right: 0; padding-top: 22px; } }
/* relato de ganhos e perdas */
.fb-box { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.fb-box small { font-weight: 700; }
.fb-box p { margin: 4px 0 0; white-space: pre-wrap; }
.fb-box.ok { border-left: 3px solid #2ecc71; }
.fb-box.warn { border-left: 3px solid #ff7a45; }
.level-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #7dffb0); border-radius: 99px; }

/* ------------------------------------------------ personal cards */
.trainer-card { display: flex; flex-direction: column; gap: 12px; transition: transform 0.15s ease, border-color 0.15s ease; }
.trainer-card:hover { transform: translateY(-2px); border-color: var(--muted); }
.trainer-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.price { font: 700 20px var(--font-head); }
.price small { font: 500 12px var(--font); }
.stars { color: #ffc940; letter-spacing: 1px; }
.score { display: inline-flex; align-items: baseline; gap: 1px; font: 700 15px var(--font-head); padding: 3px 9px; border-radius: 9px; }
.score small { font-size: 10px; opacity: 0.75; }
.score.top { background: rgba(51, 214, 159, 0.16); color: var(--ok); }
.score.good { background: rgba(255, 201, 64, 0.16); color: #e0a800; }
.score.mid { background: rgba(255, 122, 69, 0.16); color: var(--orange); }
.quote { font-size: 13px; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.score-pick { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.score-pick button { border: 1.5px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 10px 0; font: 700 15px var(--font-head); cursor: pointer; color: var(--text); }
.score-pick button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
@media (max-width: 560px) { .score-pick { grid-template-columns: repeat(6, 1fr); } }
.timeline { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.timeline span { flex: 1; min-width: 90px; text-align: center; font-size: 11px; font-weight: 600; padding: 6px 4px; border-radius: 8px; background: var(--surface-3); color: var(--muted); }
.timeline span.on { background: var(--accent-soft); color: var(--accent); }
.timeline span.now { background: var(--accent); color: var(--accent-ink); }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.code-box { font: 700 24px var(--font-head); letter-spacing: 0.12em; padding: 10px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-block; }

/* ------------------------------------------------ programa / treino */
.day-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.exercise { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.exercise:last-child { border-bottom: 0; }
.exercise .n { width: 28px; height: 28px; border-radius: 9px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.exercise.done .n { background: var(--accent); color: var(--accent-ink); }
.exercise.done .ex-name { text-decoration: line-through; color: var(--muted); }
.ex-name { font-weight: 600; }
.ex-meta { font-size: 13px; color: var(--muted); }
.builder-ex { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.builder-ex input { padding: 9px 10px; font-size: 14px; }
@media (max-width: 760px) {
  .builder-ex { grid-template-columns: 1fr 1fr 1fr; background: var(--surface); padding: 10px; border-radius: 12px; }
  .builder-ex input:first-child { grid-column: 1 / -1; }
}
.timer {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--text); color: var(--bg); border-radius: 999px; padding: 10px 12px 10px 20px; display: flex; align-items: center; gap: 12px;
  font: 700 22px var(--font-head); box-shadow: var(--shadow);
}
.timer button { background: var(--bg); color: var(--text); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; font-size: 13px; }
@media (min-width: 861px) { .timer { bottom: 28px; } }

/* ------------------------------------------------ gráfico */
.chart { width: 100%; height: 180px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: url(#grad); }
.chart .pt { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.metric-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* ------------------------------------------------ chat */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 56px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-list .list-item { padding: 12px 14px; border-radius: 0; }
.chat-list .list-item.on { background: var(--surface-2); }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 76%; padding: 9px 13px; border-radius: 16px; background: var(--surface-2); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { background: var(--accent); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble:not(.me) { border-bottom-left-radius: 6px; }
.bubble .t { display: block; font-size: 10px; opacity: 0.6; margin-top: 2px; text-align: right; }
.bubble.sys { align-self: center; background: var(--surface-3); color: var(--muted); font-size: 13px; border-radius: 999px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input { border-radius: 999px; }
.typing { font-size: 12px; color: var(--accent); }
.quick-replies { display: flex; gap: 6px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.quick-replies button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; color: var(--text); }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .chat-layout.open .chat-list { display: none; }
  .chat-layout:not(.open) .chat-pane { display: none; }
}

/* ------------------------------------------------ vídeo */
.call {
  position: fixed; inset: 0; z-index: 100; background: #05070a; display: flex; flex-direction: column; color: #fff;
}
.call video.remote { flex: 1; width: 100%; height: 100%; object-fit: cover; background: #05070a; }
.call video.local { position: absolute; right: 16px; top: 16px; width: 130px; height: 180px; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.2); background: #111; transform: scaleX(-1); }
.call .call-info { position: absolute; left: 20px; top: 20px; }
.call .call-info h2 { color: #fff; }
.call .controls { position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 16px; }
.call .controls button { width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.call .controls button.off { background: #fff; color: #000; }
.call .controls button.hang { background: var(--danger); }
.call .controls svg { width: 26px; height: 26px; }
.call .ringing { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.ring-pulse { animation: ring 1.4s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.6); } 100% { box-shadow: 0 0 0 30px rgba(198, 255, 61, 0); } }

/* ------------------------------------------------ notícias / fórum */
.news-card { overflow: hidden; padding: 0; }
.news-card .cover { height: 150px; background-size: cover; background-position: center; background-color: var(--surface-3); display: flex; align-items: flex-end; padding: 12px; }
.news-card .cover.gen { background: linear-gradient(135deg, var(--accent-soft), rgba(255, 122, 69, 0.18)); font-size: 54px; align-items: center; justify-content: center; }
.news-card .body { padding: 16px; }
.news-card .pin { color: var(--orange); font-weight: 700; font-size: 12px; }
.like-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; padding: 4px 0; }
.like-btn.on { color: var(--danger); }
.topic { display: block; }
.topic h3 { margin: 6px 0; }
.reply { padding: 14px 0; border-bottom: 1px solid var(--border); }
.role-tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-left: 6px; }
.role-tag.personal { background: var(--accent-soft); color: var(--accent); }
.role-tag.admin { background: rgba(255, 122, 69, 0.14); color: var(--orange); }

/* ------------------------------------------------ auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side {
  padding: 40px 48px; display: flex; flex-direction: column; justify-content: flex-start; position: relative; overflow: hidden;
  background: radial-gradient(90% 80% at 0% 100%, rgba(198, 255, 61, 0.25), transparent 60%), radial-gradient(70% 60% at 100% 0%, rgba(255, 122, 69, 0.2), transparent 60%), #0b0d10;
  color: #f1f3f6;
}
/* bloco do topo: ícone, título, frase e destaques juntos, logo abaixo do nome do app */
.auth-hero { margin-top: 28px; max-width: 520px; }
.auth-side h1 { font-size: 46px; line-height: 1.12; max-width: 520px; color: #fff; margin: 0 0 14px; }
.auth-side .hero-sub { opacity: .78; max-width: 460px; font-size: 17px; line-height: 1.5; margin: 0 0 28px; }
.auth-side h1 em { font-style: normal; color: #c6ff3d; }
.auth-side .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; }
.auth-side .feat div { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 14px; font-size: 14px; }
.auth-side .feat b { display: block; font-family: var(--font-head); font-size: 15px; margin-bottom: 2px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-form .inner { width: 100%; max-width: 400px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick button { border: 1.5px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px; text-align: left; cursor: pointer; }
.role-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.role-pick b { display: block; font-family: var(--font-head); }
.role-pick button { min-width: 0; padding: 12px 10px; }
/* "90 dias grátis após 2,90 por mês" numa linha só: a letra diminui conforme o espaço */
.role-pick small { display: block; white-space: nowrap; font-size: clamp(8.5px, 2.4vw, 11px); letter-spacing: -.1px; overflow: hidden; text-overflow: clip; }
@media (min-width: 861px) { .role-pick small { font-size: 10.5px; } }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 20px; min-height: auto; }
  .auth-side h1 { font-size: 30px; }
  .auth-hero { margin-top: 18px; }
  .auth-side .hero-sub { font-size: 15px; margin-bottom: 4px; }
  .auth-side .feat { display: none; }
  /* celular: primeiro entrar/criar conta, o vídeo explicativo fica logo abaixo */
  .auth-form .inner { display: flex; flex-direction: column; }
  .auth-form .auth-video { order: 9; margin: 22px 0 0; }
}

/* ------------------------------------------------ modal / toast */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); animation: fade 0.15s ease; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: var(--shadow); animation: pop 0.18s ease; }
.modal.wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
@media (max-width: 560px) {
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
#toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); animation: pop 0.2s ease; max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }

.pay-options { display: grid; gap: 10px; }
.pay-option { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer; background: var(--surface); text-align: left; }
.pay-option.on { border-color: var(--accent); background: var(--accent-soft); }
.pay-option .logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.notice { padding: 12px 14px; border-radius: 12px; background: rgba(77, 163, 255, 0.1); color: var(--text); border: 1px solid rgba(77, 163, 255, 0.25); font-size: 14px; }
.notice.warn { background: rgba(255, 122, 69, 0.1); border-color: rgba(255, 122, 69, 0.3); }
.notice.ok { background: rgba(46, 204, 113, 0.12); border-color: rgba(46, 204, 113, 0.35); }
/* planos do personal (mensal / trimestral / semestral / anual) */
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.plan-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 12px 12px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.plan-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-name { font-size: 15px; }
.plan-price { font-size: 22px; font-weight: 800; line-height: 1.1; }
.plan-price small { font-size: 12px; font-weight: 600; opacity: .7; }
.plan-off { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 99px; background: #2ecc71; color: #06210f; font-weight: 800; font-size: 12px; }
.plan-tag { position: absolute; top: -9px; right: 10px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .3px; }
@media (min-width: 640px) { .plan-grid { grid-template-columns: repeat(4, 1fr); } }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; height: 80px; }
@keyframes sk { to { background-position: -200% 0; } }

.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar-chart i { flex: 1; max-width: 28px;background: var(--accent); border-radius: 4px 4px 0 0; min-height: 3px; opacity: 0.85; }
.hide-mobile { }

/* ------------------------------------------------ mídia dos exercícios */
.media-video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; display: block; }
.media-yt { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.media-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-photo { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; background: var(--surface-2); display: block; }
.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ex-row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); cursor: pointer; width: 100%; }
.ex-row:last-child { border-bottom: 0; }
.ex-row.done .ex-name { text-decoration: line-through; color: var(--muted); }

/* treino guiado */
.guided { padding: 16px; }
.guided-media { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.guided-media img { width: 100%; height: 100%; object-fit: cover; }
.guided-media .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 54px; color: var(--muted); }
.guided-media .ph small { font-size: 13px; }
.play-over { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: 700 16px var(--font); padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap; }
.play-over .ico { width: 20px; height: 20px; }
.big-meta { display: flex; gap: 8px; margin-top: 10px; }
.big-meta div { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.big-meta b { display: block; font: 700 20px var(--font-head); }
.big-meta small { color: var(--muted); font-size: 12px; }
.set-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.set-buttons button { min-height: 58px; border-radius: 14px; border: 2px dashed var(--border); background: var(--surface); font: 700 16px var(--font); cursor: pointer; color: var(--text); }
.set-buttons button.on { background: var(--ok); border: 2px solid var(--ok); color: #05130d; font-size: 22px; }
.guided-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.effort { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.effort button { border: 2px solid var(--border); background: var(--surface-2); border-radius: 14px; padding: 10px 4px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.effort button span { font-size: 28px; }
.effort button.on { border-color: var(--accent); background: var(--accent-soft); }

/* montador de programa */
.step-title { display: flex; align-items: center; gap: 10px; font: 700 17px var(--font-head); margin-bottom: 12px; }
.step-title span { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.day-tabs button { border: 1.5px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.day-tabs button small { background: var(--surface-3); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.day-tabs button.on { border-color: var(--accent); background: var(--accent-soft); }
.day-tabs .ico { width: 16px; height: 16px; }
.ex-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); margin-bottom: 10px; }
.ex-media { display: grid; gap: 8px; }
.media-box { position: relative; aspect-ratio: 1; border: 2px dashed var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 24px; color: var(--muted); padding: 4px; }
.media-box span { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
.media-box img, .media-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-box i { position: relative; font-style: normal; background: rgba(0,0,0,.55); color: #fff; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.media-box:has(img), .media-box.has { border-style: solid; border-color: var(--ok); }
.ex-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ex-fields .n { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.ex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ex-grid label { font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.ex-grid input, .ex-fields input { padding: 9px 10px; font-size: 15px; }
.warn-line { color: var(--orange); font-weight: 600; font-size: 12px; }
.save-bar { position: sticky; bottom: 0; z-index: 15; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); }
@media (max-width: 860px) {
  .save-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .ex-card { grid-template-columns: 1fr; }
  .ex-media { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
  .media-box { aspect-ratio: 16 / 10; }
  .ex-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------ treino guiado: foto + vídeo + séries com descanso e alerta */
.media-pair { display: grid; gap: 10px; }
.media-pair.two { grid-template-columns: 1fr 1fr; }
.media-pair figure { margin: 0; }
.media-pair figcaption { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; text-align: center; }
.media-pair .guided-media { margin-top: 0; background: #fff; }
.media-pair .guided-media img { object-fit: contain; }
.ex-video video, .ex-video .media-yt { border-radius: 14px; }
.set-panel { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.set-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.set-dots span { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.set-dots span.ok { background: #2ecc71; color: #06210f; }
.set-dots span.now { background: var(--accent); color: var(--accent-ink); animation: flagPulse 1.4s ease-in-out infinite; }
.set-state { text-align: center; font-size: 15px; margin-bottom: 10px; }
.set-state.live { color: var(--accent); }
.set-state.ok { font-size: 17px; }
.clock { font: 800 54px/1 'Space Grotesk', Inter, sans-serif; text-align: center; margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.ring { --p: 1; width: 190px; height: 190px; margin: 4px auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 360deg), var(--surface-3) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface-2); }
.ring .clock { position: relative; margin: 0; font-size: 46px; }
.btn.xl { padding: 18px 20px; font-size: 18px; font-weight: 800; border-radius: 16px; }
.next-alert { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.72); animation: alertIn .25s ease-out; }
.next-alert .box { width: min(420px, 100%); background: var(--surface); border: 2px solid var(--accent); border-radius: 22px; padding: 22px; text-align: center; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); }
.next-alert .big { font-size: 64px; animation: shake .6s ease-in-out 3; }
.next-alert h2 { margin: 6px 0; font-size: 28px; }
@keyframes alertIn { from { opacity: 0; transform: scale(.96); } }
@keyframes shake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
/* erro do login/cadastro: fica escrito no formulário */
.form-error { background: rgba(255, 92, 92, .12); border: 1px solid rgba(255, 92, 92, .5); color: #ffb3b3; border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.form-error[hidden] { display: none; }
/* promoção da 1ª compra (loja de treinos) e prévia dos e-mails (dono) */
.promo-banner { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, rgba(198, 255, 61, .16), rgba(198, 255, 61, .04)); border: 1px solid var(--accent); border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; }
.promo-banner .pb-ico { font-size: 30px; }
.promo-banner .pb-price { color: var(--accent); font-size: 18px; }
.email-preview { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #0b0d10; }
/* logo ZulFit acima do título da tela de entrada */
.hero-logo { display: block; width: 120px; height: 120px; margin: 0 0 18px; filter: drop-shadow(0 10px 28px rgba(198, 244, 50, .28)); }
@media (max-width: 860px) { .hero-logo { width: 88px; height: 88px; margin-bottom: 12px; } }
/* vídeo explicativo na tela de entrada (acima de Entrar / Criar conta) */
.auth-video { margin-bottom: 16px; text-align: center; }
.auth-video small { display: block; margin-top: 6px; }
/* player: tela cheia, tela média e PiP */
.vplayer { position: relative; }
.vplayer video { display: block; width: 100%; max-height: 46vh; aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: 16px; border: 1px solid var(--border); }
.vp-bar { display: flex; gap: 6px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.vp-btn { background: var(--card, #1b1d22); color: inherit; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.vp-btn:hover { border-color: var(--accent, #c6f432); }
.vp-close { display: none; position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; cursor: pointer; }
/* tela média: janela grande no meio, fundo escuro */
.vplayer.vp-mid { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.vplayer.vp-mid video { width: auto; max-width: min(92vw, 900px); height: 78vh; max-height: 78vh; }
/* tela cheia (de verdade ou imitada quando o navegador não deixa) */
.vplayer:fullscreen, .vplayer.vp-fs { position: fixed; inset: 0; z-index: 9999; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; }
.vplayer:-webkit-full-screen { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vplayer:fullscreen video, .vplayer.vp-fs video { width: 100%; height: calc(100% - 52px); max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }
.vplayer:-webkit-full-screen video { width: 100%; height: calc(100% - 52px); max-height: none; border: 0; border-radius: 0; }
.vplayer.vp-mid .vp-close, .vplayer.vp-fs .vp-close, .vplayer:fullscreen .vp-close { display: block; }
.vplayer.vp-mid .vp-btn, .vplayer.vp-fs .vp-btn, .vplayer:fullscreen .vp-btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
body.vp-lock { overflow: hidden; }
@media (max-width: 520px) { .vp-btn span { display: none; } .vp-btn { font-size: 18px; padding: 6px 14px; } }
/* assinatura do cliente */
.sub-hero { text-align: center; max-width: 560px; margin: 0 auto; padding: 26px 18px; }
.sub-list { list-style: none; padding: 0; margin: 10px auto; display: inline-flex; flex-direction: column; gap: 6px; text-align: left; }
/* lista de clientes do personal */
.client-row { gap: 10px; flex-wrap: wrap; }
.note-line { color: var(--text); opacity: .8; font-style: italic; }
.notes-card textarea { width: 100%; margin-top: 8px; }

/* ------------------------------------------------ animação do movimento (catálogo): 2 fotos alternando, como um GIF */
.ex-anim { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #fff; }
.ex-anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ex-anim img.f2 { animation: exFlip 1.6s steps(1, end) infinite; }
@keyframes exFlip { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.ex-anim.fill { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; height: 100%; }
.ex-anim.big { max-width: 520px; margin: 0 auto 6px; border-radius: 14px; }
.ex-anim.pk-ph { display: flex; align-items: center; justify-content: center; font-size: 38px; background: var(--surface-3); }
@media (prefers-reduced-motion: reduce) { .ex-anim img.f2 { animation-duration: 3.2s; } }
.media-box.has-anim { border-style: solid; border-color: var(--accent); background: #fff; }
.media-box .tag { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; font-size: 12px; }
.guided-media .own-photo { position: absolute; right: 10px; bottom: 10px; width: 28%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 3px solid var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.ex-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow: hidden; }
.ex-thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; background: #fff; flex: none; }
/* lista de exercícios com pesquisa */
.picker #pk-q { font-size: 17px; padding: 13px 14px; }
.pk-groups { margin: 10px 0 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pk-groups .chip { white-space: nowrap; cursor: pointer; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; max-height: min(62vh, 640px); overflow-y: auto; padding: 2px; }
.pk-item { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.pk-item:hover, .pk-item:focus-visible { border-color: var(--accent); }
.pk-item b { font-size: 13.5px; line-height: 1.25; }
.pk-item small { font-size: 11.5px; color: var(--muted); }
.pk-new { justify-content: center; align-items: center; text-align: center; border-style: dashed; border-color: var(--accent); min-height: 150px; }
.pk-new .pk-plus { font-size: 30px; }
@media (max-width: 560px) { .pk-grid { grid-template-columns: repeat(2, 1fr); } }
/* enviar vários treinos */
.send-list { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; }
.send-cat > b { display: block; margin-bottom: 6px; }
.send-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); margin-bottom: 6px; cursor: pointer; }
.send-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.send-item input { width: 22px; height: 22px; flex: none; }
.send-item span { display: flex; flex-direction: column; }
/* atalhos do painel do personal */
.quick { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.quick .qi { font-size: 28px; }
.quick span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.quick .go { font-size: 20px; color: var(--muted); }
.ref-hero input { width: 100%; font-size: 14px; }

/* ------------------------------------------------ facilidade de uso */
/* botões maiores no celular (mais fácil de acertar com o dedo) */
@media (max-width: 860px) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; padding: 8px 12px; }
  input, select, textarea { font-size: 16px; } /* evita zoom automático no iPhone */
}
#view > * { animation: viewIn 0.22s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { #view > * { animation: none; } }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 14px; }
.tip .em { font-size: 20px; line-height: 1.2; }
.tip p { margin: 0; flex: 1; }
.tip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0 4px; }
.checklist { display: grid; gap: 8px; }
.checklist a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); font-weight: 600; }
.checklist a .ck { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.checklist a.ok { color: var(--muted); text-decoration: line-through; }
.checklist a.ok .ck { background: var(--ok); border-color: var(--ok); color: #05130d; }
.checklist a .go { margin-left: auto; color: var(--accent); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; cursor: pointer; padding: 6px; }
/* iPhone com entalhe / app instalado: nada fica escondido atrás do relógio e da câmera */
@media (max-width: 860px) {
  .topbar { padding-top: calc(12px + env(safe-area-inset-top)); }
  .auth-side { padding-top: calc(28px + env(safe-area-inset-top)); }
}
.call .call-info { top: calc(20px + env(safe-area-inset-top)); }
.call video.local { top: calc(16px + env(safe-area-inset-top)); }
#toast { top: calc(18px + env(safe-area-inset-top)); }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.tabbar a span:not(.badge) { font-size: 10.5px; white-space: nowrap; }
@media (max-width: 860px) { .hide-mobile { display: none !important; } }

/* ================= VERSÃO 3: funções novas ================= */
/* tela "Todas as funções" */
.hub-search { width: 100%; margin-bottom: 6px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hub-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; transition: transform .12s, border-color .12s; }
.hub-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.hub-card b { display: block; }
.hub-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hub-em { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); flex: none; }
.hub-link { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.hub-link b { display: block; } .hub-link small { color: var(--muted); } .hub-link .go { margin-left: auto; font-size: 22px; }
.mod-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mod-cards:empty, .mod-sections:empty { display: none; }
.tabs-scroll button { flex: 0 0 auto; }
/* dias da semana e grupos */
.chip.wd { font-size: 11px; padding: 2px 7px; }
/* chat: áudio, vídeo, foto */
.bubble.media { padding: 6px; max-width: min(320px, 82%); }
.chat-video, .chat-img { width: 100%; max-height: 360px; border-radius: 12px; display: block; background: #000; }
.bubble .vx { display: block; font-size: 12px; margin: 2px 4px 6px; }
.bubble .slowmo { margin-top: 6px; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 210px; padding: 4px; }
.voice-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-3, rgba(0,0,0,.15)); color: inherit; cursor: pointer; font-size: 14px; flex: none; }
.bubble.me .voice-play { background: rgba(0,0,0,.15); }
.voice-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(127,127,127,.35); overflow: hidden; }
.voice-bar i { display: block; height: 100%; width: 0; background: currentColor; }
.voice-t { font-size: 12px; font-variant-numeric: tabular-nums; }
.voice-speed { border: 0; background: transparent; color: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }
#mic.on { background: #ff4d4d; color: #fff; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4d4d; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .3; } }
/* treino: carga por série */
.set-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.set-inputs label { font-size: 12px; font-weight: 700; color: var(--muted); }
.set-inputs input { font-size: 22px; font-weight: 800; text-align: center; margin-top: 4px; }
.set-log { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.set-log span { font-size: 12px; background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; font-weight: 600; }
.last-line { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
/* cronômetro HIIT / Tabata / EMOM / AMRAP */
.iv-box { text-align: center; border-radius: 18px; padding: 18px 10px; margin: 8px 0 12px; background: var(--accent-soft); border: 2px solid var(--accent); }
.iv-box.rest { background: rgba(80, 160, 255, .12); border-color: #5aa0ff; }
.iv-round { font-weight: 700; color: var(--muted); }
.iv-clock { font-size: 64px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.iv-box.rest .iv-clock { color: #5aa0ff; }
.iv-phase { font-weight: 800; letter-spacing: .12em; }
/* sem internet */
.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: #3a2a00; color: #ffd27a; border: 1px solid #806000; padding: 8px 14px; border-radius: 999px; font-size: 13px; max-width: calc(100% - 24px); box-shadow: var(--shadow); }

/* itens de grade nunca empurram a tela para o lado no celular */
.grid > *, .mod-cards > *, .hub-grid > * { min-width: 0; }
.list-item .grow, .list-item .title, .list-item .sub { min-width: 0; overflow-wrap: anywhere; }

/* bonequinho amarelo animado (exercício sem foto) */
.mascote { width: 100%; height: 100%; max-height: 100%; display: block; margin: auto; overflow: visible; }
.guided-media.mascote-box .mascote { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
.guided-media.mascote-box { position: relative; }
.mascote g { fill: #ffc83d; stroke: #ffc83d; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 #7a5200); }
.mascote g .cab { fill: #ffc83d; stroke: #7a5200; stroke-width: 3; }
.mascote g .olho { fill: #3a2600; stroke: none; }
.mascote g .boca { fill: none; stroke: #3a2600; stroke-width: 2.4; }
.mascote path { fill: none; }
.mascote .sombra { fill: rgba(0,0,0,.25); stroke: none; }
.mascote .pa { animation: mascote-a 1.4s steps(1) infinite; }
.mascote .pb { animation: mascote-b 1.4s steps(1) infinite; }
@keyframes mascote-a { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes mascote-b { 0% { opacity: 0; } 50% { opacity: 1; } }
.guided-media.mascote-box { display: grid; place-items: center; background: radial-gradient(circle at 50% 55%, #2a2f38, #14171c 75%); padding: 14px; }
.mascote-ph { background: #1b1f26 !important; }
.mascote-ph { padding: 3px; }
.mascote.sm g { stroke-width: 11; }
/* botão "Sair" do treino maior e mais nítido */
.sair-btn { font-size: 16px; font-weight: 800; padding: 10px 18px; border: 2px solid var(--text); color: var(--text); background: var(--surface); border-radius: 999px; }
.sair-btn .ico svg { width: 20px; height: 20px; stroke-width: 2.6; }
/* aviso da versão teste (só aparece quando o servidor está com TEST_VERSION=1) */
#test-banner { background: #ffcc00; color: #111; text-align: center; font-weight: 700; font-size: 13px; padding: 6px 10px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); position: relative; z-index: 25; }

