/* Convocados — identity locked by João 2026-08-20 (lab DESIGN.md):
   palette Cartão Amarelo · mark Meio-Campo · type Figtree.
   Layout refs unchanged (Footy Addicts/Luma sheet-over-header, Spond rows,
   Splitwise avatars, Tricount row-tap, Capo fee-in-the-open).
   --pitch kept as the primary-action token name; it is now the near-black. */

:root {
  --pitch: #221E14;
  --pitch-deep: #131007;
  --y: #FFC825;
  --ink: #221E14;
  --ink-soft: #7C7565;
  --paper: #FFFDF6;
  --card: #ffffff;
  --line: #F0EBDD;
  --paid: #187840;
  --paid-wash: #E9F4EA;
  --says: #8A6A1F;
  --says-wash: #FBF0D2;
  --unpaid-wash: #F5F1E6;
  --danger: #b3372e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---- hero: colour block with white sheet sliding over it ---- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--pitch) 0%, var(--pitch-deep) 100%);
  padding: max(20px, env(safe-area-inset-top)) 20px 56px;
  color: #fff;
}
.hero .brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* language toggle — top-right of the hero, always reachable */
.lang-toggle {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  display: flex;
  gap: 4px;
}
.lang-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 750;
  font-family: inherit;
  letter-spacing: 0.03em;
  cursor: pointer;
  opacity: 0.7;
}
.lang-btn.active { opacity: 1; background: var(--y); color: var(--pitch); }

/* screenshot redaction overlay — the raw image is drawn straight into this
   canvas and never uploaded; only the blacked-out flatten leaves the device */
.redact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 16, 7, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.redact-sheet {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
}
.redact-sheet h2 { margin: 0 0 6px; font-size: 18px; }
.redact-canvas {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: crosshair;
  touch-action: none;
}
.redact-sheet .actions { display: flex; gap: 8px; }
.redact-sheet .actions .btn { margin-top: 10px; }
.sheet {
  /* .hero became position:relative for the lang toggle, which paints it above
     this static sheet and clipped the h1 (João's phone, 2026-08-22). The sheet
     must stack above the hero it slides over. */
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  margin: -36px auto 0;
  max-width: 560px;
  padding: 20px 18px calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 var(--line);
  min-height: 60vh;
}
.sheet h1 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 4px;
}
.sheet .sub { color: var(--ink-soft); margin: 0 0 16px; }

/* ---- icon + two-line info rows (Spond) ---- */
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info-row .ico { font-size: 20px; width: 28px; text-align: center; flex: none; }
.info-row .primary { font-weight: 650; }
.info-row .secondary { color: var(--ink-soft); font-size: 14px; }
.info-row .end { margin-left: auto; flex: none; }

/* venue request→confirm chip — never implies live availability */
.chip {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.chip.pedido { background: var(--says-wash); color: var(--says); }
.chip.confirmado { background: var(--paid-wash); color: var(--paid); }
button.chip { cursor: pointer; font-family: inherit; }

/* ---- three-stat strip (Footy Addicts) ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.stat .label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.stat .value {
  font-size: 19px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* money is the biggest number on screen */
.hero-figure {
  text-align: center;
  margin: 18px 0 6px;
}
.hero-figure .amount {
  font-size: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.hero-figure .math {
  color: var(--ink-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ---- roster / board rows ---- */
.rows { margin: 8px 0 4px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  position: relative;
}
.avatar .badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--card);
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  color: #fff;
}
.badge.on { background: var(--paid); }
.badge.off { background: #b9b6ac; }
.row .who { min-width: 0; }
.row .who .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who .tag { font-size: 12.5px; color: var(--ink-soft); }
.row .end { margin-left: auto; text-align: right; flex: none; display: flex; align-items: center; gap: 10px; }
.row .amount { font-weight: 750; font-variant-numeric: tabular-nums; font-size: 16.5px; }

.pay-state {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
}
.pay-state.unpaid { background: var(--unpaid-wash); color: var(--ink-soft); }
.pay-state.says { background: var(--says-wash); color: var(--says); }
.pay-state.paid { background: var(--paid-wash); color: var(--paid); }
button.pay-state { cursor: pointer; }

/* attendance toggle */
button.att {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-soft);
}
button.att.on { background: var(--paid-wash); border-color: var(--paid); color: var(--paid); }

/* ---- buttons ---- */
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 750;
  cursor: pointer;
  margin: 10px 0 0;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--unpaid-wash);
}
.btn.primary { background: var(--pitch); color: var(--y); }
.btn.quiet { background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
.btn.danger-quiet { background: transparent; color: var(--danger); font-weight: 600; font-size: 14.5px; }
.btn:disabled { opacity: 0.5; cursor: default; }

.actions { margin-top: 18px; }

/* ---- forms ---- */
label.field { display: block; margin: 14px 0 0; }
label.field .lbl { font-size: 14px; font-weight: 650; display: block; margin-bottom: 5px; }
input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--pitch); border-color: var(--pitch); }
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* progress bar for the board */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--unpaid-wash);
  overflow: hidden;
  margin: 6px 0 2px;
}
.progress .fill { height: 100%; background: var(--paid); border-radius: 999px; }

.section-title {
  font-size: 14px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 22px 0 4px;
}

.banner {
  background: var(--says-wash);
  border: 1px solid #eadfc0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  margin: 0 0 16px;
}
.banner.ok { background: var(--paid-wash); border-color: #cfe6d8; }

.error { color: var(--danger); font-weight: 650; margin: 10px 0; }
.footnote { color: var(--ink-soft); font-size: 13px; margin-top: 22px; text-align: center; }
.footnote a { color: inherit; }

/* v2: model picker (review screen) + wa.me chip links */
button.stat { cursor: pointer; font-family: inherit; }
a.chip { text-decoration: none; line-height: 1.6; }

/* ---- venue feed (v3 restructure, 2026-08-23 — Airbnb card meta order) ---- */
.venue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.venue-emoji {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--y);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
.venue-emoji.muted { background: var(--unpaid-wash); }
.venue-info { min-width: 0; flex: 1; }
.venue-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.venue-meta { font-size: 13px; color: var(--ink-soft); margin-top: 1px; }
.venue-end { flex: none; margin-left: auto; }
.venue-cta-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 0;
  background: var(--unpaid-wash);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.venue-soon { font-size: 12.5px; color: var(--ink-soft); font-weight: 650; }
.venue-arrow { font-size: 18px; color: var(--ink-soft); }

/* ---- games list ("Os meus jogos", v3 increment 2 — Heja/Spond row idiom) ---- */
.game-row {
  display: block;
  padding: 12px 12px 12px 14px;
  border-left: 4px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  margin-bottom: 2px;
  cursor: pointer;
}
.game-row.pedido { border-left-color: var(--says); }
.game-row.confirmado { border-left-color: var(--paid); }
.game-row-top { display: flex; align-items: baseline; gap: 8px; }
.game-row .venue-name { font-weight: 650; }
.game-row .game-meta { font-size: 13px; color: var(--ink-soft); margin-left: auto; white-space: nowrap; }
.game-row-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.game-chip {
  font-size: 12px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.game-row-actions { margin-top: 8px; }
.game-row-actions .venue-cta-btn { padding: 6px 12px; font-size: 12.5px; }

/* Cartão Amarelo accents (identity 2026-08-20) */
.hero .brand { color: var(--y); }
button { font-family: inherit; }
