/* Coach App — estilos. Mobile-first, alto contraste para uso ao ar livre. */
:root {
  --bg: #f2f5f1;
  --card: #ffffff;
  --ink: #0f1a14;
  --muted: #5a6a61;
  --line: #dfe6e0;
  --brand: #0f6b3a;
  --brand-2: #0b5530;
  --brand-ink: #ffffff;
  --brand-soft: #e3f1e8;
  --ok: #1b7f3b;
  --ok-soft: #dcf2e2;
  --warn: #9a5b00;
  --warn-soft: #fdf0d5;
  --bad: #b3261e;
  --bad-soft: #fbe2df;
  --yellow: #f5c518;
  --red: #d32f2f;
  --pitch: #1d7a40;
  --pitch-2: #1a6f3a;
  --radius: 16px;
  --tap: 48px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgb(15 26 20 / 6%), 0 4px 14px rgb(15 26 20 / 5%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1410; --card: #16201a; --ink: #eef4ef; --muted: #9db0a4; --line: #26342b;
    --brand: #3fbf74; --brand-2: #23884f; --brand-ink: #06120b; --brand-soft: #173524;
    --ok: #4cc777; --ok-soft: #173524; --warn: #f0b44a; --warn-soft: #3a2c10; --bad: #ff7a6e; --bad-soft: #3d1a17;
    --pitch: #175f33; --pitch-2: #145530;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0d1410; --card: #16201a; --ink: #eef4ef; --muted: #9db0a4; --line: #26342b;
    --brand: #3fbf74; --brand-2: #23884f; --brand-ink: #06120b; --brand-soft: #173524;
    --ok: #4cc777; --ok-soft: #173524; --warn: #f0b44a; --warn-soft: #3a2c10; --bad: #ff7a6e; --bad-soft: #3d1a17;
    --pitch: #175f33; --pitch-2: #145530;
    --shadow: none;
    color-scheme: dark;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 560px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
main {
  padding: 0 16px calc(var(--nav-h) + 32px + var(--safe-b));
  padding-top: env(safe-area-inset-top, 0px);
}
body.no-nav main { padding-bottom: calc(32px + var(--safe-b)); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 18px; line-height: 1.25; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.pad { padding: 8px 4px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Cabeçalhos ---------- */
.hd {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px 12px; padding: 12px 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
}
.hd-title { flex: 1; min-width: 0; }
.hd-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-title p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.hd-right { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px; border: 0;
  background: var(--card); box-shadow: var(--shadow); cursor: pointer;
}
.icon-btn.light { background: rgb(255 255 255 / 16%); color: #fff; box-shadow: none; }
.icon-btn:disabled { opacity: .35; }

.hero {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin: 0 -16px 16px; padding: 20px 16px 22px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  background: linear-gradient(160deg, var(--brand), var(--brand-2));
  color: #fff; border-radius: 0 0 24px 24px;
}
.hero-club { opacity: .85; font-size: 14px; font-weight: 600; }
.hero h1 { font-size: 26px; margin-top: 2px; }
.net { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; opacity: .9; }
.net .dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2a0; }
body.offline .net .dot { background: var(--yellow); }

.live-banner {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--bad); color: #fff; font-weight: 600;
}
.live-banner b { margin-left: auto; font-size: 20px; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Cartões e listas ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}
.card.flush { padding: 0; overflow: hidden; }
.card h2 + p, .card p + p { margin-top: 4px; }
.card-kicker {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand);
  margin-bottom: 8px;
}
.card-kicker svg { width: 18px; height: 18px; }
.card-main { display: block; }
.hint { color: var(--muted); font-size: 14px; margin: 8px 2px; }

.group {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  margin: 20px 4px 8px;
}
.group span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.group.small { margin-top: 14px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 60px; padding: 10px 16px; text-align: left;
  background: none; border: 0; cursor: pointer;
}
.list.compact .row { min-height: 48px; padding: 8px 0; }
.sheet .list .row { padding: 10px 0; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.grow b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.num {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums;
}
.num.pos-GR { background: var(--warn-soft); color: var(--warn); }

.date-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
}
.date-chip b { font-size: 17px; line-height: 1; }
.date-chip small { font-size: 12px; font-weight: 600; }

.pill {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--line); color: var(--ink);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.live { background: var(--bad); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats.tight { grid-template-columns: repeat(4, 1fr); }
.stats > div {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 10px; display: flex; flex-direction: column; gap: 2px;
}
.stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); line-height: 1.2; }
.stats .ok b { color: var(--ok); } .stats .bad b { color: var(--bad); } .stats .warn b { color: var(--warn); }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .btn, .empty .btn-row { margin-top: 16px; justify-content: center; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 16px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 15px; cursor: pointer; text-align: center;
}
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 40px; padding: 6px 12px; }
.btn.big { min-height: 56px; font-size: 17px; }
.btn.block { display: flex; width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.done { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.btn.file { position: relative; }
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row > .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row.wrap > .btn { flex: 1 1 auto; }

.sticky-actions {
  position: sticky; bottom: calc(var(--nav-h) + 12px + var(--safe-b)); z-index: 4;
  display: flex; gap: 8px; margin: 16px 0;
  padding: 8px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
}
body.no-nav .sticky-actions { bottom: calc(12px + var(--safe-b)); }
.sticky-actions .btn { flex: 1; margin: 0; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .form legend { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); }
.form label.check input { width: 22px; height: 22px; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px;
  min-height: var(--tap); padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
fieldset { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; }
.seg { display: flex; background: var(--card); border-radius: 12px; padding: 4px; gap: 4px; box-shadow: var(--shadow); }
.form .seg { box-shadow: none; background: var(--bg); }
.seg label { flex: 1; display: block; color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; padding: 0 6px; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:disabled + span { opacity: .4; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px; padding-left: 16px; scrollbar-width: none; }
.chip {
  flex: none; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Presenças / seleção por toque ---------- */
.att-grid, .pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.att {
  display: flex; align-items: center; gap: 10px; text-align: left;
  min-width: 0; min-height: 60px; padding: 10px; border-radius: 14px;
  background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .08s;
}
.att:active { transform: scale(.97); }
.att .grow b { font-size: 15px; }
.att-mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.att.ok { border-color: var(--ok); background: var(--ok-soft); }
.att.ok .att-mark { background: var(--ok); color: #fff; }
.att.bad { border-color: var(--bad); background: var(--bad-soft); }
.att.bad .att-mark { background: var(--bad); color: #fff; }
.att.warn { border-color: var(--warn); background: var(--warn-soft); }
.att.warn .att-mark { background: var(--warn); color: #fff; }

.callrow { display: flex; align-items: center; }
.callrow .row { flex: 1; }
.callrow .tick {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line);
  display: grid; place-items: center; flex: none;
}
.callrow .tick svg { width: 16px; height: 16px; stroke-width: 3; }
.callrow.on { background: var(--ok-soft); }
.callrow.on .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.callrow .row:disabled { cursor: default; }
.resp {
  margin-right: 12px; min-height: 36px; min-width: 88px; padding: 4px 10px; border-radius: 10px;
  border: 1.5px dashed var(--muted); background: var(--card); font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted);
}
.resp.ok { border-style: solid; border-color: var(--ok); color: var(--ok); }
.resp.bad { border-style: solid; border-color: var(--bad); color: var(--bad); }

.section-head { display: flex; align-items: center; justify-content: space-between; }

/* ---------- Jogo ao vivo ---------- */
.scoreboard {
  margin: 0 -16px 12px; padding: 12px 16px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: #0f1a14; color: #fff; border-radius: 0 0 24px 24px;
  position: sticky; top: 0; z-index: 6;
}
.scoreboard.done { position: static; border-radius: var(--radius); margin: 0 0 12px; padding-top: 16px; text-align: center; }
.sb-top { display: flex; align-items: center; justify-content: space-between; }
.sb-status { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.sb-status.running { color: #7ee2a0; opacity: 1; }
.scoreboard.done .sb-status { display: block; margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.sb-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 6px; }
.sb-team { font-weight: 700; font-size: 15px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-num { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.sb-num i { font-style: normal; opacity: .5; margin: 0 8px; }
.clock { text-align: center; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: .02em; }
.clock.over { color: var(--yellow); }
.ctrl { display: flex; gap: 8px; margin-top: 10px; }
.ctrl .btn { flex: 1; background: rgb(255 255 255 / 12%); border-color: transparent; color: #fff; }
.ctrl .btn.primary { background: #2fa864; }

.live-hint { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }

.pitch {
  position: relative;
  border-radius: 18px; padding: 14px 8px 26px;
  background: repeating-linear-gradient(180deg, var(--pitch) 0 48px, var(--pitch-2) 48px 96px);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 25%);
  display: flex; flex-direction: column; gap: 10px;
}
.pitch::before { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; border-top: 2px solid rgb(255 255 255 / 20%); }
.line { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; position: relative; }
.pitch-count { position: absolute; bottom: 6px; right: 12px; font-size: 12px; color: rgb(255 255 255 / 75%); }
.pchip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 74px; min-height: 74px; padding: 6px 4px; border-radius: 14px;
  border: 2px solid transparent; background: #fff; color: #0f1a14; cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 18%);
  transition: transform .08s;
}
.pchip:active { transform: scale(.95); }
.pnum { font-weight: 800; font-size: 18px; line-height: 1.1; }
.pname { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmin { font-size: 12px; color: #5a6a61; font-variant-numeric: tabular-nums; }
.pbadges { position: absolute; top: -6px; right: -4px; display: flex; gap: 2px; }
.pchip.sel { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow); transform: translateY(-2px); }
.pchip.target { outline: 2px dashed rgb(255 255 255 / 85%); outline-offset: 2px; }
.bench .pchip.target { outline-color: var(--brand); }
.pchip.bench { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.pchip.bench .pmin { color: var(--muted); }
.pchip.off { opacity: .5; }
.bench { display: flex; flex-wrap: wrap; gap: 8px; }
.b-goal { font-size: 13px; background: #fff; border-radius: 8px; padding: 0 3px; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); }
.b-card { display: inline-grid; place-items: center; width: 12px; height: 16px; border-radius: 2px; font-size: 10px; font-weight: 800; color: #0f1a14; }
.b-card.y { background: var(--yellow); }
.b-card.r { background: var(--red); }

.actionbar {
  position: sticky; bottom: calc(10px + var(--safe-b)); z-index: 5;
  display: flex; gap: 8px; margin: 12px 0; padding: 8px; border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
}
.actionbar .btn { flex: 1; padding: 10px 8px; }
.actionbar .btn.ghost { flex: 0 0 48px; }

.events .ev { display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 48px; }
.ev-min { width: 48px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ev-ico { width: 22px; text-align: center; flex: none; }
.ev-goal { background: var(--ok-soft); }
.ev-goal_against { background: var(--bad-soft); }
.events .grow { display: block; }
.events small { color: var(--muted); }

.mins .row { min-height: 52px; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .5s; }
.mins-val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

.counter { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; font-size: 16px; }
.counter b { font-size: 28px; }
.counter.ok b { color: var(--ok); }
.counter.bad b { color: var(--bad); }
.counter small { color: var(--muted); }

/* ---------- Mensagens ---------- */
.preview {
  white-space: pre-wrap; font: 14px/1.45 inherit; font-family: inherit;
  background: var(--bg); border-radius: 12px; padding: 12px; max-height: 45vh; overflow: auto; margin: 0;
}
.msg { padding: 12px 16px; }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg p { font-size: 14px; white-space: pre-line; }

/* ---------- Navegação inferior ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line);
}
body.no-nav #tabs { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--brand); }
.tab.on svg { stroke-width: 2.4; }

/* ---------- Folha inferior e toast ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 45%); animation: fade .15s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  max-height: 90dvh; overflow: auto;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + var(--safe-b));
  animation: up .2s ease-out;
}
.sheet h2 { margin: 6px 0 12px; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: #0f1a14; color: #fff; font-weight: 600; font-size: 15px; text-align: center;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
body.no-nav #toast { bottom: calc(90px + var(--safe-b)); }

@media (max-width: 360px) {
  .pchip { width: 66px; }
  .att-grid { grid-template-columns: 1fr; }
}

/* ---------- Utilizadores e equipas ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 16px; letter-spacing: .02em;
}
.avatar.light { background: rgb(255 255 255 / 20%); color: #fff; }
.avatar-btn { border-radius: 50%; }
.team-switch {
  display: flex; align-items: center; gap: 6px; margin-top: 2px; padding: 0;
  background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
}
.team-switch .caret { font-size: 16px; opacity: .8; }
.account-head { display: flex; align-items: center; gap: 12px; }
.login { padding-top: calc(32px + env(safe-area-inset-top, 0px)); }
.login-brand { text-align: center; margin: 24px 0 28px; }
.login-brand img { border-radius: 18px; }
.login-brand h1 { font-size: 30px; margin-top: 12px; }
.login-brand p { color: var(--muted); margin-top: 4px; }
.login .row svg { color: var(--muted); }

/* ---------- Futsal ---------- */
.pitch.court {
  background: repeating-linear-gradient(90deg, #b9763e 0 34px, #b06f39 34px 68px);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 55%);
}
.pitch.court::before { border-top-color: rgb(255 255 255 / 55%); }
.pitch.court .line { gap: 14px; }
.fs-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; font-size: 13px; }
.fs-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; background: rgb(255 255 255 / 8%); }
.fs-side span { display: flex; align-items: center; gap: 6px; opacity: .9; }
.fs-side.limit { background: rgb(245 197 24 / 22%); color: var(--yellow); }
.pips { display: inline-flex; gap: 3px; align-items: center; }
.pips i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .7; }
.pips i.on { background: currentColor; opacity: 1; }
.pips b { font-size: 12px; margin-left: 2px; }
.clock.tappable { cursor: pointer; border-radius: 12px; }
.clock.tappable::after { content: ' toca para parar/arrancar'; display: block; font-size: 12px; font-weight: 500; opacity: .6; letter-spacing: 0; }
.clock.stopped { color: #ff8a80; }
.actionbar { flex-wrap: wrap; }
.actionbar-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.actionbar-row .btn { font-size: 13px; padding: 6px 4px; }

/* ---------- Revisão de ecrãs ---------- */
html, body { overflow-x: hidden; }
.meta-line { margin-top: 4px; }
.meta-line b { font-size: 17px; }
.health { color: var(--bad); font-size: 13px; margin-left: 4px; }
.note-health { background: var(--bad-soft); }
.note-health .card-kicker { color: var(--bad); }
.section-head .btn.small { min-height: 34px; margin-top: 12px; }

.att { gap: 8px; padding: 8px; }
.att .num { width: 32px; height: 32px; border-radius: 9px; }
.att-mark { width: 24px; height: 24px; }
.btn-row > .btn.wide { flex: 2; }
.callrow .row { min-width: 0; }
.resp { flex: none; }

/* ---------- Minutos justos e encontros ---------- */
.pchip.need { box-shadow: 0 0 0 2px var(--warn); }
.pchip.urgent { box-shadow: 0 0 0 3px var(--bad); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 40%, transparent); } }
.pneed { font-size: 12px; font-weight: 700; color: var(--bad); line-height: 1.1; }
.pchip.need .pneed { color: var(--warn); }
.fair-alert {
  background: var(--bad-soft); color: var(--bad); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 10px;
}
.bar { position: relative; overflow: visible; }
.bar > span { overflow: hidden; }
.bar.need > span { background: var(--warn); }
.bar.urgent > span { background: var(--bad); }
.bar-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; }
.suggest .row { padding: 8px 0; min-height: 52px; }
.fair-ok { background: var(--ok-soft); }
.fair-miss { background: var(--warn-soft); }
.tour-game { display: flex; align-items: center; padding-right: 8px; }
.tour-game .row { flex: 1; min-width: 0; }
.tour-game .icon-btn { box-shadow: none; background: transparent; }
.minutes-link { margin: 0 0 4px; }
.mins a.row { color: inherit; }
.fair-alert p + p { margin-top: 6px; }

/* ---------- Saúde, documentos e boleias ---------- */
.flag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 12px; font-weight: 700; vertical-align: 2px; background: var(--line); color: var(--muted); }
.flag.health { background: none; color: var(--bad); font-size: 13px; padding: 0; }
.flag.bad { background: var(--bad-soft); color: var(--bad); }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.txt-bad { color: var(--bad); }
.txt-ok { color: var(--ok); font-weight: 600; }
.docs-banner {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px; padding: 12px 14px; border-radius: 14px;
  background: var(--warn-soft); color: var(--warn); font-size: 14px;
}
.docs-banner svg { margin-left: auto; width: 18px; height: 18px; }
.docs-card { display: block; background: var(--bad-soft); }
.docs-card .card-kicker { color: var(--bad); }
.health-list > li { padding: 6px 0; }
.health-list > li + li { border-top: 1px solid var(--line); }
.health-list .row { padding: 6px 0; min-height: 0; }
.health-note { white-space: normal !important; color: var(--bad) !important; font-weight: 600; }
.call-row { margin-top: 0; padding-left: 48px; }
.call-row .btn { flex: 0 0 auto; }
.note-health .health-list .row { padding-left: 0; }
.sb-actions { display: flex; gap: 6px; }
.health-btn { color: #ff8a80; font-size: 20px; font-weight: 800; }
.hd .health-btn { color: var(--bad); }
.b-health { color: var(--bad); font-size: 12px; font-weight: 900; background: #fff; border-radius: 6px; padding: 0 3px; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); }
.rides { padding: 4px 16px 16px; }
.ride-meet { padding: 10px 0; }
.car { border-top: 1px solid var(--line); padding: 10px 0; }
.car-head { display: flex; align-items: center; gap: 8px; }
.car-head .icon-btn { width: 36px; height: 36px; box-shadow: none; background: transparent; color: var(--muted); }
.car-head .icon-btn svg { width: 18px; height: 18px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-wrap .chip { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.chip.seat { border-style: dashed; color: var(--muted); background: transparent; cursor: default; }
.ride-wait { border-top: 1px solid var(--line); padding-top: 10px; }
.ride-wait small { color: var(--warn); font-weight: 600; }

/* ---------- Plano e registo do treino ---------- */
.tr-theme { margin: -4px 4px 10px; font-weight: 600; }
.tabs-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.tabs-seg button { min-height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.tabs-seg button.on { background: var(--brand); color: var(--brand-ink); }
.plan-total { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.plan-total .bar { height: 8px; margin: 0; }
.plan-total.over b { color: var(--bad); }
.blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: blk; }
.block { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; border-left: 5px solid var(--brand); }
.block.type-aquecimento { border-left-color: #e8833a; }
.block.type-jogo { border-left-color: #2f7de1; }
.block.type-gr { border-left-color: #9a5bd6; }
.block.type-calma { border-left-color: #6aa9a0; }
.block-head { display: flex; align-items: center; gap: 10px; }
.block-ico { font-size: 22px; width: 28px; text-align: center; }
.block-main { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.block-min { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.block-desc { margin: 8px 0 0 38px; font-size: 14px; }
.block-mat { margin: 4px 0 0 38px; font-size: 13px; color: var(--muted); }
.block-tools { display: flex; gap: 4px; margin: 6px 0 0 30px; }
.block-tools .btn { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.blocks.recorded .block { border-left-color: var(--line); }
.block.st-done { border-left-color: var(--ok); }
.block.st-changed { border-left-color: var(--warn); }
.block.st-skipped { border-left-color: var(--bad); opacity: .8; }
.st-seg { margin-top: 10px; box-shadow: none; background: var(--bg); }
.seg-btn { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg-btn.on.ok { background: var(--ok); color: #fff; }
.seg-btn.on.warn { background: var(--warn); color: #fff; }
.seg-btn.on.bad { background: var(--bad); color: #fff; }
.rec-extra { margin-top: 8px; }
.rec-extra label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.scale { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.scale > span { font-weight: 600; }
.scale-btns { display: flex; gap: 6px; }
.scale-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; }
.scale-btn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.empty.small { padding: 20px 8px; }
small.wrap, .grow small.wrap { white-space: normal; }
.icon-btn.plain { box-shadow: none; background: transparent; color: var(--muted); width: 36px; height: 36px; }
.icon-btn.plain svg { width: 18px; height: 18px; }
.wrap-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip-radio input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* =========================================================
   VISUAL DESPORTIVO — cores da equipa (definidas em js/theme.js)
   ========================================================= */
:root {
  --team: #0a3d91; --team-ink: #fff; --team-2: #fff; --team-2-ink: #0b1020;
  --bg: #edf0f6; --card: #ffffff; --ink: #0b1020; --muted: #5a6479; --line: #dbe0ea;
  --brand: var(--team); --brand-ink: var(--team-ink);
  --brand-2: color-mix(in srgb, var(--team) 70%, #000);
  --brand-soft: color-mix(in srgb, var(--team) 11%, #fff);
  --brand-text: var(--team);
  --navy: color-mix(in srgb, var(--team) 38%, #050914);
  --radius: 12px;
  --shadow: 0 1px 0 rgb(11 16 32 / 4%), 0 6px 18px rgb(11 16 32 / 7%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a14; --card: #101727; --ink: #eef2fb; --muted: #97a3bd; --line: #212b42;
    --brand: var(--team); --brand-ink: var(--team-ink);
    --brand-soft: color-mix(in srgb, var(--team) 28%, #060a14);
    --brand-text: color-mix(in srgb, var(--team) 45%, #fff);
    --navy: color-mix(in srgb, var(--team) 30%, #03060d);
    --shadow: 0 0 0 1px rgb(255 255 255 / 4%);
  }
}
:root[data-theme="dark"] {
    --bg: #060a14; --card: #101727; --ink: #eef2fb; --muted: #97a3bd; --line: #212b42;
    --brand: var(--team); --brand-ink: var(--team-ink);
    --brand-soft: color-mix(in srgb, var(--team) 28%, #060a14);
    --brand-text: color-mix(in srgb, var(--team) 45%, #fff);
    --navy: color-mix(in srgb, var(--team) 30%, #03060d);
    --shadow: 0 0 0 1px rgb(255 255 255 / 4%);
  color-scheme: dark;
}

body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
h1, h2 { font-weight: 900; letter-spacing: -0.015em; }
.hd-title h1 { text-transform: uppercase; font-style: italic; font-size: 21px; }

/* Títulos de secção com traço da equipa */
.group { font-style: italic; font-weight: 900; color: var(--ink); letter-spacing: .06em; }
.group::before { content: ''; display: inline-block; width: 16px; height: 4px; background: var(--brand); transform: skewX(-20deg); margin-right: 2px; align-self: center; }
.group span { color: var(--muted); font-style: normal; }
.card-kicker { color: var(--brand-text); font-style: italic; font-weight: 900; }

/* Botões */
.btn { font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 13.5px; border-width: 2px; border-radius: 10px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--team) 30%, transparent); }
.btn.ghost { box-shadow: none; }
.chip.on, .tabs-seg button.on, .seg input:checked + span, .scale-btn.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tabs-seg button { text-transform: uppercase; font-weight: 800; font-size: 12.5px; letter-spacing: .03em; }

/* Números e estatísticas */
.num { background: var(--brand-soft); color: var(--brand-text); font-weight: 900; font-style: italic; border-radius: 8px; }
.date-chip { background: var(--navy); color: #fff; border-radius: 10px; }
.date-chip b { font-style: italic; font-weight: 900; }
.date-chip small { color: rgb(255 255 255 / 75%); text-transform: uppercase; letter-spacing: .04em; }
.stats > div { border-radius: 10px; border-top: 4px solid var(--brand); }
.stats b { font-size: 25px; font-style: italic; font-weight: 900; letter-spacing: -0.02em; }
.stats span { text-transform: uppercase; font-weight: 700; letter-spacing: .02em; font-size: 12px; }

/* Cabeçalho do Início */
.hero {
  position: relative; overflow: hidden; display: block;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 40px;
  border-radius: 0;
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgb(255 255 255 / 5%) 26px 52px),
    linear-gradient(140deg, var(--navy) 10%, var(--team) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
  color: #fff;
}
.hero.has-cover {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--navy) 55%, transparent), color-mix(in srgb, var(--navy) 92%, transparent)),
    var(--cover) center / cover no-repeat;
}
.hero::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: 10px; height: 6px; background: var(--team-2); transform: rotate(-4.2deg); opacity: .9; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-club { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: 1; }
.hero-club .badge { width: 44px; height: 50px; }
.hero h1 { font-size: 32px; font-style: italic; text-transform: uppercase; line-height: 1; margin-top: 14px; text-shadow: 0 2px 12px rgb(0 0 0 / 25%); }
.hero-coach { margin-top: 6px; font-size: 14px; font-weight: 600; opacity: .9; }
.hero .net { margin-top: 10px; }
.team-switch .caret { color: var(--team-2); }

/* Emblema e fotografias */
.badge { display: inline-block; width: 40px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 25%)); }
.badge.xl { width: 72px; height: 82px; }
.badge.sm { width: 26px; height: 30px; }
img.avatar { object-fit: cover; padding: 0; }
.avatar { border: 2px solid var(--team-2); }
.avatar.light { background: rgb(255 255 255 / 18%); }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }

/* Cartão do próximo jogo, em estilo "matchday" */
.card.match {
  position: relative; overflow: hidden; color: #fff;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgb(255 255 255 / 4%) 22px 44px),
    linear-gradient(150deg, var(--navy), color-mix(in srgb, var(--team) 80%, var(--navy)));
}
.card.match .card-kicker { color: var(--team-2); }
.card.match .muted, .card.match .hint { color: rgb(255 255 255 / 75%); }
.card.match h2 { font-style: italic; text-transform: uppercase; font-size: 20px; }
.card.match .btn { background: transparent; color: #fff; border-color: rgb(255 255 255 / 45%); }
.card.match .btn.primary { background: var(--team-2); color: var(--team-2-ink); border-color: var(--team-2); box-shadow: none; }
.vs-line { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.vs-line .vs { font-weight: 900; font-style: italic; opacity: .7; }

/* Navegação inferior */
#tabs { background: var(--navy); border-top: 0; box-shadow: 0 -6px 18px rgb(0 0 0 / 15%); }
.tab { color: rgb(255 255 255 / 60%); text-transform: uppercase; letter-spacing: .01em; font-weight: 800; font-size: 11px; position: relative; }
.tab.on { color: #fff; }
.tab.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; background: var(--team-2); border-radius: 0 0 3px 3px; }

/* Marcador ao vivo */
.scoreboard {
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgb(255 255 255 / 4%) 26px 52px),
    linear-gradient(160deg, var(--navy), color-mix(in srgb, var(--team) 60%, var(--navy)));
  border-bottom: 4px solid var(--team-2);
}
.sb-num { font-style: italic; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 4px; text-transform: uppercase; letter-spacing: .03em; }
.sb-team .badge { width: 30px; height: 34px; }
.clock { font-style: italic; font-weight: 900; }

/* Definições: imagem e cores */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 12px; }
.media { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg); }
.cover-prev { height: 110px; border-radius: 12px; background: linear-gradient(140deg, var(--navy), var(--team)) center / cover no-repeat; display: grid; place-items: center; color: rgb(255 255 255 / 70%); font-weight: 700; font-size: 13px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.swatch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--card); }
.swatch span { height: 28px; }
.swatch small { grid-column: 1 / -1; padding: 4px; font-size: 11px; font-weight: 700; color: var(--ink); }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--brand); }
.color-field input[type=color] { padding: 4px; height: 48px; }
.look h2 { margin-bottom: 4px; }

/* Ecrã de entrada */
.login-brand h1 { font-style: italic; text-transform: uppercase; }
.sb-team { white-space: normal; font-size: 12.5px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }

/* ---------- Modo no campo ---------- */
.field { padding-top: env(safe-area-inset-top, 0px); }
.field-top {
  display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 12px 16px;
  background: var(--navy); color: #fff;
}
.field-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.field-title small { opacity: .75; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.field-title b { font-style: italic; text-transform: uppercase; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-progress { display: flex; gap: 3px; margin: 0 -16px 14px; padding: 0 16px 10px; background: var(--navy); }
.seg-progress span { height: 6px; border-radius: 3px; background: rgb(255 255 255 / 20%); }
.seg-progress span.done { background: var(--team-2); }
.seg-progress span.cur { background: #ffb74d; }
.field-card {
  border-radius: 16px; padding: 18px 16px; text-align: center; color: #fff;
  background:
    repeating-linear-gradient(115deg, transparent 0 24px, rgb(255 255 255 / 5%) 24px 48px),
    linear-gradient(160deg, var(--navy), color-mix(in srgb, var(--team) 75%, var(--navy)));
  border-top: 6px solid var(--team-2);
}
.field-card.type-aquecimento { border-top-color: #e8833a; }
.field-card.type-jogo { border-top-color: #2f7de1; }
.field-card.type-gr { border-top-color: #9a5bd6; }
.field-card.type-calma { border-top-color: #6aa9a0; }
.field-type { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.field-card h1 { font-size: 26px; font-style: italic; text-transform: uppercase; margin-top: 6px; line-height: 1.1; }
.field-clock { font-size: 76px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 14px; letter-spacing: -0.02em; }
.field-clock.over { color: #ff8a80; animation: blink 1s infinite; }
.field-clock.paused { opacity: .6; }
.field-planned { font-size: 13px; opacity: .75; margin-top: 4px; }
.field-ctrl { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; margin-top: 14px; }
.field-ctrl .btn { background: rgb(255 255 255 / 12%); border-color: transparent; color: #fff; box-shadow: none; }
.field-ctrl .btn.primary { background: var(--team-2); color: var(--team-2-ink); }
.field-desc { margin-top: 14px; font-size: 16px; line-height: 1.45; text-align: left; }
.field-mat { margin-top: 8px; font-size: 14px; opacity: .85; text-align: left; }
.field-next { margin-top: 14px; }
.field-cta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--navy); color: #fff;
}
.field-cta span { flex: 1; display: flex; flex-direction: column; }
.field-cta small { opacity: .75; }
.teams-n { margin-bottom: 12px; }
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.team-col { border-radius: 12px; border-top: 6px solid var(--tc); background: var(--bg); padding: 8px; }
.team-head { font-weight: 900; font-style: italic; text-transform: uppercase; margin-bottom: 6px; display: flex; justify-content: space-between; }
.team-head small { color: var(--muted); font-style: normal; }
.team-p { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-weight: 600; font-size: 14px; }
.team-p .num { width: 28px; height: 28px; font-size: 13px; }

/* ---------- Carregar treinos ---------- */
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; text-align: left; }
.start-opt {
  display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); color: var(--ink);
}
.start-opt span { font-size: 22px; }
.start-opt b { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 14px; }
.start-opt small { color: var(--muted); font-size: 12px; }
.start-opt:active { border-color: var(--brand); }
.paste-area { font-size: 15px; min-height: 150px; }
.paste-preview { margin: 8px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.paste-preview li b { font-weight: 700; }
.paste-preview li span { float: right; font-weight: 900; font-style: italic; }
.paste-preview li small { display: block; color: var(--muted); font-size: 12px; }
.attach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.attach { position: relative; display: flex; flex-direction: column; gap: 4px; }
.attach small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-open { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: var(--card); padding: 0; cursor: pointer; display: grid; place-items: center; }
.attach-open img { width: 100%; height: 100%; object-fit: cover; }
.pdf-ico { font-weight: 900; font-style: italic; color: #fff; background: #d93025; padding: 8px 10px; border-radius: 6px; }
.attach-del { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 12px; cursor: pointer; }
.attach.add { aspect-ratio: 1; align-items: center; justify-content: center; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; color: var(--muted); }
.attach.add small { white-space: normal; text-align: center; }
.attach-full { width: 100%; border-radius: 12px; }
.tpl-row { display: flex; align-items: center; padding-right: 8px; }
.tpl-row .row { flex: 1; min-width: 0; }
.hd-right .btn.small { min-height: 40px; }

/* ---------- Avisos com ação e perguntas ---------- */
#toast { display: flex; align-items: center; gap: 12px; }
#toast.has-action { pointer-events: auto; padding-right: 8px; }
#toast button { border: 0; background: var(--team-2, #fff); color: var(--team-2-ink, #000); font-weight: 900; text-transform: uppercase; font-size: 13px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.ask-msg { font-size: 16px; line-height: 1.45; margin-bottom: 8px; }
.ask-btns .btn.block { margin-top: 8px; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- A fazer ---------- */
.todo { border-top: 4px solid var(--brand); }
.todo .count { margin-left: auto; background: var(--bad); color: #fff; font-style: normal; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.todo-list .row { padding: 10px 0; min-height: 56px; }
.todo-list .row.urgent b { color: var(--bad); }
.todo-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 17px; flex: none; }
.todo-list .row.urgent .todo-ico { background: var(--bad-soft); }
.todo-list .row svg { color: var(--muted); width: 18px; height: 18px; }
.todo.done { border-top-color: var(--ok); }
.tabs-seg.cols-1 { display: none; }
.tabs-seg.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tabs-seg.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-style: normal; margin-left: 2px; }

.tabs-seg a { display: grid; place-items: center; min-height: 40px; border-radius: 9px; font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.tabs-seg a.on { background: var(--brand); color: var(--brand-ink); }
.legend { margin-top: -4px; }

/* ---------- Legendas ---------- */
.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 2px 10px; font-size: 13px; color: var(--muted); }
.legend-row > span:first-child { flex-basis: 100%; }
.legend-row .lg { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; }
.att-mark.sample { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; border: 1.5px dashed var(--line); font-style: normal; font-size: 11px; font-weight: 800; }
.lg.ok .att-mark.sample { background: var(--ok); color: #fff; border: 0; }
.lg.bad .att-mark.sample { background: var(--bad); color: #fff; border: 0; }
.lg.warn .att-mark.sample { background: var(--warn); color: #fff; border: 0; }
.resp.sample { margin: 0; min-width: 0; min-height: 28px; padding: 2px 8px; cursor: default; display: inline-grid; place-items: center; }

/* Legibilidade ao ar livre */
.grow small, .hint, .muted { font-size: max(13px, 1em); }
.mode-seg { margin: 4px 0 14px; }
.tab { text-transform: none; font-size: 11.5px; letter-spacing: 0; }
.tabs-seg button, .tabs-seg a { font-size: 12px; letter-spacing: .01em; }
.tabs-seg.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tabs-seg.cols-4 button { font-size: 11.5px; padding: 0 2px; }

/* ---------- Primeiros passos e “Guardado” ---------- */
.onboarding { border-top: 4px solid var(--ok); }
.onboarding .count.ok { margin-left: auto; background: var(--ok); color: #fff; font-style: normal; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.onboarding .bar { margin: 4px 0 6px; height: 6px; }
.steps .row { padding: 8px 0; min-height: 50px; }
.step-mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 13px; flex: none; }
.steps .row.done .step-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .row.done b { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.steps .row.next b { color: var(--brand-text); }
.steps .row.next .step-mark { border-color: var(--brand); }
.steps .row svg { color: var(--muted); width: 18px; height: 18px; }
#saved {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; z-index: 70;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  background: var(--ok); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  transition: opacity .2s, transform .2s; box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}
#saved.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Dicas ---------- */
.tip {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px;
  border-radius: 12px; background: var(--brand-soft); border-left: 4px solid var(--brand);
  font-size: 14px; line-height: 1.4;
}
.tip p { flex: 1; margin: 0; }
.tip-ico { font-size: 18px; line-height: 1.2; }
.tip-ok { border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 12px; text-transform: uppercase; padding: 6px 10px; border-radius: 8px; cursor: pointer; flex: none; align-self: center; }
.field .tip { margin-top: 0; }
.steps b { white-space: normal; }

/* ---------- Editar plantel em lista ---------- */
.roster-edit { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roster-row { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.roster-main { display: grid; grid-template-columns: 56px 1fr 72px; gap: 6px; }
.roster-sub { display: grid; grid-template-columns: 1fr 1fr 36px; gap: 6px; align-items: center; }
.roster-row input, .roster-row select { min-height: 42px; padding: 8px; font-size: 15px; }
.r-num { text-align: center; font-weight: 900; font-style: italic; }
.r-name { font-weight: 700; }
.roster-sub input { font-size: 14px; }
code { font-size: 13px; background: var(--bg); padding: 1px 5px; border-radius: 5px; }

/* ---------- Página de Dicas ---------- */
.hero-actions { display: flex; align-items: center; gap: 8px; }
.help-btn { font-weight: 900; font-size: 20px; font-style: italic; }
.help-search { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 0 12px; margin-bottom: 4px; }
.help-search input { border: 0; background: transparent; min-height: 48px; padding: 0; }
.help-search input:focus { outline: none; }
.help-list { display: flex; flex-direction: column; gap: 8px; }
.help-item { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.help-item summary { display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; list-style: none; min-height: 56px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.help-item[open] summary::after { transform: rotate(180deg); }
.help-item[open] summary { border-bottom: 1px solid var(--line); }
.help-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 17px; flex: none; }
.help-body { padding: 4px 16px 14px; font-size: 15px; line-height: 1.5; }
.help-body ul { margin: 8px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.help-body .btn { margin-top: 4px; }
.tip-more { font-weight: 700; color: var(--brand-text); white-space: nowrap; }

/* ---------- Entrar com conta ---------- */
.auth-msg { background: var(--brand-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.auth-msg.warn { background: var(--warn-soft); color: var(--warn); }
.hint.center { text-align: center; }
.login .form h2 { margin-bottom: 2px; }
.login .btn.block + .btn.block { margin-top: 8px; }
.start-grid.one { grid-template-columns: 1fr; }
.start-grid.one .start-opt { padding: 16px; }
.start-grid.one .start-opt small { font-size: 13px; }
.sync-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.sync-line small { color: var(--muted); }
.stats > div { min-width: 0; }
.stats.tight { gap: 6px; }
.stats.tight > div { padding: 10px 6px; }
.stats.tight b { font-size: 22px; }
.stats.tight span { font-size: 11px; letter-spacing: 0; overflow-wrap: anywhere; }

/* ---------- Barra de baixo com número variável de separadores ---------- */
#tabs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab { font-size: 11px; }

/* ---------- Observação ---------- */
.scout-board {
  margin-bottom: 12px; padding: 14px; border-radius: 14px; color: #fff;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgb(255 255 255 / 4%) 22px 44px),
    linear-gradient(150deg, #1b2433, #2c3a52);
}
.scout-teams { display: grid; grid-template-columns: 1fr 76px 1fr; gap: 8px; align-items: start; }
.scout-teams > div { display: flex; flex-direction: column; gap: 6px; text-align: center; min-width: 0; }
.scout-teams b { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 14px; overflow-wrap: anywhere; }
.scout-teams select { min-height: 36px; padding: 4px 6px; font-size: 13px; background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 20%); }
.scout-teams select option { color: #000; }
.scout-score { text-align: center; font-size: 22px; font-weight: 900; font-style: italic; min-height: 46px; padding: 4px; background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 20%); }
.scout-clock { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.scout-clock [data-sclock] { font-size: 30px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.scout-clock .btn { background: rgb(255 255 255 / 14%); border-color: transparent; color: #fff; box-shadow: none; }
.scout-clock .btn.primary { background: #fff; color: #1b2433; }
.note-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.note-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; border-radius: 12px; border: 2px solid var(--line); background: var(--card);
  font-weight: 800; font-size: 12px; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); padding: 4px;
}
.note-btn span { font-size: 20px; }
.note-btn:active { transform: scale(.96); border-color: var(--brand); }
.note-btn.cat-jogador { border-color: var(--brand); }
.note-btn.cat-golo { border-color: var(--ok); }
.scout-notes .row { align-items: flex-start; }
.scout-notes .ev-min { padding-top: 2px; }
.scout-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.stars { letter-spacing: 1px; font-size: 14px; color: var(--line); white-space: nowrap; }
.stars i { font-style: normal; }
.stars i.on { color: #f2b400; }
.scale-pick input { position: absolute; opacity: 0; pointer-events: none; }
.scale-pick span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; }
.scale-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
#tabs .tab { font-size: 10.5px; letter-spacing: -0.01em; }
#tabs .tab svg { width: 21px; height: 21px; }

/* ---------- Notas para o Alvinho ---------- */
.fun-line { margin-top: 8px; font-weight: 700; font-style: italic; color: var(--team-2); opacity: .95; }
.fun-line.small { margin: -2px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
