/* Админ-панель — полировка поверх Telegram theme */
:root {
  --bg: var(--tg-theme-bg-color, #0c0e14);
  --bg-elev: #12151e;
  --text: var(--tg-theme-text-color, #f0f3fa);
  --hint: var(--tg-theme-hint-color, #8b93a7);
  --card: var(--tg-theme-secondary-bg-color, #161a24);
  --card-2: rgba(255,255,255,.03);
  --line: rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.12);
  --accent: var(--tg-theme-button-color, #5b8def);
  --accent-soft: rgba(91,141,239,.16);
  --danger: #ff6b7a;
  --ok: #3dd68c;
  --warn: #f0c14a;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(91,141,239,.14), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(61,214,140,.07), transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* Splash / denied */
.splash, .denied {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px; text-align: center;
}
.splash-title {
  font-size: 22px; font-weight: 750; letter-spacing: -.02em;
  margin-bottom: 4px;
}
.splash::after {
  content: "бот выгрузок";
  display: block; font-size: 13px; color: var(--hint); margin-top: 6px; margin-bottom: 8px;
}
.denied h1 { font-size: 22px; margin: 0 0 8px; letter-spacing: -.02em; }
.denied p { color: var(--hint); margin: 0; line-height: 1.45; }
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  margin-top: 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.main {
  padding: 10px 14px calc(24px + env(safe-area-inset-bottom));
  max-width: 920px; margin: 0 auto;
}
.top {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 14px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 20;
  padding: 8px 0 10px;
  background: linear-gradient(180deg, var(--bg) 65%, transparent);
  backdrop-filter: blur(8px);
}
.top h1 {
  margin: 0; flex: 1;
  font-size: 22px; font-weight: 780; letter-spacing: -.03em;
}
.stamp {
  font-size: 11px; color: var(--hint); width: 100%;
  letter-spacing: .01em;
}
.icon-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .1s;
}
.icon-btn:active { transform: scale(.96); }
.icon-btn:disabled { opacity: .45; }

/* Tabs */
.tabs {
  display: flex; gap: 7px;
  overflow-x: auto; padding: 2px 2px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs-wrap {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}
.nav-group { min-width: 0; }
.nav-label {
  display: block; font-size: 10px; font-weight: 750;
  color: var(--hint); text-transform: uppercase; letter-spacing: .08em;
  margin: 0 2px 5px;
}
.tab {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--hint);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 650;
  letter-spacing: -.01em;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.tab:active { transform: scale(.97); }
.tab.on {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(91,141,239,.35);
}
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 9px; font-size: 10px; font-weight: 800;
  background: var(--danger); color: #fff; vertical-align: middle;
}
.tab.on .tab-badge { background: #fff; color: var(--danger); }
.tab-badge.hidden { display: none !important; }

.now-box {
  display: grid; gap: 8px; margin-bottom: 14px;
}
.now-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
  cursor: pointer; text-align: left; width: 100%;
  color: inherit; font: inherit;
  transition: border-color .15s, background .15s, transform .1s;
}
.now-card:active { transform: scale(.99); }
.now-card.ok { border-color: rgba(61,214,140,.35); background: linear-gradient(135deg, rgba(61,214,140,.1), var(--card)); }
.now-card.warn { border-color: rgba(240,193,74,.4); background: linear-gradient(135deg, rgba(240,193,74,.1), var(--card)); }
.now-card.fail { border-color: rgba(255,107,122,.45); background: linear-gradient(135deg, rgba(255,107,122,.12), var(--card)); }
.now-card.muted { opacity: .85; }
.now-card-ico { font-size: 18px; line-height: 1.2; flex-shrink: 0; }
.now-card-body { flex: 1; min-width: 0; }
.now-card-title { font-weight: 750; font-size: 14px; margin: 0 0 2px; letter-spacing: -.01em; }
.now-card-sub { margin: 0; font-size: 12px; color: var(--hint); line-height: 1.4; }
.now-card-go { color: var(--hint); font-size: 18px; align-self: center; }

.ov-more {
  margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}
.ov-more summary {
  cursor: pointer; font-weight: 650; font-size: 13px; color: #9ec0ff;
  list-style: none;
}
.ov-more summary::-webkit-details-marker { display: none; }
.ov-more[open] summary { margin-bottom: 8px; }

.q-subtabs {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.q-tab {
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--hint); border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 650; flex: 1; min-width: 100px;
}
.q-tab.on {
  background: var(--accent-soft); color: var(--text);
  border-color: rgba(91,141,239,.4);
}
.q-panel { min-height: 40px; }

/* Sections */
.sect {
  font-size: 11px; font-weight: 750;
  margin: 22px 0 10px; color: var(--hint);
  text-transform: uppercase; letter-spacing: .08em;
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  opacity: .55;
}
.stat.warn::before { background: var(--warn); opacity: .9; }
.stat.err::before { background: var(--danger); opacity: .9; }
.stat.warn b { color: var(--warn); }
.stat.err b { color: var(--danger); }
.stat b {
  display: block; font-size: 24px; font-weight: 780;
  letter-spacing: -.03em; margin-bottom: 4px; line-height: 1.1;
}
.stat span { font-size: 12px; color: var(--hint); line-height: 1.3; }

.sys-flags {
  margin-top: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--hint); line-height: 1.55;
}

/* Charts */
.chart {
  display: flex; align-items: flex-end; gap: 5px; height: 128px;
  padding: 12px 8px 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow-x: auto;
}
.bar-wrap {
  flex: 1; min-width: 18px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; height: 100%; justify-content: flex-end;
}
.bar {
  width: 100%; max-width: 26px;
  border-radius: 5px 5px 2px 2px; min-height: 2px;
}
.bar.ok {
  background: linear-gradient(180deg, #6ae8ad, var(--ok));
}
.bar.err {
  background: linear-gradient(180deg, #ff9aa3, var(--danger));
  margin-top: 1px;
}
.bar-lbl { font-size: 9px; color: var(--hint); white-space: nowrap; transform: rotate(-45deg); margin-top: 8px; }

.breakdown { display: grid; gap: 10px; }
@media (min-width: 560px) { .breakdown { grid-template-columns: repeat(3, 1fr); } }
.bd-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.bd-title {
  font-size: 11px; font-weight: 750; color: var(--hint);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em;
}
.bd-row {
  display: flex; justify-content: space-between; font-size: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.bd-row:last-child { border-bottom: none; }

/* Filters / buttons */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px; align-items: stretch;
}
.filters select, .search {
  flex: 1 1 120px; min-width: 100px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 9px 12px; font-size: 13px;
  -webkit-appearance: menulist; appearance: menulist;
}
.filters select option { background: #1a1f2b; color: #eef1f6; }
.filters .btn-sm { flex: 0 0 auto; }
.search { min-width: 140px; }
.btn-sm {
  border: none; background: var(--accent); color: #fff;
  border-radius: 11px; padding: 9px 15px;
  font-weight: 650; font-size: 13px;
  box-shadow: 0 3px 12px rgba(91,141,239,.28);
  transition: transform .1s, filter .15s;
}
.btn-sm:active { transform: scale(.97); }
.btn-sm:disabled { opacity: .55; box-shadow: none; }
.btn-secondary {
  background: rgba(255,255,255,.06) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border: 1px solid var(--line) !important;
}
.btn-ghost.full {
  width: 100%; margin-top: 10px;
  border: 1px solid var(--line); background: transparent;
  color: var(--text); border-radius: 12px; padding: 12px; font-weight: 650;
}

/* Cards / list */
.list { display: flex; flex-direction: column; gap: 9px; }
.list.compact .card { padding: 11px 13px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  cursor: default;
  transition: border-color .15s, background .15s;
}
.card.click { cursor: pointer; }
.card.click:active { opacity: .88; }
.card.warn { border-color: rgba(240,193,74,.38); }
.card.err-card { border-color: rgba(255,107,122,.4); }
.card-head {
  display: flex; justify-content: space-between; gap: 8px;
  align-items: flex-start; margin-bottom: 6px;
}
.card-title { font-weight: 700; font-size: 14px; line-height: 1.3; letter-spacing: -.01em; }
.card-meta { font-size: 12px; color: var(--hint); line-height: 1.45; }
.badge {
  display: inline-block; font-size: 10px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(255,255,255,.06); flex-shrink: 0;
  border: 1px solid transparent;
}
.badge.ok { color: var(--ok); background: rgba(61,214,140,.12); border-color: rgba(61,214,140,.2); }
.badge.err { color: var(--danger); background: rgba(255,107,122,.12); border-color: rgba(255,107,122,.22); }
.badge.pending, .badge.warn { color: var(--warn); background: rgba(240,193,74,.12); border-color: rgba(240,193,74,.22); }
.badge.skip { color: var(--hint); }

.reconcile-card.status-fail {
  border-color: rgba(255,107,122,.4);
  background: linear-gradient(135deg, rgba(255,107,122,.09), var(--card));
}
.reconcile-card.status-warn {
  border-color: rgba(240,193,74,.35);
  background: linear-gradient(135deg, rgba(240,193,74,.07), var(--card));
}
.reconcile-card.status-ok { border-color: rgba(61,214,140,.28); }
.reconcile-card.status-skip { border-color: var(--line); opacity: .9; }

.card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card-actions button, .detail-actions button {
  flex: 1; min-width: 120px; border-radius: 11px; padding: 9px;
  font-weight: 650; font-size: 13px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
}
.card-actions .ok, .detail-actions .ok {
  background: rgba(61,214,140,.14); color: var(--ok); border-color: transparent;
}
.card-actions .no {
  background: rgba(255,107,122,.12); color: var(--danger); border-color: transparent;
}
.card-actions a, .detail-actions a {
  flex: 1; text-align: center; border-radius: 11px; padding: 9px;
  font-weight: 650; font-size: 13px; text-decoration: none;
  background: var(--accent-soft); color: #9ec0ff;
}

.meta { font-size: 12px; color: var(--hint); margin-bottom: 10px; line-height: 1.5; }
.meta.err { color: var(--danger); }
.filter-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 12px; padding: 9px 12px;
  background: var(--accent-soft); border: 1px solid rgba(91,141,239,.28);
  border-radius: 11px; font-size: 12px; color: var(--text);
}
.filter-hint.hidden { display: none !important; }
.filter-hint .hint-clear {
  border: none; background: rgba(255,255,255,.1); color: var(--text);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 650; cursor: pointer;
}

.kv { display: grid; gap: 6px; font-size: 13px; }
.kv div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.kv span:first-child { color: var(--hint); }
.run-row { font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Detail sheet */
.detail {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.58);
  display: flex; align-items: flex-end;
  backdrop-filter: blur(4px);
}
.detail-sheet {
  background: var(--card);
  border-radius: 22px 22px 0 0;
  width: 100%; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  border-top: 1px solid var(--line-strong);
}
.detail-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 10px; gap: 8px; flex-wrap: wrap;
}
.detail-tabs { display: flex; gap: 4px; }
.dtab {
  border: 1px solid var(--line); background: transparent; color: var(--hint);
  border-radius: 8px; padding: 5px 11px; font-size: 11px; font-weight: 650;
}
.dtab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.detail-body { margin: 0; padding: 0 16px 12px; max-height: 50vh; overflow: auto; }
.detail-json {
  margin: 0; padding: 0 16px 12px; max-height: 50vh; overflow: auto;
  font-size: 11px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; color: var(--hint);
}
.detail-actions { padding: 0 16px 18px; display: flex; gap: 8px; flex-wrap: wrap; }

.brief-block { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.brief-label {
  font-size: 10px; font-weight: 750; color: var(--hint);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
}
.brief-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 8px;
  background: rgba(255,255,255,.06); color: var(--text); line-height: 1.3;
}
.tag.flt { background: rgba(91,141,239,.14); color: #9ec0ff; }
.tag.col { background: rgba(61,214,140,.12); color: #7ddeb0; }
.tag.warn { color: var(--warn); }
.card-preview { font-size: 12px; color: var(--hint); line-height: 1.45; margin-top: 4px; }

.sys-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sys-btns button {
  flex: 1; min-width: 140px; border-radius: 11px; padding: 10px;
  font-weight: 650; font-size: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text);
}
.sys-btns button.danger { color: var(--danger); border-color: rgba(255,107,122,.3); }
.sys-btns button.ok { color: var(--ok); border-color: rgba(61,214,140,.3); }

.admin-toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 80;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  color: var(--text); padding: 11px 16px; border-radius: 14px;
  font-size: 13px; font-weight: 650;
  box-shadow: var(--shadow); max-width: 90vw;
}
.admin-toast.err { border-color: rgba(255,107,122,.5); color: var(--danger); }

.nl-text { font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.nl-pre {
  margin: 0; font-size: 11px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
  color: var(--hint); max-height: 240px; overflow: auto;
  background: rgba(0,0,0,.25); padding: 8px 10px; border-radius: 8px;
}
.nl-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.nl-list li.ok { color: var(--ok); }
.nl-list li.warn { color: var(--warn); }
.nl-val { font-size: 12px; padding: 4px 0; }
.nl-val.err { color: var(--danger); }
.nl-val.warn { color: var(--warn); }
.nl-val.ok { color: var(--ok); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.ops-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
}
@media (max-width: 520px) {
  .ops-grid { grid-template-columns: 1fr; }
}
.health-box { margin-bottom: 14px; }
.health-box .now-card { cursor: default; }
.health-box .now-card.expandable { cursor: pointer; }
.health-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;
}
@media (max-width: 520px) {
  .health-detail { grid-template-columns: 1fr; }
}
.ops-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 11px 12px; cursor: default;
}
.ops-card.click { cursor: pointer; }
.ops-card.ok { border-color: rgba(52,199,89,.35); }
.ops-card.warn { border-color: rgba(255,159,10,.4); }
.ops-card.fail, .ops-card.err { border-color: rgba(255,69,58,.45); }
.ops-card .ops-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ops-card .ops-sub { font-size: 12px; color: var(--hint); line-height: 1.4; }
.broadcast-box {
  padding: 14px 14px 12px;
}
.broadcast-box .reply-text {
  min-height: 84px; width: 100%; box-sizing: border-box; resize: vertical;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text);
  padding: 11px 12px; font: inherit; font-size: 14px; line-height: 1.45;
  margin-top: 4px;
}
.broadcast-box .reply-text:focus {
  outline: none; border-color: rgba(91,141,239,.55);
  box-shadow: 0 0 0 3px rgba(91,141,239,.15);
}
.broadcast-box .filters { margin: 10px 0 0; gap: 8px; }
.broadcast-box .filters select {
  flex: 1; min-width: 140px;
}
.broadcast-box label.meta { color: var(--hint); font-size: 12.5px; }
#bc-preview {
  margin-top: 10px; padding: 9px 11px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  line-height: 1.4;
}
#llm-usage-box {
  padding: 14px;
}
#llm-usage-box .llm-kpi {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px;
}
#llm-usage-box .llm-kpi-card {
  border-radius: 12px; padding: 10px 11px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
#llm-usage-box .llm-kpi-label {
  font-size: 11px; color: var(--hint); margin: 0 0 4px; text-transform: none;
}
#llm-usage-box .llm-kpi-val {
  font-size: 16px; font-weight: 750; letter-spacing: -.02em; margin: 0;
}
#llm-usage-box .llm-kpi-sub {
  font-size: 11.5px; color: var(--hint); margin: 3px 0 0;
}
.reply-box {
  margin-top: 12px; display: flex; flex-direction: column; gap: 8px;
}
.reply-box textarea {
  width: 100%; min-height: 72px; resize: vertical;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text);
  padding: 10px; font: inherit; font-size: 14px;
}
.reply-box .card-actions { margin: 0; }

.chain-timeline { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.chain-row {
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
  font-size: 12px; padding: 7px 9px; border-radius: 10px;
  background: rgba(255,255,255,.035);
}
.chain-row.chain-on { outline: 1px solid var(--accent); background: var(--accent-soft); }
.chain-time { color: var(--hint); min-width: 88px; }
.chain-kind { font-weight: 650; }
.chain-text { color: var(--hint); flex: 1 1 120px; }
.chain-tag { font-size: 10px; vertical-align: middle; }

/* Reconcile */
.rec-intro {
  background: linear-gradient(145deg, rgba(91,141,239,.1), rgba(255,255,255,.02));
  border: 1px solid rgba(91,141,239,.22);
  border-radius: var(--radius);
  padding: 16px 15px 12px; margin-bottom: 12px;
}
.rec-intro-title { font-size: 17px; font-weight: 780; letter-spacing: -.02em; margin-bottom: 6px; }
.rec-intro-text { margin: 0; font-size: 13px; color: var(--hint); line-height: 1.5; }
.rec-help { margin-top: 10px; font-size: 13px; }
.rec-help summary {
  cursor: pointer; color: #9ec0ff; font-weight: 650; list-style: none;
}
.rec-help summary::-webkit-details-marker { display: none; }
.rec-help ul { margin: 8px 0 0; padding-left: 18px; color: var(--hint); line-height: 1.55; }
.rec-help-note { margin: 8px 0 0; font-size: 12px; color: var(--hint); line-height: 1.4; }
.t-ok { color: var(--ok); }
.t-warn { color: var(--warn); }
.t-fail { color: var(--danger); }
.t-skip { color: var(--hint); }
.rec-actions { margin-bottom: 6px; }
.rec-stamp { font-size: 11px; color: var(--hint); margin: 0 2px 12px; }
.rec-hero {
  border-radius: var(--radius); padding: 16px 16px; margin-bottom: 12px;
  border: 1px solid var(--line); background: var(--card);
}
.rec-hero.ok {
  border-color: rgba(61,214,140,.35);
  background: linear-gradient(135deg, rgba(61,214,140,.12), rgba(22,26,36,.9));
}
.rec-hero.warn {
  border-color: rgba(240,193,74,.4);
  background: linear-gradient(135deg, rgba(240,193,74,.12), rgba(22,26,36,.9));
}
.rec-hero.fail {
  border-color: rgba(255,107,122,.45);
  background: linear-gradient(135deg, rgba(255,107,122,.14), rgba(22,26,36,.9));
}
.rec-hero-title { font-size: 19px; font-weight: 800; margin: 0 0 5px; letter-spacing: -.02em; }
.rec-hero.ok .rec-hero-title { color: var(--ok); }
.rec-hero.warn .rec-hero-title { color: var(--warn); }
.rec-hero.fail .rec-hero-title { color: var(--danger); }
.rec-hero-sub { margin: 0; font-size: 13px; color: var(--hint); line-height: 1.45; }
.rec-group { margin-top: 18px; }
.rec-group-title {
  font-size: 11px; font-weight: 750; color: var(--hint);
  text-transform: uppercase; letter-spacing: .07em; margin: 0 0 9px;
}
.rec-why { font-size: 12px; color: var(--text); margin: 0 0 7px; line-height: 1.4; opacity: .92; }
.rec-bullets { margin: 0; padding-left: 16px; font-size: 12px; color: var(--hint); line-height: 1.45; }
.rec-bullets li { margin: 2px 0; }
.rec-loading { padding: 28px 12px; text-align: center; color: var(--hint); font-size: 13px; }

/* ── Анимации «покруче», но без клоунады ── */
@keyframes admFadeUp {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes admFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes admSheetUp {
  from { opacity: .4; transform: translateY(40%); }
  to { opacity: 1; transform: none; }
}
@keyframes admToastIn {
  from { opacity: 0; transform: translate(-50%, 18px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes admPulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,122,0); }
  50% { box-shadow: 0 0 0 8px rgba(255,107,122,.14); }
}
@keyframes admShine {
  from { transform: translateX(-120%) skewX(-18deg); }
  to { transform: translateX(220%) skewX(-18deg); }
}
@keyframes admBarGrow {
  from { transform: scaleY(0); opacity: .3; }
  to { transform: scaleY(1); opacity: 1; }
}
@keyframes admHeroOk {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes admBadgePop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes admSplashIn {
  from { opacity: 0; transform: translateY(10px); letter-spacing: .12em; }
  to { opacity: 1; transform: none; letter-spacing: -.02em; }
}

.splash-title { animation: admSplashIn .55s var(--ease-out) both; }

.panel.panel-enter {
  animation: admFadeUp .38s var(--ease-out);
}

.now-box .now-card {
  position: relative;
  overflow: hidden;
  animation: admFadeUp .4s var(--ease-out) both;
}
.now-box .now-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.08) 50%, transparent 60%);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
.now-box .now-card.shine::after {
  animation: admShine .7s var(--ease-out);
}
.now-box .now-card:nth-child(1) { animation-delay: .03s; }
.now-box .now-card:nth-child(2) { animation-delay: .09s; }
.now-box .now-card:nth-child(3) { animation-delay: .15s; }
.now-box .now-card:nth-child(4) { animation-delay: .21s; }
.now-card.fail {
  animation-name: admFadeUp, admPulseSoft;
  animation-duration: .4s, 2.2s;
  animation-iteration-count: 1, 3;
}
.now-card:active { transform: scale(.975); }

.list > .card {
  animation: admFadeUp .34s var(--ease-out) both;
}
.list > .card:nth-child(1) { animation-delay: .02s; }
.list > .card:nth-child(2) { animation-delay: .05s; }
.list > .card:nth-child(3) { animation-delay: .08s; }
.list > .card:nth-child(4) { animation-delay: .11s; }
.list > .card:nth-child(5) { animation-delay: .14s; }
.list > .card:nth-child(n+6) { animation-delay: .16s; }
.card.click:active { transform: scale(.985); }

.stats .stat {
  animation: admFadeUp .36s var(--ease-out) both;
}
.stats .stat:nth-child(1) { animation-delay: .02s; }
.stats .stat:nth-child(2) { animation-delay: .06s; }
.stats .stat:nth-child(3) { animation-delay: .1s; }
.stats .stat:nth-child(4) { animation-delay: .14s; }
.stats .stat b.counting { font-variant-numeric: tabular-nums; }

.chart .bar {
  transform-origin: bottom;
  animation: admBarGrow .55s var(--ease-out) both;
}
.chart .bar-wrap:nth-child(odd) .bar { animation-delay: .04s; }
.chart .bar-wrap:nth-child(even) .bar { animation-delay: .1s; }

.detail:not(.hidden) {
  animation: admFadeIn .22s var(--ease-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.detail:not(.hidden) .detail-sheet {
  animation: admSheetUp .42s var(--ease-out);
}

.admin-toast:not(.hidden) {
  animation: admToastIn .34s var(--ease-out);
}

.q-panel:not(.hidden) {
  animation: admFadeUp .32s var(--ease-out);
}

.tab-badge:not(.hidden) {
  animation: admBadgePop .35s var(--ease-out);
}

.rec-hero.ok {
  background: linear-gradient(120deg, rgba(61,214,140,.18), rgba(91,141,239,.1), rgba(61,214,140,.14));
  background-size: 200% 200%;
  animation: admHeroOk 4s ease infinite alternate;
}
.rec-hero.panel-pop {
  animation: admFadeUp .4s var(--ease-out);
}
.rec-hero.ok.panel-pop {
  animation: admFadeUp .4s var(--ease-out), admHeroOk 4s ease infinite alternate;
}

/* Sliding pill на табах */
.tabs {
  position: relative;
}
.tab-pill {
  position: absolute;
  top: 2px; left: 0;
  height: calc(100% - 4px);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(91,141,239,.4);
  transition: transform .38s var(--ease-out), width .38s var(--ease-out);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
.tab-pill.on { opacity: 1; }
.tabs .tab {
  position: relative;
  z-index: 1;
  background: transparent;
}
.tabs .tab.on {
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.tab, .q-tab, .btn-sm, .icon-btn, .now-card, .card.click {
  transition: transform .16s var(--ease-out), background .18s, border-color .18s, color .18s, opacity .18s, box-shadow .2s;
}
.btn-sm:active, .icon-btn:active, .q-tab:active { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  .panel.panel-enter,
  .now-box .now-card,
  .list > .card,
  .stats .stat,
  .detail:not(.hidden),
  .detail:not(.hidden) .detail-sheet,
  .admin-toast:not(.hidden),
  .q-panel:not(.hidden),
  .now-card.fail,
  .chart .bar,
  .splash-title,
  .tab-badge:not(.hidden),
  .rec-hero.ok,
  .now-box .now-card.shine::after {
    animation: none !important;
  }
  .tab-pill { transition: none !important; }
  .tab, .q-tab, .btn-sm, .icon-btn, .now-card, .card.click {
    transition: none !important;
  }
}
