/* ============================================================
   WEWO — единая дизайн-система
   Шрифт: Onest. Палитра: #6FA8FF / #0A0B14 / #EAECF5 (+ серый #888).
   Плоский дизайн, крупные пилюли-скругления, много «воздуха».
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* --- Палитра (строго) --- */
  --bg:      #0A0B14;   /* чёрный фон */
  --white:   #EAECF5;   /* белый текст */
  --orange:  #6FA8FF;   /* оранжевый акцент */
  --gray:    #888888;   /* приглушённый текст */

  /* Служебные тинты (только белый/чёрный с прозрачностью, новых цветов нет) */
  --line:      rgba(255, 250, 250, 0.12);
  --line-soft: rgba(255, 250, 250, 0.07);
  --surface:   rgba(255, 250, 250, 0.04);
  --surface-2: rgba(255, 250, 250, 0.07);

  /* --- Скругления --- */
  --r-pill: 999px;
  --r-lg:   40px;
  --r-md:   24px;
  --r-sm:   18px;

  --font: "Onest", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Кнопки (все — пилюли) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--orange); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-white { background: var(--white); color: var(--bg); }
.btn-white:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--line); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost { background: transparent; color: var(--gray); border-color: var(--line); }
.btn-ghost:hover { color: var(--orange); border-color: var(--orange); }
.btn-linktext { background: transparent; color: var(--white); padding: 14px 6px; }
.btn-linktext:hover { color: var(--orange); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* Линейные иконки (Lucide) */
.icon { width: 30px; height: 30px; color: var(--white); transition: color .18s ease; }
.icon-sm { width: 18px; height: 18px; color: var(--orange); flex: none; }

/* ---------- Верхняя панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: rgba(10,11,20, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.mainnav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: var(--gray); text-decoration: none;
  font-weight: 600; font-size: 15px;
  padding: 9px 16px; border-radius: var(--r-pill);
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--white); }
.nav-link.active { color: var(--white); background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.user-login { color: var(--white); font-size: 14px; font-weight: 600; }

/* ---------- Профиль ---------- */
.profile { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 12px 6px 6px;
  cursor: pointer; color: var(--white);
}
.profile-btn:hover { border-color: var(--orange); }
.profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.profile-name { font-size: 14px; font-weight: 600; }
.caret { color: var(--gray); font-size: 12px; }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 230px;
  background: #150808; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 8px; z-index: 40;
}
.profile-menu[hidden] { display: none; }
.pm-header { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pm-login { font-weight: 700; font-size: 15px; }
.pm-plan { color: var(--gray); font-size: 12.5px; margin-top: 3px; }
.pm-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--white);
  padding: 11px 12px; border-radius: var(--r-sm);
  font-family: var(--font); font-size: 14.5px; cursor: pointer;
}
.pm-item:hover { background: var(--surface-2); color: var(--orange); }
.pm-item.danger { color: var(--gray); }
.pm-item.danger:hover { color: var(--orange); }

/* ============================================================
   ГЛАВНЫЙ ЭКРАН (HERO)
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
/* Плоский оранжевый круг за фигурой */
.hero-glow {
  position: absolute; top: 44%; left: 50%;
  width: min(600px, 64vw); height: min(600px, 64vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.9; z-index: 0;
  animation: glowPulse 7s ease-in-out infinite;
}
.hero-word {
  position: absolute; top: 10%; left: 0; right: 0; margin: 0;
  text-align: center; z-index: 1;
  font-weight: 900; font-size: clamp(110px, 24vw, 360px);
  line-height: 0.9; letter-spacing: -0.05em;
  color: var(--white); white-space: nowrap;
  animation: heroTitleIn 1s ease both;
}
.hero-figure {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  height: 97%; width: auto; max-width: none; z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  animation:
    heroFigureIn 1s cubic-bezier(.2,.7,.2,1) both,
    heroFloat 6s ease-in-out 1s infinite;
}
@keyframes heroFigureIn {
  from { opacity: 0; transform: translateX(-50%) translateY(34px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-14px); }
}
@keyframes heroTitleIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes glowPulse { 0%, 100% { opacity: 0.82; } 50% { opacity: 0.95; } }

/* Плашки статистики */
.hero-badges { position: absolute; top: 84px; left: 32px; display: flex; gap: 10px; flex-wrap: wrap; z-index: 3; }
.hbadge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 8px 15px;
  font-size: 13px; font-weight: 600; color: var(--white);
  backdrop-filter: blur(6px);
}
.dot-o { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.hero-teamlabel {
  position: absolute; top: 88px; right: 32px; z-index: 3;
  color: var(--gray); font-size: 12.5px; letter-spacing: 0.18em; font-weight: 700;
}

/* Заголовок и кнопки слева */
.hero-lead { position: absolute; left: 40px; bottom: 64px; z-index: 3; max-width: 440px; animation: heroTitleIn 1s ease 0.2s both; }
.lead-title { font-weight: 900; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.02; letter-spacing: -0.03em; }
.lead-title .accent { color: var(--orange); }
.lead-sub { color: var(--gray); margin: 18px 0 26px; font-size: 16px; }
.lead-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* Карточка Директора */
.director-chip {
  position: absolute; left: 54%; top: 58%; z-index: 3; width: 240px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  backdrop-filter: blur(10px);
  animation: heroTitleIn 1s ease 0.5s both;
}
.dc-title { font-size: 11px; letter-spacing: 0.14em; color: var(--orange); font-weight: 800; margin-bottom: 7px; }
.dc-text { font-size: 13px; color: var(--gray); line-height: 1.5; }

/* Карточки специалистов справа */
.agent-chips {
  position: absolute; right: 34px; top: 50%; transform: translateY(-50%);
  z-index: 3; display: flex; flex-direction: column; gap: 14px; width: 220px;
  animation: heroTitleIn 1s ease 0.4s both;
}
.achip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; backdrop-filter: blur(10px);
  transition: border-color .18s ease;
}
.achip:hover { border-color: var(--orange); }
.achip-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.achip-desc { color: var(--gray); font-size: 13.5px; margin: 5px 0 11px; }
.achip-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--white); }
.achip-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

/* Уведомление о новой задаче */
.task-toast {
  position: absolute; right: 34px; bottom: 34px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 12px 18px;
  font-size: 13px; color: var(--white); backdrop-filter: blur(10px);
  animation: toastIn 0.6s ease 1.2s both;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   СЕКЦИИ ВИТРИНЫ
   ============================================================ */
.section { padding: 110px 32px; border-bottom: 1px solid var(--line-soft); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-inner.center { text-align: center; }
.section-eyebrow {
  color: var(--orange); font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 800; margin-bottom: 14px;
}
.section-title {
  font-weight: 900; font-size: clamp(30px, 4.4vw, 56px);
  letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 16px;
}
.section-title .accent { color: var(--orange); }
.section-text { color: var(--gray); font-size: 17px; max-width: 620px; margin: 0 auto 30px; }

/* Карточки возможностей */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 30px 24px;
  transition: border-color .18s ease;
}
.card:hover { border-color: var(--orange); }
.card:hover .icon { color: var(--orange); }
.card-icon { margin-bottom: 20px; }
.card-title { font-weight: 800; font-size: 18px; margin-bottom: 10px; letter-spacing: -0.01em; }
.card-text { color: var(--gray); font-size: 14.5px; line-height: 1.55; }

/* Карточки агентов */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.agent-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px 22px; text-align: center;
  transition: border-color .18s ease;
}
.agent-card:hover { border-color: var(--orange); }
.agent-ava {
  width: 56px; height: 56px; border-radius: var(--r-sm); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
}
.agent-ava.dir, .agent-ava.mk { background: var(--orange); color: var(--bg); }
.agent-ava.soon { background: var(--surface-2); color: var(--gray); border: 1px solid var(--line); }
.agent-name { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.agent-role { color: var(--gray); font-size: 14px; line-height: 1.5; margin-bottom: 16px; min-height: 42px; }
.agent-status {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 5px 14px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--gray);
}
.agent-status.on { background: rgba(111,168,255, 0.14); color: var(--orange); }

/* Финальный призыв — большой оранжевый блок-пилюля */
.cta-band { padding: 40px 32px 120px; border-bottom: none; }
.cta-band .section-inner {
  background: var(--orange); color: var(--bg);
  border-radius: var(--r-lg); padding: 80px 40px;
}
.cta-band .section-title { color: var(--bg); }
.cta-band .section-text { color: rgba(10,11,20, 0.7); }
.cta-band .btn-primary { background: var(--bg); color: var(--white); }

.site-footer { text-align: center; color: var(--gray); font-size: 13px; padding: 40px 20px; }

/* ============================================================
   КАБИНЕТ / ЧАТ
   ============================================================ */
.chat-section { max-width: 880px; margin: 0 auto; padding: 60px 24px 60px; }
.chat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 32px; overflow: hidden;
  display: flex; flex-direction: column; height: 640px;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.chat-head-left { display: flex; align-items: center; gap: 13px; }
.avatar {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--orange); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.chat-title { font-weight: 800; font-size: 16px; }
.chat-role { color: var(--gray); font-size: 12.5px; }
.chat { flex: 1; overflow-y: auto; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.chat::-webkit-scrollbar { width: 8px; }
.chat::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.loading { color: var(--gray); text-align: center; margin-top: 20px; }

.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg .bubble {
  max-width: 80%; padding: 13px 17px; border-radius: 18px;
  line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; font-size: 15px;
}
.msg.agent .bubble { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 6px; }
.msg.user .bubble { background: var(--orange); color: var(--bg); font-weight: 500; border-top-right-radius: 6px; }
.msg .who { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 6px; }
.typing { color: var(--gray); font-style: italic; }

/* Индикатор «печатает» — три анимированные точки */
.dots { display: inline-flex; gap: 5px; align-items: center; height: 18px; }
.dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gray);
  animation: dotBounce 1.2s infinite ease-in-out;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40%           { transform: translateY(-5px); opacity: 1; }
}
.to-tag { font-size: 11px; font-weight: 700; color: var(--bg); opacity: 0.65; margin-bottom: 4px; }

/* Панель «Кому» */
.recipient-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px 0; }
.rb-label { color: var(--gray); font-size: 13px; margin-right: 2px; }
.rb-pill {
  background: var(--surface); border: 1px solid var(--line); color: var(--gray);
  border-radius: var(--r-pill); padding: 7px 15px;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.rb-pill:hover { color: var(--white); border-color: var(--orange); }
.rb-pill.active { background: var(--orange); color: var(--bg); border-color: transparent; }

/* Поле ввода */
.input-bar { display: flex; gap: 10px; padding: 18px; border-top: 1px solid var(--line); }
.input {
  flex: 1; resize: none; background: var(--bg); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 16px; font-size: 15px; font-family: var(--font); max-height: 160px;
}
.input:focus { outline: none; border-color: var(--orange); }
.input::placeholder { color: var(--gray); }
.send-btn { padding: 0 24px; }
.footnote { text-align: center; color: var(--gray); font-size: 12.5px; margin-top: 22px; }

/* ---------- Вход / регистрация ---------- */
.auth-card { max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 32px; overflow: hidden; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tab {
  flex: 1; background: transparent; color: var(--gray); border: none;
  padding: 18px; font-family: var(--font); font-size: 15px; font-weight: 700; cursor: pointer;
}
.auth-tab.active { color: var(--white); box-shadow: inset 0 -2px 0 var(--orange); }
.auth-form { padding: 30px 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.auth-title { font-weight: 800; font-size: 21px; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-input { width: 100%; border-radius: var(--r-pill); }
.auth-submit { margin-top: 6px; }
.auth-error { color: var(--orange); font-size: 14px; min-height: 18px; font-weight: 600; }
.auth-hint { color: var(--gray); font-size: 14px; text-align: center; }
.auth-hint a { color: var(--orange); text-decoration: none; }
.auth-hint a:hover { text-decoration: underline; }

/* ---------- Окно тарифов ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,11,20, 0.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal { width: 100%; max-width: 940px; max-height: 90vh; overflow-y: auto; background: #150808; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-weight: 900; font-size: 26px; letter-spacing: -0.03em; }
.modal-close { background: transparent; border: 1px solid var(--line); color: var(--gray); border-radius: 12px; width: 36px; height: 36px; cursor: pointer; }
.modal-close:hover { color: var(--orange); border-color: var(--orange); }
.modal-close .icon-sm { color: inherit; width: 16px; height: 16px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 18px; display: flex; flex-direction: column; }
.plan.current { border-color: var(--orange); }
.plan-badge { position: absolute; top: -11px; left: 18px; background: var(--orange); color: var(--bg); font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: var(--r-pill); }
.plan-name { font-weight: 800; font-size: 18px; }
.plan-price { color: var(--gray); font-size: 13px; margin: 2px 0 16px; }
.plan-features { list-style: none; margin: 0 0 20px; flex: 1; }
.plan-features li { color: var(--white); font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.plan-features li:last-child { border-bottom: none; }
.plan-btn { width: 100%; }
.modal-note { color: var(--gray); font-size: 13px; text-align: center; margin-top: 22px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1150px) {
  .agent-chips, .director-chip, .task-toast { display: none; }
}
@media (max-width: 860px) {
  .cards, .agents { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero-badges, .hero-teamlabel { display: none; }
  .hero-word { font-size: 32vw; letter-spacing: -0.03em; }
  .hero-lead { left: 20px; right: 20px; bottom: 40px; max-width: none; }
  .section { padding: 80px 20px; }
}
@media (max-width: 480px) {
  .cards, .agents, .plans { grid-template-columns: 1fr; }
}

/* Уважаем «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .hero-figure, .hero-word, .hero-glow, .hero-lead, .director-chip, .agent-chips, .task-toast {
    animation: none !important;
  }
}

/* ============================================================
   МОЙ ОФИС — карусель ИИ-сотрудников (арки)
   ============================================================ */
.agent-stage {
  position: relative;
  min-height: calc(100vh - 74px);
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 30px 20px 26px;
}
.stage-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(58% 46% at 50% 44%, rgba(111,168,255,0.18), transparent 72%);
}

.agent-carousel {
  --shift: 330px;
  position: relative; flex: 1; width: 100%; max-width: 1120px; margin: 0 auto;
  min-height: 560px;
}
.arch-item {
  position: absolute; left: 50%; bottom: 30px;
  width: clamp(240px, 26vw, 300px);
  transform-origin: bottom center;
  transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .45s ease;
  cursor: pointer; z-index: 1;
}
.arch-item.pos-center { transform: translateX(-50%) scale(1.16); opacity: 1; z-index: 3; }
.arch-item.pos-left   { transform: translateX(calc(-50% - var(--shift))) scale(0.88); opacity: 0.5; z-index: 2; }
.arch-item.pos-right  { transform: translateX(calc(-50% + var(--shift))) scale(0.88); opacity: 0.5; z-index: 2; }
.arch-item.pos-hidden { transform: translateX(-50%) scale(0.6); opacity: 0; z-index: 1; pointer-events: none; }
.arch-item.pos-left:hover, .arch-item.pos-right:hover { opacity: 0.72; }

.arch {
  position: relative; display: block; width: 100%; padding: 0; border: none; cursor: pointer;
  height: clamp(340px, 50vh, 470px);
  border-radius: 999px 999px 26px 26px;
  background: linear-gradient(180deg, #6FA8FF 0%, #6FA8FF 58%, #6FA8FF 100%);
  overflow: hidden;
  box-shadow: 0 0 70px rgba(111,168,255,0.4), 0 30px 60px -20px rgba(0,0,0,0.75);
  transition: box-shadow .45s ease;
}
.pos-center .arch { box-shadow: 0 0 120px rgba(111,168,255,0.7), 0 40px 80px -18px rgba(0,0,0,0.85); }
.arch-name {
  position: absolute; top: 26px; left: 0; right: 0; text-align: center; z-index: 2;
  color: var(--white); font-weight: 900; font-size: 21px; letter-spacing: -0.01em;
}
.pos-center .arch-name { font-size: 27px; top: 30px; }
.arch-photo {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 84%; object-fit: cover; object-position: bottom center; z-index: 1;
}
.arch-phrase { text-align: center; color: var(--gray); font-size: 15px; margin-top: 18px; transition: color .3s ease; }
.pos-center .arch-phrase { color: var(--white); font-weight: 500; }

/* Стрелки */
.car-arrow {
  position: absolute; top: 46%; transform: translateY(-50%); z-index: 6;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); transition: border-color .18s ease, color .18s ease;
}
.car-arrow svg { width: 24px; height: 24px; }
.car-arrow:hover { border-color: var(--orange); color: var(--orange); }
.car-arrow.left { left: 26px; }
.car-arrow.right { right: 26px; }

/* Точки */
.car-dots { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.car-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--line); border: none; cursor: pointer; transition: width .25s ease, background .25s ease; }
.car-dot.active { width: 28px; background: var(--orange); }

.carousel-logo { text-align: center; font-weight: 900; font-size: 26px; letter-spacing: -0.02em; margin-top: 22px; }
.stage-hint { text-align: center; color: var(--gray); font-size: 13px; margin-top: 10px; }

/* Кнопка «к команде» в чате */
.chat-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.chat-back svg { width: 18px; height: 18px; }
.chat-back:hover { border-color: var(--orange); color: var(--orange); }

@media (max-width: 900px) {
  .agent-carousel { --shift: 250px; }
}
@media (max-width: 640px) {
  .agent-carousel { --shift: 66vw; min-height: 460px; }
  .car-arrow { display: none; }
  .arch-item { width: clamp(220px, 72vw, 280px); }
  .arch-item.pos-center { transform: translateX(-50%) scale(1.08); }
}

/* ============================================================
   ТАРИФЫ — арки-карточки (референс «our services»)
   ============================================================ */
.price-head { text-align: center; margin-bottom: 12px; }
.price-head .section-text { margin-left: auto; margin-right: auto; }

.price-arches {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px;
  align-items: stretch;
}
.price-arch {
  position: relative;
  border-radius: 999px 999px var(--r-md) var(--r-md);
  padding: 52px 26px 28px;
  min-height: 460px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  transition: transform .2s ease;
}
.price-arch:hover { transform: translateY(-4px); }
.price-arch.orange { background: var(--orange); color: var(--white); }
.price-arch.dark { background: var(--bg); border: 1px solid var(--line); color: var(--white); }

/* Бейдж «Текущий» */
.pa-badge {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  background: var(--white); color: var(--orange);
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em;
  padding: 5px 13px; border-radius: var(--r-pill);
}

/* Крупная цифра */
.pa-top { text-align: center; }
.pa-num { font-weight: 900; font-size: clamp(52px, 5vw, 74px); line-height: 1; letter-spacing: -0.04em; }
.pa-num-cap { font-size: 14px; font-weight: 600; margin-top: 8px; opacity: 0.85; }
.price-arch.dark .pa-num-cap { color: var(--gray); opacity: 1; }

/* Низ карточки */
.pa-bottom { }
.pa-name { font-weight: 900; font-size: 24px; letter-spacing: -0.02em; margin-bottom: 8px; }
.pa-desc { font-size: 13.5px; line-height: 1.5; margin-bottom: 20px; opacity: 0.85; }
.price-arch.dark .pa-desc { color: var(--gray); opacity: 1; }

/* Кнопка тарифа (pill), неактивна */
.pa-btn {
  width: 100%; border: none; border-radius: var(--r-pill);
  padding: 13px 20px; font-family: var(--font); font-size: 14.5px; font-weight: 700;
  cursor: default; opacity: 0.85;
}
.price-arch.orange .pa-btn { background: var(--bg); color: var(--white); }
.price-arch.dark .pa-btn { background: var(--orange); color: var(--bg); }
.price-arch .pa-btn:disabled { opacity: 0.6; }

.price-note { text-align: center; color: var(--gray); font-size: 13px; margin-top: 30px; }

@media (max-width: 900px) {
  .price-arches { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 520px) {
  .price-arches { grid-template-columns: 1fr; }
  .price-arch { min-height: 380px; padding: 48px 24px 26px; }
}

/* ============================================================
   ВЛОЖЕНИЯ (файлы и фото в чате)
   ============================================================ */
.attach-btn {
  flex: none; width: 46px; height: 46px; align-self: flex-end;
  background: var(--bg); border: 1px solid var(--line); color: var(--gray);
  border-radius: var(--r-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .18s ease, border-color .18s ease;
}
.attach-btn svg { width: 20px; height: 20px; }
.attach-btn:hover { color: var(--orange); border-color: var(--orange); }

/* Превью выбранного файла над полем ввода */
.attach-preview { padding: 12px 18px 0; }
.attach-preview[hidden] { display: none; }
.attach-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 8px 6px 10px; max-width: 100%;
}
.attach-thumb { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.attach-ic { width: 22px; height: 22px; color: var(--orange); }
.attach-name { font-size: 13.5px; color: var(--white); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-x {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: transparent; border: none; color: var(--gray); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.attach-x svg { width: 15px; height: 15px; }
.attach-x:hover { color: var(--orange); }

/* Вложение внутри отправленного сообщения */
.msg-attach { margin: 4px 0 8px; }
.msg-att-img { max-width: 240px; max-height: 220px; border-radius: 12px; display: block; }
.msg-att-file { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; opacity: 0.9; }
.msg-att-file svg { width: 16px; height: 16px; }

/* ============================================================
   ГОЛОСОВОЙ ЧАТ (микрофон + озвучка)
   ============================================================ */
.chat-head-actions { display: flex; align-items: center; gap: 10px; }
.voice-toggle.voice-on { color: var(--orange); border-color: var(--orange); }

.mic-btn.listening {
  color: var(--orange); border-color: var(--orange);
  animation: micPulse 1.3s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111,168,255, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(111,168,255, 0); }
}

/* Активная кнопка тарифа (например «Начать бесплатно» для гостя) */
.pa-btn:not([disabled]) { cursor: pointer; opacity: 1; transition: transform .12s ease; }
.pa-btn:not([disabled]):hover { transform: translateY(-1px); }

/* ============================================================
   ЖИВОЙ ГОЛОСОВОЙ ЗВОНОК
   ============================================================ */
.call-btn:hover { color: var(--orange); border-color: var(--orange); }

/* ============================================================
   ГОЛОСОВОЙ РЕЖИМ — в стиле ChatGPT (светлый фон, градиентный шар)
   ============================================================ */
.voice-call {
  position: fixed; inset: 0; z-index: 200;
  background: #12131F;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: "Inter", var(--font);
}
.voice-call[hidden] { display: none; }

/* Имя агента — сверху по центру, мелко и деликатно */
.vc-agent {
  position: absolute; top: 26px; left: 0; right: 0; text-align: center;
  color: #6b7280; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}

/* Центральная сцена (шар + статус + субтитры).
   Нижний отступ — чтобы субтитры не наезжали на панель управления. */
.vc-stage {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 16px 104px;
}

/* Градиентный «живой» шар */
.vc-orb {
  width: 200px; height: 200px; border-radius: 50%;
  position: relative; overflow: hidden;
  background: radial-gradient(125% 125% at 32% 22%,
      #8f8cf9 0%, #7c7cf7 22%, #6366f1 48%, #4f46e5 72%, #4338ca 100%);
  box-shadow: 0 30px 80px rgba(79,70,229,0.35), inset 0 0 46px rgba(255,255,255,0.18);
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
/* Светлый «завиток» внизу шара, постоянно колышется */
.vc-orb::after {
  content: ""; position: absolute; inset: -6%;
  background: radial-gradient(64% 52% at 46% 82%,
      rgba(238,242,255,0.98) 0%, rgba(199,210,254,0.55) 30%, rgba(99,102,241,0) 62%);
  animation: orbSwirl 7s ease-in-out infinite;
}
@keyframes orbSwirl {
  0%, 100% { transform: translateY(3%) scale(1); opacity: .92; }
  50%      { transform: translateY(-6%) scale(1.12) rotate(6deg); opacity: 1; }
}
/* Состояния — меняется «дыхание» шара */
.vc-orb.idle      { animation: orbBreathe 4.2s ease-in-out infinite; }
.vc-orb.listening { animation: orbBreathe 2.4s ease-in-out infinite; }
.vc-orb.thinking  { animation: orbBreathe 1.3s ease-in-out infinite; }
.vc-orb.speaking  { animation: orbSpeakN 0.7s ease-in-out infinite; }
@keyframes orbBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes orbSpeakN  { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Когда шаром управляет ваш голос — отключаем CSS-анимацию, размер задаёт JS */
.vc-orb.meter { animation: none !important; transition: transform .07s linear, box-shadow .12s linear; }

.vc-status { font-size: 16px; font-weight: 500; color: #6b7280; margin-top: 30px; }
/* Живые субтитры: ваша речь и ответ агента */
.vc-transcript {
  color: #9ca3af; font-size: 15px; line-height: 1.5; min-height: 22px;
  max-width: 560px; margin-top: 10px; padding: 0 16px; text-align: center;
  transition: color .2s ease;
}
.vc-transcript.you { color: #6b7280; font-style: italic; }
.vc-transcript.agent { color: #1f2937; font-weight: 500; font-style: normal; }

/* Нижняя строка управления — «таблетка» как в референсе */
.vc-bar {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  width: min(680px, calc(100vw - 40px));
  background: #12131F; border: 1px solid rgba(255,255,255,.08); border-radius: 999px;
  padding: 8px 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.vc-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: "Inter", var(--font); font-size: 15px; color: #111827;
  padding: 8px 6px;
}
.vc-input::placeholder { color: #9ca3af; }
.vc-round {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: background .16s ease, color .16s ease;
}
.vc-round svg { width: 20px; height: 20px; }
.vc-plus { background: transparent; color: #374151; }
.vc-plus:hover { background: rgba(255,255,255,.06); }
.vc-mic { background: transparent; color: #6b7280; }
.vc-mic:hover { background: rgba(255,255,255,.06); }
.vc-mic.muted { color: #b91c1c; }
.vc-end { background: #111827; color: #12131F; }
.vc-end:hover { background: #000000; }

@media (max-width: 640px) {
  .vc-orb { width: 168px; height: 168px; }
}

/* ============================================================
   АДМИН-ПАНЕЛЬ
   ============================================================ */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 40px; }
.admin-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 28px 24px;
}
.as-num { font-weight: 900; font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.as-label { color: var(--gray); font-size: 14px; margin-top: 8px; }

.admin-subtitle { font-weight: 800; font-size: 20px; margin: 0 0 16px; letter-spacing: -0.01em; }
.admin-table-wrap {
  overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.admin-table th, .admin-table td { text-align: left; padding: 14px 18px; font-size: 14.5px; }
.admin-table thead th {
  color: var(--gray); font-weight: 700; font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: uppercase; border-bottom: 1px solid var(--line);
}
.admin-table tbody tr { border-bottom: 1px solid var(--line-soft); }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.plan-tag {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: rgba(111,168,255, 0.14); color: var(--orange);
}
.admin-loading { color: var(--gray); text-align: center; padding: 24px; }
.admin-note { color: var(--gray); font-size: 13px; margin-top: 20px; }

@media (max-width: 640px) {
  .admin-stats { grid-template-columns: 1fr; }
}

/* Поле пароля с кнопкой-глазом */
.pass-wrap { position: relative; }
.pass-wrap .auth-input { padding-right: 48px; }
.pass-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; background: transparent;
  color: var(--gray); cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s ease;
}
.pass-eye svg { width: 20px; height: 20px; }
.pass-eye:hover { color: var(--orange); }

/* Фото-аватары агентов (шапка чата и сообщения) */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.msg.agent { gap: 10px; align-items: flex-start; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  object-fit: cover; object-position: top center;
  background: var(--surface-2); margin-top: 2px;
}

/* ============================================================
   МОЙ ОФИС — стиль Pika (кремово-чёрный диптих, плоские формы)
   Область действия — ТОЛЬКО #officeView (остальной сайт не трогаем).
   ============================================================ */
#officeView {
  --cream: #DCE7FF; --void: #EAECF5; --pw: #12131F;
  --hair: rgba(255,255,255,.16); --ash: #8B90A8; --char: #EAECF5;
  --hairln: rgba(255,255,255,0.18);
  --hairbd: rgba(255,255,255,0.30);
}

/* ---------- ВХОД И РЕГИСТРАЦИЯ ----------
   Одна колонка по центру, светлая тема сайта. Фотографий людей нет
   намеренно: агенты — не живые люди, и показывать их так нельзя.
   Оранжевый здесь не используется — он остаётся внутри Super Business. */
#officeView .chat-section { max-width: 1000px; padding-top: 48px; }

#officeView .auth-card {
  max-width: none; margin: 0; padding: 40px 0 32px;
  background: none; border: none; border-radius: 0; overflow: visible;
  min-height: calc(100vh - 150px);
  display: flex; align-items: center; justify-content: center;
  justify-items: center;              /* JS показывает карточку как grid */
}
#officeView .auth-col {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; align-items: stretch;
  animation: authIn .4s cubic-bezier(.2,0,0,1) both;
}
@keyframes authIn { from { opacity: 0; transform: translateY(20px); } }

/* Знак появляется первым, остальное каскадом по 60мс */
#officeView .auth-col [data-step] { animation: authStep .4s cubic-bezier(.2,0,0,1) both; }
#officeView .auth-col [data-step]:nth-child(1) { animation-delay: 0s; }
#officeView .auth-col [data-step]:nth-child(2) { animation-delay: .06s; }
#officeView .auth-col [data-step]:nth-child(3) { animation-delay: .12s; }
#officeView .auth-col [data-step]:nth-child(4) { animation-delay: .18s; }
#officeView .auth-col [data-step]:nth-child(5) { animation-delay: .24s; }
#officeView .auth-col [data-step]:nth-child(6) { animation-delay: .30s; }
@keyframes authStep { from { opacity: 0; transform: translateY(10px); } }

#officeView .auth-mark {
  width: 48px; height: 48px; align-self: center; color: #EAECF5; display: block;
}
#officeView .auth-mark svg { width: 100%; height: 100%; display: block; }

#officeView .auth-brand {
  margin-top: 14px; text-align: center;
  font-size: 32px; line-height: 38px; font-weight: 700;
  letter-spacing: .04em; color: #EAECF5;
}
#officeView .auth-welcome {
  margin-top: 6px; text-align: center;
  font-size: 17px; line-height: 24px; color: #8B90A8;
}

/* Переключатель-капсула: активный сегмент с заливкой */
#officeView .auth-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 34px; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--wv-line);
}
#officeView .auth-seg-pill {
  position: absolute; top: 4px; left: 4px; bottom: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--wv-surf-2);
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
  transition: transform .22s cubic-bezier(.2,0,0,1);
}
#officeView .auth-seg-pill.right { transform: translateX(100%); }
#officeView .auth-seg-b {
  position: relative; z-index: 1; flex: none; width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: #8B90A8; min-height: 40px; padding: 0;
  transition: color .18s cubic-bezier(.2,0,0,1);
}
#officeView .auth-seg-b.active { color: #EAECF5; }

#officeView .auth-form {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 20px; padding: 0; background: none; border: none;
}
#officeView .auth-input {
  width: 100%; height: 52px; padding: 0 18px;
  background: var(--wv-surf); border: 1px solid var(--wv-line); border-radius: 14px;
  color: var(--wv-text); font-family: inherit; font-size: 16px;
  transition: border-color .18s cubic-bezier(.2,0,0,1), box-shadow .18s cubic-bezier(.2,0,0,1);
}
#officeView .auth-input::placeholder { color: #5A5F78; }
#officeView .auth-input:focus {
  outline: none; border-color: var(--wv-accent);
  box-shadow: 0 0 0 3px rgba(111,168,255,.2);
}
#officeView .pass-wrap { position: relative; }
#officeView .pass-wrap .auth-input { padding-right: 50px; }
#officeView .pass-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: none; border: none; color: #5A5F78; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#officeView .pass-eye:hover { color: #EAECF5; }
#officeView .pass-eye svg { width: 20px; height: 20px; }

/* Согласия */
#officeView .auth-agree { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
#officeView .auth-agree[hidden] { display: none; }
#officeView .auth-check {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px;
  align-items: start; cursor: pointer;
}
#officeView .auth-check input { position: absolute; opacity: 0; width: 0; height: 0; }
#officeView .auth-box {
  width: 20px; height: 20px; margin-top: 2px; border-radius: 6px;
  background: rgba(255,255,255,.05); border: 1px solid var(--wv-line-2);
  transition: background .15s cubic-bezier(.2,0,0,1), border-color .15s cubic-bezier(.2,0,0,1);
}
#officeView .auth-check input:checked + .auth-box {
  background: var(--wv-a1); border-color: var(--wv-a1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px; background-position: center; background-repeat: no-repeat;
}
#officeView .auth-check input:focus-visible + .auth-box {
  box-shadow: 0 0 0 3px rgba(10,11,20,.14);
}
#officeView .auth-check-t { font-size: 13px; line-height: 19px; color: #8B90A8; }
#officeView .auth-check-t a { color: #EAECF5; text-decoration: underline; }

#officeView .auth-error {
  color: #C2410C; font-size: 13.5px; line-height: 19px; min-height: 0; font-weight: 400;
}
#officeView .auth-error:empty { display: none; }

#officeView .auth-submit {
  width: 100%; min-height: 52px; margin-top: 6px;
  background: var(--wv-grad); color: var(--wv-accent-in); border: none; border-radius: 999px;
  font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .12s cubic-bezier(.2,0,0,1), opacity .15s cubic-bezier(.2,0,0,1);
}
#officeView .auth-submit:hover { background: #EAECF5; }
#officeView .auth-submit:active { transform: scale(.98); }
#officeView .auth-submit:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 640px) {
  #officeView .auth-card { padding: 24px 0 28px; min-height: calc(100vh - 120px); }
  #officeView .auth-brand { font-size: 28px; line-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  #officeView .auth-col, #officeView .auth-col [data-step] { animation: none; }
  #officeView .auth-seg-pill { transition: none; }
  #officeView .auth-submit:active { transform: none; }
}

/* ---------- КАРУСЕЛЬ ---------- */
#officeView .agent-stage { background: var(--void); }
#officeView .stage-glow { display: none; }
#officeView .arch {
  border-radius: 10px; background: var(--char); border: 1px solid var(--hairln);
  box-shadow: none;
}
#officeView .pos-center .arch { background: var(--cream); border-color: rgba(10,11,20,0.1); box-shadow: none; }
#officeView .arch-name { color: var(--pw); font-weight: 400; letter-spacing: -0.01em; }
#officeView .pos-center .arch-name { color: var(--void); font-weight: 900; }
#officeView .arch-phrase { color: var(--ash); font-weight: 300; }
#officeView .pos-center .arch-phrase { color: var(--pw); font-weight: 400; }
#officeView .car-arrow {
  background: transparent; border: 1px solid var(--hairbd); color: var(--pw); border-radius: 6px;
  backdrop-filter: none;
}
#officeView .car-arrow:hover { border-color: var(--hair); color: var(--pw); }
#officeView .car-dot { background: var(--hairbd); }
#officeView .car-dot.active { background: var(--cream); }
#officeView .carousel-logo { color: var(--pw); font-weight: 400; letter-spacing: -0.01em; }
#officeView .stage-hint { color: var(--ash); font-weight: 300; }

/* ---------- ЧАТ ---------- */
#officeView .chat-card { background: var(--void); border: 1px solid var(--hairln); border-radius: 10px; box-shadow: none; }
#officeView .chat-head { background: var(--void); border-bottom: 1px solid var(--hairln); }
#officeView .avatar { border-radius: 8px; background: var(--char); }
#officeView .chat-title { color: var(--pw); font-weight: 450; letter-spacing: -0.02em; }
#officeView .chat-role { color: var(--ash); font-weight: 300; }
#officeView .chat-back,
#officeView .voice-toggle,
#officeView #resetBtn {
  background: transparent; border: 1px solid var(--hairbd); color: var(--ash); border-radius: 6px;
}
#officeView .chat-back:hover,
#officeView .voice-toggle:hover,
#officeView #resetBtn:hover { color: var(--pw); border-color: var(--hair); }
#officeView .voice-toggle.voice-on { color: var(--cream); border-color: var(--cream); }
#officeView .chat { background: var(--void); }
#officeView .chat::-webkit-scrollbar-thumb { background: var(--char); }
#officeView .msg.agent .bubble { background: var(--char); border: 1px solid var(--hairln); color: var(--pw); border-radius: 10px; font-weight: 300; letter-spacing: -0.02em; }
#officeView .msg.user .bubble { background: var(--cream); color: var(--void); border-radius: 10px; font-weight: 400; letter-spacing: -0.02em; }
#officeView .msg .who { color: var(--ash); }
#officeView .msg-avatar { background: var(--char); }
#officeView .to-tag { color: var(--void); opacity: 0.55; }
#officeView .typing, #officeView .loading { color: var(--ash); }
#officeView .dots span { background: var(--ash); }
#officeView .recipient-bar { background: var(--void); }
#officeView .rb-label { color: var(--ash); font-weight: 300; }
#officeView .rb-pill { background: transparent; border: 1px solid var(--hairbd); color: var(--ash); border-radius: 6px; font-weight: 400; }
#officeView .rb-pill:hover { color: var(--pw); border-color: var(--hair); }
#officeView .rb-pill.active { background: var(--cream); color: var(--void); border-color: transparent; }
#officeView .input-bar { background: var(--void); border-top: 1px solid var(--hairln); }
#officeView .input { background: transparent; border: 1px solid var(--hairbd); color: var(--pw); border-radius: 6px; font-weight: 400; letter-spacing: -0.02em; }
#officeView .input::placeholder { color: var(--ash); }
#officeView .input:focus { border-color: var(--hair); }
#officeView .attach-btn { background: transparent; border: 1px solid var(--hairbd); color: var(--ash); border-radius: 6px; }
#officeView .attach-btn:hover { color: var(--pw); border-color: var(--hair); }
#officeView .mic-btn.listening { color: var(--cream); border-color: var(--cream); animation: none; }
#officeView .send-btn { background: var(--pw); color: var(--void); border-radius: 6px; font-weight: 450; }
#officeView .send-btn:hover { background: rgba(255,255,255,.08); transform: none; }
#officeView .footnote { color: var(--ash); font-weight: 300; }

/* Голосовой режим оформлен единым стилем ChatGPT (см. блок .voice-call выше) */

/* Адаптив диптиха — на телефоне в столбик */
@media (max-width: 720px) {
  #officeView .auth-card.pika { grid-template-columns: 1fr; }
  #officeView .pika-right { padding: 40px 28px; }
}

/* ---------- Мой Офис: шрифт Inter + фон void + нейтральная шапка ---------- */
#officeView {
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--font);
}

/* Режим «офис»: убираем оранжевый из общей шапки, фон — чистый void */
body.view-office { background: #EAECF5; }
body.view-office .topbar {
  background: rgba(10,11,20, 0.8);
  border-bottom: 1px solid rgba(255,255,255, 0.14);
}
body.view-office .nav-link { font-family: "Inter", sans-serif; }
body.view-office .nav-link.active { background: rgba(255, 255, 255, 0.08); color: #12131F; }
body.view-office .profile-btn { border-color: rgba(255,255,255, 0.3); }
body.view-office .profile-btn:hover { border-color: rgba(255,255,255,.16); }
body.view-office .profile-avatar { background: #DCE7FF; color: #EAECF5; }
body.view-office .profile-name { font-family: "Inter", sans-serif; }
body.view-office .top-actions .btn-primary {
  background: #12131F; color: #EAECF5; border-radius: 6px; font-family: "Inter", sans-serif; font-weight: 450;
}
body.view-office .top-actions .btn-primary:hover { background: rgba(255,255,255,.08); transform: none; }
body.view-office .profile-menu { background: #EAECF5; border-color: rgba(255,255,255, 0.18); border-radius: 10px; }
body.view-office .pm-item:hover { color: #DCE7FF; }
body.view-office .pm-item.danger:hover { color: #DCE7FF; }

/* ============================================================
   ЧАТ — светлый стиль Pika Universe (кремовый фон, композер-графа)
   Переопределяет тёмные правила чата (идёт позже в файле).
   ============================================================ */
#officeView .chat-card {
  background: #0A0B14; border: 1px solid #191A28; border-radius: 18px; box-shadow: none;
}
#officeView .chat-head { background: #0A0B14; border-bottom: 1px solid #191A28; }
#officeView .chat-title { color: #EAECF5; font-weight: 700; }
#officeView .chat-role { color: #8B90A8; font-weight: 400; }
#officeView .avatar { background: #191A28; }
#officeView .chat-back,
#officeView .voice-toggle,
#officeView #resetBtn {
  background: transparent; border: 1px solid #d9d6cc; color: #EAECF5; border-radius: 8px;
}
#officeView .chat-back:hover,
#officeView .voice-toggle:hover,
#officeView #resetBtn:hover { border-color: #EAECF5; color: #EAECF5; }
#officeView .voice-toggle.voice-on { background: #191A28; color: #EAECF5; border-color: #EAECF5; }

/* Крупный заголовок убран — чистый чат «ничего лишнего» (как в поддержке) */
#officeView .chat-hero { display: none; }

/* Лента сообщений */
#officeView .chat { background: #0A0B14; }
#officeView .chat::-webkit-scrollbar-thumb { background: #d9d6cc; }
#officeView .loading, #officeView .typing { color: #8B90A8; }
#officeView .dots span { background: #b8b5ab; }
#officeView .msg.agent .bubble { background: #12131F; border: 1px solid #191A28; color: #EAECF5; border-radius: 14px; font-weight: 400; letter-spacing: -0.01em; }
#officeView .msg.user .bubble { background: #EAECF5; color: #12131F; border-radius: 14px; font-weight: 400; letter-spacing: -0.01em; }
#officeView .msg .who { color: #8B90A8; }
#officeView .msg-avatar { background: #191A28; }
#officeView .to-tag { color: #12131F; opacity: 0.7; }

/* Панель адресатов */
#officeView .recipient-bar { background: #0A0B14; }
#officeView .rb-label { color: #8B90A8; }
#officeView .rb-pill { background: #12131F; border: 1px solid #191A28; color: #8B90A8; border-radius: 999px; }
#officeView .rb-pill:hover { color: #EAECF5; border-color: #d9d6cc; }
#officeView .rb-pill.active { background: #EAECF5; color: #12131F; border-color: transparent; }

/* Композер — большая графа как у Pika */
#officeView .input-bar.pika-composer {
  flex-direction: column; align-items: stretch; gap: 0;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; margin: 8px 18px 18px; padding: 14px 16px 12px;
}
#officeView .pika-composer .input {
  background: transparent; border: none; color: #EAECF5; padding: 4px 2px;
  min-height: 44px; max-height: 200px; font-size: 16px; letter-spacing: -0.01em;
}
#officeView .pika-composer .input::placeholder { color: #8B90A8; }
#officeView .pika-composer .input:focus { border: none; outline: none; }
#officeView .composer-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
#officeView .composer-left { display: flex; gap: 8px; }
#officeView .pika-composer .attach-btn {
  width: 38px; height: 38px; align-self: auto; background: transparent;
  border: 1px solid #d9d6cc; color: #8B90A8; border-radius: 999px;
}
#officeView .pika-composer .attach-btn:hover { color: #EAECF5; border-color: #EAECF5; }
#officeView .pika-composer .mic-btn.listening { color: #EAECF5; border-color: #EAECF5; animation: none; }
#officeView .pika-composer .send-btn {
  background: #EAECF5; color: #12131F; border: none; border-radius: 999px;
  font-weight: 600; padding: 11px 24px; font-size: 14px;
}
#officeView .pika-composer .send-btn:hover { background: #222222; transform: none; }

#officeView .footnote { color: #8B90A8; }

/* Превью вложения в светлой теме */
#officeView .attach-preview { padding: 0 18px 6px; }
#officeView .attach-chip { background: #12131F; border: 1px solid #191A28; }
#officeView .attach-name { color: #EAECF5; }
#officeView .attach-x { color: #8B90A8; }
#officeView .attach-x:hover { color: #EAECF5; }

/* ============================================================
   ПОЛНЫЙ СВЕТЛЫЙ «Мой Офис» (Pika Universe) + чистый чат + анимация
   ============================================================ */

/* Фон всего раздела и шапка — светлые */
body.view-office { background: #0A0B14; }
body.view-office .topbar { background: rgba(10,11,20,0.88); border-bottom: none; }
body.view-office .nav-link { color: #8B90A8; }
body.view-office .nav-link:hover { color: #EAECF5; }
body.view-office .nav-link.active { background: #191A28; color: #EAECF5; }
body.view-office .top-actions .btn-primary,
body.view-office #loginBtn { background: #EAECF5; color: #12131F; }
body.view-office #loginBtn:hover { background: #222; }
body.view-office .profile-btn { background: #12131F; border-color: #191A28; color: #EAECF5; }
body.view-office .profile-btn:hover { border-color: #EAECF5; }
body.view-office .profile-avatar { background: #EAECF5; color: #12131F; }
body.view-office .profile-name { color: #EAECF5; }
body.view-office .caret { color: #8B90A8; }
body.view-office .profile-menu { background: #12131F; border-color: #191A28; }
body.view-office .pm-header { border-color: #191A28; }
body.view-office .pm-login { color: #EAECF5; }
body.view-office .pm-plan { color: #8B90A8; }
body.view-office .pm-item { color: #EAECF5; }
body.view-office .pm-item:hover { background: #191A28; color: #EAECF5; }
body.view-office .pm-item.danger { color: #8B90A8; }
body.view-office .pm-item.danger:hover { color: #EAECF5; }

/* Вход-диптих — светлый */
#officeView .auth-card.pika { border-color: #191A28; }
#officeView .pika-right { background: #12131F; color: #EAECF5; }
#officeView .auth-tab { color: #8B90A8; }
#officeView .auth-tab.active { color: #EAECF5; box-shadow: inset 0 -1px 0 #EAECF5; }
#officeView .auth-input { border-color: #d9d6cc; color: #EAECF5; }
#officeView .auth-input::placeholder { color: #8B90A8; }
#officeView .auth-input:focus { border-color: #EAECF5; }
#officeView .pass-eye { color: #8B90A8; }
#officeView .pass-eye:hover { color: #EAECF5; }
#officeView .auth-submit { background: var(--wv-grad); color: var(--wv-accent-in); }
#officeView .auth-submit:hover { box-shadow: var(--wv-glow-soft); }
#officeView .auth-error { color: #a3352a; }
#officeView .auth-hint { color: #8B90A8; }
#officeView .auth-hint a { color: #EAECF5; }

/* Чат — убираем тёмный фрейм: секция на светлом, карточка без рамки */
#officeView .chat-section { max-width: 900px; padding-top: 40px; }
#officeView .chat-card { background: transparent; border: none; height: calc(100vh - 150px); }
#officeView .chat-head { background: transparent; border-bottom: 1px solid #191A28; }

/* Простой чат: без фото агентов, без подписей, без адресатов и «назад» */
#officeView #backToTeam { display: none; }
#officeView .chat-head .avatar { display: none; }
#officeView .chat-role { display: none; }
#officeView .chat-title { display: none; }
#officeView .msg .who { display: none; }
#officeView .msg-avatar { display: none; }
#officeView .msg.agent { gap: 0; }
#officeView .recipient-bar { display: none; }

/* Пузыри без рамок-«карточек» — чисто как в Pika */
#officeView .chat { background: transparent; }
#officeView .msg.agent .bubble { background: #12131F; border: 1px solid rgba(255,255,255,.10); color: #EAECF5; }
#officeView .msg.user .bubble { background: #EAECF5; color: #12131F; }

/* Композер на светлом фоне */
#officeView .input-bar.pika-composer { background: #12131F; border: 1px solid #191A28; margin: 10px 0 24px; }

/* Красивая анимация: сообщения выезжают снизу вверх */
#officeView .msg { animation: msgUp 0.4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes msgUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Композер — стиль как в референсе (минимальные иконки, залитый
   голосовой круг, «Отправить» появляется только при вводе текста)
   ============================================================ */
#officeView .composer-right { display: flex; align-items: center; gap: 8px; }

/* Скрепка и микрофон — простые иконки без рамок */
#officeView .pika-composer .attach-btn {
  width: 40px; height: 40px; background: transparent; border: none;
  color: #8B90A8; border-radius: 999px;
}
#officeView .pika-composer .attach-btn:hover { color: #EAECF5; background: #12131F; border: none; }
#officeView .pika-composer .attach-btn svg { width: 22px; height: 22px; }
#officeView .pika-composer .mic-btn.listening {
  color: #EAECF5; background: #12131F; border: none; animation: none;
}

/* Голосовой чат — залитый чёрный круг с «волной» */
#officeView .pika-composer .call-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: #EAECF5; color: #12131F; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .18s ease;
}
#officeView .pika-composer .call-btn:hover { background: #222222; color: #12131F; }
#officeView .pika-composer .call-btn svg { width: 20px; height: 20px; }

/* «Отправить» — только при наличии текста/вложения; иначе виден голосовой */
#officeView .pika-composer .send-btn { display: none; }
#officeView .pika-composer.has-text .send-btn { display: inline-flex; }
#officeView .pika-composer.has-text .call-btn { display: none; }

/* ============================================================
   ПОДДЕРЖКА — чат со службой поддержки.
   Светлый стиль «Pika», как в разделе «Мой Офис».
   ============================================================ */

/* Светлая шапка/фон раздела (как у офиса) */
body.view-support { background: #0A0B14; }
body.view-support .topbar { background: rgba(10,11,20,0.88); border-bottom: 1px solid #191A28; }
body.view-support .nav-link { color: #8B90A8; }
body.view-support .nav-link:hover { color: #EAECF5; }
body.view-support .nav-link.active { background: #191A28; color: #EAECF5; }
body.view-support .top-actions .btn-primary,
body.view-support #loginBtn { background: #EAECF5; color: #12131F; }
body.view-support #loginBtn:hover { background: #222; }
body.view-support .profile-btn { background: #12131F; border-color: #191A28; color: #EAECF5; }
body.view-support .profile-btn:hover { border-color: #EAECF5; }
body.view-support .profile-avatar { background: #EAECF5; color: #12131F; }
body.view-support .profile-name { color: #EAECF5; }
body.view-support .caret { color: #8B90A8; }
body.view-support .profile-menu { background: #12131F; border-color: #191A28; }
body.view-support .pm-header { border-color: #191A28; }
body.view-support .pm-login { color: #EAECF5; }
body.view-support .pm-plan { color: #8B90A8; }
body.view-support .pm-item { color: #EAECF5; }
body.view-support .pm-item:hover { background: #191A28; color: #EAECF5; }
body.view-support .pm-item.danger { color: #8B90A8; }
body.view-support .pm-item.danger:hover { color: #EAECF5; }

/* Чистый чат: колонка на всю высоту, лента растёт, композер снизу */
#supportView { font-family: "Inter", var(--font); }
.support-wrap {
  max-width: 760px; margin: 0 auto;
  height: calc(100vh - 74px);      /* минус высота верхней панели */
  display: flex; flex-direction: column;
  padding: 8px 20px 0;
}

/* Лента сообщений — без рамки, скроллится */
.support-chat {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 2px 8px;
}
.smsg { display: flex; animation: msgUp 0.4s cubic-bezier(.22,.61,.36,1) both; }
.smsg-user { justify-content: flex-end; }
.smsg-agent { justify-content: flex-start; }
.sbubble {
  max-width: 82%; padding: 12px 16px; border-radius: 16px;
  font-size: 15px; line-height: 1.55; white-space: normal;
}
.smsg-agent .sbubble {
  background: #12131F; border: 1px solid rgba(255,255,255,.10); color: #EAECF5;
  border-top-left-radius: 6px;
}
.smsg-user .sbubble {
  background: #EAECF5; color: #12131F;
  border-top-right-radius: 6px;
}

/* Индикатор «печатает…» */
.sbubble.typing { display: flex; gap: 5px; align-items: center; }
.sbubble.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #b8b4a8;
  animation: sTyping 1s infinite ease-in-out;
}
.sbubble.typing span:nth-child(2) { animation-delay: .15s; }
.sbubble.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sTyping {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* Быстрые вопросы — только на старте */
.support-chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 2px 10px;
}
.support-chip {
  background: #12131F; border: 1px solid #191A28; color: #8B90A8;
  border-radius: 999px; padding: 8px 15px; font-size: 13px;
  font-family: "Inter", var(--font); cursor: pointer; transition: all .15s ease;
}
.support-chip:hover { border-color: #EAECF5; color: #EAECF5; }

/* Композер — плавающая «таблетка» как в референсе */
.support-bar {
  display: flex; gap: 8px; align-items: flex-end;
  background: #12131F; border: 1px solid rgba(255,255,255,.12); border-radius: 26px;
  padding: 8px 8px 8px 6px; margin: 0 0 22px;
}
#supportView .support-bar .input {
  flex: 1; min-height: 40px; max-height: 160px;
  background: transparent; color: #EAECF5; border: none; border-radius: 0;
  padding: 10px 8px 10px 14px; font-family: "Inter", var(--font); font-size: 15px;
}
#supportView .support-bar .input:focus { outline: none; border: none; }
#supportView .support-bar .input::placeholder { color: #8B90A8; }
.support-send {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #EAECF5; color: #12131F; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease;
}
.support-send:hover { background: #222222; }
.support-send svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .sbubble { max-width: 90%; }
  .support-wrap { height: calc(100vh - 56px); padding: 4px 14px 0; }
}

/* ============================================================
   «Мой Офис» — чат без рамок, узкая колонка, композер одной строкой
   (по просьбе: «не в окне», поле ввода уже) — как в поддержке/референсе
   ============================================================ */
#officeView .chat-section { max-width: 720px; padding: 12px 20px 0; }
#officeView .chat-card { height: calc(100vh - 96px); }
#officeView .chat { padding: 20px 2px 8px; }

/* Убираем полосу прокрутки в чате (скролл колёсиком остаётся) */
#officeView .chat { scrollbar-width: none; -ms-overflow-style: none; }
#officeView .chat::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Композер — единая «таблетка»: иконки | поле | кнопка */
#officeView .input-bar.pika-composer {
  flex-direction: row; align-items: flex-end; gap: 4px;
  background: #12131F; border: 1px solid rgba(255,255,255,.12); border-radius: 26px;
  margin: 6px 0 22px; padding: 7px 8px;
}
#officeView .pika-composer .input {
  flex: 1; min-height: 40px; max-height: 160px;
  background: transparent; border: none; color: #EAECF5;
  padding: 9px 6px 9px 8px; font-size: 15px; letter-spacing: -0.01em;
}
#officeView .pika-composer .input:focus { border: none; outline: none; }

/* Скрепка и микрофон — маленькие круглые иконки без рамок */
#officeView .pika-composer .attach-btn {
  width: 40px; height: 40px; flex: none; border: none;
  background: transparent; color: #6b6a63; border-radius: 50%;
}
#officeView .pika-composer .attach-btn:hover { background: #191A28; color: #EAECF5; border: none; }
#officeView .pika-composer .attach-btn svg { width: 21px; height: 21px; }
#officeView .pika-composer .mic-btn.listening { color: #EAECF5; background: #191A28; border: none; }

/* Голосовой круг (когда поле пустое) */
#officeView .pika-composer .call-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: #EAECF5; color: #12131F; border: none;
  display: flex; align-items: center; justify-content: center;
}
#officeView .pika-composer .call-btn:hover { background: #222222; color: #12131F; }
#officeView .pika-composer .call-btn svg { width: 19px; height: 19px; }

/* Кнопка «Отправить» — круглая стрелка (когда есть текст) */
#officeView .pika-composer .send-btn {
  width: 40px; height: 40px; flex: none; padding: 0; border-radius: 50%;
  background: #EAECF5; color: #12131F; border: none;
  align-items: center; justify-content: center;
}
#officeView .pika-composer .send-btn svg { width: 20px; height: 20px; }
#officeView .pika-composer .send-btn:hover { background: #222222; transform: none; }

/* Показываем стрелку при вводе, иначе — голосовой круг */
#officeView .pika-composer .send-btn { display: none; }
#officeView .pika-composer.has-text .send-btn { display: flex; }
#officeView .pika-composer.has-text .call-btn { display: none; }

/* ============================================================
   Анимация отправки сообщений + «живые» эмодзи (как в Telegram)
   ============================================================ */

/* Исходящее сообщение ЭФФЕКТНО «запускается» от поля ввода:
   вылетает снизу-справа с поворотом, перелётом и вспышкой-свечением. */
@keyframes msgSendPro {
  0% {
    opacity: 0;
    transform: translateY(52px) scale(.45) rotate(-7deg);
    box-shadow: 0 0 0 rgba(111,168,255, 0);
    filter: blur(3px);
  }
  40% {
    opacity: 1;
    transform: translateY(-10px) scale(1.1) rotate(2deg);
    box-shadow: 0 14px 46px rgba(111,168,255, .5);
    filter: blur(0);
  }
  65% {
    transform: translateY(3px) scale(.97) rotate(-1deg);
    box-shadow: 0 8px 30px rgba(111,168,255, .3);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    box-shadow: 0 4px 14px rgba(111,168,255, 0);
  }
}
/* Всю анимацию вешаем на сам пузырь (чтобы свечение и поворот были на нём) */
.msg.user.sending, .smsg-user.sending { animation: none; }
.msg.user.sending .bubble,
.smsg-user.sending .sbubble {
  animation: msgSendPro .6s cubic-bezier(.2, .8, .25, 1.35) both;
  transform-origin: bottom right;
}

/* Эмодзи «подпрыгивают» при появлении */
.emo { display: inline-block; transform-origin: center bottom;
  animation: emojiPop .5s cubic-bezier(.2,.8,.3,1.6) both; }
@keyframes emojiPop {
  0%   { transform: scale(0); }
  55%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .emo { animation: none; }
  .msg.user.sending .bubble, .smsg-user.sending .sbubble { animation: none; }
}

/* Сообщение из одних эмодзи — крупно и без пузыря (Telegram jumbo) */
.only-emoji {
  background: transparent !important; border: none !important;
  box-shadow: none !important; padding: 2px 2px !important;
}
.only-emoji .emo {
  font-size: 46px; line-height: 1.15;
  animation: emojiJump .6s cubic-bezier(.2,.8,.3,1.5) both;
}
@keyframes emojiJump {
  0%   { transform: scale(0) rotate(-12deg); }
  55%  { transform: scale(1.32) rotate(7deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ============================================================
   Кнопка «Мои сотрудники» + меню выбора специалиста (в композере)
   ============================================================ */
.emp-wrap { position: relative; flex: none; }
.emp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid rgba(255,255,255,.12); color: #4b4a44;
  font-family: "Inter", var(--font); font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease;
}
.emp-btn:hover { background: #191A28; }
.emp-btn.open { background: #191A28; border-color: #cfccc2; }
.emp-ico { width: 18px; height: 18px; flex: none; }
.emp-caret { width: 15px; height: 15px; opacity: .7; transition: transform .18s ease; }
.emp-btn.open .emp-caret { transform: rotate(180deg); }

/* Выпадающее меню — открывается вверх (композер внизу) */
.emp-menu {
  position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 60;
  min-width: 286px; background: #12131F; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 6px; box-shadow: 0 14px 36px rgba(0,0,0,0.12);
  animation: empIn .16s ease both;
}
.emp-menu[hidden] { display: none; }
@keyframes empIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.emp-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: transparent; border-radius: 9px;
  font-family: "Inter", var(--font); font-size: 14px; color: #EAECF5;
  cursor: pointer; text-align: left;
}
.emp-item:hover { background: #191A28; }
/* Знак агента — тот же шестиугольник, что в Super Business: одна команда,
   один визуальный язык. */
.emp-mi { width: 22px; height: 22px; flex: none; color: #4DA6FF; }
.emp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.emp-name em {
  font-style: normal; color: #8B90A8; font-size: 12px; line-height: 16px;
}
.emp-check { width: 17px; height: 17px; flex: none; color: #EAECF5; opacity: 0; }
.emp-item.active { background: #191A28; }
.emp-item.active .emp-check { opacity: 1; }

/* На узких экранах прячем подпись кнопки — остаётся иконка */
@media (max-width: 560px) {
  .emp-text { display: none; }
  .emp-btn { padding: 0 9px; }
}

/* ============================================================
   СТАТУС СООБЩЕНИЯ (отправляется / доставлено / ошибка + повтор)
   ============================================================ */
/* Свои сообщения выстраиваем колонкой, чтобы статус встал под пузырём */
.msg.user { flex-direction: column; align-items: flex-end; }

.msg-status {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 11.5px; color: #8B90A8; margin-top: 5px; padding-right: 2px;
  transition: opacity .5s ease;
}
.msg-status svg { width: 12px; height: 12px; }
.msg-status.ok { color: #4b9e6a; }
.msg-status.ok.fade { opacity: 0; }
.msg-status.error { color: #c0392b; }
.ms-warn { font-weight: 600; }
/* Пульсирующая точка «отправляется» */
.ms-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: msDot 1s ease-in-out infinite;
}
@keyframes msDot { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
/* Кнопки «Повторить» / «Изменить» */
.ms-btn {
  border: 1px solid #d9d6cc; background: #12131F; color: #EAECF5;
  border-radius: 999px; padding: 3px 11px; font-size: 11.5px; font-weight: 600;
  font-family: "Inter", var(--font); cursor: pointer; margin-left: 2px;
}
.ms-btn:hover { border-color: #EAECF5; }
.ms-btn.ghost { background: transparent; color: #8B90A8; }

/* Кнопка «вниз» — появляется, если вы читаете историю выше */
.jump-down {
  position: absolute; right: 18px; bottom: 96px; z-index: 12;
  width: 38px; height: 38px; border-radius: 50%;
  background: #EAECF5; color: #12131F; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  animation: jumpIn .2s ease both;
}
.jump-down[hidden] { display: none; }
.jump-down svg { width: 18px; height: 18px; }
.jump-down:hover { background: #222; }
@keyframes jumpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#officeView .chat-card { position: relative; }

/* Режим «идёт отправка»: кнопка-стрелка превращается в «стоп» */
#officeView .pika-composer.busy .send-btn { display: flex; background: #c0392b; }
#officeView .pika-composer.busy .send-btn:hover { background: #a93226; }
#officeView .pika-composer.busy .call-btn { display: none; }

/* ============================================================
   Переключатель ЧАТОВ (несколько диалогов) — в правом верхнем углу
   ============================================================ */
.chats-wrap { position: relative; }
#officeView #chatsBtn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #12131F; border: 1px solid rgba(255,255,255,.12); color: #EAECF5;
  border-radius: 999px; font-weight: 600;
}
#officeView #chatsBtn:hover { border-color: #EAECF5; color: #EAECF5; }
.chats-caret { width: 14px; height: 14px; opacity: .7; transition: transform .18s ease; }
#chatsBtn.open .chats-caret { transform: rotate(180deg); }

.chats-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 290px; max-height: 62vh; overflow-y: auto;
  background: #12131F; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 6px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.14);
  font-family: "Inter", var(--font);
}
.chats-menu[hidden] { display: none; }
.chats-new {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border: none; background: #EAECF5; color: #12131F;
  border-radius: 9px; font-family: "Inter", var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; margin-bottom: 6px;
}
.chats-new:hover { background: #222222; }
.chats-new svg { width: 17px; height: 17px; flex: none; }
.chats-list { display: flex; flex-direction: column; gap: 2px; }
.chats-empty { color: #8B90A8; font-size: 13px; padding: 8px 10px; }
.chats-item {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; color: #EAECF5; font-size: 14px;
}
.chats-item:hover { background: #191A28; }
.chats-item.active { background: #12131F; font-weight: 600; }
.chats-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chats-del {
  flex: none; width: 26px; height: 26px; border: none; background: transparent;
  color: #5A5F78; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s ease, color .15s ease, background .15s ease;
}
.chats-item:hover .chats-del,
.chats-item.active .chats-del { opacity: 1; }
.chats-del:hover { color: #d33b2f; background: #191A28; }
.chats-del svg { width: 15px; height: 15px; }

/* ============================================================
   Ответ оператора в чате КЛИЕНТА (поддержка) — выделен
   ============================================================ */
.sbubble-staff { background: rgba(45,212,191,.12) !important; border-color: #bfe6cd !important; }
.staff-label {
  display: block; font-size: 11px; font-weight: 700;
  color: #15803d; margin-bottom: 3px;
}

/* ============================================================
   АДМИНКА: чаты поддержки (список + переписка + ответ)
   ============================================================ */
.support-admin {
  display: grid; grid-template-columns: 300px 1fr; gap: 16px;
  margin-top: 14px; align-items: start;
}
.sa-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.sa-hint { color: var(--gray); font-size: 14px; padding: 14px; }
.sa-item {
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--white);
  font-family: var(--font); transition: border-color .15s ease, background .15s ease;
}
.sa-item:hover { border-color: var(--orange); }
.sa-item.active { border-color: var(--orange); background: var(--surface-2); }
.sa-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sa-who { font-weight: 700; font-size: 14px; }
.sa-count {
  font-size: 12px; color: var(--bg); background: var(--orange);
  border-radius: 999px; padding: 1px 8px; font-weight: 700;
}
.sa-snippet { color: var(--gray); font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-time { color: #6a6a6a; font-size: 11px; margin-top: 4px; }

.sa-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  min-height: 340px; display: flex; flex-direction: column;
}
.sa-empty { color: var(--gray); font-size: 14px; padding: 24px; margin: auto; text-align: center; }
.sa-thread {
  flex: 1; max-height: 480px; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.sa-msg { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.sa-msg-who { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 3px; }
.sa-msg.client { align-self: flex-end; background: var(--orange); color: var(--bg); }
.sa-msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); color: var(--white); }
.sa-msg.staff { align-self: flex-start; background: #14351f; border: 1px solid #1f5a34; color: rgba(45,212,191,.12); }
.sa-reply { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.sa-reply .input { flex: 1; min-height: 44px; }

@media (max-width: 760px) { .support-admin { grid-template-columns: 1fr; } }

/* Ответ специалиста подписывается его именем (Директор — без подписи),
   чтобы было видно, кого вы позвали. */
#officeView .msg.agent.marketer .who,
#officeView .msg.agent.legal .who {
  display: block; color: #8B90A8;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 6px;
}

/* «Новый чат» — в правый верхний угол страницы, без полоски-разделителя */
#officeView .chat-head {
  border-bottom: none;
  position: fixed; top: 80px; right: 28px; z-index: 15;
  padding: 0; background: transparent; min-height: 0;
}
@media (max-width: 640px) {
  #officeView .chat-head { top: 66px; right: 14px; }
}

/* ---------- Логотип в шапке ---------- */
.brand {
  display: inline-flex; align-items: baseline; gap: 9px;
  text-decoration: none; margin-right: 22px; flex: none;
}
.brand-w {
  font-size: 19px; font-weight: 700; letter-spacing: .04em; color: #FFFFFF;
}
.brand-b {
  font-size: 14px; font-weight: 500; letter-spacing: .01em; color: var(--wv-a1);
}
/* Активный пункт подчёркнут сине-фиолетовым градиентом */
.mainnav .nav-link { position: relative; }
.mainnav .nav-link.active:not(.nav-super)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--wv-grad);
}
@media (max-width: 640px) { .brand-b { display: none; } }
