/* ==========================================================================
   GORWEISS Ai — единая дизайн-система
   Палитра снята с приложенных макетов (тёмный сине-фиолетовый фон,
   розово-фиолетовый градиентный акцент, стеклянные карточки).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #060310;
  --bg-elevated: #0b0718;
  --surface: #130b21;
  --surface-2: #1a0f2c;
  --surface-3: #221436;
  --border: rgba(180, 130, 255, 0.16);
  --border-strong: rgba(196, 130, 255, 0.38);
  --text: #f5f2fa;
  --text-secondary: #b6acc9;
  --text-muted: #7d7392;
  --pink: #ec4899;
  --purple: #a855f7;
  --accent: #c084fc;
  --gradient: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(168, 85, 247, 0.15));
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-glow: 0 8px 40px rgba(168, 85, 247, 0.18);
  --font-display: 'Space Grotesk', 'Manrope', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 700; }
h2 { font-size: clamp(22px, 4vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 12px; color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

::selection { background: var(--purple); color: #fff; }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================== Фоновая сцена ============================== */
.scene-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}
.scene-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/bg-mobile.jpg');
  background-size: cover;
  background-position: top center;
  opacity: 0.9;
}
.scene-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 3, 16, 0.35) 0%, rgba(6, 3, 16, 0.55) 45%, var(--bg) 92%);
}
@media (min-width: 900px) {
  .scene-bg::before { background-image: url('/assets/bg-desktop.jpg'); background-position: center 30%; }
}
.scene-bg.static::after { background: linear-gradient(180deg, rgba(6,3,16,0.55) 0%, rgba(6,3,16,0.75) 60%, var(--bg) 100%); }

/* ============================== Кнопки ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.28);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4); }

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.07); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

.btn-danger { background: rgba(248, 113, 113, 0.15); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: 12px; }

/* ============================== Карточки ============================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.glass-card {
  background: rgba(19, 11, 33, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

/* ============================== Поля форм ============================== */
.field {
  position: relative;
  margin-bottom: 14px;
}
.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  padding-left: 44px;
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field.no-icon input, .field.no-icon textarea { padding-left: 16px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--surface-3);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
}
label.check input { accent-color: var(--purple); width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.field-hint { color: var(--text-muted); font-size: 12.5px; margin-top: 6px; }

/* ============================== Значки / пилюли ============================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.pill:hover { background: rgba(255, 255, 255, 0.09); }
.pill.locked { color: var(--text-muted); }
.pill-counter { background: rgba(255,255,255,0.04); cursor: default; }
.pill-counter.low { color: var(--warning); border-color: rgba(251, 191, 36, 0.35); }
.pill-counter.zero { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.ok { background: var(--success); }
.status-dot.down { background: var(--danger); }

/* ============================== Верхняя панель ============================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(6, 3, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.brand span { color: var(--pink); }
.brand-link { text-decoration: none; }
.brand-link:hover { text-decoration: none; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-auth { display: flex; align-items: center; gap: 8px; }
.balance-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.balance-chip .plus {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-btn {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-btn:hover { background: var(--surface-3); }

@media (max-width: 640px) {
  .topbar-auth .btn span.full { display: none; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}

/* ============================== Выезжающее меню ============================== */
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 2, 10, 0.6);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 86vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow-y: auto;
}
.side-menu.open { transform: translateX(0); }

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.side-menu-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 10px;
  cursor: pointer;
}

.user-card {
  background: var(--gradient-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 10px 0 16px;
}
.user-card .login { font-weight: 700; font-family: var(--font-display); }
.user-card .id-row {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 12.5px; margin-top: 4px;
}
.user-card .id-row button {
  background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 2px 6px;
}

.menu-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  text-align: left;
  width: 100%;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.menu-item .sub { display: block; font-size: 11.5px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.menu-item svg { flex-shrink: 0; opacity: 0.85; }
.menu-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* ============================== Модалки (вход/регистрация) ============================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 2, 10, 0.72);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 30px 26px;
  margin: auto;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-title { text-align: center; font-size: 24px; margin-bottom: 6px; }
.modal-sub { text-align: center; font-size: 13.5px; margin-bottom: 22px; }
.modal-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: 12.5px; }
.modal-divider::before, .modal-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.modal-footer-link { text-align: center; font-size: 13.5px; margin-top: 16px; color: var(--text-secondary); }
.modal-close-x {
  position: absolute; top: 14px; right: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
}
.modal-card { position: relative; }
.between-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 13px; }

/* ============================== Тосты ============================== */
.toast-stack {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(360px, 90vw);
}
.toast {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: toastIn 0.2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================== Общая структура страницы ============================== */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-body { flex: 1; }
.section { padding: 48px 0; }
.footer { padding: 28px 0 90px; text-align: center; color: var(--text-muted); font-size: 12.5px; }
@media (min-width: 641px) { .footer { padding-bottom: 28px; } }

/* ============================== Нижняя навигация (моб.) ============================== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(8, 4, 18, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 11px;
  text-decoration: none;
  padding: 4px 0;
}
.bottom-nav a.active { color: var(--pink); }
.bottom-nav a:hover { text-decoration: none; }
@media (min-width: 641px) { .bottom-nav { display: none; } }

/* ============================== Домашняя страница ============================== */
.hero { padding: 90px 0 48px; }
@media (min-width: 900px) { .hero { padding: 120px 0 70px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { margin: 14px 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.feature-row { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.feature-row:first-of-type { border-top: none; }
.feature-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--pink);
}

.model-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 560px) { .model-chip-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .model-chip-grid { grid-template-columns: repeat(6, 1fr); } }
.model-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.model-chip:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.model-chip .icon { font-size: 26px; margin-bottom: 8px; }
.model-chip .name { font-size: 13px; font-weight: 600; }
.model-chip .provider { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.promo-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  justify-content: space-between;
  padding: 22px;
}
.promo-banner .left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; }

/* ============================== Чат ============================== */
.chat-page { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 10px;
  background: rgba(6,3,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.chat-model-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 14px 10px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: min(600px, 84%); padding: 13px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.assistant { align-self: flex-start; background: rgba(24, 14, 40, 0.82); backdrop-filter: blur(6px); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; background: var(--gradient); color: #fff; border-bottom-right-radius: 6px; }
.msg.system-note { align-self: center; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); color: #fde68a; font-size: 13px; border-radius: 12px; text-align: center; }
.msg .demo-tag { display: inline-block; margin-top: 8px; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(251,191,36,0.15); color: #fde68a; border: 1px solid rgba(251,191,36,0.3); }
.msg img.gen-image { max-width: 260px; border-radius: 12px; margin-top: 8px; }
.msg-typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 14px 18px; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typingBounce 1.2s infinite ease-in-out; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(6,3,16,0.88);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.chat-input-bar textarea {
  flex: 1;
  resize: none;
  max-height: 120px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 20px;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.4;
}
.chat-input-bar textarea:focus { outline: none; border-color: var(--purple); }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.send { background: var(--gradient); color: #fff; border: none; }
.icon-btn.mic.active { background: var(--gradient); color: #fff; animation: pulseMic 1.4s infinite; }
@keyframes pulseMic { 0%,100% { box-shadow: 0 0 0 0 rgba(236,72,153,0.5);} 50% { box-shadow: 0 0 0 8px rgba(236,72,153,0);} }

.char-counter { font-size: 11px; color: var(--text-muted); text-align: right; padding: 2px 18px 0 0; }
.char-counter.warn { color: var(--warning); }

/* ============================== Модели: списки/таблицы цен ============================== */
.tabs { display: flex; gap: 8px; margin: 18px 0 22px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; font-size: 13.5px; font-weight: 500;
}
.tab-btn.active { background: var(--gradient); color: #fff; border-color: transparent; }

.price-table { display: flex; flex-direction: column; gap: 8px; }
.price-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px;
}
.price-row .idx { color: var(--text-muted); font-size: 12.5px; width: 22px; flex-shrink: 0; }
.price-row .icon { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.price-row .name { flex: 1; min-width: 0; }
.price-row .name .n { font-weight: 600; font-size: 14px; }
.price-row .name .p { font-size: 11.5px; color: var(--text-muted); }
.price-row .prices { text-align: right; font-size: 12.5px; color: var(--text-secondary); flex-shrink: 0; }
.price-row .prices b { color: var(--accent); font-size: 13.5px; }
.price-row.free { border-color: rgba(52,211,153,0.35); }

/* ============================== Балансы/статистика ============================== */
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 20px; }
.amount-chip {
  padding: 12px 6px; text-align: center;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-weight: 600; font-size: 13.5px;
}
.amount-chip.active, .amount-chip:hover { border-color: var(--purple); background: var(--surface-3); }
.pay-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 22px; }
.pay-method {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-size: 12.5px; font-weight: 500;
}
.pay-method.active { border-color: var(--purple); background: var(--surface-3); }

table.tx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tx-table th { text-align: left; color: var(--text-muted); font-weight: 500; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.tx-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tx-table tr:last-child td { border-bottom: none; }
.tx-amount.pos { color: var(--success); font-weight: 600; }
.tx-amount.neg { color: var(--danger); font-weight: 600; }

/* ============================== Админ-панель ============================== */
.admin-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .admin-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.admin-section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.kv-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.kv-row .key { width: 40%; font-size: 12.5px; color: var(--text-muted); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-row input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.stat-box .num { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.stat-box .lbl { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; font-size: 13px; }
.user-row:last-child { border-bottom: none; }

.gate-screen { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* ============================== Прочее ============================== */
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-note { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
