/* ============================================
   ТЕБЕ МОЖНО — Component Styles
   ============================================ */

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .75;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.hero__text {}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  background: var(--primary-pale);
  color: var(--primary-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero__title .accent { color: var(--primary); }
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 36px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.hero__stat-label { font-size: .8rem; color: var(--text-3); font-weight: 500; margin-top: 4px; }

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__cards-stack {
  position: relative;
  width: 380px;
  height: 600px;
}
.hero__card-float {
  position: absolute;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 18px;
  border: 1px solid var(--border-light);
  width: 248px;
}
/* Позиции карточек (до 4 штук) — задаются классом из JS по индексу.
   Каскад сверху вниз с небольшим сдвигом влево/вправо: каждая карточка
   читается целиком, перекрытие минимально. */
.hero__card-float--p1 {
  width: 252px;
  top: 0; left: 36px;
  transform: rotate(-3deg);
  animation: floatA 6s ease-in-out infinite;
  z-index: 1;
}
.hero__card-float--p2 {
  width: 252px;
  top: 152px; right: 0;
  transform: rotate(2.5deg);
  animation: floatB 6.6s ease-in-out infinite;
  z-index: 2;
}
.hero__card-float--p3 {
  width: 244px;
  top: 312px; left: 18px;
  transform: rotate(-2deg);
  animation: floatC 7.1s ease-in-out infinite;
  z-index: 3;
}
.hero__card-float--p4 {
  width: 240px;
  top: 462px; right: 22px;
  transform: rotate(3deg);
  animation: floatD 6.8s ease-in-out infinite;
  z-index: 4;
}
@keyframes floatA { 0%,100%{transform:rotate(-3deg) translateY(0)}  50%{transform:rotate(-3deg) translateY(-12px)} }
@keyframes floatB { 0%,100%{transform:rotate(2.5deg) translateY(0)} 50%{transform:rotate(2.5deg) translateY(-9px)} }
@keyframes floatC { 0%,100%{transform:rotate(-2deg) translateY(0)}  50%{transform:rotate(-2deg) translateY(-11px)} }
@keyframes floatD { 0%,100%{transform:rotate(3deg) translateY(0)}   50%{transform:rotate(3deg) translateY(-8px)} }

/* Кликабельные декор-карточки */
.hero__card-float.is-clickable { cursor: pointer; transition: box-shadow .3s ease, filter .3s ease; }
.hero__card-float.is-clickable:hover { box-shadow: 0 22px 60px rgba(0,0,0,.18); filter: brightness(1.02); }

/* ── Внутренние элементы декор-карточек ── */
.decor-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.decor-row--tight { margin-bottom: 6px; }
.decor-person { min-width: 0; }
.decor-emoji { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.decor-title { font-weight: 700; font-size: .9rem; color: var(--text); line-height: 1.25; }
.decor-title--sm { font-size: .82rem; }
.decor-sub { font-size: .72rem; color: var(--text-3); margin-top: 1px; }
.decor-text { font-size: .78rem; color: var(--text-2); line-height: 1.5; margin-top: 4px; }
.decor-text--accent { color: var(--decor-accent); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.decor-text--accent::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--decor-accent); display: inline-block; flex-shrink: 0;
}
.decor-quote { font-size: .82rem; color: var(--text-2); line-height: 1.55; font-style: italic; }
.decor-eyebrow { font-size: .74rem; font-weight: 700; color: var(--decor-accent); margin-bottom: 6px; }
.decor-eyebrow--check { display: flex; align-items: center; gap: 5px; }
.decor-stars { color: #f5b301; font-size: .82rem; letter-spacing: 1px; margin-top: 6px; }
.decor-badge {
  display: inline-block; font-size: .68rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
  letter-spacing: .02em;
}
.decor-badge--solid { background: var(--decor-accent); color: #fff; }
.decor-badge--soft  { background: var(--primary-pale, #eef2ec); color: var(--decor-accent); }
.decor-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 7px 12px; border-radius: 10px;
  background: var(--decor-accent); color: #fff;
  font-weight: 800; font-size: .92rem; letter-spacing: .08em;
  border: 1px dashed rgba(255,255,255,.55);
}
.decor-promo i { font-size: .9rem; opacity: .85; }
.decor-ava {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: var(--border-light);
}
.decor-ava--init {
  display: flex; align-items: center; justify-content: center;
  background: var(--decor-accent); color: #fff; font-weight: 700; font-size: .82rem;
}
.decor-banner {
  width: 100%; height: 88px; border-radius: 12px; margin-bottom: 10px;
  background-size: cover; background-position: center; background-color: var(--border-light);
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--base) var(--ease), transform var(--base) var(--ease);
}
.step:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.step__num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step__title { font-size: 1.05rem; font-weight: 700; }
.step__text { font-size: .875rem; color: var(--text-2); line-height: 1.65; }

/* ============================================
   PSYCHOLOGIST CARD — premium v2
   ============================================ */
/* ============================================
   PSYCH CARD — clean profile card style
   ============================================ */
.psych-card {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: none;
  box-shadow: 0 2px 16px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
  transition: box-shadow .32s ease, transform .28s ease;
}
.psych-card::before { display: none; }
.psych-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.13), 0 0 0 1px rgba(0,0,0,.05);
  transform: translateY(-6px);
}

/* ── Photo area (top) — with inner padding like reference ── */
.psych-card__photo-area {
  padding: 12px 12px 0;
  background: #fff;
  flex-shrink: 0;
}
/* Inner rounded photo container */
.psych-card__photo-inner {
  position: relative;
  /* Квадрат: показываем выбранную при загрузке квадратную область целиком.
     min-height — запасной вариант для браузеров без aspect-ratio. */
  aspect-ratio: 1 / 1;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: #dce4ee;
}
.psych-card__photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .55s ease;
}
.psych-card:hover .psych-card__photo-bg { transform: scale(1.04); }

/* Large initials placeholder */
.psych-card__initials-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 900;
  color: rgba(80,110,150,.32);
  letter-spacing: 3px;
  pointer-events: none;
  user-select: none;
}

/* Online dot — top-right inside photo-inner */
.psych-card__online {
  position: absolute;
  top: 12px; right: 12px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid #fff;
  box-shadow: 0 0 10px rgba(34,197,94,.5);
  z-index: 2;
}

/* ── White info panel (bottom) ── */
.psych-card__panel {
  background: #fff;
  padding: 15px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

/* Name + verified badge: flex row, бейдж не переносится на новую строку */
.psych-card__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  min-width: 0;
}
.psych-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  line-height: 1.4;
  letter-spacing: -.15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psych-card__verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(34,197,94,.32);
}
.psych-card__verified svg {
  width: 9px; height: 9px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Spec — gray, like "Product Designer who focuses..." */
.psych-card__spec {
  font-size: .83rem;
  color: #999;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Price line — its own row, clearly visible */
.psych-card__price-line {
  font-size: .95rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 12px;
  letter-spacing: -.1px;
}
.psych-card__price-line em {
  font-style: normal;
  font-size: .75rem;
  font-weight: 400;
  color: #bbb;
  margin-left: 3px;
}

/* Stats + CTA — bottom row */
.psych-card__footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.psych-card__stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  row-gap: 4px;
}
.psych-card__stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .76rem;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}
.psych-card__stat-item i {
  font-size: .72rem;
  color: #c5c5c5;
}

/* CTA pill — компактная, не перекрывает счётчики на узких карточках */
.psych-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 100px;
  background: #f0f0f3;
  color: #111;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.psych-card:hover .psych-card__cta {
  background: #e5e5ea;
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0,0,0,.10);
}

/* hide old unused elements */
.psych-card__avatar-wrap,
.psych-card__bg,
.psych-card__overlay,
.psych-card__body,
.psych-card__cover,
.psych-card__stats,
.psych-card__divider,
.psych-card__bottom,
.psych-card__footer,
.psych-card__badges,
.psych-card__badge,
.psych-card__tags,
.psych-card__action,
.psych-card__price { display: none; }

/* ============================================
   CATALOG PAGE
   ============================================ */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
.catalog-filters {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.catalog-filters__title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.filter-group { margin-bottom: 20px; }
.filter-group__label { font-size: .78rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; display: block; }
.filter-group > .form-input { width: 100%; padding: 10px 12px; border-radius: var(--r-sm); }
.filter-range { display: flex; gap: 8px; align-items: center; }
.filter-range .form-input { flex: 1; min-width: 0; text-align: center; padding: 10px 8px; border-radius: var(--r-sm); }
.filter-range__sep { color: var(--text-3); font-size: .85rem; flex-shrink: 0; font-weight: 500; }

/* Remove number input spinners for cleaner look */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.catalog-results { }
.catalog-search {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}
.catalog-search__input-wrap {
  position: relative;
  flex: 1;
}
.catalog-search__input-wrap i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 1.1rem;
}
.catalog-search__input {
  width: 100%;
  padding: 12px 16px 12px 42px;
}
.catalog-count { font-size: .875rem; color: var(--text-3); font-weight: 500; white-space: nowrap; }

.psychs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 24px;
}

.catalog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination-btn {
  min-width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-2);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.pagination-btn:hover { border-color: var(--primary); color: var(--primary); }
.pagination-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ============================================
   CHAT MESSENGER
   ============================================ */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h)); /* dvh учитывает хром браузера на iOS */
  overflow: hidden;
}
.chat-sidebar {
  border-right: 1px solid var(--border-light);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-sidebar__header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-sidebar__search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.chat-sidebar__list {
  flex: 1;
  overflow-y: auto;
}
.chat-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--fast) var(--ease);
  border-bottom: 1px solid var(--border-light);
}
.chat-item:hover { background: var(--bg); }
.chat-item.active { background: var(--primary-pale); }
.chat-item__avatar-wrap { position: relative; flex-shrink: 0; }
.chat-item__info { flex: 1; min-width: 0; }
.chat-item__name { font-size: .9rem; font-weight: 600; margin-bottom: 3px; }
.chat-item__last-msg {
  font-size: .8rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.chat-item__time { font-size: .72rem; color: var(--text-3); }
.chat-item__badge {
  min-width: 20px; height: 20px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* Chat window */
.chat-window {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.chat-window__header {
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.chat-window__name { font-size: 1rem; font-weight: 700; }
.chat-window__status { font-size: .78rem; color: var(--success); }
.chat-window__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.message-bubble {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.message-bubble.own { align-self: flex-end; align-items: flex-end; }
.message-bubble.other { align-self: flex-start; align-items: flex-start; }

.message-bubble__content {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: .9rem;
  line-height: 1.55;
  word-break: break-word;
}
.message-bubble.own .message-bubble__content {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.message-bubble.other .message-bubble__content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}
.message-bubble__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: var(--text-3);
  padding: 0 4px;
}
.message-bubble.own .message-bubble__meta { color: var(--text-3); }
.message-read-icon { color: var(--primary-light); font-size: .75rem; }

.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
  width: fit-content;
}
.typing-indicator span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.chat-window__input-area {
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input-wrap { flex: 1; position: relative; }
.chat-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  border-radius: var(--r-xl);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: .9rem;
  resize: none;
  max-height: 120px;
  outline: none;
  transition: border-color var(--fast);
  line-height: 1.5;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background var(--fast), transform var(--fast);
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

.chat-no-selection {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-3);
}
.chat-no-selection i { font-size: 4rem; color: var(--primary-pale); }
.chat-no-selection p { font-size: 1rem; font-weight: 600; }

/* ── Chat: date separator ─────────────────────────────────────────────────── */
.chat-date-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  user-select: none;
}
.chat-date-sep::before,
.chat-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.chat-date-sep span { white-space: nowrap; padding: 0 4px; }

/* ── Chat: floating scroll-to-bottom button ──────────────────────────────── */
.chat-scroll-btn {
  position: absolute;
  bottom: 84px;
  right: 20px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--primary);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 10;
  transition: background var(--fast), transform var(--fast);
}
.chat-scroll-btn:hover { background: var(--primary-pale); transform: scale(1.08); }

/* ── Chat: reply preview bar (above input) ───────────────────────────────── */
.chat-reply-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border-top: 1.5px solid var(--primary-pale);
  border-left: 3px solid var(--primary);
  flex-shrink: 0;
  min-width: 0;
}
.chat-reply-preview__name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-preview__text {
  font-size: .8rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Chat: quoted reply inside a bubble ──────────────────────────────────── */
.bubble-reply {
  border-left: 3px solid rgba(255,255,255,.55);
  padding: 4px 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: rgba(0,0,0,.08);
}
.message-bubble.other .bubble-reply {
  border-left-color: var(--primary);
  background: var(--primary-pale);
}
.bubble-reply__name {
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 1px;
  opacity: .9;
}
.message-bubble.other .bubble-reply__name { color: var(--primary-dark); }
.bubble-reply__text {
  font-size: .78rem;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Chat: hover reply button on messages ────────────────────────────────── */
.message-bubble { position: relative; }
.msg-hover-actions {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fast);
}
.message-bubble.own .msg-hover-actions  { left: -38px; right: auto; }
.message-bubble.other .msg-hover-actions { right: -38px; left: auto; }
.message-bubble:hover .msg-hover-actions {
  opacity: 1;
  pointer-events: auto;
}
.msg-act-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--fast), color var(--fast);
}
.msg-act-btn:hover { background: var(--primary-pale); color: var(--primary); }

/* ── Chat: action buttons (paperclip / emoji) ────────────────────────────── */
.chat-action-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.chat-action-btn:hover { background: var(--primary-pale); color: var(--primary); border-color: var(--primary); }

/* ── Chat: inline image ──────────────────────────────────────────────────── */
.chat-img-msg {
  max-width: 240px;
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  transition: opacity var(--fast);
}
.chat-img-msg:hover { opacity: .9; }

/* ── Chat: file attachment link ──────────────────────────────────────────── */
.chat-file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  background: rgba(0,0,0,.08);
  color: inherit;
  transition: background var(--fast);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-bubble.other .chat-file-link { background: var(--primary-pale); color: var(--primary-dark); }
.chat-file-link:hover { background: rgba(0,0,0,.15); }
.message-bubble.other .chat-file-link:hover { background: var(--primary); color: var(--white); }

/* ── Chat: кликабельные ссылки в тексте сообщения ───────────────────────── */
.chat-link { text-decoration: underline; word-break: break-word; font-weight: 600; }
.message-bubble.own  .chat-link { color: #fff; }
.message-bubble.other .chat-link { color: var(--primary-dark); }

/* ── Chat: online dot in header ──────────────────────────────────────────── */
.chat-online-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--surface);
  z-index: 1;
}

/* ── Chat: read ticks (✓✓ teal) ─────────────────────────────────────────── */
.msg-read { color: #2ec4b6 !important; }

/* ── Chat: emoji picker ──────────────────────────────────────────────────── */
.chat-emoji-picker {
  position: absolute;
  bottom: 76px;
  right: 16px;
  width: 280px;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  z-index: 50;
  padding: 10px 8px;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}
.emoji-cell {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  line-height: 1;
  text-align: center;
  transition: background var(--fast), transform var(--fast);
}
.emoji-cell:hover { background: var(--primary-pale); transform: scale(1.2); }

/* ── Chat window: position relative for absolute children ───────────────── */
.chat-window { position: relative; }

/* ============================================
   SESSIONS PAGE
   ============================================ */
.sessions-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0;
}
.sessions-tab {
  padding: 12px 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast);
  white-space: nowrap;
}
.sessions-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.sessions-tab:hover { color: var(--primary); }

.session-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: box-shadow var(--base) var(--ease);
}
.session-card:hover { box-shadow: var(--shadow-md); }
.session-card__info { flex: 1; }
.session-card__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.session-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: .83rem;
  color: var(--text-2);
}
.session-card__meta-item { display: flex; align-items: center; gap: 5px; }
.session-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.session-card__price { font-size: 1.15rem; font-weight: 800; color: var(--primary); text-align: right; }

/* ============================================
   SESSION CARD v2 (kwork-style)
   ============================================ */
.session-card-v2 {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: box-shadow var(--base) var(--ease);
}
.session-card-v2:hover { box-shadow: var(--shadow-md); }

.session-card-v2__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px 16px;
}
.session-card-v2__avatar { flex-shrink: 0; }
.session-card-v2__title-group { flex: 1; min-width: 0; }
.session-card-v2__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.session-card-v2__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .83rem;
  color: var(--text-2);
  margin-bottom: 6px;
}
.session-card-v2__meta span { display: flex; align-items: center; gap: 5px; }
.session-card-v2__notes { font-size: .8rem; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.session-card-v2__right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.session-card-v2__price { font-size: 1.15rem; font-weight: 800; color: var(--primary); }

/* Stepper wrapper */
.session-card-v2__stepper-wrap {
  padding: 0 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}
.session-card-v2__banner { padding: 0 24px 12px; background: var(--bg); }
.session-card-v2__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
}

/* ── Session status badge ─────────────────────────────────────────────────── */
.sess-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.sess-status-warning { background: #FEF3C7; color: #92400E; }
.sess-status-info    { background: #DBEAFE; color: #1E40AF; }
.sess-status-success { background: #D1FAE5; color: #065F46; }
.sess-status-default { background: var(--bg-deep); color: var(--text-2); }
.sess-status-error   { background: #FEE2E2; color: #991B1B; }
.sess-btn-cancel     { color: var(--error) !important; }

/* ── Session stepper ─────────────────────────────────────────────────────── */
.session-stepper {
  display: flex;
  align-items: flex-start;
  padding: 16px 8px;
  gap: 0;
}
.session-stepper--cancelled {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--error);
}

.sess-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 72px;
}
.sess-step__dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  border: 2.5px solid;
  transition: all .2s;
}
.sess-step.done    .sess-step__dot { background: var(--success); border-color: var(--success); color: #fff; }
.sess-step.current .sess-step__dot {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 5px var(--primary-pale);
}
.sess-step.pending .sess-step__dot { background: var(--surface); border-color: var(--border); color: var(--text-3); }

.sess-step__label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
  letter-spacing: .02em;
}
.sess-step.done    .sess-step__label { color: var(--success); }
.sess-step.current .sess-step__label { color: var(--primary); font-weight: 700; }

.sess-step__line {
  flex: 1;
  height: 2.5px;
  background: var(--border);
  margin-top: 19px;
  min-width: 20px;
  transition: background .2s;
}
.sess-step__line.done { background: var(--success); }

/* ── Session action banner ───────────────────────────────────────────────── */
.session-action-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--r-lg);
  border: 1px solid;
}
.session-action-banner.success {
  background: #D1FAE5; border-color: #6EE7B7; color: #065F46;
}
.session-action-banner.warning {
  background: #FEF3C7; border-color: #FCD34D; color: #92400E;
}
.session-action-banner.danger {
  background: #FEE2E2; border-color: #FCA5A5; color: #991B1B;
}
.session-action-banner__icon  { font-size: 1.3rem; flex-shrink: 0; }
.session-action-banner__body  { flex: 1; min-width: 0; }
.session-action-banner__title { font-weight: 700; font-size: .875rem; }
.session-action-banner__text  { font-size: .8rem; opacity: .82; margin-top: 2px; }
.session-action-banner__btns  { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* ── Session widget in chat ──────────────────────────────────────────────── */
.session-widget {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border-light);
  flex-shrink: 0;
}
.session-widget__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--fast);
}
.session-widget__header:hover { background: var(--bg); }
.session-widget__info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  flex-wrap: wrap;
  min-width: 0;
}
.sw-sep { color: var(--border); }
.sw-expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: .8rem;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color var(--fast), background var(--fast);
  flex-shrink: 0;
}
.sw-expand-btn:hover { color: var(--primary); background: var(--primary-pale); }

.session-widget__body {
  padding: 4px 16px 12px;
  border-top: 1px solid var(--border-light);
}
.session-widget__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Mini stepper */
.session-widget__mini-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0 6px;
}
.sw-step {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  border: 2px solid;
  flex-shrink: 0;
}
.sw-step.done    { background: var(--success); border-color: var(--success); color: #fff; }
.sw-step.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.sw-step.pending { background: var(--surface); border-color: var(--border); color: var(--text-3); }
.sw-line { flex: 1; height: 2px; background: var(--border); min-width: 14px; }
.sw-line.done { background: var(--success); }

/* Widget mini banners */
.sw-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-lg);
  font-size: .8rem;
  font-weight: 600;
  margin-top: 6px;
  flex-wrap: wrap;
}
.sw-banner.success { background: #D1FAE5; color: #065F46; }
.sw-banner.success-light { background: #ECFDF5; color: #065F46; }
.sw-banner.warning { background: #FEF3C7; color: #92400E; }
.sw-banner.danger  { background: #FEE2E2; color: #991B1B; }
.sw-banner span    { flex: 1; min-width: 0; }
.sw-row            { display: flex; align-items: center; gap: 8px; padding: 6px 0; }

/* ── Extra button variants ───────────────────────────────────────────────── */
.btn-success { background: #059669; color: #fff; border: none; }
.btn-success:hover { background: #047857; }
.btn-danger  { background: var(--error); color: #fff; border: none; }
.btn-danger:hover  { background: #a03020; }
.btn-xs { padding: 4px 10px; font-size: .75rem; border-radius: 8px; }

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
.profile-sidebar {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

/* ── Banner ── */
.profile-sidebar__cover {
  height: 140px;
  position: relative;
  background: linear-gradient(135deg, #2D5E3F 0%, #4A9B6F 100%);
  transition: background .4s ease;
}
/* ── 10 rich thematic banners ── */
.profile-banner-1 {
  background-image:
    radial-gradient(ellipse at 15% -20%, rgba(255,255,180,.35) 0%, transparent 55%),
    repeating-linear-gradient(105deg, rgba(255,255,255,.04) 0, rgba(255,255,255,.04) 1px, transparent 1px, transparent 38px),
    linear-gradient(160deg, #1a472a 0%, #2d6a4f 45%, #52b788 100%);
}
.profile-banner-2 {
  background-image:
    repeating-linear-gradient(-45deg, transparent, transparent 12px, rgba(255,255,255,.05) 12px, rgba(255,255,255,.05) 24px),
    radial-gradient(ellipse at 75% 110%, rgba(144,224,239,.5) 0%, transparent 55%),
    linear-gradient(180deg, #03045e 0%, #0077b6 55%, #00b4d8 100%);
}
.profile-banner-3 {
  background-image:
    radial-gradient(circle at 50% 140%, rgba(255,220,0,.85) 0%, rgba(255,100,0,.4) 30%, transparent 65%),
    linear-gradient(180deg, #1a1a2e 0%, #7f1d1d 28%, #c2410c 58%, #f97316 82%, #fbbf24 100%);
}
.profile-banner-4 {
  background-image:
    radial-gradient(ellipse at 30% 55%, rgba(16,185,129,.45) 0%, transparent 48%),
    radial-gradient(ellipse at 72% 25%, rgba(139,92,246,.55) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 85%, rgba(6,182,212,.3) 0%, transparent 38%),
    linear-gradient(160deg, #020617 0%, #0f172a 40%, #0d1b2a 100%);
}
.profile-banner-5 {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.85) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 60%, rgba(99,102,241,.2) 0%, transparent 65%),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  background-size: 80px 60px, 40px 50px, 100% 100%, 100% 100%;
  background-position: 10px 10px, 30px 25px, 0 0, 0 0;
}
.profile-banner-6 {
  background-image:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.28) 0%, transparent 32%),
    radial-gradient(circle at 22% 72%, rgba(255,255,255,.15) 0%, transparent 26%),
    linear-gradient(135deg, #be185d 0%, #f43f5e 38%, #fb7185 68%, #fda4af 100%);
}
.profile-banner-7 {
  background-image:
    radial-gradient(ellipse at 10% 95%, rgba(250,204,21,.45) 0%, transparent 42%),
    radial-gradient(ellipse at 88% 12%, rgba(16,185,129,.3) 0%, transparent 42%),
    repeating-linear-gradient(60deg, rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px, transparent 1px, transparent 28px),
    linear-gradient(135deg, #064e3b 0%, #065f46 30%, #059669 100%);
}
.profile-banner-8 {
  background-image:
    repeating-linear-gradient(60deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(-60deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 28px),
    radial-gradient(ellipse at 50% 0%, rgba(186,230,253,.55) 0%, transparent 58%),
    linear-gradient(160deg, #0c4a6e 0%, #0369a1 42%, #38bdf8 100%);
}
.profile-banner-9 {
  background-image:
    repeating-radial-gradient(circle at 50% 50%, transparent 18px, rgba(255,255,255,.04) 19px, transparent 20px, transparent 38px),
    radial-gradient(ellipse at 82% 18%, rgba(255,255,255,.22) 0%, transparent 48%),
    linear-gradient(135deg, #4a1942 0%, #7c3aed 42%, #c4b5fd 100%);
}
.profile-banner-10 {
  background-image:
    radial-gradient(ellipse at 50% 105%, rgba(255,200,50,.65) 0%, transparent 48%),
    radial-gradient(ellipse at 28% 80%, rgba(255,100,0,.4) 0%, transparent 38%),
    radial-gradient(ellipse at 72% 85%, rgba(200,30,0,.3) 0%, transparent 38%),
    linear-gradient(0deg, #7c2d12 0%, #b91c1c 28%, #7f1d1d 58%, #1c1917 100%);
}

.profile-banner-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  backdrop-filter: blur(4px);
  transition: background .15s;
  white-space: nowrap;
}
.profile-banner-btn:hover { background: rgba(0,0,0,.55); }

/* ── Banner picker popover ── */
.banner-picker {
  position: absolute;
  top: 42px; right: 10px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 10px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  display: grid;
  grid-template-columns: repeat(5, 42px);
  gap: 8px;
}
.banner-picker__swatch {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform .15s, border-color .15s;
  position: relative;
  overflow: hidden;
}
.banner-picker__swatch:hover { transform: scale(1.1); z-index: 1; }
.banner-picker__swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.banner-picker__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  font-size: .48rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  pointer-events: none;
}

/* ── Avatar centered ── */
.profile-sidebar__body {
  padding: 0 20px 20px;
  text-align: center;
}
.profile-sidebar__avatar-wrap {
  margin: -52px auto 12px;
  position: relative;
  display: inline-block;
}
.profile-sidebar__avatar-wrap .avatar-xl,
.profile-sidebar__avatar-wrap .avatar-placeholder.avatar-xl {
  border: 4px solid var(--surface);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.profile-sidebar__avatar-btn {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  border: 2px solid var(--surface);
  cursor: pointer;
  transition: background .15s;
}
.profile-sidebar__avatar-btn:hover { background: var(--primary-dark); }
.profile-sidebar__name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.profile-sidebar__role { font-size: .8rem; color: var(--text-3); margin-bottom: 14px; }
.profile-sidebar__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.profile-sidebar__stat {
  background: var(--bg-deep);
  border-radius: var(--r-md);
  padding: 10px;
  text-align: center;
}
.profile-sidebar__stat-val { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.profile-sidebar__stat-label { font-size: .7rem; color: var(--text-3); }

.profile-nav { display: flex; flex-direction: column; }
.profile-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.profile-nav__item i { font-size: 1.1rem; width: 20px; }
.profile-nav__item:hover { background: var(--bg-deep); color: var(--text); }
.profile-nav__item.active { background: var(--primary-pale); color: var(--primary-dark); font-weight: 700; }

.profile-content { display: flex; flex-direction: column; gap: 24px; }
.profile-section {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.profile-section__header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
}
.profile-section__body { padding: 24px; }

/* ============================================
   AUTH FORMS (Modal)
   ============================================ */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 28px;
  gap: 0;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--fast), border-color var(--fast);
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { font-size: .875rem; color: var(--text-2); margin-bottom: 28px; line-height: 1.5; }
.auth-footer { margin-top: 20px; text-align: center; font-size: .875rem; color: var(--text-2); }
.auth-footer a { color: var(--primary); font-weight: 600; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; }

/* Onboarding questionnaire */
.questionnaire-step { display: none; }
.questionnaire-step.active { display: block; }
.questionnaire-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.questionnaire-progress__dot {
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background var(--base);
}
.questionnaire-progress__dot.active { background: var(--primary); }

/* ============================================
   PSYCHOLOGIST DETAIL PAGE — premium
   ============================================ */
.psych-detail {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* HERO */
.psych-detail__hero {
  background: var(--white);
  border-radius: var(--r-2xl);
  border: 1px solid rgba(61,107,79,.08);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 16px rgba(42,31,14,.06);
}
.psych-detail__hero-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
}
.psych-detail__hero-body {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 28px 32px 28px;
}
.psych-detail__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.psych-detail__photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2.5px var(--border-light), 0 4px 20px rgba(42,31,14,.12);
}
.psych-detail__initials {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: var(--white); letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(61,107,79,.30);
}
.psych-detail__online-badge {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--white);
  box-shadow: 0 2px 6px rgba(39,174,96,.4);
}
.psych-detail__hero-info { flex: 1; min-width: 0; }
.psych-detail__name {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.psych-detail__spec {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 18px;
}
.psych-detail__stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.psych-detail__stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-weight: 500;
}
.psych-detail__stat strong { color: var(--text); font-weight: 700; }
.psych-detail__stat-star { color: #E8A020; }
.psych-detail__hero-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* BOOKING */
.psych-detail__booking {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid rgba(61,107,79,.08);
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(42,31,14,.05);
}
.psych-detail__price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.psych-detail__price-note {
  font-size: .72rem;
  color: var(--text-3);
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: .2px;
}

/* TABS */
.psych-detail__tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid var(--border-light);
  margin-bottom: 20px;
}
.psych-detail__tab {
  padding: 12px 22px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--fast) var(--ease),
              border-color var(--fast) var(--ease),
              background var(--fast) var(--ease);
}
.psych-detail__tab:hover { color: var(--primary); background: rgba(61,107,79,.04); }
.psych-detail__tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

/* Content blocks */
.psych-detail__block {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid rgba(61,107,79,.08);
  padding: 24px 28px;
  margin-bottom: 14px;
  box-shadow: 0 1px 8px rgba(42,31,14,.04);
}
.psych-detail__block h3 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--text-3);
  margin-bottom: 14px;
}
.psych-detail__block p {
  color: var(--text-2);
  line-height: 1.8;
  font-size: .9rem;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* Review card */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 20px;
}
.review-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-card__name { font-weight: 700; font-size: .9rem; }
.review-card__date { font-size: .78rem; color: var(--text-3); margin-left: auto; }
.review-card__text { font-size: .875rem; color: var(--text-2); line-height: 1.65; }
.review-card__response {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--primary-pale);
  border-radius: var(--r-md);
  font-size: .83rem;
  color: var(--primary-dark);
  line-height: 1.6;
}
.review-card__response-label { font-weight: 700; font-size: .75rem; margin-bottom: 4px; }

/* ============================================
   NOTIFICATIONS / MODERATION BANNER
   ============================================ */
.info-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.info-banner i { font-size: 1.3rem; flex-shrink: 0; }
.info-banner.warning { background: #FFF3CD; color: #856404; border: 1px solid #FFE69C; }
.info-banner.info    { background: #CCE5FF; color: #004085; border: 1px solid #B8D4FF; }
.info-banner.success { background: #D1E7DD; color: #0F5132; border: 1px solid #BADBCC; }
.info-banner.error   { background: #F8D7DA; color: #721C24; border: 1px solid #F5C2C7; }

/* ============================================
   SCHEDULE GRID
   ============================================ */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.schedule-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.schedule-day__label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}
.schedule-slot {
  padding: 6px 4px;
  border-radius: var(--r-sm);
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  background: var(--primary-pale);
  color: var(--primary-dark);
  cursor: pointer;
  transition: background var(--fast);
  border: 1px solid transparent;
}
.schedule-slot:hover { background: var(--primary); color: var(--white); }
.schedule-slot.selected { background: var(--primary); color: var(--white); }
.schedule-slot.booked { background: var(--bg-deep); color: var(--text-3); cursor: not-allowed; }

/* ============================================
   CATALOG — MOBILE BOTTOM SHEET (base styles)
   ============================================ */
/* Затемнение под шторкой — скрыто по умолчанию */
.mobile-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42,31,14,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 149;
}
.mobile-filter-overlay.active { display: block; }

/* Шапка шторки: заголовок + крестик */
.catalog-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
/* Перенести margin с title на head */
.catalog-filters__head .catalog-filters__title { margin-bottom: 0; }

/* Крестик закрытия — скрыт на десктопе */
.catalog-filters__close-btn { display: none; }

/* Кнопка "Фильтры" в строке поиска — скрыта на десктопе */
.catalog-filter-toggle { display: none; }

/* ============================================
   MOBILE RESPONSIVE — COMPONENTS
   ============================================ */
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filters { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .psych-detail__hero { grid-template-columns: 1fr; }
  .psych-detail__photo { width: 100px; height: 100px; }
}

/* ── Message context menu (Telegram-style) ──────────────────────────────── */
.msg-ctx-menu {
  position: fixed;
  z-index: 9001;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.10);
  padding: 6px 0;
  min-width: 190px;
  border: 1px solid var(--border-light);
  animation: fadeInUp .12s ease;
  overflow: hidden;
}
.msg-ctx-menu__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: .88rem;
  color: var(--text);
  transition: background var(--fast);
  user-select: none;
}
.msg-ctx-menu__item:hover { background: var(--bg); }
.msg-ctx-menu__item i { font-size: 1rem; color: var(--text-2); width: 18px; text-align: center; flex-shrink: 0; }
.msg-ctx-menu__item.danger { color: var(--error); }
.msg-ctx-menu__item.danger i { color: var(--error); }
.msg-ctx-menu__sep { height: 1px; background: var(--border-light); margin: 4px 0; }
.msg-ctx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: transparent;
}

/* ── Pin bar ─────────────────────────────────────────────────────────────── */
.pin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  font-size: .85rem;
  flex-shrink: 0;
  min-height: 0;
  color: var(--text);
}
.pin-bar__content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.pin-bar__label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1px;
}
.pin-bar__text {
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}
.pin-bar__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 4px;
  flex-shrink: 0;
  font-size: .85rem;
  line-height: 1;
  border-radius: 6px;
  transition: color var(--fast), background var(--fast);
}
.pin-bar__close:hover { color: var(--error); background: #fee2e211; }

/* ── Edit preview bar (above input) ─────────────────────────────────────── */
.chat-edit-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg);
  border-top: 1.5px solid var(--primary-pale);
  font-size: .85rem;
  flex-shrink: 0;
}
.chat-edit-preview__icon { color: var(--primary); font-size: 1rem; flex-shrink: 0; }
.chat-edit-preview__body { flex: 1; min-width: 0; }
.chat-edit-preview__label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1px;
}
.chat-edit-preview__text {
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}
.chat-edit-preview__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 6px;
  transition: color var(--fast);
}
.chat-edit-preview__close:hover { color: var(--text); }

/* ── Edited badge inside bubble ─────────────────────────────────────────── */
.msg-edited {
  font-size: .67rem;
  color: var(--text-3);
  margin-left: 3px;
  font-style: italic;
  opacity: .85;
}

/* ── Fade-in animation for context menu ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
  /* Чат-контейнер прибит к экрану — не зависит от вычислений высоты */
  .chat-layout {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: var(--mobile-nav-h);
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    overflow: hidden;
    z-index: 3; /* выше фона с фигурками */
  }
  .chat-sidebar {
    height: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    overflow-y: auto;
  }
  .chat-sidebar.hidden-mobile { display: none; }
  .chat-window {
    height: 100%;
    min-height: 0;
  }
  /* Шапка и поле ввода всегда на своих местах */
  .chat-window__header { flex-shrink: 0; }
  .chat-window__messages { flex: 1; min-height: 0; overflow-y: auto; }
  .chat-window__input-area { flex-shrink: 0; }
  /* New chat elements — mobile tweaks */
  .chat-scroll-btn { bottom: 72px; right: 12px; }
  .chat-emoji-picker { right: 8px; width: calc(100vw - 32px); max-width: 280px; }
  .message-bubble { max-width: 85%; }
  .msg-hover-actions { display: none; }
  .chat-img-msg { max-width: 180px; max-height: 180px; }
  .chat-action-btn { width: 34px; height: 34px; font-size: 1rem; }
  /* Session card mobile */
  .session-card-v2__header { flex-wrap: wrap; padding: 16px 16px 12px; gap: 12px; }
  .session-card-v2__right { flex-direction: row; align-items: center; gap: 10px; width: 100%; }
  .session-card-v2__stepper-wrap { padding: 0 12px; }
  .session-card-v2__actions { padding: 12px 16px; }
  .session-card-v2__banner { padding: 0 16px 10px; }
  .sess-step { min-width: 52px; }
  .sess-step__dot { width: 32px; height: 32px; font-size: .8rem; }
  .session-action-banner { flex-wrap: wrap; }
  .session-action-banner__btns { width: 100%; justify-content: flex-end; }
  .pin-bar { font-size: .8rem; padding: 6px 12px; }
  .msg-ctx-menu { min-width: 160px; }
  .msg-ctx-menu__item { padding: 11px 16px; font-size: .9rem; }
  .steps { grid-template-columns: 1fr; }
  .hero__content { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { display: none; }
  .hero__canvas { display: none; }
  .hero__stats { gap: 20px; flex-wrap: wrap; }
  .hero__title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .hero__subtitle { font-size: 1rem; }
  .hero__actions .btn-lg { padding: 12px 22px; font-size: .9rem; }
  .psych-detail__booking { flex-direction: column; align-items: flex-start; }
  .session-card { flex-direction: column; }

  /* ── Каталог: фильтр → нижняя шторка ── */
  .catalog-filters {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    top: auto;
    z-index: 150;
    max-height: 82vh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    border: none;
    box-shadow: 0 -8px 40px rgba(42,31,14,.2);
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    padding-bottom: calc(var(--mobile-nav-h) + 20px);
  }
  .catalog-filters.mobile-open { transform: translateY(0); }

  /* Ручка-индикатор сверху шторки */
  .catalog-filters::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
  }

  /* Крестик и кнопка фильтра — показываем */
  .catalog-filters__close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-deep);
    color: var(--text-2);
    font-size: .9rem;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
  }
  .catalog-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: inherit;
  }
  .catalog-filter-toggle.has-filters {
    background: var(--primary-pale);
    border-color: var(--primary);
    color: var(--primary);
  }

  /* ── Каталог: 2 карточки в ряд ── */
  .psychs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  /* Компактные карточки под 2 колонки */
  .psych-card { border-radius: 16px; }
  .psych-card__photo-area { padding: 8px 8px 0; }
  .psych-card__photo-inner { height: 125px; }
  .psych-card__initials-bg { font-size: 1.5rem; }
  .psych-card__panel { padding: 8px 10px 10px; }
  .psych-card__name-row { margin-bottom: 2px; }
  .psych-card__name { font-size: .78rem; line-height: 1.3; }
  .psych-card__spec { font-size: .67rem; margin-bottom: 4px; }
  .psych-card__price-line { font-size: .77rem; margin-bottom: 5px; }
  .psych-card__price-line em { font-size: .66rem; }
  .psych-card__cta { display: none; }
  .psych-card__stats-row { gap: 4px; flex-wrap: wrap; }
  .psych-card__stat-item { font-size: .64rem; gap: 2px; }
}

@media (max-width: 480px) {
  .sessions-tabs { overflow-x: auto; padding-bottom: 2px; }
  .psych-detail__stats { gap: 14px; }
}
