.page {
  display: grid;
  gap: 0.75rem;
}

.header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.header h1 {
  color: var(--ink-0);
  font-size: 1.3rem;
  font-weight: 800;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.projectPanel,
.loginPanel,
.createPanel,
.tablePanel {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.adminTabs {
  padding: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.adminTab {
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--panel-warm);
  color: var(--ink-1);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.adminTabActive {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.projectPanelHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.projectList {
  display: grid;
  gap: 0.6rem;
}

.projectItem {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf3;
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.predictionPanel {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.predictionPanel h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-0);
}

.predictionPanel h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-1);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.formGrid,
.createForm {
  display: grid;
  gap: 0.7rem;
}

.message {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #eef3e3;
  padding: 0.65rem 0.75rem;
  color: var(--ink-1);
}

.tableWrapper {
  overflow-x: auto;
}

.tablePanel table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.tablePanel th,
.tablePanel td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 0.6rem;
  vertical-align: top;
}

.tablePanel th {
  color: var(--ink-1);
}

.rowActions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.45rem;
  align-items: center;
}

.rowActions input {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.predictionActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-start;
}

.statusPill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink-1);
  font-weight: 700;
}

.predictionGrid {
  display: grid;
  gap: 0.7rem;
}

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

.wizardPanel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf3;
  padding: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.wizardHeader {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.stepPill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-1);
  padding: 0.32rem 0.7rem;
  font-weight: 700;
  font-size: 0.84rem;
}

.outcomeSummary {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.candidateList {
  display: grid;
  gap: 0.65rem;
}

.candidateCard {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.candidateHeader {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
}

.candidateMeta {
  color: var(--muted);
  font-size: 0.9rem;
}

.scoreInputs {
  display: grid;
  gap: 0.55rem;
}

.scoreInputRow {
  display: grid;
  gap: 0.3rem;
}

.scoreInputRow input {
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

.wizardActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.outcomesForm {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf3;
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.scoringList {
  display: grid;
  gap: 0.6rem;
}

.babyColumnsGrid {
  display: grid;
  gap: 1rem;
  margin: 0.5rem 0;
}

.babyColumn {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.babyColumnHeader {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-1);
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--primary);
}

.scoringCard {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbf3;
  padding: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.scoringRow {
  display: grid;
  gap: 0.3rem;
}

.scoringRow input {
  max-width: 180px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
}

@media (max-width: 760px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .projectPanelHeader {
    flex-direction: column;
  }

  .adminTabs {
    flex-direction: column;
  }

  .projectItem {
    align-items: flex-start;
  }

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

  .wizardHeader {
    align-items: flex-start;
  }

  .candidateHeader,
  .wizardActions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .predictionPanel {
    padding: 1rem 0.9rem;
    gap: 0.85rem;
  }

  .predictionActions {
    flex-direction: column;
    align-items: stretch;
  }

  .predictionActions .btn {
    width: 100%;
    text-align: center;
  }

  .babyColumnsGrid {
    grid-template-columns: 1fr !important;
  }

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

  .wizardActions {
    flex-direction: column;
    align-items: stretch;
  }

  .wizardActions .btn {
    width: 100%;
    text-align: center;
  }
}
