:root {
  --bg: #0b0e14;
  --bg-card: rgba(18, 25, 40, 0.6);
  --bg-card-solid: #12192a;
  --bg-hover: rgba(42, 52, 80, 0.4);
  --border: rgba(255, 255, 255, 0.05);
  --border-strong: #2a344a;
  --text: #eef2fb;
  --text-muted: #9aa4bf;
  --accent: #6b8cff;
  --accent-dim: #5b7aef;
  --accent-glow: rgba(107, 140, 255, 0.3);
  --gradient-primary: linear-gradient(135deg, #2b59ff, #a14cff);
  --gradient-text: linear-gradient(135deg, #a0e9ff, #6b8cff, #c084fc);
  --success: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --radius-lg: 32px;
  --font: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Фоновые эффекты в стиле CRAMEBOT */
.bg-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-blur::before {
  content: '';
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  top: 10%;
  left: -10%;
  background: radial-gradient(circle at center, rgba(0, 180, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  animation: bg-float 30s infinite alternate ease-in-out;
}
.bg-blur::after {
  content: '';
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  bottom: 0;
  right: -10%;
  background: radial-gradient(circle at center, rgba(150, 0, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(100px);
  animation: bg-float 25s infinite alternate-reverse ease-in-out;
}
@keyframes bg-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* Header — стиль CRAMEBOT */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  margin-bottom: 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 0;
  padding-left: 0.5rem;
  padding-right: 2rem;
  max-width: none;
}
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo span { -webkit-text-fill-color: inherit; }
.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav a {
  margin-left: 0;
  color: #b0b8d0;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s;
}
.nav a:hover { color: #fff; text-decoration: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  padding: 1rem 2rem;
  font-size: 1rem;
  box-shadow: 0 10px 25px -5px rgba(43, 89, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px -5px rgba(43, 89, 255, 0.6);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(107, 140, 255, 0.1);
  box-shadow: 0 0 15px var(--accent-glow);
  text-decoration: none;
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { text-decoration: none; opacity: 0.9; }

/* Hero — стиль CRAMEBOT */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #c0d0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}
.hero .btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btns .btn-primary { padding: 1rem 3rem; font-size: 1.1rem; }
.hero .btns .btn-primary i { margin-left: 0.5rem; }

/* Секция «Всё для твоего бота» — карточки возможностей */
.features-section {
  padding: 4rem 0 5rem;
  position: relative;
  z-index: 1;
}
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 3rem;
  background: linear-gradient(135deg, #ffffff, #b0c8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature-card {
  background: rgba(18, 25, 40, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  transition: all 0.25s ease;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}
.feature-card:hover {
  border-color: rgba(107, 140, 255, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 25px 40px -10px rgba(43, 89, 255, 0.2);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #6b8cff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.feature-icon i {
  -webkit-text-fill-color: inherit;
}
.feature-card h3 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text);
}
.feature-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* Блок «Как это работает» */
.how-it-works-section {
  padding: 4rem 0 5rem;
  position: relative;
  z-index: 1;
}
.how-it-works-block {
  background: rgba(12, 18, 30, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 48px;
  padding: 4rem 2rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 25px 40px -15px rgba(0, 0, 0, 0.5);
}
.how-it-works-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text);
}
.how-it-works-title i {
  color: #f59e0b;
  margin-right: 0.5rem;
}
.how-it-works-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.how-it-works-node {
  background: #151e2f;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 1.5rem 2rem;
  min-width: 180px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.how-it-works-node i {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.how-it-works-node:hover {
  border-color: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}
.how-it-works-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin: 0 0.25rem;
}
@media (max-width: 700px) {
  .how-it-works-flow {
    flex-direction: column;
  }
  .how-it-works-arrow {
    transform: rotate(90deg);
  }
}

/* CTA-блок «Готовы автоматизировать» */
.cta-section {
  padding: 4rem 0 5rem;
  position: relative;
  z-index: 1;
}
.cta-block {
  background: rgba(12, 18, 30, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 64px;
  padding: 5rem 2rem;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 25px 40px -15px rgba(0, 0, 0, 0.5);
}
.cta-block__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.cta-block__sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}
.cta-block__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  border-radius: 50px;
  background: linear-gradient(90deg, #4d4dff, #b000ff);
  box-shadow: 0 10px 30px -5px rgba(77, 77, 255, 0.4), 0 0 20px -5px rgba(176, 0, 255, 0.3);
}
.cta-block__btn:hover {
  box-shadow: 0 15px 35px -5px rgba(77, 77, 255, 0.5), 0 0 30px -5px rgba(176, 0, 255, 0.4);
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}
.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, #b0c8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-card .sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.auth-card .footer a {
  color: var(--accent);
  font-weight: 500;
}
.auth-card .footer a:hover {
  color: #fff;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-group input,
.form-group__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.8);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder {
  color: var(--text-muted);
}
.form-group input:focus,
.form-group__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-card .btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
}
.auth-card .footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.telegram-block {
  margin-bottom: 24px;
}
.telegram-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.telegram-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 12px;
  line-height: 1.4;
}
.telegram-hint strong { color: var(--text); }
.auth-divider {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 20px 0 12px;
  text-align: center;
}
#telegramWidget iframe {
  margin: 0 auto 8px;
  display: block;
}

/* Dashboard */
.dashboard-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.sidebar {
  width: 64px;
  background: rgba(12, 18, 30, 0.8);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  overflow: hidden;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-layout.sidebar-expanded .sidebar {
  width: 260px;
}
.sidebar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  color: #b0b8d0;
  border-left: 3px solid transparent;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
  min-width: 0;
}
.dashboard-layout.sidebar-expanded .sidebar a {
  justify-content: flex-start;
  padding: 12px 24px;
}
.sidebar__icon {
  flex-shrink: 0;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
}
.sidebar__icon .fas, .sidebar__icon .fa-solid {
  color: currentColor;
}
.sidebar__text {
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-layout.sidebar-expanded .sidebar__text {
  max-width: 180px;
  opacity: 1;
}
.sidebar a:hover, .sidebar a.active {
  color: var(--accent);
  background: rgba(107, 140, 255, 0.08);
  border-left-color: var(--accent);
  text-decoration: none;
}
.main-content { padding: 32px; }
.main-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff, #b0c8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.main-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Карточки — стиль CRAMEBOT (backdrop blur, скругление, hover) */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  margin-bottom: 20px;
  transition: all 0.25s ease;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}
.card:hover {
  border-color: rgba(107, 140, 255, 0.2);
}
.card h2,
.card .card__heading {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 600;
}
.bot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.bot-card {
  background: rgba(18, 25, 40, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: all 0.25s ease;
  display: flex;
  align-items: stretch;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}
.bot-card:hover {
  border-color: rgba(107, 140, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 25px 40px -10px rgba(43, 89, 255, 0.2);
}
.bot-card__link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.bot-card__link:hover {
  text-decoration: none;
  color: inherit;
}
.bot-card__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #151e2f;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
}
.bot-card__icon .fas, .bot-card__icon .fa-solid {
  color: inherit;
}
.bot-card__info {
  flex: 1;
  min-width: 0;
}
.bot-card__name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}
.bot-card__username {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.bot-card__type {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.bot-card__delete {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 12px 12px 12px 0;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bot-card__delete:hover {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}
.bot-card__delete-icon {
  pointer-events: none;
}
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* Основное — компактные карточки настроек бота */
.main-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.main-action-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.main-action-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.main-action-card--disabled {
  opacity: 0.7;
  pointer-events: none;
}
.main-action-card--disabled:hover {
  border-color: var(--border);
  box-shadow: none;
}
.main-action-card--danger:hover {
  border-color: rgba(248, 113, 113, 0.5);
}
.main-action-card__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.main-action-card__icon .fas, .main-action-card__icon .fa-solid {
  color: inherit;
}
.main-action-card--danger .main-action-card__icon {
  color: var(--danger);
}
.main-action-card__info {
  flex: 1;
  min-width: 0;
}
.main-action-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 2px;
}
.main-action-card__desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 6px;
}
.main-action-card__desc:last-child {
  margin-bottom: 0;
}
.main-action-card__form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.main-action-card__form input.main-action-card__input {
  padding: 6px 10px;
  font-size: 0.85rem;
  min-width: 100px;
}
.main-action-card__input {
  flex: 1;
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
}
.main-action-card .btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.main-action-card .btn:not(.btn-sm) {
  margin-top: 4px;
  padding: 8px 14px;
  font-size: 0.9rem;
}
.main-action-card__form--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.main-action-card__form--stack .main-action-card__input {
  min-width: 0;
}

.add-bot-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.add-bot-form .form-group { margin-bottom: 16px; }
.add-bot-form .btn { margin-right: 8px; }
.form-group__label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 500; }
.edit-textarea, .edit-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.8);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.edit-textarea:focus, .edit-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group select.edit-input,
.form-group select,
.edit-input[type="text"] + select,
select.edit-input {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(12, 18, 30, 0.8);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa4bf' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-group select:focus,
select.edit-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.edit-textarea { min-height: 80px; resize: vertical; }
.footer-btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.footer-btn-row input { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.custom-messages-list { margin-bottom: 20px; }
.custom-message-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.custom-message-preview { flex: 1; min-width: 120px; font-size: 0.9rem; color: var(--text); }
.custom-message-meta { font-size: 0.8rem; color: var(--text-muted); }
.custom-message-editor.card { margin-top: 16px; }

/* Редактировать бота — сворачиваемые группы (аккордеон) */
.edit-menu-section {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.edit-menu-section:last-of-type {
  margin-bottom: 24px;
}
.edit-menu-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.edit-menu-section__header:hover {
  background: var(--bg-hover);
}
.edit-menu-section__header:focus {
  outline: none;
}
.edit-menu-section__header:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.edit-menu-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.edit-menu-section__chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.edit-menu-section--open .edit-menu-section__chevron {
  transform: rotate(180deg);
}
.edit-menu-section__content {
  display: none;
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--border);
}
.edit-menu-section--open .edit-menu-section__content {
  display: block;
}
.edit-menu-section__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 12px 0 12px 0;
}
.edit-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.edit-menu-section .edit-menu-grid {
  margin-bottom: 0;
}
.edit-menu-grid--row4 {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.edit-menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.edit-menu-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.edit-menu-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.edit-menu-card__icon {
  font-size: 1.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.edit-menu-card__icon .fas, .edit-menu-card__icon .fa-solid {
  color: inherit;
}
.edit-menu-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Двухколоночная раскладка: слева меню, справа выезжающая панель */
.edit-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .edit-layout {
    flex-direction: column;
  }
  .edit-menu-column {
    flex: none;
    width: 100%;
  }
}
.edit-menu-column {
  flex: 0 0 320px;
  min-width: 0;
}
.edit-panel-column {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.edit-panel-slide {
  position: relative;
  min-height: 200px;
}
.edit-panel-slide .edit-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: transform 0.3s ease, opacity 0.25s ease;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.edit-panel-slide .edit-panel.edit-panel--active {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.edit-panel.card { margin-top: 0; }

/* Выбор типа бота — карточки */
.bot-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.bot-type-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.bot-type-card:not(.bot-type-card--disabled):hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.bot-type-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.bot-type-card--disabled {
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}
.bot-type-card--disabled:hover {
  border-color: var(--border);
}
.bot-type-card__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-muted);
}
.bot-type-card__icon .fas, .bot-type-card__icon .fa-solid {
  color: inherit;
}
.bot-type-card__info {
  flex: 1;
  min-width: 0;
}
.bot-type-card__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}
.bot-type-card__desc {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.bot-type-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Bot settings tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.tabs a, .tabs span {
  padding: 12px 20px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tabs a:hover { color: var(--text); }
.tabs a.active, .tabs span.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tabs span { cursor: default; }

/* Tables / lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
tr:hover td { background: var(--bg-hover); }
.actions-cell { white-space: nowrap; }
.actions-cell button, .actions-cell .btn { margin-right: 8px; padding: 6px 12px; font-size: 0.85rem; }

/* Theme customization */
.theme-preview {
  width: 100%;
  max-width: 320px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  background: var(--bg);
}
.theme-preview .btn { margin-top: 12px; }
.color-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.color-row label { min-width: 120px; }
.color-row input[type="color"] {
  width: 48px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}
.color-row input[type="text"] {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

/* Кассы — карточки как у ботов */
.payment-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.payment-connection-card {
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.payment-connection-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.payment-connection-card.enabled { border-color: var(--success); }
.payment-connection-card__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  flex: 1;
  min-width: 0;
}
.payment-connection-card__logo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.payment-connection-card__logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.payment-connection-card__logo .payment-logo-fallback {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}
.payment-connection-card__info {
  flex: 1;
  min-width: 0;
}
.payment-connection-card__name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}
.payment-connection-card__status {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.payment-connection-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-left: 1px solid var(--border);
}
.payment-connection-card__edit,
.payment-connection-card__delete {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.payment-connection-card__edit:hover {
  background: var(--bg-hover);
  color: var(--accent);
}
.payment-connection-card__delete:hover {
  background: var(--bg-hover);
  color: var(--danger);
}
.payment-connection-card__edit svg,
.payment-connection-card__delete svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Выбор провайдера — карточки с логотипами */
.payment-provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.payment-provider-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.payment-provider-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.payment-provider-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.payment-provider-card__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.payment-provider-card__logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.payment-provider-card__logo .payment-logo-fallback {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}
.payment-provider-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
}
.payment-add-form.hidden { display: none !important; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.alert-error { background: rgba(248, 113, 113, 0.15); border: 1px solid var(--danger); color: var(--danger); }
.alert-success { background: rgba(52, 211, 153, 0.15); border: 1px solid var(--success); color: var(--success); }
.alert-info { background: rgba(107, 140, 255, 0.1); border: 1px solid var(--accent); color: var(--accent); }

/* Уведомления-полоски в правом верхнем углу */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.toast-container > * {
  pointer-events: auto;
}
.toast-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.25s ease;
  cursor: pointer;
}
.toast-strip--visible {
  transform: translateX(0);
  opacity: 1;
}
.toast-strip__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.toast-strip__text {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
}
.toast-strip--success {
  border-color: var(--success);
  color: var(--success);
}
.toast-strip--success .toast-strip__text { color: var(--text); }
.toast-strip--success .toast-strip__icon { color: var(--success); }
.toast-strip--error {
  border-color: var(--danger);
  color: var(--danger);
}
.toast-strip--error .toast-strip__text { color: var(--text); }
.toast-strip--error .toast-strip__icon { color: var(--danger); }
.toast-strip--info {
  border-color: var(--accent);
}
.toast-strip--info .toast-strip__icon { color: var(--accent); }
.toast-strip--info .toast-strip__text { color: var(--text); }

.hidden { display: none !important; }

.run-commands {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 0;
  color: var(--accent);
}
.run-bots-card pre.run-commands { margin-top: 8px; }
.run-bots-card code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }
.footer-btn-row { display: flex; align-items: center; flex-wrap: wrap; }
.footer-btn-row input { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }

.subscription-plan-card__icon { color: var(--text-muted); }
.subscription-plan-card__icon .fas, .subscription-plan-card__icon .fa-solid { color: inherit; }

::selection {
  background: var(--accent);
  color: #000;
}
