/* =========================================================
   Prancheta — mobile first (celular é o uso principal)
   ========================================================= */
:root {
  --verde: #0E3B2E;
  --verde-2: #165A45;
  --verde-3: #2C6B55;
  --lima: #C8F04A;
  --lima-2: #EEFAC8;
  --bg: #F2F4F0;
  --card: #FFFFFF;
  --txt: #15211C;
  --muted: #64736C;
  --line: #E4E9E3;
  --ok: #1F8A4C;
  --ok-bg: #E3F4E8;
  --atencao: #A86B12;
  --atencao-bg: #FDF3DC;
  --alerta: #C2410C;
  --alerta-bg: #FDE8DD;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(14,59,46,.05), 0 2px 10px rgba(14,59,46,.05);
  --appbar-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}
body.com-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }
body.sem-tabbar { padding-bottom: calc(84px + var(--safe-bottom)); }
a { color: var(--verde-2); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
small, .muted { color: var(--muted); }
img { max-width: 100%; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.desk-only { display: none !important; }

/* ---------- barra de carregamento ---------- */
#loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--lima); z-index: 100; transition: width .3s ease, opacity .3s; opacity: 0; }
#loadbar.on { opacity: 1; width: 75%; transition: width 4s cubic-bezier(.1,.7,.2,1); }

/* ---------- barra do app (celular) ---------- */
.topbar { display: none; }
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .35rem;
  height: calc(var(--appbar-h) + var(--safe-top)); padding: var(--safe-top) .35rem 0;
  background: var(--verde); color: #fff;
}
.appbar-logo { width: 32px; height: 32px; background: #fff; border-radius: 9px; padding: 2px; margin: 0 .45rem 0 .55rem; }
.appbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; align-items: center; }
.appbar-btn { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border-radius: 12px; background: none; border: 0; text-decoration: none; cursor: pointer; }
.appbar-btn:active { background: rgba(255,255,255,.12); }
.appbar-btn .ico { width: 24px; height: 24px; }

/* ---------- barra de abas inferior ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #7B8983; text-decoration: none; font-size: .68rem; font-weight: 600; }
.tab-item.active { color: var(--verde); }
.tab-item.active .ico { stroke-width: 2.3; }
.tab-main-btn { width: 52px; height: 52px; margin-top: -24px; border-radius: 18px; background: var(--verde); color: var(--lima); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(14,59,46,.35); border: 3px solid var(--bg); }
.tab-main-btn .ico { width: 26px; height: 26px; stroke-width: 2.1; }
.tab-main:active .tab-main-btn { transform: scale(.94); }

/* ---------- toast (mensagens) ---------- */
.toast {
  position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(var(--appbar-h) + var(--safe-top) + 10px);
  display: flex; gap: .6rem; align-items: center; padding: .85rem 1rem; border-radius: 14px;
  font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: toastIn .3s ease;
}
.toast.sair { animation: toastOut .3s ease forwards; }
.toast-sucesso { background: var(--verde); color: #fff; } .toast-sucesso .ico { color: var(--lima); }
.toast-erro { background: #8A2E08; color: #fff; }
.toast-info { background: #1E4E86; color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 500; }
.alert-erro { background: var(--alerta-bg); color: #8A2E08; }
.alert-info { background: #E6F0FB; color: #1E4E86; }

/* ---------- layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 14px 14px 20px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { display: none; }
.page-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.page-head .actions { display: none; }
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.3rem .25rem .5rem; display: flex; justify-content: space-between; align-items: center; }
.section-title a { text-transform: none; letter-spacing: 0; font-size: .85rem; text-decoration: none; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; margin-bottom: .9rem; }
.card > h2:first-child { margin-bottom: .75rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: .75rem; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .85rem .95rem; text-decoration: none; color: inherit; display: block; }
.stat .lbl { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stat .val { font-size: 1.55rem; font-weight: 800; color: var(--verde); line-height: 1.2; margin-top: .15rem; }
.stat .val small { font-size: .85rem; font-weight: 600; }
.stat .sub { font-size: .78rem; color: var(--muted); margin-top: .1rem; }

/* ---------- listas estilo app ---------- */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: .9rem; }
.list-item { display: flex; align-items: center; gap: .8rem; padding: .8rem .95rem; min-height: 64px; color: var(--txt); text-decoration: none; border-bottom: 1px solid var(--line); position: relative; }
.list-item:last-child { border-bottom: 0; }
a.list-item:active, .list-item.tap:active { background: #F4F7F2; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-right { text-align: right; font-size: .78rem; color: var(--muted); flex-shrink: 0; }
.list-item > .ico:last-child { color: #A9B5AF; width: 18px; height: 18px; }
.list-empty { padding: 1.2rem 1rem; color: var(--muted); font-size: .9rem; }
.li-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--lima-2); color: var(--verde); display: grid; place-items: center; flex-shrink: 0; }
.li-date { width: 46px; text-align: center; flex-shrink: 0; line-height: 1.1; }
.li-date b { display: block; font-size: 1.15rem; color: var(--verde); }
.li-date span { font-size: .68rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 12px; min-height: 46px; padding: .6rem 1.05rem; font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; background: var(--verde); color: #fff; white-space: nowrap;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn .ico { width: 20px; height: 20px; }
.btn-lima { background: var(--lima); color: var(--verde); }
.btn-ghost { background: #fff; color: var(--verde-2); border: 1px solid #D5DDD6; }
.btn-danger { background: #fff; color: var(--alerta); border: 1px solid #F3C9B5; }
.btn-sm { min-height: 36px; padding: .35rem .75rem; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.carregando { opacity: .65; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.actions-grid .btn { width: 100%; }

.fab {
  position: fixed; z-index: 35; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  height: 56px; min-width: 56px; padding: 0 1.15rem; border-radius: 18px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--lima); color: var(--verde); font: inherit; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 22px rgba(14,59,46,.28);
}
.fab .ico { width: 24px; height: 24px; stroke-width: 2.4; }
.fab:active { transform: scale(.96); }

/* ---------- formulários ---------- */
form .row { display: grid; gap: .8rem; grid-template-columns: 1fr; margin-bottom: .8rem; }
form .row.nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: .82rem; font-weight: 600; color: #34443D; }
.field .hint { font-size: .75rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .65rem .8rem; border: 1px solid #CBD4CD; border-radius: 12px;
  font: inherit; font-size: 16px; /* evita zoom automático no iPhone */
  background: #fff; color: var(--txt); appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364736C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 18px; padding-right: 2.2rem; }
input[type=date] { display: block; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(200,240,74,.7); outline-offset: 0; border-color: var(--verde-3); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--verde-2); }
input[type=file] { font-size: .9rem; max-width: 100%; }
textarea { min-height: 100px; resize: vertical; }
.input-unit { position: relative; }
.input-unit input { padding-right: 2.7rem; font-weight: 600; }
.input-unit span { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; pointer-events: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.req::after { content: ' *'; color: var(--alerta); }
.form-section { padding: 1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .9rem; }
.form-section > h2 { margin-bottom: .75rem; }
.check-row { display: flex; gap: .65rem; align-items: center; min-height: 44px; }

.form-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: .5rem; padding: .65rem .85rem calc(.65rem + var(--safe-bottom));
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.form-footer .btn { flex: 1; }
.form-footer .btn-icon { flex: 0 0 48px; padding: 0; }

.seg { display: flex; background: #E6ECE6; border-radius: 12px; padding: 3px; gap: 2px; }
.seg label { flex: 1; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: .35rem .5rem; border-radius: 10px; font-weight: 600; font-size: .86rem; color: var(--muted); line-height: 1.2; }
.seg input:checked + span { background: #fff; color: var(--verde); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--lima); }

/* escala 1–5 do check-in */
.escala { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.escala label { cursor: pointer; position: relative; }
.escala input { position: absolute; opacity: 0; }
.escala span { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .6rem .1rem; border: 2px solid var(--line); border-radius: 14px; font-size: .66rem; line-height: 1.15; color: var(--muted); text-align: center; background: #fff; min-height: 76px; }
.escala span b { font-size: 1.6rem; line-height: 1; }
.escala input:checked + span { border-color: var(--verde-2); background: var(--lima-2); color: var(--verde); font-weight: 700; transform: scale(1.04); }
.escala input:focus-visible + span { outline: 2px solid var(--verde-3); }

/* ---------- wizard da avaliação (celular) ---------- */
.steps { display: none; }
.wizard .steps {
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  position: sticky; top: calc(var(--appbar-h) + var(--safe-top)); z-index: 30;
  margin: -14px -14px 12px; padding: .6rem 14px; background: var(--bg);
}
.wizard .steps::-webkit-scrollbar { display: none; }
.step-chip { flex-shrink: 0; display: flex; align-items: center; gap: .35rem; border: 0; background: #fff; color: var(--muted); border-radius: 999px; padding: .45rem .8rem; font: inherit; font-size: .82rem; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.step-chip i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #E6ECE6; font-size: .72rem; }
.step-chip.active { background: var(--verde); color: #fff; }
.step-chip.active i { background: var(--lima); color: var(--verde); }
.step-chip.done i { background: var(--ok); color: #fff; }
.wizard [data-step] { display: none; }
.wizard [data-step].active { display: block; animation: stepIn .2s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } }
.wizard-only { display: none; }
.wizard .wizard-only { display: flex; }
.wizard .no-wizard { display: none !important; }

/* ---------- atletas ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-ini { display: inline-grid; place-items: center; background: var(--lima-2); color: var(--verde); font-weight: 800; font-size: .9rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }
.atleta-cell { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.atleta-cell a { font-weight: 600; text-decoration: none; color: var(--txt); }

.perfil { text-align: center; padding: 1.2rem 1rem 1rem; }
.perfil .avatar { margin: 0 auto .55rem; display: block; }
.perfil .avatar-ini { display: grid; }
.perfil h1 { font-size: 1.3rem; margin-bottom: .3rem; }
.perfil .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .5rem; color: var(--muted); font-size: .85rem; }
.perfil .actions { justify-content: center; margin-top: .9rem; }

.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #E9EEE9; color: #34443D; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-atencao { background: var(--atencao-bg); color: var(--atencao); }
.badge-alerta { background: var(--alerta-bg); color: var(--alerta); }
.badge-lima { background: var(--lima); color: var(--verde); }

.searchbar { position: sticky; top: calc(var(--appbar-h) + var(--safe-top)); z-index: 30; margin: -14px -14px 10px; padding: 10px 14px; background: var(--bg); }
.searchbar .search-wrap { position: relative; }
.searchbar .search-wrap .ico { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.searchbar input[type=search] { padding-left: 2.6rem; border-radius: 14px; border-color: transparent; box-shadow: var(--shadow); }
.chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-top: .55rem; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: .4rem .85rem; border-radius: 999px; background: #fff; color: #34443D; font-size: .82rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow); white-space: nowrap; }
.chip.active { background: var(--verde); color: #fff; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty .ico { width: 54px; height: 54px; opacity: .5; }
.empty h2 { color: var(--txt); }

/* evolução */
.evo-pos { color: var(--ok); font-weight: 700; white-space: nowrap; }
.evo-neg { color: var(--alerta); font-weight: 700; white-space: nowrap; }
.pbar { position: relative; height: 8px; background: #E6ECE6; border-radius: 99px; min-width: 60px; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--verde-3); }
.pbar.alto i { background: var(--ok); }
.pbar.baixo i { background: var(--alerta); }

.teste-card { padding: .85rem .95rem; border-bottom: 1px solid var(--line); }
.teste-card:last-child { border-bottom: 0; }
.teste-card .tc-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.teste-card .tc-nome { font-weight: 700; }
.teste-card .tc-val { font-weight: 800; font-size: 1.1rem; color: var(--verde); white-space: nowrap; }
.teste-card .tc-val small { font-weight: 600; }
.teste-card .tc-bottom { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; font-size: .78rem; color: var(--muted); }
.teste-card .pbar { flex: 1; }

.lista-pontos { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.lista-pontos li { padding: .6rem .75rem; border-radius: 10px; font-size: .9rem; background: #F4F7F2; }
.lista-pontos.fortes li { background: var(--ok-bg); }
.lista-pontos.focar li { background: var(--atencao-bg); }
.lista-pontos.alertas li { background: var(--alerta-bg); }

/* gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #E7ECE7; stroke-width: 1; }
.chart .axis { fill: #7A8881; font-size: 12px; font-family: Inter, sans-serif; }
.chart .line { fill: none; stroke: var(--verde-2); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--lima); opacity: .25; }
.chart .dot { fill: #fff; stroke: var(--verde-2); stroke-width: 2; }
.chart .dot-last { fill: var(--lima); stroke: var(--verde); }
.chart .val { fill: #34443D; font-size: 12px; font-weight: 600; font-family: Inter, sans-serif; }
.chart .val-last { fill: var(--verde); font-weight: 800; }
.chart-vazio { color: var(--muted); font-size: .85rem; padding: 1.5rem; text-align: center; }
.charts-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.chart-box h3 { margin-bottom: .1rem; }
.chart-box .muted { font-size: .76rem; }
.charts-scroll { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 6px; scrollbar-width: none; }
.charts-scroll::-webkit-scrollbar { display: none; }
.charts-scroll .chart-box { flex: 0 0 86%; scroll-snap-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem; }
.regua { width: 100%; height: auto; display: block; }
.regua .faixa-ok { fill: #9FD8B3; } .regua .faixa-atencao { fill: #F6D58E; } .regua .faixa-alerta { fill: #F4B094; }
.regua .axis { fill: #7A8881; font-size: 11px; font-family: Inter, sans-serif; }
.regua .marcador { fill: var(--verde); } .regua .marcador-linha { stroke: var(--verde); stroke-width: 3; }

/* abas (segmentos) */
.tabs { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--appbar-h) + var(--safe-top)); z-index: 30; margin: 0 -14px 12px; padding: .55rem 14px; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; padding: .45rem .9rem; text-decoration: none; color: #34443D; font-weight: 600; font-size: .86rem; border-radius: 999px; background: #fff; box-shadow: var(--shadow); white-space: nowrap; }
.tabs a.active { background: var(--verde); color: #fff; }

/* calculado ao vivo */
.calc-box { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--verde); color: #fff; border-radius: 14px; padding: .9rem 1rem; margin-top: .4rem; }
.calc-box div span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #A9C7BA; }
.calc-box div b { font-size: 1.15rem; }
.calc-box .badge { margin-top: .2rem; }

.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-size: 14px; min-width: 0; }

/* tabelas (no celular viram cartões) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- login / páginas públicas ---------- */
body.auth { background: var(--verde); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: calc(2rem + var(--safe-top)) 1.5rem 1.5rem; }
.auth-top img { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-bottom: 1rem; }
.auth-top h1 { font-size: 1.8rem; margin: 0; }
.auth-top p { color: #BFD8CC; margin: .3rem 0 0; }
.auth-card { background: #fff; border-radius: 26px 26px 0 0; padding: 1.6rem 1.25rem calc(1.6rem + var(--safe-bottom)); }
.auth-card .field { margin-bottom: .9rem; }
body.auth .container { padding: 0; max-width: none; }
body.publico .container { max-width: 620px; }
body.publico { padding-bottom: 1.5rem; }
.pub-head { background: var(--verde); color: #fff; padding: calc(1.2rem + var(--safe-top)) 1rem 3.2rem; text-align: center; }
.pub-head img { width: 54px; height: 54px; border-radius: 15px; }
.pub-head h1 { font-size: 1.35rem; margin: .5rem 0 .15rem; }
.pub-head p { color: #BFD8CC; margin: 0; font-size: .9rem; }
.pub-body { margin-top: -2.4rem; }

/* instalar app */
.install-card { display: flex; gap: .85rem; align-items: center; background: linear-gradient(135deg, var(--verde), var(--verde-2)); color: #fff; border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .9rem; }
.install-card img { width: 46px; height: 46px; border-radius: 12px; }
.install-card div { flex: 1; font-size: .85rem; color: #CFE3DA; }
.install-card strong { color: #fff; display: block; font-size: .95rem; }
.passo { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .6rem; }
.passo b { width: 26px; height: 26px; border-radius: 50%; background: var(--lima); color: var(--verde); display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; }

/* folha de relatório no celular */
.rel-toolbar.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0; max-width: none; padding: .65rem .85rem calc(.65rem + var(--safe-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.rel-toolbar.mobile-bar .btn { flex: 1; }

/* =========================================================
   Computador (telas largas)
   ========================================================= */
@media (min-width: 861px) {
  body.com-tabbar, body.sem-tabbar { padding-bottom: 2rem; }
  .appbar, .tabbar, .fab, .mobile-only { display: none !important; }
  .desk-only { display: initial !important; }
  .container { padding: 1.5rem 1.25rem 2.5rem; }
  .topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.5rem; background: var(--verde); color: #fff; padding: .6rem 1.25rem; }
  .brand { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
  .brand-logo { width: 34px; height: 34px; background: #fff; border-radius: 9px; padding: 2px; }
  .brand-name { font-weight: 800; font-size: 1.15rem; }
  .topbar-links { display: flex; gap: .25rem; flex: 1; }
  .topbar-links a { color: #CFE3DA; text-decoration: none; padding: .45rem .75rem; border-radius: 8px; font-weight: 500; }
  .topbar-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .topbar-links a.active { background: rgba(200,240,74,.16); color: var(--lima); }
  .user-menu { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
  .user-chip { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lima); color: var(--verde); font-weight: 800; font-size: .8rem; text-decoration: none; }
  .logout-link { color: #CFE3DA; font-size: .9rem; text-decoration: none; }
  .toast { left: auto; right: 20px; top: 72px; max-width: 420px; }
  .page-head { margin-bottom: 1.25rem; }
  .page-head h1 { display: block; margin: 0 0 .2rem; }
  .page-head .actions { display: flex; }
  .grid { gap: 1rem; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card, .form-section { padding: 1.2rem; }
  form .row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  form .row.nums { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .form-footer { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); border: 0; backdrop-filter: none; justify-content: flex-end; padding: 1rem 0 .5rem; }
  .form-footer .btn { flex: 0 0 auto; }
  .seg { display: inline-flex; }
  .seg label { flex: 0 0 auto; }
  .seg span { padding: .35rem .9rem; }
  .calc-box { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .charts-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .charts-scroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .tabs { position: static; margin: 0 0 1rem; padding: 0; }
  .searchbar { position: static; margin: 0 0 1rem; padding: 0; }
  .list-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .6rem; background: none; box-shadow: none; overflow: visible; }
  .list-cols .list-item { background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 0; }
  a.list-item:hover { background: #FAFBF9; }
  .perfil { display: flex; align-items: center; gap: 1.1rem; text-align: left; }
  .perfil .avatar { margin: 0; }
  .perfil .info { flex: 1; }
  .perfil .meta { justify-content: flex-start; }
  .perfil .actions { margin: 0; }
  .auth-wrap { justify-content: center; align-items: center; background: var(--verde); }
  .auth-top { flex: 0; padding: 0 0 1.5rem; }
  .auth-card { width: 400px; border-radius: 22px; }
  .rel-toolbar.mobile-bar { position: static; background: none; border: 0; max-width: 210mm; margin: 1rem auto; padding: 0 1rem; }
  .rel-toolbar.mobile-bar .btn { flex: 0 0 auto; }
}

/* tabelas responsivas: no celular cada linha vira um cartão */
@media (max-width: 860px) {
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .tbl-cards td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tbl-cards td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; }
  .tbl-cards td.td-title { font-weight: 700; text-align: left; }
  .tbl-cards td.td-title::before { content: none; }
}

/* ---------- relatório (A4) ---------- */
body.relatorio-body { background: #DDE3DD; }
.rel-toolbar { max-width: 210mm; margin: 1rem auto; display: flex; gap: .5rem; justify-content: space-between; flex-wrap: wrap; padding: 0 1rem; }
.folha { width: 210mm; min-height: 297mm; margin: 0 auto 1rem; background: #fff; padding: 12mm 13mm; box-shadow: 0 6px 24px rgba(0,0,0,.12); font-size: 12.5px; }
.rel-head { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid var(--verde); padding-bottom: 8px; margin-bottom: 12px; }
.rel-head img.rel-logo { width: 46px; height: 46px; }
.rel-head .t1 { font-size: 18px; font-weight: 800; color: var(--verde); line-height: 1.1; }
.rel-head .t2 { font-size: 11.5px; color: var(--muted); }
.rel-head .rel-data { margin-left: auto; text-align: right; font-size: 11px; color: var(--muted); }
.rel-atleta { display: flex; gap: 12px; align-items: center; background: #F4F7F2; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.rel-atleta .avatar { width: 58px; height: 58px; }
.rel-atleta .nome { font-size: 17px; font-weight: 800; }
.rel-atleta .dados { display: grid; grid-template-columns: repeat(4, auto); gap: 2px 18px; font-size: 11.5px; margin-top: 3px; }
.rel-atleta .dados span { color: var(--muted); }
.rel-sec { margin-bottom: 12px; break-inside: avoid; }
.rel-sec h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--verde); border-left: 4px solid var(--lima); padding-left: 7px; margin-bottom: 7px; }
.rel-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rel-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.rel-kpi span { display: block; font-size: 9.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.rel-kpi b { font-size: 16px; color: var(--verde); }
.rel-kpi em { display: block; font-style: normal; font-size: 10px; }
.folha table th, .folha table td { padding: 4px 6px; font-size: 11.5px; }
.folha table th { font-size: 9.5px; }
.rel-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rel-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.rel-charts h3 { font-size: 11px; margin: 0; }
.folha .lista-pontos li { padding: 5px 8px; font-size: 11.5px; }
.rel-obs { border: 1px dashed #B9C5BD; border-radius: 8px; padding: 8px 10px; min-height: 50px; white-space: pre-line; }
.rel-assin { display: flex; justify-content: space-between; gap: 30px; margin-top: 22px; font-size: 11px; color: var(--muted); }
.rel-assin div { flex: 1; border-top: 1px solid #889; text-align: center; padding-top: 4px; }
.rel-rodape { margin-top: 10px; font-size: 10px; color: var(--muted); text-align: center; }
@media (max-width: 230mm) {
  .folha { width: 100%; min-height: 0; padding: 16px; }
  .rel-kpis { grid-template-columns: repeat(3, 1fr); }
  .rel-2col, .rel-charts { grid-template-columns: 1fr; }
  .rel-atleta .dados { grid-template-columns: repeat(2, auto); }
}

@page { size: A4; margin: 0; }
@media print {
  body, body.relatorio-body { background: #fff; padding: 0; }
  .no-print, .topbar, .bottom-nav, .flash, .rel-toolbar { display: none !important; }
  .container { padding: 0; max-width: none; }
  .folha { box-shadow: none; margin: 0; width: 210mm; min-height: 297mm; padding: 10mm 12mm; page-break-after: always; }
  .folha:last-child { page-break-after: auto; }
  .rel-kpis { grid-template-columns: repeat(6, 1fr); }
  .rel-2col, .rel-charts { grid-template-columns: 1fr 1fr; }
  .rel-atleta .dados { grid-template-columns: repeat(4, auto); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
