:root {
  --bg-light: #e4f4ff;
  --brand-green: #00b86b;
  --brand-blue: #0070c9;
  --text-main: #2c3a4a;
  --text-muted: #5a6b7b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- HEADER ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #e5ecf2;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* убрал круг, тень и фон вокруг логотипа */
.logo-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0; /* логотип сам круглый, лишнего не добавляем */
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-text span:nth-child(1) { color: #009688; }
.logo-text span:nth-child(2) { color: #0fb57a; }
.logo-text span:nth-child(3) { color: #0063b1; }

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.nav-link {
  opacity: 0.75;
}

.nav-link.active {
  color: #0367a6;
  opacity: 1;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  opacity: 0.85;
}

.nav-lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg,#fff 33%,#0039a6 33% 66%,#d52b1e 66%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* ---------- HERO ---------- */

.hero {
  flex: 1;
  background: var(--bg-light);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 60px;
  }
}

/* заголовок — Century Gothic, максимум ~2 строки за счёт ширины */
.hero-title {
  font-family: "Century Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(30px, 3.2vw + 6px, 30px);
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 700px; /* держим на две строки */
}

/* подзаголовок — Calibri, в 3 строки макс через max-width */
.hero-subtitle {
  font-family: "Calibri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 999px;
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 600;
  font-size: 17px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  background: #03a25f;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.hero-cta:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.16);
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: "Calibri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- ПРАВАЯ КАРТИНКА ---------- */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 4/5;
  border-radius: 32px;
  background: #f8fbff;
  box-shadow: 0 18px 45px rgba(0,0,0,0.15);
  padding: 18px;
  overflow: hidden;
}

/* картинка чата — из твоего файла ceb-telegram.webp */
.hero-chat-img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
}

/* бот — крупнее и правее, поверх чата */
.hero-bot {
  position: absolute;
  right: -32px;
  bottom: -6px;
  width: 250px;
  height: auto;
  pointer-events: none;
}

.hero-bot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.2));
}

footer {
  text-align: center;
  font-size: 12px;
  color: #8a9bac;
  padding: 16px 12px 20px;
  font-family: "Calibri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== ЛОГО CHATENTRY.RU ===== */

.logo {
  font-family: 'Franklin Gothic Medium', 'Franklin Gothic', Arial, sans-serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.logo-chat {
  color: #02bd8f;
  -webkit-text-stroke: 1.4px #262626;
}

.logo-entry {
  color: #0367a6;
  -webkit-text-stroke: 1.4px #262626;
}

/* легкий Century Gothic */
@font-face {
  font-family: "Century Gothic";
  src: url("/fonts/CenturyGothic-Light.ttf") format("truetype");
  font-weight: 300;
}

h1 {
  font-family: "Century Gothic";
  font-weight: 300;
}

/* ====== СТРАНИЦА "Установка бота" ====== */

.page-inner {
  padding:60px 20px 80px;
}

.install-page {
  max-width:900px;
  margin:0 auto;
}

.install-title {
  font-size:30px;
  font-weight:600;
  margin-bottom:16px;
}

.install-intro {
  font-size:16px;
  color:#555;
  margin-bottom:26px;
}

.install-steps {
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-bottom:24px;
}

.install-step {
  display:flex;
  gap:14px;
  align-items:flex-start;
  background:#f8fafc;
  border-radius:12px;
  padding:14px 16px;
  box-shadow:0 3px 10px rgba(0,0,0,0.03);
}

.install-step-number {
  width:30px;
  height:30px;
  border-radius:50%;
  background:#02bd8f;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  flex-shrink:0;
}

.install-step-body h2 {
  font-size:17px;
  margin-bottom:4px;
}

.install-step-body p {
  font-size:14px;
  color:#444;
  line-height:1.5;
}

.install-note {
  font-size:13px;
  color:#777;
}

/* адаптив установки */
@media (max-width: 900px) {
  .page-inner {
    padding:40px 16px 60px;
  }
}


/* ПРАВАЯ ЧАСТЬ */

.dashboard-main {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  padding: 22px 22px 26px;
}

.dashboard-main__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dashboard-main__title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #0b2033;
}

.dashboard-main__subtitle {
  margin: 0;
  font-size: 14px;
  color: #5b7288;
  max-width: 480px;
}

.dashboard-main__add-module {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  background: #02bd8f;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-main__add-module:hover {
  background: #03a67d;
}

.dashboard-main__group-line {
  font-size: 13px;
  color: #7a8ba0;
  margin-bottom: 16px;
}

.dashboard-main__group-name {
  font-weight: 600;
  color: #0367a6;
}

/* СЕТКА МОДУЛЕЙ */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.module-card {
  background: #f9fcff;
  border-radius: 14px;
  padding: 14px 14px 12px;
  border: 1px solid #dde9f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-card--active {
  border-color: #02bd8f;
}

.module-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.module-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0b2033;
}

.module-card__desc {
  margin: 0;
  font-size: 13px;
  color: #4a6277;
}

.module-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.module-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e1f2ff;
  color: #0367a6;
}

.module-card__actions {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  font-size: 13px;
}

/* Тоггл */

.module-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 18px;
}

.module-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.module-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #c8d6e5;
  border-radius: 999px;
  transition: 0.2s;
}

.module-toggle__slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  top: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}

.module-toggle input:checked + .module-toggle__slider {
  background-color: #02bd8f;
}

.module-toggle input:checked + .module-toggle__slider::before {
  transform: translateX(18px);
}

/* Текстовые кнопки */

.btn-text {
  text-decoration: none;
  color: #0367a6;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text--danger {
  color: #cc4b4b;
}

/* Адаптив для старого dashboard:
   теперь на узких экранах меню остаётся КОЛОННОЙ */

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

  .dashboard-sidebar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .dashboard-menu {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .dashboard-main__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Сброс отступов, чтобы шапка не «уезжала» */
html, body {
  margin: 0;
  padding: 0;
}

/* ====== САЙТОВАЯ ШАПКА (новый сайт) ====== */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo img {
  height: 36px;
  display: block;
}

/* Навигация */
.site-nav {
  display: flex;
  gap: 20px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  text-decoration: none;
  color: #4f5b66;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: #0367a6;
}

.nav-link--active {
  color: #0367a6;
  border-color: #0367a6;
}

/* Язык */
.site-lang .lang-button {
  border: 1px solid rgba(0,0,0,0.08);
  background: #f7f9fb;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* Общая сетка кабинета (новый layout) */
.dashboard-layout {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

/* Карточки в сайдбаре */
.sidebar-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(15, 52, 96, 0.06);
  margin-bottom: 16px;
}

/* Блок группы */
.group-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.group-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #02bd8f, #0367a6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
}

.group-avatar-initials {
  line-height: 1;
}

.group-info {
  font-size: 12px;
}

.group-name {
  font-weight: 600;
  margin-bottom: 2px;
}

.group-meta {
  color: #6c7a89;
}

.group-id {
  color: #a0acb8;
  font-size: 11px;
}

/* ===== ЛЕВЫЙ САЙДБАР ===== */

.sidebar {
  width: 260px;
  flex-shrink: 0;
}

/* Карточка группы */
.sidebar-group-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.sidebar-group-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #02bd8f, #0367a6);
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-group-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-group-title {
  font-weight: 600;
  font-size: 15px;
}

.sidebar-group-sub,
.sidebar-group-id {
  font-size: 12px;
  color: #7b8a99;
}

/* ===== МЕНЮ РАЗДЕЛОВ ===== */

.sidebar-menu {
    background: #ffffff;
    border-radius: 18px;
    padding: 8px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

/* Один пункт меню */
.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 20px;
    margin: 0;

    /* без скругления — чтобы полоса справа была ровной */
    border-radius: 0;

    /* прозрачная полоса справа по умолчанию */
    border-right: 4px solid transparent;

    cursor: pointer;

    /* всё прижато к левому краю */
    justify-content: flex-start;
    text-align: left;
}

.sidebar-menu-item:hover {
    background: #f3f8ff;
}

/* Активный пункт: фон + синяя вертикальная полоса справа */
.sidebar-menu-item--active {
    background: #e9f4ff;
    font-weight: 600;
    border-right-color: #0367a6; /* СИНЯЯ ПОЛОСА СПРАВА */
}

/* Иконка слева */
.sidebar-menu-icon {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    opacity: 0.9;
}

/* Текст тянется до конца строки и выровнен влево */
.sidebar-menu-text {
    flex: 1;
    white-space: nowrap;
    text-align: left;
}

.sidebar-menu-item--active::after {
    content: none !important;
}

/* OVERRIDE: вид меню в личном кабинете */

.dashboard-menu {
  background: #ffffff;
  border-radius: 18px;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.dashboard-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  text-decoration: none;
  color: #314252;
  font-size: 14px;
  justify-content: flex-start;
  text-align: left;
  border-radius: 0;
  border-right: 4px solid transparent; /* полоса справа — пока прозрачная */
  cursor: pointer;
}

.dashboard-menu__item:hover {
  background: #f3f8ff;
}

.dashboard-menu__item--active {
  background: #e9f4ff;
  font-weight: 600;
  border-right-color: #0367a6; /* СИНЯЯ полоса справа */
}

.dashboard-menu__icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-menu__label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}

/* ===== Хедер на главной: логотип слева, меню справа ===== */

.header-inner {
  display: flex;
  align-items: center;
}

/* логотипный блок слева */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;     /* выталкивает меню вправо */
}

/* меню в шапке справа */
header .site-nav {
  display: flex;
  gap: 20px;
  flex: 0 0 auto;         /* СБРАСЫВАЕМ старый flex:1 */
  margin-left: auto;      /* прижимаем блок меню к правому краю */
  justify-content: flex-end;
}

.auth-button--tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: #0088cc;
}

.auth-button--tg::before {
  content: "✈";
  font-size: 16px;
}

.auth-section {
  max-width: 480px;
  margin: 40px auto;
  padding: 24px 20px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 52, 96, 0.12);
  text-align: center;
}

.auth-section h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-section p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #617286;
}

.auth-button--tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: #0088cc;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.auth-button--tg::before {
  content: "✈";
  font-size: 16px;
}
