/* NoTeamNoGain - tema claro, no espírito dos apps de treino: branco, laranja, números grandes e rótulos pequenos. */
:root {
  --bg: #f7f7fa; --surface: #ffffff; --surface2: #f0f0f5; --border: #dfdfe8;
  --text: #242428; --muted: #6d6d78; --accent: #f4511e; --accent-dark: #cc4200; --accent-ink: #ffffff; --accent-soft: #fff0ea;
  --ok: #178a4c; --warn: #b26a00; --err: #d3302f; --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding-bottom: 76px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 700; margin: 0; }
p { margin: 0 0 10px; }
code { background: var(--surface2); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* cabeçalho (desktop: menu no topo; celular: logo + abas embaixo) */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: -.03em; color: var(--text); font-size: 19px; white-space: nowrap; text-transform: uppercase; }
.brand:hover { color: var(--text); }
.brand b { color: var(--accent); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.mainnav { display: none; align-self: stretch; gap: 4px; flex: 1; }
.mainnav > a, .mainnav summary { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; color: var(--text); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; border-top: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.mainnav > a:hover, .mainnav summary:hover { color: var(--accent); }
.mainnav > a.on, .mainnav details.on > summary { border-bottom-color: var(--accent); }
.menu { position: relative; align-self: stretch; }
.menu > summary { list-style: none; margin: 0 !important; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "▾" !important; color: var(--muted); font-size: 12px; margin-left: 2px; }
.menu-list { position: absolute; top: 100%; left: 0; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-top: 0; box-shadow: 0 8px 20px rgba(20,20,30,.12); padding: 6px 0; z-index: 40; }
.menu.end .menu-list { left: auto; right: 0; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; color: var(--text); font: inherit; font-weight: 600; font-size: 14.5px; background: none; border: 0; text-align: left; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover, .menu-list a.on { background: var(--accent-soft); color: var(--accent-dark); }
.menu-list .sep { border-top: 1px solid var(--border); margin: 6px 0; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); align-self: stretch; }
.who .menu > summary { height: 100%; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; color: var(--text); }
.bell:hover { background: var(--surface2); }
.bell .dot { position: absolute; top: 0; right: -2px; margin: 0; }
.dot { background: var(--accent); color: #fff; border-radius: 99px; font-size: 10.5px; padding: 0 6px; margin-left: 4px; font-weight: 800; line-height: 17px; display: inline-block; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-weight: 600; font-size: 11px; padding: 4px 2px; position: relative; }
.tabbar a .ico { margin-bottom: 2px; }
.tabbar a.on { color: var(--accent); }
.tabbar a .dot { position: absolute; top: 0; left: 54%; }
main { max-width: 1240px; margin: 0 auto; padding: 18px 16px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.crumb { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: inline-block; }

/* blocos */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; display: block; color: inherit; box-shadow: var(--shadow); }
a.card:hover { border-color: #c9c9d6; color: inherit; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid > .card { margin: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-bottom: 14px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column-reverse; }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 4px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--ok); background: #e5f5ec; } .tag.warn { color: var(--warn); background: #fff3dc; }
.tag.err { color: var(--err); background: #fdebeb; } .tag.acc { color: var(--accent-dark); background: var(--accent-soft); }
.progress { height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 4px; background: var(--surface2); white-space: nowrap; }
.chip.done { background: #e5f5ec; color: var(--ok); }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); min-width: 0; }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .grow > * { overflow: hidden; text-overflow: ellipsis; }
a.item:hover { color: inherit; background: #fafafc; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-weight: 800; flex: none; color: var(--muted); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 96px; height: 96px; font-size: 38px; border: 4px solid var(--surface); box-shadow: 0 1px 4px rgba(20,20,30,.18); }
.pips { display: flex; gap: 4px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); }
.pips i.on { background: var(--accent); border-color: var(--accent); }
.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid #bfe3cf; background: #eefaf3; color: #14532d; }
.flash.err { border-color: #f3c2c2; background: #fdf0f0; color: #8a1c1c; }
.flash.warn { border-color: #f1d9a4; background: #fff8e8; color: #7a4a00; }
.flash a { font-weight: 700; }
.msg { white-space: pre-wrap; word-break: break-word; background: #d9fdd3; border-radius: 0 8px 8px 8px; padding: 10px 12px; margin: 0; font: inherit; font-size: 14px; color: #111b21; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }

/* formulários */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=tel],
input[type=search], input[type=url], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid #c9c9d6; border-radius: 6px; padding: 9px 12px; font: inherit; font-size: 16px; min-height: 44px; }
input[type=search] { -webkit-appearance: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input[type=file] { width: 100%; color: var(--muted); font-size: 14px; }
input[type=file]::file-selector-button { font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid #c9c9d6; border-radius: 6px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface2); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 14px; margin-bottom: 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface); color: var(--text); border: 1px solid #c9c9d6;
  border-radius: 6px; padding: 8px 16px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 40px; white-space: nowrap; }
.btn:hover { background: var(--surface2); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.danger { color: var(--err); }
.btn.sm { min-height: 32px; padding: 4px 11px; font-size: 13px; }
form.inline { display: inline; }
details > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "＋"; color: var(--muted); }
details[open] > summary::after { content: "−"; }
details[open] > summary { margin-bottom: 14px; }

/* treinos (revisão) */
.thumb { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--surface2); flex: none; display: grid; place-items: center; font-size: 22px; }
.wk { display: grid; grid-template-columns: 1fr; gap: 14px; }
.wk img.big { width: 100%; max-height: 420px; object-fit: contain; border-radius: 6px; background: #111; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.filters { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.filters a.on { color: var(--text); border-bottom-color: var(--accent); }

/* cartão de atividade (feed) */
.act { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.act-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.act-head .grow { flex: 1; min-width: 0; }
.act-head .who-name { font-weight: 700; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-head .when { color: var(--muted); font-size: 12.5px; }
.act-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; padding: 10px 16px 0; display: flex; align-items: center; gap: 8px; }
.act-title .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex: none; }
.act-stats { display: flex; gap: 0; padding: 10px 16px 14px; flex-wrap: wrap; }
.act-stats div { padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--border); }
.act-stats div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.act-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.act-stats b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.act-img { display: block; width: 100%; max-height: 440px; object-fit: cover; background: var(--surface2); }
.act-note { padding: 10px 16px 0; color: var(--muted); font-size: 13.5px; }
.act-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* painel em colunas */
.dash { display: grid; gap: 16px; grid-template-columns: 1fr; }
.profile-card { text-align: center; padding-top: 0; overflow: hidden; }
.profile-card .band { height: 56px; margin: 0 -16px; background: linear-gradient(120deg, var(--accent), #ff8a3d); }
.profile-card .avatar { margin: -34px auto 8px; width: 68px; height: 68px; font-size: 26px; border: 3px solid var(--surface); background: #2b2b33; color: #fff; }
.profile-card h2 { margin: 0; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.trio div { border-left: 1px solid var(--border); padding: 0 4px; }
.trio div:first-child { border-left: 0; }
.trio span { display: block; font-size: 11.5px; color: var(--muted); }
.trio b { font-size: 20px; font-weight: 500; }
.side-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 10px; }
.challenge { display: block; padding: 12px 0; border-top: 1px solid var(--border); color: inherit; }
.challenge:first-of-type { border-top: 0; padding-top: 0; }
.challenge:hover { color: inherit; }
.challenge:hover h3 { color: var(--accent); }

/* perfil do atleta */
.hero { text-align: center; padding: 0 16px 18px; overflow: hidden; }
.hero .band { height: 84px; margin: 0 -16px; background: linear-gradient(120deg, var(--accent), #ff8a3d); }
.hero .avatar { margin: -50px auto 0; }
.hero h1 { font-size: 26px; margin-top: 10px; }
.level { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 4px; padding: 3px 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.badge { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; gap: 10px; align-items: center; opacity: .45; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; border-color: #ffc9b3; background: var(--accent-soft); }
.badge .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); color: var(--muted); flex: none; } .badge.on .ic { background: var(--accent); color: #fff; } .badge b { display: block; font-size: 13px; } .badge span { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 16px; border-bottom: 1px solid var(--border); }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bars .b i { width: 100%; max-width: 28px; background: #d6d6e0; border-radius: 3px 3px 0 0; min-height: 3px; }
.bars .b.met i { background: var(--accent); }
.bars .b small { font-size: 10px; color: var(--muted); padding-bottom: 4px; } .bars .b em { font-size: 11px; font-style: normal; font-weight: 700; }
.qr { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; width: 240px; max-width: 100%; display: block; }
.login { max-width: 380px; margin: 9vh auto 0; padding: 0 16px; }
.login .brand { font-size: 28px; justify-content: center; margin-bottom: 6px; }

/* ranking do grupo */
.lb { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lb th { text-align: right; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lb th:nth-child(2) { text-align: left; }
.lb td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb td.rank { width: 34px; text-align: center; font-weight: 800; color: var(--muted); }
.lb tr.top td.rank { color: var(--accent); }
.lb td.ath { text-align: left; white-space: normal; }
.lb td.ath a { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.lb td.ath a:hover { color: var(--accent); }
.lb tr.done td.goal { color: var(--ok); font-weight: 800; }
.lb .hide-sm { display: none; }

/* tela do grupo: conversa no formato do WhatsApp (tema claro) */
.wa { --wa-bg: #efeae2; --wa-panel: #ffffff; --wa-head: #ffffff; --wa-in: #ffffff; --wa-out: #d9fdd3; --wa-green: #00a884; --wa-muted: #667781; --wa-line: var(--border); --wa-ink: #111b21;
  background: var(--wa-panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 4px; box-shadow: var(--shadow); }
.wa-cover { height: 72px; background: linear-gradient(120deg, var(--accent), #ff8a3d); }
.wa-head { display: flex; align-items: flex-end; gap: 14px; background: var(--wa-head); padding: 0 16px 12px; margin-top: -26px; }
.wa-head .grow { flex: 1; min-width: 0; }
.wa-actions { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) { .wa-head { flex-wrap: wrap; } .wa-actions { order: 3; width: 100%; } .wa-actions .btn { flex: 1; justify-content: center; } }
.wa-head h1 { font-size: 22px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-avatar { width: 44px; height: 44px; border-radius: 50%; background: #dfe5e7; display: grid; place-items: center; font-size: 20px; flex: none; overflow: hidden; }
.wa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wa-head .wa-avatar { width: 76px; height: 76px; font-size: 32px; border-radius: 10px; border: 4px solid var(--surface); box-shadow: 0 1px 4px rgba(20,20,30,.18); }
.wa-avatar.xl { width: 104px; height: 104px; font-size: 46px; margin: 0 auto 10px; }
.wa-state { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface2); border-radius: 4px; padding: 3px 9px; white-space: nowrap; margin-bottom: 6px; }
.wa-state.on { color: var(--ok); background: #e5f5ec; } .wa-state.off { color: var(--warn); background: #fff3dc; }
.wa-tabs { display: flex; background: var(--wa-head); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.wa-tabs::-webkit-scrollbar { display: none; }
.wa-tabs a { color: var(--muted); font-weight: 700; font-size: 14px; padding: 11px 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.wa-tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.wa-tabs b { background: var(--surface2); border-radius: 99px; padding: 0 7px; font-size: 11.5px; margin-left: 2px; }
.wa-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff8e8; color: #7a4a00; font-size: 13.5px; padding: 10px 16px; border-bottom: 1px solid #f1d9a4; }
.wa-chat { background: var(--wa-bg); background-image: radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px); background-size: 18px 18px;
  height: min(50vh, 560px); overflow-y: auto; padding: 12px 5%; display: flex; flex-direction: column; gap: 4px; color: var(--wa-ink); }
.wa-chat.mini { height: auto; border-radius: 8px; padding: 12px; }
.wa-day, .wa-sys { align-self: center; background: #ffffff; color: var(--wa-muted); font-size: 12.5px; border-radius: 8px; padding: 5px 12px; margin: 6px 0; text-align: center; max-width: 92%; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-sys { background: #ffeecd; color: #54656f; }
.wa-day { text-transform: uppercase; font-size: 11.5px; letter-spacing: .02em; }
.wa-msg { max-width: min(82%, 460px); border-radius: 8px; padding: 6px 9px 5px; font-size: 14.2px; line-height: 1.38; color: var(--wa-ink); box-shadow: 0 1px .5px rgba(11,20,26,.13); display: block; }
a.wa-msg:hover { color: var(--wa-ink); }
.wa-msg.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 0; }
.wa-msg.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 0; }
.wa-text { white-space: pre-wrap; word-break: break-word; }
.wa-name { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.wa-img { display: block; width: 100%; max-width: 260px; max-height: 300px; object-fit: cover; border-radius: 6px; margin: 2px 0 5px; }
.wa-meta { font-size: 11px; color: var(--wa-muted); text-align: right; margin-top: 2px; }
.wa-meta.err { color: var(--err); }
.wa-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px 0; background: #f0f2f5; scrollbar-width: none; }
.wa-quick::-webkit-scrollbar { display: none; }
.wa-quick button { background: #ffffff; color: var(--wa-ink); border: 1px solid var(--border); border-radius: 99px; padding: 6px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 34px; }
.wa-quick button:hover { border-color: var(--accent); color: var(--accent-dark); }
.wa-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 10px; background: #f0f2f5; }
.wa-compose textarea { flex: 1; min-height: 42px; height: 42px; resize: none; border: 0; border-radius: 21px; background: #ffffff; padding: 10px 16px; font-size: 15px; line-height: 1.4; }
.wa-compose textarea:focus { outline: 2px solid var(--wa-green); }
.wa-compose button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--wa-green); color: #fff; font-size: 18px; cursor: pointer; flex: none; }
.wa-pad { padding: 16px; }
.wa-info { text-align: center; padding: 8px 0 14px; }
.wa-info h2 { font-size: 20px; margin: 0 0 2px; }
.wa-block { border-top: 8px solid var(--bg); margin: 0 -16px; padding: 14px 16px; }
.wa-block > label:first-child { color: var(--accent-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; margin-bottom: 6px; }
.wa-desc { white-space: pre-wrap; word-break: break-word; }
.wa-admin { font-size: 11px; font-weight: 700; color: var(--wa-green); background: #e7f8f3; border-radius: 4px; padding: 1px 6px; }
.wa .item.dim { opacity: .5; }
[hidden] { display: none !important; }
.chatlist .last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chatlist .chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.wa-msg a { color: #027eb5; }
.wa-at { color: #027eb5; }
.wa-text code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: rgba(0,0,0,.06); }
.wa-del { font-style: italic; color: var(--wa-muted); }
.wa-quote { background: rgba(0,0,0,.05); border-left: 4px solid #06cf9c; border-radius: 6px; padding: 5px 9px; margin-bottom: 4px; font-size: 13px; display: flex; flex-direction: column; }
.wa-quote b { color: #008069; font-weight: 600; }
.wa-quote span { color: var(--wa-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.wa-msg.sticker { background: none; box-shadow: none; padding: 0; }
.wa-sticker { width: 140px; height: 140px; object-fit: contain; display: block; }
.wa-audio { display: block; width: 250px; max-width: 100%; height: 40px; margin: 2px 0; }
.wa-doc { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.05); border-radius: 6px; padding: 9px 10px; margin-bottom: 3px; color: var(--wa-ink) !important; font-size: 13.5px; }
.wa-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-opt { background: rgba(0,0,0,.05); border-radius: 6px; padding: 5px 9px; margin-top: 4px; font-size: 13.5px; }
.wa-workout { display: block; margin-top: 4px; background: var(--accent-soft); border-radius: 6px; padding: 4px 8px; font-size: 12.5px; font-weight: 700; color: var(--accent-dark) !important; }
.wa-react { display: inline-block; background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 1px 7px; font-size: 13px; margin: 2px 0 -12px; position: relative; top: 4px; }
.wa-msg:has(.wa-react) { margin-bottom: 12px; }
video.wa-img { max-height: 320px; background: #000; }

/* navegação sem recarregar (Turbo) */
.turbo-progress-bar { height: 3px; background: var(--accent); }

@media (min-width: 760px) {
  body:not(:has(.tabbar)) { padding-bottom: 24px; }
  .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .fields { grid-template-columns: 1fr 1fr; } .fields.c3 { grid-template-columns: repeat(3, 1fr); }
  .wk { grid-template-columns: 300px 1fr; }
  .badges { grid-template-columns: repeat(3, 1fr); } .photos { grid-template-columns: repeat(6, 1fr); }
  .lb .hide-sm { display: table-cell; }
  h1 { font-size: 28px; }
}
/* desktop: menu no topo; abaixo disso o menu fica nas abas de baixo, como um app */
@media (min-width: 960px) {
  body { padding-bottom: 24px; }
  .tabbar { display: none; }
  .mainnav { display: flex; }
  .topbar .in { padding: 0 24px; }
  main { padding: 24px; }
  .dash { grid-template-columns: 270px minmax(0, 1fr) 310px; align-items: start; }
  .dash > aside { position: sticky; top: 76px; }
  .narrow { max-width: 820px; margin: 0 auto; }
}

/* Ícones de linha (src/icons.js) */
.ico { flex: none; vertical-align: -.18em; }
h2 .ico { color: var(--accent); margin-right: 4px; }
.btn .ico, .wa-quick .ico, .tag .ico, .chip .ico { vertical-align: -.2em; }
.avatar.ic { background: var(--accent-soft); color: var(--accent); }
.avatar.medal { color: #fff; } .avatar.m1 { background: #e0a100; } .avatar.m2 { background: #9aa3ad; } .avatar.m3 { background: #b9703a; }
.wa-avatar { color: #8696a0; }
.wa-compose button { display: grid; place-items: center; }
.menu-list a .ico { color: var(--muted); } .menu-list a:hover .ico, .menu-list a.on .ico { color: var(--accent); }
.menu > summary:focus { outline: none; } .menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.flash .ico { margin-right: 4px; }

/* Campo com prefixo fixo (ex.: ntng.team/ + nome de usuário) */
.prefix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.prefix > span { display: flex; align-items: center; padding: 0 2px 0 12px; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--surface2); padding-right: 8px; }
.prefix > input { border: 0 !important; box-shadow: none !important; outline: none; flex: 1; min-width: 0; border-radius: 0; }
