:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #e9eee7;
  background: #111611;
  font-size: 16px;
  --muted: #a9b4a6;
  --line: #303b30;
  --accent: #c2f76b;
  --panel: #1b241c;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select,
a {
  touch-action: manipulation;
}
button,
select {
  font: inherit;
}
button,
a.primary {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  padding: 0.7rem 1rem;
  background: #263027;
  border: 1px solid #41503f;
  color: #eff4eb;
  border-radius: 7px;
  font-size: 0.875rem;
}
button:hover:not(:disabled) {
  border-color: var(--accent);
}
button:disabled,
select:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 38px 24px;
  background: #0b100c;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  font-size: 0.93rem;
  line-height: 1.15;
  letter-spacing: 0.08em;
}
.monogram {
  display: block;
  flex: 0 0 auto;
  width: 43px;
  height: 48px;
  object-fit: contain;
}
.wordmark {
  font-weight: 900;
  letter-spacing: 0.045em;
}
.wordmark > span { color: #a9b4a6; }
.hero-mark { display: block; margin-bottom: 30px; }
.login h2 > span { color: var(--accent); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.side-label,
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 12px;
}
.side-label {
  margin-top: 35px;
}
.club-label {
  font-size: 0.875rem;
  margin-bottom: -16px;
  color: var(--muted);
}
select {
  border: 1px solid #465542;
  border-radius: 6px;
  padding: 0.7rem;
  background: #202a21;
  color: #edf3e8;
  font-size: 0.875rem;
  width: 100%;
  min-height: 43px;
}
nav {
  display: grid;
  gap: 8px;
}
.nav {
  text-align: left;
  background: none;
  border-color: transparent;
  display: flex;
  gap: 15px;
  color: #889984;
  padding: 14px 9px;
}
.nav span {
  color: #d1dccb;
}
.nav.active {
  background: #25301d;
  color: var(--accent);
  border-color: #3b4b2c;
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav.active span {
  color: var(--accent);
}
.side-bottom {
  margin-top: auto;
  font-size: 0.875rem;
  color: var(--muted);
  display: grid;
  gap: 14px;
}
.side-bottom a {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
main {
  padding: 38px clamp(20px, 3vw, 54px) 20px;
  max-width: 1560px;
  width: 100%;
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 26px;
}
h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  margin: 0;
  line-height: 1.1;
}
h2 {
  font-size: 1.65rem;
  letter-spacing: -0.035em;
  font-weight: 550;
  margin: 0 0 12px;
}
h3 {
  font-size: 1rem;
  margin: 0 0 15px;
  font-weight: 600;
}
p {
  line-height: 1.65;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.metrics > div {
  padding: 19px 24px;
  border-right: 1px solid var(--line);
}
.metrics > div:first-child {
  padding-left: 0;
}
.metrics > div:last-child {
  border: 0;
}
.metrics span {
  font-size: 0.875rem;
  color: var(--muted);
  display: block;
  min-height: 1.4em;
}
.metrics strong {
  font-size: 2.1rem;
  font-weight: 450;
  display: block;
  margin-top: 7px;
  letter-spacing: -0.04em;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.section-head .eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
}
.segmented {
  display: flex;
  padding: 4px;
  background: #090e09;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 3px;
}
.segmented button {
  background: none;
  border-color: transparent;
  white-space: nowrap;
}
.segmented button.selected {
  background: var(--accent);
  color: #15200a;
  font-weight: 650;
}
.toolbar {
  display: flex;
  gap: 18px;
  align-items: end;
  margin: 15px 0 20px;
}
.toolbar label:first-child {
  flex: 1;
}
.toolbar label:nth-child(2) {
  flex: 0 1 260px;
}
label {
  font-size: 0.875rem;
  color: var(--muted);
  display: block;
}
label select {
  margin-top: 8px;
}
.badge {
  border: 1px solid #46583c;
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.toolbar .badge {
  margin-bottom: 9px;
}
.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
}
.board-wrap {
  background: #053a64;
  border: 1px solid #36473e;
  border-radius: 10px;
  overflow: hidden;
  padding: 18px;
}
.board-top,
.board-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  padding: 1px 0 16px;
}
.board-top {
  font-weight: 650;
}
.board-footer {
  font-size: 0.75rem;
  color: #d0dcd4;
  padding: 15px 0 0;
  flex-wrap: wrap;
}
.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1.23;
  min-height: 410px;
  max-height: 680px;
  background: repeating-linear-gradient(
    0deg,
    #166534 0%,
    #166534 10%,
    #14532d 10%,
    #14532d 20%
  );
  border-radius: 3px;
}
.pitch svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: var(--pitch-lines, #94c59c);
  fill: none;
  stroke-width: 0.35;
  opacity: 0.6;
}
.position {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 18%;
  padding: 4px 0;
  background: transparent;
  border: 0;
  text-align: center;
  font-size: 0.75rem;
  color: white;
  line-height: 1.3;
}
.position:hover:not(:disabled),
.position.chosen {
  background: #0a231799;
  border-radius: 8px;
  outline: 1px solid #d5fa91;
}
.position .number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  margin: 0 auto 4px;
  clip-path: polygon(25% 4%, 37% 0, 50% 9%, 63% 0, 75% 4%, 100% 22%, 86% 46%, 76% 39%, 76% 100%, 24% 100%, 24% 39%, 14% 46%, 0 22%);
  color: var(--kit-text, #121a12);
  background: #f3f5ed;
  filter: drop-shadow(0 0 1px var(--kit-outline, #334155)) drop-shadow(0 4px 4px #0007);
  text-shadow:
    -1px 0 var(--kit-text-edge, #fff),
    0 1px var(--kit-text-edge, #fff),
    1px 0 var(--kit-text-edge, #fff),
    0 -1px var(--kit-text-edge, #fff);
  font-weight: 850;
  font-size: 0.8rem;
}
.position .name {
  display: block;
  padding: 3px 2px;
  border-radius: 3px;
  background: #07190ee0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.position .code {
  font-size: 0.75rem;
  display: block;
  margin-top: 2px;
  color: #dfefd8;
}
.selection {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 21px;
  align-self: start;
}
.selection select {
  margin: 8px 0 14px;
}
.selection > button {
  width: 100%;
  margin: 0 0 10px;
}
.primary,
a.primary {
  display: inline-block;
  background: var(--accent);
  color: #142008;
  border: 1px solid var(--accent);
  font-weight: 650;
  padding: 0.85rem 1.1rem;
  border-radius: 7px;
  font-size: 0.875rem;
}
.small {
  font-size: 0.8125rem;
  line-height: 1.6;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.availability-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.availability-row strong {
  color: #e4ecdf;
}
summary {
  cursor: pointer;
  font-size: 0.875rem;
  padding: 4px 0 10px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 16px 14px;
  background: var(--panel);
}
td {
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
}
td:first-child {
  font-weight: 600;
}
#notice:not(:empty) {
  padding: 13px 17px;
  border: 1px solid #748d4b;
  background: #28351d;
  color: #e4f2d0;
  font-size: 0.875rem;
  border-radius: 7px;
  margin-bottom: 20px;
}
#notice.error {
  border-color: #b16b57;
  background: #3b211b;
  color: #ffe0d6;
}
.login {
  padding: 60px 0 85px;
  max-width: 650px;
}
.login h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.05;
  margin: 22px 0;
  color: #eef5e8;
  letter-spacing: -0.055em;
}
.login p {
  max-width: 450px;
}
.login .primary {
  margin: 20px 0;
}
.login .eyebrow {
  color: var(--accent);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
  margin-top: 38px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #9aab94;
}
footer span {
  letter-spacing: 0;
}
.view > p {
  margin-bottom: 24px;
}
@media (min-width: 1500px) {
  .board-grid {
    grid-template-columns: minmax(0, 780px) 300px;
  }
  .pitch {
    aspect-ratio: 1/1;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .board-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .selection {
    display: block;
  }
  .selection > button {
    width: auto;
    margin-right: 8px;
  }
  .section-head {
    flex-wrap: wrap;
  }
  .pitch {
    max-height: 650px;
  }
  .metrics > div {
    padding: 14px;
  }
  .metrics span {
    min-height: 2.8em;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .brand {
    font-size: 0.75rem;
  }
  .monogram {
    width: 32px;
    height: 35px;
  }
  .side-label,
  .club-label,
  .side-bottom p {
    display: none;
  }
  .sidebar > select {
    align-self: center;
  }
  .sidebar nav {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .nav {
    gap: 5px;
    padding: 8px;
    font-size: 0.8125rem;
    min-height: 44px;
  }
  .side-bottom {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
  }
  .side-bottom a {
    padding: 0 8px;
    border: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .side-bottom button {
    padding: 8px 10px;
    min-height: 44px;
  }
  main {
    padding: 26px 16px;
  }
  header {
    align-items: start;
  }
  header .eyebrow {
    font-size: 0.75rem;
    line-height: 1.5;
  }
  header button {
    padding: 8px;
    font-size: 0.8125rem;
    min-height: 44px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 25px;
  }
  .metrics > div {
    padding: 14px !important;
  }
  .metrics > div:nth-child(2) {
    border-right: 0;
  }
  .metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metrics span {
    min-height: 0;
  }
  .metrics strong {
    font-size: 1.8rem;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .toolbar label:first-child {
    flex-basis: 100%;
  }
  .toolbar label:nth-child(2) {
    flex: 1;
  }
  .pitch {
    min-height: 400px;
  }
  .board-wrap {
    padding: 12px;
  }
  .board-top {
    font-size: 0.8125rem;
  }
  .board-footer {
    line-height: 1.5;
  }
  .position .number {
    width: 38px;
    height: 35px;
    font-size: 0.75rem;
  }
  .position .name {
    font-size: 0.75rem;
  }
  .position {
    width: 20%;
  }
  .login {
    padding: 45px 0;
  }
  footer {
    line-height: 1.5;
    flex-wrap: wrap;
  }
  .selection {
    padding: 18px;
  }
}

/* Manager tools share the dashboard's existing palette and focus treatment. */
input:not([type="checkbox"]), textarea {
  width: 100%; font: inherit; font-size: .875rem; color: #edf3e8;
  background: #202a21; border: 1px solid #465542; border-radius: 6px;
  padding: .75rem; margin-top: 8px; min-height: 43px;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
textarea { resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent); }
.auto-refresh { display: flex; align-items: center; gap: 8px; font-size: .75rem; }
.management-panel { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin: 0 0 28px; }
.management-panel summary { color: var(--accent); font-weight: 650; }
.management-panel[open] summary { margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid button { justify-self: start; }
.full-width { grid-column: 1/-1; margin: 0; }
.action-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.whatsapp-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: .7rem 1rem;
  border: 1px solid #36a85c;
  border-radius: 7px;
  background: #167c3a;
  color: #fff;
  font-size: .875rem;
  font-weight: 650;
}
.whatsapp-share:hover { background: #1d9148; border-color: #65d187; }
.whatsapp-share:focus-visible { outline-color: #65d187; }
.whatsapp-share.secondary-share {
  background: transparent;
  color: #8ee6a8;
}
.whatsapp-share.secondary-share:hover { background: #123a22; color: #fff; }
.action-row label { flex: 1; min-width: 180px; }
#member-search { align-items: end; }
#event-controls { margin: 0 0 18px; }
.request-list { margin: 12px 0 28px; }
.request-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; margin-bottom: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.request-card > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.request-card p { margin: 7px 0 0; }
.health-failed { border-left: 3px solid #d96b5f; }
.badge.error { border-color: #d96b5f; color: #ffb4aa; }
.request-card button, #squad-list button { font-size: .8125rem; }
.section-gap { margin-top: 32px; }
.chat-messages { display: grid; gap: 16px; margin-bottom: 22px; max-width: 880px; }
.chat-message { padding: 20px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--panel); overflow-wrap: anywhere; }
.chat-message p { white-space: pre-wrap; margin: 10px 0 0; color: #e9eee7; }
.chat-message.mine { border-left-color: #6b7c64; background: #151d16; }
#chat-form { max-width: 880px; }
#chat-form .action-row { margin-top: 14px; }
#chat-status { font-size: .8125rem; color: var(--muted); }
#squad-list { margin-bottom: 26px; }
#statistics-source a { color: var(--accent); text-decoration: underline; }
@media(max-width:650px) {
  .form-grid { grid-template-columns: 1fr; }
  .request-card { align-items: stretch; flex-direction: column; gap: 12px; }
  .management-panel { padding: 16px; }
  .sidebar .auto-refresh { display: none; }
}
