/* Админ-панель (templates/pages/admin.html). Таблица — datatable.css, пустое состояние — .clan-empty. */

.clan-empty { padding: 40px 16px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

.adm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.adm-hint { max-width: 760px; margin: 4px 0 0; font-size: 13.5px; color: var(--dim); line-height: 1.5; }

/* Форма этапа */
.adm-form {
  margin-bottom: 18px; padding: 18px 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.adm-form__title { margin: 0 0 14px; font: 600 15px var(--fb); color: var(--hi); }
.adm-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 18px; }
.adm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
.adm-field--wide { grid-column: 1 / -1; }
.adm-field input {
  height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel2); color: var(--hi); font: 500 14px var(--fb); color-scheme: inherit;
}
.adm-field input:focus { outline: none; border-color: var(--acc); }
.adm-field small { font-size: 12px; color: var(--dim); }
.adm-field small b { color: var(--text); }
.adm-check { display: flex; align-items: center; gap: 10px; align-self: end; height: 36px; font-size: 14px; color: var(--hi); cursor: pointer; }
.adm-check input { width: 16px; height: 16px; accent-color: var(--acc); }
.adm-error { margin: 12px 0 0; color: var(--loss); font-weight: 600; font-size: 13.5px; }
.adm-form__actions { display: flex; gap: 8px; margin-top: 16px; }

/* Таблица этапов */
.adm-table td { vertical-align: middle; }
.adm-stage b { display: block; color: var(--hi); }
.adm-stage code { font-size: 12px; color: var(--dim); }
.adm-badge {
  display: inline-block; margin: 4px 6px 0 0; padding: 1px 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; background: var(--panel2); color: var(--dim);
}
.adm-badge.is-new { background: var(--acc-soft); color: var(--acc); }
.adm-badge.is-upload { background: rgba(86, 179, 127, .14); color: var(--win); }
.adm-actions { display: inline-flex; gap: 4px; }
.adm-icon {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: none; color: var(--text); cursor: pointer;
}
.adm-icon:hover { color: var(--hi); border-color: var(--dim); }
.adm-icon.is-danger:hover { color: var(--loss); border-color: var(--loss); }

/* Переключатель загрузки реплеев */
.adm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.adm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-switch i {
  position: relative; width: 38px; height: 22px; border-radius: 99px; flex-shrink: 0;
  background: var(--line); transition: background .15s;
}
.adm-switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left .15s;
}
.adm-switch input:checked + i { background: var(--win); }
.adm-switch input:checked + i::after { left: 19px; }
.adm-switch input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.adm-switch span { color: var(--dim); }
.adm-switch input:checked ~ span { color: var(--win); font-weight: 600; }

/* Вкладки админ-панели */
.adm-tabs { margin-bottom: 18px; flex-wrap: wrap; }
.adm-tabs .segmented__btn i { margin-right: 7px; font-size: 12.5px; }
.adm-block { margin-bottom: 16px; }
.adm-hint--below { margin-top: 12px; }
.adm-hint code, .adm-mini code { font-size: 12.5px; color: var(--text); }

/* Пользователи */
.adm-user { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.adm-user b { color: var(--hi); }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.adm-dot.is-online { background: var(--win); box-shadow: 0 0 0 3px rgba(86, 179, 127, .18); }
.adm-select {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel2); color: var(--hi); font: 500 13px var(--fb); cursor: pointer;
}
.adm-select:disabled { opacity: .6; cursor: default; }
.adm-icon:disabled { opacity: .35; cursor: default; }

/* Сервер и БД */
.adm-refresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; margin-bottom: 8px; font-size: 12.5px; color: var(--dim); }
.adm-check--inline { height: auto; align-self: auto; font-size: 13px; color: var(--text); }
.adm-mini th, .adm-mini td { padding: 7px 10px; font-size: 13px; }
.kpi__value .is-loss { color: var(--loss); }
.adm-outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-outcomes .adm-badge { margin: 0; padding: 4px 10px; font-size: 12.5px; }
.adm-outcomes .adm-badge b { color: var(--hi); }
