/* ===== SpiderGift · админка ===== */

.adm-tabs { margin-top: 14px; }
.adm-body { margin-top: 14px; }

.adm-toggle { margin-bottom: 12px; }

/* плитки сводки: по две в ряд */
.adm-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.adm-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--stroke);
  min-width: 0;
}
.adm-tile span { font-size: 12.5px; color: var(--text-mute); }
.adm-tile b {
  font-family: 'Geologica', 'Inter', sans-serif;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.adm-tile small { font-size: 12px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px; }
.adm-tile[data-go] { cursor: pointer; }
.adm-tile.adm-hot { border-color: rgba(255, 201, 60, .45); background: rgba(255, 201, 60, .07); }

.adm-good { color: var(--green); }
.adm-bad { color: var(--red); }
.adm-warn { color: var(--gold); font-size: 12.5px; }
.adm-note { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-mute); }
.adm-sub { margin: 16px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); }

.adm-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  vertical-align: 1px;
}
.adm-pill.adm-good { background: rgba(61, 220, 151, .14); color: var(--green); }
.adm-pill.adm-bad { background: rgba(255, 77, 109, .14); color: var(--red); }

/* заявка на вывод */
.adm-list { display: flex; flex-direction: column; gap: 10px; }
.adm-list .card + .card { margin-top: 0; }
.adm-wd { display: flex; flex-direction: column; gap: 8px; }
.adm-wd-top { display: flex; align-items: center; gap: 12px; }
.adm-thumb {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-thumb .fallback { font-size: 26px; }

.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 10px; }

/* поля ввода */
.adm-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: #fff;
  font: inherit;
  font-size: 15px;
}
.adm-field:focus { outline: none; border-color: var(--accent-soft); }
.adm-field::placeholder { color: var(--text-mute); }
.adm-field + .adm-field { margin-top: 8px; }
.adm-code { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.adm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.adm-pair .adm-field + .adm-field { margin-top: 0; }
.adm-text { min-height: 130px; resize: vertical; line-height: 1.45; margin-bottom: 10px; }

/* карточка игрока */
.adm-user { cursor: pointer; }
.adm-user-head { display: flex; align-items: center; gap: 12px; }
.adm-user-head .bet-ava { width: 52px; height: 52px; font-size: 20px; }
.adm-user-head h3 { margin: 0; }
.adm-balance { margin-top: 12px; }
.adm-balance .btn { margin-top: 8px; }

/* ---------------- редактор кейса ---------------- */
.adm-pill.adm-gold { background: rgba(255, 201, 60, .14); color: var(--gold); }
.adm-warn-text { color: var(--gold); }

.ce-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ce-head h2 { margin: 0 0 4px; font-size: 22px; }
.ce-head .adm-pill { margin-left: 0; }
.ce-cover {
  flex: none;
  width: 72px; height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface-2);
}

/* итог держится на экране, пока листаешь предметы */
.ce-summary {
  position: sticky;
  top: 8px;
  z-index: 5;
  background: rgba(16, 13, 26, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ce-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.ce-kpis > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ce-kpis span { font-size: 11.5px; color: var(--text-mute); }
.ce-kpis b {
  font-family: 'Geologica', 'Inter', sans-serif;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.ce-kpis small { font-size: 11.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 3px; }
.ce-top { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); }

.ce-summary.bad { border-color: rgba(255, 77, 109, .55); }
.ce-notes:not(:empty) { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ce-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--text-dim);
}
.ce-note > span { flex: 1 1 200px; }
.ce-note.warn { background: rgba(255, 201, 60, .08); color: #ffdd85; }
.ce-note.error { background: rgba(255, 77, 109, .1); color: #ff8fa3; }
.chip.ce-mini { height: 28px; padding: 0 10px; font-size: 12px; }

.ce-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.ce-field + .ce-field, .adm-pair + .ce-field, .ce-field + .adm-pair,
.ce-field + .ce-visible, .ce-visible + .ce-field { margin-top: 14px; }
/* поля в паре стоят рядом, а не друг под другом: отступ сверху сдвигал второе вниз */
.adm-pair > .ce-field { min-width: 0; }
.adm-pair > .ce-field + .ce-field { margin-top: 0; }
.adm-pair + .ce-visible { margin-top: 14px; }
.ce-visible { margin-bottom: 0; }
.ce-field b { color: #fff; }
.ce-scale { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-mute); }

.ce-range {
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  accent-color: var(--accent-soft);
  -webkit-appearance: none;
  appearance: none;
}
.ce-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: var(--surface-3); }
.ce-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(124, 61, 255, .25);
}
.ce-range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--surface-3); }
.ce-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--accent-soft); }

/* строка предмета: картинка, имя и шанс, поле закрепления, удалить */
.ce-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ce-item + .ce-item { border-top: 1px solid var(--stroke); }
.ce-item .row-title { font-size: 14px; }
.ce-item .row-sub b { color: #fff; font-weight: 700; }
.ce-item.pinned { background: rgba(255, 201, 60, .06); }
.ce-pin {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  width: 84px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: var(--text-mute);
  font-size: 13px;
}
.ce-pin input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 700;
}
.ce-pin input:focus { outline: none; }
.ce-pin input::placeholder { color: var(--text-mute); font-weight: 500; }
.ce-pin input::-webkit-outer-spin-button,
.ce-pin input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ce-item.pinned .ce-pin { border-color: rgba(255, 201, 60, .5); color: var(--gold); }
.ce-del {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-mute);
  font-size: 13px;
}
.ce-del:active { background: rgba(255, 77, 109, .2); color: var(--red); }

.ce-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; }
.ce-cover-opt {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-2);
  padding: 0;
}
.ce-cover-opt img { width: 100%; height: 100%; object-fit: cover; }
.ce-cover-opt.on { border-color: var(--accent-soft); }

.ce-colors { display: flex; gap: 10px; }
.ce-colors input[type=color] {
  width: 56px; height: 36px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.ce-actions { display: flex; gap: 10px; margin: 18px 0 8px; }
.ce-actions .btn { flex: 1 1 0; }

.ce-picker { max-height: 52vh; overflow-y: auto; }
.ce-taken { opacity: .45; }

/* текст сообщения так, как его увидит игрок в боте */
.adm-quote {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent-soft);
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
  white-space: pre-line;
}

/* ---------------- настройки игр ---------------- */
/* строка про то, чего игрок не увидит: цель с шансом ниже минимального */
.adm-off { opacity: .45; }
.adm-off .v { font-weight: 500; }

/* строка с подписью в две строки: заголовок и пояснение под ним */
.stat-row .k.adm-col { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.stat-row .k.adm-col small { font-size: 11.5px; line-height: 1.3; }
/* поле со знаком процента: число и знак всегда в одну строку */
.stat-row .v.adm-num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* шанс, который можно вписать прямо в строке */
.adm-mini {
  width: 84px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
.adm-mini::-webkit-outer-spin-button,
.adm-mini::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cr-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-cell {
  padding: 5px 9px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-dim);
}
.cr-cell.red { background: rgba(255, 77, 109, .16); color: #ff8fa3; }
.cr-cell.black { background: var(--surface-3); color: var(--text-dim); }
.cr-cell.green { background: rgba(61, 220, 151, .16); color: var(--green); }

/* вход в админку из профиля */
.admin-entry {
  width: 100%;
  margin-top: 12px;
  color: var(--gold);
  background: rgba(255, 201, 60, .07);
  border-color: rgba(255, 201, 60, .35);
}
