/* Organizer-only group-points correction. Keep the live standings readable;
   the edit surface lives in one viewport-contained dialog. */
.standing-panel-actions {
  flex-wrap: wrap;
}

.standings-points-trigger {
  border-color: rgba(94, 216, 212, .46);
  background: rgba(42, 130, 139, .13);
  color: #b9f4ef;
}

.standings-points-trigger:hover,
.standings-points-trigger:focus-visible {
  border-color: rgba(94, 216, 212, .82);
  color: #efffff;
}

.standing-team > b {
  min-width: 0;
}

.standing-points-adjustment {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 5px;
  border: 1px solid rgba(94, 216, 212, .44);
  background: rgba(39, 132, 143, .13);
  color: #aeece8;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.standing-points-adjustment.positive {
  border-color: rgba(183, 255, 74, .42);
  background: rgba(183, 255, 74, .1);
  color: #d9ff98;
}

.standing-points-adjustment.negative {
  border-color: rgba(255, 130, 111, .48);
  background: rgba(255, 104, 92, .1);
  color: #ffb0a6;
}

.group-points-adjustment-dialog {
  box-sizing: border-box;
  width: min(clamp(580px, 34vw, 720px), calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(94, 216, 212, .48);
  background: linear-gradient(145deg, #102b3d, #071522);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .62);
  color: #eaf6fb;
}

.group-points-adjustment-dialog::backdrop {
  background: rgba(1, 8, 14, .74);
  backdrop-filter: blur(6px);
}

.group-points-adjustment-dialog > .dialog-close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(164, 208, 230, .28);
  background: #102a3c;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  place-items: center;
}

.group-points-adjustment-dialog > header {
  padding: 23px 62px 19px 24px;
  border-bottom: 1px solid rgba(164, 208, 230, .18);
}

.group-points-adjustment-dialog > header > span {
  color: #73ded9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
}

.group-points-adjustment-dialog h2 {
  margin: 6px 0 0;
  color: #f1f9fc;
  font-size: 28px;
}

.group-points-adjustment-dialog header p {
  margin: 8px 0 0;
  color: #a8bdc8;
  font-size: 14px;
  line-height: 1.55;
}

.group-points-adjustment-dialog form {
  display: grid;
  gap: 16px;
  padding: 22px 24px 24px;
}

.points-adjustment-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .42fr);
  gap: 15px;
}

.points-adjustment-fields label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #c7d6dd;
  font-size: 14px;
  font-weight: 850;
}

.points-adjustment-fields label > span {
  color: #d9e7ed;
}

.points-adjustment-fields select,
.points-adjustment-fields input,
.points-adjustment-fields textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(142, 181, 200, .42);
  border-radius: 0;
  background: #071825;
  color: #f7fcff;
  font-size: 16px;
}

.points-adjustment-fields select,
.points-adjustment-fields input {
  min-height: 44px;
  padding: 0 11px;
}

.points-adjustment-fields textarea {
  min-height: 88px;
  padding: 10px 11px;
  line-height: 1.5;
  resize: vertical;
}

.points-adjustment-fields select:focus-visible,
.points-adjustment-fields input:focus-visible,
.points-adjustment-fields textarea:focus-visible {
  border-color: #b7ff4a;
  outline: 2px solid rgba(183, 255, 74, .34);
  outline-offset: 2px;
}

.points-adjustment-fields label > small {
  color: #8fa8b4;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.points-adjustment-reason-field {
  grid-column: 1 / -1;
}

.points-adjustment-preview {
  display: block;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 216, 212, .28);
  background: rgba(35, 112, 124, .1);
  color: #b8cdd6;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.5;
}

.points-adjustment-preview strong {
  color: #efffff;
  font-size: 18px;
}

.points-adjustment-preview .positive {
  color: #d9ff98;
}

.points-adjustment-preview .negative {
  color: #ffb0a6;
}

.points-adjustment-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 130, 111, .45);
  background: rgba(255, 104, 92, .1);
  color: #ffb5ad;
  font-size: 13px;
  line-height: 1.45;
}

.group-points-adjustment-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

.group-points-adjustment-dialog footer .button-link {
  min-height: 42px;
  margin: 0;
  padding-inline: 17px;
}

.group-points-adjustment-dialog form[aria-busy="true"] {
  cursor: wait;
}

@media (min-width: 2400px) {
  .standing-points-adjustment {
    min-height: 25px;
    padding-inline: 7px;
    font-size: 13px;
  }

  .group-points-adjustment-dialog {
    width: min(760px, calc(100vw - 72px));
  }

  .group-points-adjustment-dialog > header {
    padding: 30px 74px 24px 32px;
  }

  .group-points-adjustment-dialog > header > span {
    font-size: 15px;
  }

  .group-points-adjustment-dialog h2 {
    font-size: 36px;
  }

  .group-points-adjustment-dialog header p,
  .points-adjustment-preview {
    font-size: 18px;
  }

  .group-points-adjustment-dialog form {
    gap: 20px;
    padding: 28px 32px 32px;
  }

  .points-adjustment-fields label {
    font-size: 17px;
  }

  .points-adjustment-fields label > small {
    font-size: 14px;
  }

  .points-adjustment-fields select,
  .points-adjustment-fields input,
  .points-adjustment-fields textarea {
    font-size: 19px;
  }

  .points-adjustment-fields select,
  .points-adjustment-fields input {
    min-height: 52px;
  }

  .points-adjustment-preview strong {
    font-size: 23px;
  }
}

@media (max-width: 760px) {
  .standing-panel-actions {
    gap: 6px;
  }

  .standing-panel-actions .standings-tiebreak-trigger {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .standing-points-adjustment {
    min-height: 18px;
    padding-inline: 4px;
    font-size: 9px;
  }

  .group-points-adjustment-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .group-points-adjustment-dialog > header {
    padding: 20px 54px 16px 18px;
  }

  .group-points-adjustment-dialog h2 {
    font-size: 23px;
  }

  .group-points-adjustment-dialog form {
    gap: 13px;
    padding: 17px 18px 19px;
  }

  .points-adjustment-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .points-adjustment-reason-field {
    grid-column: auto;
  }

  .points-adjustment-preview {
    min-height: 44px;
    padding: 10px 11px;
    font-size: 13px;
  }

  .points-adjustment-preview strong {
    font-size: 16px;
  }

  .group-points-adjustment-dialog footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .group-points-adjustment-dialog footer .button-link {
    width: 100%;
    min-height: 44px;
    padding-inline: 8px;
  }
}
