﻿:root {
  color-scheme: light;
  --ink: #182721;
  --muted: #56685e;
  --line: #dde6df;
  --green: #1f623e;
  --lime: #dcff8a;
  --paper: #f5f7f3;
  font: 100% "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 244px minmax(0, 1fr); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #458557; outline-offset: 3px; }
.sidebar { background: #142820; color: #f5fff7; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: 30px 18px 20px; }
.mobile-menu-toggle { display: none; }
.brand, .sidebar footer { display: flex; align-items: center; gap: 12px; font-weight: 750; padding: 0 9px; }
.brand { font-size: 1.25rem; }
.brand img, .club-icon { width: 44px; height: 44px; object-fit: contain; background: var(--lime); color: #203822; border-radius: 12px; padding: 4px; }
.club-icon { display: grid; place-items: center; background: #315142; color: #e0f7e7; }
small { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.sidebar small { color: #acbfb3; }
nav { display: grid; gap: 5px; margin-top: 44px; }
nav button { border: 0; background: transparent; color: #bccdc2; text-align: left; border-radius: 9px; padding: 12px; display: flex; gap: 12px; align-items: center; white-space: nowrap; }
nav button:hover { background: #263f34; }
nav button[aria-current="page"] { background: var(--lime); color: #1c311e; font-weight: 700; }
.sidebar footer { margin-top: auto; padding-top: 20px; border-top: 1px solid #385044; }
main, .panel, .stat, .cell-value, #fields > *, .field, .actions > * { min-width: 0; }
svg { width: 20px; height: 20px; flex: none; }
.topbar { background: white; border-bottom: 1px solid var(--line); padding: 19px clamp(18px, 4vw, 48px); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .875rem; }
.content { max-width: 1400px; margin: auto; padding: 32px clamp(16px, 4vw, 48px) 48px; }
.page-head, .panel-head, .actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.55rem); letter-spacing: -.045em; line-height: 1.13; }
h2 { font-size: 1.18rem; letter-spacing: -.025em; }
.subtitle { color: var(--muted); margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 13px; font-weight: 650; font-size: .9rem; min-height: 42px; max-width: 100%; overflow-wrap: anywhere; }
.primary { background: var(--lime); color: #1e321d; border-color: #caed79; }
.primary:hover { background: #c8ee71; }
.secondary { background: white; color: var(--ink); border-color: var(--line); }
.secondary:hover, .plain:hover { background: #edf4ed; }
.hero { margin: 24px 0 18px; background: #174332; border-radius: 17px; color: white; padding: 27px 30px; position: relative; overflow: hidden; isolation: isolate; }
.hero::after { content: ""; position: absolute; z-index: -1; right: -35px; top: 50%; transform: translateY(-50%) rotate(-18deg); width: 290px; height: 175px; border: 2px solid #6ba28266; border-radius: 12px; background: radial-gradient(circle at center, transparent 30px, #6ba28266 31px 32px, transparent 33px), linear-gradient(90deg, transparent 49.7%, #6ba28266 50%, transparent 50.7%); }
.hero span { display: inline-block; color: var(--lime); font-size: .875rem; font-weight: 700; margin-bottom: 9px; }
.hero h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
.hero p { color: #d6ebdf; margin-top: 7px; }
.cash-balance { display: block; color: var(--lime); font-size: clamp(1.75rem, 5vw, 2.75rem); margin-top: 4px; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat, .panel { background: white; border: 1px solid var(--line); border-radius: 13px; }
.stat { padding: 16px; }
.stat-icon { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; background: #edf5eb; color: var(--green); margin-bottom: 10px; }
.stat strong { display: block; font-size: clamp(1.2rem, 2.2vw, 1.75rem); margin-top: 3px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.columns { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.panel-head { padding: 17px 19px; border-bottom: 1px solid var(--line); }
.section-panel { margin-top: 23px; }
.scorer-panel { margin-top: 23px; }
.scorer-highlights { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scorer-highlights li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbf8; }
.scorer-highlights li:first-child { background: #edf5eb; }
.scorer-highlights strong, .scorer-highlights li div > span { display: block; overflow-wrap: anywhere; }
.scorer-highlights li div > span { color: var(--muted); font-size: .875rem; }
@media (max-width: 980px) { .scorer-highlights { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); } }
.scroll { overflow-x: auto; }
.mobile-label { display: none; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .915rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 650; background: #f9fbf8; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 20px; font-size: .84rem; font-weight: 650; overflow-wrap: anywhere; }
.good { background: #e5f4e7; color: #205834; }
.pending { background: #fff1d4; color: #744900; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.match-info { min-width: 0; overflow-wrap: anywhere; }
.match-info small { margin-top: 3px; }
.empty { padding: 24px 18px; color: var(--muted); }
.filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.payments-toggle { min-height: 44px; padding: 0 6px; cursor: pointer; }
.payments-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
input, select, textarea { border: 1px solid #c9d6ce; border-radius: 8px; background: white; color: var(--ink); padding: 8px 10px; min-width: 0; max-width: 100%; }
.plain { border: 0; background: transparent; border-radius: 7px; color: var(--green); font-weight: 700; padding: 6px 8px; }
.demo { margin-top: 17px; color: var(--muted); font-size: .875rem; }
dialog { width: min(670px, calc(100% - 28px)); max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 15px; padding: 21px; color: var(--ink); }
dialog::backdrop { background: #0b2018a8; }
dialog header, dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
dialog footer { justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
#fields { display: grid; gap: 12px; margin-top: 16px; }
.field { display: grid; gap: 5px; font-weight: 600; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.athlete-actions { justify-content: flex-start; }
.athlete-cell, .photo-editor { display: flex; align-items: center; gap: 12px; }
.athlete-photo { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; background: #edf5eb; color: var(--green); }
.athlete-photo.large { width: 72px; height: 72px; }
.athlete-photo.large svg { width: 30px; height: 30px; }
.photo-editor { flex-wrap: wrap; }
.photo-controls { min-width: 0; flex: 1 1 210px; }
.photo-controls input { width: 100%; }
.photo-controls small { margin-top: 5px; }
.athlete-name, .profile-group h3 { margin: 0; overflow-wrap: anywhere; }
.profile-group h3 { font-size: 1rem; margin-bottom: 8px; }
.profile-group { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 12px; }
.profile-group legend { font-weight: 700; padding: 0 5px; }
.profile-group dl, .profile-group dd { margin: 0; overflow-wrap: anywhere; }
.profile-group dt { font-size: .875rem; color: var(--muted); }
.profile-group .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-group select { width: 100%; }
.own-profile { display: grid; gap: 12px; padding: 16px; }
@media (max-width: 450px) { .profile-group .pair { grid-template-columns: minmax(0, 1fr); } }
.player-stats { min-width: 0; border: 1px solid var(--line); border-radius: 8px; }
.player-stats th, .player-stats td { padding: 8px; }
.player-stats input[type="number"] { width: 4.25rem; }
.player-stats input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--green); }
#form-error { color: #a32a25; margin-top: 8px; }
#notice:not(:empty) { position: fixed; right: 18px; bottom: 18px; background: #173b2c; color: white; padding: 12px 16px; border-radius: 9px; z-index: 2; max-width: min(440px, calc(100% - 36px)); overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.shared-form { display: grid; gap: 12px; justify-items: start; padding: 18px; }
.shared-form .field { width: min(100%, 350px); }
.attendance-review { display: grid; gap: 12px; }
.attendance-review .actions { margin-top: 4px; }
.attendance-register { display: grid; gap: 6px; justify-items: start; }
.starting-teams { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.team-rosters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: 10px; }
.team-rosters ul { margin: 5px 0 0; padding-inline-start: 1.1rem; }
.team-swap-form { display: grid; gap: 8px; }
.resenha-details { padding: 12px 18px; overflow-wrap: anywhere; }
.resenha-details strong { display: block; margin-top: 6px; }
.invite-target:focus { outline: 2px solid var(--green); outline-offset: 3px; }
.video-player { display: grid; justify-items: start; gap: 10px; padding: 14px; }
.video-player iframe { display: block; width: min(100%, 880px); aspect-ratio: 16 / 9; min-height: 200px; border: 0; background: #142820; }
.video-player a { color: var(--green); font-weight: 650; }
.video-publish-form { display: grid; gap: 6px; justify-items: start; }
.login-panel { max-width: 490px; }
.report-filter { margin-top: 18px; }
.monthly-report { display: grid; gap: 14px; margin-top: 18px; }
.report-heading p { color: var(--muted); margin-top: 4px; }
@media (max-width: 1080px) { .columns { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  body { display: block; }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; position: static; height: auto; padding: 12px 16px; overflow: visible; }
  .brand { padding: 0; }
  .sidebar:has(nav:not(:empty)) .mobile-menu-toggle { display: inline-block; }
  .mobile-menu-toggle { min-height: 44px; padding: 8px 14px; border: 1px solid #547265; border-radius: 9px; background: #263f34; color: white; }
  .mobile-menu-toggle[aria-expanded="false"] + nav { display: none; }
  nav { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); margin-top: 12px; }
  nav button { padding: 8px; gap: 8px; min-height: 44px; font-size: .875rem; white-space: normal; overflow-wrap: anywhere; }
  .sidebar footer { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .content { padding-top: 24px; }
  .button, dialog header .plain { min-height: 44px; }
  dialog header .plain { min-width: 44px; }
  .field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; font-size: 1rem; }
  .hero { padding: 20px; }
  .hero::after { opacity: .35; }
  .topbar { flex-wrap: wrap; }
  .filter { max-width: 100%; }
  .filter select { max-width: 100%; }
  dialog { padding: 14px; }
  dialog .pair { grid-template-columns: minmax(0, 1fr); }
  .scroll { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody tr { display: grid; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  tbody td, .player-stats td { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); align-items: center; gap: 8px; padding: 0; border: 0; }
  .mobile-label { display: block; color: var(--muted); font-weight: 650; overflow-wrap: anywhere; }
  .cell-value { min-width: 0; overflow-wrap: anywhere; }
  .athlete-cell { flex-wrap: wrap; }
  .player-stats input[type="number"] { min-height: 44px; }
  .player-stats input[type="checkbox"] { width: 1.5rem; height: 1.5rem; }
}
@media (max-width: 420px) {
  .panel-head, .shared-form { padding: 14px; }
  .stat { padding: 12px; }
  .cell-value .actions { gap: 8px; }
  .cell-value:has(.attendance-review, .athlete-actions) { grid-column: 1 / -1; }
  .attendance-review .actions { justify-content: flex-start; }
}
[hidden] { display: none !important; }
@media print {
  body:has(.monthly-report) { display: block; background: white; color: black; }
  body:has(.monthly-report) .sidebar, body:has(.monthly-report) .topbar,
  body:has(.monthly-report) .content > :not(.monthly-report), body:has(.monthly-report) #notice { display: none; }
  body:has(.monthly-report) .content { padding: 0; max-width: none; }
  .monthly-report { display: block; margin: 0; }
  .monthly-report .panel { margin-top: 12px; border-radius: 0; }
  .monthly-report .panel-head { break-after: avoid; }
  .monthly-report .scroll { overflow: visible; }
  .monthly-report table { display: table; }
  .monthly-report thead { display: table-header-group; position: static; width: auto; height: auto; clip-path: none; white-space: normal; }
  .monthly-report tbody { display: table-row-group; }
  .monthly-report tr { display: table-row; break-inside: avoid; }
  .monthly-report th, .monthly-report td { display: table-cell; padding: 6px 10px; border-bottom: 1px solid var(--line); }
  .monthly-report .mobile-label { display: none; }
}
