:root {
  --bg: #eef1f7;
  --bg-top: #f7f9fd;
  --card: #ffffff;
  --surface: #f7f8fc;
  --surface-2: #f2f4fa;
  --surface-accent: #f4f6fe;
  --accent: #5468d4;
  --accent-light: #7d8ce6;
  --accent-dark: #3f52bd;
  --text: #1b2039;
  --heading: #161c37;
  --muted: #9aa0b8;
  --muted-2: #b3b8cc;
  --line: #edeff6;
  --success: #34a878;
  --success-text: #2b8a62;
  --danger: #c0596a;
  --danger-bg: #fdf1f3;
  --shadow: 0 22px 50px -34px rgba(28, 38, 84, .30), 0 2px 6px rgba(28, 38, 84, .04);
  --shadow-lg: 0 26px 60px -34px rgba(28, 38, 84, .34), 0 2px 6px rgba(28, 38, 84, .04);
  --radius-xl: 34px;
  --radius-lg: 30px;
  --radius-md: 22px;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Montserrat", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-top) 0%, var(--bg) 60%);
}
button, input, select { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

@keyframes softpop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeup { from { transform: translateY(7px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 0 4px rgba(52,168,120,.12); } 50% { box-shadow: 0 0 0 8px rgba(52,168,120,0); } }
@keyframes matchglow { 0%,100% { transform: translateX(-120%); } 50% { transform: translateX(220%); } }

.app-shell {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 72px;
}
.soft-card {
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Header */
.hero {
  min-height: 218px;
  padding: 38px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: fadeup .45s ease both;
}
.hero__identity { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero__eyebrow { display: flex; align-items: center; gap: 10px; color: #8a90ab; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .18em; text-transform: uppercase; }
.hero__mark { width: 26px; height: 26px; flex: none; border-radius: 9px; background: linear-gradient(160deg, var(--accent-light), var(--accent)); box-shadow: 0 6px 14px -6px rgba(84,104,212,.8); }
.hero h1 { margin: 0; color: var(--heading); font: 800 clamp(2.35rem, 6vw, 2.75rem)/1.02 var(--font-display); letter-spacing: -.025em; }
.hero h1 span { color: var(--accent); }
.hero__identity > p { margin: 2px 0 0; color: #8a90ab; font-size: 13.5px; font-weight: 500; line-height: 1.5; }
.hero__summary { display: flex; flex-direction: column; align-items: flex-end; gap: 17px; flex: none; }
.hero__actions { display: flex; align-items: center; gap: 9px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; color: var(--success-text); background: #eefaf3; box-shadow: inset 0 0 0 1px rgba(52,168,120,.16); font-size: 11.5px; font-weight: 600; }
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(52,168,120,.16); }
.hero__stats { display: flex; gap: 28px; text-align: right; }
.hero-stat strong { display: block; color: var(--heading); font: 700 26px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }

main { display: flex; flex-direction: column; gap: 22px; margin-top: 22px; }
.section-card { padding: 26px 32px 28px; animation: fadeup .38s ease both; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading__title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.section-heading h2 { margin: 0; color: var(--heading); font: 700 17px/1 var(--font-display); letter-spacing: -.01em; }
.section-kicker { color: var(--muted-2); font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: .14em; text-transform: uppercase; }
.section-meta { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(52,168,120,.12); vertical-align: 1px; }
.phase-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 5px 10px; border-radius: 999px; color: var(--accent); background: #eef0fd; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: .12em; text-transform: uppercase; }

/* Participantes */
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.access-box { display: flex; flex-direction: column; gap: 15px; padding: 22px; border-radius: var(--radius-md); background: var(--surface); }
.access-box--muted { background: var(--surface-accent); }
.access-box h3 { margin: 7px 0 5px; color: var(--heading); font: 700 17px/1.2 var(--font-display); }
.access-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: #747b99; font-size: 11px; font-weight: 600; }
.field-hint { color: var(--muted); font-size: 10.5px; font-weight: 500; line-height: 1.35; }
.field input, .field select { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid #e5e8f1; border-radius: 13px; outline: 0; color: var(--text); background: #fff; transition: border-color .18s, box-shadow .18s; }
.field select optgroup { color: #68708f; font-weight: 700; }
.field select option { color: var(--text); font-weight: 500; }
.field input:focus, .field select:focus { border-color: var(--accent-light); box-shadow: 0 0 0 3px rgba(84,104,212,.11); }
.field input:disabled, .field select:disabled, .btn:disabled { cursor: not-allowed; opacity: .5; }
.team-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 290px; padding: 7px; overflow: auto; border: 1px solid #e5e8f1; border-radius: 16px; background: #fff; }
.team-picker__empty { grid-column: 1 / -1; padding: 22px 12px; color: var(--muted); text-align: center; font-size: 11.5px; line-height: 1.45; }
.team-picker__option { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px; min-height: 53px; padding: 7px 9px; border: 0; border-radius: 13px; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; transition: transform .16s, background .16s, box-shadow .16s; }
.team-picker__option > span { overflow: hidden; font-size: 11px; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; }
.team-picker__option small { grid-column: 2; margin-top: -8px; color: var(--muted); font-size: 9px; }
.team-picker__option:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .42; }
.team-picker__option.is-selected { color: var(--accent-dark); background: #edf0ff; box-shadow: inset 0 0 0 2px rgba(84,104,212,.42); }
.team-picker__crest { width: 35px; height: 35px; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(28,38,84,.13)); transition: transform .18s; }
@media (hover:hover) and (pointer:fine) { .team-picker__option:not(:disabled):hover { transform: translateY(-2px); background: #f0f2fd; } .team-picker__option:not(:disabled):hover .team-picker__crest { transform: scale(1.08) rotate(-2deg); } }
.field--compact { min-width: 170px; }
.profile-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 22px; border-radius: var(--radius-md); background: var(--surface); }
.profile-panel__identity { display: flex; align-items: center; gap: 15px; min-width: 180px; }
.profile-panel__identity div { display: flex; flex-direction: column; gap: 3px; }
.profile-panel__identity span, .profile-panel__identity small { color: var(--muted); font-size: 11px; }
.profile-panel__identity strong { color: var(--heading); font: 700 18px/1.2 var(--font-display); }
.profile-crest { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 8px 9px rgba(28,38,84,.12)); }
.profile-panel__actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.access-note { margin: 12px 3px 0; color: var(--muted); font-size: 11.5px; }
.btn--ghost { color: #747b99; background: transparent; box-shadow: inset 0 0 0 1px #e5e8f1; }
.players-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.player-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 11px; min-width: 0; padding: 20px 10px 18px; border-radius: var(--radius-md); background: var(--surface); transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s; }
.player-card--current { box-shadow: inset 0 0 0 2px rgba(84,104,212,.3); }
.you-badge { position: absolute; top: 10px; right: 10px; margin: 0 !important; padding: 4px 6px; border-radius: 999px; color: var(--accent) !important; background: #e9ecff; font-size: 8px !important; font-weight: 700 !important; letter-spacing: .08em; }
.empty-state--full { grid-column: 1 / -1; }
.player-card__crest-wrap { width: 54px; height: 54px; display: grid; place-items: center; }
.player-card__crest { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 8px 9px rgba(28,38,84,.12)); }
.club-crest {
  display: inline-grid !important;
  place-items: center;
  flex: none;
  margin: 0 !important;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 32% 32% 44% 44%;
  color: #fff !important;
  background: linear-gradient(145deg, var(--club-primary) 0 54%, var(--club-secondary) 55% 100%);
  box-shadow: 0 7px 12px -7px rgba(28,38,84,.5), inset 0 0 0 1px rgba(0,0,0,.12);
  font: 800 clamp(7px, .72em, 11px)/1 var(--font-display) !important;
  letter-spacing: -.03em;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  white-space: nowrap;
}
.team-display__crest.club-crest { font-size: 16px !important; }
.champion-crest.club-crest { font-size: 13px !important; }
.player-card strong { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.2; }
.player-card > span { margin-top: -8px; color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.4; }
@media (hover:hover) and (pointer:fine) { .player-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px rgba(28,38,84,.45); } }

/* Próximo jogo */
.next-match-panel { position: relative; overflow: hidden; padding-bottom: 34px; background: linear-gradient(145deg, #fff 35%, #f5f6ff 100%); }
.next-match-panel::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 28%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); transform: translateX(-120%); animation: matchglow 5.5s ease-in-out infinite; }
.next-match-panel > * { position: relative; z-index: 1; }
.next-match-panel .section-heading { margin-bottom: 8px; }
.match-console { padding: 18px 0 0; }
.match-console__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 18px 0 8px; }
.team-display { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.team-display__crest { width: 88px; height: 88px; object-fit: contain; animation: softpop .35s ease both; filter: drop-shadow(0 16px 13px rgba(28,38,84,.16)); }
.team-display strong { color: var(--heading); font: 700 clamp(1.35rem, 3.4vw, 1.55rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.team-display span { margin-top: -8px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.4; }
.versus { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 2px 6px rgba(28,38,84,.07); font: 700 13px/1 var(--font-display); letter-spacing: .06em; }
.score-editor { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px auto 0; }
.score-box { display: grid; grid-template-columns: 38px 56px 38px; align-items: center; gap: 5px; padding: 6px; border-radius: 999px; background: var(--surface-2); }
.score-box button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #7b81a0; background: #fff; box-shadow: 0 4px 10px -6px rgba(28,38,84,.5); font-size: 19px; font-weight: 600; cursor: pointer; transition: transform .14s cubic-bezier(.2,.8,.3,1), color .14s; }
.score-box button:active { transform: scale(.9); }
.score-box input { width: 56px; border: 0; outline: 0; background: transparent; color: var(--heading); text-align: center; font: 700 28px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.score-separator { color: #c3c7d8; font: 600 13px/1 var(--font-display); }
.match-console__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.featured-score { display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; margin: 20px auto 0; }
.featured-score input { width: 62px; height: 52px; border: 1px solid #e1e5f0; border-radius: 16px; outline: 0; color: var(--heading); background: #fff; text-align: center; font: 700 24px/1 var(--font-display); }
.featured-score select, .inline-score select { min-height: 40px; padding: 8px 10px; border: 1px solid #e3e6f0; border-radius: 11px; color: var(--text); background: #fff; font-size: 11px; }
.next-match-callout { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.penalty-choice { max-width: 640px; margin: 22px auto 0; padding: 16px 18px; border-radius: 18px; background: var(--surface); text-align: center; }
.penalty-choice p { margin: 0 0 12px; color: #6f7695; font-size: 12px; font-weight: 500; }
.penalty-choice__buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Botões */
.btn, .icon-btn { border: 0; cursor: pointer; font-family: var(--font-body); font-weight: 600; transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s, filter .18s, background-color .18s; }
.btn { min-height: 46px; padding: 14px 22px; border-radius: 16px; font-size: 13px; }
.btn--compact { min-height: 34px; padding: 8px 13px; border-radius: 999px; font-size: 11px; }
.btn--primary { padding: 17px 44px; border-radius: 20px; color: #fff; background: linear-gradient(160deg, var(--accent-light), var(--accent)); box-shadow: 0 16px 30px -14px rgba(84,104,212,.85), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--secondary { color: #4a5070; background: #f4f6fb; box-shadow: 0 6px 14px -10px rgba(28,38,84,.6); }
.btn--disabled { cursor: not-allowed; opacity: .58; box-shadow: inset 0 0 0 1px #e5e8f1; }
.btn--danger { color: var(--danger); background: var(--danger-bg); box-shadow: 0 6px 14px -10px rgba(192,89,106,.5); }
.icon-btn { min-height: 38px; padding: 10px 16px; border-radius: 14px; color: var(--accent); background: #eef0fd; font-size: 12px; }
@media (hover:hover) and (pointer:fine) {
  .btn:hover, .icon-btn:hover { transform: translateY(-2px); }
  .btn--primary:hover { box-shadow: 0 22px 38px -14px rgba(84,104,212,.9), inset 0 1px 0 rgba(255,255,255,.35); filter: saturate(1.08); }
  .score-box button:hover { color: var(--accent); transform: translateY(-1px); }
}

/* Classificação */
.table-wrap { overflow-x: auto; }
.standings-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.standings-table th { padding: 0 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted-2); background: transparent; text-align: center; font-size: 10.5px; font-weight: 600; line-height: 1; letter-spacing: .1em; text-transform: uppercase; }
.standings-table th:nth-child(1) { width: 42px; text-align: left; }
.standings-table th:nth-child(2) { width: 35%; text-align: left; }
.standings-table th:last-child { color: var(--accent); }
.standings-table td { padding: 14px 10px; border-bottom: 1px solid #f3f5fa; color: #7b81a0; background: transparent; text-align: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.standings-table tbody tr { transition: background .18s; }
.standings-table tbody tr.leader td { background: var(--surface-accent); }
.standings-table tbody tr.leader td:first-child { border-radius: 16px 0 0 16px; }
.standings-table tbody tr.leader td:last-child { border-radius: 0 16px 16px 0; }
.rank-cell { color: var(--accent) !important; font: 700 12.5px/1 var(--font-display) !important; text-align: left !important; }
.player-cell { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.mini-crest { width: 28px; height: 28px; flex: none; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(28,38,84,.12)); }
.player-cell span { color: var(--text); font-size: 13.5px; font-weight: 600; }
.points-cell { color: var(--accent) !important; font: 700 14px/1 var(--font-display) !important; }
.standings-note { margin: 16px 4px 0; color: #a7adc2; font-size: 11.5px; font-weight: 500; line-height: 1.5; }
.table-empty { padding: 28px !important; color: var(--muted) !important; text-align: center !important; }

/* Agenda */
.league-progress { height: 5px; margin: -3px 0 8px; overflow: hidden; border-radius: 999px; background: #f0f2f8; }
.league-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8f9cec, var(--accent)); transition: width .5s cubic-bezier(.2,.8,.3,1); }
.matches-list { display: flex; flex-direction: column; }
.match-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 12px; border-bottom: 1px solid #f3f5fa; border-radius: 16px; transition: background .18s; }
.match-number { min-width: 42px; color: var(--muted-2); font: 700 10.5px/1.2 var(--font-display); }
.match-row__teams { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match-team-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); font-size: 13.5px; font-weight: 600; }
.match-team-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-mini-crest { width: 25px; height: 25px; flex: none; object-fit: contain; }
.x { color: #c3c7d8; font-size: 11px; font-weight: 500; }
.match-status { margin-top: 4px; color: var(--muted-2); font-size: 11.5px; font-weight: 500; }
.match-status.done { color: var(--success-text); }
.match-score { display: flex; align-items: center; gap: 12px; }
.match-score strong { min-width: 62px; color: var(--heading); text-align: center; font: 700 15px/1 var(--font-display); font-variant-numeric: tabular-nums; }
@media (hover:hover) and (pointer:fine) { .match-row:hover { background: var(--surface); } }

/* Mata-mata */
.knockout-bracket { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.ko-card { overflow: hidden; border-radius: var(--radius-md); background: var(--surface); }
.ko-card--final { grid-column: 1 / -1; background: linear-gradient(150deg, #fff 0%, #f4f2ff 100%); box-shadow: 0 18px 38px -30px rgba(84,104,212,.45); }
.ko-card__label { padding: 16px 18px 10px; color: var(--muted-2); font: 700 11px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.ko-card__teams { padding: 0 10px; }
.ko-team { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px; border-bottom: 1px solid #eceef5; }
.ko-team:last-child { border-bottom: 0; }
.ko-team.winner { background: #f0f2fd; border-radius: 14px; }
.ko-team__identity { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--text); font-size: 13.5px; font-weight: 600; }
.ko-team__crest { width: 29px; height: 29px; flex: none; object-fit: contain; }
.ko-team strong { color: var(--heading); font: 700 15px/1 var(--font-display); }
.ko-card__actions { padding: 10px 14px 14px; text-align: right; }
.empty-state { padding: 34px; border-radius: var(--radius-md); color: var(--muted); background: var(--surface); text-align: center; font-size: 13px; font-weight: 500; line-height: 1.6; }
.champion-card { display: flex; align-items: center; gap: 22px; margin-top: 14px; padding: 28px 32px; border-radius: var(--radius-md); background: linear-gradient(150deg, #fff 0%, #f4f2ff 100%); box-shadow: 0 22px 50px -30px rgba(84,104,212,.5); text-align: left; }
.crown { width: 54px; height: 54px; display: grid; place-items: center; flex: none; border-radius: 18px; background: #fff8dc; box-shadow: 0 12px 24px -16px rgba(151,117,24,.55); font-size: 27px; animation: softpop .5s ease both; }
.champion-crest { width: 66px; height: 66px; flex: none; object-fit: contain; filter: drop-shadow(0 12px 11px rgba(28,38,84,.14)); }
.champion-card .section-kicker { color: #9d8b4e; }
.champion-card h3 { margin: 7px 0 0; color: var(--heading); font: 800 30px/1.1 var(--font-display); letter-spacing: -.02em; }
.champion-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; font-weight: 500; }

/* Administração */
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-help { margin: 16px 2px 0; color: #a7adc2; font-size: 11.5px; font-weight: 500; line-height: 1.6; }
.file-label { display: inline-flex; align-items: center; justify-content: center; }
footer { margin: 35px 0 0; color: var(--muted-2); text-align: center; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .16em; text-transform: uppercase; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; width: max-content; max-width: calc(100% - 30px); padding: 12px 17px; border-radius: 15px; color: #fff; background: #303751; box-shadow: 0 15px 35px -15px rgba(28,38,84,.55); font-size: 12px; font-weight: 600; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: #8f3547; }

/* Modo online */
.app-shell--online { width: min(1040px, calc(100% - 48px)); }
.online-hero { min-height: 190px; }
.status-badge--error { color: var(--danger); background: var(--danger-bg); box-shadow: inset 0 0 0 1px rgba(192,89,106,.16); }
.status-badge--error::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(192,89,106,.12); }
.status-badge:not(.status-badge--error)::before, .live-dot { animation: livepulse 1.8s ease-in-out infinite; }
.local-disabled-badge { color: #767d98; background: #f2f3f7; box-shadow: inset 0 0 0 1px #e3e6ef; }
.local-disabled-badge::before { background: #a6acbd; box-shadow: 0 0 0 4px rgba(166,172,189,.15); }
.local-disabled-card { display: flex; min-height: 330px; align-items: center; justify-content: center; flex-direction: column; gap: 12px; text-align: center; }
.local-disabled-card h2 { margin: 2px 0 0; color: var(--heading); font: 800 clamp(1.45rem, 4vw, 2rem)/1.12 var(--font-display); letter-spacing: -.02em; }
.local-disabled-card p { max-width: 530px; margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.local-disabled-card .btn { min-width: 220px; }
.local-disabled-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 19px; color: #fff; background: linear-gradient(145deg, var(--accent-light), var(--accent)); box-shadow: 0 15px 28px -15px rgba(84,104,212,.85); font-size: 25px; }
.setup-steps { display: grid; gap: 12px; }
.setup-step { display: flex; align-items: flex-start; gap: 15px; padding: 18px; border-radius: 18px; background: var(--surface); }
.setup-step > strong { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--accent); font: 700 13px/1 var(--font-display); }
.setup-step h3 { margin: 1px 0 5px; color: var(--heading); font: 700 14px/1.2 var(--font-display); }
.setup-step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.setup-step code { padding: 2px 5px; border-radius: 5px; color: var(--accent-dark); background: #eaedff; }
.room-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.room-heading h2 { margin: 7px 0 5px; color: var(--heading); font: 800 clamp(1.55rem, 4vw, 2.15rem)/1.08 var(--font-display); }
.room-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.invite-code { flex: none; padding: 11px 14px; border-radius: 13px; color: var(--accent); background: #edf0ff; font: 700 15px/1 var(--font-display); letter-spacing: .13em; }
.join-form { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(360px,1.3fr); align-items: start; gap: 14px; margin-top: 24px; }
.join-form > .btn { grid-column: 1 / -1; justify-self: end; min-height: 45px; }
.code-input { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.invite-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 15px 17px; border-radius: 17px; background: var(--surface); }
.invite-bar > div { min-width: 0; }
.invite-bar span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.invite-bar strong { display: block; overflow: hidden; color: #626987; font-size: 11.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.draw-button { display: block; margin: 18px auto 0; }
.online-match { grid-template-columns: 64px minmax(0,1fr) auto; }
.inline-score { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.inline-score input { width: 48px; height: 40px; border: 1px solid #e3e6f0; border-radius: 11px; outline: 0; color: var(--heading); background: #fff; text-align: center; font: 700 15px/1 var(--font-display); }
.inline-score input:focus { border-color: var(--accent-light); box-shadow: 0 0 0 3px rgba(84,104,212,.1); }
.inline-score > span { color: var(--muted-2); font-size: 11px; }

@media (max-width: 780px) {
  .app-shell { width: min(100% - 28px, 680px); padding: 22px 0 50px; }
  .hero { padding: 28px 26px; gap: 22px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.55rem); }
  .hero__eyebrow { letter-spacing: .12em; }
  .section-card { padding: 23px 22px 25px; }
  .access-grid { grid-template-columns: 1fr; }
  .profile-panel { align-items: flex-start; flex-direction: column; }
  .profile-panel__actions { width: 100%; justify-content: flex-start; }
  .join-form { grid-template-columns: 1fr; }
  .join-form > .btn { grid-column: auto; width: 100%; }
  .online-match { grid-template-columns: 52px minmax(0,1fr); }
  .online-match .inline-score, .online-match .match-score { grid-column: 2; justify-content: flex-start; }
  .players-grid { grid-template-columns: repeat(5, 116px); overflow-x: auto; padding-bottom: 5px; }
  .match-console__teams { gap: 10px; }
  .team-display__crest { width: 78px; height: 78px; }
  .knockout-bracket { grid-template-columns: 1fr; }
  .ko-card--final { grid-column: auto; }
}

@media (max-width: 560px) {
  .app-shell { width: min(100% - 18px, 520px); padding-top: 12px; }
  main { gap: 14px; margin-top: 14px; }
  .hero { min-height: 0; padding: 25px 21px; flex-direction: column; align-items: flex-start; border-radius: 26px; }
  .hero__summary { width: 100%; align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .hero__stats { text-align: left; gap: 20px; }
  .hero-stat strong { font-size: 22px; }
  .section-card { padding: 20px 16px 22px; border-radius: 24px; }
  .section-heading { align-items: flex-start; margin-bottom: 16px; }
  .section-heading__title { gap: 8px; flex-wrap: wrap; }
  .section-meta { display: none; }
  .players-grid { grid-template-columns: repeat(5, 104px); gap: 10px; }
  .profile-panel__actions { display: grid; grid-template-columns: 1fr; }
  .profile-panel__actions .btn, .field--compact { width: 100%; }
  .app-shell--online { width: min(100% - 18px, 520px); }
  .room-heading { align-items: flex-start; flex-direction: column; }
  .invite-bar { align-items: stretch; flex-direction: column; }
  .invite-bar .btn { width: 100%; }
  .inline-score { flex-wrap: wrap; }
  .team-picker { grid-template-columns: 1fr; }
  .featured-score .btn { width: 100%; }
  .player-card { padding: 16px 8px; border-radius: 18px; }
  .match-console__teams { grid-template-columns: 1fr 42px 1fr; }
  .versus { width: 42px; height: 42px; font-size: 11px; }
  .team-display__crest { width: 70px; height: 70px; }
  .team-display strong { font-size: 1.15rem; }
  .score-editor { gap: 8px; }
  .score-box { grid-template-columns: 34px 48px 34px; padding: 5px; }
  .score-box button { width: 34px; height: 34px; }
  .score-box input { width: 48px; font-size: 24px; }
  .match-console__actions .btn { width: 100%; }
  .standings-table { min-width: 680px; }
  .match-row { grid-template-columns: 32px minmax(0,1fr); gap: 8px; padding: 12px 5px; }
  .match-score { grid-column: 2; justify-content: space-between; }
  .match-team-name { font-size: 12.5px; }
  .match-mini-crest { width: 22px; height: 22px; }
  .admin-actions { display: grid; grid-template-columns: 1fr; }
  .admin-actions .btn { width: 100%; }
  .champion-card { padding: 22px; }
  footer { line-height: 1.5; padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Identidade Night Match · futebol + gaming */
:root {
  --bg: #070a11;
  --bg-top: #0d1420;
  --card: #0f1520;
  --surface: #141c29;
  --surface-2: #192334;
  --surface-accent: #111d2b;
  --accent: #b8ff2c;
  --accent-light: #d9ff70;
  --accent-dark: #8cda00;
  --text: #ecf2fb;
  --heading: #ffffff;
  --muted: #8995a8;
  --muted-2: #647186;
  --line: rgba(255,255,255,.075);
  --success: #55e6a5;
  --success-text: #81efbd;
  --danger: #ff6b83;
  --danger-bg: rgba(255,75,104,.12);
  --shadow: 0 24px 60px -34px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.035);
  --shadow-lg: 0 34px 80px -38px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.055);
  --font-display: "Rajdhani", "Inter", sans-serif;
}

html { background: var(--bg); }
body {
  position: relative;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(35,119,255,.18), transparent 66%),
    radial-gradient(720px 460px at 5% 16%, rgba(184,255,44,.095), transparent 64%),
    linear-gradient(180deg, #0b101a 0%, #070a11 48%, #090d15 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

::selection { color: #07100a; background: var(--accent); }
* { scrollbar-color: #344158 #101722; scrollbar-width: thin; }
.soft-card { border: 1px solid rgba(255,255,255,.075); background: rgba(15,21,32,.94); backdrop-filter: blur(16px); }
.section-card { position: relative; overflow: hidden; }
.section-card::before { content: ""; position: absolute; top: 0; left: 28px; width: 54px; height: 2px; background: linear-gradient(90deg, var(--accent), #35d8ff); box-shadow: 0 0 18px rgba(184,255,44,.55); }

.hero { position: relative; overflow: hidden; border-color: rgba(184,255,44,.17); background: linear-gradient(115deg, rgba(16,25,37,.98) 0 57%, rgba(12,29,42,.96) 100%); }
.hero::before { content: ""; position: absolute; width: 320px; height: 320px; right: -98px; top: -118px; border: 1px solid rgba(184,255,44,.16); border-radius: 50%; box-shadow: 0 0 0 54px rgba(53,216,255,.025), 0 0 0 108px rgba(184,255,44,.02); }
.hero::after { content: "ARENA // ONLINE"; position: absolute; right: 35px; bottom: 20px; color: rgba(184,255,44,.13); font: 700 12px/1 var(--font-display); letter-spacing: .32em; transform: rotate(-90deg) translateX(100%); transform-origin: right bottom; }
.hero__identity, .hero__summary { position: relative; z-index: 1; }
.hero__eyebrow { color: #9eabc0; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.hero__mark { width: 34px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(184,255,44,.6); border-radius: 0; color: #09100b; background: linear-gradient(145deg, var(--accent-light), var(--accent)); box-shadow: 0 0 24px rgba(184,255,44,.22); clip-path: polygon(50% 0, 94% 15%, 88% 74%, 50% 100%, 12% 74%, 6% 15%); font: 700 11px/1 var(--font-display); letter-spacing: -.04em; }
.hero h1 { max-width: 700px; color: #f7fbff; font-weight: 700; font-size: clamp(2.65rem, 7vw, 4rem); line-height: .88; letter-spacing: -.045em; text-transform: uppercase; }
.hero h1 span { color: var(--accent); text-shadow: 0 0 34px rgba(184,255,44,.15); }
.hero__identity > p { color: #98a4b7; }

.status-badge { color: #95f1c7; background: rgba(47,210,143,.09); box-shadow: inset 0 0 0 1px rgba(85,230,165,.2), 0 0 22px rgba(85,230,165,.06); }
.local-disabled-badge { color: #8691a4; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.local-disabled-badge::before { background: #788397; box-shadow: 0 0 0 4px rgba(120,131,151,.12); }
.section-heading h2, .room-heading h2, .access-box h3, .local-disabled-card h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; text-transform: uppercase; }
.section-heading h2 { font-size: 20px; }
.section-kicker { color: #728199; font-family: var(--font-display); font-weight: 700; letter-spacing: .18em; }
.section-meta, .room-heading p, .field-hint, .access-note { color: var(--muted); }
.phase-chip { color: #09100b; background: var(--accent); font-family: var(--font-display); font-weight: 700; box-shadow: 0 0 20px rgba(184,255,44,.13); }

.access-box, .setup-step, .empty-state, .player-card, .ko-card, .invite-bar { border: 1px solid var(--line); background: var(--surface); }
.access-box--muted { background: linear-gradient(145deg, #111b29, #0f1824); }
.access-box p, .setup-step p, .empty-state { color: var(--muted); }
.field > span { color: #aab5c8; }
.field input, .field select, .featured-score input, .featured-score select, .inline-score input, .inline-score select {
  border-color: rgba(255,255,255,.1);
  color: var(--text);
  background: #0b111b;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.22);
}
.field input::placeholder { color: #536074; }
.field select option, .field select optgroup, .featured-score select option, .inline-score select option { color: var(--text); background: #101722; }
.field input:focus, .field select:focus, .featured-score input:focus, .inline-score input:focus { border-color: rgba(184,255,44,.7); box-shadow: 0 0 0 3px rgba(184,255,44,.09), 0 0 22px rgba(184,255,44,.05); }

.team-picker { border-color: rgba(255,255,255,.09); background: #0b111b; }
.team-picker__option { color: var(--text); background: #121a27; }
.team-picker__option.is-selected { color: var(--accent); background: rgba(184,255,44,.08); box-shadow: inset 0 0 0 2px rgba(184,255,44,.55), 0 0 18px rgba(184,255,44,.07); }
.team-picker__option small, .team-picker__empty { color: var(--muted); }
.team-picker__crest { padding: 3px; border-radius: 10px; background: rgba(245,248,252,.96); }
@media (hover:hover) and (pointer:fine) { .team-picker__option:not(:disabled):hover { background: #192536; box-shadow: inset 0 0 0 1px rgba(53,216,255,.17); } }

.btn--primary { color: #0a100b; background: linear-gradient(135deg, var(--accent-light), var(--accent)); box-shadow: 0 16px 32px -14px rgba(184,255,44,.42), inset 0 1px 0 rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .045em; }
.btn--secondary, .icon-btn { color: #d8e1ee; background: #192231; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 18px -14px #000; }
.btn--ghost { color: #a3aec0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.btn--disabled { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
@media (hover:hover) and (pointer:fine) { .btn:not(:disabled):hover, .icon-btn:not(:disabled):hover { filter: brightness(1.09); } .btn--primary:not(:disabled):hover { box-shadow: 0 18px 36px -12px rgba(184,255,44,.58); } }

.invite-code { color: var(--accent); background: rgba(184,255,44,.075); box-shadow: inset 0 0 0 1px rgba(184,255,44,.16); }
.invite-bar strong { color: #acb7c9; }
.player-card--current { background: linear-gradient(160deg, rgba(184,255,44,.085), #141c29 62%); box-shadow: inset 0 0 0 1px rgba(184,255,44,.55), 0 12px 32px -24px rgba(184,255,44,.45); }
.player-card__crest-wrap { border-radius: 17px; background: rgba(245,248,252,.96); box-shadow: 0 10px 24px -16px #000; }
.player-card__crest { padding: 4px; }
.you-badge { color: #07100a !important; background: var(--accent); }
.player-card strong, .player-cell span, .match-team-name, .ko-team__identity { color: var(--text); }
.player-card > span { color: var(--muted); }

.next-match-panel { border-color: rgba(184,255,44,.19); background: linear-gradient(145deg, #101722 16%, #101c28 62%, #12251e 135%); }
.next-match-panel::before { width: 92px; background: linear-gradient(90deg, var(--accent), #35d8ff); }
.next-match-panel::after { background: linear-gradient(90deg, transparent, rgba(184,255,44,.065), transparent); }
.team-display strong { color: var(--heading); font-size: clamp(1.5rem, 4vw, 1.9rem); text-transform: uppercase; }
.team-display__crest, .champion-crest { padding: 8px; border-radius: 24px; background: radial-gradient(circle, rgba(255,255,255,.98), rgba(227,233,241,.94) 68%, transparent 70%); }
.mini-crest, .match-mini-crest, .ko-team__crest { padding: 2px; border-radius: 9px; background: rgba(245,248,252,.94); }
.team-display span, .next-match-callout { color: var(--muted); }
.versus { color: var(--accent); background: #0b111a; box-shadow: inset 0 0 0 1px rgba(184,255,44,.16), 0 0 24px rgba(184,255,44,.06); }
.score-box, .penalty-choice { background: var(--surface-2); }
.score-box button { color: var(--accent); background: #0d141f; box-shadow: 0 5px 12px -7px #000; }
.score-box input { color: var(--heading); }

.table-wrap { border: 1px solid var(--line); border-radius: 16px; }
.standings-table thead { background: #0d141e; }
.standings-table th { color: #68768d; border-bottom-color: var(--line); }
.standings-table td { color: #9ba7ba; border-bottom-color: var(--line); }
.standings-table tr.leader { background: linear-gradient(90deg, rgba(184,255,44,.09), rgba(53,216,255,.025)); }
.rank-cell, .points-cell { color: var(--accent) !important; }
.match-row { border-bottom-color: var(--line); }
.match-number { color: #66758c; }
.match-status { color: var(--muted-2); }
.match-status.done { color: var(--success-text); }
.match-score strong { color: var(--heading); }
@media (hover:hover) and (pointer:fine) { .match-row:hover { background: rgba(255,255,255,.025); } }

.ko-card--final, .champion-card { border: 1px solid rgba(184,255,44,.16); background: linear-gradient(145deg, #111a26 0%, #15231d 100%); box-shadow: 0 22px 55px -32px rgba(184,255,44,.26); }
.ko-team { border-bottom-color: var(--line); }
.ko-team.winner { background: rgba(184,255,44,.075); }
.ko-team strong { color: var(--accent); }
.ko-card__actions { color: #d0f987; }
.crown { background: rgba(184,255,44,.1); box-shadow: inset 0 0 0 1px rgba(184,255,44,.18), 0 12px 26px -16px rgba(184,255,44,.4); }
.champion-card .section-kicker { color: var(--accent); }
.champion-card h3 { color: var(--heading); text-transform: uppercase; }
.champion-card p { color: var(--muted); }
.local-disabled-icon { color: #08100a; background: linear-gradient(145deg, var(--accent-light), var(--accent)); box-shadow: 0 15px 30px -15px rgba(184,255,44,.48); }
.toast { color: #07100a; background: var(--accent); box-shadow: 0 18px 38px -16px rgba(184,255,44,.45); }
.toast--error { color: #fff; background: #bd3450; }
footer { color: #4f5c70; font-family: var(--font-display); letter-spacing: .22em; }

@media (max-width: 560px) {
  .hero::after { display: none; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.2rem); }
  .hero__mark { width: 31px; height: 35px; }
}
