:root {
  --bg: #050b10;
  --surface: #0d1820;
  --surface-soft: #111f29;
  --surface-strong: #071119;
  --field: #08131b;
  --ink: #f4f8fb;
  --muted: #91a1ad;
  --line: rgba(255, 255, 255, 0.1);
  --nav: #02070b;
  --accent: #f3c642;
  --accent-strong: #d4a80e;
  --on-accent: #050b10;
  --good: #31e66b;
  --bad: #ff554a;
  --warn: #ffb84d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.auth-brand {
  min-height: 270px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  object-fit: cover;
}

.brand-logo.large {
  width: 82px;
  height: 82px;
  margin-bottom: auto;
}

.auth-brand h1,
.auth-card h2,
.app-header h1,
.view-heading h2,
.panel h3 {
  margin: 0;
  line-height: 1.05;
}

.auth-brand h1 {
  font-size: clamp(2.4rem, 12vw, 4.8rem);
}

.auth-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.auth-card,
.panel,
.summary-card,
.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-card {
  align-self: center;
  padding: 22px;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(243, 198, 66, 0.24);
}

.button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.button.ghost {
  background: var(--surface-soft);
}

.button.compact {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.button.full {
  width: 100%;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-soft);
}

.form-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--bad);
  font-weight: 800;
}

.app-screen {
  min-height: 100dvh;
  padding-bottom: 86px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 16, 0.92);
  padding: 14px 18px;
  backdrop-filter: blur(12px);
}

.brand-block,
.header-actions,
.toolbar,
.panel-header,
.check-row {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 12px;
}

.brand-block h1 {
  overflow: hidden;
  max-width: 56vw;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.35rem;
}

.header-actions {
  gap: 8px;
}

.app-layout {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.view-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
}

.view-heading-actions {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.home-period-field {
  width: min(300px, 42vw);
  color: var(--muted);
  font-size: 0.82rem;
}

.home-period-field[hidden] {
  display: none !important;
}

.home-period-field select {
  min-height: 40px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.view-heading h2 {
  font-size: clamp(1.85rem, 8vw, 3.3rem);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-state,
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.mini-state,
.badge {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.pill.good {
  background: rgba(49, 230, 107, 0.12);
  color: var(--good);
}

.pill.bad {
  background: rgba(255, 85, 74, 0.13);
  color: var(--bad);
}

.pill.warn {
  background: rgba(255, 184, 77, 0.13);
  color: var(--warn);
}

.view {
  display: none;
}

.view.active-view {
  display: grid;
  gap: 14px;
}

.hero-panel {
  overflow: hidden;
  padding: 18px;
  background: var(--surface-strong);
  color: #fff;
}

.hero-panel h3 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 4.4rem);
  line-height: 0.98;
}

.hero-panel p {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.stat-card small,
.muted {
  color: var(--muted);
  font-weight: 750;
}

.stat-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 7vw, 2.25rem);
  line-height: 1;
}

.content-grid {
  display: grid;
  gap: 12px;
}

.home-team-panel {
  min-width: 0;
}

.home-team-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.home-team-table th,
.home-team-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: middle;
}

.home-team-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.home-team-table tbody tr:last-child td {
  border-bottom: 0;
}

.home-team-table th:nth-child(2),
.home-team-table td:nth-child(2) {
  width: 150px;
  text-align: right;
}

.home-team-table th:nth-child(3),
.home-team-table td:nth-child(3) {
  width: 120px;
  text-align: right;
}

.home-team-table td:first-child {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.home-team-table td:nth-child(2) {
  font-weight: 850;
}

.home-team-table td:nth-child(3) .pill {
  justify-content: center;
  white-space: nowrap;
}

.treasury-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.treasury-period-field {
  width: min(280px, 38vw);
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.treasury-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.treasury-hero {
  text-align: center;
}

.treasury-hero p {
  margin-inline: auto;
}

.treasury-players-panel {
  min-width: 0;
}

.treasury-panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.treasury-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 10px;
  margin: 14px 0;
}

.treasury-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.treasury-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.treasury-table th,
.treasury-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  vertical-align: middle;
}

.treasury-table th {
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.treasury-table th:first-child,
.treasury-table td:first-child {
  width: 30%;
  text-align: left;
}

.treasury-table th:nth-child(5),
.treasury-table td:nth-child(5) {
  width: 110px;
}

.treasury-table th:last-child,
.treasury-table td:last-child {
  width: 118px;
}

.treasury-table tbody tr:last-child td {
  border-bottom: 0;
}

.treasury-player-link {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.treasury-player-link > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.treasury-player-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasury-player-link small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.treasury-avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 950;
}

.treasury-mobile-list {
  display: none;
}

.treasury-mobile-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.treasury-mobile-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
}

.treasury-mobile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.treasury-mobile-copy strong,
.treasury-mobile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.treasury-mobile-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.app-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.treasury-payment-player {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.treasury-payment-player > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.treasury-payment-player small {
  color: var(--muted);
  font-weight: 750;
}

.treasury-detail-modal,
.treasury-history-modal {
  width: min(860px, calc(100vw - 24px));
}

.treasury-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.treasury-detail-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.treasury-detail-section h3 {
  margin: 0;
}

.treasury-month-list,
.treasury-history-rows {
  display: grid;
  gap: 8px;
}

.treasury-month-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(110px, auto)) minmax(90px, auto);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.treasury-month-row > span:first-child {
  display: grid;
  gap: 2px;
}

.treasury-month-row small {
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 800;
}

.treasury-history-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.treasury-history-row.voided {
  opacity: 0.62;
}

.treasury-history-row .row-actions {
  margin-top: 10px;
}

.treasury-void-button {
  border-color: rgba(255, 85, 74, 0.32);
  color: var(--bad);
}

.treasury-void-payment {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 85, 74, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 85, 74, 0.08);
  padding: 12px;
}

.treasury-void-payment > span:not(.pill) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.treasury-void-payment small {
  color: var(--muted);
  font-weight: 750;
}

.treasury-confirm-void {
  border-color: rgba(255, 85, 74, 0.4);
  background: var(--bad);
  color: #fff;
}

.panel,
.summary-card {
  padding: 14px;
}

.panel-header {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel h3 {
  font-size: 1.15rem;
}

.list {
  display: grid;
  gap: 8px;
}

.agenda-panel {
  width: min(760px, 100%);
  margin-inline: auto;
}

.denunciation-form-panel {
  width: min(760px, 100%);
  margin-inline: auto;
}

.denunciation-period-toolbar {
  width: min(760px, 100%);
  display: flex;
  justify-content: flex-end;
  margin-inline: auto;
}

.denunciation-period-field {
  width: min(300px, 100%);
  color: var(--muted);
  font-size: 0.82rem;
}

.denunciation-period-field select {
  min-height: 40px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

.agenda-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#agenda-team-select {
  width: clamp(180px, 28vw, 220px);
  min-height: 36px;
  padding: 7px 34px 7px 10px;
  font-size: 0.86rem;
  font-weight: 850;
}

.agenda-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.agenda-stat {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
  padding: 8px 10px;
}

.agenda-stat span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.agenda-stat strong {
  font-size: 0.95rem;
}

.agenda-stat.total strong {
  color: var(--ink);
}

.agenda-stat.good strong {
  color: var(--good);
}

.agenda-stat.warn strong {
  color: var(--warn);
}

.agenda-stat.bad strong {
  color: var(--bad);
}

.agenda-group {
  display: grid;
  gap: 8px;
}

.agenda-group + .agenda-group {
  margin-top: 14px;
}

.agenda-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

.agenda-group-header h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.list-row,
.match-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.match-row.upcoming {
  border-color: rgba(243, 198, 66, 0.36);
  background: rgba(243, 198, 66, 0.08);
}

.match-row.clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.match-row.clickable:hover,
.match-row.clickable:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(243, 198, 66, 0.58);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  outline: none;
}

.match-row-side {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.match-score {
  flex: 0 0 auto;
  min-width: 62px;
  font-size: 0.9rem;
}

.match-link-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.row-main {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row-main strong {
  overflow-wrap: anywhere;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 14px;
  text-align: center;
  font-weight: 800;
}

.toolbar {
  flex-wrap: wrap;
  gap: 10px;
}

.profile-toolbar {
  align-items: end;
  justify-content: flex-end;
}

.profile-page-period {
  width: min(300px, 100%);
  flex: 0 1 300px;
}

.profile-pay-button {
  width: min(320px, 100%);
  flex: 0 1 320px;
}

.toolbar label {
  flex: 1 1 220px;
}

.summary-card {
  display: grid;
  gap: 14px;
  background: rgba(243, 198, 66, 0.08);
  border-color: rgba(243, 198, 66, 0.28);
}

.summary-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.summary-title h3 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: 1;
}

.profile-summary-actions {
  display: grid;
  width: auto;
  flex: 0 0 auto;
  justify-items: end;
  gap: 10px;
}

.profile-period-field {
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-period-field select {
  min-height: 40px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}

#player-summary-card .profile-period-field {
  display: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.check-row {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px 12px;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 850;
}

.check-row input {
  width: 22px;
  min-height: 22px;
}

.row-actions,
.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions .button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 8px 10px;
  font-weight: 900;
}

.compact-list .list-row {
  padding: 10px;
}

.admin-layout {
  display: grid;
  gap: 12px;
}

.admin-page.hidden {
  display: none !important;
}

.admin-menu-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #eef6fb;
  box-shadow: var(--shadow);
  padding: 18px;
}

.admin-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.admin-title h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.admin-title p {
  margin: 5px 0 0;
  color: var(--accent);
  font-weight: 950;
}

.admin-bell {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(238, 246, 251, 0.82);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom: 0;
  position: relative;
}

.admin-bell::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(238, 246, 251, 0.82);
}

.admin-group {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.admin-group-title {
  margin: 0 0 8px;
  color: rgba(238, 246, 251, 0.78);
  font-size: 0.82rem;
  font-weight: 950;
}

.admin-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #eef6fb;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.admin-row:first-of-type {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.admin-row:last-of-type {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.admin-row.active {
  background: rgba(243, 198, 66, 0.14);
}

.admin-row.danger {
  color: var(--bad);
}

.admin-row span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.admin-row small {
  color: var(--good);
  font-weight: 950;
}

.chevron {
  color: rgba(238, 246, 251, 0.66);
  font-weight: 950;
}

.admin-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  position: relative;
  color: rgba(238, 246, 251, 0.82);
}

.admin-icon::before,
.admin-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-user::before {
  width: 10px;
  height: 10px;
  top: 3px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-treasury::before {
  content: "€";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 950;
}

.treasury-entry-row {
  background: rgba(243, 198, 66, 0.1);
}

.icon-user::after {
  width: 18px;
  height: 8px;
  bottom: 2px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 2px 2px;
}

.icon-rule::before {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-rule::after {
  width: 10px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.icon-status::before {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.icon-status::after {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}

.icon-theme::before {
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 6px 6px 10px 10px;
}

.icon-theme::after {
  width: 8px;
  height: 4px;
  top: 2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.icon-export::before {
  width: 16px;
  height: 10px;
  bottom: 3px;
  border: 2px solid currentColor;
  border-top: 0;
}

.icon-export::after {
  width: 9px;
  height: 9px;
  top: 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon-audit::before {
  width: 16px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-audit::after {
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.icon-lock::before {
  width: 16px;
  height: 12px;
  bottom: 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-lock::after {
  width: 10px;
  height: 10px;
  top: 1px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.icon-backup::before {
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.icon-backup::after {
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.admin-panels {
  display: grid;
  gap: 12px;
}

.admin-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #eef6fb;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  padding: 14px;
}

.admin-detail-header .eyebrow {
  color: var(--accent);
}

.admin-detail-header h3 {
  margin: 0;
  line-height: 1;
  font-size: 1.35rem;
}

.admin-back-button {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eef6fb;
}

.admin-panel {
  display: none;
}

.admin-panel.active-admin-panel {
  display: block;
}

.admin-form {
  margin-bottom: 12px;
}

.invite-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.invite-result {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(22, 130, 82, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.invite-result input {
  font-size: 0.88rem;
}

.editor-list {
  display: grid;
  gap: 10px;
}

.editor-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.add-item-button {
  margin-bottom: 14px;
}

.player-list-row {
  width: 100%;
  min-height: 66px;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.player-list-row:hover,
.player-list-row:focus-visible {
  border-color: rgba(243, 198, 66, 0.48);
  background: rgba(243, 198, 66, 0.08);
  outline: none;
}

.player-list-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(243, 198, 66, 0.34);
  border-radius: 50%;
  background: rgba(243, 198, 66, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
}

.player-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-list-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.player-list-copy strong,
.player-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-list-copy small {
  color: var(--muted);
  font-weight: 750;
}

.player-list-chevron {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-weight: 950;
}

body.app-modal-open {
  overflow: hidden;
}

.app-modal {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(243, 198, 66, 0.38);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  padding: 0;
}

.app-modal[open] {
  display: flex;
  flex-direction: column;
}

.app-modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.app-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 18px;
}

.app-modal-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.05;
}

.app-modal-close {
  flex: 0 0 auto;
}

.app-modal-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.app-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.field-help {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.app-modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: rgba(7, 17, 25, 0.97);
  padding: 14px 16px;
}

.app-modal-action-spacer {
  flex: 1 1 auto;
}

.invite-modal .invite-result {
  margin: 0 16px 16px;
}

.player-modal-delete {
  border-color: rgba(255, 85, 74, 0.35);
  background: rgba(255, 85, 74, 0.1);
  color: var(--bad);
}

.danger-button {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 85, 74, 0.28);
  background: rgba(255, 85, 74, 0.12);
  color: var(--bad);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.editor-card .row-actions {
  justify-content: flex-end;
}

.theme-settings {
  display: grid;
  gap: 12px;
}

.theme-section {
  gap: 12px;
}

.theme-section .panel-header {
  margin-bottom: 0;
}

.theme-section h3 {
  margin: 0;
  line-height: 1.05;
}

.theme-section .panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.theme-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.theme-logo-preview {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
}

.theme-logo-preview img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.theme-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-section input[type="color"] {
  min-height: 46px;
  padding: 6px;
}

.agenda-source-list {
  display: grid;
  gap: 10px;
}

.agenda-source-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.agenda-source-remove {
  border-color: rgba(255, 85, 74, 0.28);
  background: rgba(255, 85, 74, 0.1) !important;
  color: var(--bad);
}

.denunciation-history-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.denunciation-delete {
  border-color: rgba(255, 85, 74, 0.28);
  background: rgba(255, 85, 74, 0.1) !important;
  color: var(--bad);
}

.theme-sticky-actions {
  position: sticky;
  bottom: 82px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 11, 16, 0.94);
  box-shadow: var(--shadow);
  padding: 10px;
  backdrop-filter: blur(12px);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--nav);
  padding: 8px;
  box-shadow: 0 -16px 42px rgba(0, 0, 0, 0.44);
}

.bottom-nav.player-navigation {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bottom-nav button {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: clamp(0.68rem, 2.7vw, 0.86rem);
  font-weight: 950;
  line-height: 1.1;
  padding: 8px 4px;
}

.bottom-nav button.active {
  background: var(--accent);
  color: var(--on-accent);
}

.bottom-nav button[hidden],
.admin-only[hidden],
.treasury-only[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .view-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .view-heading-actions {
    width: 100%;
    align-items: end;
  }

  .home-period-field {
    width: auto;
    flex: 1 1 auto;
  }

  .home-team-table th,
  .home-team-table td {
    padding: 12px 6px;
    font-size: 0.82rem;
  }

  .home-team-table th:nth-child(2),
  .home-team-table td:nth-child(2) {
    width: 92px;
  }

  .home-team-table th:nth-child(3),
  .home-team-table td:nth-child(3) {
    width: 82px;
  }

  .home-team-table td:nth-child(3) .pill {
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .treasury-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .treasury-period-field {
    width: 100%;
    margin-left: 0;
  }

  .denunciation-period-field {
    width: 100%;
  }

  .treasury-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treasury-toolbar-actions .button {
    width: 100%;
  }

  .treasury-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .treasury-mobile-card-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .treasury-mobile-card-main .pill {
    grid-column: 2;
    width: fit-content;
  }

  .treasury-detail-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .treasury-month-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .treasury-month-row > span:nth-child(2),
  .treasury-month-row > span:nth-child(3) {
    color: var(--muted);
    font-size: 0.76rem;
  }

  .treasury-void-payment {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .treasury-void-payment > span:nth-child(2) {
    grid-column: 1;
  }

  .treasury-void-payment .pill {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .profile-page-period,
  .profile-pay-button,
  .profile-summary-actions {
    width: 100%;
    flex-basis: 100%;
  }

  .summary-title {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-summary-actions {
    justify-items: stretch;
  }

  .denunciation-history-row .row-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .agenda-panel .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .agenda-panel-actions {
    width: 100%;
  }

  #agenda-team-select {
    width: auto;
    flex: 1 1 auto;
  }

  .agenda-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-modal-actions .button {
    flex: 1 1 0;
  }

  .app-modal-action-spacer {
    display: none;
  }

  .player-modal-delete {
    flex-basis: 100% !important;
  }
}

@media (max-width: 739px) {
  .treasury-table-wrap {
    display: none;
  }

  .treasury-mobile-list {
    display: grid;
    gap: 10px;
  }
}

@media (min-width: 740px) {
  .auth-screen {
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 0.65fr);
    align-items: stretch;
    padding: 34px;
  }

  .auth-brand,
  .auth-card {
    min-height: calc(100dvh - 68px);
  }

  .auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
  }

  .app-layout {
    padding: 24px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .denunciation-form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .denunciation-form-grid .denunciation-half,
  .denunciation-form-grid .denunciation-submit {
    grid-column: span 6;
  }

  .denunciation-form-grid .denunciation-rule-field {
    grid-column: span 10;
  }

  .denunciation-form-grid .denunciation-repeat-field {
    grid-column: span 2;
  }

  .admin-layout {
    width: min(760px, 100%);
    margin: 0 auto;
  }

  .editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px;
  }

  .invite-modal .invite-result {
    margin: 0 20px 20px;
  }
}

@media (min-width: 1020px) {
  .app-screen {
    padding-bottom: 102px;
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(760px, calc(100vw - 48px));
    transform: translateX(-50%);
    border-radius: var(--radius);
  }

}
