:root {
  --green: #005a1d;
  --dark: #061d12;
  --yellow: #ffd21f;
  --line: #dfe7e2;
  --shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body {
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
}
body {
  margin: 0;
  min-height: 100vh;
  color: #101f16;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: #f4f7f5;
}

body::selection { background: var(--yellow); color: #111; }

button, input, select { font: inherit; }
a { color: inherit; }

.home {
  display: grid;
  place-items: center;
  background: url("../img/participante-bg.webp") center/cover;
}
.home-card {
  width: min(460px, calc(100vw - 32px));
  padding: 34px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  text-align: center;
}
.home-card h1 { margin: 0 0 8px; font-size: 2.2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  gap: 8px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0, 90, 29, .18); }
.btn.yellow { background: linear-gradient(180deg, #ffe45b, #f6bd00); color: #111; }
.btn.outline { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.danger { background: #b42318; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .82rem; }
.kicker {
  display: inline-block;
  color: var(--green);
  font-size: .75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff4a8, #f3bd00);
  font-size: 2rem;
  color: #07170d;
  font-weight: 950;
  margin-bottom: 12px;
}
.form-error { color: #b42318; font-weight: 850; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 210, 31, .18), transparent 24%),
    linear-gradient(180deg, rgba(0, 15, 8, .34), rgba(0, 18, 10, .72)),
    url("../img/participante-bg.webp") center/cover;
  padding: 20px;
}
.login-card {
  width: min(430px, 100%);
  display: grid;
  justify-items: center;
  padding: 34px;
  border: 1px solid rgba(255, 210, 31, .34);
  border-radius: 18px;
  background: rgba(3, 24, 14, .88);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.login-card h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
.login-card p {
  margin: 8px 0 22px;
  color: var(--yellow);
  font-weight: 950;
  text-transform: uppercase;
}
.login-card .field,
.login-card .btn {
  width: 100%;
}
.login-card .field label {
  color: rgba(255,255,255,.86);
}
.login-kicker {
  margin-bottom: 8px;
  color: #bde8c6;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .83rem; font-weight: 800; color: #315342; }
.input, .select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd9d4;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 210, 31, .12), transparent 28%),
    #f3f7f4;
  min-width: 0;
}
.sidebar {
  background: linear-gradient(180deg, rgba(0, 76, 28, .96), rgba(1, 31, 17, .98)), url("../img/participante-bg.webp") center/cover;
  color: #fff;
  padding: 28px 16px;
  box-shadow: 18px 0 40px rgba(0, 0, 0, .08);
  min-width: 0;
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 950; font-size: 1.2rem; margin-bottom: 26px; }
.brand span { font-size: 2.3rem; }
.nav { display: grid; gap: 8px; }
.nav button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 12px;
  font-weight: 800;
  cursor: pointer;
}
.nav button.active, .nav button:hover { background: rgba(31, 185, 61, .7); }
.admin-main { padding: 24px; overflow-x: hidden; max-width: 1360px; width: 100%; min-width: 0; }
.topbar {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 4px;
}
.topbar h1 { margin: 0; }

.metrics { display: grid; grid-template-columns: repeat(5, minmax(118px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric, .card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .06);
}
.metric { min-height: 108px; padding: 18px; position: relative; overflow: hidden; }
.metric::after {
  content: "";
  position: absolute;
  inset: auto -30px -42px auto;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: rgba(0, 90, 29, .07);
}
.metric-icon {
  float: right;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #f0f8f2;
  color: var(--green);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.metric small { display: block; color: #66746c; font-weight: 800; }
.metric strong { font-size: 1.8rem; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }
.card { padding: 18px; margin-bottom: 16px; }
.card h2, .card h3 { margin-top: 0; }
.empty-card { color: #66746c; }
.match-admin-card .match-row-admin {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.match-admin-card .crest { width: 72px; margin: 0 auto 8px; }
.score-large { font-size: 2.2rem; font-weight: 950; color: #111; }
.date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 10px 0 4px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef8f1;
  color: var(--green);
  font-weight: 900;
}
.admin-line, .summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf1ef;
}
.summary-line strong { color: var(--green); font-size: 1.35rem; }
.quick-actions { display: grid; gap: 10px; }
.copy-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.section-head h2, .section-head p { margin: 0; }
.section-head p { color: #66746c; font-size: .9rem; }
.select-wrap { min-width: min(360px, 100%); }
.admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px; border-bottom: 1px solid #edf1ef; text-align: left; }
th { background: #f4f8f5; color: #355344; font-size: .78rem; text-transform: uppercase; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #e8f5ec; color: var(--green); font-weight: 850; font-size: .78rem; }

.dashboard-grid { align-items: stretch; }
.dashboard-grid > div { display: grid; }
.dashboard-grid .card { height: auto; }
.dashboard-grid .qr-card { align-content: start; }
.dashboard-grid .qr-card .qr-img { width: 148px; }
.dashboard-grid .ranking-admin-card table { min-width: 0; }
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.game-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .06);
}
.game-card.active { border-color: rgba(0, 90, 29, .35); box-shadow: 0 18px 42px rgba(0, 90, 29, .12); }
.game-card h3 { margin: 0 0 4px; }
.game-card small { color: #66746c; word-break: break-word; }
.game-card-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.game-card-match .crest { width: 56px; margin: 0 auto 6px; }
.game-card-match b { font-size: 1.55rem; }
.game-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #53665b;
  font-size: .9rem;
}
.export-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ranking-admin-card table td:last-child { width: 1%; white-space: nowrap; }
.uppercase-input { text-transform: uppercase; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.game-editor { display: grid; gap: 16px; }
.editor-hero {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 45, 20, .92), rgba(0, 90, 29, .82)),
    url("../img/participante-bg.webp") center/cover;
  box-shadow: var(--shadow);
}
.editor-hero .kicker { color: var(--yellow); }
.editor-hero h2, .editor-hero p { margin: 0; }
.editor-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
}
.team-upload { grid-template-columns: 1fr auto; align-items: center; }
.upload-box { display: grid; gap: 10px; justify-items: center; }
.upload-preview .crest { width: 82px; }
.editor-actions { padding: 6px 0 24px; }
.score-form { display: grid; gap: 18px; justify-items: center; margin-top: 16px; }
.score-board-admin {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
  width: min(720px, 100%);
}
.score-control {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
}
.score-control > div { display: flex; align-items: center; gap: 8px; }
.score-control .crest { width: 46px; }
.score-control input { width: 72px; text-align: center; font-size: 1.4rem; font-weight: 950; }
.step {
  width: 42px;
  height: 42px;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #fff;
  font-size: 1.3rem;
  font-weight: 950;
  cursor: pointer;
}
.score-x { font-size: 1.5rem; font-weight: 950; }
.qr-img { width: 230px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.public-page {
  min-height: 100svh;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.4vw, 40px);
}
.page-telao { background-image: url("../img/telao-bg.webp"); background-position: center; }
.page-jogo { background-image: url("../img/participante-bg.webp"); }
.page-ranking { background-image: url("../img/ranking-bg.webp"); }
.ribbon {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 4;
  background: linear-gradient(95deg, #ffd91d, #f5b900);
  color: #07170d;
  font-weight: 950;
  text-transform: uppercase;
  padding: 8px 34px 8px 14px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
}
.screen-time {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 3;
  padding: 10px 14px;
  border: 1px solid rgba(80, 220, 100, .45);
  border-radius: 10px;
  background: rgba(0, 35, 18, .68);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
.screen-time small { display: block; font-size: .72rem; opacity: .85; }
.screen {
  width: min(1040px, calc(100vw - 48px));
  margin: 0 auto;
  color: #fff;
  text-align: center;
}
.hero-title { font-size: clamp(2.35rem, 4.6vw, 5rem); line-height: .96; margin: 0; text-transform: uppercase; text-shadow: 0 8px 26px #000; overflow-wrap: anywhere; }
.hero-sub { color: var(--yellow); font-size: clamp(1.15rem, 2.1vw, 2rem); font-weight: 950; text-transform: uppercase; text-shadow: 0 8px 20px #000; }
.glass {
  margin: 22px auto;
  padding: clamp(16px, 2vw, 28px);
  border: 1px solid rgba(255, 210, 31, .45);
  border-radius: 16px;
  background: rgba(3, 24, 14, .62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  width: min(860px, 100%);
}
.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.team { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: clamp(1.1rem, 2.2vw, 2rem); font-weight: 950; text-transform: uppercase; }
.team:last-child { flex-direction: row-reverse; }
.crest {
  width: clamp(58px, 8vw, 120px);
  aspect-ratio: 1;
  border-radius: 22%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--green);
  overflow: hidden;
  font-weight: 950;
}
.crest img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.x { font-size: clamp(2rem, 5vw, 5rem); font-weight: 950; }
.game-time { color: var(--yellow); font-size: clamp(1.6rem, 3vw, 3rem); font-weight: 950; margin-top: 12px; }
.game-place { font-weight: 850; text-transform: uppercase; }
.qr-row { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 54px); margin-top: 18px; }
.qr-row img { width: clamp(280px, 24vw, 420px); background: #fff; padding: 12px; border-radius: 12px; }
.call { font-size: clamp(1.1rem, 2.5vw, 2rem); font-weight: 950; text-transform: uppercase; text-align: center; }
.call .game-time { margin-top: 0; }
.call .game-place { margin-bottom: 0; }
.call-divider {
  width: min(260px, 86%);
  height: 1px;
  margin: 18px auto 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 31, .9), transparent);
  box-shadow: 0 0 14px rgba(255, 210, 31, .35);
}
.call span { display: block; }
.call strong { color: var(--yellow); display: block; }
.screen-link {
  width: min(360px, 100%);
  margin: 14px auto 0;
}
.screen-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(105, 255, 115, .55);
  border-radius: 14px;
  background: rgba(0, 47, 20, .72);
  overflow: hidden;
}
.screen-footer div { padding: 16px; border-right: 1px solid rgba(255,255,255,.15); font-weight: 900; }
.screen-footer strong { display: block; font-size: 2rem; }

@media (min-width: 1001px) {
  .page-telao {
    height: 100svh;
    overflow: hidden;
  }
}

@media (min-width: 1001px) and (max-height: 820px) {
  .page-telao { padding: 12px 24px; }
  .page-telao .ribbon { padding: 7px 28px 7px 12px; font-size: .92rem; }
  .page-telao .screen-time { top: 16px; right: 22px; padding: 8px 12px; }
  .page-telao .screen {
    width: min(960px, calc(100vw - 48px));
    margin: 0 auto;
  }
  .page-telao .hero-title {
    font-size: clamp(2.1rem, 3.65vw, 3.25rem);
    line-height: .96;
  }
  .page-telao .hero-sub { font-size: clamp(1.15rem, 2vw, 1.75rem); }
  .page-telao .glass {
    margin: 10px auto;
    padding: 14px 18px;
    width: min(850px, 100%);
  }
  .page-telao .teams { gap: 14px; }
  .page-telao .team { font-size: clamp(1rem, 1.8vw, 1.45rem); }
  .page-telao .crest { width: clamp(58px, 6vw, 78px); }
  .page-telao .x { font-size: clamp(2rem, 4vw, 3.2rem); }
  .page-telao .game-time { margin-top: 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
  .page-telao .qr-row { margin-top: 12px; gap: 34px; }
  .page-telao .qr-row img { width: clamp(250px, 20vw, 310px); }
  .page-telao .call { font-size: clamp(1rem, 2vw, 1.5rem); }
  .page-telao .screen-footer div { padding: 9px 12px; }
  .page-telao .screen-footer strong { font-size: 1.35rem; }
}

@media (min-width: 1001px) and (max-height: 700px) {
  .page-telao { padding: 10px 18px; }
  .page-telao .hero-title { font-size: clamp(1.95rem, 3.2vw, 2.8rem); }
  .page-telao .hero-sub { font-size: clamp(1rem, 1.8vw, 1.35rem); }
  .page-telao .glass {
    margin: 8px auto;
    padding: 12px 16px;
    width: min(820px, 100%);
  }
  .page-telao .crest { width: clamp(52px, 5vw, 68px); }
  .page-telao .x { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
  .page-telao .qr-row { gap: 26px; margin-top: 10px; }
  .page-telao .qr-row img { width: clamp(220px, 18vw, 260px); padding: 10px; }
  .page-telao .game-time { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
  .page-telao .call { font-size: clamp(.95rem, 1.7vw, 1.25rem); }
  .page-telao .call-divider { margin: 12px auto 14px; }
  .page-telao .screen-link { min-height: 36px; margin-top: 10px; }
  .page-telao .screen-footer div { padding: 7px 10px; }
  .page-telao .screen-footer strong { font-size: 1.18rem; }
}

.public-card {
  width: min(640px, 94vw);
  border-radius: 20px;
  background: rgba(3, 24, 14, .82);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 210, 31, .34);
  backdrop-filter: blur(9px);
  padding: clamp(20px, 4vw, 42px);
  color: #fff;
}

.app-alert {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: min(360px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(3, 24, 14, .94);
  color: #fff;
  box-shadow: var(--shadow);
}
.app-alert.ok { border-color: rgba(82, 226, 110, .55); }
.app-alert.warn { border-color: rgba(255, 210, 31, .65); }
.app-alert strong { color: var(--yellow); text-transform: uppercase; font-size: .78rem; }
.app-alert p { margin: 3px 0 0; }
.app-alert button {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}
.app-confirm {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 14, 8, .58);
  backdrop-filter: blur(4px);
}
.app-confirm-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.app-confirm-card h3 { margin: 6px 0 18px; }
.center, .center-text { text-align: center; }
.center { display: table; margin: 0 auto 16px; }
.participant-status {
  display: table;
  margin: 0 auto 12px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 950;
  text-transform: uppercase;
  font-size: .82rem;
}
.participant-status.open { background: rgba(229, 248, 234, .94); color: var(--green); }
.participant-status.closed { background: rgba(255, 241, 214, .94); color: #8a5a00; }
.match-info {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 14px 0;
  color: #fff;
}
.match-info strong {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(238, 248, 241, .95);
  color: var(--green);
}
.match-info span { color: rgba(255,255,255,.78); }
.public-title { color: #fff; text-align: center; text-transform: uppercase; text-shadow: 0 8px 24px #000; }
.public-title h1 { margin: 0 0 18px; font-size: clamp(2rem, 7vw, 4rem); }
.public-title strong { color: var(--yellow); }
.match-mini { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; text-align: center; font-weight: 950; text-transform: uppercase; }
.match-mini .crest { width: 60px; margin: 0 auto 8px; }
.divider { margin: 20px 0 12px; text-align: center; color: var(--yellow); font-weight: 950; text-transform: uppercase; }
.score-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.score-inputs input { text-align: center; font-size: 1.4rem; font-weight: 950; }
.score-picker small {
  display: block;
  margin-bottom: 6px;
  text-align: center;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  color: #fff;
}
.score-picker div {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
}
.score-picker .input {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.score-picker button {
  border: 1px solid #d7e2dc;
  background: #fff;
  font-size: 1.25rem;
  font-weight: 950;
  cursor: pointer;
}
.score-picker button:first-child { border-radius: 8px 0 0 8px; }
.score-picker button:last-child { border-radius: 0 8px 8px 0; }
.safe-note {
  text-align: center;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}
.notice {
  margin: 18px 0;
  padding: 14px;
  border-radius: 10px;
  font-weight: 850;
  text-align: center;
}
.notice.ok { background: #e8f7ec; color: var(--green); }
.notice.warn { background: #fff6d6; color: #7a5600; }
.ranking-card {
  width: min(940px, 94vw);
  border-radius: 16px;
  background: rgba(3, 24, 14, .82);
  border: 1px solid rgba(255, 210, 31, .36);
  backdrop-filter: blur(9px);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #fff;
}
.ranking-card > .badge.center {
  margin-top: 14px;
  margin-bottom: 8px;
}
.ranking-wrap {
  width: min(980px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
}
.ranking-wrap .public-title {
  max-width: min(900px, 94vw);
}
.ranking-wrap .public-title h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 5.4vw, 3.8rem);
  line-height: 1.02;
}
.ranking-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.ranking-score strong {
  min-width: 136px;
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1;
  white-space: nowrap;
}
.ranking-team {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 950;
  text-transform: uppercase;
}
.ranking-team .crest {
  width: clamp(58px, 6vw, 82px);
  aspect-ratio: 1;
  margin: 0;
}
.ranking-team span {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.ranking-table th { background: var(--green); color: #fff; }
.ranking-table th, .ranking-table td { padding: 13px 16px; }
.ranking-table td { color: #fff; border-bottom-color: rgba(255,255,255,.12); }
.ranking-table tbody tr { background: rgba(255,255,255,.04); }
.hit { color: var(--green); font-weight: 950; }
.rank-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
}
.rank-status.hit { background: #0aa33c; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 8px 18px rgba(10,163,60,.22); }
.rank-status.pending { background: rgba(255, 210, 31, .16); color: var(--yellow); }
.rank-pos {
  min-width: 34px;
  width: 34px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 950;
  font-size: .85rem;
  color: #07170d;
}
.rank-pos.hit { background: #0aa33c; color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
.rank-pos.pending { background: #ffd21f; }

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px;
    width: 100%;
    overflow: hidden;
  }
  .brand {
    margin-bottom: 10px;
    font-size: 1rem;
  }
  .brand span { font-size: 1.55rem; }
  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: calc(100vw - 24px);
    padding-bottom: 2px;
  }
  .nav button {
    width: auto;
    white-space: nowrap;
    padding: 10px 12px;
  }
  .admin-main { padding: 16px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 12; }
  .screen { margin-left: 0; padding-top: 40px; }
  .screen-footer { grid-template-columns: 1fr; }
  .copy-row, .admin-toolbar { grid-template-columns: 1fr; display: grid; }
  .team-upload { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
    max-width: none;
  }
  .nav button {
    width: 100%;
    padding: 9px 6px;
    text-align: center;
    white-space: normal;
    font-size: .88rem;
  }
  .topbar {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .topbar .btn { width: 100%; }
  .topbar h1 { font-size: 1.75rem; }
  .metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric { min-height: 86px; padding: 14px; }
  .grid { gap: 10px; }
  .card, .game-card { padding: 14px; border-radius: 10px; }
  .game-card-match { grid-template-columns: 1fr; }
  .game-card .actions, .actions { display: grid; grid-template-columns: 1fr; }
  .section-head, .admin-toolbar { display: grid; align-items: stretch; }
  .table-wrap table { min-width: 680px; }
  .ranking-card .table-wrap table {
    min-width: 0;
    table-layout: fixed;
  }
  .ranking-table th, .ranking-table td {
    padding: 10px 8px;
    font-size: .72rem;
  }
  .ranking-table th:nth-child(1), .ranking-table td:nth-child(1) { width: 62px; }
  .ranking-table th:nth-child(3), .ranking-table td:nth-child(3) { width: 72px; text-align: center; }
  .ranking-table th:nth-child(4), .ranking-table td:nth-child(4) { width: 104px; }
  .ranking-table td:nth-child(2) {
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
  .rank-status {
    min-height: 26px;
    padding: 0 8px;
    font-size: .68rem;
  }
  .score-form, .score-control, .score-board-admin { display: grid; grid-template-columns: 1fr; width: 100%; }
  .score-x { text-align: center; }
  .score-control input { width: 100%; }
  .export-actions { display: grid; grid-template-columns: 1fr; }
  .copy-row { grid-template-columns: 1fr; }
  .page-jogo, .page-ranking { align-items: flex-start; padding-top: 74px; }
  .page-telao { padding-top: 68px; }
  .public-title h1 { margin-top: 4px; font-size: clamp(1.9rem, 11vw, 3.1rem); line-height: 1.02; }
  .teams, .match-mini, .ranking-score {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }
  .score-inputs, .form-grid { grid-template-columns: 1fr; }
  .team, .team:last-child { flex-direction: column; gap: 8px; }
  .team { font-size: .9rem; }
  .match-mini .crest, .ranking-score .crest { width: 48px; }
  .ranking-score {
    padding: 18px 12px;
  }
  .ranking-score strong {
    min-width: 86px;
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }
  .ranking-team {
    font-size: .78rem;
  }
  .match-mini { font-size: .82rem; }
  .match-mini .x { font-size: 2rem; }
  .public-card { width: min(94vw, 430px); padding: 18px; }
  .ranking-card { width: min(94vw, 430px); }
  .app-alert { left: 14px; right: 14px; bottom: 14px; width: auto; }
  .qr-row { flex-direction: column; }
  .call { text-align: center; }
}
