/* ============================================================
   РАДАР ЦЕН — общие стили
   Палитра: чёрный + синий. Тёплый коралловый — единственное
   осознанное исключение, и только для индикатора роста цены,
   чтобы рост/падение всегда читались с первого взгляда.
   ============================================================ */

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

:root {
  --bg-void: #05070d;
  --bg-surface: #0d1526;
  --bg-surface-2: #131d33;
  --bg-surface-3: #1a2744;

  --blue-signal: #2f5cff;
  --blue-signal-hover: #4570ff;
  --blue-ice: #6fe0ff;
  --blue-dim: #1e2a47;
  --blue-dim-2: #29406b;

  --text-primary: #eaf0ff;
  --text-secondary: #aab6d6;
  --text-muted: #6b7694;

  --price-down: #6fe0ff;
  --price-up: #ff8a65;
  --danger: #ff6b6b;
  --success: #4ade80;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-glow-sm: 0 0 24px rgba(47, 92, 255, 0.18);
  --shadow-glow-md: 0 0 56px rgba(47, 92, 255, 0.24);
  --shadow-card: 0 10px 34px rgba(0, 0, 0, 0.38);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 550px at 12% -8%, rgba(47, 92, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 550px at 100% 15%, rgba(111, 224, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 120%, rgba(47, 92, 255, 0.10), transparent 60%),
    var(--bg-void);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
p { color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

::selection { background: var(--blue-signal); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-3); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--blue-dim-2); }

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

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out), border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--blue-signal), #1c3fd6); color: #fff; box-shadow: var(--shadow-glow-sm); }
.btn-primary:hover { background: linear-gradient(135deg, var(--blue-signal-hover), var(--blue-signal)); box-shadow: var(--shadow-glow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-surface-2); color: var(--text-primary); border: 1px solid var(--blue-dim-2); }
.btn-secondary:hover { background: var(--bg-surface-3); border-color: var(--blue-signal); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-surface); }
.btn-danger { background: rgba(255,107,107,0.10); color: var(--danger); border: 1px solid rgba(255,107,107,0.28); }
.btn-danger:hover { background: rgba(255,107,107,0.18); }
.btn-icon { padding: 10px; border-radius: var(--radius-sm); background: var(--bg-surface-2); color: var(--text-secondary); border: 1px solid var(--blue-dim); }
.btn-icon:hover { color: var(--text-primary); border-color: var(--blue-signal); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Поля ввода / формы
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; text-align: left; }
.field label { font-size: 13px; color: var(--text-secondary); font-weight: 700; }
.field input {
  background: var(--bg-surface-2); border: 1.5px solid var(--blue-dim); color: var(--text-primary);
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus { outline: none; border-color: var(--blue-signal); box-shadow: 0 0 0 4px rgba(47,92,255,0.15); }
.field-hint { font-size: 12.5px; color: var(--text-muted); }
.form-alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px;
  border: 1px solid transparent; display: none;
}
.form-alert.show { display: block; }
.form-alert.error { background: rgba(255,107,107,0.10); border-color: rgba(255,107,107,0.3); color: #ffb3b3; }
.form-alert.success { background: rgba(74,222,128,0.10); border-color: rgba(74,222,128,0.3); color: #a6f0bd; }

/* ============================================================
   Карточки
   ============================================================ */
.card { background: var(--bg-surface); border: 1px solid var(--blue-dim); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }

/* ============================================================
   Значки / статусы
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-full); font-family: var(--font-mono);
}
.badge-down { background: rgba(111,224,255,0.12); color: var(--blue-ice); }
.badge-up { background: rgba(255,138,101,0.12); color: var(--price-up); }
.badge-neutral { background: var(--bg-surface-3); color: var(--text-secondary); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.status-dot.pending { background: var(--text-muted); animation: pulse-dot 1.4s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ============================================================
   Появление элементов при загрузке
   ============================================================ */
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: fade-up .7s var(--ease-out) both; }
.reveal-d1 { animation-delay: .08s; } .reveal-d2 { animation-delay: .16s; }
.reveal-d3 { animation-delay: .24s; } .reveal-d4 { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   НАВИГАЦИЯ (публичные страницы)
   ============================================================ */
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,7,13,0.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--blue-dim);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; max-width: 1160px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-signal), var(--blue-ice));
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-glow-sm);
}
.brand-mark svg { width: 18px; height: 18px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   ЛЕНДИНГ
   ============================================================ */
.hero { padding: 96px 0 60px; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--blue-ice); background: rgba(111,224,255,0.08); border: 1px solid rgba(111,224,255,0.2);
  padding: 7px 16px; border-radius: var(--radius-full); margin-bottom: 28px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-ice); box-shadow: 0 0 8px var(--blue-ice); animation: pulse-dot 1.6s ease-in-out infinite; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw + 1rem, 3.7rem); max-width: 780px; margin: 0 auto 22px; }
.hero h1 .accent { background: linear-gradient(120deg, var(--blue-ice), var(--blue-signal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.hero-visual { max-width: 680px; margin: 0 auto; padding: 28px; position: relative; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.price-line { fill: none; stroke: var(--blue-ice); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 9px rgba(111,224,255,0.55)); }
.chart-baseline { stroke: var(--blue-dim); stroke-width: 1; }
.chart-grid { stroke: var(--blue-dim); stroke-width: 1; opacity: .5; }
.price-dot { fill: var(--blue-ice); transform-box: fill-box; transform-origin: center; animation: dot-ping 4s ease-in-out infinite; }
@keyframes dot-ping { 0%, 90%, 100% { transform: scale(1); opacity: .75; } 95% { transform: scale(2); opacity: 1; } }
.scan-line { animation: scan-sweep 4s linear infinite; }
@keyframes scan-sweep {
  0% { transform: translateX(0); opacity: 0; }
  4% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateX(600px); opacity: 0; }
}
.hero-price-tag {
  position: absolute; top: 8px; right: 24px; background: var(--bg-surface-2); border: 1px solid var(--blue-dim-2);
  border-radius: var(--radius-sm); padding: 10px 16px; text-align: left; box-shadow: var(--shadow-card);
}
.hero-price-tag .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.hero-price-tag .value { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--blue-ice); }

.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 52px; }
.section-head .kicker { color: var(--blue-ice); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; display: block; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); margin-bottom: 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { padding: 32px 26px; position: relative; }
.step-num { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--blue-signal); background: rgba(47,92,255,0.12); width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.step h3 { font-size: 18px; margin-bottom: 10px; }
.step p { font-size: 14.5px; }
.step-connector { position: absolute; top: 40px; left: 100%; width: 28px; height: 1px; background: linear-gradient(90deg, var(--blue-dim-2), transparent); }

.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card { padding: 28px 24px; transition: transform .25s var(--ease-out), border-color .25s; }
.feature-card:hover { transform: translateY(-4px); border-color: var(--blue-dim-2); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--blue-ice); }
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; }

.cta-banner { text-align: center; padding: 64px 32px; background: linear-gradient(160deg, var(--bg-surface), var(--bg-surface-2)); position: relative; overflow: hidden; }
.cta-banner::after { content: ''; position: absolute; inset: -50%; background: radial-gradient(circle, rgba(47,92,255,0.18), transparent 60%); animation: rotate-glow 14s linear infinite; }
@keyframes rotate-glow { to { transform: rotate(360deg); } }
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); margin-bottom: 14px; }
.cta-banner p { max-width: 440px; margin: 0 auto 28px; }

footer.site-footer { border-top: 1px solid var(--blue-dim); padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner p { font-size: 13px; }

/* ============================================================
   АВТОРИЗАЦИЯ (login/register)
   ============================================================ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 40px 36px; }
.auth-card .brand { justify-content: center; margin-bottom: 28px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 8px; }
.auth-card .sub { text-align: center; font-size: 14px; margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; }
.auth-switch a { color: var(--blue-ice); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }

/* ============================================================
   ЛИЧНЫЙ КАБИНЕТ
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--blue-dim); padding: 26px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { margin-bottom: 36px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-weight: 600; font-size: 14.5px; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, color .2s;
}
.side-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-nav-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.side-nav-item.active { background: var(--bg-surface-2); color: var(--text-primary); border-color: var(--blue-dim-2); }
.side-nav-item.active svg { color: var(--blue-ice); }

.sidebar-user { border-top: 1px solid var(--blue-dim); padding-top: 16px; margin-top: 16px; display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-signal), var(--blue-ice));
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #04101f; flex-shrink: 0;
}
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who .name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who .email { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-view { padding: 36px 40px 60px; max-width: 1180px; }
.view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; gap: 16px; flex-wrap: wrap; }
.view-head h1 { font-size: 26px; }
.view-head p { font-size: 14px; margin-top: 4px; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.toolbar-row { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.toolbar-row .compact-input { min-width: 220px; }
.toolbar-row select.compact-input { cursor: pointer; }

.view-head-actions { display: flex; gap: 10px; align-items: center; }

.view-toggle { display: flex; border: 1px solid var(--blue-dim); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.view-toggle-btn { background: var(--bg-surface-2); border: none; color: var(--text-muted); padding: 10px 12px; cursor: pointer; display: flex; align-items: center; transition: all .15s; }
.view-toggle-btn + .view-toggle-btn { border-left: 1px solid var(--blue-dim); }
.view-toggle-btn:hover { color: var(--text-primary); }
.view-toggle-btn.active { background: var(--blue-signal); color: #fff; }

.folder-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.folder-chip {
  background: var(--bg-surface-2); border: 1px solid var(--blue-dim); color: var(--text-secondary);
  padding: 7px 15px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.folder-chip:hover { border-color: var(--blue-dim-2); color: var(--text-primary); }
.folder-chip.active { background: var(--blue-signal); border-color: var(--blue-signal); color: #fff; }
.folder-badge {
  display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700; color: var(--blue-ice);
  background: rgba(111,224,255,0.10); padding: 2px 9px; border-radius: var(--radius-full);
}

.bulk-action-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--bg-surface-2); border: 1px solid var(--blue-signal); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 20px; font-weight: 700; font-size: 14px;
  animation: fade-up .25s var(--ease-out);
}
.bulk-action-bar-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.product-card { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.product-card:hover { border-color: var(--blue-dim-2); }
.product-card.is-pinned { border-color: var(--blue-signal); box-shadow: 0 0 0 1px var(--blue-signal); }
.product-card-top { display: flex; gap: 12px; padding-right: 34px; }
.product-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg-surface-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--text-muted); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-info { min-width: 0; flex: 1; }
.product-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-sku { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }

.pin-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-surface-2); border: 1px solid var(--blue-dim); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s;
}
.pin-toggle:hover { color: var(--blue-ice); border-color: var(--blue-ice); }
.pin-toggle.active { color: var(--blue-ice); background: rgba(111,224,255,0.14); border-color: var(--blue-ice); }

.product-select-check {
  position: absolute; top: 14px; left: 14px; z-index: 2; display: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; cursor: pointer;
}
.select-mode .product-select-check { display: flex; }
.select-mode .product-card { padding-left: 44px; }
.product-select-check input { width: 19px; height: 19px; cursor: pointer; accent-color: var(--blue-signal); }

.product-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.product-price-main { display: flex; flex-direction: column; gap: 1px; }
.product-old-price { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); text-decoration: line-through; }
.product-price { font-family: var(--font-mono); font-size: 24px; font-weight: 700; }
.product-card-note { font-size: 12px; color: var(--text-muted); margin-top: -8px; }
.badge-stack { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.badge-percent { font-size: 15px; font-weight: 800; padding: 6px 13px; }
.product-target-note { font-size: 12px; color: var(--blue-ice); margin-top: -8px; }
.product-target-note.reached { color: var(--success); font-weight: 700; }
.product-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }

.product-chart { height: 46px; }
.product-chart canvas { width: 100% !important; height: 100% !important; }

.product-actions { display: flex; gap: 6px; border-top: 1px solid var(--blue-dim); padding-top: 14px; }
.product-actions .btn-icon { flex: 1; padding: 8px; }

.product-error-note { font-size: 12.5px; color: var(--danger); background: rgba(255,107,107,0.08); border-radius: var(--radius-sm); padding: 8px 10px; }

tr.is-pinned td:first-child { box-shadow: inset 3px 0 0 var(--blue-signal); }

.empty-state { text-align: center; padding: 80px 24px; }
.empty-state .icon-wrap {
  width: 72px; height: 72px; border-radius: 20px; background: var(--bg-surface-2); margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center; color: var(--blue-ice);
}
.empty-state .icon-wrap svg { width: 32px; height: 32px; }
.empty-state h3 { font-size: 19px; margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; }

.skeleton { background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface-3) 37%, var(--bg-surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Уведомления (страница подключения ботов) ---------- */
.channel-card { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.channel-head { display: flex; align-items: center; gap: 14px; }
.channel-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.channel-icon.telegram { background: rgba(47,92,255,0.14); color: var(--blue-signal); }
.channel-icon.max { background: rgba(111,224,255,0.14); color: var(--blue-ice); }
.channel-icon svg { width: 22px; height: 22px; }
.channel-title { font-size: 16px; font-weight: 700; }
.channel-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.channel-code { font-family: var(--font-mono); font-size: 20px; letter-spacing: .12em; background: var(--bg-surface-2); border: 1px dashed var(--blue-dim-2); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.channels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }

/* ---------- Модальное окно ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,7,13,0.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease-out);
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-box { width: 100%; max-width: 460px; padding: 28px; transform: translateY(12px) scale(.98); transition: transform .25s var(--ease-out); }
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { font-size: 18px; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-surface-2); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; max-width: 340px;
  box-shadow: var(--shadow-card); animation: toast-in .3s var(--ease-out);
  border: 1px solid var(--blue-dim-2); background: var(--bg-surface-2); color: var(--text-primary);
}
.toast.error { border-color: rgba(255,107,107,0.4); background: #1c1013; }
.toast.success { border-color: rgba(74,222,128,0.4); background: #0f1c14; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   АДМИНКА
   ============================================================ */
.subsection-title { font-size: 18px; margin: 36px 0 18px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.stat-card { padding: 20px 22px; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.stat-value { font-family: var(--font-mono); font-size: 26px; font-weight: 700; }
.stat-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

.compact-input {
  background: var(--bg-surface-2); border: 1.5px solid var(--blue-dim); color: var(--text-primary);
  padding: 11px 16px; border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body);
  min-width: 260px; transition: border-color .2s, box-shadow .2s;
}
.compact-input:focus { outline: none; border-color: var(--blue-signal); box-shadow: 0 0 0 4px rgba(47,92,255,0.15); }

.table-wrap { overflow-x: auto; padding: 4px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.data-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
  padding: 14px 18px; border-bottom: 1px solid var(--blue-dim); font-weight: 700;
}
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--blue-dim); vertical-align: middle; }
.th-check { width: 44px !important; padding-right: 0 !important; }
.th-check input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--blue-signal); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-surface-2); }
.cell-title { font-weight: 700; }
.cell-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.cell-actions { display: flex; gap: 8px; white-space: nowrap; }
.table-empty { text-align: center; color: var(--text-muted); padding: 40px 18px !important; }

/* ============================================================
   РАСПИСАНИЕ УВЕДОМЛЕНИЙ (тихие часы, дайджест)
   ============================================================ */
.schedule-card { padding: 28px; max-width: 640px; }
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; flex-wrap: wrap; }
.schedule-label { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.schedule-divider { height: 1px; background: var(--blue-dim); margin: 2px 0; }
.schedule-inline-fields { display: flex; align-items: center; gap: 10px; }

.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track { position: absolute; inset: 0; background: var(--bg-surface-3); border: 1px solid var(--blue-dim-2); border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch-track::before { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: var(--text-secondary); border-radius: 50%; transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { background: var(--blue-signal); border-color: var(--blue-signal); }
.switch input:checked + .switch-track::before { transform: translateX(19px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue-ice); outline-offset: 2px; }

/* ============================================================
   ОТМЕНА УДАЛЕНИЯ (undo-тост)
   ============================================================ */
.undo-toast { padding: 0; overflow: hidden; }
.undo-toast-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px 10px; }
.undo-toast-btn { background: none; border: none; color: var(--blue-ice); font-weight: 700; cursor: pointer; font-size: 13px; white-space: nowrap; padding: 4px; }
.undo-toast-btn:hover { text-decoration: underline; }
.undo-toast-bar { height: 3px; background: var(--bg-surface-3); }
.undo-toast-bar-fill { height: 100%; background: var(--blue-signal); animation-name: undo-shrink; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes undo-shrink { from { width: 100%; } to { width: 0%; } }

/* ============================================================
   ПРИВЕТСТВЕННЫЙ ТУР
   ============================================================ */
.tour-box { max-width: 420px; text-align: center; padding: 44px 32px 28px; }
.tour-icon { font-size: 46px; margin-bottom: 16px; line-height: 1; }
.tour-slides h3 { font-size: 20px; margin-bottom: 12px; }
.tour-slides p { font-size: 14.5px; line-height: 1.6; }
.tour-footer { margin-top: 30px; }
.tour-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 22px; }
.tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-dim-2); transition: background .2s, transform .2s; }
.tour-dot.active { background: var(--blue-ice); transform: scale(1.3); }
.tour-footer-buttons { display: flex; justify-content: space-between; align-items: center; }

.mobile-menu-toggle {
  display: none; background: none; border: 1px solid var(--blue-dim); border-radius: var(--radius-sm);
  color: var(--text-secondary); padding: 8px; cursor: pointer; align-items: center; flex-shrink: 0;
}
.mobile-menu-toggle:hover { color: var(--text-primary); border-color: var(--blue-dim-2); }

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step-connector { display: none; }
  .hero-price-tag { top: -14px; right: 12px; padding: 8px 12px; }
  .hero-price-tag .value { font-size: 16px; }
}

/* Личный кабинет и админка на планшетах/телефонах: сайдбар превращается в
   верхнюю панель "бренд + гамбургер", а сама навигация — в выпадающий список
   на всю ширину (а не сжимается в тесный ряд из одних иконок, как было раньше). */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }

  .sidebar {
    position: sticky; top: 0; z-index: 50; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 14px 18px; gap: 14px; background: var(--bg-void); border-bottom: 1px solid var(--blue-dim);
  }
  .sidebar .brand { margin-bottom: 0; flex: 1; }
  .mobile-menu-toggle { display: flex; }

  .side-nav, .sidebar-user { display: none; flex-basis: 100%; width: 100%; }
  .sidebar.nav-open .side-nav, .sidebar.nav-open .sidebar-user { display: flex; }
  .side-nav { flex-direction: column; gap: 3px; padding-top: 10px; border-top: 1px solid var(--blue-dim); margin-top: 2px; }
  .side-nav-item { padding: 12px 14px; }

  .sidebar-user { border-top: 1px solid var(--blue-dim); margin-top: 2px; padding-top: 14px; }
  .sidebar-user .who { display: block; }

  .main-view { padding: 22px 16px 50px; }

  .view-head-actions { width: 100%; }
  .view-head-actions .btn { flex: 1; }

  .toolbar-row .compact-input { min-width: 0; flex: 1 1 auto; }
  .toolbar-row { gap: 10px; }

  .schedule-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .schedule-inline-fields { width: 100%; }
  .schedule-inline-fields .compact-input { flex: 1; min-width: 0; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 40px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .topnav-inner { padding: 14px 18px; }
  .auth-card { padding: 32px 24px; }
  .bulk-action-bar { flex-direction: column; align-items: stretch; }
  .modal-box { padding: 22px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-price-tag { position: static; margin: 0 auto 16px; display: inline-block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
