/* ---------------------------------------------------------------------------
   Lane by Athletica - aplicacao mobile (PWA)

   Traducao fiel de design-reference/Lane Mobile.dc.html e Lane Estados.dc.html.
   Principio estrutural: listas full-bleed em superficie branca sobre fundo
   cinzento, separadas por linhas de 1px. Nada de cartoes arredondados.
   --------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font-family: inherit; }

/* iOS/Safari aplica zoom automatico ao focar um campo com menos de 16px.
   Fixar o minimo aqui resolve a causa sem desligar o zoom do utilizador
   (nada de maximum-scale, que quebraria a acessibilidade). */
input, textarea, select { font-size: 16px; max-width: 100%; }

/* Sem espera de duplo toque: evita o zoom acidental em botoes e linhas. */
button, a, .row, .prova, .chip, [role="button"] { touch-action: manipulation; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* Componentes com display proprio teriam prioridade sobre o [hidden] do
   browser: aqui o atributo volta a ganhar. */
[hidden] { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--surface); padding: 12px 16px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

@keyframes sheetUp { from { transform: translateY(101%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes shimmer { from { background-position: -260px 0; } to { background-position: 260px 0; } }
@keyframes toastUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------
   Estrutura
   --------------------------------------------------------------------------- */

.shell {
    max-width: var(--content-max);
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    position: relative;
}

.main {
    flex: 1;
    padding-bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom));
}

.main--flush { padding-bottom: env(safe-area-inset-bottom); }

/* --- Header com gradiente de marca --- */

.hdr {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(178deg, var(--brand-hi) 0%, var(--brand) 82%);
    color: #fff;
    padding-top: env(safe-area-inset-top);
}

.hdr__row {
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    gap: 4px;
    padding: 12px 16px 14px;
}

.hdr__side { display: flex; }
.hdr__side--end { justify-content: flex-end; }

.hdr__btn {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border: 0; border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
}
.hdr__btn--plain { background: none; width: 32px; }
.hdr__btn:active { opacity: .75; }

.hdr__title { text-align: center; min-width: 0; }
.hdr__title strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }

.hdr__admin {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 4px; padding: 2px 7px 2px 6px;
    background: rgba(255, 255, 255, .22);
    border-radius: var(--r-sm);
    font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
    line-height: 1.5;
}

/* Início: logótipo oficial (versão para fundo escuro) no lugar do título.
   O selo ADMIN fica ao lado, para o cabeçalho manter a mesma altura. */
.hdr__title--brand { display: flex; align-items: center; justify-content: center; gap: 8px; }
.hdr__brand { margin: 0; line-height: 0; }
.hdr__logo { height: 44px; width: 44px; object-fit: contain; display: block; }
.hdr__title--brand .hdr__admin { margin-top: 0; }

/* ---------------------------------------------------------------------------
   Blocos de conteudo
   --------------------------------------------------------------------------- */

/* Cabecalho de seccao sobre o fundo cinzento */
.sec {
    padding: 11px 22px 8px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .09em;
    color: var(--label);
    text-transform: uppercase;
}

.sec--row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.sec__link {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0;
    text-transform: none;
    background: none; border: 0; padding: 0; cursor: pointer;
}

/* Superficie branca full-bleed */
.card {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.card--gap { margin-bottom: 9px; }
.card--pad { padding: 14px 20px; }

/* Linha de lista */
.row {
    width: 100%;
    background: var(--surface);
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.row:last-child { border-bottom: 0; }
.row:active { background: var(--surface-active); }
.row--static { cursor: default; }
.row--static:active { background: var(--surface); }
.row--top { align-items: flex-start; }

.row__body { flex: 1; min-width: 0; }
.row__title { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.row__meta { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.row__hint { font-size: 13px; font-weight: 650; color: var(--text-3); }
.row__icon { flex: none; display: grid; place-items: center; color: var(--text-3); }
.chev { color: var(--text-4); flex: none; }

/* Avatar */
.av {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid; place-items: center;
    font-size: 14.5px; font-weight: 800;
    flex: none;
}
.av--sm { width: 32px; height: 32px; font-size: 12px; }
.av--md { width: 38px; height: 38px; font-size: 13.5px; }
.av--soft { background: var(--brand-soft); color: var(--brand); }

.av-stack { display: flex; }
.av-stack .av {
    width: 26px; height: 26px; font-size: 10px;
    border: 2px solid var(--surface);
    margin-left: -7px;
}
.av-stack .av:first-child { margin-left: 0; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    font-size: 11px; font-weight: 800; letter-spacing: .05em;
    background: var(--neutral-soft); color: var(--neutral-ink);
    white-space: nowrap;
}
.badge--ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge--pend { background: var(--warn-soft); color: var(--warn-ink); }
.badge--brand { background: var(--brand-soft); color: var(--brand); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--light { background: rgba(255, 255, 255, .92); color: var(--text); }

/* Chips
   Usados em <a>, <label> e <button>: o display é explícito para que os três
   tenham exatamente a mesma caixa (um <a> é inline por omissão e ficava sem
   altura nem alinhamento). */
.chip {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 36px;
    border: 1px solid var(--field-border);
    background: var(--field);
    color: var(--text);
    border-radius: var(--r-md);
    padding: 0 13px;
    font-size: 14px; font-weight: 700; line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip[aria-pressed="true"], .chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chip-row::-webkit-scrollbar { height: 0; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* Segmented control
   Próximas/Anteriores, Quotas/Anuidades, Todas/Pendentes/Confirmadas.
   Os segmentos são links: sem display próprio ficavam inline, com o texto
   encostado à esquerda e sem altura. Agora cada segmento é uma caixa flex de
   largura igual, texto centrado e altura fixa. */
.seg-wrap { padding: 12px 20px; }

.seg {
    display: flex;
    gap: 2px;
    background: var(--surface-sunken);
    border-radius: var(--r-md);
    padding: 3px;
}
.seg__btn {
    flex: 1 1 0; min-width: 0;
    display: flex; align-items: center; justify-content: center;
    min-height: 36px; padding: 0 10px;
    border: 0; border-radius: 9px;
    font-size: 14px; font-weight: 700; line-height: 1.2;
    text-align: center; text-decoration: none; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    background: transparent; color: var(--neutral-ink);
    cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.seg__btn:active { background: rgba(255, 255, 255, .6); }
.seg__btn.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(17, 17, 20, .14); }

/* Contexto de uma página aberta a partir de outra (ex.: inscritos de uma
   competição). Deixa claro onde se está antes de se confirmar alguma coisa. */
.context-bar {
    display: grid;
    gap: 2px;
    padding: 14px 20px 12px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
}
.context-bar__label { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); }
.context-bar__title { font-size: 17px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.context-bar__meta { font-size: 13px; color: var(--text-2); }

/* Botoes */
/* Três alturas e só três: 36 (sm), 44 (normal) e 52 (lg). A altura vem de
   min-height e não do padding, para <a> e <button> ficarem iguais. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    border: 0; border-radius: var(--r-lg);
    padding: 0 18px;
    background: var(--brand); color: #fff;
    font-size: 15px; font-weight: 700; line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}
.btn:active { opacity: .82; }
.btn[disabled] { background: var(--line-strong); color: #9A9AA4; cursor: not-allowed; opacity: 1; }
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; border-radius: var(--r-xl); padding: 0 20px; font-size: 16.5px; font-weight: 750; }
.btn--soft { background: var(--field); color: var(--text); }
.btn--ok { background: var(--ok-soft); color: var(--ok-ink); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--ghost { background: none; color: var(--text-2); font-weight: 650; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: var(--r-md); }

.btn.is-busy { position: relative; color: transparent; pointer-events: none; }
.btn.is-busy::after {
    content: ""; position: absolute; width: 17px; height: 17px;
    border: 2px solid #fff; border-top-color: transparent; border-radius: 50%;
    animation: spin .7s linear infinite;
}

.icon-btn {
    width: 30px; height: 30px;
    border: 0; border-radius: 9px;
    background: var(--surface-active);
    display: grid; place-items: center;
    cursor: pointer; flex: none;
}
.icon-btn--field { background: var(--field); width: 32px; height: 32px; border-radius: 10px; }

/* ---------------------------------------------------------------------------
   Home
   --------------------------------------------------------------------------- */

.hero { background: var(--surface); padding: 18px 22px 20px; border-bottom: 1px solid var(--line); }
.hero__day { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); text-transform: uppercase; }
.hero__greet { font-size: 31px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-top: 8px; }
.hero__who {
    display: flex; align-items: center; gap: 8px;
    background: none; border: 0; padding: 9px 0 0;
    font-size: 14.5px; font-weight: 600; color: var(--text-2);
    cursor: pointer; text-align: left;
}

.cover { position: relative; height: 158px; background: var(--surface-sunken); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--tall { height: 186px; }
.cover__veil {
    position: absolute; inset: auto 0 0 0;
    padding: 14px 18px 12px;
    background: linear-gradient(to top, rgba(10, 14, 22, .82), rgba(10, 14, 22, 0));
    pointer-events: none;
}
.cover__title { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.025em; margin-top: 7px; line-height: 1.15; }

.meta { display: flex; flex-direction: column; gap: 9px; }
.meta__item { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; }
.meta__item svg { color: var(--text-3); flex: none; }

.divider-top { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

.deadline { font-size: 13px; font-weight: 600; color: var(--warn); }

/* ---------------------------------------------------------------------------
   Lista de competicoes
   --------------------------------------------------------------------------- */

.comp-row { padding: 14px 18px; gap: 14px; }
.comp-date { width: 52px; flex: none; text-align: center; }
.comp-date strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.comp-date span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); margin-top: 3px; }
.comp-sep { width: 1px; align-self: stretch; background: var(--line); flex: none; }
.comp-name { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -.018em; line-height: 1.2; }
.comp-place { display: block; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.comp-tags { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.comp-thumb { width: 48px; height: 48px; flex: none; border-radius: var(--r-md); overflow: hidden; }
.comp-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------------
   Detalhe: os meus atletas
   --------------------------------------------------------------------------- */

.ath { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 9px; }

.ath__head {
    padding: 13px 20px;
    display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--line-soft);
}
.ath__name { display: block; font-size: 16px; font-weight: 750; letter-spacing: -.012em; }
.ath__meta { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }

.ath__single { padding: 13px 20px; display: flex; align-items: center; gap: 12px; }
.ath__prova { display: block; font-size: 15.5px; font-weight: 700; }
.ath__note { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.ath__foot { padding: 12px 20px 14px; display: flex; align-items: center; gap: 12px; }
.ath__counter { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--text-3); }
.ath__counter.is-full { color: var(--brand); }

/* Prova selecionavel */
.prova {
    width: 100%;
    background: none; border: 0; border-bottom: 1px solid var(--line-soft);
    padding: 13px 20px;
    display: flex; align-items: center; gap: 12px;
    text-align: left; font: inherit; color: inherit;
    cursor: pointer;
}
.prova:active { background: var(--surface-active); }
.prova__name { flex: 1; font-size: 15.5px; font-weight: 650; }
.prova__time { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.prova.is-blocked { opacity: .45; }
.prova.is-locked { opacity: .45; cursor: default; }

.tick {
    width: 23px; height: 23px; border-radius: 50%;
    flex: none; display: grid; place-items: center;
    border: 2px solid var(--ring-idle); background: var(--surface);
}
.tick svg { display: none; }
.prova.is-on .tick, .pick.is-on .tick { border-color: var(--brand); background: var(--brand); }
.prova.is-on .tick svg, .pick.is-on .tick svg { display: block; animation: pop .22s ease both; }

.tick--box { border-radius: 8px; width: 26px; height: 26px; }

/* ---------------------------------------------------------------------------
   Onboarding
   --------------------------------------------------------------------------- */

.onb { background: var(--surface); min-height: 100dvh; display: flex; flex-direction: column; }
.onb__top { padding: 34px 26px 22px; text-align: center; }
.onb__logo { width: 88px; height: 88px; object-fit: contain; margin: 0 auto 18px; }
.onb__title { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.onb__sub { font-size: 15.5px; color: var(--text-2); margin-top: 8px; line-height: 1.45; }
.onb__note { padding: 16px 24px 0; font-size: 13px; color: var(--text-3); line-height: 1.45; }

.pick {
    width: 100%;
    background: var(--surface); border: 0; border-bottom: 1px solid var(--line);
    padding: 13px 24px;
    display: flex; align-items: center; gap: 13px;
    text-align: left; font: inherit; color: inherit;
    cursor: pointer;
}
.pick:active { background: var(--surface-active); }
.pick.is-on .av { background: var(--brand); color: #fff; }

.search {
    display: flex; align-items: center; gap: 9px;
    background: var(--field); border-radius: 12px;
    padding: 10px 13px;
}
.search svg { color: var(--text-3); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; font-weight: 600; color: var(--text); }

.state {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 36px 30px;
    text-align: center;
}
.state__icon { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--field); }
.state__icon--ok { background: var(--ok-soft); }
.state__icon--err { background: var(--danger-soft); }
.state__title { font-size: 16.5px; font-weight: 750; margin-top: 13px; }
.state__sub { font-size: 13.5px; color: var(--label); margin-top: 6px; line-height: 1.45; }
.state .btn { margin-top: 16px; }

.big-ok {
    width: 74px; height: 74px; border-radius: 50%;
    background: var(--ok); display: grid; place-items: center;
    margin: 0 auto; animation: pop .34s ease both;
}

/* ---------------------------------------------------------------------------
   Comunicados
   --------------------------------------------------------------------------- */

.com {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-left: 3px solid var(--cat, var(--cat-informacao));
    margin-bottom: 13px;
}
.com__btn { width: 100%; background: none; border: 0; padding: 15px 18px 14px; display: block; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.com__btn:active { background: var(--surface-active); }
.com__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.com__kind { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; color: var(--cat, var(--cat-informacao)); text-transform: uppercase; }
.com__date { font-size: 12px; font-weight: 600; color: var(--text-3); }
.com__title { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.025em; margin-top: 8px; line-height: 1.2; }
.com__excerpt { display: block; font-size: 14.5px; color: var(--text-2); margin-top: 7px; line-height: 1.5; }
.com__photo { height: 196px; }
.com__photo img { width: 100%; height: 100%; object-fit: cover; }
.com__admin { padding: 11px 18px; display: flex; gap: 16px; border-top: 1px solid var(--line-soft); }

.com-link {
    display: flex; align-items: center; gap: 6px;
    background: none; border: 0; padding: 0;
    font-size: 13.5px; font-weight: 700; color: var(--brand); cursor: pointer;
}

.article { background: var(--surface); min-height: 100%; padding-bottom: 34px; }
.article__head { padding: 20px 22px 0; border-left: 3px solid var(--cat, var(--cat-informacao)); }
.article__title { font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.14; margin-top: 9px; }
.article__by { font-size: 13px; font-weight: 600; color: var(--text-3); margin-top: 9px; }
.article__body { padding: 16px 22px 0; font-size: 16px; line-height: 1.6; color: #2B2B32; }
.article__body p { margin: 0 0 14px; }

.file {
    width: 100%; margin-top: 10px;
    background: var(--field); border: 0; border-radius: var(--r-lg);
    padding: 13px 14px;
    display: flex; align-items: center; gap: 11px;
    text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.file__name { flex: 1; font-size: 14.5px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__size { font-size: 12.5px; color: var(--text-3); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Perfil
   --------------------------------------------------------------------------- */

.auth-ok { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ok-ink); }
.auth-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.switch {
    width: 51px; height: 31px; border-radius: 16px; border: 0;
    flex: none; cursor: pointer; position: relative;
    transition: background .2s ease;
    background: var(--line-strong);
}
.switch[aria-checked="true"] { background: var(--ok); }
.switch::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 27px; height: 27px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
    transition: left .2s ease;
}
.switch[aria-checked="true"]::after { left: 22px; }

.field-label { display: block; font-size: 12.5px; font-weight: 750; color: var(--text-2); margin-bottom: 6px; }
.field-input {
    width: 100%;
    background: var(--field); border: 1px solid var(--field-border);
    border-radius: 12px; padding: 13px 14px;
    font-size: 16px; font-weight: 600; color: var(--text);
    outline: none;
}
.field-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.4; margin: 0 0 8px; }

/* Escolha multipla em forma de chip: a caixa nativa fica acessivel ao teclado
   e aos leitores de ecra, mas quem ve so encontra a etiqueta. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip-check { position: relative; display: inline-flex; }

.chip-check input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.chip-check span {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid var(--field-border);
    border-radius: 11px;
    background: var(--field);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.chip-check input:checked + span {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.field-input:focus { border-color: var(--brand); }
.field-input[aria-invalid="true"] { border-color: var(--danger); }
textarea.field-input { resize: vertical; min-height: 110px; font-weight: 500; line-height: 1.55; }

/* Editor em forma de documento (comunicados no telemóvel): título grande e
   corpo sem caixa, separados por uma linha. O corpo fica nos 16px — com os
   15,5px que tinha, o iPhone ampliava a página ao começar a escrever. */
.editor__titulo,
.editor__corpo {
    display: block; width: 100%;
    background: none; border: 0; outline: none; padding: 0;
    color: var(--text);
}
.editor__titulo { font-size: 20px; font-weight: 800; letter-spacing: -.025em; }
.editor__corpo {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
    font-size: 16px; line-height: 1.55; resize: vertical; color: #2B2B32;
}
.field-error { font-size: 13px; font-weight: 700; color: var(--danger); margin-top: 6px; }

/* Linha de formulario com etiqueta a esquerda e valor a direita */
.frow {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px; border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
}
.frow__label { width: 112px; flex: none; font-size: 14.5px; font-weight: 650; color: var(--text-2); }
.frow input, .frow select {
    flex: 1; min-width: 0;
    background: none; border: 0; outline: none;
    font-size: 16px; font-weight: 650; text-align: right; color: var(--text);
}

/* ---------------------------------------------------------------------------
   Marca Lane

   O logotipo herda a cor do contexto (a palavra usa currentColor), por isso a
   mesma peca serve fundo claro e fundo escuro. As barras ficam sempre no
   laranja da marca.
   --------------------------------------------------------------------------- */

.lane-logo { height: 26px; width: auto; display: block; }
.lane-mark { height: 22px; width: auto; display: block; }

/* Apresentacao da marca sobre o preto, como no logotipo oficial. */
.lane-band {
    display: grid;
    place-items: center;
    background: #0B0B0D;
    color: #EEECDF;
    padding: 26px 24px;
}
.lane-band .lane-logo { height: 30px; }
.lane-band__sub {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 650;
    color: #8A8A93;
    letter-spacing: .02em;
}

/* PIN temporario revelado uma unica vez, na ficha do atleta. */
.pin-reveal {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .18em;
    text-align: center;
    padding: 18px;
    border-radius: var(--r-xl);
    background: var(--brand-soft);
    color: var(--brand);
}

/* Valores em euros: alinhados e sem saltos de largura entre digitos. */
.money { font-variant-numeric: tabular-nums; font-weight: 750; }
.money--big { font-size: 27px; font-weight: 800; letter-spacing: -.03em; }

.foot-note { padding: 14px 22px; font-size: 13px; color: var(--text-3); line-height: 1.45; }
.brandmark { padding: 24px 22px 0; text-align: center; color: var(--text-2); }
.brandmark .lane-logo { height: 19px; margin: 0 auto; }
.brandmark strong { display: block; font-size: 13.5px; font-weight: 750; color: var(--text-3); }
.brandmark span { display: block; font-size: 12.5px; color: #A6A6AF; margin-top: 7px; }

/* ---------------------------------------------------------------------------
   Rodape de accao e navegacao
   --------------------------------------------------------------------------- */

.cta-bar {
    position: sticky;
    bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
    z-index: 30;
    padding: 12px 18px 14px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--field-border);
}
.cta-bar--alone { bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.cta-bar__admin { display: flex; gap: 8px; margin-top: 10px; }
.cta-bar__admin .btn { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 6px; font-size: 13.5px; }

.nav {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: 0;
    width: 100%; max-width: var(--content-max);
    z-index: 45;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line-strong);
    padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.nav__item {
    background: none; border: 0;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 4px 0;
    color: var(--nav-idle);
    cursor: pointer;
    min-height: 44px;
}
.nav__item span { font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.nav__item[aria-current="page"] { color: var(--brand); }

/* ---------------------------------------------------------------------------
   Bottom sheets
   --------------------------------------------------------------------------- */

.sheet-root { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-root[hidden] { display: none; }

.sheet-veil { position: absolute; inset: 0; background: rgba(17, 17, 24, .42); backdrop-filter: blur(3px); animation: fadeIn .2s ease both; border: 0; padding: 0; }

.sheet {
    position: relative;
    width: 100%; max-width: var(--content-max);
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    animation: sheetUp .3s var(--ease) both;
    max-height: 88vh; overflow-y: auto;
    padding-bottom: calc(26px + env(safe-area-inset-bottom));
}

.sheet__grip { display: flex; justify-content: center; padding: 9px 0 0; }
.sheet__grip::after { content: ""; width: 38px; height: 5px; border-radius: 3px; background: #DEDEE4; }
.sheet__head { padding: 16px 22px 0; }
.sheet__title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.sheet__sub { font-size: 14.5px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.sheet__body { padding: 14px 22px 0; }
.sheet__list { margin-top: 14px; border-top: 1px solid var(--line); }
.sheet__actions { padding: 12px 22px 0; }
.sheet__center { padding: 20px 26px 0; text-align: center; }

.sheet-note {
    margin: 14px 22px 0;
    border-radius: var(--r-lg);
    padding: 13px 15px;
    font-size: 13.5px; line-height: 1.45;
    background: var(--note-soft); color: var(--note-ink);
}
.sheet-note--brand { background: var(--brand-soft); color: var(--brand-ink); }

/* --- Keypad de PIN --- */

.pin { padding: 14px 26px 0; text-align: center; }
.pin__dots { display: flex; justify-content: center; gap: 22px; margin-top: 26px; }
.pin.is-wrong .pin__dots { animation: shake .34s ease; }

.pin__dot {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid var(--dot-idle);
    background: transparent;
    transition: all .16s ease;
}
.pin__dot.is-on { background: var(--brand); border-color: var(--brand); }
.pin.is-wrong .pin__dot { border-color: var(--danger); }
.pin.is-wrong .pin__dot.is-on { background: var(--danger); }
.pin.is-right .pin__dot.is-on { background: var(--ok); border-color: var(--ok); }

.pin__step { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); margin-top: 14px; }
.pin__msg { font-size: 14.5px; font-weight: 750; margin-top: 10px; min-height: 20px; color: var(--danger); }
.pin__msg.is-ok { color: var(--ok-ink); }

.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; justify-items: center; }
.key {
    width: 74px; height: 74px; border-radius: 50%;
    border: 0; background: var(--surface-sunken);
    font-size: 31px; font-weight: 500; color: var(--text);
    display: grid; place-items: center; cursor: pointer;
}
.key:active { background: #E2E2E8; }
.key--blank { visibility: hidden; }
.key--del { background: transparent; }

/* ---------------------------------------------------------------------------
   Toast e skeleton
   --------------------------------------------------------------------------- */

.toasts {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: calc(var(--nav-h) + 46px + env(safe-area-inset-bottom));
    z-index: 90;
    width: min(calc(100% - 40px), calc(var(--content-max) - 40px));
    display: grid; gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(17, 17, 20, .94);
    color: #fff;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 14.5px; font-weight: 650;
    display: flex; align-items: center; gap: 10px;
    animation: toastUp .26s ease both;
}
.toast svg { flex: none; color: var(--ok); }
.toast--err svg { color: var(--danger); }

.sk {
    background: linear-gradient(90deg, var(--line), #E1E1E8, var(--line));
    background-size: 300px 100%;
    animation: shimmer 1.3s linear infinite;
    border-radius: 5px;
}

/* ---------------------------------------------------------------------------
   Barra de administrador
   --------------------------------------------------------------------------- */

.admin-strip {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 15px 20px;
}
.admin-strip__icon { width: 38px; height: 38px; border-radius: 50%; background: var(--ok-soft); display: grid; place-items: center; flex: none; }

/* ---------------------------------------------------------------------------
   Ajustes de ecra
   --------------------------------------------------------------------------- */

@media (max-width: 22.4375rem) {
    .key { width: 64px; height: 64px; font-size: 27px; }
    .keys { gap: 10px; }
    .hero__greet { font-size: 27px; }
    .sec, .row, .ath__head, .ath__single { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------------------
   Ecrã largo — a Lane e a Lane Coach no tablet e no computador

   A Lane nasceu para o telemóvel, e no computador era isso mesmo: um
   telemóvel no meio do ecrã, coluna de 560px e barra de navegação em baixo,
   com o resto vazio. Um pai que abre a Lane no portátil do trabalho, ou um
   treinador que prepara a semana à secretária, merecem uma Lane de
   computador — sem deixar de ser a mesma aplicação.

   Não é um segundo desenho: são os mesmos componentes a responder ao espaço.

     ≥ 48rem  tablet, dobrável aberto, janela a meio do ecrã
              - a coluna alarga (listas continuam legíveis, não esticam);
              - as folhas deixam de subir do fundo e abrem como janela
                centrada — a gaveta de baixo só faz sentido com o polegar;

     ≥ 64rem  computador
              - a navegação sai do fundo e passa a coluna lateral fixa, à
                esquerda, como qualquer aplicação de computador;
              - a coluna de conteúdo cresce e centra-se no espaço que sobra;
              - a barra de ação e as mensagens deixam de reservar o espaço
                da barra inferior, que já lá não está.

   O que decide os alvos de toque é o ponteiro, não a largura: um tablet com
   dedo continua com alvos grandes.
   --------------------------------------------------------------------------- */

@media (min-width: 48rem) {
    :root { --content-max: 720px; }
    body.surface-coach { --content-max: 860px; }

    .shell { box-shadow: 0 0 0 1px var(--line); }

    .sheet-root { justify-content: center; align-items: center; padding: 24px; }
    .sheet {
        max-width: 480px;
        border-radius: 22px;
        max-height: min(86vh, 780px);
        padding-bottom: 26px;
        animation: pop .26s var(--ease) both;
        box-shadow: 0 30px 80px -30px rgba(17, 17, 24, .5);
    }
    .sheet__grip { display: none; }
    .sheet__head, .pin { padding-top: 24px; }
}

@media (min-width: 64rem) {
    :root { --rail-w: 104px; --content-max: 880px; }
    body.surface-coach { --content-max: 1000px; }

    /* A coluna de conteúdo centra-se no espaço à direita da navegação. */
    .shell:has(> .nav) {
        margin-left: max(var(--rail-w), calc((100vw - var(--content-max)) / 2));
        margin-right: auto;
    }

    .nav {
        left: 0; top: 0; bottom: 0;
        transform: none;
        width: var(--rail-w);
        max-width: none;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: calc(24px + env(safe-area-inset-top)) 10px 24px;
        background: var(--surface);
        border-top: 0;
        border-right: 1px solid var(--line-strong);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .nav__item {
        min-height: 64px;
        padding: 10px 4px;
        border-radius: 14px;
        justify-content: center;
        transition: background .15s ease, color .15s ease;
    }
    .nav__item span { font-size: 11.5px; text-align: center; }
    .nav__item:hover { background: var(--surface-active); color: var(--text); }
    .nav__item[aria-current="page"] { background: var(--brand-soft); }

    .main { padding-bottom: 56px; }
    .cta-bar { bottom: 0; padding-bottom: 14px; }
    .toasts { bottom: 32px; }

    /* Com rato, as linhas mostram que são clicáveis. */
    a.row:hover, button.row:hover, .row--link:hover { background: var(--surface-active); }
}

/* Alvos de toque: os botões de ícone (30px) crescem quando o ponteiro é o
   dedo. No computador, com rato, ficam compactos. */
@media (pointer: coarse) {
    .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
}

@media print {
    .hdr, .nav, .cta-bar, .toasts, .sheet-root { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Primeiro acesso e "o que há de novo"

   Duas folhas com a mesma composição: um título centrado, uma lista curta de
   linhas com ícone, e as ações em baixo. Reaproveitam .sheet — o que muda é
   a lista.
   --------------------------------------------------------------------------- */

.sheet--onb { max-height: min(92vh, 780px); }

.onb-steps > .onb-step[hidden] { display: none; }

.onb-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0 22px;
    display: grid;
    gap: 14px;
}

.onb-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text-2);
}

.onb-list li strong { color: var(--text); font-weight: 750; }

.onb-list__icone {
    width: 34px; height: 34px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    flex: none;
}

.onb-bell {
    width: 56px; height: 56px;
    margin: 4px auto 14px;
    border-radius: 18px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}

/* Estado do pedido de notificações: o texto que acompanha a espera, a recusa
   ou o sucesso. Nunca é um erro técnico — é sempre o passo seguinte. */
.onb-aviso {
    margin: 16px 22px 0;
    padding: 13px 15px;
    border-radius: var(--r-lg);
    font-size: 13.5px;
    line-height: 1.5;
    background: var(--surface-sunken);
    color: var(--text-2);
}
.onb-aviso--info { background: var(--note-soft); color: var(--note-ink); }
.onb-aviso--ok   { background: var(--ok-soft); color: var(--ok-ink); font-weight: 650; }

.onb-nota {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-2);
}

/* O botão que pede a autorização fica bloqueado enquanto espera: tocar outra
   vez cancelava o pedido do sistema sem a pessoa perceber porquê. */
.sheet--onb .btn:disabled { opacity: .65; cursor: default; }

/* ---------------------------------------------------------------------------
   Avisos (centro de notificações)

   Uma lista de linhas como as outras, com três diferenças: o ícone diz de que
   assunto é, a data é relativa ("ontem, 14:30") e o que ainda não foi lido
   tem mais peso e um ponto à direita.
   --------------------------------------------------------------------------- */

.aviso { align-items: flex-start; gap: 12px; }

.aviso__icone {
    width: 34px; height: 34px;
    flex: none;
    margin-top: 1px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--surface-sunken);
    color: var(--text-3);
}

.aviso__titulo {
    display: block;
    font-size: 15px; font-weight: 650; line-height: 1.3;
    color: var(--text);
}

.aviso__corpo {
    display: block;
    margin-top: 3px;
    font-size: 13.5px; line-height: 1.4;
    color: var(--text-2);
}

.aviso__quando {
    display: block;
    margin-top: 5px;
    font-size: 12px; font-weight: 600;
    color: var(--text-3);
}

/* Por ler: o ícone ganha a cor da marca e o título ganha peso. É o mesmo
   componente, não é outro — o que muda é a ênfase. */
.aviso--novo .aviso__icone { background: var(--brand-soft); color: var(--brand); }
.aviso--novo .aviso__titulo { font-weight: 800; }

.aviso__ponto {
    width: 9px; height: 9px;
    flex: none;
    align-self: center;
    border-radius: 50%;
    background: var(--brand);
}

/* --- Sino no cabeçalho --------------------------------------------------- */

.hdr__btn--sino { position: relative; }

.hdr__badge {
    position: absolute;
    top: -3px; right: -3px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #FD4E05;
    color: #fff;
    font-size: 10.5px; font-weight: 800; line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--brand);
}

/* O anel do contador acompanha o fundo de cada cabeçalho. */
.surface-coach .hdr__badge { box-shadow: 0 0 0 2px #0B0B0D; }

/* Com dois botões à direita, as colunas laterais crescem em vez de os
   apertarem um contra o outro. */
.hdr__row { grid-template-columns: minmax(52px, auto) minmax(0, 1fr) minmax(52px, auto); }
.hdr__side { gap: 6px; }

/* Linha subordinada: as categorias de aviso por baixo do interruptor
   principal. A margem à esquerda diz "isto depende do que está acima". */
.row--sub { padding-left: 34px; background: var(--surface); }
.row--sub .row__title { font-size: 14.5px; }
@media (max-width: 22.4375rem) { .row--sub { padding-left: 26px; } }

/* ---------------------------------------------------------------------------
   Teclado aberto

   Quando o teclado sobe, o browser rola o campo para dentro da área que
   sobrou — mas encosta-o ao limite, e a barra de ação (Guardar, Confirmar)
   fica logo por baixo, escondida. Com esta margem, o campo sobe o suficiente
   para o botão vir com ele.

   `scroll-margin` não tem custo nenhum quando não há teclado: só existe no
   momento em que alguma coisa rola um elemento para a vista.
   --------------------------------------------------------------------------- */

input:focus,
textarea:focus,
select:focus,
[contenteditable]:focus {
    scroll-margin-top: calc(env(safe-area-inset-top) + 72px);
    scroll-margin-bottom: 120px;
}

/* ===========================================================================
   Campos de data e hora no iOS
   ========================================================================
   O Safari do iPhone dá a `input[type=date]` e `input[type=time]` uma largura
   INTRÍNSECA, tirada do formato da data, e não a deixa encolher. Dentro de uma
   grelha isso empurra a coluna para lá do que lhe cabe: o campo da data sai da
   caixa e fica por baixo do vizinho — foi assim que "Data" e "Ambiente" se
   sobrepuseram, e que um campo de hora vazio aparecia enorme.

   Três coisas, e as três são precisas:

     appearance: none   tira o dimensionamento nativo. Sem isto, nem
                        `width: 100%` nem `min-width: 0` chegam;
     min-width: 0       um item de grelha nunca encolhe abaixo do seu conteúdo
                        enquanto não lho dissermos (é a mesma regra do 33-H.7);
     text-align         ao perder o aspeto nativo, o iOS passa a centrar o
                        valor. Todos os outros campos são à esquerda.

   O campo continua a abrir o seletor nativo do sistema: o que sai é o
   dimensionamento, não o comportamento. */

.field-input[type="date"],
.field-input[type="time"],
.field-input[type="datetime-local"],
.field-input[type="month"],
.input[type="date"],
.input[type="time"],
.input[type="datetime-local"],
.input[type="month"] {
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    max-width: 100%;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value {
    text-align: left;
}

/* O iOS deixa um campo de data vazio com a altura do conteúdo, e não a da
   caixa: um "Fim" por preencher ficava mais baixo do que o vizinho. */
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit { line-height: 1.2; }

/* Um item de grelha não encolhe sozinho.
   `min-width: auto` é o valor por omissão e significa "nunca mais estreito do
   que o meu conteúdo". Basta um campo de data lá dentro para a coluna crescer
   e a linha passar a ser mais larga do que o ecrã. */
.form-row > *,
.form-block > .form-row > *,
.chips > *,
.res__nums > * { min-width: 0; }
