/* =====================================================================
   Админ-панель (префикс классов ad-). Плотная, но в общей дизайн-системе:
   стеклянные карточки, Unbounded в заголовках, плавные переходы на --ease / --spring.
   ===================================================================== */

/* ---------- Вкладки (липкая стеклянная лента с бегающей подложкой) ---------- */
.ad-tabs {
  position: sticky;
  top: calc(74px + var(--safe-t));
  z-index: 30;
  margin: 0 -4px 14px;
  padding: 5px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(52, 33, 108, 0.76), rgba(18, 11, 42, 0.82));
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 30px rgba(3, 1, 12, 0.45), var(--hl);
}
.ad-tabs-sc {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 15px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.ad-tabs-sc::-webkit-scrollbar { display: none; }
.ad-tabs-in { position: relative; display: flex; gap: 2px; width: max-content; padding: 0 6px; }
.ad-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  font: 800 12.5px/1 var(--font);
  color: var(--text-3);
  white-space: nowrap;
  transition: color var(--t) var(--ease), transform var(--t-fast) var(--spring);
}
.ad-tab .ico svg { width: 16px; height: 16px; transition: transform 0.45s var(--spring), filter var(--t); }
.ad-tab.on { color: #fff; }
.ad-tab.on .ico svg { transform: scale(1.14); filter: drop-shadow(0 0 6px rgba(206, 186, 255, 0.75)); }
.ad-tab:active { transform: scale(0.93); }
.ad-tab-ind {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(178, 150, 255, 0.44), rgba(124, 58, 237, 0.4));
  border: 1px solid rgba(206, 186, 255, 0.42);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.5s var(--spring), width 0.5s var(--spring);
}
.ad-tab-ind.instant { transition: none; }
.ad-refresh.spin svg { animation: spin 0.7s var(--ease); }

/* ---------- Содержимое вкладки ---------- */
.ad-body { position: relative; min-height: 40vh; }
.ad-panel { display: flex; flex-direction: column; gap: 12px; animation: adIn 0.42s var(--ease) both; }
.ad-panel > .sec { margin: 8px 2px 0; }
@keyframes adIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ad-card { display: flex; flex-direction: column; gap: 12px; }
.ad-card-h { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.ad-card-h h2 {
  min-width: 0;
  font: 800 14px/1.2 var(--font-d);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-card-ic {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--violet-2);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.25);
}
.ad-card-ic svg { width: 16px; height: 16px; }
.ad-card-foot { display: flex; justify-content: flex-end; }
.ad-listcard { padding: 4px 12px; gap: 0; }

.ad-bar { display: flex; align-items: center; gap: 10px; }
.ad-sub { padding: 0 2px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.ad-hint { font-size: 12px; line-height: 1.45; font-weight: 600; color: var(--text-3); }
/* Иконка в подсказке (замок «только владелец» и т. п.) — размером со строку, а не на всю ширину */
.ad-hint .ico { display: inline-flex; vertical-align: -2px; }
.ad-hint .ico svg { width: 13px; height: 13px; }
/* Подсказка с иконкой слева (комментарий к балансу виден игроку) */
.ad-note-hint { display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.ad-note-hint .ico { flex: none; margin-top: 1px; color: var(--gold); }
.ad-note-hint .ico svg { width: 13px; height: 13px; display: block; }
.ad-foot { padding: 0 4px; }
.ad-label { display: flex; align-items: center; gap: 6px; font: 800 11px/1.2 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.ad-label .ico svg { width: 14px; height: 14px; }
.ad-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(47, 217, 245, 0.07);
  border: 1px solid rgba(47, 217, 245, 0.2);
}
.ad-note .ico { flex: none; margin-top: 1px; color: var(--cyan); }
.ad-note .ico svg { width: 17px; height: 17px; }
.ad-span { grid-column: 1 / -1; }

.ad-error { display: grid; justify-items: center; gap: 10px; padding: 26px 16px; text-align: center; font-weight: 700; color: var(--text-2); }
.ad-error img { width: 56px; height: 56px; animation: floaty 3.6s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)); }

/* Кнопка во время сохранения: спиннер вместо текста */
.btn.ad-busy { color: transparent !important; }
.btn.ad-busy:disabled { opacity: 0.85; filter: none; }
.btn.ad-busy > * { visibility: hidden; }
.btn.ad-busy::before {
  content: '';
  position: absolute;
  top: calc(50% - 9px);
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

/* ---------- Поля ---------- */
.ad-field { min-width: 0; }
.ad-field .input, .ad-adorn .input { height: 44px; border-radius: 13px; font-size: 14px; }
.ad-adorn { position: relative; display: flex; align-items: center; min-width: 0; }
.ad-adorn .input { flex: 1; min-width: 0; }
.ad-adorn.pre .input { padding-left: 40px; }
.ad-adorn.suf .input { padding-right: 46px; }
.ad-pre, .ad-suf {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  font: 800 13px var(--font);
  color: var(--text-3);
}
.ad-pre { left: 11px; }
.ad-suf { right: 13px; }
.ad-pre .st { width: 18px; height: 18px; }
.ad-emo { font: 400 16px/1 var(--font); }
.ad-lang { padding: 4px 5px; border-radius: 6px; font: 800 10px/1 var(--font); letter-spacing: 0.06em; color: var(--violet-2); background: rgba(139, 92, 246, 0.16); }
.input.ad-bad, .ad-bk-in.ad-bad { border-color: rgba(255, 77, 109, 0.85) !important; box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.16) !important; }

.ad-sw { display: flex; align-items: center; gap: 12px; padding: 2px 0; cursor: pointer; }
.ad-sw b { display: block; font-size: 14px; font-weight: 800; }
.ad-sw small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.ad-field-sw { display: flex; align-items: flex-end; padding-bottom: 8px; }

.ad-search { position: relative; display: flex; align-items: center; min-width: 0; }
.ad-search > .ico { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
.ad-search > .ico svg { width: 18px; height: 18px; }
.ad-search .input { height: 46px; padding-left: 42px; }
.ad-search .ad-x { position: absolute; right: 6px; }
.ad-search input[type='search']::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* Ряд чипов с горизонтальной прокруткой */
.ad-chips {
  display: flex;
  gap: 6px;
  margin: 0 -10px;
  padding: 2px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}
.ad-chips::-webkit-scrollbar { display: none; }
.ad-chips .chip { flex: none; height: 34px; padding: 0 12px; font-size: 12.5px; }
.ad-chip-fx { width: 18px; height: 18px; margin-left: -3px; object-fit: contain; }
.ad-rdot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: rgb(var(--rc)); box-shadow: 0 0 8px rgba(var(--rc), 0.8); }
.ad-rchip.on { background: rgba(var(--rc), 0.2); border-color: rgba(var(--rc), 0.6); box-shadow: 0 4px 14px rgba(var(--rc), 0.25); }

/* ---------- Списки ---------- */
.ad-list { display: flex; flex-direction: column; }
.ad-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--stroke);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.ad-row:last-child { border-bottom: 0; }
button.ad-row { cursor: pointer; border-radius: 12px; transition: background var(--t), transform var(--t-fast) var(--ease); }
button.ad-row:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.04); }
@media (hover: hover) {
  button.ad-row:hover { background: rgba(255, 255, 255, 0.03); }
}
.ad-row b { font-size: 14px; font-weight: 800; }
.ad-row small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.ad-ellip { min-width: 0; }
.ad-ellip > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.ad-r small { margin-top: 0; }
.ad-xs { height: 20px; padding: 0 7px; font-size: 10px; }
.ad-xs .ico svg { width: 11px; height: 11px; }
.ad-live { display: inline-flex !important; align-items: center; gap: 5px; font-weight: 800; color: var(--mint) !important; }
.ad-live .live-dot { width: 6px; height: 6px; }

.ad-urow-n { display: flex; align-items: center; gap: 6px; }
.ad-urow-n b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-urow.banned .avatar { filter: grayscale(1); opacity: 0.6; }

/* Доля (тонкая полоса) */
.ad-share { height: 4px; margin-top: 6px; border-radius: 4px; overflow: hidden; background: rgba(255, 197, 61, 0.14); }
.ad-share i { display: block; height: 100%; border-radius: 4px; background: var(--grad-gold); transform-origin: left; animation: adGrow 0.8s var(--ease) both; }
@keyframes adGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Сводка ---------- */
.ad-skel-hero { height: 150px; border-radius: var(--r-l); }
.ad-skel-chart { height: 270px; border-radius: var(--r-l); }
.ad-hero {
  overflow: hidden;
  padding: 18px 16px 16px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 197, 61, 0.2), transparent 55%), var(--grad-card);
}
.ad-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.07) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: adSheen 5.5s var(--ease) infinite;
}
@keyframes adSheen { 0% { background-position: 130% 0; } 60%, 100% { background-position: -60% 0; } }
.ad-hero-art { position: absolute; top: 2px; right: 4px; width: 82px; height: 82px; pointer-events: none; }
.ad-hero-art::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 197, 61, 0.45), transparent 70%);
  filter: blur(8px);
  animation: glow 3s ease-in-out infinite;
}
.ad-hero-art img { position: relative; width: 100%; height: 100%; object-fit: contain; animation: floatyRot 4.2s ease-in-out infinite; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)); }
.ad-hero .label { position: relative; max-width: calc(100% - 86px); }
.ad-hero-v {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 64px);
  margin: 10px 0 12px;
  font: 800 clamp(24px, 8vw, 34px)/1 var(--font);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.ad-hero-v .st { width: 0.9em; height: 0.9em; }
.ad-hero-v b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ad-hero-v.neg b { background: none; color: var(--red); }
.ad-hero-sub { position: relative; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.ad-hero-sub b { color: var(--text); }
.ad-hero-sub .amt .st { width: 14px; height: 14px; }

.ad-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ad-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 12px 12px 11px;
  border-radius: 20px;
  text-align: left;
  color: var(--text);
  background: var(--grad-card);
  border: 1px solid var(--stroke);
  box-shadow: var(--sh-1), var(--hl);
  transition: transform var(--t-fast) var(--ease), border-color var(--t);
}
button.ad-kpi { font: inherit; cursor: pointer; }
button.ad-kpi:active { transform: scale(0.97); border-color: var(--stroke-2); }
.ad-kpi-top { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 4px; }
.ad-kpi-top .live-dot { margin-left: auto; }
.ad-kpi-more { margin-left: auto; color: var(--text-3); }
.ad-kpi-more svg { width: 16px; height: 16px; }
.ad-kpi-v { display: flex; align-items: center; gap: 5px; max-width: 100%; overflow: hidden; font: 800 21px/1.1 var(--font); white-space: nowrap; }
.ad-kpi-v .st { width: 18px; height: 18px; }
.ad-kpi-l { font-size: 11.5px; font-weight: 700; line-height: 1.25; color: var(--text-3); }
.ad-kpi-s { font-size: 11px; font-weight: 700; color: var(--text-2); }

/* Динамика за 14 дней */
.ad-mini { width: 34px; height: 34px; border-radius: 11px; }
.ad-mini svg { width: 17px; height: 17px; }
.ad-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.ad-chart-head small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.ad-chart-head b { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font: 800 18px/1.2 var(--font); }
.ad-chart-head b .st { width: 16px; height: 16px; }
.ad-chart-wrap { position: relative; }
.ad-chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.ad-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.ad-axis { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.ad-tick { fill: var(--text-3); font: 700 9px var(--font); font-variant-numeric: tabular-nums; }
.ad-tick.now { fill: var(--text); font-weight: 800; }
.ad-bar {
  fill: #8b5cf6;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: adBarUp 0.6s var(--ease) both;
  transition: fill 0.2s;
}
.ad-bar.neg { fill: #f03e62; transform-origin: 50% 0; }
.ad-bar.on { fill: #b49bff; }
.ad-bar.neg.on { fill: #ff7591; }
@keyframes adBarUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ad-hit { fill: transparent; cursor: pointer; outline: none; }
.ad-hit:focus-visible { fill: rgba(255, 255, 255, 0.05); }
.ad-tip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 12px;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(20, 12, 44, 0.95);
  border: 1px solid var(--stroke-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 8px)) scale(0.9);
  transition: opacity 0.18s var(--ease), transform 0.3s var(--spring);
}
.ad-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 8px)); }
.ad-tip.l { transform: translate(-14%, calc(-100% - 8px)) scale(0.9); }
.ad-tip.l.show { transform: translate(-14%, calc(-100% - 8px)); }
.ad-tip.r { transform: translate(-86%, calc(-100% - 8px)) scale(0.9); }
.ad-tip.r.show { transform: translate(-86%, calc(-100% - 8px)); }
.ad-tip b { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.ad-tip b .st { width: 14px; height: 14px; }
.ad-tip span { font-size: 11px; font-weight: 700; color: var(--text-3); }
.ad-dtable { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); animation: fadeIn 0.3s var(--ease); }
.ad-dt-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; font-size: 13px; border-bottom: 1px solid var(--stroke); }
.ad-dt-row:last-child { border-bottom: 0; }
.ad-dt-row span { font-weight: 600; color: var(--text-2); }
.ad-dt-row b { font-variant-numeric: tabular-nums; }

/* По играм */
.ad-glist { display: flex; flex-direction: column; }
.ad-gs { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--stroke); }
.ad-gs:last-child { border-bottom: 0; }
.ad-gs.total { padding-top: 13px; }
.ad-gs.total .ad-gs-t b { font: 800 12.5px/1.2 var(--font-d); letter-spacing: 0.03em; text-transform: uppercase; }
.ad-gs-t { display: flex; align-items: baseline; gap: 8px; }
.ad-gs-t b { font-size: 14px; }
.ad-gs-t small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.ad-gs-s { margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.ad-gs-s b { color: var(--text-2); }
.ad-gs .ad-r small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.ad-gfx {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}
.ad-gfx img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.ad-gfx.sm { width: 34px; height: 34px; border-radius: 11px; }
.ad-gfx.sm img { width: 24px; height: 24px; }
.ad-gfx.lg { width: 52px; height: 52px; border-radius: 16px; background: rgba(var(--gc, 139, 92, 246), 0.14); border-color: rgba(var(--gc, 139, 92, 246), 0.35); }
.ad-gfx.lg img { width: 40px; height: 40px; animation: floaty 3.8s ease-in-out infinite; }
.ad-gfx-sum { color: var(--violet-2); }
.ad-gfx-sum svg { width: 20px; height: 20px; }
.ad-meter { position: relative; height: 4px; margin-top: 7px; border-radius: 4px; background: rgba(139, 92, 246, 0.16); }
.ad-meter i { display: block; height: 100%; border-radius: 4px; background: var(--violet); transform-origin: left; animation: adGrow 0.8s var(--ease) both; }
.ad-meter.over i { background: #f03e62; }
.ad-meter-100 { position: absolute; top: -3px; bottom: -3px; left: 66.667%; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); }

/* ---------- Карточка игрока ---------- */
.ad-us { display: flex; flex-direction: column; gap: 12px; }
.ad-us-head { display: flex; align-items: center; gap: 12px; }
.ad-us-name { font: 800 17px/1.2 var(--font); }
.ad-us-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 3px;
  padding: 0;
  border: 0;
  background: none;
  font: 700 12px var(--font);
  color: var(--text-3);
  cursor: pointer;
}
.ad-us-id .ico svg { width: 13px; height: 13px; }
.ad-ellip > .ad-us-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; white-space: normal; overflow: visible; }
.ad-us-bal { display: flex; align-items: center; gap: 5px; margin-top: 2px; font: 800 19px/1.1 var(--font); }
.ad-us-bal .st { width: 18px; height: 18px; }
.ad-us-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ad-ms { min-width: 0; padding: 9px 10px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }
.ad-ms small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-ms > div { margin-top: 3px; font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-ms .amt { gap: 4px; }
.ad-ms .amt .st { width: 14px; height: 14px; }
.ad-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ad-quick .chip { height: 32px; padding: 0 4px; }
.ad-ban .ad-sw b { color: #ff9db0; }
.ad-us-tabs { margin-top: 2px; }
.ad-us-hist { min-height: 120px; }
.ad-us-gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ad-us-gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 4px 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(var(--rc), 0.16), rgba(22, 13, 48, 0.6));
  border: 1px solid rgba(var(--rc), 0.25);
}
.ad-us-gift .art { width: 82%; font-size: 40px; }
.ad-us-gift small { font-size: 11px; font-weight: 800; color: var(--text-2); }

/* ---------- Кейсы ---------- */
.ad-cases { display: flex; flex-direction: column; gap: 10px; }
.ad-case {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 11px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(110deg, rgba(var(--cc), 0.2) 0%, rgba(30, 18, 62, 0.66) 45%, rgba(17, 10, 38, 0.76) 100%);
  border: 1px solid rgba(var(--cc), 0.28);
  box-shadow: var(--sh-1), var(--hl);
  transition: transform var(--t-fast) var(--ease), border-color var(--t);
}
.ad-case:active { transform: scale(0.98); }
.ad-case.off { opacity: 0.72; filter: saturate(0.45); }
.ad-case-n { display: flex; align-items: center; gap: 6px; }
.ad-case-n b { min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-case small { display: flex; align-items: center; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ad-case small .amt .st { width: 14px; height: 14px; }
.ad-chev { flex: none; color: var(--text-3); }
.ad-chev svg { width: 18px; height: 18px; }
.ad-free { font-weight: 800; color: var(--mint); }

.ad-cover {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, rgba(var(--cc), 0.55), rgba(var(--cc), 0.12) 70%), rgba(10, 6, 26, 0.5);
  border: 1px solid rgba(var(--cc), 0.45);
  box-shadow: 0 6px 16px rgba(var(--cc), 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.ad-cover img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4)); }
.ad-cover-emo { line-height: 1; }
.ad-cover.md { width: 52px; height: 52px; }
.ad-cover.md .ad-cover-emo { font-size: 28px; }
.ad-cover.lg { width: 86px; height: 86px; border-radius: 24px; }
.ad-cover.lg .ad-cover-emo { font-size: 46px; }
.ad-cover.lg img, .ad-cover.lg .ad-cover-emo { animation: floaty 3.6s ease-in-out infinite; }
.ad-cover.xs { width: 24px; height: 24px; border-radius: 8px; box-shadow: none; }
.ad-cover.xs .ad-cover-emo { font-size: 14px; }

/* Редактор кейса */
.ad-ce-top { display: flex; align-items: center; gap: 12px; margin: 8px 2px 14px; }
.ad-ce-top h1 { font: 800 20px/1.15 var(--font-d); text-transform: uppercase; }
.ad-ce-kicker { margin-bottom: 4px; font: 800 10.5px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.ad-ce-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: radial-gradient(130% 120% at 0% 50%, rgba(var(--cc, 139, 92, 246), 0.3), transparent 60%), var(--grad-card);
}
.ad-ce-cover { flex: none; }
.ad-ce-name { font: 800 18px/1.2 var(--font-d); text-transform: uppercase; }
.ad-ce-price { margin-top: 6px; font-size: 15px; }
.ad-ce-price .amt .st { width: 17px; height: 17px; }
.ad-ce-rtp { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 700; }
.ad-look { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.ad-emoji { padding: 0 8px !important; text-align: center; font-size: 20px !important; }
.ad-colorrow { display: flex; align-items: center; gap: 8px; }
.ad-color { flex: none; width: 44px; height: 44px; padding: 0; overflow: hidden; border: 1px solid var(--stroke-2); border-radius: 13px; background: none; cursor: pointer; }
.ad-color::-webkit-color-swatch-wrapper { padding: 0; }
.ad-color::-webkit-color-swatch { border: 0; border-radius: 12px; }
.ad-color::-moz-color-swatch { border: 0; border-radius: 12px; }
.ad-hex { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; text-transform: uppercase; }
.ad-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform var(--t-fast) var(--spring);
}
.ad-swatch:active { transform: scale(0.82); }
.ad-imgrow { gap: 8px; }
.ad-imgrow .input { flex: 1; min-width: 0; height: 44px; border-radius: 13px; font-size: 14px; }
.ad-3d { flex: none; height: 44px; padding: 0 12px; border-radius: 13px; font-size: 13px; }
.ad-3d img { width: 20px; height: 20px; }

.ad-ci-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ad-ci-meter { min-height: 10px; }
.ad-ci-head { display: flex; align-items: center; gap: 8px; padding: 0 6px; font: 800 10.5px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.ad-ci-hw { width: 62px; text-align: center; }
.ad-ci-hc { width: 48px; margin-right: 38px; text-align: right; }
.ad-ci-list { display: flex; flex-direction: column; gap: 6px; }
.ad-ci {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(var(--rc), 0.12), rgba(8, 5, 20, 0.35) 60%);
  border: 1px solid rgba(var(--rc), 0.18);
  animation: fadeUp 0.35s var(--ease) both;
}
.ad-ci.off { opacity: 0.55; }
.ad-ci .art-sm { width: 40px; height: 40px; font-size: 40px; }
.ad-ci b { font-size: 13px; }
.ad-ci small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; color: var(--text-2); }
.ad-ci small .amt .st { width: 13px; height: 13px; }
.ad-w { flex: none; width: 62px !important; height: 38px !important; padding: 0 6px !important; border-radius: 11px !important; text-align: center; font-size: 14px !important; }
.ad-ci-ch { flex: none; width: 48px; text-align: right; font: 800 12.5px var(--font); font-variant-numeric: tabular-nums; color: var(--violet-2); }
.ad-x { width: 30px; height: 30px; border-radius: 10px; color: var(--text-3); }
.ad-x svg { width: 16px; height: 16px; }
.ad-fit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--well);
  border: 1px solid var(--stroke);
}
.ad-fit .ad-adorn { flex: none; width: 88px; }
.ad-fit .ad-adorn .input { height: 38px; }
.ad-fit .btn-sm { height: 38px; }

/* Липкая панель сохранения над нижним меню */
.ad-savebar {
  position: sticky;
  bottom: calc(var(--tabbar-h) + 22px + var(--safe-b));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(60, 38, 124, 0.86), rgba(22, 13, 48, 0.92));
  border: 1px solid var(--stroke-2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(3, 1, 12, 0.6), var(--hl);
}
.ad-savebar .row { gap: 8px; }
.ad-dirty { display: none; align-items: center; gap: 7px; padding: 0 4px; font-size: 12px; font-weight: 800; color: var(--gold); }
.ad-dirty i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 1.4s infinite; }
.ad-savebar.dirty .ad-dirty { display: flex; animation: fadeUp 0.3s var(--ease); }
.ad-savebar.dirty .btn-primary { box-shadow: 0 0 0 2px rgba(255, 197, 61, 0.38), 0 10px 28px rgba(124, 58, 237, 0.5); }
.ad-del { flex: none; width: 50px; padding: 0; color: #ff9db0; }

/* Выбор подарков */
.ad-pick { max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; padding: 2px; transition: opacity var(--t); }
/* Идёт выдача подарка — выбор заморожен до ответа сервера */
.ad-pick.ad-frozen { pointer-events: none; opacity: 0.55; }
.ad-sheet-foot { padding-top: 2px; }

/* ---------- Выбор 3D-иконки ---------- */
.ad-icpick { display: flex; flex-direction: column; gap: 10px; }
.ad-icgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
  max-height: 236px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 18px;
  background: var(--well);
  border: 1px solid var(--stroke);
}
.ad-ic {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  transition: transform var(--t-fast) var(--spring), background var(--t), border-color var(--t), box-shadow var(--t);
}
.ad-ic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); transition: transform 0.35s var(--spring); }
.ad-ic:active { transform: scale(0.86); }
@media (hover: hover) {
  .ad-ic:hover img { transform: scale(1.12) rotate(-4deg); }
}
.ad-ic.on { background: rgba(139, 92, 246, 0.28); border-color: rgba(167, 139, 250, 0.7); box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3), 0 8px 18px rgba(124, 58, 237, 0.35); }
.ad-ic.on img { transform: scale(1.1); }
.ad-ic.on::after {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: var(--grad-primary);
  animation: pop 0.35s var(--spring);
}

/* ---------- Подарки ---------- */
.ad-tile-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.ad-tm { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; color: var(--text-3); }
.ad-tm .ico svg { width: 11px; height: 11px; }
.ad-gsheet { gap: 12px; }
.ad-gp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: radial-gradient(120% 130% at 0% 50%, rgba(var(--rc), 0.28), transparent 60%), rgba(10, 6, 26, 0.45);
  border: 1px solid rgba(var(--rc), 0.3);
  transition: background 0.35s var(--ease), border-color 0.35s;
}
.ad-gp-art { flex: none; width: 100px; height: 100px; }
.ad-gp-art .art { animation: popIn 0.45s var(--spring); }
.ad-gp-name { font: 800 17px/1.2 var(--font-d); text-transform: uppercase; }
.ad-gp-val { margin-top: 6px; font-size: 16px; }
.ad-gp-val .amt .st { width: 17px; height: 17px; }
.ad-gp-rar { margin-top: 8px; color: rgb(var(--rc)); background: rgba(var(--rc), 0.18); border-color: rgba(var(--rc), 0.45); }
.ad-gp-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ad-gp-stats span { display: inline-flex; align-items: center; gap: 5px; }
.ad-gp-stats .ico svg { width: 14px; height: 14px; color: var(--text-3); }

/* ---------- Игры и шансы ---------- */
.ad-game { transition: opacity 0.3s, filter 0.3s; }
.ad-game::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(90% 100% at 0% 0%, rgba(var(--gc, 139, 92, 246), 0.22), transparent 70%);
}
.ad-game.off .ad-game-h { opacity: 0.55; filter: grayscale(0.6); }
.ad-game-h { position: relative; display: flex; align-items: center; gap: 12px; transition: opacity 0.3s, filter 0.3s; }
.ad-game-h h2 { font: 800 16px/1.2 var(--font-d); text-transform: uppercase; }
.ad-game-h small { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--text-3); }

.ad-plinko .seg button { height: 34px; }
.ad-buckets { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.ad-bk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 4px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  transition: background 0.25s, border-color 0.25s;
  animation: popIn 0.4s var(--spring) both;
}
.ad-bk-in {
  width: 100%;
  height: 30px;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  background: rgba(8, 5, 20, 0.55);
  color: var(--text);
  font: 800 13px var(--font);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.ad-bk-in:focus { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.6); }
.ad-bk small { font-size: 9.5px; font-weight: 700; color: var(--text-3); }
.ad-bk.t0 .ad-bk-in { color: var(--text-2); }
.ad-bk.t1 { border-color: rgba(167, 139, 250, 0.3); }
.ad-bk.t2 { background: rgba(255, 106, 213, 0.1); border-color: rgba(255, 106, 213, 0.35); }
.ad-bk.t3 { background: rgba(255, 197, 61, 0.12); border-color: rgba(255, 197, 61, 0.45); }
.ad-bk.t3 .ad-bk-in { color: var(--gold); }
.ad-prtp { font-size: 13px; font-weight: 700; color: var(--text-2); }
.ad-pmx { display: grid; grid-template-columns: 34px repeat(3, 1fr); align-items: center; gap: 5px; }
.ad-pmx-h { font: 800 10.5px/1 var(--font); letter-spacing: 0.04em; text-align: center; text-transform: uppercase; color: var(--text-3); }
.ad-pmx-c {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  font: 800 12.5px var(--font);
  font-variant-numeric: tabular-nums;
  transition: transform var(--t-fast) var(--spring), background var(--t), border-color var(--t);
}
.ad-pmx-c:active { transform: scale(0.92); }
.ad-pmx-c.on { background: rgba(139, 92, 246, 0.3); border-color: rgba(167, 139, 250, 0.65); box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3); }

.ad-sym { display: grid; grid-template-columns: 34px 52px 1fr 1fr; align-items: center; gap: 6px; }
.ad-sym-h { font: 800 10.5px/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.ad-sym-ic { width: 34px; height: 34px; display: grid; place-items: center; font-size: 22px; }
.ad-sym-ic img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.ad-sym .input { height: 40px; border-radius: 12px; font-size: 14px; }
.ad-sym-emo { padding: 0 4px !important; text-align: center; font-size: 18px !important; }
.ad-sym .ad-adorn.pre .input { padding-left: 26px; }
.ad-sym .ad-adorn.suf .input { padding-right: 26px; }
.ad-sym .ad-pre { left: 10px; }
.ad-sym .ad-suf { right: 10px; }
.ad-slot-tot { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.ad-slot-tot b { color: var(--text); }

/* ---------- Промокоды ---------- */
.ad-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-weight: 800 !important; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-field .row > .input { flex: 1; min-width: 0; }
.ad-gen { width: 44px; height: 44px; border-radius: 13px; color: var(--violet-2); }
.ad-casepick { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.ad-cchip { height: 38px; gap: 7px; padding: 0 10px 0 6px; }
.ad-cchip .amt { font-size: 12px; color: var(--text-2); }
.ad-cchip .amt .st { width: 13px; height: 13px; }
.ad-promos { display: flex; flex-direction: column; gap: 8px; }
.ad-promo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: var(--grad-card);
  border: 1px solid var(--stroke);
  box-shadow: var(--hl);
  transition: opacity 0.3s, transform 0.3s var(--ease), filter 0.3s;
}
.ad-promo.off { opacity: 0.6; filter: saturate(0.4); }
.ad-promo.ad-gone { opacity: 0; transform: translateX(30px) scale(0.96); }
.ad-promo-top { display: flex; align-items: center; gap: 10px; }
.ad-promo-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; }
.ad-promo-ic.stars { background: rgba(255, 197, 61, 0.14); border: 1px solid rgba(255, 197, 61, 0.35); }
.ad-promo-ic.stars .st { width: 19px; height: 19px; }
.ad-promo-ic.case { color: var(--violet-2); background: rgba(139, 92, 246, 0.18); border: 1px solid rgba(167, 139, 250, 0.35); }
.ad-promo-ic.case svg { width: 18px; height: 18px; }
.ad-promo-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: none;
  color: var(--text);
  font: 800 15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ad-promo-code .ico { color: var(--text-3); }
.ad-promo-code .ico svg { width: 14px; height: 14px; }
.ad-promo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ad-promo-meta .amt b { font-size: 13px; }
.ad-promo-meta .amt .st { width: 14px; height: 14px; }

/* ---------- Настройки ---------- */
.ad-sys { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--stroke); font-size: 13.5px; font-weight: 700; }
/* Короткое значение — справа; если всё же не влезло, переносится, а не обрезается (подсказки title на телефоне нет) */
.ad-sys b { max-width: 62%; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
/* Длинное значение (ошибка, предупреждение, адрес) — второй строкой под подписью, на всю ширину */
.ad-sys.long { align-items: flex-start; }
.ad-sys.long .ad-sys-ic { margin-top: 1px; }
.ad-sys.long > .grow { min-width: 0; }
.ad-sys-v { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 700; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.ad-sys-v.bad { color: #ffb3c1; }
.ad-sys-v.warn { color: #ffe08a; }
.ad-sys-ic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; }
.ad-sys-ic svg { width: 14px; height: 14px; stroke-width: 3; }
.ad-sys-ic.ok { color: var(--green); background: rgba(70, 240, 143, 0.14); }
.ad-sys-ic.warn { color: var(--gold); background: rgba(255, 197, 61, 0.14); }
.ad-sys-ic.bad { color: var(--red); background: rgba(255, 77, 109, 0.14); }
.ad-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: #ffd0d9;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.4);
}
.ad-warn .ico { flex: none; color: var(--red); }
.ad-warn .ico svg { width: 17px; height: 17px; }
.ad-imgprev { max-height: 180px; overflow: hidden; border-radius: 16px; background: var(--well); border: 1px solid var(--stroke); animation: fadeIn 0.3s var(--ease); }
.ad-imgprev img { width: 100%; max-height: 180px; object-fit: cover; }

/* ---------- Журнал ставок ---------- */
.ad-bfilter { display: flex; align-items: center; gap: 8px; }
.ad-bfilter .ad-search .input { padding-right: 42px; }
.ad-bfilter .btn-sm { height: 46px; flex: none; }
.ad-bsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ad-bsum > div { min-width: 0; padding: 8px 9px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }
.ad-bsum small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-bsum > div > b { display: block; margin-top: 2px; font-size: 13px; }
.ad-bsum .amt { max-width: 100%; margin-top: 2px; overflow: hidden; font-size: 13px; }
.ad-bsum .amt .st { width: 13px; height: 13px; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 380px) {
  .ad-tab { padding: 0 10px; }
  .ad-kpi-v { font-size: 18px; }
  .ad-ci .art-sm { width: 34px; height: 34px; font-size: 34px; }
  .ad-w { width: 54px !important; }
  .ad-ci-hw { width: 54px; }
  .ad-look { grid-template-columns: 78px 1fr; }
  .ad-sym { grid-template-columns: 30px 46px 1fr 1fr; }
  .ad-bsum { grid-template-columns: repeat(2, 1fr); }
}

/* Выбор картинки: поиск по подаркам Telegram */
.ad-icq { height: 40px; }
.ad-icempty { grid-column: 1 / -1; padding: 18px 6px; text-align: center; }
.ad-icgrid .spinner { grid-column: 1 / -1; }

/* ---------- Вкладка «Выводы» (public/js/admin/withdraw.js) ---------- */
.wd-ad { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.wd-ad-card { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wd-ad-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wd-ad-head h2 { font: 800 15px/1.2 var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; }
.wd-ad-hint { font-size: 11.5px; font-weight: 600; line-height: 1.45; color: var(--text-3); }
/* «Меняет только владелец» вместо кнопки сохранения; поля при этом только для чтения */
.wd-ad-lock { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); background: rgba(255, 197, 61, 0.07); border: 1px solid rgba(255, 197, 61, 0.22); }
.wd-ad-lock .ico { flex: none; margin-top: 1px; color: var(--gold); }
.wd-ad-lock .ico svg { width: 15px; height: 15px; }
.wd-ad .input:disabled, .wd-ad .switch:disabled { opacity: 0.55; cursor: default; }
/* Задания и розыгрыши: что админу (не владельцу) недоступно — пометка и поля только для чтения */
.tk-ad-lock { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); border-color: rgba(255, 197, 61, 0.3); }
.tk-ad-lock .ico svg { width: 11px; height: 11px; display: block; }
.tk-ad-bad { color: var(--red) !important; }
.tk-ad-form .input:disabled, .tk-ad-form .switch:disabled, .tk-ad-form .tk-ad-ic:disabled, .tk-ad-form .tk-ad-sw:disabled { opacity: 0.55; cursor: default; }
.gw-adm-lock { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; line-height: 1.45; color: var(--text-2); background: rgba(255, 197, 61, 0.07); border: 1px solid rgba(255, 197, 61, 0.22); }
.gw-adm-lock .ico { flex: none; margin-top: 1px; color: var(--gold); }
.gw-adm-lock .ico svg { width: 15px; height: 15px; display: block; }
.wd-ad-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 700; line-height: 1.4; color: #ffd6a0; background: rgba(255, 159, 28, 0.12); border: 1px solid rgba(255, 159, 28, 0.35); }
.wd-ad-warn.soft { color: #d9ccff; background: rgba(139, 92, 246, 0.12); border-color: rgba(167, 139, 250, 0.35); }
.wd-ad-warn .ico svg { width: 16px; height: 16px; }
.wd-ad-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wd-ad-kpi { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }
.wd-ad-kpi small { font-size: 11px; font-weight: 700; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-ad-kpi b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wd-ad-text { min-height: 74px; resize: vertical; font: 600 14px/1.4 var(--font); }
.wd-ad-textfoot { display: flex; justify-content: space-between; gap: 10px; }
.wd-ad-count { flex: none; font-variant-numeric: tabular-nums; }
.wd-ad-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-ad-map { display: grid; gap: 8px; }
.wd-ad-maprow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wd-ad-maprow .art { flex: none; }
.wd-ad-mapname { min-width: 0; display: grid; gap: 2px; font-weight: 800; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wd-ad-sel { flex: none; width: 128px; height: 38px; padding: 0 8px; font-size: 13px; }
.wd-ad-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.wd-ad-filters::-webkit-scrollbar { display: none; }
.wd-ad-filters .chip { flex: none; }
.wd-ad-n { margin-left: 4px; font-weight: 800; color: var(--gold); }
.wd-ad-list { display: grid; gap: 10px; }
.wd-ad-row { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }
.wd-ad-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wd-ad-top .art { flex: none; }
.wd-ad-info { min-width: 0; display: grid; gap: 3px; }
.wd-ad-info b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.wd-ad-info small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11.5px; color: var(--text-3); }
.wd-ad-right { flex: none; display: grid; justify-items: end; gap: 5px; }
.wd-ad-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.wd-ad-note { min-width: 0; overflow-wrap: anywhere; }
.wd-ad-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-ad-acts .btn { flex: 1 1 auto; }

/* Худший случай для банка в карточке игры */
.ad-maxwin { display: block; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; line-height: 1.4; color: #ffd98a; background: rgba(255, 197, 61, 0.1); border: 1px solid rgba(255, 197, 61, 0.28); }

/* ---------- Автообновление (сводка, база) ---------- */
.ad-upd { display: flex; align-items: center; gap: 7px; margin: -2px 4px 0; font-size: 11.5px; font-weight: 700; color: var(--text-3); transition: color var(--t); }
.ad-upd .live-dot { width: 6px; height: 6px; }
/* Данные давно не обновлялись (нет связи) — подпись желтеет, точка замирает */
.ad-upd.stale { color: var(--gold); }
.ad-upd.stale .live-dot { background: var(--gold); animation: none; }
/* Перерисовка по таймеру — без анимаций появления, иначе вкладка «моргала» бы каждые полминуты */
.ad-calm .stagger > *,
.ad-calm .ad-chart-svg .ad-bar,
.ad-calm .ad-meter i,
.ad-calm .ad-share i,
.ad-calm .ad-dtable { animation: none; }

/* Плитка-предупреждение (мало звёзд у бота, мало места на диске) */
.ad-kpi.warn {
  border-color: rgba(255, 77, 109, 0.55);
  background: radial-gradient(120% 120% at 100% 0%, rgba(255, 77, 109, 0.2), transparent 60%), var(--grad-card);
  box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.18), var(--sh-1), var(--hl);
}
.ad-kpi.warn .ad-kpi-s { color: #ff9db0; }
.ad-num { font-variant-numeric: tabular-nums; }
.ad-sys-ic.info { color: var(--violet-2); background: rgba(139, 92, 246, 0.14); }

/* ---------- Карточка игрока: новые действия ---------- */
.ad-us-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 20px; padding: 0 2px; font-size: 12.5px; font-weight: 700; }
.ad-us-prev .amt .st { width: 14px; height: 14px; }
textarea.input.ad-ta { min-height: 76px; font: 600 14px/1.45 var(--font); }
.ad-ta-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-cnt { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ad-ask { padding: 4px 0 2px; }
.ad-access { gap: 10px; }
.ad-ban-info { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 77, 109, 0.08); border: 1px solid rgba(255, 77, 109, 0.28); animation: fadeUp 0.3s var(--ease); }
.ad-ban-info b { font-size: 13.5px; font-weight: 800; line-height: 1.35; color: #ffd0d9; overflow-wrap: anywhere; }
.ad-ban-info small { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.ad-us-hist { display: flex; flex-direction: column; gap: 10px; }
.ad-grow .art-sm { width: 40px; height: 40px; font-size: 40px; }
.ad-grow .ad-r .badge { margin-top: 1px; }
.ad-sheet-foot { display: flex; flex-direction: column; gap: 10px; }
.ad-pick-opt { padding: 10px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }

/* ---------- Администраторы ---------- */
.ad-arow { gap: 6px; padding: 6px 0; }
.ad-arow-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 2px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--t), transform var(--t-fast) var(--ease);
}
.ad-arow-main:active { transform: scale(0.985); background: rgba(255, 255, 255, 0.04); }
@media (hover: hover) {
  .ad-arow-main:hover { background: rgba(255, 255, 255, 0.03); }
}
.ad-addrow { gap: 8px; }
.ad-addrow .btn { flex: none; height: 44px; border-radius: 13px; }

/* ---------- База данных ---------- */
.ad-health > .ad-sys:last-child { border-bottom: 0; }
.ad-mislist { margin: 6px 0 2px; padding: 0 10px; border-radius: 14px; background: rgba(255, 77, 109, 0.06); border: 1px solid rgba(255, 77, 109, 0.22); }
.ad-foot-row { align-items: center; gap: 10px; }
.ad-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-btns .btn { flex: 1 1 auto; }
.ad-bkrow { gap: 10px; }
.ad-bkrow .ad-ellip small { font: 600 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ad-kind {
  flex: none;
  min-width: 62px;
  height: 24px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  font: 800 10px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke-2);
}
.ad-kind.hourly { color: #c9bbff; background: rgba(139, 92, 246, 0.14); border-color: rgba(167, 139, 250, 0.35); }
.ad-kind.daily { color: var(--mint); background: rgba(61, 245, 194, 0.1); border-color: rgba(61, 245, 194, 0.32); }
.ad-kind.manual { color: var(--gold); background: rgba(255, 197, 61, 0.1); border-color: rgba(255, 197, 61, 0.32); }
.ad-kind.startup, .ad-kind.premigrate { color: var(--cyan); background: rgba(47, 217, 245, 0.08); border-color: rgba(47, 217, 245, 0.28); }
.ad-path { display: block; margin-top: 4px; font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-3); overflow-wrap: anywhere; }

/* ---------- Журнал действий ---------- */
.ad-lrow { align-items: flex-start; }
.ad-lrow .ic-tile { margin-top: 1px; }
/* Ссылки «админ → игрок» в мелком тексте: область нажатия больше самого текста (поля и равные им
   отрицательные отступы — вёрстка не сдвигается). Строка с ними обрезает переполнение (многоточие),
   поэтому у неё самой есть поля — под увеличенную область */
.ad-ellip > .ad-lmeta { margin: -4px -5px -6px; padding: 6px 5px; }
/* position + z-index: увеличенная область ссылки — поверх строки деталей, которая заходит на её нижние поля */
.ad-link { position: relative; z-index: 1; margin: -6px -5px; padding: 6px 5px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 800; color: var(--violet-2); cursor: pointer; }
.ad-link:active { opacity: 0.7; background: rgba(167, 139, 250, 0.12); }
.ad-larr { display: inline-block; margin: 0 11px; color: var(--text-3); }
.ad-ellip > .ad-ldet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text-2);
  cursor: pointer;
}
/* Нажатие на детали — показать их целиком */
.ad-ellip > .ad-ldet.open { display: block; -webkit-line-clamp: unset; line-clamp: none; }

@media (max-width: 380px) {
  .ad-kind { min-width: 0; padding: 0 6px; }
  .ad-btns .btn { flex-basis: 100%; }
}

/* ---------- Оплата звёздами Telegram (вкладка «Оплата», плитки сводки, карточка игрока) ---------- */
.ad-skel-bank { height: 236px; border-radius: var(--r-l); }
/* Банк бота: 3D-звезда, звёзды на балансе бота, итоги пополнений банка */
.ad-bank-top { display: flex; align-items: center; gap: 14px; }
.ad-bank-art {
  position: relative;
  flex: none;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 38%, rgba(255, 197, 61, 0.3), rgba(255, 197, 61, 0.05) 70%);
  border: 1px solid rgba(255, 197, 61, 0.32);
}
.ad-bank-art img { width: 44px; height: 44px; object-fit: contain; animation: floatyRot 4.2s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45)); }
.ad-bank-info { flex: 1; min-width: 0; }
.ad-bank-v { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 800 28px/1.1 var(--font); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-bank-v .st { width: 24px; height: 24px; }
.ad-bank-v b { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ad-bank-v.none b { background: none; color: var(--text-3); }
.ad-bank-v.none .st { opacity: 0.4; }
.ad-bank-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.ad-sep { height: 1px; margin: 2px 0; background: var(--stroke); }
.ad-pay-l { margin-top: 2px; }
.ad-pay-h { margin: 8px 4px 0; }
/* Ждём, пока Telegram подтвердит оплату счёта */
.ad-pay-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #d9ccff;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  animation: fadeUp 0.3s var(--ease);
}
.ad-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--violet-2); animation: spin 0.8s linear infinite; }
/* Итог тестового подарка: отправлен (зелёный) или нет (красный) — с балансом бота до и после */
.ad-payres { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 14px; animation: fadeUp 0.3s var(--ease); }
.ad-payres > .ico { flex: none; margin-top: 1px; }
.ad-payres > .ico svg { width: 17px; height: 17px; }
.ad-payres b { display: block; font-size: 13.5px; font-weight: 800; }
.ad-payres small { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.ad-payres.ok { background: rgba(61, 245, 194, 0.1); border: 1px solid rgba(61, 245, 194, 0.32); }
.ad-payres.ok > .ico { color: var(--mint); }
.ad-payres.bad { background: rgba(255, 77, 109, 0.1); border: 1px solid rgba(255, 77, 109, 0.35); }
.ad-payres.bad > .ico { color: var(--red); }
/* Мягкое предупреждение (жёлтое): тестовое пополнение и оплата звёздами не включаются вместе */
.ad-warn.ad-soft { color: #ffe3a6; background: rgba(255, 197, 61, 0.1); border-color: rgba(255, 197, 61, 0.35); }
.ad-warn.ad-soft .ico { color: var(--gold); }
.ad-anom { align-items: center; }
.ad-anom .btn { flex: none; }
/* Настройки только для чтения (админ — не владелец) */
.ad-ro .input:disabled, .ad-ro .switch:disabled { opacity: 0.55; cursor: default; }
/* Строка платежа: имя плательщика — ссылка на карточку, «Вернуть» — у оплаченных (владелец) */
.ad-prow { gap: 10px; }
.ad-prow.off .ic-tile, .ad-prow.off .ad-r .amt { opacity: 0.5; }
.ad-ellip > .ad-plink {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: 800 14px/1.35 var(--font);
  color: var(--violet-2);
  text-align: left;
  cursor: pointer;
}
.ad-plink > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-plink:active { opacity: 0.7; }
/* Почему аномалия не зачислена */
.ad-ellip > .ad-pwhy { color: #ff9db0; }
.ad-ptag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; vertical-align: 1px; color: var(--cyan); background: rgba(47, 217, 245, 0.1); }
.ad-ref { flex: none; height: 32px; padding: 0 10px; gap: 5px; border-radius: 10px; font-size: 12px; }
.ad-ref .ico svg { width: 14px; height: 14px; }
/* Итог в реальных звёздах (окно с плитки сводки) */
.ad-net-total { border-top: 1px dashed var(--stroke-2); }
.ad-net-total b { font: 800 12.5px/1.2 var(--font-d); letter-spacing: 0.03em; text-transform: uppercase; }
.ad-net-aside { padding: 0 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--stroke); }

@media (max-width: 380px) {
  .ad-bank-v { font-size: 24px; }
  .ad-ref { padding: 0 8px; }
}

/* Строка платежа: «Вернуть» и «Зачислить» у аномалии — столбиком; возврат ждёт подтверждения Telegram */
.ad-pacts { display: flex; flex: none; flex-direction: column; gap: 4px; }
.ad-cred { flex: none; height: 32px; padding: 0 10px; gap: 5px; border-radius: 10px; font-size: 12px; color: var(--mint); }
.ad-cred .ico svg { width: 14px; height: 14px; }
.ad-pacts .ad-ref, .ad-pacts .ad-cred { height: 28px; }
@media (max-width: 380px) {
  .ad-cred { padding: 0 8px; }
}
.ad-ellip > .ad-pwait { color: var(--gold); }
/* Банк бота: сверка с историей звёзд */
.ad-rec { margin: 2px 0 4px; }
