:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --orange: #ea580c;
  --purple: #7c3aed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f8fafc;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.18);
}

.topbar__inner,
.brand,
.nav,
.section-heading,
.panel__header,
.hero__actions,
.nav a,
.nav-button {
  display: flex;
  align-items: center;
}

.topbar__inner {
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand {
  gap: 12px;
}

.brand__logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 5px;
  border-radius: 50%;
  background: #fff;
}

.brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 1.1rem;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #dbeafe;
}

.nav {
  gap: 8px;
}

.nav a,
.nav-button {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #e0ecff;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.nav a:hover,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav form {
  margin: 0;
}

.nav svg,
.button svg,
.mini-button svg,
.tool-card svg,
.document-card svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button,
.mini-button,
.nav a,
.nav-button {
  gap: 8px;
}

.page {
  flex: 1;
  padding: 28px 0 52px;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
  background: #eff6ff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 30px;
}

.hero__copy,
.login-panel,
.panel,
.stat-card,
.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hero__copy {
  padding: clamp(28px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(29, 78, 216, 0.78)),
    url("/static/logo.png") right 32px center / 260px no-repeat;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bfdbfe;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.page-title {
  max-width: none;
  margin-bottom: 6px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.hero__copy p:not(.eyebrow) {
  max-width: 570px;
  color: #eaf2ff;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero__actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button {
  min-height: 42px;
  padding: 0 16px;
}

.button--primary {
  color: #fff;
  background: var(--blue);
}

.button--primary:hover {
  background: var(--blue-dark);
}

.button--ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.login-panel {
  padding: 24px;
}

.login-panel h2,
.section-heading h2,
.panel h3 {
  margin-bottom: 6px;
}

.form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #bfdbfe;
  border-color: var(--blue);
}

textarea {
  resize: vertical;
}

.section,
.panel {
  margin-top: 24px;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.stat-card {
  padding: 18px;
}

.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.stat-card strong {
  display: block;
  margin: 5px 0;
  font-size: 2rem;
  line-height: 1;
}

.stat-card:nth-child(1) small,
.stat-card:nth-child(6) small {
  color: var(--orange);
}

.stat-card:nth-child(2) small {
  color: var(--blue);
}

.stat-card:nth-child(3) small,
.stat-card:nth-child(5) small {
  color: var(--purple);
}

.stat-card:nth-child(4) small {
  color: var(--green);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.tool-card {
  display: grid;
  gap: 10px;
  min-height: 96px;
  padding: 16px;
  border-width: 2px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.tool-card {
  border-style: solid;
}

[hidden] {
  display: none !important;
}

.tool-card span {
  color: var(--blue);
}

.tool-card span svg {
  width: 26px;
  height: 26px;
}

.tool-card.active,
.tool-card:hover {
  border-color: var(--blue);
  background: #eff6ff;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  padding: 22px;
}

.panel__header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel__header h3 {
  margin-bottom: 0;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pill {
  color: #1e40af;
  background: #dbeafe;
}

.status--ok {
  color: #15803d;
  background: #dcfce7;
}

.status--wait {
  color: #c2410c;
  background: #ffedd5;
}

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

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.list-row strong,
.list-row span,
.list-row small {
  display: block;
}

.list-row span {
  margin-top: 3px;
  color: #4b5563;
}

.list-row small {
  margin-top: 4px;
  color: var(--muted);
}

.registration-details {
  margin-top: 10px;
  color: #374151;
  font-size: 0.9rem;
}

.registration-details summary {
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.registration-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}

.registration-detail-grid span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.registration-detail-grid strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.registration-detail-grid a {
  color: var(--blue);
  font-weight: 700;
}

.mini-button {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  background: var(--green);
}

.mini-button--blue {
  background: var(--blue);
}

.mini-button--muted {
  color: #374151;
  background: #e5e7eb;
}

.mini-button--danger {
  background: #dc2626;
}

.event-form {
  display: grid;
  gap: 12px;
}

.event-form--new {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.event-form h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

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

.event-card,
.player-admin-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compact-card {
  box-shadow: none;
}

.compact-card .player-card-summary {
  min-height: 52px;
}

.compact-card .player-card-basics h3 {
  font-size: 0.98rem;
}

.compact-card .player-card-basics span,
.compact-card .player-card-basics small {
  font-size: 0.86rem;
}

.event-card.is-editing,
.player-admin-card.is-editing {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.event-card input:disabled,
.event-card select:disabled,
.event-card textarea:disabled,
.player-admin-card input:disabled,
.player-admin-card select:disabled,
.player-admin-card textarea:disabled {
  color: #374151;
  background: #f9fafb;
  opacity: 1;
}

.event-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.event-delete-form {
  margin-top: -4px;
}

.event-live-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.event-live-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.calendar-month {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-month h3 {
  margin: 0;
  font-size: 0.95rem;
}

.calendar-event {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid #eef2f7;
}

.calendar-event strong,
.calendar-event span,
.calendar-event small {
  overflow-wrap: anywhere;
}

.calendar-event strong {
  font-size: 0.82rem;
}

.calendar-event small {
  color: var(--muted);
}

.performance-strip {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nomination-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.nomination-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.nomination-card span {
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 800;
}

.nomination-card strong,
.nomination-card small {
  overflow-wrap: anywhere;
}

.nomination-card small {
  color: var(--muted);
}

.event-player-list {
  display: grid;
  gap: 12px;
}

.event-player-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(2, minmax(120px, 0.8fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.event-player-row > strong {
  align-self: center;
}

.event-player-row textarea {
  min-height: 42px;
}

.match-event-feed {
  display: grid;
  gap: 8px;
}

.match-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.match-event-row strong,
.match-event-row small {
  display: block;
}

.match-event-row small {
  margin-top: 3px;
  color: var(--muted);
}

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

.document-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.document-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--blue);
  background: #eff6ff;
}

.document-card h2,
.document-card h3 {
  margin: 10px 0 6px;
  font-size: 1.05rem;
}

.document-card p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
}

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

.document-viewer .panel__header {
  align-items: flex-start;
}

.document-viewer .panel__header p {
  margin-bottom: 0;
  color: var(--muted);
}

.pdf-viewer {
  width: 100%;
  min-height: 75vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.docx-preview {
  max-width: 820px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.docx-preview p {
  margin-bottom: 12px;
  color: #1f2937;
  line-height: 1.65;
}

.docx-preview p:first-child {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.team-roster {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-roster__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.roster-list span:not(.muted) {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 0.84rem;
  font-weight: 700;
}

.team-schedule {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.team-event-group__title,
.team-event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-event-group__title {
  color: #374151;
}

.team-event-list {
  display: grid;
  gap: 8px;
}

.team-event-item {
  min-height: 48px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.team-event-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-event-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.team-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.event-location-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.event-location-panel p {
  margin: 0;
  color: #1e3a8a;
  font-weight: 700;
}

.event-location-panel iframe {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 8px;
  background: #dbeafe;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 0.82rem;
  font-weight: 800;
}

.player-contact-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.player-contact-summary span {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #4b5563;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.player-contact-summary strong {
  color: var(--ink);
  font-size: 0.78rem;
}

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

.player-admin-photo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-admin-photo img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #d1d5db;
}

.player-admin-photo .avatar-fallback {
  width: 72px;
  height: 72px;
}

.player-card-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.player-card-basics {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.player-card-basics h3 {
  margin: 0;
  font-size: 1rem;
}

.player-card-basics span,
.player-card-basics small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.player-card-basics span {
  font-weight: 700;
}

.player-card-details {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.player-admin-card.is-open {
  border-color: #93c5fd;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: #374151;
  background: #f9fafb;
  font-size: 0.85rem;
}

.table-photo,
.avatar-fallback {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.table-photo {
  display: block;
  object-fit: cover;
  border: 2px solid #d1d5db;
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  color: #9ca3af;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
}

.avatar-fallback svg {
  width: 24px;
  height: 24px;
}

.warning-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  background: #fff7ed;
}

.warning-banner span {
  flex: 0 0 auto;
  color: var(--orange);
}

.warning-banner svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warning-banner p {
  margin: 4px 0 0;
  color: #c2410c;
  font-size: 0.92rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.photo-section {
  margin-top: 18px;
}

.upload-panel h2 {
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.upload-panel p {
  margin-bottom: 0;
  color: #1e40af;
  line-height: 1.5;
}

.upload-panel__form {
  display: grid;
  gap: 12px;
}

.drop-zone-large {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 20px;
  border: 2px dashed #60a5fa;
  border-radius: 8px;
  color: #1d4ed8;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.drop-zone-large:hover,
.drop-zone-large.file-field--drag {
  border-color: var(--blue);
  background: #dbeafe;
  transform: translateY(-1px);
}

.drop-zone-large.file-field--error {
  border-color: var(--orange);
  color: #c2410c;
  background: #fff7ed;
}

.drop-zone-large__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
}

.drop-zone-large svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-zone-large small {
  color: #1e40af;
  overflow-wrap: anywhere;
}

.drop-zone-large input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.filter-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: #374151;
  background: #e5e7eb;
  font-weight: 700;
}

.filter-button:hover,
.filter-button.active {
  color: #fff;
  background: var(--blue);
}

.filter-button--green.active {
  background: var(--green);
}

.filter-button--orange.active {
  background: var(--orange);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.empty-panel {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.empty-panel p {
  margin: 5px 0 0;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.photo-frame {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  background: #f3f4f6;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  color: #9ca3af;
}

.photo-empty svg {
  width: 76px;
  height: 76px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-status {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
}

.photo-status svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-status--warning {
  background: var(--orange);
}

.photo-status--ok {
  background: var(--green);
}

.photo-card__body {
  padding: 16px;
}

.photo-card__body h2 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.photo-card__body p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.photo-card__body small {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.text-orange {
  color: var(--orange) !important;
  font-weight: 700;
}

.upload-form {
  display: grid;
  gap: 8px;
}

.file-field {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 10px;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  color: #374151;
  background: #f9fafb;
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.file-field--drag {
  border-color: var(--blue);
  color: #1d4ed8;
  background: #eff6ff;
}

.file-field--error {
  border-color: var(--orange);
  color: #c2410c;
  background: #fff7ed;
}

.file-field svg {
  width: 17px;
  height: 17px;
  margin-right: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-name {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.upload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.upload-progress__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.upload-progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 160ms ease;
}

.upload-progress strong {
  min-width: 112px;
  color: #374151;
  font-size: 0.82rem;
  text-align: right;
}

.footer {
  margin-top: auto;
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.auth-body {
  min-height: 100vh;
  background: var(--page);
}

.auth-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 24px;
  width: min(1060px, calc(100% - 32px));
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  padding: 42px 0;
  align-items: center;
}

.auth-hero,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.auth-hero {
  min-height: 560px;
  padding: clamp(30px, 5vw, 58px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(29, 78, 216, 0.82)),
    url("/static/logo.png") right 28px bottom 22px / 280px no-repeat;
}

.auth-brand {
  margin-bottom: 58px;
}

.auth-hero h1 {
  margin-bottom: 16px;
}

.auth-hero p:not(.eyebrow) {
  max-width: 540px;
  color: #eaf2ff;
  font-size: 1.05rem;
  line-height: 1.65;
}

.auth-card {
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
}

.auth-card--wide {
  align-self: stretch;
}

.muted {
  color: var(--muted);
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 700;
}

.member-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(22, 163, 74, 0.72)),
    url("/static/logo.png") right 28px center / 210px no-repeat;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.member-hero p {
  margin-bottom: 0;
  color: #eaf2ff;
}

.member-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #14532d;
  background: #dcfce7;
  font-weight: 800;
  text-transform: capitalize;
}

@media (max-width: 920px) {
  .hero,
  .content-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-hero {
    min-height: 380px;
  }

  .member-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tool-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .upload-panel {
    grid-template-columns: 1fr;
  }

  .player-admin-grid {
    grid-template-columns: 1fr;
  }

  .player-card-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-card-summary [data-player-toggle] {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }

  .event-player-row {
    grid-template-columns: 1fr;
  }

  .match-event-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-event-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-event-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar__inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero__copy {
    padding: 30px 20px;
    background:
      linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.88)),
      url("/static/logo.png") right -45px bottom -45px / 210px no-repeat;
  }

  .form-grid,
  .stats-grid,
  .tool-grid {
    grid-template-columns: 1fr 1fr;
  }

  .list-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .event-form-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    width: min(100% - 20px, 1060px);
    padding: 22px 0;
  }

  .auth-hero {
    min-height: 320px;
    padding: 28px 20px;
    background:
      linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(29, 78, 216, 0.9)),
      url("/static/logo.png") right -42px bottom -48px / 220px no-repeat;
  }

  .auth-brand {
    margin-bottom: 32px;
  }
}
