/* Bolão Mata-Mata — Copa 2026.
   Theme ported from ~/projects/bolao (clean light theme, mobile-first). */

:root {
  --green:        #15803d;
  --green-600:    #16a34a;
  --green-050:    #ecfdf3;
  --bg:           #f5f4f0;
  --card:         #ffffff;
  --text:         #111827;
  --muted:        #6b7280;
  --border:       #e8e6e1;
  --live:         #dc2626;
  --live-bg:      #fef2f2;
  --radius:       14px;
  --shadow:       0 1px 2px rgba(40,33,22,.04), 0 1px 3px rgba(40,33,22,.06);
  --maxw:         720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px 40px;
}

/* ---------- App bar ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  margin: 0 -14px 16px;
  padding: 12px 16px;
  border-bottom: 3px solid var(--green);
  box-shadow: var(--shadow);
}
.appbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.appbar__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}
.brandmark { display: block; border-radius: 7px; }
.brandsub { color: var(--muted); font-weight: 700; font-size: 13px; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
}
.tab:hover { border-color: var(--green-600); color: var(--green); }
.tab--sel, .tab--sel:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ---------- Cards & generic blocks ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.pad { padding: 16px; }
.note {
  font-size: 13px;
  color: var(--muted);
  background: var(--green-050);
  border: 1px solid #d6f0e0;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
}
.muted { color: var(--muted); }
.page-title {
  font-size: 24px; font-weight: 800; letter-spacing: -.01em;
  margin: 4px 0 4px;
}
.block-title { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.section-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }

/* ---------- Hero (landing) ---------- */
.hero { padding: 22px 18px; }
.hero__title { font-size: 26px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 8px; }
.hero__lead { color: var(--muted); font-size: 15px; margin: 0 0 16px; line-height: 1.45; }
.howlist { margin: 0; padding-left: 20px; }
.howlist li { margin: 0 0 8px; line-height: 1.45; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s, transform .04s;
}
.btn:hover { border-color: var(--green-600); color: var(--green); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn--primary:hover { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn--lg { font-size: 16px; padding: 13px 26px; }

/* ---------- Form ---------- */
.gform { margin-top: 4px; }
.gsec { margin-bottom: 18px; }
.gsec__head { margin: 18px 4px 8px; }
.gsec__title { font-size: 16px; font-weight: 800; margin: 0; }
.gsec__sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus { outline: none; border-color: var(--green-600); }
.field__hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* Game row */
.game {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.game:last-child { border-bottom: 0; }
.game__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 9px; font-size: 11.5px; color: var(--muted);
}
.game__num {
  font-weight: 800; color: var(--text);
  text-transform: uppercase; letter-spacing: .03em;
}
.game__dt { font-variant-numeric: tabular-nums; }
.game__dt::before { content: "·"; margin-right: 6px; }
.game__tbd {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: #92710c; background: #fff8e1; border: 1px solid #f0e0a8;
  padding: 1px 7px; border-radius: 999px; margin-left: 2px;
}
.game__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.gteam {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  font-weight: 600; font-size: 15px; line-height: 1.2;
}
.gteam--home { justify-content: flex-end; text-align: right; }
.gteam--away { justify-content: flex-start; text-align: left; }
.gteam .tname { min-width: 0; }

/* Flags */
.flag {
  width: 28px; height: 21px; flex: 0 0 auto; display: block;
  border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.flag--sm { width: 22px; height: 16px; }
.flag--tbd {
  background: repeating-linear-gradient(45deg, #eef0f2 0 4px, #e2e6ea 4px 8px);
  box-shadow: inset 0 0 0 1px var(--border);
}
.gscore { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.gx { color: var(--muted); font-weight: 700; }
.gnum {
  width: 48px; height: 46px; text-align: center;
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-weight: 800; font-size: 17px; color: var(--text);
  background: #fafbfc; -webkit-appearance: none; appearance: none;
  -moz-appearance: textfield; transition: border-color .12s, background .12s;
}
.gnum:hover { border-color: var(--green-600); }
.gnum::-webkit-outer-spin-button,
.gnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gnum:focus { outline: none; border-color: var(--green-600); background: var(--card); box-shadow: 0 0 0 3px var(--green-050); }

.gform__actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.gform__actions--left { justify-content: flex-start; flex-wrap: wrap; margin: 4px 0 18px; }

/* Errors */
.errors {
  background: var(--live-bg);
  border: 1px solid #f6c9c9;
  color: #991b1b;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.errors ul { margin: 6px 0 0; padding-left: 20px; }
.errors li { margin: 2px 0; }

/* ---------- Confirmation ---------- */
.summary {
  padding: 18px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.summary__lbl { font-size: 13px; opacity: .92; font-weight: 600; }
.summary__code {
  font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; margin: 2px 0;
}
.summary__break { font-size: 13px; opacity: .92; }
.confmeta { font-size: 14px; color: var(--text); margin: 0 2px 14px; }

.recap {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.recap:last-child { border-bottom: 0; }
.recap__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 7px; font-size: 11.5px; color: var(--muted);
}
.recap__num {
  font-weight: 800; color: var(--text);
  text-transform: uppercase; letter-spacing: .03em;
}
.recap__dt { font-variant-numeric: tabular-nums; }
.recap__dt::before { content: "·"; margin-right: 6px; }
.recap__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.recap__home, .recap__away {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  font-weight: 600; font-size: 14.5px;
}
.recap__home { justify-content: flex-end; }
.recap__away { justify-content: flex-start; }
.recap__score {
  font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums;
  white-space: nowrap; padding: 2px 8px; border-radius: 8px;
  background: var(--green-050); color: var(--green); min-width: 56px; text-align: center;
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Admin panel ---------- */
.adm__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin: 2px 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.adm__brand {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--green);
}
.adm__nav { display: flex; gap: 6px; flex-wrap: wrap; }
.adm__tab {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background .12s, color .12s, border-color .12s;
}
.adm__tab:hover { border-color: var(--green-600); color: var(--green); }
.adm__tab--sel, .adm__tab--sel:hover {
  background: var(--green); border-color: var(--green); color: #fff;
}
.adm__section { margin-top: 22px; }
.adm__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}

/* Banners (auth notice + flash) */
.banner {
  border-radius: 10px; padding: 10px 13px; margin: 0 0 14px;
  font-size: 13.5px; border: 1px solid var(--border);
}
.banner--warn { background: #fff8e1; border-color: #f0e0a8; color: #92710c; }
.banner--success { background: var(--green-050); border-color: #d6f0e0; color: var(--green); }
.banner--error { background: var(--live-bg); border-color: #f6c9c9; color: #991b1b; }

/* Stat cards */
.statgrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 6px;
}
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
}
.stat__num {
  font-size: 26px; font-weight: 800; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat__lbl { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Option cards (tool grid) */
.optiongrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; transition: border-color .12s, transform .04s;
}
.option:hover { border-color: var(--green-600); }
.option:active { transform: translateY(1px); }
.option--soon { opacity: .65; }
.option__title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.option__desc { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.4; }

.pill {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px;
  color: var(--muted); background: #f1f0ec; border: 1px solid var(--border);
}
.pill--ok { color: var(--green); background: var(--green-050); border-color: #d6f0e0; }
.pill--off { color: #991b1b; background: var(--live-bg); border-color: #f6c9c9; }
.pill--warn { color: #92710c; background: #fff8e1; border-color: #f0e0a8; }

/* Clickable payment pill (toggles paid / pending) */
.pay { display: inline; }
.paytoggle {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.paytoggle .pill { transition: filter .12s; }
.paytoggle:hover .pill { filter: brightness(.96); }

/* Filter chips */
.chips { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background .12s, color .12s, border-color .12s;
}
.chip:hover { border-color: var(--green-600); color: var(--green); }
.chip--sel, .chip--sel:hover {
  background: var(--green); border-color: var(--green); color: #fff;
}

/* Tables */
.adm__scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.nowrap { white-space: nowrap; }
.ta-right { text-align: right; }

.link {
  color: var(--green); font-weight: 700; text-decoration: none;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.link:hover { text-decoration: underline; }
.link--danger { color: var(--live); margin-left: 12px; }
.inline { display: inline; }

.btn--danger { border-color: #f6c9c9; color: var(--live); }
.btn--danger:hover { border-color: var(--live); color: #fff; background: var(--live); }

/* Search + add forms */
.searchbar { display: flex; gap: 8px; margin: 4px 0 10px; }
.searchbar input {
  flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; background: var(--card); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.searchbar input:focus { outline: none; border-color: var(--green-600); }
.adm__addform {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end;
}
.adm__addform .btn { height: 44px; }

/* ---------- Login / change-password ---------- */
.login-box {
  max-width: 380px;
  margin: 48px auto;
}
.login-box .page-title { margin-bottom: 6px; }
.login-box .note { margin: 0 0 20px; }
.authform { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.authform__field { display: flex; flex-direction: column; gap: 6px; }
.authform__field span { font-size: 13px; font-weight: 600; color: var(--muted); }
.authform__field input {
  height: 44px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; background: var(--card); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.authform__field input:focus { outline: none; border-color: var(--green-600); }
.authform .btn { margin-top: 6px; }
.adm__tab--logout { margin-left: auto; }

/* ---------- Footer ---------- */

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  body { font-size: 15px; }
  .appbar__title { font-size: 17px; }
  .brandsub { display: none; }
  .game { padding: 12px 11px; }
  .gteam { font-size: 14px; }
  .recap { padding: 11px 11px; }
  .recap__home, .recap__away { font-size: 13.5px; }
  .hero__title { font-size: 22px; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
  .optiongrid { grid-template-columns: 1fr; }
  .adm__addform { grid-template-columns: 1fr; }
}
