/* roster.css — «Список участников»: реестр турнира, конструктор распределения
   по игровым столам, сводки и подтверждение раскладки.
   Тёмный фон, жёлто-золотые акценты, карточки в духе остального интерфейса. */

:root {
  --roster-gold: #f5c542;
  --roster-gold-soft: rgba(245, 197, 66, .14);
  --roster-line: rgba(245, 197, 66, .28);
  --roster-panel: rgba(18, 20, 30, .82);
  --roster-panel-2: rgba(26, 29, 42, .9);
}

.roster-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 14px;
  align-items: start;
}

.roster-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.roster-inline input {
  flex: 1 1 auto;
  min-width: 0;
}

.roster-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.roster-tables {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}

.roster-table-card {
  background: var(--roster-panel);
  border: 1px solid var(--roster-line);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.roster-table-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.roster-table-card__row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 62px auto auto;
  gap: 6px;
  align-items: center;
}

.roster-table-card__row button:last-child {
  grid-column: 1 / -1;
  justify-self: start;
}

.roster-table-card__row input {
  padding: 6px 8px;
  font-size: 13px;
}

.roster-table-card__list {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .74);
  line-height: 1.45;
  max-height: 88px;
  overflow: auto;
}

.roster-version {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  margin-top: 8px;
  border: 1px dashed var(--roster-line);
  border-radius: 12px;
  background: rgba(245, 197, 66, .05);
}

/* ---------------------------------------------------------- конструктор */

.roster-modal {
  max-width: min(1180px, 96vw);
  width: 100%;
}

.roster-constructor {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.9fr);
  gap: 14px;
  align-items: start;
  max-height: 62vh;
  overflow: auto;
}

.roster-constructor__side {
  background: var(--roster-panel-2);
  border: 1px solid var(--roster-line);
  border-radius: 14px;
  padding: 11px;
  display: grid;
  gap: 9px;
  position: sticky;
  top: 0;
}

.roster-constructor__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.roster-constructor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 10px;
}

.roster-pool {
  display: grid;
  gap: 6px;
  max-height: 40vh;
  overflow: auto;
  padding-right: 3px;
}

.roster-move {
  display: flex;
  gap: 6px;
}

.roster-move select {
  flex: 1 1 auto;
  min-width: 0;
}

.roster-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(245, 197, 66, .07);
  border: 1px solid rgba(245, 197, 66, .22);
  cursor: grab;
  font-size: 13px;
}

.roster-chip:active {
  cursor: grabbing;
}

.roster-chip__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-drop__no {
  font-weight: 700;
  color: var(--roster-gold);
  font-size: 13px;
  white-space: nowrap;
}

.roster-chip__id {
  font-size: 11px;
  color: rgba(255, 255, 255, .48);
  margin-left: auto;
  white-space: nowrap;
}

/* в общем списке полный ID не нужен — он виден в таблице реестра */
.roster-pool .roster-chip__id {
  display: none;
}

.roster-chip__name {
  flex: 1 1 auto;
  min-width: 0;
}

.roster-chip--in {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}

.roster-chip--in .roster-chip__id {
  display: none;
}

.roster-tables-drop {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.roster-drop {
  background: var(--roster-panel);
  border: 1px solid var(--roster-line);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  min-height: 110px;
}

.roster-drop--over {
  border-color: var(--roster-gold);
  box-shadow: 0 0 0 2px var(--roster-gold-soft) inset;
  background: rgba(245, 197, 66, .08);
}

.roster-drop__head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.roster-drop__name {
  flex: 1 1 90px;
  min-width: 0;
  padding: 5px 7px;
  font-size: 12.5px;
}

.roster-drop__cap {
  width: 62px;
  padding: 5px 7px;
  font-size: 12.5px;
}

.roster-drop__list {
  display: grid;
  gap: 5px;
}

.roster-auto {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 11px;
  margin-bottom: 11px;
  border: 1px dashed var(--roster-line);
  border-radius: 13px;
  background: rgba(245, 197, 66, .06);
}

.roster-auto .field {
  min-width: 150px;
}

.roster-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
}

.roster-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.roster-summary__row b {
  color: var(--roster-gold);
}

/* --------------------------------------------------- состав следующего раунда */

.roster-compose {
  display: grid;
  gap: 11px;
  max-height: 58vh;
  overflow: auto;
}

.roster-compose__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
}

.roster-compose__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 3px;
}

@media (max-width: 900px) {
  .roster-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .roster-constructor {
    grid-template-columns: minmax(0, 1fr);
    max-height: 70vh;
  }

  .roster-constructor__side {
    position: static;
  }

  .roster-table-card__row {
    grid-template-columns: minmax(0, 1fr) 62px auto auto;
  }
}
