.match-reports-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(8, 26, 14, .75), rgba(10, 15, 12, .9)),
    url("/images/soccerfield.jpg") center / cover fixed;
}

.match-reports-page button { font: inherit; cursor: pointer; }
.match-reports-page .button,
.match-reports-page .secondary-button {
  min-height: 42px;
  margin-top: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  font-weight: 750;
}
.match-reports-page .button { background: var(--green); color: var(--white); }
.match-reports-page .secondary-button { background: #e9eee9; color: #142018; }
.match-reports-page .secondary-button:hover,
.match-reports-page .secondary-button:focus-visible { background: #c9d6cb; }

.match-reports-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 72px;
}

.match-reports-heading,
.report-editor-title-row,
.report-library-toolbar,
.report-events-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.match-reports-heading h1,
.report-editor-title-row h2,
.report-preview-heading h2 {
  margin: 0;
}

.match-reports-heading p:not(.eyebrow) {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted-light);
}

.match-reports-actions,
.report-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-reports-actions { justify-content: flex-end; }

.report-status {
  min-height: 1.5rem;
  margin: 14px 0 0;
  color: var(--lime);
  font-size: .92rem;
  font-weight: 650;
}

.match-reports-layout {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(420px, 1.7fr) minmax(260px, .82fr);
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}

.report-library,
.report-editor-card,
.report-preview-card {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: rgba(20, 26, 22, .92);
  box-shadow: var(--shadow);
}

.report-library,
.report-preview-card { padding: 18px; }
.report-editor-card { padding: clamp(20px, 3vw, 32px); }

.report-library-toolbar { align-items: baseline; }
.report-library-toolbar span { color: var(--muted-light); font-size: .84rem; }

.report-list {
  display: grid;
  gap: 7px;
  max-height: 620px;
  margin: 14px 0 18px;
  overflow-y: auto;
  padding-right: 3px;
}

.report-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.report-list-item {
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--white);
  background: rgba(255,255,255,.06);
  text-align: left;
  cursor: pointer;
}

.report-list-item:hover,
.report-list-item:focus-visible,
.report-list-item.is-selected { border-color: var(--lime); background: rgba(151,220,115,.15); }
.report-list-item strong,
.report-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-list-item small { margin-top: 2px; color: var(--muted-light); font-size: .76rem; }

.delete-report-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #ffd0ca;
  background: transparent;
  cursor: pointer;
}
.delete-report-button:hover,
.delete-report-button:focus-visible { background: rgba(255, 82, 73, .2); }

.report-library-actions { flex-direction: column; }
.report-library-actions p { margin: 2px 0 0; color: var(--muted-light); font-size: .78rem; line-height: 1.4; }

.report-editor-title-row { align-items: center; margin-bottom: 24px; }

.report-editor-card fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.report-editor-card legend,
.report-events-heading legend { padding: 0; font-size: 1.02rem; font-weight: 800; }

.report-form-grid,
.report-team-grid { display: grid; gap: 14px; margin-top: 12px; }
.report-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.report-editor-card label { display: grid; gap: 6px; color: var(--white); font-size: .86rem; font-weight: 700; }
.report-editor-card input,
.report-editor-card select,
.report-editor-card textarea,
.report-event-row input,
.report-event-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 9px;
  color: var(--white);
  background: rgba(255,255,255,.08);
  font: inherit;
}
.report-editor-card input,
.report-editor-card textarea { padding: 8px 10px; }
.report-editor-card select { padding: 0 8px; }
.report-editor-card textarea { min-height: 120px; resize: vertical; }

.report-team-card { padding: 15px; border-radius: 12px; background: rgba(255,255,255,.055); }
.report-team-card h3 { margin: 0 0 12px; font-size: .94rem; }
.report-team-card label + label { margin-top: 10px; }

.report-events-heading { align-items: center; }
.report-events { display: grid; gap: 8px; margin-top: 12px; }
.report-event-row { display: grid; grid-template-columns: 1.05fr .8fr .62fr .72fr minmax(120px, 1.4fr) auto; gap: 7px; align-items: center; }
.report-event-row input,
.report-event-row select { min-height: 38px; padding: 0 7px; font-size: .86rem; }
.report-event-row .delete-event-button { width: 38px; min-height: 38px; border: 0; border-radius: 8px; color: #ffd0ca; background: rgba(255,82,73,.16); cursor: pointer; }
.report-event-row .delete-event-button:hover,
.report-event-row .delete-event-button:focus-visible { background: rgba(255,82,73,.3); }
.no-events { margin: 2px 0; color: var(--muted-light); font-size: .88rem; }

.report-preview-card { position: sticky; top: 88px; max-height: calc(100vh - 106px); overflow: auto; }
.report-preview-heading { padding-bottom: 12px; border-bottom: 1px solid var(--border-dark); }
.report-preview { padding-top: 14px; }
.report-preview h3 { margin: 0; font-size: 1.02rem; }
.report-preview .preview-meta { margin: 3px 0 16px; color: var(--muted-light); font-size: .8rem; }
.preview-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 16px 0; padding: 13px 8px; border-radius: 10px; background: rgba(255,255,255,.06); text-align: center; }
.preview-score strong { font-size: 1.45rem; }
.preview-score span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.preview-score .score-divider { color: var(--muted-light); font-size: 1.1rem; }
.preview-section { margin-top: 18px; }
.preview-section h4 { margin: 0 0 7px; font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lime); }
.preview-event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .84rem; }
.preview-event time { color: var(--muted-light); font-variant-numeric: tabular-nums; }
.preview-note { margin: 0; white-space: pre-wrap; color: var(--muted-light); font-size: .86rem; }

@media (max-width: 1180px) {
  .match-reports-layout { grid-template-columns: minmax(220px, .7fr) minmax(420px, 1.6fr); }
  .report-preview-card { grid-column: 1 / -1; position: static; max-height: none; }
}

@media (max-width: 760px) {
  .match-reports-shell { width: min(100% - 28px, 1440px); padding-top: 34px; }
  .match-reports-heading,
  .report-editor-title-row { align-items: stretch; flex-direction: column; }
  .match-reports-actions { justify-content: flex-start; }
  .match-reports-layout { grid-template-columns: 1fr; gap: 16px; }
  .report-library { order: 1; }
  .report-editor-card { order: 2; }
  .report-preview-card { grid-column: auto; order: 3; }
  .report-list { max-height: 280px; }
  .report-form-grid,
  .report-team-grid { grid-template-columns: 1fr; }
  .report-event-row { grid-template-columns: 1fr 1fr; }
  .report-event-row .delete-event-button { grid-column: 2; justify-self: end; }
}
