/* ============================================================================
   ATHERYX — внутренние страницы (редизайн 2026-09): кабинет, магазин конфигов,
   страница лота, админка. Зависит от ax.css. Классы, которые генерируют
   скрипты страниц (карточки лотов, отзывы, строки таблиц админки), сохранены.
   ========================================================================== */

/* ── Каркас страницы ──────────────────────────────────────────────────── */
.ax-page {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 60px) 0 110px;
}
.ax-page-head {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.ax-page-head h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
}
.ax-page-head p { max-width: 660px; color: var(--fg-2); font-size: clamp(15px, 1.2vw, 17px); line-height: 1.6; }
.ax-page-head .ax-accent { color: var(--accent); }
.ax-page-head--center { justify-items: center; text-align: center; margin-inline: auto; max-width: 820px; }
.ax-page-head--center p { margin-inline: auto; }
.ax-page-head .acc-line { display: block; color: var(--accent); }
:root[data-theme="light"] .ax-page-head .acc-line { color: var(--accent-text); }
:root[data-theme="light"] .ax-page-head .ax-accent { color: var(--accent-text); }

/* Кнопка «Выйти» в шапке внутренних страниц: на узком экране — только иконка в круге */
@media (max-width: 520px) {
  .ax-header-actions .logout-label { display: none; }
  .ax-header .ax-header-actions .ax-btn--ghost { width: var(--hbtn); padding: 0; }
}

/* ── Кабинет ──────────────────────────────────────────────────────────── */
#dash-root { opacity: 0; transition: opacity 0.4s var(--ease); }
#dash-root.dash-visible { opacity: 1; }
.dash-loading { opacity: 0.45 !important; pointer-events: none; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}
.dash-main, .dash-side { display: grid; gap: 18px; }
.dash-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.profile-card { padding: 26px; overflow: hidden; }
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140px;
  display: none;
  pointer-events: none;
}
.profile-row { position: relative; display: flex; align-items: center; gap: 18px; }
/* Аватар — мем целиком (670×785), поэтому рамка по его пропорциям, а не круг. */
.profile-ava {
  width: 68px;
  height: 80px;
  flex: none;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}
.profile-ava img { width: 100%; height: 100%; object-fit: contain; }
.profile-meta { min-width: 0; flex: 1; display: grid; gap: 6px; }
.profile-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.profile-name strong { font: 600 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.profile-name .uid { color: var(--fg-3); font: 500 13px/1 var(--font-mono); }
.sub-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--fg-2); font-size: 14.5px; }
.sub-tier-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 4px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 11.5px/1 var(--font-body);
  letter-spacing: 0.02em;
}
.profile-actions { display: flex; align-items: center; gap: 8px; }

.info-pills {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.info-pill {
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--field);
}
.pill-label { display: flex; align-items: center; gap: 7px; color: var(--fg-3); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.pill-label i { font-size: 14px; }
.pill-val { margin-top: 6px; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-val.green { color: var(--ok); }
.pill-val.red { color: var(--err); }

.dash-box { display: grid; gap: 14px; align-content: start; }
.box-title { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.box-ic {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 19px;
}
.box-title h3 { font: 600 16px/1.25 var(--font-body); letter-spacing: -0.01em; }
.box-title p { margin-top: 3px; color: var(--fg-3); font-size: 13px; }
.key-input { font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.key-input::placeholder { letter-spacing: 0.08em; }

.sys-req { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sys-req div {
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--field);
  text-align: center;
}
.sys-req span { display: block; color: var(--fg-3); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.sys-req b { display: block; margin-top: 5px; font-size: 14px; }
.launcher-card { overflow: hidden; }
.launcher-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: none;
  pointer-events: none;
}
.help-note { color: var(--fg-3); font-size: 13px; text-align: center; }
.help-note a { color: var(--accent-text); font-weight: 600; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── Кабинет: раскладка «профиль сверху → лаунчер + действия → поддержка» ── */
.cab-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 28px; padding: 26px 28px; overflow: hidden; }
.cab-profile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 55%;
  display: none;
  pointer-events: none;
}
.cab-profile-main { position: relative; display: flex; align-items: center; gap: 20px; min-width: 0; }
.cab-profile .profile-ava { width: 92px; height: 108px; border-radius: 20px; }
.cab-profile .profile-name strong { font-size: 26px; }
.cab-profile .profile-actions { margin-left: auto; align-self: flex-start; }
.cab-profile .info-pills { margin-top: 0; }

.cab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; margin-top: 18px; align-items: stretch; }
.cab-launcher {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  overflow: hidden;
  background: var(--card-glass);
}
.cab-launcher-head { display: flex; align-items: center; gap: 14px; }
.cab-launcher-head .box-ic { width: 52px; height: 52px; font-size: 24px; }
.cab-launcher-head h3 { font: 600 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.cab-launcher-head p { margin-top: 4px; color: var(--fg-3); font-size: 13.5px; }
.cab-launcher .ax-btn { margin-top: auto; }
.cab-side { display: grid; gap: 18px; }
.cab-inline { display: flex; gap: 10px; }
.cab-inline .ax-input { flex: 1; min-width: 0; }
.cab-inline .ax-btn { flex: none; height: 46px; }

.cab-support { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 18px; padding: 20px 24px; }
.cab-support .box-title { margin: 0; }
.cab-support-btns { display: flex; gap: 10px; }

@media (max-width: 1024px) {
  .cab-profile { grid-template-columns: 1fr; }
  .cab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cab-profile { padding: 22px; }
  .cab-profile-main { flex-wrap: wrap; }
  .cab-profile .profile-actions { margin-left: 0; width: 100%; }
  .cab-inline { flex-direction: column; }
  .cab-support-btns { width: 100%; }
  .cab-support-btns .ax-btn { flex: 1; }
}
@media (max-width: 640px) {
  .dash-sub { grid-template-columns: 1fr; }
  .info-pills { grid-template-columns: 1fr; }
  .profile-row { flex-wrap: wrap; }
  .profile-actions { width: 100%; }
}

/* ── Магазин конфигов ─────────────────────────────────────────────────── */
.shop-main { opacity: 0; transition: opacity 0.35s var(--ease); }
.shop-main.ready { opacity: 1; }

.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 26px; }
.shop-search { position: relative; flex: 1 1 280px; min-width: 200px; }
.shop-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-4);
  font-size: 17px;
  pointer-events: none;
}
.shop-search input { padding-left: 48px; }
.shop-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
}
.shop-tabs button {
  height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-2);
  font: 600 13.5px/1 var(--font-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.shop-tabs button:hover { color: var(--fg); }
.shop-tabs button.active { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px -10px rgba(var(--accent-rgb), 0.7); }

.shop-publish { margin-bottom: 28px; padding: clamp(20px, 3vw, 30px); }
.shop-publish h2 { font-size: 22px; letter-spacing: -0.02em; }
.shop-publish .hint { margin: 8px 0 22px; color: var(--fg-3); font-size: 14px; line-height: 1.55; }
.shop-publish .hint b { color: var(--fg-2); }
.shop-publish .ax-field + .ax-field { margin-top: 18px; }
.req-mark { color: var(--err); }
.counter { color: var(--fg-4); font-weight: 500; letter-spacing: 0; }

.banner-pick-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  border: 1.5px dashed var(--line-2);
  background: var(--field);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.banner-pick-wrap:hover { border-color: var(--accent); background: var(--accent-soft); }
.banner-pick-wrap.set { border-style: solid; border-color: var(--line-2); }
.banner-pick-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-pick-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-size: 13.5px;
  pointer-events: none;
}
.banner-pick-placeholder i { font-size: 32px; color: var(--accent-text); }
.banner-pick-wrap.set .banner-pick-placeholder { display: none; }
.ava-note { margin-top: 4px; color: var(--fg-3); font-size: 12.5px; line-height: 1.55; }

.shop-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-card);
  border: 1.5px dashed var(--line-2);
  background: var(--field);
  color: var(--fg-2);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.shop-drop > i { font-size: 26px; color: var(--accent-text); }
.shop-drop:hover,
.shop-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.shop-drop.loaded { border-style: solid; border-color: var(--accent-line); }
.shop-drop.loaded i { color: var(--ok); }
.shop-sep {
  margin: 12px 0;
  color: var(--fg-4);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-align: center;
}
.json-area { font-family: var(--font-mono) !important; font-size: 12.5px !important; }
.publish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
}
.shop-card:hover { transform: translateY(-3px); border-color: var(--card-hover-line); box-shadow: var(--shadow); }
.card-banner { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--field); flex: none; }
.card-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.shop-card:hover .card-banner img { transform: scale(1.04); }
.card-banner-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--fg-3);
  background: var(--field);
}
.card-banner-ph i { font-size: 36px; color: var(--accent-text); }
.card-banner-ph span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 7, 11, 0.36);
  color: #fff;
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}
.card-badge.mine-badge { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 16px; }
.shop-card h3 {
  margin-bottom: 12px;
  font: 800 17px/1.3 var(--font-display);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.card-tag {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--dash);
}
.card-author-ava, .rv-ava {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 11px/1 var(--font-body);
  text-transform: uppercase;
}
.card-author-name { flex: 1; min-width: 0; color: var(--fg-2); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-author-check { color: var(--accent-text); font-size: 14px; flex: none; }
.card-rating, .card-downloads { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12.5px; }
.card-rating .star-icon, .star-icon { color: var(--star); }
.card-rating .rat-num { font-weight: 700; }
.card-downloads { color: var(--fg-3); }

.shop-empty, .shop-skeleton { padding: 80px 20px; color: var(--fg-3); text-align: center; }
.shop-empty i { display: block; margin-bottom: 12px; font-size: 40px; opacity: 0.6; }
.shop-more { margin-top: 28px; text-align: center; }

/* Звёзды с частичной заливкой */
.stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; letter-spacing: 1px; vertical-align: middle; }
.stars .base { color: var(--line-2); }
.stars .fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--star); }

/* ── Страница лота ────────────────────────────────────────────────────── */
.lot-main { opacity: 0; transition: opacity 0.35s var(--ease); }
.lot-main.ready { opacity: 1; }
.lot-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--fg-3); font-size: 13.5px; }
.lot-crumb a { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s ease; }
.lot-crumb a:hover { color: var(--fg); }
.lot-crumb .cur { max-width: 46vw; color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-state { padding: 90px 20px; color: var(--fg-3); text-align: center; }
.lot-state > i { display: block; margin-bottom: 14px; font-size: 44px; opacity: 0.6; }
.lot-state-title { margin-bottom: 6px; color: var(--fg); font-size: 17px; font-weight: 600; }
#lot-loading > i { animation: ax-spin 1s linear infinite; display: inline-block; }
@keyframes ax-spin { to { transform: rotate(360deg); } }

.lot-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 28px; align-items: start; }
.lot-viewer {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lot-viewer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lot-viewer-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--fg-3);
}
.lot-viewer-ph i { font-size: 54px; color: var(--accent-text); }
.lot-viewer-ph span { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.lot-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.lot-thumb { width: 104px; aspect-ratio: 16 / 9; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; cursor: pointer; }
.lot-thumb.active { border-color: var(--accent); }
.lot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lot-tagbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--dash);
}
.lot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.lot-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
}
.lot-metabar { display: flex; align-items: center; gap: 12px; color: var(--fg-3); font-size: 13.5px; white-space: nowrap; }
.lot-metabar strong, .lot-metabar b { color: var(--fg); font-weight: 700; }
.lot-metabar .sep { opacity: 0.4; }
.lot-metabar .rate { display: inline-flex; align-items: center; gap: 7px; }
.lot-title { margin: 24px 0 16px; font-size: clamp(24px, 3vw, 36px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; word-break: break-word; }
.lot-desc { color: var(--fg-2); font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

.lot-side { display: grid; gap: 16px; }
.m-author-card { display: flex; align-items: center; gap: 14px; }
.m-author-ava {
  width: 50px;
  height: 50px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 19px/1 var(--font-display);
  text-transform: uppercase;
  overflow: hidden;
}
.m-author-meta { min-width: 0; flex: 1; }
.m-author-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15.5px; }
.m-author-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-author-name i { color: var(--accent-text); flex: none; }
.m-author-rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--fg-3); font-size: 13px; }
.m-author-rating strong { color: var(--fg); }

.m-action-card { display: grid; gap: 12px; }
.m-action-title { color: var(--fg-3); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.m-price-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px dashed var(--dash); }
.m-price-label { color: var(--fg-2); font-weight: 500; }
.m-price-badge {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.m-install-note { color: var(--fg-3); font-size: 12.5px; line-height: 1.5; text-align: center; }
.m-install-note b { color: var(--fg-2); }

.rv-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rv-section-title i { color: var(--accent-text); font-size: 16px; }
.rv-count { margin-left: auto; color: var(--fg-3); letter-spacing: 0; text-transform: none; }
.rv-form { margin-bottom: 16px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--field); }
.rv-stars { display: inline-flex; gap: 6px; margin-bottom: 10px; font-size: 24px; line-height: 1; cursor: pointer; }
.rv-stars span { color: var(--line-2); transition: color 0.15s ease, transform 0.2s var(--ease); }
.rv-stars span:hover { transform: scale(1.15); }
.rv-stars span.on { color: var(--star); text-shadow: 0 0 12px rgba(245, 197, 24, 0.45); }
.rv-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rv-own-note { padding: 2px 0 14px; color: var(--fg-3); font-size: 13px; font-style: italic; }
.rv-list { display: grid; gap: 10px; }
.rv-item { padding: 13px 15px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--field); }
.rv-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.rv-author { font-size: 13.5px; font-weight: 600; }
.rv-date { margin-left: auto; color: var(--fg-3); font-size: 12px; }
.rv-text { color: var(--fg-2); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.rv-empty { padding: 4px 0; color: var(--fg-3); font-size: 13.5px; }
.rv-more { margin-top: 12px; text-align: center; }

@media (max-width: 960px) {
  .lot-grid { grid-template-columns: 1fr; }
  .lot-crumb .cur { max-width: 60vw; }
}

/* ── Админка (классы генерирует скрипт страницы — не переименовывать) ── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.12em;
}
.who, .who-tag { color: var(--fg-3); font-size: 13px; }
.who-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg-2);
  font-family: var(--font-mono);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-2);
  font: 600 13.5px/1 var(--font-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.admin-tab i { font-size: 16px; }
.admin-tab:hover { color: var(--fg); }
.admin-tab.active { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38); }

.admin-panel { display: none; }
.admin-panel.active { display: block; animation: plan-fade 0.45s var(--ease) both; }
@keyframes plan-fade { from { opacity: 0; transform: translateY(8px); } }

.admin-card {
  position: relative;
  padding: 22px;
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
}
.admin-card + .admin-card { margin-top: 18px; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.admin-toolbar .grow { flex: 1 1 260px; }
.dash-box-title { display: flex; align-items: center; gap: 10px; font: 600 16px/1.3 var(--font-body); }
.dash-box-title i { color: var(--accent-text); font-size: 19px; }
.section-note { margin: -4px 0 16px; max-width: 900px; color: var(--fg-3); font-size: 13.5px; line-height: 1.6; }
.section-note code, .hint code { padding: 1px 6px; border-radius: 7px; background: var(--field); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.92em; color: var(--fg-2); }

.a-input, .a-select {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg);
  font: 500 14px/1.2 var(--font-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.a-input { width: 100%; }
.a-input.mono { font-family: var(--font-mono); font-size: 13px; }
.a-input::placeholder { color: var(--fg-4); }
.a-input:focus, .a-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16); }
.a-select { padding-right: 30px; cursor: pointer; }
.a-select option { background: var(--surface-2); color: var(--fg); }

.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  color: var(--fg);
  font: 600 13.5px/1 var(--font-body);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.3s var(--ease);
}
.a-btn:hover { background: var(--glass-hover); }
.a-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.a-btn i { font-size: 16px; }
.a-btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38); }
.a-btn.primary:hover { background: var(--accent-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), var(--shadow-glow); }
.a-btn.small { height: 30px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.a-btn.warn { border-color: rgba(251, 191, 36, 0.4); color: var(--warn); background: rgba(251, 191, 36, 0.08); }
.a-btn.danger { border-color: rgba(248, 113, 113, 0.4); color: var(--err); background: var(--err-soft); }
:root[data-theme="light"] .a-btn.warn { color: #b45309; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field-grid.roomy { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.field { display: grid; gap: 7px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.field label { color: var(--fg-3); font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; }
.field .hint { color: var(--fg-4); font-size: 12.5px; line-height: 1.5; }
.field .hint b { color: var(--fg-2); }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--fg-2); font-size: 13.5px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }

.codes-out {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--fg);
  font: 500 13px/1.7 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}
.codes-out.show { display: block; }

.table-scroll { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th {
  position: sticky;
  top: 0;
  padding: 12px 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--fg-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.a-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background-color 0.15s ease; }
.a-table tbody tr:hover { background: var(--field); }
.a-table .uuid { color: var(--fg-3); font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.a-table .mono { font-family: var(--font-mono); font-size: 12.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { padding: 36px 12px; color: var(--fg-3); text-align: center; font-size: 14px; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag.green { background: var(--ok-soft); color: var(--ok); border-color: rgba(74, 222, 128, 0.3); }
.tag.gray { background: var(--field); color: var(--fg-3); border-color: var(--line); }
.tag.red { background: var(--err-soft); color: var(--err); border-color: rgba(248, 113, 113, 0.3); }
.tag.purple { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.tag.amber { background: rgba(251, 191, 36, 0.1); color: var(--warn); border-color: rgba(251, 191, 36, 0.3); }
:root[data-theme="light"] .tag.amber { color: #b45309; }

/* Модалка админки (#modal.show) */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(var(--bg-rgb), 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.modal-back.show { display: grid; }
.modal-box {
  width: min(100%, 460px);
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 40px 120px -24px rgba(0, 0, 0, 0.8);
  animation: ax-modal-in 0.45s var(--ease) both;
}
.modal-box h3 { margin-bottom: 16px; font-size: 19px; letter-spacing: -0.02em; }
.modal-box .field + .field { margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Тост админки — тот же вид, что #toast */
#atoast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 460px);
  padding: 12px 18px 12px 16px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--fg);
  font: 500 14px/1.4 var(--font-body);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.4s var(--ease);
}
#atoast::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
#atoast.show { opacity: 1; transform: translate(-50%, 0); }
#atoast.err { border-color: rgba(248, 113, 113, 0.45); color: var(--err); }
#atoast.err::before { background: var(--err); }
#atoast:empty { display: none; }

@media (max-width: 720px) {
  .field-grid.roomy { grid-template-columns: 1fr; }
  .admin-tabs { width: 100%; }
  .admin-tab { flex: 1 1 auto; justify-content: center; }
}

/* ── Админка: обзор (статистика клиента + бесплатный режим) ───────────── */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  overflow: hidden;
}
.stat-tile.live {
  border-color: var(--accent-line);
  background: var(--card-glass);
}
.stat-ic {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 22px;
}
.stat-meta { min-width: 0; }
.stat-val { font: 700 26px/1.1 var(--font-display); letter-spacing: -0.02em; }
.stat-lbl { margin-top: 3px; color: var(--fg-3); font-size: 12.5px; font-weight: 500; }
.stat-pulse {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: ax-pulse-live 2s var(--ease) infinite;
}
@keyframes ax-pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.free-card .free-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.free-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; }
.free-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg-3);
  font-size: 13.5px;
  font-weight: 500;
}
.free-status i { font-size: 16px; }
.free-status.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.free-status.warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); color: var(--warn); }
:root[data-theme="light"] .free-status.warn { color: #b45309; }

/* Переключатель (switch) */
.ax-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--field);
  transition: background-color 0.3s var(--ease), border-color 0.3s ease, opacity 0.2s ease;
}
.ax-switch-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fg-3);
  transform: translateY(-50%);
  transition: transform 0.35s var(--ease), background-color 0.3s ease;
}
.ax-switch.on {
  background: var(--accent);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ax-switch.on .ax-switch-thumb { transform: translate(22px, -50%); background: var(--accent-ink); }
.ax-switch.busy { opacity: 0.55; pointer-events: none; }

/* ── Кабинет: карточка «Доступ» / варианты подписки ──────────────────── */
.acc-card { display: grid; gap: 14px; }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.acc-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg-2);
  font: 600 12.5px/1 var(--font-body);
  white-space: nowrap;
}
.acc-pill i { font-size: 14px; }
.acc-pill.sub { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.acc-pill.free { border-color: rgba(74, 222, 128, 0.4); background: var(--ok-soft); color: var(--ok); }
.acc-pill.beta { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); color: var(--warn); }
.acc-pill.off { border-color: var(--line); background: var(--field); color: var(--fg-3); }
:root[data-theme="light"] .acc-pill.beta { color: #b45309; }
.acc-note { color: var(--fg-3); font-size: 13px; line-height: 1.55; }
.acc-note b { color: var(--fg-2); }

/* ============================================================================
   Раскладка «сайдбар + разделы» (кабинет и админка, 2026-09-25).
   Всё — прозрачное стекло с размытием, без градиентов.
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.side {
  position: sticky;
  top: calc(var(--header-h) + 36px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--card-line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.side-user { display: flex; align-items: center; gap: 12px; padding: 8px 8px 14px; margin-bottom: 6px; border-bottom: 1px dashed var(--dash); min-width: 0; }
.side-ava { position: relative; width: 42px; height: 49px; flex: none; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--accent-line); background: #fff; color: inherit; font: inherit; }
.side-ava img { display: block; width: 100%; height: 100%; object-fit: contain; }
.side-ava.photo { height: 42px; background: var(--field); }
.side-ava.photo img { object-fit: cover; }
button.side-ava { cursor: pointer; }
.side-ava-edit { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12, 10, 18, 0.5); color: #fff; font-size: 17px; opacity: 0; transition: opacity 0.2s ease; }
.side-ava:hover .side-ava-edit, .side-ava:focus-visible .side-ava-edit { opacity: 1; }
.side-user-meta { min-width: 0; display: grid; gap: 3px; }
.side-user-meta strong { font: 600 15px/1.2 var(--font-display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-meta > span { color: var(--fg-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Роль сотрудника (Roles): кабинет, админка */
.side-user-meta .role-tag, .role-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 7px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
  white-space: nowrap;
}
.role-tag[hidden] { display: none; }
/* Длинный ник обрезается, плашка роли остаётся видна */
.side-user-meta strong.with-role { display: flex; align-items: center; min-width: 0; }
.side-user-meta strong.with-role > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta strong.with-role .role-tag { flex: none; vertical-align: 0; }
.role-tag.admin { color: var(--warn); background: rgba(251, 191, 36, 0.1); }
.role-tag.support { color: #5ec8ff; background: rgba(94, 200, 255, 0.1); }
.role-tag.media { color: #ff7ab6; background: rgba(255, 122, 182, 0.1); }
:root[data-theme="light"] .role-tag.admin { color: #b45309; }
:root[data-theme="light"] .role-tag.support { color: #0b7fbf; }
:root[data-theme="light"] .role-tag.media { color: #c8306f; }
/* Вкладки и блоки, закрытые по правам: hidden сильнее display: flex/grid */
.side-link[hidden], [data-admin-only][hidden] { display: none !important; }

/* Админка → «Роли» */
.role-assign { display: flex; flex-wrap: wrap; gap: 8px; }
.role-assign .a-input { flex: 1 1 220px; width: auto; }
.role-assign .a-select { flex: 0 0 160px; }
.staff-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
.staff-row .tl-title { overflow: visible; }
.staff-ctl .a-select { height: 32px; font-size: 13px; }
.caps-table td { vertical-align: middle; }
.caps-table th:not(:first-child), .caps-table .cap-cell { width: 96px; text-align: center; }
.cap-title { font-weight: 600; font-size: 14px; }
.cap-desc { margin-top: 3px; color: var(--fg-3); font-size: 12.5px; line-height: 1.45; max-width: 560px; white-space: normal; }
.cap-cell input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.caps-locked { margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--dash); background: var(--field); }
.caps-locked h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.caps-locked p { margin: 0; color: var(--fg-3); font-size: 12.5px; line-height: 1.55; }
.side-label { padding: 10px 12px 4px; color: var(--fg-4); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.side-nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.side-pill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass-hover);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.25s ease;
  pointer-events: none;
}
.side-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--fg-3);
  font: 600 14px/1 var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.side-link i { font-size: 18px; transition: color 0.2s ease, transform 0.35s var(--ease); }
.side-link:hover { color: var(--fg); }
.side-link:hover i { transform: translateX(1px); }
.side-link.active { color: var(--fg); }
.side-link.active i { color: var(--accent-text); }
.side-link .cnt {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
}
.side-link .cnt:empty { display: none; }
.side-link kbd {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--fg-4);
  font: 600 10.5px/1.2 var(--font-mono);
}
.side-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--dash); }
.side-foot .side-link.danger:hover { color: var(--err); }

.view { display: none; min-width: 0; }
.view.active { display: block; animation: view-in 0.5s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.view-head h2 { margin: 0; font: 600 clamp(22px, 2.4vw, 28px)/1.15 var(--font-display); letter-spacing: -0.03em; }
.view-head p { margin: 6px 0 0; color: var(--fg-3); font-size: 14px; }
.view-head .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stack { display: grid; gap: 16px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 16px/1.3 var(--font-body); }
.card-head h3 i { color: var(--accent-text); font-size: 19px; }
.card-head .link { color: var(--accent-text); font-size: 13px; font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; }

/* Метрики */
.ax-card.metric { display: grid; gap: 6px; padding: 18px 20px; align-content: start; }
.metric-lbl { display: flex; align-items: center; gap: 7px; color: var(--fg-3); font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.metric-lbl i { font-size: 15px; color: var(--accent-text); }
.metric-val { font: 700 24px/1.15 var(--font-display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-sub { color: var(--fg-3); font-size: 13px; }
.metric-val.ok { color: var(--ok); }
.metric-val.muted { color: var(--fg-3); }

/* Полоса срока подписки */
.meter { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 0.9s var(--ease); }

/* Главная плитка кабинета: лаунчер */
.ax-card.hero-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 26px 28px; }
.hero-card h3 { margin: 0; font: 600 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.hero-card p { margin: 6px 0 0; color: var(--fg-3); font-size: 14px; }
.hero-card .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Лента истории */
.timeline { display: grid; }
.tl-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px dashed var(--dash); }
.tl-item:last-child { border-bottom: 0; }
.tl-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--field); color: var(--fg-2); font-size: 16px; }
.tl-ic.accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.tl-ic.ok { border-color: rgba(74, 222, 128, 0.35); background: var(--ok-soft); color: var(--ok); }
.tl-ic.err { border-color: rgba(248, 113, 113, 0.35); background: var(--err-soft); color: var(--err); }
.tl-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { margin-top: 2px; color: var(--fg-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-when { color: var(--fg-3); font-size: 12.5px; white-space: nowrap; text-align: right; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg-2);
  font: 600 12.5px/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip-btn:hover { color: var(--fg); border-color: var(--line-2); }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }

/* Сессии / устройства */
.sess { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px dashed var(--dash); }
.sess:last-child { border-bottom: 0; }
.sess-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--field); color: var(--fg-2); font-size: 19px; }
.sess-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; font-size: 14px; }
.sess-meta { margin-top: 3px; color: var(--fg-3); font-size: 12.5px; }
.mini-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--field); color: var(--fg-3); font-size: 11px; font-weight: 700; }
.mini-tag.accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.mini-tag.ok { border-color: rgba(74, 222, 128, 0.35); background: var(--ok-soft); color: var(--ok); }
.mini-tag.err { border-color: rgba(248, 113, 113, 0.35); background: var(--err-soft); color: var(--err); }

.form-grid { display: grid; gap: 12px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row > .ax-input { flex: 1 1 220px; width: auto; }
.muted-note { margin: 0; color: var(--fg-3); font-size: 13px; line-height: 1.55; }
.muted-note a { color: var(--accent-text); font-weight: 600; }
.ax-card.danger-zone { border-color: rgba(248, 113, 113, 0.28); }

/* Профиль: аватарка (одна на сайте, в лаунчере и в клиенте) */
[data-ava] > img:not(.ava-fb) { display: none; }
[data-ava].photo > img:not(.ava-fb) { display: block; }
[data-ava].photo > .ava-fb { display: none; }
[data-ava] img { width: 100%; height: 100%; object-fit: cover; }
.ava-card { position: relative; overflow: hidden; }
.ava-main { display: flex; align-items: center; gap: 24px; }
.ava-big { width: 112px; height: 112px; flex: none; border-radius: 26px; overflow: hidden; border: 1px solid var(--accent-line); background: #fff; }
.ava-big.photo { background: var(--field); }
.ava-big .ava-fb { object-fit: contain; }
.ava-info { display: grid; gap: 12px; min-width: 0; }
.ava-info h3 { margin: 0; font: 600 20px/1.2 var(--font-display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava-drop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: inherit;
  border: 1.5px dashed var(--accent);
  background: rgba(var(--bg-rgb), 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ava-drop i { font-size: 22px; }
.ava-card.drag .ava-drop { opacity: 1; }

.ava-where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ava-spot { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--field); min-width: 0; }
.ava-spot p { margin: 0; color: var(--fg-3); font-size: 12.5px; line-height: 1.5; }
.ava-spot-lbl { display: flex; align-items: center; gap: 7px; color: var(--fg-2); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.ava-spot-lbl i { color: var(--accent-text); font-size: 15px; }
.ava-mock { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 12px; border: 1px dashed var(--dash); min-width: 0; }
.ava-mock-meta { display: grid; gap: 3px; min-width: 0; }
.ava-mock-meta b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava-mock-meta span { color: var(--fg-3); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava-mock-site { width: 34px; height: 38px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--accent-line); background: #fff; }
.ava-mock-site.photo { height: 34px; background: var(--field); }
.ava-mock-site .ava-fb { object-fit: contain; }
.ava-mock-pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 30px; padding: 0 10px 0 3px; border-radius: var(--r-pill); border: 1px solid var(--glass-line); background: var(--glass); }
.ava-mock-pill b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava-mock-pill > i { color: var(--fg-3); font-size: 13px; }
.ava-mock-launcher { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--accent-ink); font: 800 11px/1 var(--font-body); }
.ava-mock-client { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; overflow: hidden; background: var(--accent-soft); color: var(--accent-text); font-size: 18px; }

.ava-editor { width: min(100%, 380px); }
.ava-stage {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.ava-stage.grab { cursor: grabbing; }
.ava-stage canvas { display: block; width: 100%; height: 100%; }
.ava-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(12, 10, 18, 0.42); outline: 1.5px dashed rgba(255, 255, 255, 0.55); outline-offset: -1px; pointer-events: none; }
.ava-zoom { display: flex; align-items: center; gap: 12px; margin: 16px 4px 10px; color: var(--fg-3); font-size: 17px; }
.ava-zoom input { flex: 1; accent-color: var(--accent); }

/* Поддержка */
.ax-card.help-tile { display: grid; gap: 8px; padding: 22px; text-decoration: none; color: inherit; transition: border-color 0.25s ease, transform 0.45s var(--ease); }
.help-tile:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.help-tile i { font-size: 26px; color: var(--accent-text); }
.help-tile strong { font-size: 16px; }
.help-tile span { color: var(--fg-3); font-size: 13.5px; }
.faq-item { border-bottom: 1px dashed var(--dash); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--fg-3); transition: transform 0.35s var(--ease); }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { margin: 0 4px 14px; color: var(--fg-2); font-size: 13.5px; line-height: 1.6; }

/* График (inline SVG) */
.chart-wrap { position: relative; }
.chart-svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart-svg .grid line { stroke: var(--line); stroke-width: 1; }
.chart-svg .axis text { fill: var(--fg-4); font: 500 11px var(--font-body); }
.chart-svg .bar { fill: var(--accent); opacity: 0.8; transition: opacity 0.2s ease; }
.chart-svg .bar.hot { opacity: 1; }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -110%);
  transition: opacity 0.15s ease;
}
.chart-tip b { display: block; font-size: 15px; }
.chart-tip span { color: var(--fg-3); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); }
.seg button { height: 30px; padding: 0 13px; border: 0; border-radius: 10px; background: none; color: var(--fg-3); font: 600 12.5px/1 var(--font-body); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.seg button:hover { color: var(--fg); }
.seg button.active { background: var(--glass-hover); color: var(--fg); }
.chart-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.chart-total b { font: 700 28px/1 var(--font-display); letter-spacing: -0.02em; }
.chart-total span { color: var(--fg-3); font-size: 13px; }

/* Таблица с кликабельными строками + выезжающая карточка */
.a-table tbody tr.clickable { cursor: pointer; }
.a-table tbody tr.sel { background: var(--accent-soft); }
.u-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u-ava { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--field); color: var(--fg-2); font: 700 12px/1 var(--font-display); text-transform: uppercase; }
.u-ava.photo { overflow: hidden; }
.u-ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.u-name { font-weight: 600; }
.u-mail { color: var(--fg-3); font-size: 12px; }

.drawer-back { position: fixed; inset: 0; z-index: 900; background: rgba(var(--bg-rgb), 0.25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.drawer-back.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 901;
  width: min(460px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  transition: transform 0.55s var(--ease), visibility 0s linear 0.55s;
}
.drawer.show { transform: none; visibility: visible; transition: transform 0.55s var(--ease); }
.drawer-head { display: flex; align-items: center; gap: 14px; padding: 20px 20px 16px; border-bottom: 1px dashed var(--dash); }
.drawer-head .u-ava { width: 46px; height: 46px; font-size: 17px; }
.drawer-head h3 { margin: 0; font: 600 19px/1.2 var(--font-display); letter-spacing: -0.02em; }
.drawer-head p { margin: 3px 0 0; color: var(--fg-3); font-size: 12.5px; }
.drawer-head .ax-icon-btn { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; display: grid; gap: 20px; align-content: start; }
.drawer-sec h4 { margin: 0 0 10px; color: var(--fg-4); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kv > div { padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); min-width: 0; }
.kv span { display: block; color: var(--fg-3); font-size: 11.5px; font-weight: 600; }
.kv b { display: block; margin-top: 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer .tl-item { padding: 9px 2px; }
.drawer .sess { padding: 10px 2px; }

@media (max-width: 1100px) {
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 16px; }
  .side { position: static; flex-direction: row; align-items: center; gap: 6px; padding: 6px; overflow-x: auto; border-radius: 16px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side-user, .side-label, .side-pill, .side-link kbd { display: none; }
  .side-nav { flex-direction: row; gap: 4px; }
  .side-link { width: auto; height: 38px; border-radius: 10px; padding: 0 14px; }
  .side-link.active { background: var(--glass-hover); }
  .side-foot { flex-direction: row; margin: 0 0 0 4px; padding: 0 0 0 6px; border-top: 0; border-left: 1px solid var(--line); }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .ava-where { grid-template-columns: 1fr; }
  .ax-card.hero-card { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 36px minmax(0, 1fr); }
  .tl-when { grid-column: 2; text-align: left; margin-top: -6px; }
  .sess { grid-template-columns: 42px minmax(0, 1fr); }
  .sess > :last-child { grid-column: 1 / -1; justify-self: start; }
  .ava-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ava-big { width: 96px; height: 96px; border-radius: 22px; }
}

/* Модалки и тост админки поверх выезжающей карточки. */
.modal-back { z-index: 950; }
#atoast { z-index: 1000; }
