/* Spiski: zayavki, kompanii, polzovateli, svoi tochki. */

/* --- Polzovateli i roli --- */
.us-tools { margin: 12px 0 14px; }
.us-tools input {
  width: 100%; max-width: 340px; padding: 9px 12px; border-radius: 9px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  font: inherit; font-size: 13.5px;
}

.us-list { display: flex; flex-direction: column; }
.us-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 12px; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--border);
}
.us-row:first-child { border-top: none; }
.us-row.blocked { opacity: .55; }

/* Строка и её карточка — одной обёрткой, чтобы карточка раскрывалась под своим
   человеком. Разделитель переехал на обёртку: иначе он рисовался между строкой
   и её же карточкой. */
.us-item { border-top: 1px solid var(--border); }
.us-item:first-child { border-top: none; }
.us-row { border-top: none; }

/* Имя — кнопка: раскрывает карточку. Вид у неё обычного текста, поэтому все
   собственные украшения кнопки снимаем. */
.us-who {
  display: flex; align-items: center; gap: 11px; min-width: 0;
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.us-who::after {
  content: '⌄'; color: var(--text-mute); font-size: 13px;
  transition: transform .18s ease;
}
.us-item.open .us-who::after { transform: rotate(180deg); }

/* --- Карточка человека: что мы знаем и что у него с приложением --- */
.us-item .us-card { display: none; }
.us-item.open .us-card {
  display: block; margin: 2px 0 12px 41px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
}
.us-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 18px; }
.us-fact { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.us-fact span { color: var(--text-mute); }
.us-fact b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.us-tf { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.us-tf-head { font-size: 12px; letter-spacing: .04em; color: var(--accent-2); margin-bottom: 7px; }
.us-tf-hint, .us-tf-warn { font-size: 11.5px; margin: 7px 0 0; }
.us-tf-hint { color: var(--text-mute); }
.us-tf-warn { color: var(--warn, #f59e0b); }
.us-tf-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.us-tf-act button { font-size: 12.5px; }
.us-av {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 184, 166, .18); color: var(--accent-2);
  font-size: 13px; font-weight: 700;
}
.us-id { min-width: 0; display: flex; flex-direction: column; }
.us-id strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-id em {
  font-style: normal; font-size: 11.5px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.us-role {
  padding: 7px 9px; border-radius: 8px; font: inherit; font-size: 13px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
}
.us-role:disabled { opacity: .5; }
.us-block { white-space: nowrap; font-size: 12.5px; }

/* Chto umeet kazhdaya rol — chtoby vydavat dostup osoznanno. */
.role-list { display: flex; flex-direction: column; margin-top: 12px; }
.role-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px;
}
.role-row:first-child { border-top: none; }
.role-perms { color: var(--text-mute); font-size: 12px; text-align: right; }

@media (max-width: 620px) {
  .us-row { grid-template-columns: 1fr; gap: 8px; }
  .us-item.open .us-card { margin-left: 0; }
  .us-fact { flex-direction: column; gap: 1px; }
  .role-row { flex-direction: column; gap: 3px; }
  .role-perms { text-align: left; }
}

/* --- Что рядом со станциями: еда, продукты, туалет --- */
.pl-counts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin: 14px 0 4px;
}
.pl-cell {
  padding: 12px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--border);
}
.pl-cell strong { display: block; font-size: 20px; }
.pl-cell span { font-size: 11.5px; color: var(--text-mute); }

.pl-runs-title { margin: 18px 0 8px; font-size: 14px; color: var(--text-dim); }
.pl-runs { display: flex; flex-direction: column; }
.pl-run {
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
  gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.pl-run:first-child { border-top: none; }
.pl-when { display: flex; flex-direction: column; }
.pl-when strong { font-size: 13px; }
.pl-when em { font-style: normal; font-size: 11.5px; color: var(--text-mute); }

.pl-nums { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pl-add { color: var(--green); font-weight: 700; }
.pl-del { color: #ff8787; font-weight: 700; }
.pl-of { color: var(--text-mute); font-size: 11.5px; }

.pl-kinds { font-size: 12px; color: var(--text-dim); text-align: right; }
.pl-err { grid-column: 1 / -1; font-size: 12px; color: #ff8787; }
.pl-going { grid-column: 1 / -1; font-size: 12px; color: var(--accent-2); }

@media (max-width: 720px) {
  .pl-run { grid-template-columns: 1fr; gap: 6px; }
  .pl-kinds { text-align: left; }
}
