@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --red: #ed1b2f;
  --red-dark: #b70e1f;
  --black: #08090b;
  --ink: #17181c;
  --muted: #777b83;
  --line: #e8e8eb;
  --bg: #f5f5f6;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}
button { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 250px;
  background: var(--black);
  color: white;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
  border-bottom: 1px solid #25272b;
}
.logo { width: 52px; height: 52px; object-fit: contain; }
.brand-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .05em;
}
.brand-subtitle {
  font-size: 10px;
  letter-spacing: .15em;
  color: #bfc0c4;
  margin-top: 1px;
}

.nav { padding-top: 24px; display: grid; gap: 6px; }
.nav-item {
  border: 0;
  background: transparent;
  color: #aeb0b5;
  text-align: left;
  padding: 13px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.nav-item:hover { background: #17191d; color: white; }
.nav-item.active {
  background: var(--red);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #25272b;
  padding: 20px 8px 4px;
}
.season-label, .panel-kicker, .eyebrow, .hero-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}
.season-label { color: #777b83; }
.season { margin-top: 6px; font-weight: 600; }

.main {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 30px 38px 50px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.eyebrow { color: var(--red); margin-bottom: 3px; }
h1, h2, h3 { margin: 0; }
h1, h2, h3 {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: -.01em;
}
h1 { font-size: 38px; }
h2 { font-size: 36px; }
h3 { font-size: 23px; }

.coach-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  padding: 7px 13px 7px 7px;
  border-radius: 999px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: white;
  display: grid; place-items: center; font-weight: 700;
}
.coach-chip strong, .coach-chip span { display: block; }
.coach-chip span { font-size: 11px; color: var(--muted); margin-top: 2px; }

.hero {
  background: var(--black);
  color: white;
  border-radius: 16px;
  padding: 34px 38px;
  min-height: 205px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: var(--red);
  opacity: .08;
  right: -110px; top: -120px;
}
.hero-kicker { color: #ff5a69; }
.hero h2 { font-size: 52px; margin: 8px 0 7px; }
.hero p { max-width: 600px; color: #bfc0c4; margin: 0; line-height: 1.6; }
.hero-logo { width: 150px; height: 150px; object-fit: contain; z-index: 1; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.stat-card, .panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.stat-card { padding: 20px; }
.stat-card span { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--muted); }
.stat-card strong { display: block; font-family: "Barlow Condensed"; font-size: 36px; margin: 7px 0 1px; }
.stat-card small { color: var(--muted); }

.content-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
}
.panel { padding: 22px; }
.panel-header, .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-kicker { color: var(--red); margin-bottom: 4px; }
.small-button, .primary-button {
  border: 0; border-radius: 7px; cursor: pointer;
  font-weight: 700;
}
.small-button {
  background: #f0f0f2; padding: 9px 12px; font-size: 12px;
}
.primary-button {
  background: var(--red); color: white; padding: 11px 15px;
}
.empty-state {
  min-height: 185px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 5px;
  color: var(--muted);
}
.empty-state strong { color: var(--ink); }
.empty-icon { font-size: 30px; margin-bottom: 5px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.action-button {
  border: 1px solid var(--line); background: #fafafa;
  padding: 16px; border-radius: 9px; cursor: pointer;
  text-align: left; display: flex; align-items: center; gap: 10px;
}
.action-button:hover { border-color: var(--red); }
.action-button b { color: var(--red); font-size: 20px; }
.action-button span { font-weight: 600; font-size: 13px; }

.section { display: none; }
.section.active-section { display: block; }
.section-heading { margin-bottom: 22px; }
.empty-large {
  min-height: 360px; background: white; border: 1px dashed #d5d5d9;
  border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 7px;
  color: var(--muted);
}
.empty-large strong { color: var(--ink); font-size: 17px; }

.pitch {
  max-width: 760px; margin: 0 auto;
  background: #ececec; border-radius: 15px; padding: 25px;
  text-align: center;
}
.pitch-title { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--red); }
.pitch-grid {
  margin: 22px auto 15px; max-width: 550px;
  min-height: 410px; border: 3px solid #fff; border-radius: 10px;
  background: #c9c9c9; display: grid;
  grid-template-columns: repeat(5, 1fr); gap: 12px;
  padding: 55px 30px; align-items: center;
}
.pitch-grid div {
  background: white; border-radius: 50%; width: 43px; height: 43px;
  display: grid; place-items: center; margin: auto;
  font-family: "Barlow Condensed"; font-size: 20px; font-weight: 700;
  box-shadow: 0 2px 7px #0002;
}
.pitch p { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .sidebar { width: 76px; padding: 20px 10px; }
  .brand { justify-content: center; padding: 0 0 20px; }
  .brand > div { display: none; }
  .logo { width: 48px; height: 48px; }
  .nav-item { font-size: 0; text-align: center; padding: 14px 4px; }
  .nav-item::first-letter { font-size: 18px; }
  .sidebar-footer { display: none; }
  .main { margin-left: 76px; width: calc(100% - 76px); padding: 22px; }
  .stats-grid, .content-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .topbar { align-items: flex-start; }
  .coach-chip { display: none; }
  .hero { padding: 26px; }
  .hero h2 { font-size: 39px; }
  .hero-logo { width: 90px; height: 90px; }
  .stats-grid, .content-grid { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
}


.welcome-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 20px;
}
.welcome-row h2 { font-size: 38px; }
.muted { color: var(--muted); margin: 4px 0 0; }
.season-switcher {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 600;
}
.season-switcher span { margin-left: 10px; color: var(--muted); }

.hero { min-height: 230px; }
.hero h2 { letter-spacing: .02em; }
.hero h2 span { color: #777; font-size: .58em; vertical-align: middle; margin: 0 4px; }
.match-meta { display: flex; gap: 9px; flex-wrap: wrap; color: #d2d2d5; font-size: 13px; }
.match-meta b { color: white; }
.hero-actions { display: flex; gap: 9px; margin-top: 22px; }
.dark-button {
  border: 1px solid #45474c; color: white; background: transparent;
  padding: 10px 14px; border-radius: 7px; cursor: pointer; font-weight: 600;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 18px;
}
.lower-grid { margin-top: 18px; }
.calendar-list { margin-top: 15px; }
.calendar-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 13px; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.date-box {
  width: 45px; height: 45px; background: #f1f1f2;
  border-radius: 7px; display: grid; place-items: center;
  line-height: 1;
}
.date-box b { font-family: "Barlow Condensed"; font-size: 22px; }
.date-box span { font-size: 8px; font-weight: 700; letter-spacing: .1em; color: var(--red); }
.calendar-item strong, .calendar-item small { display: block; }
.calendar-item small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.calendar-item em {
  font-style: normal; font-size: 8px; font-weight: 800; letter-spacing: .1em;
  padding: 6px 7px; border-radius: 5px;
}
.match-tag { color: var(--red); background: #fdecef; }
.practice-tag { color: #555; background: #eeeeef; }

.empty-state.compact { min-height: 125px; }
.note {
  display: flex; gap: 11px; padding: 12px 0;
  border-top: 1px solid var(--line);
}
.note-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.note strong, .note span { display: block; }
.note strong { font-size: 12px; }
.note span { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 3px; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .welcome-row { align-items: flex-start; gap: 10px; }
  .season-switcher { display: none; }
  .hero h2 { font-size: 34px; }
  .match-meta { display: block; line-height: 1.7; }
  .match-meta span { margin: 0 4px; }
  .calendar-item { grid-template-columns: 52px 1fr; }
  .calendar-item em { display: none; }
}


.roster-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.search-box, .filter-button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 12px;
}
.search-box { flex: 1; color: #aaa; }
.filter-button { cursor: pointer; color: #444; }
.roster-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.roster-summary > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 17px;
}
.roster-summary span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .13em; color: var(--muted); }
.roster-summary strong { display: block; font-family: "Barlow Condensed"; font-size: 30px; margin-top: 4px; }
.red-number { color: var(--red); }
.roster-table { padding: 0; overflow: hidden; }
.table-row {
  display: grid;
  grid-template-columns: 2.2fr .8fr 1fr .8fr 1.2fr .25fr;
  align-items: center;
  min-height: 68px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.table-head {
  min-height: 40px;
  background: #f8f8f9;
  border-top: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.player-cell { display: flex; align-items: center; gap: 11px; }
.player-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #ececef; display: grid; place-items: center;
  font-family: "Barlow Condensed"; font-size: 18px; font-weight: 700;
}
.player-cell strong, .player-cell small { display: block; }
.player-cell small { color: var(--muted); margin-top: 2px; font-size: 10px; }
.status-pill {
  display: inline-block; padding: 5px 7px; border-radius: 5px;
  font-size: 9px; font-weight: 700;
}
.status-pill.neutral { background: #eeeeef; color: #666; }

@media (max-width: 700px) {
  .roster-summary { grid-template-columns: 1fr 1fr; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto; gap: 10px; padding: 12px 15px; }
  .table-row > div:not(.player-cell):not(:last-child) { display: none; }
  .roster-toolbar { flex-wrap: wrap; }
  .search-box { min-width: 100%; }
}


.player-row { cursor: pointer; transition: background .15s ease; }
.player-row:hover { background: #fafafa; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.62);
  display: none; align-items: center; justify-content: center;
  padding: 25px; z-index: 100;
}
.modal-backdrop.open { display: flex; }
.player-modal {
  background: #f5f5f6; width: min(850px, 100%); max-height: 90vh;
  overflow-y: auto; border-radius: 16px; position: relative; padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 15px; right: 17px; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: #eeeeef; font-size: 24px;
  line-height: 1; cursor: pointer; color: #555;
}
.profile-header {
  background: var(--black); color: white; border-radius: 12px; padding: 25px;
  display: flex; align-items: center; gap: 16px; margin-bottom: 15px;
}
.profile-avatar {
  width: 70px; height: 70px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; font-family: "Barlow Condensed";
  font-size: 27px; font-weight: 700;
}
.profile-header h2 { font-size: 37px; margin: 3px 0; }
.profile-subtitle { color: #c7c8cc; font-size: 12px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.profile-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 15px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; margin-top: 16px; }
.info-grid span, .mini-stats span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.info-grid strong { display: block; margin-top: 3px; font-size: 13px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 17px; }
.mini-stats strong { display: block; font-family: "Barlow Condensed"; font-size: 27px; margin-bottom: 2px; }
.profile-card-header { display: flex; align-items: center; justify-content: space-between; }
.profile-card-header h3 { margin-top: 2px; }
.profile-note {
  border-top: 1px solid var(--line); margin-top: 13px; padding-top: 13px;
  display: flex; gap: 9px;
}
.profile-note strong, .profile-note span { display: block; }
.profile-note strong { font-size: 12px; }
.profile-note span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.empty-history {
  border-top: 1px solid var(--line); margin-top: 13px; padding-top: 16px;
  color: var(--muted); font-size: 11px;
}
@media (max-width: 650px) {
  .modal-backdrop { padding: 10px; }
  .player-modal { padding: 18px; max-height: 94vh; }
  .profile-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .profile-header { padding: 20px; }
  .profile-header h2 { font-size: 30px; }
}


.form-modal { width: min(760px, 100%); }
.form-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; background: var(--black); color: white;
  border-radius: 12px; padding: 22px 24px; margin-bottom: 18px;
}
.form-modal-header h2 { font-size: 36px; margin: 2px 0 4px; }
.form-modal-header p { margin: 0; color: #bbbcc1; font-size: 11px; line-height: 1.5; max-width: 520px; }
.form-logo { width: 75px; height: 75px; object-fit: contain; }
.form-section {
  background: white; border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; margin-bottom: 14px;
}
.form-section-title {
  color: var(--red); font-size: 9px; font-weight: 800;
  letter-spacing: .14em; margin-bottom: 14px;
}
.form-grid { display: grid; gap: 13px; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
.form-section label, .full-label {
  display: block; font-size: 10px; font-weight: 700; color: #555;
}
.form-section input,
.form-section select,
.form-section textarea {
  width: 100%; margin-top: 6px; border: 1px solid #dcdce0;
  background: #fbfbfc; border-radius: 8px; padding: 11px 12px;
  font: inherit; font-size: 12px; color: var(--ink); outline: none;
}
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,27,47,.08);
}
.full-label { margin-top: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.secondary-button {
  border: 1px solid var(--line); background: white; color: #444;
  padding: 10px 14px; border-radius: 7px; cursor: pointer; font-weight: 700;
}
.player-row .status-pill.available { background: #e7f6ec; color: #24713c; }
.player-row .status-pill.unavailable { background: #f6e8e8; color: #9a3232; }
.player-row .status-pill.limited { background: #fff4d9; color: #89630a; }
.player-row .status-pill.injured { background: #fdecef; color: var(--red); }

@media (max-width: 650px) {
  .form-grid.two-col { grid-template-columns: 1fr; }
  .form-modal-header { align-items: flex-start; }
  .form-logo { width: 55px; height: 55px; }
}


.lineup-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.format-toggle {
  display: inline-flex;
  background: #e9e9eb;
  border-radius: 9px;
  padding: 4px;
}
.format-button {
  border: 0;
  background: transparent;
  padding: 9px 18px;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
  color: #666;
}
.format-button.active {
  background: var(--red);
  color: white;
}
.lineup-match-info {
  display: flex;
  gap: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.lineup-match-info span,
.selected-position-box span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.lineup-match-info strong {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.lineup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 16px;
}
.pitch-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
}
.pitch-header,
.bench-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rugby-pitch {
  margin-top: 16px;
  min-height: 610px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to bottom,
      transparent 9%, rgba(255,255,255,.75) 9%, rgba(255,255,255,.75) 9.5%, transparent 9.5%,
      transparent 22%, rgba(255,255,255,.55) 22%, rgba(255,255,255,.55) 22.5%, transparent 22.5%,
      transparent 50%, rgba(255,255,255,.8) 50%, rgba(255,255,255,.8) 50.5%, transparent 50.5%,
      transparent 77%, rgba(255,255,255,.55) 77%, rgba(255,255,255,.55) 77.5%, transparent 77.5%,
      transparent 90%, rgba(255,255,255,.75) 90%, rgba(255,255,255,.75) 90.5%, transparent 90.5%
    ),
    #bfc5bf;
  border: 3px solid white;
  box-shadow: inset 0 0 0 1px #c9c9cc;
}
.pitch-position {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 92px;
  min-height: 54px;
  border: 0;
  background: white;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  padding: 7px 6px;
  cursor: pointer;
  text-align: center;
}
.pitch-position:hover,
.pitch-position.selected {
  outline: 3px solid rgba(237,27,47,.18);
  box-shadow: 0 0 0 2px var(--red), 0 4px 12px rgba(0,0,0,.16);
}
.pitch-position .position-number {
  display: block;
  font-family: "Barlow Condensed";
  font-weight: 800;
  font-size: 17px;
  color: var(--red);
}
.pitch-position .position-name {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-top: 1px;
}
.pitch-position .assigned-player {
  display: block;
  font-size: 9px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bench-area { margin-top: 18px; }
.bench-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.bench-slot {
  border: 1px dashed #cfd0d4;
  border-radius: 8px;
  background: #fafafa;
  min-height: 56px;
  padding: 8px;
  cursor: pointer;
}
.bench-slot.selected { border: 2px solid var(--red); }
.bench-slot span { display: block; }
.bench-slot .bench-number {
  font-size: 8px;
  font-weight: 800;
  color: var(--red);
}
.bench-slot .bench-player {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}
.selection-help {
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.selected-position-box {
  background: #f8f8f9;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 12px;
}
.selected-position-box strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.lineup-roster-list {
  display: grid;
  gap: 8px;
  max-height: 530px;
  overflow-y: auto;
}
.lineup-player {
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.lineup-player:hover { border-color: var(--red); }
.lineup-player.used { opacity: .45; }
.lineup-player .mini-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #eeeeef; display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
}
.lineup-player strong,
.lineup-player small { display: block; }
.lineup-player small { color: var(--muted); font-size: 9px; margin-top: 2px; }

.lineup-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  margin-top: 16px;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.role-grid label {
  font-size: 9px;
  font-weight: 700;
  color: #666;
}
.role-grid select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: white;
  font-size: 11px;
}
.lineup-status-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 12px;
}
.lineup-status-row strong {
  font-family: "Barlow Condensed";
  font-size: 30px;
}
.lineup-status-row span {
  color: var(--muted);
  font-size: 10px;
}
.status-bar {
  height: 8px;
  background: #ececee;
  border-radius: 999px;
  margin-top: 9px;
  overflow: hidden;
}
.status-bar div {
  height: 100%;
  width: 0%;
  background: var(--red);
  transition: width .2s ease;
}
@media (max-width: 950px) {
  .lineup-layout { grid-template-columns: 1fr; }
  .lineup-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .lineup-topbar { align-items: stretch; flex-direction: column; }
  .lineup-match-info { justify-content: space-between; }
  .rugby-pitch { min-height: 560px; }
  .pitch-position { width: 76px; }
  .bench-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: 1fr; }
}


.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}
.schedule-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.schedule-tab {
  border: 1px solid var(--line);
  background: white;
  color: #555;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.schedule-tab.active {
  background: var(--black);
  color: white;
  border-color: var(--black);
}
.schedule-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.schedule-summary > div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 17px;
}
.schedule-summary span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  color: var(--muted);
}
.schedule-summary strong {
  display: block;
  margin-top: 4px;
  font-family: "Barlow Condensed";
  font-size: 30px;
}
.schedule-list {
  display: grid;
  gap: 12px;
}
.schedule-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 16px;
  align-items: center;
}
.schedule-date {
  width: 60px;
  min-height: 60px;
  border-radius: 10px;
  background: #f4f4f5;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}
.schedule-date strong {
  font-family: "Barlow Condensed";
  font-size: 28px;
}
.schedule-date span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--red);
}
.schedule-main h3 {
  margin-bottom: 4px;
  font-size: 22px;
}
.schedule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}
.schedule-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.event-tag {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}
.event-tag.match { background: #fdecef; color: var(--red); }
.event-tag.practice { background: #eceff5; color: #394b6b; }
.event-tag.travel { background: #eef5ea; color: #4b6c38; }
.event-tag.other { background: #f0f0f1; color: #666; }
.event-tag.format { background: #111; color: white; }
.event-tag.side { background: #fff5dc; color: #76560d; }

.schedule-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 120px;
}
.schedule-actions button {
  border: 1px solid var(--line);
  background: #fafafa;
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}
.schedule-actions button.primary-mini {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.empty-schedule {
  min-height: 280px;
  border: 1px dashed #d4d4d7;
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: white;
  padding: 30px;
}
.empty-schedule strong {
  color: var(--ink);
  display: block;
  margin-bottom: 5px;
}
.side-preview {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.side-preview div {
  flex: 1;
  background: #f8f8f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}
.side-preview span {
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--muted);
}
.side-preview strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .schedule-summary { grid-template-columns: 1fr 1fr; }
  .schedule-toolbar { align-items: flex-start; flex-direction: column; }
  .schedule-card { grid-template-columns: 60px 1fr; }
  .schedule-actions { grid-column: 1 / -1; flex-direction: row; }
}


.practice-toolbar { margin-bottom: 14px; }
.practice-filter {
  border: 1px solid var(--line); background: white; color: #555;
  border-radius: 8px; padding: 9px 12px; cursor: pointer; font-size: 11px; font-weight: 700;
}
.practice-filter.active { background: var(--black); color: white; border-color: var(--black); }
.practice-plan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.practice-plan-card {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; display: flex; flex-direction: column; min-height: 240px;
}
.practice-plan-card h3 { font-size: 22px; margin: 4px 0 5px; }
.practice-plan-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.practice-pill {
  background: #f1f1f2; color: #555; border-radius: 5px; padding: 5px 7px;
  font-size: 8px; font-weight: 800; letter-spacing: .08em;
}
.practice-objective { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 14px; }
.practice-block-preview {
  white-space: pre-line; font-size: 10px; line-height: 1.55; color: #444;
  padding-top: 10px; border-top: 1px solid var(--line); max-height: 92px; overflow: hidden;
}
.practice-card-actions { margin-top: auto; display: flex; gap: 7px; padding-top: 14px; }
.practice-card-actions button {
  flex: 1; border: 1px solid var(--line); background: #fafafa; border-radius: 7px;
  padding: 8px; cursor: pointer; font-size: 9px; font-weight: 700;
}

.stats-page-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px;
}
.stats-page-summary > div {
  background: white; border: 1px solid var(--line); border-radius: 10px; padding: 15px 17px;
}
.stats-page-summary span {
  display: block; font-size: 9px; font-weight: 800; letter-spacing: .13em; color: var(--muted);
}
.stats-page-summary strong {
  display: block; margin-top: 4px; font-family: "Barlow Condensed"; font-size: 30px;
}
.stats-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.stats-table { margin-top: 14px; }
.stats-table-row {
  display: grid; grid-template-columns: 2fr repeat(5, .7fr);
  gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 10px;
}
.stats-table-row.head {
  color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em;
}
.stats-match-log { margin-top: 12px; display: grid; gap: 8px; }
.stats-log-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px;
}
.stats-log-item strong, .stats-log-item span { display: block; }
.stats-log-item strong { font-size: 11px; }
.stats-log-item span { color: var(--muted); font-size: 9px; margin-top: 3px; }

.stats-modal-card { width: min(980px, 100%); }
.stats-entry-wrap {
  background: white; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin-bottom: 14px;
}
.stats-entry-head, .stats-entry-row {
  display: grid; grid-template-columns: 2fr repeat(5, .7fr); gap: 8px; align-items: center;
  padding: 9px 12px;
}
.stats-entry-head {
  background: #f8f8f9; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em;
}
.stats-entry-row { border-top: 1px solid var(--line); }
.stats-entry-row strong { font-size: 10px; }
.stats-entry-row input {
  width: 100%; border: 1px solid #dedee1; border-radius: 6px; padding: 7px 6px; font-size: 10px;
}

.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.settings-form { display: grid; gap: 12px; margin-top: 14px; }
.settings-form label { font-size: 9px; font-weight: 700; color: #666; }
.settings-form input {
  width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 11px;
}
.settings-copy { color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.upload-label { cursor: pointer; }
.danger-button {
  border: 1px solid #efc4c8; background: #fff4f5; color: #a31b2a; border-radius: 7px;
  padding: 9px 12px; cursor: pointer; font-size: 10px; font-weight: 700;
}
.deployment-checklist { display: grid; gap: 8px; margin-top: 14px; font-size: 10px; }
.deployment-checklist .done { color: #356b46; }
.deployment-checklist .pending { color: #8b6a17; }

.side-button {
  border: 0; background: transparent; padding: 9px 14px; border-radius: 7px;
  font-weight: 800; cursor: pointer; color: #666;
}
.side-button.active { background: var(--black); color: white; }

@media (max-width: 950px) {
  .practice-plan-grid { grid-template-columns: 1fr 1fr; }
  .stats-layout, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .practice-plan-grid, .stats-page-summary { grid-template-columns: 1fr 1fr; }
  .stats-entry-head, .stats-entry-row { grid-template-columns: 1.5fr repeat(5, .65fr); }
  .stats-entry-wrap { overflow-x: auto; }
}


.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(circle at 80% 15%, rgba(237,27,47,.18), transparent 32%),
    #08090b;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-screen.hidden { display: none; }
.login-card {
  width: min(420px, 100%);
  background: white;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 28px 80px rgba(0,0,0,.35);
}
.login-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
  margin-bottom: 18px;
}
.login-eyebrow {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}
.login-card h1 {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 42px;
  margin: 4px 0 6px;
}
.login-card > p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 22px;
}
.login-card form { display: grid; gap: 14px; }
.login-card label {
  font-size: 10px;
  font-weight: 700;
  color: #555;
}
.login-card input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #dcdce0;
  background: #fbfbfc;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-size: 12px;
}
.login-card input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(237,27,47,.08);
}
.login-button {
  border: 0;
  background: var(--red);
  color: white;
  border-radius: 8px;
  padding: 12px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 2px;
}
.login-message {
  min-height: 18px;
  color: #a31b2a;
  font-size: 10px;
  margin-top: 10px;
}
.login-security {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}
.logout-button {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  margin-right: 4px;
}


.sync-status {
  margin-left: auto;
  margin-right: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.sync-status.online { color: #2f7045; }
.sync-status.error { color: #a31b2a; }
@media (max-width: 700px) {
  .sync-status { display: none; }
}


.lineup-header-actions { display: flex; gap: 8px; }
.substitutions-panel { margin-top: 16px; }
.substitutions-list { display: grid; gap: 8px; margin-top: 10px; }
.sub-row {
  display: grid; grid-template-columns: 1fr auto 1fr auto;
  gap: 8px; align-items: center;
}
.sub-row select {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: white; font-size: 10px;
}
.sub-arrow { color: var(--muted); font-weight: 800; }
.sub-remove { border: 0; background: #f3f3f4; border-radius: 6px; cursor: pointer; padding: 7px 9px; }

.availability-panel, .attendance-panel { padding: 0; overflow: hidden; }
.availability-toolbar, .attendance-toolbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: end;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.availability-toolbar input, .attendance-toolbar input {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 11px;
}
.attendance-toolbar label { font-size: 9px; font-weight: 700; color: #666; flex: 1; }

.availability-table, .attendance-table { overflow-x: auto; }
.avail-row, .attendance-row {
  display: grid; align-items: center; gap: 8px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.avail-row { grid-template-columns: 1.6fr repeat(5, .8fr); }
.attendance-row { grid-template-columns: 1.8fr repeat(4, .7fr); }
.avail-row.head, .attendance-row.head {
  background: #f8f8f9; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em;
}
.avail-row strong, .attendance-row strong { font-size: 10px; }
.avail-row select, .attendance-row select {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 5px; font-size: 9px; background: white;
}

.scouting-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.scouting-card {
  background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px;
}
.scouting-card h3 { font-size: 22px; margin: 4px 0 10px; }
.scouting-card section { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.scouting-card section span {
  display: block; font-size: 8px; font-weight: 800; letter-spacing: .1em; color: var(--red); margin-bottom: 4px;
}
.scouting-card section p { margin: 0; color: #555; font-size: 10px; line-height: 1.5; white-space: pre-line; }
.scouting-card-actions { display: flex; gap: 7px; margin-top: 12px; }
.scouting-card-actions button { border: 1px solid var(--line); background: #fafafa; border-radius: 7px; padding: 7px 9px; font-size: 9px; cursor: pointer; }

@media (max-width: 900px) {
  .scouting-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .scouting-grid { grid-template-columns: 1fr; }
  .sub-row { grid-template-columns: 1fr; }
  .sub-arrow { display: none; }
}
