:root {
  --ink: #17251f;
  --muted: #78817c;
  --line: #e7e9e6;
  --paper: #f8f9f7;
  --white: #fff;
  --green: #1e7148;
  --lime: #b9e857;
  --orange: #ffb643;
  --red: #e9645a;
  --blue: #dcecff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
}
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 245px;
  background: #183c2a;
  color: #eef6ed;
  padding: 28px 16px 20px;
  display: flex;
  position: fixed;
  inset: 0 auto 0 0;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 21px;
  padding: 0 10px 28px;
  letter-spacing: -1px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: var(--lime);
  color: #164129;
  font-size: 18px;
}
.team-switcher {
  background: #254c37;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 25px;
}
.team-icon,
.club-crest {
  display: grid;
  place-items: center;
  background: #f7f7f1;
  color: #1b4930;
  border-radius: 50%;
  font-weight: 800;
}
.team-icon {
  width: 31px;
  height: 31px;
}
.team-switcher div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
}
.team-switcher small,
.role-toggle small {
  color: #a8c2ae;
}
.chevron {
  margin-left: auto;
}
nav {
  display: grid;
  gap: 4px;
}
.nav-item,
.role-toggle,
.help {
  border: 0;
  background: transparent;
  color: #c8d8cb;
  font: inherit;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.nav-item span {
  display: inline-block;
  width: 25px;
  font-size: 17px;
}
.nav-item.active,
.nav-item:hover {
  background: #315b42;
  color: white;
}
.sidebar-bottom {
  margin-top: auto;
}
.role-toggle {
  padding: 11px 8px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-toggle > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
  font-size: 11px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dae9e0;
  color: #24533a;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.avatar.coach {
  background: #f8be5c;
  color: #754500;
}
.help {
  font-size: 12px;
  width: 100%;
}
main {
  margin-left: 245px;
  width: calc(100% - 245px);
  padding-bottom: 50px;
}
header {
  height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 46px;
  color: #8a918d;
  font-size: 12px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 20px;
  position: relative;
}
.icon-button i {
  position: absolute;
  right: 0;
  top: 1px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}
.page {
  display: none;
  max-width: 1220px;
  margin: auto;
  padding: 46px;
}
.page.active {
  display: block;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}
.eyebrow,
.card-label {
  font-family: "DM Mono", monospace;
  color: #83908a;
  letter-spacing: 0.06em;
  font-size: 10px;
  font-weight: 500;
  margin: 0 0 9px;
}
.page-intro h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -1.3px;
}
.muted {
  margin: 0;
  color: var(--muted);
}
.button {
  border: 0;
  border-radius: 7px;
  padding: 12px 17px;
  font: 700 13px Manrope;
  cursor: pointer;
}
.primary {
  color: #183c2a;
  background: var(--lime);
  box-shadow: 0 2px 0 #90b940;
}
.primary:hover {
  background: #c7f56a;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 22px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 20px;
}
.match-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 5px 24px;
}
.club-crest {
  width: 52px;
  height: 52px;
  border: 3px solid #e5eee1;
  font-size: 21px;
}
.club-crest.away {
  background: #397b65;
  color: #f2fff6;
  border-color: #d2e5dc;
}
.fixture {
  text-align: center;
}
.fixture strong {
  font-size: 16px;
}
.fixture strong span {
  color: #a0a7a3;
  padding: 0 7px;
}
.fixture p {
  font: 500 11px "DM Mono";
  color: #2d5940;
  margin: 8px 0 3px;
}
.fixture small {
  color: #88908b;
  font-size: 11px;
}
.availability-summary {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #768079;
  font-size: 11px;
}
.availability-summary b {
  color: #1c2c24;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: #327551;
  font: 700 11px Manrope;
  cursor: pointer;
  margin-left: auto;
}
.quick-card {
  padding: 17px;
}
.quick-card button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  text-align: left;
  gap: 11px;
  font: 600 12px Manrope;
  cursor: pointer;
}
.quick-card button:last-child {
  border-bottom: 0;
}
.quick-card button span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.quick-card small {
  font-weight: 400;
  color: #8b938e;
  margin-top: 3px;
}
.quick-card b {
  font-size: 19px;
  color: #91a099;
}
.quick-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 16px;
}
.orange {
  background: #fff0d4;
  color: #d28400;
}
.blue {
  background: #e2efff;
  color: #4783b8;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 43px 0 17px;
}
.section-heading h2 {
  font-size: 18px;
  margin: 0 0 4px;
  letter-spacing: -0.6px;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.schedule {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.schedule-item {
  padding: 17px 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  min-height: 120px;
}
.schedule-item .date {
  font: 500 10px "DM Mono";
  color: #529064;
}
.schedule-item h3 {
  font-size: 13px;
  margin: 12px 0 4px;
}
.schedule-item p {
  color: #85908a;
  font-size: 11px;
  margin: 0;
}
.lower {
  margin-top: 20px;
}
.form-card h3 {
  font-size: 14px;
  margin: 0 0 16px;
}
.donut-row {
  display: flex;
  gap: 25px;
  align-items: center;
}
.donut {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(#4e9a64 0 82%, #f0c655 82% 94%, #e76f65 94%);
  display: grid;
  place-items: center;
}
.donut:before {
  content: "";
  position: absolute;
  width: 77px;
  height: 77px;
  border-radius: 50%;
  background: white;
}
.donut span {
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
}
.donut small {
  font-size: 11px;
  letter-spacing: 0;
}
.donut-row p {
  font-size: 11px;
  margin: 8px 0;
  color: #738078;
  display: flex;
  gap: 7px;
}
.donut-row b {
  color: #24342b;
  margin-left: auto;
}
.legend {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
  margin-top: 4px;
}
.green {
  background: #4e9a64;
}
.yellow {
  background: #f0c655;
}
.red {
  background: #e76f65;
}
.top-scorers .card-label {
  display: flex;
  align-items: center;
}
.scorer {
  display: grid;
  grid-template-columns: 27px 1fr 25px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f1ef;
}
.scorer:last-child {
  border: 0;
}
.scorer .rank {
  font: 500 10px "DM Mono";
  color: #8b928e;
}
.scorer small {
  color: #819088;
  margin-left: 5px;
}
.scorer b:last-child {
  color: #367953;
}
.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  font: 600 12px Manrope;
  color: #7c8580;
}
.tabs button.active {
  color: #265e3d;
  border-bottom: 2px solid #347a4f;
}
.match-list {
  display: grid;
  gap: 10px;
}
.match-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
}
.match-row time {
  font: 500 10px "DM Mono";
  color: #508764;
}
.match-row strong {
  font-size: 14px;
}
.match-selection-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 8px;
  vertical-align: middle;
}
.match-selection-person {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
}
.match-selection-person small {
  margin-left: 0;
  font-size: inherit;
}
.match-selection-person.selected {
  color: #276841;
  background: #edf8ef;
  border-color: #c9e3ce;
}
.match-selection-person.not-selected {
  color: #a44842;
  background: #fff2f1;
  border-color: #efcfcc;
}
.match-row small {
  color: #88918c;
  margin-left: 8px;
}
.match-row .selection-label {
  color: #5b48d8;
  background: #f0eeff;
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}
.match-row .location {
  color: #78837d;
  font-size: 11px;
}
.attendance-layout,
.selection-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 20px;
}
.availability-actions {
  display: flex;
  gap: 8px;
}
.choice {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 10px 12px;
  font: 700 11px Manrope;
  cursor: pointer;
}
.choice.present {
  color: #31774e;
}
.choice.absent {
  color: #bd5049;
}
.player-row {
  display: grid;
  grid-template-columns: 37px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 3px;
  border-bottom: 1px solid var(--line);
}
.player-row:last-child {
  border-bottom: 0;
}
.player-row .name {
  font-weight: 700;
  font-size: 13px;
}
.player-row .position {
  font-size: 10px;
  color: #8b948e;
  margin-left: 7px;
}
.badge {
  font: 600 10px "DM Mono";
  padding: 5px 8px;
  border-radius: 30px;
}
.badge.available {
  background: #e2f3e5;
  color: #377b4e;
}
.badge.doubtful {
  background: #fff2d7;
  color: #aa7506;
}
.badge.absent {
  background: #fde7e5;
  color: #bd5149;
}
.deadline {
  height: min-content;
}
.mini-icon {
  display: grid;
  place-items: center;
  background: #e4f2e6;
  color: #397b50;
  border-radius: 7px;
  width: 31px;
  height: 31px;
}
.deadline h3 {
  font-size: 13px;
  margin: 14px 0 4px;
}
.deadline p,
.deadline small {
  font-size: 11px;
  color: #7c8680;
}
.deadline hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
.selection-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.selection-header p {
  font-size: 11px;
  color: #7d8882;
  margin: 0;
}
.selection-card .player-row {
  grid-template-columns: 32px 1fr auto;
}
.select-check {
  appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid #bec9c0;
  border-radius: 4px;
  cursor: pointer;
}
.select-check:checked {
  background: #4e9a64;
  border-color: #4e9a64;
}
.select-check:checked:after {
  content: "✓";
  display: block;
  color: white;
  font-size: 12px;
  text-align: center;
  line-height: 14px;
}
.selection-note textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  font: 12px Manrope;
  color: var(--ink);
}
.selection-note p {
  font-size: 10px;
  color: #818b85;
  line-height: 1.5;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.stat-card small {
  font: 500 9px "DM Mono";
  color: #7d8882;
  display: block;
}
.stat-card b {
  display: block;
  font-size: 28px;
  margin: 10px 0 5px;
  letter-spacing: -1px;
}
.stat-card em {
  font-size: 15px;
  font-style: normal;
}
.stat-card span {
  font-size: 10px;
  color: #86918b;
}
.stat-card .up {
  color: #3b8753;
}
.private-stat {
  background: #f3f7f1;
}
.private-stat i,
.stats-table th i {
  font: 500 8px "DM Mono";
  color: #a36d17;
  background: #fbe5bc;
  border-radius: 3px;
  padding: 2px 4px;
  font-style: normal;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.table-head p {
  font-size: 11px;
  color: #849089;
  margin: 0;
}
.filter {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 7px 9px;
  font: 500 10px Manrope;
  color: #65736a;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 19px;
  text-align: left;
}
th {
  font: 500 9px "DM Mono";
  color: #819087;
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 7px;
  border-bottom: 1px solid #f0f1ef;
  font-size: 12px;
}
td:first-child {
  font-weight: 700;
}
.table-avatar {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  background: #e5efe5;
  color: #47754e;
  border-radius: 50%;
  font-size: 9px;
  margin-right: 8px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 25px;
  background: #193d2a;
  color: white;
  padding: 13px 18px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 5px 22px #001a0933;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 20px 70px #10251845;
  width: min(430px, 90vw);
}
dialog::backdrop {
  background: #12241888;
}
.modal-form {
  padding: 28px;
  position: relative;
}
.modal-form h2 {
  margin: 0 0 22px;
  font-size: 22px;
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 25px;
  color: #7c8680;
  cursor: pointer;
}
.modal-form label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  margin: 13px 0;
}
.modal-form input,
.modal-form select {
  border: 1px solid #dce1dc;
  border-radius: 6px;
  padding: 10px;
  font: 13px Manrope;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-form .primary {
  width: 100%;
  margin-top: 12px;
}
@media (max-width: 850px) {
  .sidebar {
    width: 62px;
    padding: 22px 8px;
  }
  .brand {
    padding: 0 8px 25px;
  }
  .brand > span:last-child,
  .team-switcher div,
  .chevron,
  .nav-item:not(.active) {
    font-size: 0;
  }
  .team-switcher {
    padding: 8px;
    background: none;
  }
  .nav-item {
    padding: 11px;
  }
  .nav-item span {
    font-size: 18px;
  }
  .sidebar-bottom .role-toggle > span:not(:first-child),
  .help {
    display: none;
  }
  main {
    margin-left: 62px;
    width: calc(100% - 62px);
  }
  .page {
    padding: 30px 22px;
  }
  .dashboard-grid,
  .attendance-layout,
  .selection-layout {
    grid-template-columns: 1fr;
  }
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 590px) {
  header {
    padding: 0 22px;
  }
  .page-intro {
    align-items: start;
    gap: 14px;
    flex-direction: column;
  }
  .schedule {
    grid-template-columns: 1fr;
  }
  .availability-summary {
    flex-wrap: wrap;
  }
  .match-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .coach-only {
    display: none !important;
  }
}
.secondary {
  background: #fff;
  border: 1px solid #b9d1be;
  color: #2c6b47;
}
.button-group {
  display: flex;
  gap: 8px;
}
.source-status {
  font: 500 10px "DM Mono";
  color: #438258;
  background: #e5f3e8;
  border-radius: 5px;
  padding: 6px 9px;
  width: max-content;
  margin: 0 0 18px;
}
.source-status.offline {
  color: #7b8580;
  background: #edf0ed;
}
.integration-card {
  display: flex;
  align-items: center;
  gap: 22px;
}
.integration-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: #df302e;
  color: #fff;
  font: 700 15px "DM Mono";
}
.integration-copy {
  flex: 1;
}
.integration-copy h2,
.integration-info h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.integration-copy p,
.integration-info p,
.modal-help {
  color: #758079;
  font-size: 12px;
  line-height: 1.65;
  margin: 0 0 12px;
}
.integration-info {
  margin-top: 18px;
  background: #fbfcfa;
}
.integration-info code {
  font: 500 11px "DM Mono";
  color: #2e7049;
  background: #e8f0e9;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Consistent, touch-friendly controls (no browser-default chrome). */
:root {
  --control-border: #cedbd1;
  --control-bg: #fff;
  --control-focus: #3d8a5a;
  --control-radius: 10px;
}
button,
input,
select,
textarea {
  font-family: Manrope, Arial, sans-serif;
}
button {
  min-height: 42px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-team-switcher {
  display: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #bde5c7;
  outline-offset: 2px;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 1px #15332308;
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    background 0.16s;
}
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: #9ebba5;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--control-focus);
  box-shadow: 0 0 0 3px #bde5c755;
  outline: 0;
}
input::placeholder,
textarea::placeholder {
  color: #94a099;
  opacity: 1;
}
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-color: var(--control-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%233e5848' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px;
}
.select-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}
.select-shell .native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
.custom-select-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 42px 10px 12px;
  text-align: left;
  font: 600 13px Manrope;
  line-height: 1.4;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-toggle::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #3e5848;
  border-bottom: 2px solid #3e5848;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s;
}
.select-shell.open .custom-select-toggle {
  border-color: var(--control-focus);
  box-shadow: 0 0 0 3px #bde5c755;
}
.select-shell.open .custom-select-toggle::after {
  transform: translateY(-30%) rotate(225deg);
}
.custom-select-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f4f1;
}
.custom-select-menu {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 250px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #c9d8cd;
  border-radius: 10px;
  box-shadow: 0 15px 30px #1533232b;
}
.select-shell.open .custom-select-menu {
  display: grid;
  gap: 2px;
}
.custom-select-option {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 9px 10px;
  color: #263c2f;
  text-align: left;
  font: 600 12px Manrope;
  cursor: pointer;
}
.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
  background: #eaf5eb;
  color: #1d6841;
}
.custom-select-option[aria-selected="true"]::after {
  content: "✓";
  float: right;
  color: #287248;
  font-weight: 800;
}
.custom-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input[type="date"],
input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 10px;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.65;
  cursor: pointer;
}
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  display: inline-grid;
  place-content: center;
  border: 2px solid #9bb1a1;
  background: #fff;
  cursor: pointer;
  vertical-align: middle;
  transition:
    background 0.15s,
    border-color 0.15s;
}
input[type="checkbox"] {
  border-radius: 6px;
}
input[type="radio"] {
  border-radius: 50%;
}
input[type="checkbox"]:checked {
  background: #2f7b4d;
  border-color: #2f7b4d;
}
input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}
input[type="radio"]:checked {
  border-color: #2f7b4d;
  box-shadow: inset 0 0 0 4px #fff;
  background: #2f7b4d;
}
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #edf1ed;
}
textarea {
  resize: vertical;
  min-height: 112px;
}
.button,
.choice,
.nav-item,
.help,
.text-button,
.icon-button,
.modal-close,
.match-delete,
.metric-remove,
.metric-order,
.invite-player,
.remove-player,
.player-email,
.quick-card button,
.team-switcher,
.team-choice,
.team-create-choice,
.season-management-toggle,
.season-management-choice,
.season-management-create {
  appearance: none;
  -webkit-appearance: none;
}
.button {
  min-height: 44px;
  border-radius: 10px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.15s,
    border-color 0.15s;
}
.button:disabled,
.choice:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  pointer-events: none;
}
.button[aria-busy="true"]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: control-spin 0.7s linear infinite;
}
@keyframes control-spin {
  to {
    transform: rotate(360deg);
  }
}
.button:active,
.choice:active,
.nav-item:active,
.quick-card button:active {
  transform: translateY(1px);
}
.primary {
  box-shadow:
    inset 0 -3px 0 #90b940,
    0 1px 2px #1533231c;
}
.primary:hover {
  box-shadow:
    inset 0 -3px 0 #90b940,
    0 4px 10px #1533231c;
}
.secondary {
  min-height: 44px;
  border-radius: 10px;
  background: #fff;
}
.secondary:hover {
  background: #f0f8f1;
  border-color: #79a887;
}
.text-button {
  min-height: 36px;
  padding: 7px 0;
  border-radius: 6px;
}
.text-button:hover {
  color: #184c31;
  background: #edf6ee;
}
.filter {
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 40px 10px 12px;
  font-size: 12px;
  color: #31473a;
}
.calendar-actions {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 760px);
}
.calendar-actions > .admin-only,
.calendar-actions > .coach-only {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-actions .select-shell {
  min-width: 240px;
}
.calendar-actions .button {
  white-space: nowrap;
}
.tabs {
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  white-space: nowrap;
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 12px;
}
.tabs button.active {
  border-bottom: 0;
  background: #e8f4e9;
  color: #205d3b;
}
.event-attendance-select,
.player-role {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%233e5848' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 29px;
  min-height: 38px;
  border-radius: 8px;
}
.modal-close {
  min-height: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
  background: #eff4ef;
}
.modal-close:hover {
  background: #dfece1;
  color: #1e7148;
}
.icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #315343;
}
.icon-button:hover {
  background: #edf4ee;
}

/* Small screens use a persistent bottom navigation instead of a cramped sidebar. */
@media (max-width: 640px) {
  body {
    font-size: 15px;
    padding-bottom: 76px;
    overflow-x: hidden;
  }
  .app-shell {
    display: block;
    min-height: 100dvh;
  }
  .sidebar {
    z-index: 40;
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 72px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    display: block;
    background: #183c2a;
    box-shadow: 0 -5px 18px #10251822;
  }
  .brand,
  .sidebar-bottom {
    display: none !important;
  }
  .team-switcher-wrap {
    display: block !important;
    position: static !important;
    margin: 0 !important;
  }
  .team-switcher-wrap > .team-switcher {
    display: none !important;
  }
  .mobile-team-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: calc(100vw - 78px);
    min-height: 42px;
    padding: 4px 8px 4px 3px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #244432;
    font: 800 13px Manrope;
    text-align: left;
  }
  .mobile-team-switcher:hover {
    background: #edf4ee;
  }
  .mobile-team-switcher .team-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    font-size: 12px;
  }
  .mobile-team-switcher #mobileTeamNavName {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-team-switcher .chevron {
    margin-left: 0;
    font-size: 16px;
  }
  .team-switcher-menu {
    position: fixed !important;
    z-index: 65 !important;
    left: 16px !important;
    right: 16px !important;
    top: 58px !important;
    width: auto !important;
    max-height: calc(100dvh - 150px);
    overflow: auto;
  }
  .sidebar nav {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 3px;
  }
  .nav-item,
  .nav-item:not(.active) {
    min-height: 56px;
    padding: 5px 2px;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: #c8d8cb;
    font-size: 9px !important;
    line-height: 1.1;
    text-align: center;
  }
  .nav-item span {
    display: block;
    width: auto;
    font-size: 17px !important;
    line-height: 18px;
  }
  .nav-item.active {
    background: #315b42;
    color: #fff;
  }
  main {
    margin-left: 0;
    width: 100%;
    padding-bottom: 8px;
  }
  header {
    height: 60px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 15;
    background: #f8f9f7;
  }
  #breadcrumb {
    display: none;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .icon-button {
    display: none;
  }
  .page {
    padding: 24px 16px 28px;
  }
  .page-intro {
    margin-bottom: 22px;
  }
  .page-intro h1 {
    font-size: 27px;
    line-height: 1.12;
  }
  .page-intro .button-group,
  .page-intro > .button {
    width: 100%;
  }
  .button-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }
  .button-group > span {
    display: grid;
    gap: 8px;
  }
  .button-group .button {
    width: 100%;
  }
  .calendar-actions {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .calendar-actions > .admin-only,
  .calendar-actions > .coach-only {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .card {
    border-radius: 14px;
    padding: 17px;
  }
  .dashboard-grid {
    gap: 14px;
  }
  .match-main {
    padding: 8px 0 18px;
    gap: 10px;
  }
  .club-crest {
    width: 43px;
    height: 43px;
    font-size: 17px;
  }
  .fixture strong {
    font-size: 14px;
  }
  .availability-summary {
    gap: 9px;
    align-items: flex-start;
  }
  .availability-summary span {
    font-size: 10px;
  }
  .availability-summary .text-button {
    width: 100%;
    justify-content: flex-start;
    margin: 2px 0 0;
  }
  .section-heading {
    margin: 30px 0 14px;
    align-items: flex-start;
    gap: 10px;
  }
  .section-heading .text-button {
    white-space: nowrap;
  }
  .donut-row {
    gap: 17px;
  }
  .donut {
    width: 92px;
    height: 92px;
  }
  .donut:before {
    width: 66px;
    height: 66px;
  }
  .integration-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .integration-card .button {
    width: 100%;
  }
  .table-head {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .table-head > .button {
    width: 100%;
  }
  .match-row {
    padding: 15px;
    gap: 7px;
    border-radius: 12px;
  }
  .match-row strong {
    line-height: 1.5;
  }
  .match-delete {
    justify-self: start;
    color: #a24f48;
    background: #fff0ee;
    border-radius: 7px;
    padding: 6px 9px;
    min-height: 34px;
  }
  .inline-event-detail {
    margin: -6px 0 4px;
    padding: 15px;
    border-radius: 0 0 12px 12px;
  }
  .inline-detail-head {
    gap: 8px;
  }
  .inline-detail-head .text-button {
    flex: 0 0 auto;
  }
  .event-player-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .event-player-row select,
  .event-player-row .badge {
    grid-column: 2;
    width: 100%;
    margin-top: 2px;
  }
  .inline-stats-panel {
    grid-template-columns: 1fr;
    padding: 13px;
  }
  .inline-stats-panel .text-button,
  .inline-stats-panel .button {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }
  .roster-row {
    padding: 13px 0;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 8px;
  }
  .roster-row select {
    grid-column: 2 / -1;
  }
  .roster-row label {
    grid-column: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
  }
  .roster-row .remove-player {
    grid-column: 3;
    grid-row: 1;
  }
  .player-email,
  .invite-status {
    grid-column: 2;
  }
  .invite-player {
    grid-column: 2;
    width: max-content;
  }
  .metric-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 7px;
  }
  .metric-row b {
    grid-column: 1/-1;
  }
  .metric-row span {
    margin-right: auto;
  }
  .metric-form {
    grid-template-columns: 1fr !important;
  }
  .settings-form,
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .settings-form {
    margin-bottom: 15px;
  }
  .custom-select-menu {
    position: fixed;
    z-index: 70;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 84px;
    max-height: 52dvh;
    border-radius: 14px;
    box-shadow: 0 -8px 28px #1533232e;
    padding: 8px;
  }
  .custom-select-option {
    min-height: 46px;
    font-size: 13px;
  }
  .leaderboard-row {
    grid-template-columns: 27px 31px minmax(0, 1fr) auto;
    padding: 12px 0;
  }
  .leaderboard-row b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .leaderboard-row strong {
    font-size: 14px;
  }
  dialog {
    width: min(100% - 20px, 520px);
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
  }
  .modal-form {
    padding: 24px 18px 20px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
  }
  .modal-form h2 {
    font-size: 21px;
    margin-bottom: 18px;
  }
  .modal-form label {
    font-size: 12px;
  }
  .stats-drawer {
    width: 100%;
    max-width: none;
    padding: 24px 18px calc(28px + env(safe-area-inset-bottom));
    border-left: 0;
  }
  .toast {
    left: 16px;
    right: 16px;
    bottom: 86px;
    text-align: center;
  }
  .auth-card {
    padding: 27px 20px;
    border-radius: 18px;
  }
  .auth-card h1 {
    font-size: 27px;
  }
  .auth-form input {
    min-height: 46px;
  }
  .season-management-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .season-management-actions .button,
  .season-management-actions .text-button {
    width: 100%;
    justify-content: center;
  }
  .season-management-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 84px;
    max-height: 55dvh;
    overflow: auto;
  }
}

.calendar-subscription {
  display: grid;
  gap: 12px;
  margin: 22px 0 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9ff;
}
.calendar-subscription .card-label {
  margin: 0;
}
.calendar-subscription .muted {
  font-size: 12px;
  line-height: 1.55;
}
.calendar-subscription-types {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.calendar-subscription-types .checkbox-label {
  margin: 0;
}
.calendar-subscription-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calendar-subscription-filters label {
  margin: 0;
}
.calendar-subscription-actions,
.calendar-subscription-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.calendar-subscription-link input {
  flex: 1;
  min-width: 180px;
  font-size: 11px;
  background: #fff;
}
.calendar-subscription-link .button {
  margin: 0;
  width: auto;
}
.calendar-subscription-link .primary {
  width: auto;
}
@media (max-width: 640px) {
  .calendar-subscription {
    padding: 15px;
  }
  .calendar-subscription-filters {
    grid-template-columns: 1fr;
  }
  .calendar-subscription-actions .button {
    width: 100%;
  }
  .calendar-subscription-actions .text-button {
    margin-left: 0;
  }
  .calendar-subscription-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .calendar-subscription-link input {
    grid-column: 1/-1;
    width: 100%;
  }
  .calendar-subscription-link .button,
  .calendar-subscription-link .primary {
    width: 100%;
  }
}

/* Personal calendar: two independent, progressively-disclosed choices. */
.calendar-subscription {
  gap: 16px;
  background: #fff;
}
.calendar-preferences {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.calendar-preference {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9ff;
}
.calendar-preference-heading .checkbox-label {
  margin: 0;
  font-size: 13px !important;
  font-weight: 800;
}
.calendar-preference-heading .checkbox-label input {
  appearance: none;
  width: 21px;
  height: 21px;
  margin: 0;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-content: center;
}
.calendar-preference-heading .checkbox-label input:checked {
  background: #4b815a;
  border-color: #4b815a;
}
.calendar-preference-heading .checkbox-label input:checked::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.calendar-preference > label {
  margin: 0 !important;
}
.calendar-preference > label[hidden] {
  display: none !important;
}
.calendar-subscription-actions {
  padding-top: 2px;
}
.calendar-subscription-actions .text-button {
  margin-left: 0;
}
.calendar-regenerate {
  color: var(--muted) !important;
  font-size: 11px !important;
}
.calendar-subscription-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9ff;
}
.calendar-subscription-link input {
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  padding: 8px !important;
  color: var(--muted) !important;
}
.calendar-subscription-link .button,
.calendar-subscription-link .primary {
  width: auto;
  margin: 0;
  min-height: 40px;
}
.calendar-subscription-link .primary {
  box-shadow: none;
}
@media (max-width: 640px) {
  .calendar-preferences {
    grid-template-columns: 1fr;
  }
  .calendar-preference {
    padding: 12px;
  }
  .calendar-subscription-actions {
    display: grid;
    gap: 6px;
  }
  .calendar-subscription-actions .button {
    width: 100%;
  }
  .calendar-subscription-link {
    grid-template-columns: 1fr 1fr;
  }
  .calendar-subscription-link input {
    grid-column: 1/-1;
    width: 100%;
  }
  .calendar-subscription-link .button,
  .calendar-subscription-link .primary {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .page {
    padding: 34px 26px;
  }
  .page-intro {
    align-items: flex-start;
    gap: 16px;
  }
  .button-group {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .roster-row {
    grid-template-columns: 34px minmax(120px, 1fr) minmax(110px, 1fr) 92px auto;
  }
  .roster-row .invite-player {
    display: none;
  }
}

/* A legacy small-screen rule hid every coach action. Keep the permission check in
   JavaScript, but explicitly retain the calendar's coach controls for coaches. */
@media (max-width: 590px) {
  body.is-coach #wedstrijden .calendar-actions > .coach-only {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.matchsheet-results {
  display: grid;
  gap: 8px;
  margin: 8px 0 18px;
}
.matchsheet-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.matchsheet-result small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.matchsheet-result .status {
  font-weight: 700;
  font-size: 0.8rem;
}
.matchsheet-result .ready,
.matchsheet-result .added {
  color: var(--green);
}
.matchsheet-result .skipped,
.matchsheet-result .failed {
  color: #b54b42;
}
.matchsheet-result .pending {
  color: #926d14;
}
.matchsheet-debug {
  padding: 10px 2px;
  color: #59665e;
  font-size: 12px;
}
.matchsheet-debug summary {
  cursor: pointer;
  color: #327551;
  font-weight: 800;
}
.matchsheet-debug small {
  display: block;
  margin-top: 7px;
  line-height: 1.5;
  word-break: break-word;
}
.whatsapp-settings {
  display: grid;
  gap: 14px;
}
.whatsapp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.whatsapp-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf8;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.whatsapp-qr img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  background: #fff;
}
.checkbox-label {
  align-content: center;
  grid-auto-flow: column;
  justify-content: start !important;
  font-size: 13px !important;
  color: var(--ink) !important;
}
.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}
#whatsappGroupSearch {
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .whatsapp-qr {
    align-items: flex-start;
  }
  .whatsapp-qr img {
    width: 120px;
    height: 120px;
  }
  .whatsapp-actions .button {
    width: 100%;
  }
}
.match-self-actions {
  display: flex;
  gap: 6px;
  justify-self: end;
}
.guardian-match-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  justify-self: end;
}
.guardian-match-action {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 6px;
  max-width: 310px;
  padding: 8px 10px;
  border: 1px solid #ddd9f4;
  border-radius: 10px;
  background: #fbfaff;
}
.guardian-match-action small {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #73758a;
  font-size: 10px;
  font-weight: 700;
}
.guardian-match-action b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.guardian-match-action .match-self-actions {
  justify-self: start;
}
.match-self-actions .choice.selected {
  background: #e4f4e7;
  border-color: #4b9761;
  box-shadow: inset 0 0 0 1px #4b9761;
  color: #205d3b;
}
.match-self-actions .choice.absent.selected {
  background: #fde8e6;
  border-color: #bf544c;
  box-shadow: inset 0 0 0 1px #bf544c;
  color: #933e37;
}
.attendance-group {
  margin-top: 16px;
}
.attendance-group:first-child {
  margin-top: 0;
}
.attendance-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 3px 8px;
  color: #385647;
}
.attendance-group-head b {
  font-size: 13px;
}
.attendance-group-head span {
  font-size: 12px;
  font-weight: 700;
  color: #61806c;
}
.season-jersey {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap;
}
.season-jersey span {
  font-size: 12px;
  font-weight: 700;
  color: #51675a;
}
.season-jersey input {
  width: 58px;
  min-height: 38px;
  padding: 7px 8px;
  text-align: center;
}
@media (max-width: 640px) {
  .match-self-actions {
    grid-column: 1/-1;
    justify-self: start;
    flex-wrap: wrap;
  }
  .guardian-match-actions {
    grid-column: 1 / -1;
    display: grid;
    width: 100%;
    justify-self: stretch;
  }
  .guardian-match-action {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .guardian-match-action .match-self-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .attendance-group-head {
    padding-top: 3px;
  }
  .season-jersey {
    grid-column: 2 !important;
  }
  .season-jersey input {
    width: 64px;
  }
}

/* Squadigo brand system */
:root {
  --ink: #0d1b2a;
  --muted: #6c7280;
  --line: #e7e4f3;
  --paper: #f8f7fc;
  --white: #fff;
  --green: #4f46e5;
  --lime: #ec4899;
  --orange: #f59e0b;
  --red: #e94b74;
  --blue: #eeeaff;
  --control-border: #d9d4ed;
  --control-focus: #4f46e5;
  --control-bg: #fff;
}
body {
  font-family: Poppins, Manrope, Arial, sans-serif;
  background: linear-gradient(135deg, #faf9ff 0%, #f8f7fc 56%, #f3f0ff 100%);
}
.sidebar {
  background: linear-gradient(180deg, #17104b 0%, #291260 52%, #120b35 100%);
}
.team-switcher {
  background: #ffffff14;
}
.nav-item,
.role-toggle,
.help {
  color: #ddd7ff;
}
.nav-item.active,
.nav-item:hover {
  background: #ffffff1c;
}
.brand.squadigo-brand,
.auth-brand.squadigo-brand {
  padding: 0;
  background: none;
  display: flex;
  align-items: center;
}
.brand.squadigo-brand img {
  width: 152px;
  height: auto;
  filter: invert(1) brightness(2.5);
  mix-blend-mode: screen;
}
.auth-brand.squadigo-brand img {
  width: min(245px, 100%);
  height: auto;
}
.brand-mark {
  background: linear-gradient(135deg, #4f46e5, #ec4899 60%, #f59e0b);
  color: #fff;
}
.primary {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 3px 0 #3730a3;
}
.primary:hover {
  background: #4338ca;
}
.secondary {
  border-color: #c9c2e7;
  color: #4f46e5;
}
.text-button,
.source-status {
  color: #5b3fd1;
}
.source-status {
  background: #eeeaff;
}
.source-status.offline {
  background: #f1eff8;
}
.team-switcher-menu,
.season-management-menu,
.custom-select-menu {
  border-color: #d8d2ef;
}
.avatar {
  background: #eeeaff;
  color: #4f46e5;
}
.avatar.coach {
  background: #ffe3f1;
  color: #c02f7d;
}
.team-icon,
.club-crest {
  color: #4f46e5;
}
.team-choice.active,
.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
  background: #f0edff;
  color: #4f46e5;
}
.tabs button.active {
  color: #4f46e5;
  border-color: #ec4899;
}
.match-row time,
.schedule-item .date,
.fixture p {
  color: #5b3fd1;
}
.match-self-actions .choice.selected {
  background: #eeeaff;
  border-color: #4f46e5;
  box-shadow: inset 0 0 0 1px #4f46e5;
  color: #3730a3;
}
.squadigo-brand img {
  display: block;
}

/* Season roster: compact desktop controls, with an intentional mobile layout. */
.roster-row[data-season-player-row] {
  grid-template-columns:
    34px minmax(170px, 1fr)
    112px 112px max-content 86px 42px 76px;
  gap: 10px;
  min-width: 0;
}
.roster-row[data-season-player-row] > .select-shell {
  min-width: 0;
}
.roster-row[data-season-player-row] .season-jersey {
  justify-self: start;
}
.roster-row[data-season-player-row] .season-jersey input {
  width: 52px;
  min-height: 42px;
}
.roster-row[data-season-player-row] .remove-player {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid #f2d6d2;
  border-radius: 10px;
  background: #fff7f6;
  font-size: 22px;
  line-height: 1;
}
.roster-row[data-season-player-row] .remove-player:hover {
  background: #fde8e6;
  border-color: #dc958e;
}
.roster-row[data-season-player-row] [data-edit-season-player] {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #bed5c4;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
}
.roster-row[data-season-player-row] [data-edit-season-player]:hover {
  background: #edf6ee;
}
@media (max-width: 900px) and (min-width: 641px) {
  .roster-row[data-season-player-row] {
    grid-template-columns:
      34px minmax(145px, 1fr)
      100px 100px max-content 76px 42px 70px;
    gap: 7px;
  }
}
@media (max-width: 640px) {
  .roster-row[data-season-player-row] {
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 42px;
    gap: 12px 10px;
    padding: 18px 4px;
  }
  .roster-row[data-season-player-row] > .avatar {
    grid-column: 1;
    grid-row: 1;
  }
  .roster-row[data-season-player-row] > .avatar + span {
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
  }
  .roster-row[data-season-player-row] > .select-shell:nth-of-type(1) {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .roster-row[data-season-player-row] > .select-shell:nth-of-type(2) {
    grid-column: 3 / 5;
    grid-row: 2;
  }
  .roster-row[data-season-player-row] > label:not(.season-jersey) {
    grid-column: 1 / 3;
    grid-row: 3;
    min-height: 44px;
    padding: 0 4px;
  }
  .roster-row[data-season-player-row] > .season-jersey {
    grid-column: 3 / 5 !important;
    grid-row: 3;
    justify-self: stretch !important;
    display: grid !important;
    grid-template-columns: auto 1fr;
    gap: 8px !important;
    align-items: center !important;
  }
  .roster-row[data-season-player-row] .season-jersey input {
    width: 100%;
    min-height: 44px;
  }
  .roster-row[data-season-player-row] .remove-player {
    grid-column: 4;
    grid-row: 1;
  }
  .roster-row[data-season-player-row] [data-edit-season-player] {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 100%;
    min-height: 44px;
  }
}

/* Keep the Squadigo actions clean and give the brand block room to breathe. */
.primary {
  background: #4f46e5;
  color: #fff;
  box-shadow:
    inset 0 -3px 0 #3730a3,
    0 2px 5px #312e8126;
}
.primary:hover {
  background: #4338ca;
  box-shadow:
    inset 0 -3px 0 #312e81,
    0 4px 12px #312e8130;
}
.brand.squadigo-brand {
  margin: 0 8px 34px;
  padding: 0;
}
@media (max-width: 850px) {
  .brand.squadigo-brand {
    margin: 0 0 26px;
  }
  .brand.squadigo-brand img {
    width: 42px;
    height: auto;
  }
}

.tabs button {
  cursor: pointer;
}
.roster-add-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.roster-groups {
  display: grid;
  gap: 22px;
}
.roster-group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
}
.roster-group-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  border-radius: 20px;
  background: #eeeaff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
}
.roster-group .roster-row:first-of-type {
  border-top: 0;
}
.roster-group.coaches .roster-row {
  grid-template-columns:
    34px minmax(170px, 1fr) max-content minmax(245px, 1fr)
    42px 76px;
}
.roster-group.coaches .season-coach-function {
  min-width: 245px;
}
.roster-group .roster-row .select-shell:has([data-season-player-role]) {
  display: none !important;
}
@media (max-width: 640px) {
  .roster-add-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .roster-add-actions .button {
    width: 100%;
  }
  .roster-group.coaches .roster-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 42px;
  }
  .roster-group.coaches .season-coach-function {
    grid-column: 1/-1;
    grid-row: 3;
    min-width: 0;
  }
}
.roster-row[data-read-only="true"] {
  grid-template-columns:
    44px minmax(180px, 1fr) max-content minmax(160px, 1fr)
    auto !important;
  align-items: center;
}
.roster-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.roster-identity b {
  font-size: 14px;
}
.roster-identity small {
  font-size: 11px;
  color: var(--muted);
}
.roster-details {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.roster-detail,
.roster-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf9ff;
  font-size: 12px;
  color: #4f565e;
}
.roster-detail b {
  color: #687067;
  font-size: 11px;
}
.roster-admin {
  background: #edf8ef;
  border-color: #cde4d1;
  color: #35734a;
  font-weight: 800;
}
.roster-row-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
  min-width: 132px;
}
.roster-row-actions .remove-player {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid #f2d6d2;
  border-radius: 10px;
  background: #fff7f6;
  font-size: 22px;
  line-height: 1;
}
.roster-row-actions .text-button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #bed5c4;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.modal-form [hidden],
#editSeasonPlayerFields[hidden],
#editSeasonCoachFields[hidden],
#editSeasonCoachOtherLabel[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .roster-row[data-read-only="true"] {
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
    gap: 10px;
    padding: 16px 4px;
  }
  .roster-row[data-read-only="true"] > .roster-admin-inline {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin: 0;
  }
  .roster-details {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
  .roster-row-actions {
    grid-column: 2 / -1;
    justify-content: stretch;
    width: 100%;
  }
  .roster-row-actions .text-button {
    flex: 1;
  }
}
.roster-row-actions .roster-invite {
  border-color: #cbc8f5;
  color: #4f46e5;
  background: #fafaff;
}
.roster-row-actions .roster-invite:hover {
  background: #f0efff;
}
.invite-link-modal {
  width: min(100%, 520px);
}
.invite-link-modal label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.invite-link-modal input {
  min-width: 0;
  font-size: 13px;
}
.invite-link-modal .modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.invite-link-modal .modal-actions .button {
  flex: 1;
}
@media (max-width: 640px) {
  .invite-link-modal .modal-actions .button {
    width: 100%;
    flex-basis: 100%;
  }
}
.roster-account-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid #cde4d1;
  border-radius: 999px;
  background: #edf8ef;
  color: #35734a;
  font-size: 10px;
  font-weight: 800;
}
.roster-account-status.invited {
  border-color: #e9d8ad;
  background: #fff8e6;
  color: #89651a;
}
.roster-row-actions {
  min-width: 0;
}
.roster-row-actions .roster-invite {
  font-weight: 700;
}
.roster-row-actions .text-button,
.roster-row-actions .remove-player {
  flex: 0 0 auto;
}
.roster-identity {
  display: block;
}
.roster-identity b {
  display: inline-block;
}
.roster-identity small {
  display: block;
  margin-top: 3px;
}
.roster-admin-inline {
  display: inline-flex !important;
  min-height: 22px;
  padding: 3px 7px;
  margin-left: 7px;
  vertical-align: middle;
  font-size: 10px;
}
#playerRoster .roster-row[data-read-only="true"] {
  grid-template-columns: 44px max-content max-content minmax(0, 1fr) auto !important;
}
#playerRoster .roster-row[data-read-only="true"] > .roster-admin-inline {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  justify-self: start;
}
#playerRoster .roster-row[data-read-only="true"] > .roster-details {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}
#playerRoster .roster-row[data-read-only="true"] > .roster-row-actions {
  grid-column: 5;
  grid-row: 1;
}
@media (max-width: 640px) {
  #playerRoster .roster-row[data-read-only="true"] {
    grid-template-columns: 42px minmax(0, 1fr) auto !important;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-admin-inline {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-details {
    grid-column: 2 / -1;
    grid-row: auto;
    justify-self: stretch;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-row-actions {
    grid-column: 2 / -1;
    grid-row: auto;
  }
}
#playerProfileModal
  .select-shell:has(#editSeasonCoachFunction).open
  .custom-select-menu {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  max-height: none;
  margin-top: 6px;
  box-shadow: none;
}

/* Phone-only roster layout: preserve the roomy desktop grid above. */
@media (max-width: 640px) {
  .roster-add-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .roster-add-actions .button {
    width: 100%;
    padding-inline: 8px;
    font-size: 12px;
  }
  #playerRoster .roster-row[data-read-only="true"] {
    grid-template-columns: 42px minmax(0, 1fr) max-content !important;
    grid-template-rows: auto auto auto;
    gap: 12px;
    padding: 18px 4px;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-admin-inline {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
    align-self: start;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-details {
    grid-column: 2 / -1;
    grid-row: 2;
    justify-self: stretch;
    gap: 8px;
  }
  #playerRoster .roster-row[data-read-only="true"] > .roster-row-actions {
    grid-column: 2 / -1;
    grid-row: 3;
    width: auto;
    justify-content: flex-start;
    gap: 8px;
  }
  #playerRoster
    .roster-row[data-read-only="true"]
    > .roster-row-actions
    .text-button {
    order: 1;
    flex: 0;
    width: auto;
    margin-left: 0;
  }
  #playerRoster
    .roster-row[data-read-only="true"]
    > .roster-row-actions
    .remove-player {
    order: 2;
  }
}
.season-hidden {
  display: none !important;
}
.season-coach-function {
  display: grid;
  grid-template-columns: auto minmax(145px, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 245px;
}
.season-coach-function span {
  font-size: 12px;
  font-weight: 700;
  color: #51675a;
}
.season-coach-function input {
  grid-column: 2;
  max-width: none;
  min-height: 40px;
  padding: 7px 9px;
}
.season-coach-function[hidden] {
  display: none !important;
}
.select-shell:has(> select.season-hidden),
.roster-row[data-roster-role="coach"]
  .select-shell:has([data-season-player-position]),
.roster-row[data-roster-role="coach"] [data-season-player-position] {
  display: none !important;
}
.roster-row[data-season-player-row][data-roster-role="coach"] {
  grid-template-columns:
    34px minmax(170px, 1fr) 112px max-content minmax(245px, 1fr)
    42px 76px;
}
@media (max-width: 900px) and (min-width: 641px) {
  .roster-row[data-season-player-row][data-roster-role="coach"] {
    grid-template-columns:
      34px minmax(135px, 1fr) 100px max-content minmax(210px, 1fr)
      42px 70px;
    gap: 7px;
  }
}
@media (max-width: 640px) {
  .roster-row[data-season-player-row][data-roster-role="coach"] {
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 42px;
  }
  .roster-row[data-season-player-row][data-roster-role="coach"]
    .season-coach-function {
    grid-column: 1 / -1;
    grid-row: 3;
    min-width: 0;
  }
  .roster-row[data-season-player-row][data-roster-role="coach"]
    [data-edit-season-player] {
    grid-row: 4;
  }
}

/* Calendar: keep closed cards concise on phones while preserving detail on open. */
.calendar-create-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 640px) {
  .match-row > .location {
    display: none;
  }
  .match-row strong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }
  .match-selection-summary {
    width: 100%;
    margin: 3px 0 0;
    gap: 5px;
  }
  .match-selection-person {
    padding: 3px 7px;
  }
  .match-self-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    justify-self: stretch;
  }
  .match-self-actions .choice {
    width: 100%;
    min-height: 44px;
  }
  .guardian-match-action .match-self-actions {
    grid-template-columns: 1fr 1fr;
  }
  .guardian-match-actions {
    gap: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .guardian-match-action {
    max-width: none;
    padding: 0 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .guardian-match-action + .guardian-match-action {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .guardian-match-action small {
    display: none;
  }
  .guardian-match-action b {
    font-size: 14px;
  }
  .guardian-match-action .match-self-actions {
    margin-top: 2px;
  }
  .guardian-match-action .match-self-actions .choice {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 13px;
  }
  .calendar-actions > .calendar-create-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .calendar-actions > .calendar-create-actions .button {
    width: 100%;
  }
}

/* Full-page account management */
.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.profile-form {
  display: grid;
  gap: 15px;
}
.profile-form > label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.profile-form input {
  width: 100%;
  border: 1px solid var(--control-border, #d9d4ed);
  border-radius: 9px;
  background: var(--control-bg, #fff);
  padding: 12px 13px;
  color: var(--ink);
  font:
    500 13px Poppins,
    Manrope,
    sans-serif;
}
.profile-form input:focus {
  outline: 2px solid
    color-mix(in srgb, var(--control-focus, #4f46e5) 20%, transparent);
  border-color: var(--control-focus, #4f46e5);
}
.profile-form .primary,
.profile-form .secondary {
  justify-self: start;
  margin-top: 4px;
}
.profile-agenda-card {
  margin-top: 20px;
}
.profile-logout {
  margin-top: 18px;
}
.profile-logout .text-button {
  margin: 0;
  color: var(--red);
  font-size: 13px;
}
.profile-agenda-card .calendar-subscription {
  padding: 0;
  border: 0;
  background: transparent;
}
@media (max-width: 720px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-form .primary,
  .profile-form .secondary {
    width: 100%;
    justify-self: stretch;
  }
  .profile-agenda-card {
    margin-top: 16px;
  }
}
.calendar-subscription-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.calendar-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.calendar-link-actions .calendar-regenerate {
  width: 100%;
  margin: 2px 0 0;
  text-align: left;
}
.calendar-link-actions .button {
  width: auto;
}
.calendar-subscription-link input {
  min-width: 0;
  width: 100%;
}
@media (max-width: 640px) {
  .calendar-link-actions .button {
    flex: 1;
  }
  .calendar-link-actions .calendar-regenerate {
    flex-basis: 100%;
    text-align: center;
  }
}
.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar .profile-nav {
  margin-top: auto;
}
.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}
.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  background: #eeeaff;
  border: 2px solid #e5e1f7;
}
.profile-photo-row > div {
  display: grid;
  gap: 4px;
}
.profile-photo-row small {
  color: var(--muted);
  font-size: 11px;
}
.profile-photo-button {
  display: inline-flex !important;
  width: max-content;
  margin-top: 5px;
  font-size: 12px !important;
  cursor: pointer;
}
@media (min-width: 641px) {
  header {
    display: none;
  }
}
@media (max-width: 640px) {
  .sidebar nav {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 3px;
  }
  .sidebar .profile-nav {
    margin-top: 0;
  }
  .profile-photo-row {
    align-items: flex-start;
  }
}

/* Guest players are a third, deliberately separate roster group. */
.guest-roster-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.guest-roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.guest-roster-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}
.roster-group-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eeeaff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
}
.guest-add-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
}
.guest-roster-list {
  display: grid;
}
.guest-roster-empty {
  margin: 18px 0 2px;
}
.guest-roster-row {
  grid-template-columns: 44px minmax(180px, 1fr) minmax(0, 1fr) auto !important;
  align-items: center;
}
.guest-roster-row .roster-details {
  justify-self: end;
  justify-content: flex-end;
}
.guest-roster-row .roster-row-actions {
  justify-self: end;
}
@media (max-width: 640px) {
  .guest-roster-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
  }
  .guest-add-button {
    width: 100%;
  }
  .guest-roster-row {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
    gap: 12px;
    padding: 18px 4px;
  }
  .guest-roster-row > .avatar {
    grid-column: 1;
    grid-row: 1;
  }
  .guest-roster-row > .roster-identity {
    grid-column: 2;
    grid-row: 1;
  }
  .guest-roster-row > .roster-details {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    justify-content: flex-start;
  }
  .guest-roster-row > .roster-row-actions {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    justify-content: flex-start;
    width: auto;
  }
}
/* The dialog is the scroll container; its close control stays reachable. */
dialog {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.modal-form > .modal-close {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  margin: -14px -14px -22px auto;
  background: #eff3ef;
  box-shadow: 0 2px 10px #10251818;
}
.modal-form > .modal-close + .eyebrow {
  padding-right: 50px;
}
.calendar-link-actions .calendar-regenerate {
  width: auto;
  margin: 0;
}
.calendar-link-actions {
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .calendar-link-actions .calendar-regenerate {
    flex-basis: auto;
    text-align: center;
  }
}
.profile-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.event-guest-remove {
  flex: 0 0 auto;
  width: 38px;
  min-height: 38px;
  border: 1px solid #f0cbc5;
  border-radius: 9px;
  background: #fff8f7;
  color: #b65248;
  font: 700 22px/1 Manrope;
  cursor: pointer;
}
.event-player-row:has(.event-guest-remove) {
  grid-template-columns: 40px minmax(0, 1fr) minmax(150px, 220px) 38px;
}
.event-player-row:has(.event-guest-remove) .event-attendance-select {
  width: 100%;
}
.guest-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eeeaff;
  color: #5146d8;
  font: 700 10px Manrope;
  font-style: normal;
  vertical-align: middle;
}
.guest-attendance-group {
  padding-top: 2px;
}
.event-add-guests-button {
  display: inline-flex;
  margin: 10px 3px 0;
  color: #5d53cf;
  font-size: 12px;
}
#eventGuestModal {
  width: min(560px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  overflow: hidden;
}
.event-guest-form {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.event-guest-picker-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.event-guest-choice {
  display: grid !important;
  grid-template-columns: auto 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  min-width: 0;
}
.event-guest-choice .avatar {
  width: 36px;
  height: 36px;
  font-size: 11px;
}
.event-guest-choice span:last-child {
  display: grid;
  gap: 2px;
}
.event-guest-choice small {
  color: var(--muted);
}
@media (max-width: 640px) {
  .event-player-row:has(.event-guest-remove) {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
  }
  .event-player-row:has(.event-guest-remove) .event-attendance-select {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }
  .event-player-row:has(.event-guest-remove) .event-guest-remove {
    grid-column: 3;
    grid-row: 2;
  }
  #eventGuestModal {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
}
.button.danger {
  background: #fff7f7;
  border: 1px solid #f1cecb;
  color: #b64f49;
  box-shadow: none;
}
.button.danger:hover {
  background: #ffeded;
}
.selection-settings-card h2 {
  margin: 6px 0;
  font-size: 18px;
}
.setting-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  cursor: pointer;
}
.setting-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.setting-switch span {
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 999px;
  background: #d9d4ed;
  transition: background 0.18s ease;
}
.setting-switch span::after {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #20174b33;
  transition: transform 0.18s ease;
}
.setting-switch input:checked + span {
  background: var(--green);
}
.setting-switch input:checked + span::after {
  transform: translateX(18px);
}
.setting-switch input:disabled + span {
  opacity: 0.55;
}
.event-selection {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #ddd8f0;
  border-radius: 12px;
  background: #fff;
}
.event-selection > p {
  margin: 0 0 12px;
  font-size: 12px;
}
.event-selection-list {
  display: grid;
  gap: 7px;
}
.event-selection-player {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.event-selection-player.selected {
  border-color: #a9a2ef;
  background: #f4f2ff;
}
.event-selection-player input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.event-selection-player span,
.event-selection-player small {
  display: grid;
}
.event-selection-player b {
  font-size: 13px;
}
.event-selection-player small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.selection-warning {
  color: #a64942;
  background: #fff1ef;
  padding: 9px 10px;
  border-radius: 8px;
}
.selection-note-label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 700;
}
.selection-note-label textarea {
  min-height: 70px;
  resize: vertical;
  border: 1px solid var(--control-border);
  border-radius: 9px;
  padding: 9px;
  font: inherit;
}
.selection-readonly {
  background: #f8f7ff;
}
.selection-readonly small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.selection-readonly-list {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 0 0 10px;
  list-style: none;
}
.selection-readonly-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.selection-status {
  white-space: nowrap;
  font-size: 12px;
}
.selection-status.selected {
  color: #276841;
}
.selection-status.not-selected {
  color: #a44842;
}
@media (max-width: 640px) {
  .setting-switch {
    align-self: flex-start;
  }
  .event-selection {
    padding: 12px;
  }
}
.profile-nav-avatar {
  display: inline-grid !important;
  place-items: center;
  width: 25px !important;
  height: 25px;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
  background: #eeeaff;
}
.profile-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 640px) {
  .profile-intro .profile-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .profile-top-actions .button {
    width: 100%;
  }
  .profile-nav-avatar {
    width: 22px !important;
    height: 22px;
  }
}
.sidebar nav .profile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 4px 0;
  padding: 13px 12px;
  border-top: 1px solid #ffffff1c;
}
.sidebar nav .profile-nav .profile-nav-avatar {
  flex: 0 0 34px;
  width: 34px !important;
  height: 34px;
  margin: 0;
}
.sidebar nav .profile-nav:hover,
.sidebar nav .profile-nav.active {
  background: #ffffff1c;
}
@media (max-width: 640px) {
  .sidebar nav .profile-nav {
    display: flex;
    margin: 0;
    padding: 5px 2px;
    border-top: 0;
    gap: 1px;
  }
  .sidebar nav .profile-nav .profile-nav-avatar {
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px;
  }
}

/* Personal data of linked members belongs to their Squadigo account. */
#playerProfileModal .account-managed-field input:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: #7a817d;
  background: #f1f3f1;
  border-color: #dce1dc;
  box-shadow: none;
}

#playerProfileModal .matchsheet-identity-fields {
  display: grid;
  gap: 12px;
  margin: 8px 0 2px;
  padding: 14px;
  border: 1px solid #e5ddff;
  border-radius: 10px;
  background: #faf9ff;
}
#playerProfileModal .matchsheet-identity-note {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #525866;
  font-size: 11px;
  line-height: 1.45;
}
#playerProfileModal .matchsheet-identity-note b {
  font-size: 12px;
  color: var(--ink);
}
/* Optional club layer. It deliberately uses the same compact card language as
   team settings and remains absent for users without a club role. */
.club-workspace{display:grid;gap:18px}.club-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.club-toolbar select{min-width:240px}.club-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.club-list{display:grid;gap:9px;margin-top:14px}.club-list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e7ece8}.club-list-row:last-child{border-bottom:0}.club-list-row small{display:block;color:#7d8981;margin-top:3px}.club-plan-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.club-empty{padding:18px;border:1px dashed #d6e2d8;border-radius:12px;color:#748177;background:#fbfdfb}.club-only[hidden]{display:none!important}@media(max-width:720px){.club-grid{grid-template-columns:1fr}.club-toolbar{align-items:stretch}.club-toolbar select,.club-toolbar .button{width:100%}.club-list-row{align-items:flex-start;flex-direction:column}.club-plan-actions{width:100%}}
