/* =============================
   1. Переменные (токены)
============================= */


@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@400;700&display=swap');


:root {
  /* Основные цвета */
  --bg-neu:         #F0F0F3;
  --color-primary: #DCDCDC;  
  --btn-bg: #8FD6CC;
  --btn-text: #555555;
  --color-text:     #555555;
  --color-muted:    #888888;
	

  /* Шрифты */
  --font-base:      'Alegreya Sans SC', sans-serif;

  /* Радиусы */
  --radius-pill:    16px;
  --radius-card:    24px;

  /* Тени */
  --shadow-dark:    #c5c5c5;
  --shadow-light:   #f2f2f2;

  /* Размеры шрифтов */
  --font-xxsmall:  8px;
  --font-xsmall:  12px;
  --font-small:   14px;
  --font-medium:  16px;
  --font-large:   20px;
  --font-xlarge:  24px;
  --font-2xl: 32px;

  /* Отступы */
  --space-8:    8px;
  --space-16:  16px;
  --space-24:  24px;
  --space-36:  36px;
  --space-48:  48px;
  --control-width: 344px;
  --control-height: 80px;
  --radius-base: 12px;
  --btn-gradient: linear-gradient(145deg, #d2cfd1, #f0edee);
  --color-neutral-text: #8a8686;
  --shadow-raised: 4px 4px 6px #c5c5c5, -4px -4px 6px #f0eeee;
  --shadow-inset: inset 4px 4px 6px #c5c5c5, inset -4px -4px 6px #f0eeee;
  --shadow-input: inset 6px 6px 5px #cbced1, inset -6px -6px 5px #f0eeee;
}

/* =============================
   2. Глобальный reset + фон
============================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 8px;
  padding: 0;
}

html,
body {
  margin: 0;
}

html {
  min-height: 100vh;
  background: linear-gradient(145deg, #e0dedf, #dedcdd) no-repeat;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-xsmall);
  background: transparent;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =============================
   3. Layout & Containers
============================= */
/* =============================
   2. Главный контейнер
============================= */
/* — На всех страницах (index, register, cabinet и т.д.) */

main.container,
.container,
.form-container {
  flex: 1;
  width: 100%;
  max-width: 376px;

  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Form blocks should align their contents to the left */
.form-container {
  align-items: flex-start;
}

/* Убираем внешний отступ у основного контейнера */
main.container {
  margin-top: 0;
}

/* Первый элемент внутри контейнера без верхнего отступа */
main.container > :first-child {
  margin-top: 0;
}





/* Ссылки */
a {
  color: #555555;
  text-decoration: underline;
}
a:hover {
  text-decoration: underline;
}
/* =============================
   3. Отступы между элементами
============================= */
input, select, textarea, .accordion {
  margin-bottom: var(--space-8);
}
form > :last-child,
.container > :last-child {
  margin-bottom: 0;
}


/* Кнопка-логотип с неоморфным кругом */
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--bg-neu);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  transition: box-shadow 0.2s;
}

@@ -136,157 +146,150 @@ form > :last-child,

.logo-link:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.logo-link:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}
.logo-link img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}



/* ==================================================
   ГЛОБАЛЬНЫЙ НЕОМОРФНЫЙ СТИЛЬ ДЛЯ ВСЕХ ПОЛЕЙ
================================================== */
input:not([type=radio]):not([type=checkbox]):not([type=range]),
textarea,
select,
.form-control {
  /* 1) Растягиваем на 100% контейнера (его max-width = 376px) */
  width: 344px;
  max-width: 100%;

  /* 2) Фиксированная высота как у аккордеона */
  height: 44px;

  /* 3) Фон и тень */
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  box-shadow: inset 4px 4px 6px #c5c5c5, inset -4px -4px 6px #f2f2f2;

  /* 4) Скругления и отступы */
  border: none;
  border-radius: var(--radius-pill);
  padding: 0 var(--space-16);

  /* 5) Типографика */
  font-family: var(--font-base);
  font-size: var(--font-medium);
  color: var(--color-text);

  outline: none;
  transition: box-shadow 0.2s;
  box-sizing: border-box;
}

input[type=range] {
  height: auto;
  padding: 0;
}


/* ==================================================
   Inset-эффект при фокусе
================================================== */
input:not([type=radio]):not([type=checkbox]):not([type=range]):focus,
textarea:focus,
select:focus,
.form-control:focus {
  box-shadow: inset 4px 4px 6px #c5c5c5, inset -4px -4px 6px #f2f2f2;
}

select:active,
select.form-control:active {
  box-shadow: inset 4px 4px 6px #c5c5c5, inset -4px -4px 6px #f2f2f2;
}

/* Error state for invalid fields */
.form-control--error,
input.form-control--error,
select.form-control--error,
textarea.form-control--error {
  border: 1px solid var(--color-danger, #dc2626);
}

/* ==================================================
   Стрелка у всех select
================================================== */
select,
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;

  background-repeat: no-repeat;
  background-position: right var(--space-16) center;
  background-size: 12px 8px;
  background-image: url("data:image/svg+xml;charset=UTF-8,\
<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'>\
<path d='M1 1l5 5 5-5' stroke='%23888888' stroke-width='2' fill='none' stroke-linecap='round'/>\
</svg>");
}

/* ==================================================
   Вертикальные отступы между полями
================================================== */
/* На всех страницах, внутри форм */
.form-container > * + * {
  margin-top: var(--space-16);
}


/* =============================
   6. КНОПКИ
============================= */
/* общий стиль для всех кнопок */
button,
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none !important;
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);

  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-12) var(--space-16);
  font-family: var(--font-base);
  font-size: var(--font-medium);
  color: var(--color-text);
  text-shadow: 0.5px 0.5px 0 #f5f4f5, -0.5px -0.5px 1px #c6c3c4;
  cursor: pointer;
  transition: box-shadow 0.2s;
  width: 344px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  /* фиксированная высота 44px */
  height: 44px;
}
button:hover,
.btn:hover {
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);
}
button:active,
.btn:active {
  box-shadow: inset 4px 4px 6px var(--shadow-dark), inset -4px -4px 6px var(--shadow-light);
}
button:disabled,
.btn:disabled {
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);
  opacity: 0.6;
  cursor: default;
}

/* стиль для кнопок primary — наследует общий вид */
.btn-primary {
}
.btn-primary:hover {
}
.btn-primary:active {
}






/* =============================
   7. НЕОМОРФНЫЙ АККОРДЕОН
============================= */
.accordion {
  width: 100%;
  max-width: 100%;
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 6px #c5c5c5, -4px -4px 6px #f2f2f2;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.accordion > summary::-webkit-details-marker {
  display: none;
}
.accordion > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-12,12px) var(--space-16);
  cursor: pointer;
  background: transparent;
  font-family: var(--font-base);
  font-size: var(--font-medium);
  text-shadow: 0.5px 0.5px 0 #f5f4f5, -0.5px -0.5px 1px #c6c3c4;
}
.accordion > summary::after {
  content: '';
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml;charset=UTF-8,\
<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'>\
<path d='M1 1l5 5 5-5' stroke='%23888888' stroke-width='2' fill='none' stroke-linecap='round'/>\
</svg>");
  background-repeat: no-repeat;
  background-size: 12px 8px;
  transition: transform 0.2s;
}
.accordion[open] {
  box-shadow: inset 4px 4px 6px #c5c5c5, inset -4px -4px 6px #f2f2f2;
}
.accordion[open] > summary::after {
  transform: rotate(180deg);
}
.accordion__content {
  background: transparent;
  padding: var(--space-12,12px) var(--space-16);
  font-family: var(--font-base);
  font-size: var(--font-medium);
  line-height: 1.4;
}

/* ============ ВТЯНУТЫЙ ЭФФЕКТ ДЛЯ H1 ============ */
.page-title, .title {
  /* Оставляем прежние свойства заголовка */
  display: block;               /* или inline по желанию */
  font-size: var(--font-xlarge);
  font-weight: 700;
  color: #555555;
  text-align: center;

  /* Текстовый inset-эффект */
  text-shadow:
    2px  2px 3px var(--shadow-dark),
   -2px -2px 3px var(--shadow-light);
  background: transparent;      /* убираем фон */
  padding: 0;                   /* убираем padding */
  border-radius: 0;             /* сбрасываем скругления */
}








/* =============================
   Чекбокс согласия
============================= */
.consent-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  cursor: pointer;

  text-align: center;
}

/* Скрываем нативный вид и усиливаем чекбокс */
.consent-box input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  /* background: var(--bg-neu);*/
  box-shadow:
    3px 3px 12px rgba(0,0,0,0.12),
   -3px -3px 12px rgba(255,255,255,0.9);
  border: 1px solid var(--color-danger, #dc2626);
  position: relative;
  transition: box-shadow 0.2s;
  cursor: pointer;
  margin-top: 4px; /* выравниваем с текстом */
}

/* Hover/Active */
.consent-box input[type="checkbox"]:hover {
  box-shadow:
    2px  2px 4px rgba(0,0,0,0.2),
   -2px -2px 4px rgba(255,255,255,1);
}
.consent-box input[type="checkbox"]:active {
  box-shadow:
    inset 3px  3px 6px rgba(0,0,0,0.2),
    inset -3px -3px 6px rgba(255,255,255,1);
}

/* Галочка */
.consent-box input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 12px;
  width: 20px;
  height: 12px;
border-left: 3px solid #555555;
  border-bottom: 3px solid #555555;
  transform: translate(-50%, -50%) rotate(-45deg);
}
/* Текст соглашения */
.consent-text {
  display: block;
  font-size: var(--font-xsmall);
  color: #555555;
  line-height: 1.2;
  margin-top: var(--space-8);
}
.consent-text a {
  color: #555555;
  text-decoration: underline;
}
.consent-note {
  font-size: var(--font-xsmall);
  color: var(--color-muted);
  text-align: center;
  margin-top: -12px;
  margin-bottom: var(--space-16);
}
/* ============ КНОПКА ВХОДА ЧЕРЕЗ TELEGRAM ============ */
.auth-buttons {
  position: relative;
}

/* ============ ВИЗУАЛЬНОЕ СОСТОЯНИЕ DISABLED ============ */
/* Снижаем непрозрачность и делаем серой */
.auth-buttons:not(.enabled) {
  opacity: 0.7;
  filter: grayscale(40%) brightness(1.2);
  cursor: not-allowed;
}

/* Делаем то же для самой Telegram-кнопки внутри */
.auth-buttons:not(.enabled) .telegram-login-button {
  filter: grayscale(40%) brightness(1.2);
  opacity: 0.8 !important;
}

/* Вернуть нормальное состояние, когда enabled */
.auth-buttons.enabled {
  opacity: 1;
  filter: none;
  cursor: pointer;
}
.auth-buttons.enabled .telegram-login-button {
  filter: none;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* =============================
 12. ФУТЕР
============================= */
.site-footer {
  text-align: center;
  font-size: var(--font-xsmall);
  color: #555555;
  padding: var(--space-8) 0;
  margin-top: auto; /* прижимает футер к низу контента */
  text-decoration: none
}
.site-footer a {
  font-size: var(--font-xsmall);
  color: #555555;
  text-decoration: underline;
}

/* Всплывающие уведомления в неоморфном стиле */
.notification-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  margin: 0;
  background: var(--bg-neu);
  padding: var(--space-16);
  width: var(--control-width);
  border-radius: var(--radius-card);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  font-size: var(--font-small);
  z-index: 1001;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

/* Баннер согласия на cookie без затемнения */
.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: var(--space-24);
  background: var(--bg-neu);
  padding: var(--space-16);
  width: calc(100% - 2 * var(--space-16));
  max-width: var(--control-width);
  border-radius: var(--radius-card);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  font-size: var(--font-small);
  z-index: 1001;
  text-align: center;
  transform: translateX(-50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

.notification-popup.show,
.cookie-consent.show {
  opacity: 1;
  pointer-events: auto;
}

.notification-popup.show {
  transform: translate(-50%, -50%) scale(1);
}

.cookie-consent.show {
  transform: translate(-50%, 0) scale(1);
}

/* Кнопки во всплывающих уведомлениях */
.notification-popup button {
  margin-top: var(--space-8);
  padding: var(--space-8) var(--space-16);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--btn-gradient);
  color: var(--btn-text);
  cursor: pointer;
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);
  font-size: var(--font-medium);
  width: 100%;
}
  .notification-popup .call-number {
    font-size: var(--font-2xl);
  }
.notification-popup input,
.notification-popup select,
.notification-popup textarea {
  width: 100%;
}
.notification-popup button:active {
  box-shadow: inset 4px 4px 6px var(--shadow-dark), inset -4px -4px 6px var(--shadow-light);
}

/* Баннер согласия на cookie */
.cookie-consent {
  /* additional cookie styles can go here */
}

.cookie-consent button {
  margin-left: var(--space-8);
  padding: var(--space-8) var(--space-16);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--btn-gradient);
  color: var(--btn-text);
  cursor: pointer;
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);
  font-size: var(--font-medium);
  width: 100%;
}
.cookie-consent button:active {
  box-shadow: inset 4px 4px 6px var(--shadow-dark), inset -4px -4px 6px var(--shadow-light);
}

/* ============ НЕОМОРФНЫЙ СТИЛЬ ДЛЯ AVATAR-TOGGLE ============ */
.avatar-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-neu);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.2s;

	/*
  margin-top: var(--space-8)!important;;
  margin-bottom: var(--space-24)!important;; */
}

.avatar-toggle:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}

.avatar-toggle:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.avatar-toggle__img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

/* Telegram username below avatar on registration page */
.tg-username {
  font-size: var(--font-xsmall);
  color: var(--color-muted);
  margin: var(--space-8) 0;
  text-align: center;
}



/* =============================
   Form Labels & Fields spacing
============================= */

/* 1) Метки остаются блочными, без «gap» */
.form-label {
  display: block;
  margin: 0;
  font-weight: 300;
  font-size: var(--font-small);
  color: #555555;
}

.form-hint {
  font-size: var(--font-xxsmall);
  color: var(--color-muted);
  margin-top: var(--space-8);
}

/* Красная подсказка около кнопки сохранения */
.form-hint.save-hint {
  color: var(--color-danger, red);
  font-size: var(--font-xsmall);
  text-align: center;
  margin-top: var(--space-8);
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* Звёздочка обязательных полей */
.required-star {
  color: var(--color-danger, #dc2626);
  margin-left: 4px;
}

/* 2) Между .form-label и следующим полем (input/select/textarea) — 8px */
.form-label + .form-control,
.form-label + input,
.form-label + select,
.form-label + textarea {
  margin-top: var(--space-8); /* 8px */
}
.form-label + #video-fields {
  margin-top: var(--space-8);
}
#video-fields {
  margin-left: 0;
  margin-right: 0;
}

/* 3) Между «группами» label+field — ваш существующий отступ (например 24px) */
.form-container > * + * {
  margin-top: var(--space-24); /* 24px */
}


/* =============================
   1. Жёсткий размер textarea и отключение ресайза
============================= */
.form-container textarea {
  resize: none;            /* запретить ручное изменение размера */
  height: 160px;           /* фиксированная высота (подберите под ваш дизайн) */
  box-sizing: border-box;  /* чтобы padding не влиял на итоговый размер */
}

/* =============================
   2. Позиционирование счетчика символов внутри textarea
============================= */
.form-label {
  position: relative;      /* контекст для абсолютного позиционирования */
}

/* 1. Делаем лейбл относительно позиционированным */
.form-container .form-label {
  position: relative;      /* контекст для абсолютного позиционирования */
  width: 100%;             /* выравниваем подписи слева */
  text-align: left;
}

/* 2. Счётчик символов в правом нижнем углу */
.char-counter {
  position: absolute;
  bottom: var(--space-8);  /* отступ снизу 8px */
  right: var(--space-8);   /* отступ справа 8px */
  font-size: var(--font-xsmall);
  color: var(--color-muted);
  background: rgba(255,255,255,0.8); /* полупрозрачный фон */
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

/* Выравнивание полей в строке и кнопок по левому краю */
.form-container .form-row {
  width: 360px;
  margin-left: 0;
  margin-right: 0;
  display: flex;
  gap: var(--space-8);
}
.form-container .place-row {
  align-items: center;
}
.place-row #place {
  flex: 1;
  width: auto;
}
.add-venue-btn {
  border: none;
  font-size: var(--font-xlarge);
  color: var(--color-text);
  padding: 0;
}

/* Дополнительный специалист - поля вертикально */
.form-container .extra-row {
  width: var(--control-width);
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.btn-left {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}

/* =============================
   Custom file input
============================= */
input[type="file"].file-input {
  display: none;
}

.file-input + .file-btn {
  margin-top: var(--space-8);
}




/* ==================================
   Header / Register-style avatar
================================== */

/* Контейнер шапки */
.page-header {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 16px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
}

/* Круглый неоморфный аватар-тоггл */
.avatar-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-neu);
  box-shadow:
    5px  5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

/* Hover / active */
.avatar-toggle:hover {
  box-shadow:
    4px  4px  8px var(--shadow-dark),
   -4px -4px  8px var(--shadow-light);
}
.avatar-toggle:active {
  box-shadow:
    inset 4px  4px  8px var(--shadow-dark),
    inset -4px -4px  8px var(--shadow-light);
}

/* Сама картинка внутри */
.avatar-toggle__img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}


/* =============================
   Profile Header Tweaks
============================= */

/* 1) Никнейм — очень мелкий шрифт */
.profile-header .username {
  font-size: var(--font-xsmall);  /* 12px */
  color: var(--color-muted);
  margin-bottom: var(--space-8);
}

/* 2) Бейджи для профессии и города */
.profile-header .role-city .badge {
  display: inline-block;
  font-size: var(--font-xsmall);
  font-weight: 500;
  color: #555555;
  border-radius: var(--radius-pill);
  line-height: 1;
	background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
}


/* =============================
   Profile Header
============================= */

.profile-header {
  text-align: center;              /* 1) выравнивание по центру */
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
}

/* 2) отступ после H1 = 16px */
.profile-header .name {
  margin: 0 0 var(--space-8) 0;
}

/* Ник (мелкий и нейтральный) */
.profile-header .username {
  font-size: var(--font-xsmall);
  color: var(--color-muted);
  margin: 0;
  margin-bottom: 8px;
}

/* Стили для текста со стилем специалиста */
.profile-header .style-text {
  font-size: var(--font-medium);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-8);
	text-shadow: -2px -2px 3px var(--shadow-dark), 2px 2px 3px var(--shadow-light);
}

/* Контейнер для бейджей */
.profile-header .role-city {
  display: flex;
  flex-wrap: wrap;
	margin-top: 16px;
}

/* Стили бейджа, чуть похожие на «Share»-кнопку из референса */
.profile-header .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  font-size: var(--font-small);
  font-weight: 500;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow:
    3px  3px 6px var(--shadow-dark),
   -3px -3px 6px var(--shadow-light);
  transition: box-shadow 0.2s;
}
.profile-header .badge:hover {
  box-shadow:
    2px  2px 4px var(--shadow-dark),
   -2px -2px 4px var(--shadow-light);
}
.profile-header .badge:active {
  box-shadow:
    inset 3px  3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}


/* =============================
   Badges в шапке профиля
============================= */
.profile-header {
  text-align: center; /* уже есть */
}

.profile-header .badge {
  display: inline-block;
  margin: 0 var(--space-8) var(--space-16); /* отступы слева-справа и снизу */
  padding: var(--space-8) var(--space-16);
  font-size: var(--font-xsmall);
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;

  background: var(--bg-neu);
  border-radius: var(--radius-pill);
  box-shadow:
    5px  5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  transition: box-shadow 0.2s;
}
.profile-header .badge:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.profile-header .badge:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.profile-header {
  text-align: center;
}
.profile-header .avatar {
  display: inline-block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-8);
}
.profile-header .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


body {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* user */

.fav-section {
  width: 344px;
  margin: var(--space-24) auto var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: var(--space-12) var(--space-16);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--bg-neu);
  box-shadow:
    5px  5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  font-size: var(--font-medium);
  cursor: pointer;
  transition: box-shadow .2s;
}
.fav-btn:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.fav-btn:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}
.fav-btn .icon {
  width: 24px;
  height: 24px;
  margin-right: var(--space-8);
}
.fav-btn .text {
  font-size: var(--font-small);
}
.fav-btn.active {
  /* розовый градиент при нажатии */
  background: linear-gradient(145deg, #e5c2d4, #f6eaf0);
}
.fav-count {
  margin-top: var(--space-8);
  font-size: var(--font-small);
  color: var(--color-muted);
}





.contact-buttons {
  width: 344px;
  display: flex;
  gap: var(--space-16);
}
.btn-contact {
  flex: 1;
  padding: var(--space-12) 0;
  font-size: var(--font-small);
  text-align: center;
  background: var(--bg-neu);
  box-shadow:
    5px  5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: box-shadow .2s;
}
.btn-contact:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}










.profile-header .badge {
  display: inline-block;
  margin: 0 var(--space-8);
  padding: var(--space-8) var(--space-16);
  font-size: var(--font-small);
  color: var(--color-text);
  background: var(--bg-neu);
  border-radius: var(--radius-pill);
  box-shadow:
    5px  5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  transition: box-shadow .2s;
}
.profile-header .badge:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}


/* Большой аватар в шапке */
.avatar-big {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-neu);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-16) auto;
}
.avatar-big img {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  pointer-events: none;
}


/* Кнопка «В избранное» */
.fav-btn {
  width: 344px;
  background: #dcdcdc;
  color: #555555;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fav-btn:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.fav-btn:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}
.fav-btn.active {
  background: linear-gradient(145deg, #e5c2d4, #f6eaf0);
}
.fav-btn .text {
  font-size: var(--font-medium);
}
.fav-count {
  color: #555555;
  margin-top: var(--space-8);
}

.contact-btn {
  flex: 1;
  background: #ffffff;
  color: #555555;
  padding: var(--space-12);
  border: none;
  border-radius: var(--radius-pill);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.contact-btn:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.contact-btn:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}

.avatar-big img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--bg-neu);
  object-fit: cover;
}

/* —————— Избранное —————— */
.fav-btn {
 background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  color: #555555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-12) var(--space-16);
  font-size: var(--font-small);
  cursor: pointer;
  transition: box-shadow .2s;
}
.fav-btn:hover {
  box-shadow:
    4px 4px 8px var(--shadow-dark),
   -4px -4px 8px var(--shadow-light);
}
.fav-btn:active {
  box-shadow:
    inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
}
.fav-btn.active {
  background: linear-gradient(145deg, #e5c2d4, #f6eaf0);
}
.fav-btn .text {
  color: #555555;
}
.fav-count {
  color: #555555;
  margin-top: var(--space-8);
  text-align: center;
}

.contact-btn {
  flex: 1;
  height: 44px;
  background: #dcdcdc;
  color: #555555;
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--font-small);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .2s;
}
.contact-btn:hover {
  box-shadow:
    4px  4px  8px var(--shadow-dark),
   -4px -4px  8px var(--shadow-light);
}

/* —————— Видео (16:9, выпуклое) —————— */

.video-container {
  position: relative;
  width: 100%;
  max-width: 344px;
  aspect-ratio: 16/9;
  margin: 0 auto 16px;
  background: var(--bg-neu);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}
/* —————— Ссылки в футере одного цвета —————— */
.site-footer a {
  color: #555555;
  text-decoration: underline;
}


/* ————— Большой аватар */
.avatar-big {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--bg-neu);
  box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light);
  overflow: hidden;
  margin: 0 auto 16px;
}
.avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ————— Контактные кнопки */

.contact-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  text-decoration: none !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
}
.contact-buttons .btn {
  box-shadow: 5px 5px 15px var(--shadow-dark), -5px -5px 15px var(--shadow-light);
}


/* ————— Тень у виджета рейтинга */

.rating-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--space-24);
  margin-bottom: var(--space-16); /* меньший отступ снизу */
  padding: var(--space-16);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0); 
  box-shadow:
    6px 6px 20px var(--shadow-dark),
   -6px -6px 12px var(--shadow-light);
  width: 344px;
  height: 490px;
}

/* Блок с брендом в кабинете */
.brand-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  border-radius: var(--radius-card);
  background: none;
  box-shadow: none;
  width: 344px;
  opacity: 0;
  transition: max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.brand-section.expanded {
  max-height: 1000px;
  margin-top: var(--space-16);
  margin-bottom: var(--space-16);
  padding: var(--space-16);
  opacity: 1;
}

/* Контейнер для включения режима бренда */
.brand-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-8);
  margin-bottom: var(--space-16);
  padding: var(--space-16);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  box-shadow: 6px 6px 20px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  width: 344px;
}
/*
.brand-toggle.disabled {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
  cursor: not-allowed;
}
.brand-toggle.disabled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 10;
  pointer-events: all;
  cursor: not-allowed;
}
*/
.brand-avatar-block {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-8);
  box-shadow: 4px 4px 6px var(--shadow-dark), -4px -4px 6px var(--shadow-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-avatar-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ————— Большой размер хедера-аватара */
.avatar-toggle--large {
  width: 96px;
  height: 96px;
}
.avatar-toggle--large .avatar-toggle__img {
  width: 94px;
  height: 94px;
}

/* Средний размер аватара, как в карточке */
.avatar-toggle--card {
  width: 72px;
  height: 72px;
}
.avatar-toggle--card .avatar-toggle__img {
  width: 70px;
  height: 70px;
}


/* :root block удалён, чтобы не переопределять --shadow-dark и --shadow-light */

/* 1. Восстанавливаем контраст бейджей */
.profile-header .badge {
}

/* 2. Возвращаем оформление блока рейтинга */

.radial-progress {
  box-shadow:
    6px 6px 16px var(--shadow-dark),
   -6px -6px 16px var(--shadow-light);
}

/* 4. Отступ после “В избранном у X человека” */
.fav-count {
  margin-bottom: var(--space-8);
}

/* 5. Сильнее тени для кнопок, аватара, видео */
.btn,
.action-btn,
.profile-header .avatar,
.profile-video,
.radial-progress {
  box-shadow:
    6px 6px 20px var(--shadow-dark),
   -6px -6px 12px var(--shadow-light);
	 background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
}

/* ================================
   Дополнительные ваши пункты
   ================================ */


/* A. “Позвонить / Написать / Сайт” – сбрасываем подчёркивание и
   выравниваем текст по центру */
.contact-buttons .btn {
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
}

/* Кнопка выхода из сессии */
.logout-btn {
  color: #ffffff;
  font-weight: 500; /* чуть менее жирный текст */
  background: linear-gradient(145deg, #800020, #b22222);
}

/* Кнопка перезапуска обучения */
.btn-tour {
  color: #ffffff;
  font-weight: 600;
  text-shadow: none;
  background: linear-gradient(145deg, #133D33, #1B5245);
}

/* Поле статуса и кнопка обновления */

/* Поле статуса и кнопка обновления */

.status-wrapper {
  display: flex;
  align-items: center;
  width: var(--control-width, 344px);
  margin: 0 0 var(--space-8);
}

.status-input {
  flex: 1 1 auto;
  width: 100%;
  margin-right: 0;
}

#daily_status {
  flex: 1 1 auto;
  width: 100%;
  margin-right: 0;
}

/* Контейнер для аватарки, используется в карточках и на форме */
.avatar-container {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}


/* сам фон с выпуклыми тенями */
.avatar-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-neu, #F0F0F3);
  box-shadow:
    5px 5px 12px var(--shadow-dark, rgba(0,0,0,0.06)),
    -5px -5px 12px var(--shadow-light, rgba(255,255,255,0.85));
}

/* оригинальный .avatar теперь просто клип-площадка для изображения */
.avatar-container .avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: none; /* убираем старые тени */
}

/* index.php */
.page-title {
  margin-top: 0;
  margin-bottom: 0 !important;
}
.page-subtitle {
  font-size: var(--font-large); /* подобрать стиль по макету */
  text-align: center;
}

/* Сообщение о уже учтённом голосе */
.already-voted-note {
  font-size: var(--font-small);
  text-align: center;
}

/* ==== Legal pages === */
.legal-page {
  font-family: var(--font-base);
  font-size: var(--font-small);
  line-height: 1.6;
  padding: 20px;
  background-color: #f9f9f9;
  color: #333;
}
.legal-logo {
  /* keep same centering as .logo-link */
  margin: 0 auto 20px;
}
.legal-page h1, .legal-page h2 {
  color: #004B56;
  text-align: center;
}
.legal-page h2 {
  margin-top: 1.5em;
  font-size: 18px;
}
.legal-page ul {
  padding-left: 20px;
}
.legal-page a {
  color: #555555;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .legal-page {
    padding: 12px;
    font-size: 15px;
  }
}

/* ==== Not found page === */
.not-found-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f9fafb;
  font-family: sans-serif;
}
.not-found-card {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 400px;
}
.not-found-card h1 {
  margin-bottom: 1rem;
  color: #111827;
}
.not-found-card p {
  margin-bottom: 2rem;
  color: #4b5563;
}

/* --- Filters form (rating & favorites) --- */
.filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0;
}
#feed-filters label {
  margin-right: var(--space-8);
}
#feed-filters label:last-child {
  margin-right: 0;
}
.filter-buttons {
  width: 344px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-8);
}
.filter-buttons select {
  position: relative;
  width: 80px;
  height: 44px;
  border-radius: var(--radius-pill);
  --icon: none;
  background: linear-gradient(145deg, #d2cfd1, #f0edee);
  box-shadow: 5px 5px 10px #bdbdc1,
              -5px -5px 10px #fff;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 0;
  color: transparent;
  cursor: pointer;
  transition: box-shadow .2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.filter-buttons select::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  background: var(--icon) center/contain no-repeat;
  filter: drop-shadow(-2px -2px 2px #bdbdc1)
          drop-shadow(2px 2px 2px #fff);
  pointer-events: none;
}
.filter-buttons select:focus,
.filter-buttons select:active,
.filter-buttons select.selected {
  box-shadow: inset 4px 4px 8px #bdbdc1,
              inset -4px -4px 8px #fff;
  background: linear-gradient(145deg, #f0edee, #d2cfd1);
}

.filter-buttons select[name="profession"] { --icon: url('/assets/prof.png'); }
.filter-buttons select[name="city"]       { --icon: url('/assets/location.png'); }
.filter-buttons select[name="segment"]    { --icon: url('/assets/segment.png'); }
.filter-buttons select[name="sort"]       { --icon: url('/assets/sort.png'); }

/* --- Favorites groups --- */
.fav-group {
  width: 344px;
  margin: var(--space-24) auto;
  padding: var(--space-16);
  background: var(--bg-neu);
  box-shadow:
    5px 5px 10px var(--shadow-dark),
   -5px -5px 10px var(--shadow-light);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fav-prof-title {
  width: 100%;
  margin: 0 0 var(--space-8);
  font-size: var(--font-large);
  font-weight: 700;
  color: #555555;
  text-align: center;
}

/* Заголовки ролей на странице просмотра события */
.profession-title {
  width: 100%;
  margin: var(--space-16) 0;
  font-size: var(--font-large);
  font-weight: 700;
  color: #555555;
  text-align: center;
}

/* ==== Demo page === */
.demo-body {
  font-family: sans-serif;
  padding: 2rem;
}
.demo-body label {
  display: block;
  margin: .5rem 0;
}
.demo-body input {
  width: 100%;
  padding: .5rem;
  margin-top: .25rem;
}
.demo-body button {
  margin-top: 1rem;
  padding: .5rem 1rem;
}
.demo-body pre {
  background: #f4f4f4;
  padding: 1rem;
  margin-top: 1rem;
}

/* Шаги формы создания мероприятия */
.step { display: none; }
.step.active { display: block; }


/* ==== Summary block on create_event === */
.event-summary {
  margin: var(--space-16) 0;
  padding: var(--space-16);
  width: 100%;
  max-width: var(--control-width, 344px);
  text-align: center;
  background: var(--bg-neu);
  border-radius: var(--radius-card);
  box-shadow: 5px 5px 10px var(--shadow-dark),
              -5px -5px 10px var(--shadow-light);

}


/* Контейнер для дополнительных специалистов на шаге 5 */
#extra-container {
  width: 100%;
  max-width: 344px;
  margin-left: auto;
  margin-right: auto;
}

/* Сообщения об успешном действии */
.success-message {
  width: 100%;
  max-width: 344px;
  margin: var(--space-16) auto;
  padding: var(--space-16);
  text-align: center;
  background: var(--bg-neu);
  border-radius: var(--radius-card);
  box-shadow: 5px 5px 10px var(--shadow-dark),
              -5px -5px 10px var(--shadow-light);
  font-size: var(--font-medium);
}


/* Таймер обратного отсчёта */
.countdown {
  font-size: var(--font-medium);
  margin-bottom: var(--space-16);
}

/* Ежедневный статус специалиста */
.daily-status {
  margin-top: var(--space-8);
  font-size: 14px;
  color: var(--color-primary, #006897);
  word-break: break-word;
}

/* Статус в блоке рейтинга */
.radial-wrapper {
  position: relative;
}
.status-bubble {
  position: absolute;
  top: -8px;
  right: -8px;
  max-width: 10ch;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
  background: var(--bg-neu, #F0F0F3);
  border-radius: var(--radius-pill, 16px);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2), -2px -2px 4px rgba(255,255,255,0.8);
  text-align: center;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  z-index: 3;
}

/* Pinned badges */
.pinned-badges {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 0 0 var(--space-8,8px);
}
.pinned-badges .badge-icon,
.pinned-badges .badge-placeholder {
  width: 24px;
  height: 24px;
  display: inline-block;
}
.pinned-badges .badge-icon {
  object-fit: contain;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  padding: 16px;
  width: var(--control-width);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.modal button {
  width: 100%;
}
.modal input,
.modal select,
.modal textarea {
  width: 100%;
}

/* =============================
   Feed card styles
============================= */
.card, .card * {
  margin: 0;
  padding: 0;
}
.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 344px;
  margin: 0 auto;
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  box-shadow:
    5px 5px 12px var(--shadow-dark, rgba(0,0,0,0.06)),
    -5px -5px 12px var(--shadow-light, rgba(255,255,255,0.85));
  border-radius: var(--radius-card, 20px);
  padding: 16px 12px;
  box-sizing: border-box;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none !important;
  color: inherit;
}
.card:hover {
  transform: translateY(-2px);
  text-decoration: none !important;
  box-shadow:
    3px 3px 8px var(--shadow-dark, rgba(0,0,0,0.06)),
    -3px -3px 8px var(--shadow-light, rgba(255,255,255,0.85));
}
.card:active {
  transform: translateY(2px);
  box-shadow:
    inset 4px 4px 12px var(--shadow-dark, rgba(0,0,0,0.06)),
    inset -4px -4px 12px var(--shadow-light, rgba(255,255,255,0.85));
}
.avatar-container {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.avatar-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-neu, #F0F0F3);
  box-shadow:
    5px 5px 12px var(--shadow-dark, rgba(0,0,0,0.5)),
    -5px -5px 12px var(--shadow-light, rgba(255,255,255,1));
}
.avatar-container .avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #efefef;
  box-sizing: border-box;
}
.avatar-container .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.info {
  flex: 1 1 auto;
  margin: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.info .name {
  font-size: 16px;
  font-weight: 700;
  color: #555555;
  margin: 0;
  text-shadow:
    2px  2px 3px var(--shadow-dark),
   -2px -2px 5px var(--shadow-light);
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.info .sub {
  font-size: 12px;
  color: var(--color-text, #555555);
  margin: 0;
}
.stats-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.stat-item { 
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-muted, #888888);
}
.stat-item.favorites .heart-icon::before { content: "\2764"; font-size: 8px; }
.like-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.like-btn.active .heart-icon {
  color: #dc2626;
}
.radial-wrapper {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.outer-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gradient-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(farthest-side, transparent 78%, black 79%);
  mask-image: radial-gradient(farthest-side, transparent 78%, black 79%);
}
.center-island {
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, #d4d4d4, #f0f0f0);
  border-radius: 50%;
  z-index: 2;
  box-shadow:
    6px 6px 12px rgba(0,0,0,0.5),
    -6px -6px 16px rgba(255,255,255,1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring-label {
  font-size: 20px;
  font-weight: 600;
  text-shadow:
    -2px -2px 3px var(--shadow-dark, rgba(0,0,0,0.3)),
    2px 2px 3px var(--shadow-light, rgba(255,255,255,0.8));
}



.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.2); /* полупрозрачный затемнённый фон */
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay > * {
  z-index: 1000;
}

/* Stats page */
.stats-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px 48px;
  background: #f7f7fb;
  min-height: calc(100vh - 120px);
}

.stats-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

.stats-subtitle {
  margin: 0;
  color: #6b7280;
  max-width: 520px;
}

.stats-alert {
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(248, 113, 113, 0.2);
  color: #b91c1c;
  font-weight: 500;
}

.stats-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 55px rgba(15, 23, 42, 0.12);
}

.stats-card__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.stats-card__value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
}

.stats-card__hint {
  font-size: 13px;
  color: #6b7280;
}

.stats-card--trend .stats-card__value,
.stats-card--trend .stats-card__hint {
  color: #0f766e;
}

.stats-card--votes .stats-card__value {
  color: #6366f1;
}

.stats-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-section__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-section__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.stats-section__description {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.stats-section__body {
  position: relative;
  min-height: 280px;
}

.stats-chart {
  width: 100%;
  height: 100%;
}

.stats-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.95));
  border-radius: 16px;
}

@media (max-width: 768px) {
  .stats-page {
    padding: 24px 12px 40px;
  }

  .stats-card {
    padding: 16px;
  }

  .stats-card__value {
    font-size: 26px;
  }

  .stats-section {
    padding: 20px;
  }
}

/* Extended stats blocks */
.stats-kpis,
.stats-grid {
  display: grid;
  gap: 12px;
}

.stats-kpis {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stats-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stats-kpi,
.stats-mini-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
}

.stats-kpi__label,
.stats-mini-card__title {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
}

.stats-kpi__value,
.stats-mini-card__value {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.stats-mini-card__value {
  margin-bottom: 0;
}

.stats-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.stats-table th,
.stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 14px;
}

.stats-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}

.stats-table__empty {
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 980px) {
  .stats-grid--4,
  .stats-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .stats-grid--2,
  .stats-grid--3,
  .stats-grid--4,
  .stats-kpis {
    grid-template-columns: 1fr;
  }

  .stats-grid--stack-mobile {
    grid-template-columns: 1fr;
  }
}
