@import url('auth-otp.css?v=202607081248');

:root {
  --primary: #0F172A;
  --accent: #DC2626;
  --accent-hover: #B91C1C;
  --whatsapp: #25D366;
  --telegram: #2563EB;
  --orange: #D97706;
  --white: #FFFFFF;
  --light: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1F2937;
  --text-muted: #4B5563;
  --dark: #0F172A;
  --border: #E2E8F0;
  --focus-ring: rgba(220, 38, 38, 0.15);
  --bg-page: linear-gradient(135deg, #E2E8F0 0%, #F8FAFC 40%, #FFFFFF 100%);
  --card-border: rgba(226, 232, 240, 0.6);
  --card-radius: 16px;
  --card-edge-gradient: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.55) 0%,
    rgba(226, 232, 240, 0.15) 40%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(148, 163, 184, 0.35) 100%
  );
  --card-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 12px 25px rgba(0, 0, 0, 0.12);
  --header-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --modal-form-width: 560px;
  color-scheme: light;
  --font-heading: 'PT Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --header-logo-gap: 40px;
  --header-item-gap: 1rem;
  /* 7 элементов в toolbar (бургер → контакты → мессенджеры → поиск → ЛК): 6 равных промежутков */
  --header-toolbar-item-count: 8;
  --header-toolbar-even-gap: clamp(0.5rem, calc((100% - 36rem) / (var(--header-toolbar-item-count) - 1)), 2rem);
  --header-icon-size: 20px;
  --header-control-h: 32px;
  --header-call-btn-w: 8.5rem;
  --header-user-btn-w: 12.5rem;
  --header-bar-h: calc(0.75rem + 44px + 0.75rem + 1px);
  --header-h: var(--header-bar-h);
  --icon-text-gap: 0.5rem;
  --icon-text-gap-tight: 0.4rem;
  --hero-bg-position: center 75%;
  --hero-top-gap: 0px;
  --hero-min-height: 400px;
  --hero-theme-toggle-gap: 0.75rem;

  /* Отступ от шапки и до футера */
  --page-top-gap: 25px;
  --content-gap-top: 25px;
  --page-top-gap-mobile: 25px;
  --theme-toggle-top-gap: 25px;
  --section-inner-gap: 32px;
  --section-footer-gap: 50px;
  --section-footer-gap-mobile: 30px;

  /* Внутренние отступы */
  --container-padding: 20px;
  --card-gap: 16px;
  --heading-gap: 16px;
  --card-padding: 1.25rem;
  --section-y: var(--section-inner-gap);
  --subsection-gap: var(--section-inner-gap);
  --container-padding-mobile: 12px;
  --container-padding-tight: 10px;
  --card-gap-mobile: 12px;

  /* Breakpoints (документация + JS; в @media — литералы 375/480/768/900/1320) */
  --breakpoint-narrow: 375px;
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
  --breakpoint-wide: 1320px;

  /* Алиасы */
  --page-edge-gap: var(--page-top-gap);
  --section-gap: var(--page-top-gap);
  --footer-gap: var(--section-footer-gap);
  --section-title-gap: var(--heading-gap);
  --section-gap-mobile: var(--page-top-gap-mobile);
  --content-max: 1100px;

  /* Типографика (база для rem + body); −2pt от предыдущей шкалы */
  --font-size-root: 13px;
  --font-size-body: 13px;
  --font-size-body-sm: 12px;
  --font-size-body-xs: 12px;
  --font-size-h1: clamp(1.3rem, 3vw, 1.6rem);
  --font-size-h2: clamp(1.2rem, 2.8vw, 1.45rem);
  --font-size-h3: clamp(1rem, 2.2vw, 1.15rem);
  --font-size-lead: clamp(0.88rem, 2vw, 0.95rem);
  --font-size-small: 0.875rem;
  --font-size-caption: 0.8rem;
}

@font-face {
  font-family: 'PT Sans';
  src: url('../fonts/PT_Sans/PTSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PT Sans';
  src: url('../fonts/PT_Sans/PTSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter/Inter-VariableFont.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: var(--font-size-root);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

/* Иконки шапки/кнопок — не растягивать по max-width родителя */
.icon,
.theme-toggle-icon,
.logo-mark,
.btn .icon,
.header .icon {
  max-width: none;
  height: auto;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  :root {
    --container-padding: var(--container-padding-mobile);
    --font-size-root: 12px;
    --font-size-body: var(--font-size-body-sm);
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: var(--container-padding-tight);
    --font-size-root: 12px;
    --font-size-body: var(--font-size-body-xs);
  }
}

/* ==================== ОТСТУПЫ КРАЁВ СТРАНИЦЫ ==================== */
/* 25px от шапки до контента (кроме главной с hero и ЛК) */
body.site-layout-inner:not(.site-layout-account) > main:not(#account-page):not(.account-page):not(:has(> .hero:first-child)),
body > main.page-section:not(.account-page),
body > main.create-listing-page,
body > main[data-page="marketplace"],
body > main[data-page="dashboard"] {
  padding-top: calc(var(--header-bar-h) + var(--content-gap-top));
}

/* ЛК: отдельный shell, ровно 25px от низа fixed-шапки до первой карточки */
body.site-layout-account > main#account-page.account-shell,
body[data-page="account"] > main#account-page.account-shell,
main#account-page.account-shell,
body.page-account > main#account-page.account-shell {
  padding-top: calc(var(--header-bar-h) + var(--content-gap-top));
}

body > main > section:not(:first-child):not(.page-section) {
  padding-top: var(--section-y);
}

main {
  position: relative;
  isolation: isolate;
  flex: 1;
  padding-bottom: var(--section-footer-gap);
  background: var(--bg-page);
}

main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Точечный паттерн на всю площадь main (не шапка/футер) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3' viewBox='0 0 3 3'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='%2394a3b8' fill-opacity='0.42'/%3E%3C/svg%3E");
  background-size: 3px 3px;
  background-repeat: repeat;
}

main > * {
  position: relative;
  z-index: 1;
}

/* Если контент в секциях — 50px на последней секции, не на main */
main:has(> section) {
  padding-bottom: 0;
}

body > main > section:not(:last-child):not(.hero) {
  padding-bottom: var(--section-inner-gap);
}

body > main > section:last-child,
section.page-section,
main.page-section,
main.create-listing-page,
main.dashboard-page > section.page-section {
  padding-bottom: var(--section-footer-gap);
}

.dashboard-page .container {
  max-width: 1200px;
}

.create-listing-page .container {
  max-width: 800px;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

svg {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.service-card-image,
.vacancy-card-image,
.team-photo-wrapper,
.listing-card-image,
.listing-card__image {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* ==================== ШАПКА ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0.75rem 0;
  box-shadow: var(--header-shadow);
}

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

.header-inner > .logo,
.header-toolbar > :not(.header-phone-dropdown):not(.nav-wrapper) {
  transform: translateY(-4px);
}

.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--primary);
  font-family: var(--font-heading);
  text-decoration: none;
}

.logo-mark,
.logo img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo .custom-logo-link {
  display: inline-flex;
  line-height: 0;
}

.logo .custom-logo {
  max-height: 40px;
  width: auto;
  height: auto;
}

.header-toolbar {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  margin-left: var(--header-logo-gap);
  justify-content: space-between;
  gap: var(--header-toolbar-even-gap);
}

.nav-wrapper {
  position: relative;
  flex-shrink: 0;
  margin-left: 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--section-title-gap);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-nav a {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.85;
  transition: color 0.2s, background 0.2s;
  border-radius: 4px;
  padding: 0.1rem 0.25rem;
  margin: -0.1rem -0.25rem;
}

.footer-nav a:hover,
.footer-nav a.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.footer-nav a.is-active {
  font-weight: 400;
}

.burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.burger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: 0.3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: var(--white);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  width: max-content;
  min-width: unset;
  z-index: 1001;
  overflow: hidden;
}

.nav-dropdown.active {
  display: flex;
}

.nav-dropdown a {
  padding: 9px 16px;
  text-align: center;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  font-size: 0.95rem;
  color: var(--text);
  border: none;
  border-radius: 0;
  margin: 0;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  background: var(--light);
  color: var(--text);
}

/* Затемнение при открытом бургер-меню (мобильный drawer).
   Важно: backdrop НЕ должен быть выше .header — иначе меню (внутри header)
   оказывается под затемнением из‑за stacking context. */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .header {
  z-index: 1002;
}

body.nav-open .nav-backdrop {
  display: block;
}

.header-toolbar>.nav-wrapper,
.header-toolbar>.header-contact,
.header-toolbar>.header-phone-dropdown,
.header-toolbar>.header-messenger,
.header-toolbar>.header-search {
  flex-shrink: 0;
}

.header-toolbar>#header-auth-slot,
.header-toolbar>.header-auth {
  flex-shrink: 0;
}

.theme-toggle-float {
  position: absolute;
  top: calc(var(--header-bar-h) + var(--theme-toggle-top-gap));
  /* Правый край = правый край кнопки «Личный кабинет» (container + padding) */
  right: max(
    var(--container-padding),
    calc((100% - var(--content-max)) / 2 + var(--container-padding))
  );
  left: auto;
  width: max-content;
  transform: none;
  z-index: 900;
  pointer-events: none;
  height: 0;
  overflow: visible;
}

body.site-layout-home .theme-toggle-float,
body.home .theme-toggle-float {
  top: calc(var(--header-bar-h) + var(--hero-theme-toggle-gap));
}

.theme-toggle-float .theme-toggle {
  pointer-events: auto;
  box-shadow: var(--header-shadow);
  background: var(--surface);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  height: var(--header-control-h);
  min-height: var(--header-control-h);
  padding: 0 0.65rem 0 0.45rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--light);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.theme-toggle-label {
  display: inline;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
  line-height: 1;
  white-space: nowrap;
}

html:not([data-theme="dark"]) .theme-toggle-icon--moon,
[data-theme="dark"] .theme-toggle-icon--sun {
  display: none;
}

/* Смартфоны: переключатель темы скрыт */
@media (max-width: 768px) {
  .theme-toggle-float {
    display: none !important;
  }
}

.header-phone-dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  width: fit-content;
}

.btn-phone,
.btn.btn-phone {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0 0.75rem;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: var(--header-control-h);
  min-height: var(--header-control-h);
  box-sizing: border-box;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
  width: auto;
}

.btn-phone .icon,
.btn.btn-phone .icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
}

.btn-phone:hover,
.btn.btn-phone:hover {
  background: var(--light);
  color: var(--primary);
  border-color: var(--primary);
  transform: none;
}

.phone-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  transform: none;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  flex-direction: column;
  z-index: 1001;
  padding: 0;
  overflow: hidden;
}

.phone-dropdown-menu[hidden] {
  display: none !important;
}

.phone-dropdown-menu:not([hidden]) {
  display: flex;
}

.phone-dropdown-menu a,
.header-phone-dropdown .phone-dropdown-menu .phone-link {
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  border: none;
  border-radius: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: var(--font-body);
}

.phone-dropdown-menu a:hover,
.header-phone-dropdown .phone-dropdown-menu .phone-link:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent);
}

@media (max-width: 768px) {
  .phone-dropdown-menu a,
  .header-phone-dropdown .phone-dropdown-menu .phone-link {
    font-size: 12px;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  .phone-dropdown-menu a,
  .header-phone-dropdown .phone-dropdown-menu .phone-link {
    font-size: 12px;
  }
}

.header-search {
  position: relative;
  flex-shrink: 0;
}

.search-icon-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-icon-btn:hover {
  color: var(--accent);
}

.header-contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 1;
  min-width: 0;
}

.header-contact .contact-text {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1320px) {
  .header-contact .contact-text {
    display: none;
  }
}

.header-contact:hover {
  color: var(--accent);
}

.header-messenger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-control-h);
  height: var(--header-control-h);
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.header-messenger:hover {
  transform: translateY(-2px);
}

.icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

.header-toolbar .icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
}

.card .icon,
.map-placeholder .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 0.7rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#site-search {
  padding: 0 2.5rem 0 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  width: 150px;
  height: var(--header-control-h);
  box-sizing: border-box;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#site-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

#site-search::placeholder {
  color: var(--text-muted);
}

.site-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  width: max(100%, 320px);
  min-width: 320px;
  z-index: 1200;
  max-height: min(420px, 60vh);
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 0.35rem 0;
}

.site-search-group {
  padding: 0.45rem 0.85rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
}

.site-search-item:hover,
.site-search-item:focus-visible {
  background: rgba(220, 38, 38, 0.08);
  outline: none;
}

.site-search-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
}

.site-search-item-meta {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-search-empty {
  padding: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-search-mark {
  background: rgba(220, 38, 38, 0.18);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}

[data-theme="dark"] .site-search-results {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ==================== HERO & СТРАНИЦЫ ==================== */
body.site-layout-home > main,
body.home > main,
body.site-layout-inner:not(.site-layout-account) > main:not(#account-page):not(.account-page):has(> .hero:first-child),
body > main:has(> .hero:first-child) {
  padding-top: 0;
}

main > .hero:first-child {
  margin-top: 0;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: var(--hero-min-height);
  padding: var(--header-bar-h) 0 2rem;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../images/hero-mining-equipment.jpg');
  background-size: cover;
  background-position: center 75%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.72) 55%,
    rgba(15, 23, 42, 0.78) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  row-gap: 0.75rem;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.page-intro {
  text-align: center;
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  color: var(--text-muted);
  font-size: var(--font-size-lead);
}

main h1 {
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  text-align: center;
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: var(--font-size-h1);
  line-height: 1.3;
}

.page-section .grid + h3.section-title,
main.page-section .grid + h3.section-title,
section.page-section .grid + h3.section-title {
  margin-top: var(--subsection-gap);
}

.page-centered {
  text-align: center;
}

.page-centered .dashboard-hint {
  margin-top: var(--section-title-gap);
}

.section-title,
main > section:not(.hero) > h2:first-child,
main > section:not(.hero) > .container > h2:first-child,
main > section:not(.hero).container > h2:first-child {
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
}

.section-title {
  text-align: center;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
}

main > section:not(.hero) > h2:first-child,
main > section:not(.hero) > .container > h2:first-child,
main > section:not(.hero).container > h2:first-child {
  font-size: var(--font-size-h2);
}

.hero-vacancies-link {
  display: block;
  width: 100%;
  margin: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.hero-vacancies-link:hover,
.hero-vacancies-link:focus-visible {
  color: inherit;
}

.hero-vacancies-link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero h1 {
  font-size: var(--font-size-h1);
  margin-bottom: 0.45rem;
  color: var(--white);
  font-family: var(--font-heading);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.25;
}

.hero-vacancies-link p {
  margin-bottom: 0;
}

.hero p {
  font-size: var(--font-size-lead);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.45;
}

.hero-buttons {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: calc(0.5rem + 30px);
}

.hero-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.hero-buttons .btn-outline {
  border-width: 1px;
}

.features,
.team-section {
  margin: 0;
}

body > main > section.team-section:last-child,
body > main > section.features:last-child {
  padding-bottom: var(--section-footer-gap);
}

/* Градиентная черта между секциями (затухает к краям контейнера) */
main > section + section::before {
  content: '';
  display: block;
  width: 100%;
  max-width: var(--content-max);
  height: 1px;
  margin: 0 auto var(--section-inner-gap);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 163, 184, 0.45) 14%,
    rgba(100, 116, 139, 0.65) 50%,
    rgba(148, 163, 184, 0.45) 86%,
    transparent 100%
  );
}

h2 {
  text-align: center;
  font-size: var(--font-size-h2);
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  color: var(--primary);
  font-family: var(--font-heading);
  line-height: 1.3;
}

h3 {
  margin-top: 0;
  line-height: 1.3;
}

/* ==================== Блок «Почему выбирают нас» ==================== */
.features {
  background: transparent;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.features > .container > h2 {
  color: var(--primary);
  font-size: var(--font-size-h2);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.features-grid {
  --features-count: 3;
  --features-gap: var(--card-gap);
  display: grid;
  grid-template-columns: repeat(var(--features-count), minmax(0, 1fr));
  column-gap: var(--features-gap);
  row-gap: var(--features-gap);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.features-grid > .card {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.65rem;
  box-sizing: border-box;
  margin: 0;
  background: var(--light);
  padding: 1.35rem 1.15rem;
  text-align: center;
}

.features-grid > .card h3 {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.55rem;
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
  text-wrap: balance;
}

.features-grid > .card h3 .icon {
  width: 28px;
  height: 28px;
}

.features-grid > .card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  text-wrap: pretty;
}

.features .container,
.header-inner.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

[data-theme="dark"] .features {
  background: transparent;
}

[data-theme="dark"] .features-grid > .card {
  background: rgba(15, 23, 42, 0.45);
}

[data-theme="dark"] .features-grid > .card p {
  color: var(--text);
}

/* ==================== КАРТОЧКИ (общие сетки) ==================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--card-gap);
}

.card,
.team-card,
.listing-card,
.marketplace-toolbar,
.service-card--clickable,
.vacancy-card {
  position: relative;
  isolation: isolate;
  border: none;
  border-radius: var(--card-radius);
}

.card::after,
.listing-card::after,
.marketplace-toolbar::after,
.service-card--clickable::after,
.vacancy-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--card-edge-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.card {
  background: var(--surface);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-shadow-hover);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--primary);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.05rem;
}

.card h3 .icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  margin: 0;
}

.vacancy-card {
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
}

.vacancy-card--clickable {
  text-decoration: none;
  color: inherit;
  display: block;
}

.vacancy-card--clickable:hover,
.vacancy-card:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.vacancy-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--card-gap);
}

.vacancies-main-title {
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
}

.vacancies-page .page-intro {
  margin-bottom: var(--section-inner-gap);
  color: var(--text-muted);
  font-size: 1.05rem;
}

.vacancies-categories {
  margin-bottom: var(--section-inner-gap);
}

.vacancy-category-title {
  margin-top: var(--subsection-gap);
  margin-bottom: var(--card-gap);
  font-size: 1.3rem;
  color: var(--primary);
  font-family: var(--font-heading);
}

.vacancies-categories:first-of-type .vacancy-category-title {
  margin-top: var(--section-inner-gap);
}

.vacancy-card-image {
  height: 200px;
  background-size: cover;
  background-position: center top;
  background-color: var(--primary);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.vacancy-card--clickable:hover .vacancy-card-image,
.vacancy-card:hover .vacancy-card-image {
  background-position: center top;
}

.vacancy-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.6) 40%,
    rgba(15, 23, 42, 0.2) 70%,
    transparent 100%
  );
}

.vacancy-card-image .vacancy-card-title,
.vacancy-card-image h3.vacancy-card-title {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-size: 1.25rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

.vacancy-card-image[style*="background-image: url('')"] {
  background-image: none !important;
}

.vacancy-card-image[style*="background-image: url('')"],
.vacancy-card-image--fallback {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* ==================== КАРТОЧКИ УСЛУГ (как в вакансиях) ==================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--card-gap);
  width: 100%;
}

.service-card--clickable {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.service-card--clickable:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.service-card-image {
  height: 220px;
  background-size: cover;
  background-position: center top;
  background-color: var(--primary);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  position: relative;
  width: 100%;
}

.service-card--clickable:hover .service-card-image {
  background-position: center top;
}

.service-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.6) 40%,
    rgba(15, 23, 42, 0.2) 70%,
    transparent 100%
  );
}

.service-card-image h3 {
  position: relative;
  z-index: 2;
  color: var(--white);
  font-size: 1.3rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

.service-card-description {
  padding: 1.25rem;
  background: var(--surface);
}

.service-card-description p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.service-card-image[style*="background-image: url('')"],
.service-card-image:not([style*="background-image"]) {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

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

  .service-card-image {
    height: 180px;
  }

  .service-card-image h3 {
    font-size: 1.15rem;
  }
}

.vacancy-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.vacancy-card .card-body {
  padding: 1.2rem;
}

@media (max-width: 768px) {
  .vacancy-cards-grid {
    grid-template-columns: 1fr;
  }

  .vacancy-card-image {
    height: 180px;
  }

  .vacancy-card-image .vacancy-card-title,
  .vacancy-card-image h3.vacancy-card-title {
    font-size: 1.15rem;
  }
}

/* ==================== КНОПКИ ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  font-family: var(--font-heading);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline-dark {
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-dark:hover {
  background: var(--light);
  transform: translateY(-1px);
}

/* ==================== ФОРМЫ ==================== */
section:not(.page-section):not(.hero) {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.contact-form {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 500;
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  transition: border-color 0.2s;
  min-height: 44px;
  font-family: var(--font-body);
}

.contact-form select {
  cursor: pointer;
  appearance: auto;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Страницы с заявками — заголовок по центру */
main.page-section > .container > h2:first-child {
  text-align: center;
  color: var(--primary);
  font-family: var(--font-heading);
}

/* Заявки — единая ширина и центрирование как на /contacts/ */
main.page-section > .container > .contact-form:not(.auth-form):not(.auth-otp-form):not(.contact-form--modal),
main.create-listing-page > .container > .contact-form:not(.auth-form):not(.auth-otp-form),
.listing-form-section > .contact-form:not(.auth-form):not(.auth-otp-form),
.contact-form--modal:not(.auth-form):not(.auth-otp-form),
.guest-contact-body > .contact-form:not(.auth-form):not(.auth-otp-form),
.modal-ad-body.contact-form:not(.auth-form):not(.auth-otp-form) {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form:not(.auth-form):not(.auth-otp-form) > .btn[type="submit"],
.contact-form:not(.auth-form):not(.auth-otp-form) > .btn.btn-primary,
.contact-form:not(.auth-form):not(.auth-otp-form) > .btn.btn-outline-dark,
.contact-form:not(.auth-form):not(.auth-otp-form) .form-actions .btn,
.contact-form:not(.auth-form):not(.auth-otp-form) .create-listing-actions .btn,
.contact-form:not(.auth-form):not(.auth-otp-form) .listing-form-actions .btn {
  align-self: stretch;
  width: 100%;
  min-width: 0;
}

.contact-form:not(.auth-form):not(.auth-otp-form) .form-actions,
.contact-form:not(.auth-form):not(.auth-otp-form) .create-listing-actions,
.contact-form:not(.auth-form):not(.auth-otp-form) .listing-form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.25rem;
}

.contact-form:not(.auth-form):not(.auth-otp-form) .form-actions--row,
.contact-form:not(.auth-form):not(.auth-otp-form) .create-listing-actions,
.contact-form:not(.auth-form):not(.auth-otp-form) .listing-form-actions {
  flex-direction: row;
}

.contact-form:not(.auth-form):not(.auth-otp-form) .form-actions--row .btn,
.contact-form:not(.auth-form):not(.auth-otp-form) .create-listing-actions .btn,
.contact-form:not(.auth-form):not(.auth-otp-form) .listing-form-actions .btn {
  flex: 1 1 0;
  width: auto;
}

/* ==================== КОНТАКТЫ ==================== */
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  padding: 0.4rem 0.7rem;
  border-radius: 5px;
  transition: background 0.2s;
  font-family: var(--font-heading);
}

.phone-link:hover {
  background: var(--light);
}

.contacts-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--card-gap);
  justify-content: center;
  margin-top: 0;
  padding-top: 0;
}

.contact-person {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 1.3rem;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.contact-person h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.contact-person p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.contact-person .btn {
  margin-top: 0.5rem;
  width: 100%;
  max-width: 180px;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
}

/* ==================== ФУТЕР ==================== */
.footer {
  background: var(--dark);
  color: #CBD5E1;
  padding: 0 0 1rem;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(115px, 0.75fr) minmax(180px, 0.95fr) minmax(320px, 1.75fr) minmax(200px, 1.15fr);
  grid-template-rows: auto auto;
  gap: var(--card-gap);
  margin-bottom: 0.75rem;
  padding-top: 2rem;
  align-items: stretch;
}

.footer-col--address {
  min-width: 0;
  overflow: hidden;
}

.footer-col {
  width: 100%;
  min-width: 0;
}

.footer-col--contacts {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.footer-contacts-main {
  flex: 1;
}

.footer-col--map {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  grid-column: 4;
  grid-row: 1 / span 2;
}

.footer-important-band {
  grid-column: 1 / 4;
  grid-row: 2;
  align-self: end;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid #334155;
  border-bottom: 1px solid #334155;
  box-sizing: border-box;
}

.footer-col--map .map-container {
  flex: 1;
  min-height: 0;
  display: flex;
}

.footer-col--map .map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100px;
  border: 0;
}

.footer-col h3 {
  color: var(--white);
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  width: 100%;
  opacity: 1;
}

.footer-col p {
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  width: 100%;
}

.footer-nav {
  width: 100%;
}

.footer-contacts-main p {
  opacity: 0.85;
}

.footer-col .phone-link,
.footer-col .footer-email-link {
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  text-decoration: none;
  border-radius: 0;
  transition: opacity 0.2s;
}

.footer-col .phone-link:hover,
.footer-col .footer-email-link:hover {
  color: inherit;
  background: transparent;
  opacity: 1;
}

.footer-col .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-address {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.35;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 0;
}

.footer-address-text {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.footer-address-line {
  display: block;
  hyphens: none;
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: nowrap;
  overflow: hidden;
  font-size: clamp(0.68rem, 0.82vw, 0.82rem);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.footer-address .icon {
  margin-top: 0;
  align-self: center;
  flex-shrink: 0;
  transform: none;
}

.footer-important {
  margin: 0;
  padding: 0;
  border: none;
  font-weight: 400;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
}

.footer-important-label {
  flex-shrink: 0;
  opacity: 0.85;
}

.footer-important-person {
  color: var(--white);
  font-weight: 400;
  font-family: var(--font-body);
  font-size: 0.95rem;
  opacity: 0.85;
}

.footer-important-band .phone-link {
  color: var(--white);
  padding: 0;
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.85;
}

.footer-important-band .phone-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}

.footer-bottom {
  padding-top: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ==================== ВИДЖЕТЫ ==================== */
.chat-widget {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
}

.chat-button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.chat-button:hover {
  transform: scale(1.08);
}

.chat-window {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 290px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-window.active {
  display: flex;
}

.chat-header {
  background: var(--primary);
  color: var(--white);
  padding: 0.9rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.chat-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.chat-body {
  padding: 0.9rem;
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.95rem;
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.chat-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}

.chat-option:hover {
  border-color: var(--accent);
  background: var(--light);
}

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--content-max, 1100px);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--accent);
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text);
}

.cookie-banner.active {
  display: flex;
}

.cookie-banner__inner {
  width: 100%;
}

.cookie-banner p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.cookie-banner a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-banner .hero-buttons {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.35rem; /* запас под translateY на :hover */
}

.cookie-banner .hero-buttons .btn {
  min-width: 8rem;
  box-sizing: border-box;
  padding: 0.65rem 1.25rem;
  min-height: 44px;
}

.cookie-banner .hero-buttons .btn:hover {
  transform: translateY(-1px);
}

.cookie-banner .hero-buttons .btn-primary:hover,
.cookie-banner .cookie-btn:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.cookie-banner .hero-buttons .btn-outline-dark:hover {
  background: var(--light);
  border-color: var(--primary);
  color: var(--primary);
}

.cookie-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  border-radius: 7px;
  font-weight: 600;
  box-sizing: border-box;
}

.cookie-btn:hover {
  background: var(--accent-hover);
}

.consent-checkbox {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
}

.consent-checkbox input[type='checkbox'] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.consent-checkbox label,
.consent-checkbox .consent-checkbox__label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

.consent-checkbox label a,
.consent-checkbox .consent-checkbox__label a {
  color: var(--accent);
  text-decoration: underline;
}

.consent-checkbox.is-error,
.consent-checkbox.error {
  border-color: var(--accent);
  background: #fff5f5;
}

.consent-error-text {
  color: var(--accent);
  font-size: 13px;
  margin-top: 0.25rem;
  display: block;
  width: 100%;
}

@media (max-width: 768px) {
  .cookie-banner {
    max-width: 95%;
    padding: 1rem;
    bottom: 10px;
  }

  .cookie-banner .hero-buttons .btn {
    padding: 0.6rem 1.1rem;
  }
}

/* ==================== ПРОДАЖИ (MARKETPLACE) ==================== */
.marketplace-section {
  --mp-pad-y: 1.25rem;
  --mp-pad-x: 1.5rem;
  --mp-gap: 1.25rem;
}

.marketplace-section h2 {
  text-align: left;
}

.marketplace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--section-title-gap);
  margin-bottom: var(--section-title-gap);
}

.marketplace-header-text {
  flex: 1;
  min-width: min(100%, 280px);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--section-title-gap);
}

.marketplace-header-text h2 {
  margin: 0;
}

.marketplace-intro {
  text-align: left;
  margin: 0;
  max-width: none;
}

.marketplace-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.listings-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.pagination-status {
  font-size: 0.95rem;
  color: var(--text);
  min-width: 10rem;
  text-align: center;
}

.pagination-listings-meta {
  display: inline;
}

.listings-cap {
  color: var(--text-muted);
  font-size: 0.88em;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 40px;
  color: var(--text-muted);
  font-weight: 600;
  user-select: none;
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.pagination-page {
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pagination-page:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-page.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.pagination-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.listings-list {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  margin-top: var(--heading-gap);
}

.listings-empty {
  text-align: left;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
  padding: 2rem 1.25rem;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin: 0;
}

.listings-pagination.is-hidden {
  display: none;
}

.listing-card {
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card--wide {
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
}

/* Каталог marketplace — строка как на HH.ru */
.marketplace-toolbar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: var(--card-gap);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.marketplace-section .listing-card,
.marketplace-section .listing-card--row,
.marketplace-section .listing-card--wide {
  box-shadow: none;
  border: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.marketplace-toolbar-field {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.marketplace-toolbar input,
.marketplace-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--white);
}

.marketplace-toolbar input:focus,
.marketplace-toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.listing-card--row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: var(--card-gap);
  align-items: stretch;
  padding: var(--card-padding);
}

.listing-card--row .listing-thumb-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--light);
}

.listing-card--row .listing-thumb {
  width: 160px;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.listing-card--row .listing-thumb-link:hover .listing-thumb {
  transform: scale(1.03);
}

.listing-card--row .listing-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
}

.listing-card--row .listing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.listing-card--row .listing-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--primary);
  font-family: var(--font-heading);
  line-height: 1.35;
}

.listing-card--row .listing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}

.listing-location,
.listing-date {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.listing-actions--row {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

.listing-actions--row .btn {
  white-space: nowrap;
}

/* Гостевая форма «Написать менеджеру» — как модалка «Оставить заявку» */
.guest-contact-overlay {
  /* наследует .modal-overlay */
}

.guest-contact-body {
  padding: 0;
  overflow: visible;
}

#guest-contact-modal .modal-content h2 {
  text-align: left;
  width: 100%;
  margin: 0 0 0.5rem;
  padding: 0;
}

.guest-contact-form .form-hint {
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guest-contact-form .form-error {
  background: #ffebee;
  color: #c62828;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.guest-contact-form .form-footer {
  font-size: 12px;
  color: #666;
  margin-top: 15px;
  text-align: left;
  line-height: 1.5;
}

.listing-context {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guest-contact-body .success-message {
  text-align: left;
  padding: 20px 0;
}

.guest-contact-body .success-message h3 {
  color: #2e7d32;
  margin-bottom: 15px;
}

.guest-contact-body .success-message .note {
  font-size: 13px;
  color: #666;
  margin: 15px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.listing-gallery {
  position: relative;
  background: var(--light);
}

.gallery-counter {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: rgba(15, 23, 42, 0.75);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  pointer-events: none;
}

.gallery-main {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.gallery-main:hover {
  transform: scale(1.02);
}

.gallery-thumbs img.is-zoomable {
  cursor: zoom-in;
}

.photo-preview-item img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.photo-preview-item:hover img {
  transform: scale(1.05);
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  background: var(--white);
  scrollbar-width: thin;
}

.gallery-thumbs img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: 0.2s;
  flex-shrink: 0;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
  opacity: 1;
  border-color: var(--accent);
}

.listing-content {
  padding: var(--mp-pad-y, 1.25rem) var(--mp-pad-x, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--mp-gap, 1.25rem);
}

.listing-content h3 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.listing-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.listing-desc--preview {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.listing-desc-full {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--light);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.listing-desc-full p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.listing-card.is-desc-open .listing-desc--preview {
  display: none;
}

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mp-gap, 1.25rem);
  margin: 0;
  padding: 0;
}

.listing-actions .btn {
  flex: 1;
  min-width: 140px;
  text-align: center;
  justify-content: center;
  font-size: 1rem;
}

.listing-actions .btn-call {
  flex: 1.2;
  font-size: 1.05rem;
}

.ad-form {
  width: 100%;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input {
  margin-top: 0.25rem;
  min-height: auto;
  width: auto;
}

.photo-upload-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-upload-label-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.photo-upload-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.photo-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 120px;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: var(--light);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.contact-form .photo-upload-zone {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--white);
}

.contact-form .photo-upload-zone:hover,
.contact-form .photo-upload-zone:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.photo-upload-zone:hover,
.photo-upload-zone:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.photo-upload-zone.is-full {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.photo-upload-icon {
  font-size: 2rem;
}

.contact-form .photo-upload-icon {
  font-size: 1.25rem;
}

.photo-upload-cta {
  font-weight: 600;
  color: var(--primary);
}

.photo-upload-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-main-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  padding: 0.2rem;
}

.ad-form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0;
}

.ad-form-actions .btn {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.ad-form-actions--row {
  flex-direction: row;
}

.ad-form-actions--row .btn {
  flex: 1 1 0;
  width: auto;
}

.ad-form-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-ad-top,
.modal-ad-header,
.modal-ad-body,
.modal-ad-footer {
  padding-left: 0;
  padding-right: 0;
}

.modal-ad-top,
.modal-ad-header,
.modal-ad-footer {
  padding-top: 0;
  padding-bottom: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.modal-ad-top h2,
.modal-ad-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  text-align: left;
  width: 100%;
  padding: 0;
}

.modal-ad-body {
  flex: none;
  min-height: 0;
  overflow: visible;
  padding: 0;
  max-width: none;
  margin: 0;
}

.modal-ad-footer {
  flex-shrink: 0;
  margin-top: 0;
}

.modal-ad-footer.ad-form-actions {
  gap: 0.75rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.image-lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: min(90vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  cursor: zoom-out;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ==================== МОДАЛЬНОЕ ОКНО ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.modal-content.modal-content--ad {
  display: block;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem 1.5rem;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--accent);
}

.modal-intro {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}

.modal-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--primary);
  font-family: var(--font-heading);
  text-align: left;
}

.modal-content > h2,
.modal-content > .modal-intro,
.modal-content > .contact-form,
.modal-content > .vacancy-modal-body,
.modal-content > .guest-contact-body,
.modal-content > .auth-message,
.modal-content > #auth-code-message,
.modal-content--vacancy > .vacancy-modal-cta,
.modal-ad-top,
.modal-ad-header,
.modal-ad-body,
.modal-ad-footer {
  width: 100%;
  max-width: var(--modal-form-width);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.modal-content--privacy .privacy-content {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.modal-content--privacy,
.privacy-modal {
  max-width: min(900px, var(--content-max, 1100px));
  max-height: 80vh;
  overflow-y: auto;
  padding: 2.5rem;
  padding-top: 3.25rem; /* место под кнопку × и её hover-круг */
  border-radius: 12px;
}

#privacy-modal .modal-close,
.privacy-modal .close-btn {
  top: 0.85rem;
  right: 0.85rem;
  width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  background: none;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: #666;
  transition: background 0.2s, color 0.2s;
}

#privacy-modal .modal-close:hover,
.privacy-modal .close-btn:hover {
  background: #f0f0f0;
  color: #333;
  padding: 0;
}

.modal-content--vacancy {
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-content--vacancy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.modal-content--privacy .privacy-content h2 {
  color: var(--accent);
  font-family: var(--font-heading);
  text-align: left;
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

.modal-content--privacy .privacy-content h3 {
  color: var(--text);
  font-family: var(--font-heading);
  text-align: left;
  font-size: 1.125rem;
  margin: 1.5rem 0 0.75rem;
}

.modal-content--privacy .privacy-content p,
.modal-content--privacy .privacy-content li {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  word-break: normal;
  overflow-wrap: break-word;
}

#privacy-modal.modal-overlay {
  z-index: 10000;
}

.vacancy-modal-body {
  margin: 0 0 1.25rem;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
}

.vacancy-modal-cta {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  align-self: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  min-height: 36px;
}

body.page-vacancies #request-modal .contact-form.contact-form--modal > .btn.btn-primary {
  align-self: center;
  width: auto;
  min-width: 0;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  min-height: 36px;
}

.no-scroll {
  overflow: hidden;
}

/* ==================== СЕКЦИЯ: РУКОВОДСТВО И МЕНЕДЖЕРЫ ==================== */
.team-grid {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.team-card {
  width: 100%;
  display: flex;
  gap: 0;
  background: var(--white);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  align-items: stretch;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.team-photo-wrapper {
  flex-shrink: 0;
  width: 150px;
  align-self: stretch;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.team-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: var(--light);
}

.team-photo--placeholder {
  object-fit: cover;
  object-position: center;
}

.team-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  min-height: 100%;
  padding: var(--card-padding);
}

.team-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.team-info h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-heading);
}

.team-info h3 strong {
  font-weight: 600;
}

.team-role {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.team-contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  width: 100%;
}

.team-desc {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.team-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.team-phone-link,
.team-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.team-phone-link .icon,
.team-email-link .icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

.team-phone-link:hover,
.team-email-link:hover {
  color: var(--accent);
}

.team-contacts .btn {
  margin-left: 0;
}

/* ==================== ЛИЧНЫЙ КАБИНЕТ И SUPABASE ==================== */
.header-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--header-item-gap);
  flex-shrink: 0;
  width: var(--header-user-btn-w);
  min-width: var(--header-user-btn-w);
  max-width: var(--header-user-btn-w);
}

.header-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--header-control-h);
  box-sizing: border-box;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  padding: 0 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.header-auth-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--light);
}

html.header-auth-cached #header-account-fallback {
  display: none !important;
}

.header-auth-email {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-auth-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

/* Меню пользователя в шапке */
.header-user-menu {
  position: relative;
  display: block;
  width: 100%;
  overflow: visible;
  z-index: 1100;
}

.header-toolbar,
.header-inner,
.site-header {
  overflow: visible;
}

.header-user-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  box-sizing: border-box;
  width: 100%;
  height: var(--header-control-h);
  min-height: var(--header-control-h);
  padding: 0 0.45rem 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text);
}

.header-user-btn:hover {
  background: var(--light);
  border-color: var(--accent);
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
}

.header-avatar--loading {
  animation: header-avatar-shimmer 1.2s ease-in-out infinite;
}

.header-avatar--placeholder {
  opacity: 0.85;
}

.user-avatar.header-avatar--loading,
.header-avatar.header-avatar--loading {
  animation: header-avatar-shimmer 1.2s ease-in-out infinite;
}

@keyframes header-avatar-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.header-username {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--primary);
  text-align: left;
}

.dropdown-arrow {
  font-size: 0.55rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.05rem;
}

.header-user-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  width: 100%;
  min-width: 100%;
  z-index: 1100;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-user-btn[aria-expanded="true"] + .header-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-dropdown:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item.profile-link {
  text-decoration: none;
  color: var(--primary);
}

.dropdown-item.profile-link:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--primary);
}

.dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
  font-family: var(--font-body);
}

.header-dropdown .dropdown-item:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent);
}

.dropdown-item.logout-btn {
  color: #d32f2f;
}

.dropdown-item.logout-btn:hover {
  background: #ffebee;
}

/* ==================== РАЗМЕЩЕНИЕ ОБЪЯВЛЕНИЯ ==================== */
.create-listing-page {
  min-height: 60vh;
}

.create-listing-intro {
  text-align: center;
  color: var(--text-muted);
}

.create-listing-form .form-hint {
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.city-autocomplete-wrap {
  position: relative;
}

.suggestions-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus {
  background: var(--light);
  outline: none;
}

.listing-success-message {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.listing-success-message h3 {
  color: #15803d;
  margin: 0 0 0.75rem;
}

.listing-success-message p {
  margin: 0 0 0.5rem;
  color: var(--text);
}

/* ==================== ЛИЧНЫЙ КАБИНЕТ (табы + iframe) ==================== */
main#account-page.account-shell {
  min-height: 60vh;
  overflow-x: clip;
}

main#account-page.account-shell,
main#account-page.account-shell > .account-shell__container,
main#account-page.account-shell #auth-container,
main#account-page.account-shell #login-form-wrapper,
main#account-page.account-shell #account-content,
main#account-page.account-shell #account-menu-view {
  margin-top: 0;
}

main#account-page.account-shell > .account-shell__container {
  width: 100%;
  max-width: var(--content-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--container-padding);
  padding-left: var(--container-padding);
}

main#account-page.account-shell #auth-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 0;
}

main#account-page.account-shell #login-form-wrapper,
main#account-page.account-shell #account-content,
main#account-page.account-shell #account-menu-view {
  padding-top: 0;
}

main#account-page.account-shell #login-form-wrapper[hidden],
main#account-page.account-shell #account-content[hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#notifications-bell-wrapper:empty {
  display: none;
}

body.account-page--logged-in #account-menu-view {
  margin-top: 0;
}

body.account-page--logged-in main#account-page.account-shell > .account-shell__container {
  padding-top: 0;
}

main#account-page.account-shell #account-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: var(--section-y);
}

main#account-page.account-shell #account-menu-view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  --account-menu-gap: var(--card-gap);
  --account-menu-gap-tight: 10px;
  gap: var(--account-menu-gap);
}

main#account-page.account-shell #account-menu-view .user-profile-card .profile-header {
  gap: var(--account-menu-gap-tight);
  margin-bottom: var(--account-menu-gap-tight);
}

main#account-page.account-shell #account-menu-view .user-profile-card .detail-item {
  padding: var(--account-menu-gap-tight) 0;
}

main#account-page.account-shell #account-menu-view .crm-sections-grid--compact {
  gap: var(--account-menu-gap);
}

main#account-page.account-shell #account-menu-view .account-actions-section,
main#account-page.account-shell #account-menu-view .account-delete-section {
  gap: var(--account-menu-gap);
}

main#account-page.account-shell .account-menu-divider {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #cbd5e1;
  background: none;
  flex-shrink: 0;
}

main#account-page.account-shell .account-intro {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--section-title-gap);
}

main#account-page.account-shell .account-login-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

main#account-page.account-shell .account-login-wrap > h2 {
  text-align: center;
}

main#account-page.account-shell .account-login-wrap > .auth-tabs {
  width: 100%;
  margin-bottom: 1.25rem;
}

main#account-page.account-shell .auth-panel {
  width: 100%;
}

main#account-page.account-shell .auth-form input[type='email'],
main#account-page.account-shell .auth-form input[type='password'],
main#account-page.account-shell .auth-form input[type='text'] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  min-height: 44px;
}

main#account-page.account-shell .auth-form {
  margin: 0;
  width: 100%;
  gap: 0;
}

main#account-page.account-shell .auth-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

main#account-page.account-shell .auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

main#account-page.account-shell .auth-field label:not(.checkbox-label) {
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0;
}

main#account-page.account-shell .auth-field--checkbox .checkbox-label {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

main#account-page.account-shell .auth-field--checkbox .checkbox-label input {
  min-height: auto;
  width: auto;
  padding: 0;
  margin-top: 0.25rem;
}

main#account-page.account-shell .auth-form .btn[type="submit"] {
  width: 100%;
  margin: 0;
}

main#account-page.account-shell #login-error {
  margin-top: 1rem;
  margin-bottom: 0;
}

.user-profile-card {
  background: linear-gradient(135deg, var(--primary) 0%, #3d5a80 100%);
  border-radius: 16px;
  padding: 10px;
  color: var(--white);
  margin: 0;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--card-gap);
  margin-bottom: var(--card-gap);
  position: relative;
  min-width: 0;
}

.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-button {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}

.avatar-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 180px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  padding: 0.35rem 0;
}

.avatar-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.avatar-menu-item:hover {
  background: var(--light);
}

.avatar-menu-item--danger {
  color: var(--accent);
}

.user-info {
  flex: 1 1 180px;
  min-width: 0;
}

.user-info-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.user-info h2 {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 600;
  color: var(--white);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-phone-head {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.user-phone-head__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(24%) sepia(96%) saturate(2835%) hue-rotate(344deg) brightness(92%) contrast(102%);
}

.btn-profile-logout {
  margin-top: 0.35rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-profile-logout:hover {
  background: var(--white);
  color: var(--primary);
}

.user-role {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.95;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  background: var(--white);
  display: block;
}

.user-role.role--user,
.user-role.role--seeker,
.detail-item .value.role-value.role--user,
.detail-item .value.role-value.role--seeker {
  color: #ffeb3b;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Удаление аккаунта */
.account-actions-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--card-gap);
  width: 100%;
}

.btn-edit-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--primary);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-edit-profile:hover {
  background: var(--light);
  border-color: #3d5a80;
  color: #3d5a80;
}

.profile-edit-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.create-listing-form .region-selector .auth-field {
  margin-bottom: 0.75rem;
}

.create-listing-form .region-selector .auth-field[hidden] {
  display: none !important;
}

.create-listing-form .region-selector select,
.create-listing-form .region-selector input[type='text'] {
  width: 100%;
}

.region-selector .auth-field {
  margin-bottom: 0.75rem;
}

.region-selector .auth-field[hidden] {
  display: none !important;
}

.account-delete-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--card-gap);
  margin: 0;
  padding: 0;
  border: 0;
  text-align: right;
}

.btn-delete-account {
  background: var(--accent);
  color: var(--white);
  border: 2px solid var(--accent);
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.btn-delete-account:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
}

.btn-delete-account__icon {
  display: block;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.deletion-pending {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: var(--card-gap);
  border-radius: 8px;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.deletion-pending p {
  margin: 0;
  color: #856404;
}

/* Модальное окно удаления аккаунта */
.delete-account-modal-wrap {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10060;
}

.delete-account-modal-wrap[style*='block'] {
  display: block;
}

.delete-account-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.delete-account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(90%, 450px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.delete-account-modal__content {
  padding: 2rem;
}

.delete-account-modal__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.delete-account-modal__text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
}

.delete-account-modal__phone {
  display: block;
  width: fit-content;
  margin: 0.5rem auto 1.25rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--light);
  font-weight: 600;
  color: var(--text);
}

.delete-account-modal__input {
  width: 100%;
  padding: 0.875rem;
  margin-bottom: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.15em;
}

.delete-account-modal__input:focus {
  outline: none;
  border-color: var(--accent);
}

.delete-account-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delete-account-modal__btn {
  width: 100%;
  min-height: 60px;
  padding: 0.875rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.delete-account-modal__btn--cancel {
  background: var(--white);
  color: var(--accent);
  border-color: var(--accent);
}

.delete-account-modal__btn--cancel:hover {
  background: var(--accent);
  color: var(--white);
}

.delete-account-modal__btn--confirm {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.delete-account-modal__btn--confirm:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.delete-account-modal__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.delete-account-modal__error,
.delete-account-modal__success {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.delete-account-modal__error {
  background: #ffe6e6;
  color: #dc3545;
}

.delete-account-modal__success {
  background: #e6ffe6;
  color: #28a745;
}

.delete-account-container {
  max-width: 500px;
  width: 90%;
  height: auto;
  min-height: 0;
  max-height: 90vh;
}

.deletion-warning {
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.deletion-warning p {
  margin: 0 0 10px 0;
  color: #c62828;
}

.deletion-warning ul {
  margin: 10px 0;
  padding-left: 20px;
  color: #666;
}

.deletion-warning li {
  margin-bottom: 5px;
}

.deletion-note {
  font-size: 13px;
  color: #856404;
  font-style: italic;
  margin-top: 15px;
}

#deletion-confirm-form .form-group {
  margin-bottom: var(--container-padding);
}

#deletion-confirm-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

#deletion-confirm-form input[type='tel'] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font: inherit;
}

#deletion-confirm-form .form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

#deletion-confirm-form .form-error {
  color: #c62828;
  font-size: 13px;
  margin-bottom: 12px;
}

#deletion-confirm-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.btn-danger {
  background: #d32f2f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-danger:hover {
  background: #b71c1c;
}

.user-role.role--manager,
.detail-item .value.role-value.role--manager {
  color: #90caf9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.user-role.role--admin,
.detail-item .value.role-value.role--admin {
  color: #ffab91;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.user-role.role--external_employer,
.detail-item .value.role-value.role--external_employer {
  color: #c5e1a5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.detail-item .value.role-value {
  font-weight: 600;
}

.profile-details {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.detail-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: var(--card-gap) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-item .label {
  font-weight: 400;
  min-width: 115px;
  flex: 0 0 115px;
  display: inline-flex;
  align-items: center;
  gap: var(--icon-text-gap, 0.5rem);
  opacity: 0.9;
}

.detail-item .label .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.detail-item .value {
  opacity: 0.95;
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item .label .icon--accent {
  filter: brightness(0) saturate(100%) invert(24%) sepia(96%) saturate(2835%) hue-rotate(344deg) brightness(92%) contrast(102%);
}

.crm-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--card-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.crm-section-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 12px;
  padding: var(--section-inner-gap);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.crm-section-card__count {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
}

.crm-section-card__count[hidden] {
  display: none !important;
}

.crm-section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.section-icon {
  margin-bottom: var(--card-gap);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.crm-section-card h3 {
  margin: 0 0 var(--card-gap);
  font-size: 1.2rem;
  color: var(--primary);
}

.crm-section-card p {
  margin: 0 0 var(--section-inner-gap);
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.btn-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 1rem 1.5rem;
  border: 2px solid var(--accent);
  background: var(--white);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

@media (max-width: 768px) {
  .btn-section {
    min-height: 50px;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    white-space: normal;
  }
}

.btn-section:hover {
  background: var(--accent);
  color: var(--white);
}

/* Колокольчик уведомлений в профиле */
.notifications-bell-slot {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: flex-start;
  position: relative;
  max-width: 100%;
  margin-top: 0.2rem;
}

.notifications-bell-slot--crm {
  margin-left: auto;
  align-self: center;
}

.notifications-bell-wrapper {
  position: relative;
  flex-shrink: 0;
}

.notifications-bell {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.notifications-bell-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.notifications-bell-slot--crm .notifications-bell {
  background: var(--white);
  border-color: rgba(226, 232, 240, 0.9);
  color: var(--primary);
}

.notifications-bell:hover {
  background: var(--white);
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.notifications-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #f44336;
  color: var(--white);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  width: min(400px, calc(100vw - 2 * var(--container-padding)));
  max-width: calc(100vw - 2 * var(--container-padding));
  max-height: 500px;
  overflow: hidden;
  z-index: 1000;
  color: var(--text);
}

.notifications-dropdown-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f5f5f5;
  border-radius: 12px 12px 0 0;
}

.notifications-dropdown-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
}

.mark-all-read {
  background: none;
  border: none;
  color: #1a73e8;
  cursor: pointer;
  font-size: 0.8125rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-body);
  white-space: nowrap;
}

.mark-all-read:hover {
  background: #e3f2fd;
}

.notifications-dropdown-list {
  max-height: 400px;
  overflow-y: auto;
}

.notifications-loading,
.no-notifications {
  text-align: center;
  padding: 16px 20px;
  color: var(--text-muted);
  margin: 0;
}

.notification-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.notification-dropdown-item:hover {
  background: #f9f9f9;
}

.notification-dropdown-item:last-child {
  border-bottom: none;
}

.notification-dropdown-item.notification-success {
  border-left: 4px solid #28a745;
}

.notification-dropdown-item.notification-error {
  border-left: 4px solid #dc3545;
}

.notification-dropdown-item.notification-warning {
  border-left: 4px solid #ffc107;
}

.notification-dropdown-item.notification-pending {
  border-left: 4px solid #ff9800;
  background: #fff8e1;
}

.notification-dropdown-item .notification-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-icon__img {
  display: block;
  object-fit: contain;
}

.listing-success-message__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-icon {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
}

.ui-icon-text {
  display: inline-flex;
  align-items: center;
  gap: var(--icon-text-gap, 0.5rem);
}

.ui-icon-text__icon {
  flex-shrink: 0;
}

.ui-icon-text__label {
  line-height: 1.35;
}

.ui-icon-text--btn .ui-icon-text__icon,
.btn-with-icon .ui-icon {
  width: 16px;
  height: 16px;
}

.ui-icon-text--inline,
.ui-icon-text--list {
  gap: var(--icon-text-gap, 0.5rem);
}

.ui-icon-text--list .ui-icon-text__icon {
  width: 16px;
  height: 16px;
  opacity: 0.88;
}

.ui-icon-text--mock {
  justify-content: center;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--icon-text-gap-tight, 0.4rem);
}

.dropdown-item.btn-with-icon {
  width: 100%;
  text-align: left;
}

.mock-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.notification-dropdown-item .notification-content {
  flex: 1;
  min-width: 0;
}

.notification-dropdown-item .notification-content p {
  margin: 0 0 4px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
}

.notification-dropdown-item .notification-content small {
  color: #999;
  font-size: 0.75rem;
}

.notification-dropdown-item .rejection-preview {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #d32f2f;
  font-style: italic;
}

.notification-dropdown-item .notification-action {
  background: none;
  border: none;
  color: #1a73e8;
  cursor: pointer;
  font-size: 1.125rem;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1;
}

.notification-dropdown-item .notification-action:hover {
  background: #e3f2fd;
}

.btn-section.primary {
  background: var(--accent);
  color: var(--white);
}

.btn-section.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.account-actions {
  text-align: center;
  padding: 20px 0 var(--section-y);
}

.btn-logout {
  width: 100%;
  max-width: 100%;
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--border);
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-logout:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.crm-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 20px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.crm-tabs__sections {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.crm-tab {
  position: relative;
  flex: 1 1 140px;
  min-width: 0;
  padding: 10px 12px;
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--icon-text-gap-tight, 0.4rem);
  text-align: left;
  line-height: 1.25;
}

.crm-tab__count {
  position: static;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  pointer-events: none;
  box-sizing: border-box;
}

.crm-tab__count[hidden] {
  display: none !important;
}

.crm-tab.active .crm-tab__count {
  background: transparent;
  color: var(--white);
}

.crm-tab__icon {
  flex-shrink: 0;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.crm-tab > span {
  display: block;
  width: auto;
  text-align: inherit;
}

.crm-tab__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: inherit;
  line-height: 1.25;
  text-align: left;
}

html.account-role-manager .crm-sections-grid--compact,
.account-shell--manager .crm-sections-grid--compact,
.crm-sections-grid--compact.crm-sections-grid--manager {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.crm-sections-grid--compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

html.account-role-manager .crm-section-card,
.account-shell--manager .crm-section-card,
.crm-sections-grid--compact .crm-section-card,
.crm-sections-grid--manager .crm-section-card {
  padding: 8px;
}

html.account-role-manager .section-icon,
.account-shell--manager .section-icon,
.crm-sections-grid--compact .section-icon,
.crm-sections-grid--manager .section-icon {
  margin-bottom: 8px;
}

html.account-role-manager .section-icon img,
.account-shell--manager .section-icon img,
.crm-sections-grid--compact .section-icon img,
.crm-sections-grid--manager .section-icon img {
  width: 36px;
  height: 36px;
}

.crm-sections-grid--compact .crm-section-card h3,
.crm-sections-grid--manager .crm-section-card h3 {
  margin: 0 0 4px;
  font-size: 0.75rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.crm-sections-grid--compact .crm-section-card__count,
.crm-sections-grid--manager .crm-section-card__count {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  top: 6px;
  right: 6px;
}

html.account-role-manager .crm-section-card p,
.account-shell--manager .crm-section-card p,
.crm-sections-grid--compact .crm-section-card p,
.crm-sections-grid--manager .crm-section-card p {
  margin: 0 0 10px;
  font-size: 0.75rem;
  line-height: 1.35;
}

html.account-role-manager .btn-section,
.account-shell--manager .btn-section,
.crm-sections-grid--compact .btn-section,
.crm-sections-grid--manager .btn-section {
  min-height: 40px;
  padding: 0.5rem 0.5rem;
  font-size: 0.78rem;
  white-space: normal;
  line-height: 1.2;
}

[data-manager-only][hidden],
.crm-tab--manager[hidden] {
  display: none !important;
}

html.account-role-manager .crm-tabs {
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0;
}

html.account-role-manager .crm-tabs__sections {
  flex: 1 1 0;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
}

html.account-role-manager .crm-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  font-size: clamp(0.68rem, 1.05vw, 0.82rem);
  gap: 4px;
}

html.account-role-manager .crm-tab.active {
  border-radius: 6px;
}

html.account-role-manager .crm-tab.active .crm-tab__count {
  color: var(--white);
}

html.account-role-manager .crm-tab__icon {
  width: 22px;
  height: 22px;
}

html.account-role-manager .crm-tab__label {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

html.account-role-manager .crm-tab-back {
  flex: 0 0 auto;
  align-self: center;
  padding: 8px 10px;
  font-size: 0.75rem;
  white-space: nowrap;
}

html.account-role-manager .notifications-bell-slot--crm {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0;
}

.crm-tab:hover {
  background: transparent;
  color: var(--text);
  border-bottom-color: #94a3b8;
}

.crm-tab.active {
  background: var(--accent);
  color: var(--white);
  border-bottom-color: var(--accent);
  border-radius: 8px;
}

.crm-tab.active .crm-tab__count {
  color: var(--white);
}

.crm-tab-back {
  padding: 12px 20px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-heading);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.crm-tab-back:hover {
  background: var(--light);
  border-color: #94a3b8;
  color: var(--text);
}

#account-crm-view[hidden] {
  display: none !important;
}

/* Мгновенный CRM-вид при F5 на /account/#chat|resumes|sales|rentals (до загрузки JS) */
html.account-route-authed.account-route-crm:not(.account-shell-ready) #account-menu-view {
  display: none !important;
}

html.account-route-authed.account-route-crm:not(.account-shell-ready) #account-crm-view,
html.account-route-authed.account-route-crm:not(.account-shell-ready) #account-crm-view[hidden] {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100vh - 180px);
  width: 100%;
}

html.account-route-authed.account-route-crm:not(.account-shell-ready) #login-form-wrapper,
html.account-route-authed.account-route-crm:not(.account-shell-ready) #login-form-wrapper[hidden] {
  display: none !important;
}

html.account-route-authed.account-route-crm:not(.account-shell-ready) #account-content,
html.account-route-authed.account-route-crm:not(.account-shell-ready) #account-content[hidden] {
  display: flex !important;
  flex-direction: column;
}

html.account-route-authed.account-route-crm:not(.account-shell-ready)[data-account-section="chat"] .crm-tab[data-tab="chat"],
html.account-route-authed.account-route-crm:not(.account-shell-ready)[data-account-section="resumes"] .crm-tab[data-tab="resumes"],
html.account-route-authed.account-route-crm:not(.account-shell-ready)[data-account-section="sales"] .crm-tab[data-tab="sales"],
html.account-route-authed.account-route-crm:not(.account-shell-ready)[data-account-section="rentals"] .crm-tab[data-tab="rentals"] {
  background: var(--accent);
  color: var(--white);
}

html.account-route-authed.account-route-crm:not(.account-shell-ready)[data-account-section="leads"] .crm-tab[data-tab="leads"] {
  background: var(--accent);
  color: var(--white);
}

/* Мгновенное меню ЛК при F5 / переходе на /account/ без hash (до загрузки JS) */
html.account-route-authed.account-route-menu:not(.account-shell-ready) #login-form-wrapper,
html.account-route-authed.account-route-menu:not(.account-shell-ready) #login-form-wrapper[hidden] {
  display: none !important;
}

html.account-route-authed.account-route-menu:not(.account-shell-ready) #account-content,
html.account-route-authed.account-route-menu:not(.account-shell-ready) #account-content[hidden] {
  display: flex !important;
  flex-direction: column;
}

html.account-route-authed.account-route-menu:not(.account-shell-ready) #account-menu-view {
  display: flex !important;
  flex-direction: column;
  gap: var(--card-gap);
}

html.account-route-authed.account-route-menu:not(.account-shell-ready) #account-crm-view {
  display: none !important;
}

body.account-view--crm #account-menu-view {
  display: none !important;
}

body.account-view--crm #account-crm-view {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: calc(100vh - 180px);
  width: 100%;
}

body.account-view--crm .crm-iframe-container {
  flex: 1 1 auto;
  height: calc(100vh - 260px);
  min-height: 600px;
}

.crm-iframe-container {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
  height: calc(100vh - 300px);
  min-height: 600px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
}

.crm-iframe-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.crm-iframe-error[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .profile-header {
    gap: 14px;
    align-items: center;
  }

  .notifications-bell-slot {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .user-avatar {
    width: 80px;
    height: 80px;
  }

  .crm-tab-back {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
  }

  html.account-role-manager .crm-sections-grid--compact,
  .crm-sections-grid--compact.crm-sections-grid--manager,
  .crm-sections-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.account-role-manager .crm-tabs,
  html.account-role-manager .crm-tabs__sections {
    flex-wrap: nowrap;
  }

  html.account-role-manager .crm-tab-back {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: left;
  }

  html.account-role-manager .notifications-bell-slot--crm {
    width: auto;
  }
}

#account-crm-iframe,
#crm-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.mock-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
}

.auth-page-title {
  text-align: center;
  font-family: var(--font-heading);
  color: var(--primary);
}

.crm-chat-section {
  margin: var(--subsection-gap) 0;
  padding: var(--card-padding);
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.crm-chat-section h3 {
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  color: var(--primary);
  font-size: 1.15rem;
  font-family: var(--font-heading);
}

.crm-chat-trigger-wrap {
  margin: 0;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.auth-tab.is-active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.auth-form {
  max-width: 100%;
}

.auth-message {
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.auth-message--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-message--success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.dashboard-page h1 {
  margin-bottom: 0.5rem;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--section-title-gap);
}

.dashboard-stats {
  color: var(--text-muted);
  margin: 0;
}

.dashboard-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #f0fdf4;
  color: #15803d;
}

.dashboard-message--error {
  background: #fef2f2;
  color: #b91c1c;
}

.dashboard-listings {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  margin-top: var(--section-y);
}

.dashboard-listing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--card-padding);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-listing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dashboard-listing-head h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--primary);
}

.dashboard-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.listing-status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.listing-status--draft {
  background: #e2e8f0;
  color: #475569;
}

.listing-status--pending {
  background: #fef3c7;
  color: #b45309;
}

.listing-status--published {
  background: #dcfce7;
  color: #15803d;
}

.listing-status--rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.listing-status--archived {
  background: #f1f5f9;
  color: #64748b;
}

.listing-price {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0.25rem 0;
}

.listing-phone-line,
.listing-author-phone {
  margin: 0.2rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.listing-expiry-warn {
  margin: 0.35rem 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.listing-form-section {
  margin: var(--section-y) auto 0;
  max-width: 560px;
}

.listing-form-section h2 {
  margin-top: 0;
  text-align: center;
  color: var(--primary);
  font-family: var(--font-heading);
}

.dashboard-empty,
.listings-loading,
.listings-empty,
.listings-error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.listings-error {
  color: #b91c1c;
}

.dashboard-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

.dashboard-hint--block {
  margin-top: 2rem;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.contact-form .is-invalid,
.auth-form .is-invalid,
.guest-contact-form .is-invalid,
.listing-form .is-invalid,
#create-listing-form .is-invalid,
#deletion-confirm-form .is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.field-error {
  color: #dc2626;
  font-size: 0.8125rem;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

/* Плоские формы: label → input → error — компенсация flex gap: 1rem */
.contact-form > .field-error,
.guest-contact-form > .field-error,
.listing-form > .field-error,
.create-listing-form > .field-error,
.modal-ad-body.contact-form > .field-error {
  margin-top: -0.8rem;
  margin-bottom: -0.2rem;
  padding-top: 0.15rem;
}

.contact-form > :is(input, textarea, select) + .field-error,
.guest-contact-form > :is(input, textarea, select) + .field-error,
.listing-form > :is(input, textarea, select) + .field-error,
.create-listing-form > :is(input, textarea, select) + .field-error,
.modal-ad-body.contact-form > :is(input, textarea, select) + .field-error {
  margin-top: -0.85rem;
  padding-top: 0.2rem;
}

.contact-form > .checkbox-label + .field-error,
.guest-contact-form > .checkbox-label + .field-error,
.listing-form > .checkbox-label + .field-error,
.create-listing-form > .checkbox-label + .field-error,
.modal-ad-body.contact-form > .checkbox-label + .field-error {
  margin-top: -0.85rem;
  padding-top: 0.15rem;
}

.contact-form > :is(input, textarea, select) + .field-error + .form-hint,
.create-listing-form > textarea + .field-error + .form-hint {
  margin-top: 0.15rem;
}

/* Поля в обёртках (auth, deletion) */
.auth-form .auth-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.auth-form .auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.auth-form .auth-field > .field-error,
.form-group > .field-error,
#deletion-confirm-form .form-group > .field-error {
  margin: 0.15rem 0 0;
}

.auth-form .auth-field--checkbox > .field-error {
  margin-top: 0.2rem;
}

/* ==================== TOAST УВЕДОМЛЕНИЯ ==================== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  opacity: 0;
  transform: translateX(1rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast--success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.toast--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.toast--info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
  cursor: not-allowed;
  padding-left: 2.5rem;
}

.btn.is-loading::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-btn-spin 0.6s linear infinite;
  transform: translateY(-50%);
}

.btn-secondary.is-loading::before,
.btn.btn-secondary.is-loading::before {
  border-color: rgba(15, 23, 42, 0.2);
  border-top-color: var(--primary);
}

@keyframes auth-btn-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* ==================== ФИЛЬТРЫ И ПАГИНАЦИЯ ЛК ==================== */
.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dashboard-filter {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.dashboard-filter:hover {
  border-color: var(--accent);
}

.dashboard-filter.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.dashboard-pagination {
  margin: 0.75rem 0;
}

.dashboard-pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.dashboard-page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dashboard-listing-thumb {
  margin: 0.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  max-width: 120px;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}

.dashboard-listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-new-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
  padding: 0.15rem;
}

.auth-form-links {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.9rem;
}

.auth-form-links a {
  color: var(--accent);
}

.auth-resend-block {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}

.auth-resend-block p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.auth-confirm-waiting {
  text-align: center;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}

main#account-page.account-shell .account-login-wrap #reg-otp-verify.auth-confirm-waiting {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.auth-confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.auth-confirm-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--primary);
}

.auth-confirm-text {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.auth-confirm-hint {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.auth-confirm-email {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0.35rem auto 1rem;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.auth-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.auth-confirm-actions .btn {
  min-width: 200px;
}

.auth-otp-form {
  margin-top: 0.5rem;
}

.auth-otp-input {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0.5rem auto 0.25rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: ui-monospace, monospace;
}

.auth-otp-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-otp-verify .auth-confirm-actions {
  margin-top: 1rem;
}

.privacy-content {
  width: 100%;
  max-width: 100%;
}

.privacy-content h2 {
  margin-top: 0;
  margin-bottom: var(--section-title-gap);
  font-size: 1.15rem;
}

.privacy-content h2:not(:first-of-type) {
  margin-top: var(--subsection-gap);
}

.privacy-content ul {
  padding-left: 1.25rem;
  line-height: 1.6;
}

.privacy-updated {
  margin-top: 2rem;
  color: var(--text-muted);
}

/* ==================== ТЁМНАЯ ТЕМА ==================== */
[data-theme="dark"] {
  color-scheme: dark;
  --primary: #E2E8F0;
  --surface: #1E293B;
  --light: #0F172A;
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --border: #334155;
  --dark: #020617;
  --focus-ring: rgba(220, 38, 38, 0.35);
  --bg-page: linear-gradient(135deg, #0B1120 0%, #0F172A 45%, #1E293B 100%);
  --card-border: rgba(51, 65, 85, 0.85);
  --card-edge-gradient: linear-gradient(
    135deg,
    rgba(100, 116, 139, 0.65) 0%,
    rgba(51, 65, 85, 0.2) 40%,
    rgba(15, 23, 42, 0.05) 60%,
    rgba(100, 116, 139, 0.45) 100%
  );
  --card-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.45);
  --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background: var(--light);
  color: var(--text);
}

[data-theme="dark"] main::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3' viewBox='0 0 3 3'%3E%3Ccircle cx='1.5' cy='1.5' r='1' fill='%23a8b4c4' fill-opacity='0.42'/%3E%3C/svg%3E");
  background-size: 3px 3px;
}

[data-theme="dark"] .header {
  background: var(--surface);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .vacancy-card,
[data-theme="dark"] .service-card--clickable,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .contact-person {
  background: var(--surface);
}

[data-theme="dark"] .service-card-description {
  background: var(--surface);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea,
[data-theme="dark"] .contact-form select {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .nav-dropdown a,
[data-theme="dark"] .phone-dropdown-menu a {
  color: #1F2937;
}

[data-theme="dark"] .nav-dropdown a:hover {
  background: #F8FAFC;
  color: #1F2937;
}

[data-theme="dark"] .phone-dropdown-menu a:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent);
}

[data-theme="dark"] .header-dropdown .dropdown-item {
  color: #1F2937;
}

[data-theme="dark"] .header-dropdown .dropdown-item:hover {
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent);
}

[data-theme="dark"] .deletion-pending {
  background: #422006;
  border-color: #854d0e;
  color: #FDE68A;
}

[data-theme="dark"] .deletion-error,
[data-theme="dark"] .auth-message.error {
  background: #450a0a;
  color: #FECACA;
}

[data-theme="dark"] .photo-upload-zone:hover,
[data-theme="dark"] .photo-upload-zone:focus {
  background: var(--surface);
}

[data-theme="dark"] .listing-card--row:hover {
  background: var(--light);
}

/* ==================== WP ADMIN BAR (по требованию) ==================== */
/* Убираем автоматический отступ WP — шапка всегда прижата к верху экрана */
html,
html.admin-bar {
  margin-top: 0 !important;
}

/* Панель скрыта по умолчанию, показывается классом wp-admin-bar-open на body */
body.admin-bar #wpadminbar {
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  pointer-events: none;
}

body.admin-bar.wp-admin-bar-open #wpadminbar {
  transform: translateY(0);
  pointer-events: auto;
}

/* При открытой панели сдвигаем фиксированную шапку вниз */
body.admin-bar.wp-admin-bar-open .header {
  top: 32px;
}

/* Кнопка вызова панели (только для авторизованных в WP) */
.wp-admin-bar-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.wp-admin-bar-toggle:hover {
  background: var(--primary);
  color: var(--white);
}

.wp-admin-bar-toggle.is-active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* Текстовые объявления /ob-yavleniya/ */
.classified-ads-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  gap: 2rem;
  align-items: start;
}

.classified-ads-grid {
  display: grid;
  gap: 1rem;
}

.classified-ad-card {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.classified-ad-card__content {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

.classified-ad-card__author,
.classified-ad-card__phone,
.classified-ad-card__email {
  margin: 0.35rem 0;
  font-size: 0.92rem;
}

.classified-ad-card__date {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.classified-ads-loading,
.classified-ads-empty,
.classified-ads-error {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .classified-ads-layout {
    grid-template-columns: 1fr;
  }
}

/* ==================== RESPONSIVE: tablet / mobile ==================== */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--container-padding-mobile);
    --card-gap: var(--card-gap-mobile);
    --section-footer-gap: var(--section-footer-gap-mobile);
  }

  .container {
    max-width: 100%;
  }

  .features-grid {
    --features-count: 1;
  }

  .footer-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .footer-col--map {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-important-band {
    grid-column: 1;
    grid-row: auto;
  }

  .marketplace-toolbar {
    grid-template-columns: 1fr;
  }

  .listing-card--wide {
    grid-template-columns: 1fr;
  }

  .listing-card--row {
    grid-template-columns: 1fr;
  }

  .listing-card--row .listing-thumb {
    width: 100%;
    max-width: 100%;
    height: 180px;
  }

  #site-search {
    width: min(150px, 28vw);
    min-width: 0;
  }

  .site-search-results {
    width: min(calc(100vw - 24px), 320px);
    min-width: 0;
    max-width: calc(100vw - 24px);
  }

  .crm-iframe-container,
  body.account-view--crm .crm-iframe-container {
    min-height: 70vh;
    height: calc(100dvh - 200px);
  }

  body.account-view--crm #account-crm-view {
    min-height: calc(100dvh - 160px);
  }

  .form-group,
  #deletion-confirm-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .form-group input,
  .form-group textarea,
  .form-group select,
  #deletion-confirm-form .form-group input,
  #deletion-confirm-form .form-group textarea,
  #deletion-confirm-form .form-group select {
    width: 100%;
    max-width: 100%;
  }

  .responsive-table-wrapper,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  body,
  main,
  .container,
  .card,
  .listing-card,
  .crm-section-card,
  .user-profile-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-buttons .btn,
  .hero-buttons a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  html.account-role-manager .crm-sections-grid--compact,
  .crm-sections-grid--compact.crm-sections-grid--manager,
  .crm-sections-grid--compact {
    grid-template-columns: 1fr;
  }

  .header-toolbar {
    gap: 0.35rem;
  }

  .header-auth,
  .header-auth .btn {
    max-width: 100%;
  }
}

/* ==================== RESPONSIVE Этап 2: header / burger / hero ==================== */
@media (max-width: 900px) {
  .header {
    padding: 0.65rem 0;
  }

  :root {
    --header-logo-gap: 1.25rem;
  }

  .logo-mark,
  .logo img,
  .logo .custom-logo {
    width: 36px;
    height: 36px;
    max-height: 36px;
  }

  .hero {
    min-height: min(var(--hero-min-height), 360px);
    padding-bottom: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.55rem 0;
  }

  :root {
    --header-logo-gap: 0.75rem;
    --header-toolbar-even-gap: 0.45rem;
    --header-user-btn-w: 7.5rem;
    --header-call-btn-w: auto;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-auth {
    width: auto;
    min-width: 0;
    max-width: var(--header-user-btn-w);
    flex-shrink: 1;
  }

  .header-auth-link {
    font-size: 0.75rem;
    padding: 0 0.35rem;
  }

  /* Email в шапке — иконка без текста и так мало полезна на узком экране */
  .header-contact {
    display: none;
  }

  .logo-mark,
  .logo img,
  .logo .custom-logo {
    width: 34px;
    height: 34px;
    max-height: 34px;
  }

  /* Бургер: выезжающая панель справа (fixed к viewport — без transform на предках) */
  .nav-wrapper {
    position: static;
    transform: none;
  }

  .nav-dropdown {
    position: fixed;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    transform: translate3d(100%, 0, 0);
    width: min(85vw, 320px);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    padding: 4.75rem 1.15rem 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1003;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s;
    box-sizing: border-box;
  }

  .nav-dropdown.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-dropdown a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 0.85rem 0.35rem;
    font-size: 1rem;
    white-space: normal;
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown a:last-child {
    border-bottom: none;
  }

  .btn-phone {
    font-size: 0.75rem;
  }

  .header-search #site-search {
    width: min(120px, 22vw);
  }

  .hero {
    min-height: 320px;
    padding-bottom: 1.5rem;
  }

  .hero-inner {
    row-gap: 0.55rem;
  }

  .hero h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.55rem);
  }

  .hero p {
    font-size: 0.92rem;
  }

  .hero-buttons {
    padding-top: calc(0.5rem + 18px);
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.45rem 0;
  }

  :root {
    --header-logo-gap: 0.45rem;
    --header-toolbar-even-gap: 0.35rem;
    --header-user-btn-w: 6.5rem;
    --header-control-h: 36px;
  }

  .logo-mark,
  .logo img,
  .logo .custom-logo {
    width: 32px;
    height: 32px;
    max-height: 32px;
  }

  .header-toolbar {
    gap: 0.35rem;
  }

  .nav-dropdown {
    width: min(90vw, 300px);
    padding: 4.5rem 1rem 1.25rem;
  }

  .nav-dropdown a {
    font-size: 0.95rem;
    padding: 0.75rem 0.25rem;
  }

  /* Освобождаем место в шапке */
  .header-search {
    display: none;
  }

  .btn.btn-phone {
    padding-left: 0.45rem;
    padding-right: 0.5rem;
    font-size: 0.72rem;
    min-height: 36px;
    height: 36px;
  }

  .header-messenger {
    width: 34px;
    height: 34px;
  }

  .header-auth-link {
    font-size: 0.7rem;
  }

  .hero {
    min-height: 280px;
    padding-bottom: 1.25rem;
  }

  .hero h1 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .hero-buttons {
    gap: 0.55rem;
    padding-top: calc(0.45rem + 12px);
  }

  .hero-buttons .btn {
    min-height: 40px;
    font-size: 0.9rem;
  }
}

/* ==================== RESPONSIVE Этап 3: формы и контентные блоки ==================== */
@media (max-width: 900px) {
  .features-grid {
    --features-count: 2;
  }

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

  .vacancy-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    padding: 1.1rem;
  }

  .service-card-image {
    height: 200px;
  }
}

@media (max-width: 768px) {
  main#account-page.account-shell .account-login-wrap {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  main#account-page.account-shell .auth-form input[type='email'],
  main#account-page.account-shell .auth-form input[type='password'],
  main#account-page.account-shell .auth-form input[type='text'],
  main#account-page.account-shell .auth-form input[type='tel'],
  .auth-form input,
  .auth-otp-form input,
  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    font-size: 16px; /* iOS: без автозума */
    min-height: 44px;
    padding: 0.7rem 0.85rem;
  }

  .contact-form textarea {
    min-height: 120px;
  }

  main.page-section > .container > .contact-form:not(.auth-form):not(.auth-otp-form):not(.contact-form--modal),
  main.create-listing-page > .container > .contact-form:not(.auth-form):not(.auth-otp-form),
  .listing-form-section > .contact-form:not(.auth-form):not(.auth-otp-form),
  .contact-form--modal:not(.auth-form):not(.auth-otp-form) {
    max-width: 100%;
  }

  .features-grid {
    --features-count: 1;
  }

  .services-grid,
  .vacancy-cards-grid {
    grid-template-columns: 1fr;
  }

  .service-card-image {
    height: 180px;
  }

  .card h3 {
    font-size: 1.05rem;
    justify-content: center;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main#account-page.account-shell .account-login-wrap {
    padding: 0;
  }

  main#account-page.account-shell .auth-form .btn[type='submit'],
  .auth-form .btn[type='submit'],
  .auth-otp-form .btn[type='submit'],
  .contact-form > .btn[type='submit'],
  .contact-form > .btn.btn-primary,
  #contacts-form .btn,
  #request-form .btn,
  .guest-contact-form .btn {
    width: 100%;
    align-self: stretch;
  }

  .contact-form label,
  main#account-page.account-shell .auth-field label:not(.checkbox-label) {
    font-size: 0.9rem;
  }

  .card {
    padding: 0.95rem;
  }

  .card:hover {
    transform: translateY(-4px);
  }

  .service-card-image {
    height: 160px;
    padding: 1rem;
  }

  .service-card-image h3 {
    font-size: 1.1rem;
  }

  .service-card-description {
    padding: 1rem;
  }

  .consent-checkbox {
    padding: 0.65rem;
    gap: 0.55rem;
  }

  .consent-checkbox .consent-checkbox__label {
    font-size: 13px;
  }
}

/* ==================== RESPONSIVE Этап 4: CRM iframe + внутренние страницы ==================== */
@media (max-width: 900px) {
  .crm-iframe-container,
  body.account-view--crm .crm-iframe-container {
    min-height: 550px;
    height: calc(100dvh - 240px);
  }

  body.account-view--crm #account-crm-view {
    min-height: calc(100dvh - 160px);
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  html.account-role-manager .crm-sections-grid--compact,
  .crm-sections-grid--compact.crm-sections-grid--manager,
  .crm-sections-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .marketplace-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .listing-card--row {
    grid-template-columns: 140px 1fr;
  }

  .listing-card--row .listing-actions {
    grid-column: 1 / -1;
  }

  .classified-ad-card {
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 768px) {
  .crm-iframe-container,
  body.account-view--crm .crm-iframe-container {
    min-height: min(70vh, 520px);
    height: calc(100dvh - 200px);
    border-radius: 10px;
  }

  body.account-view--crm #account-crm-view {
    min-height: calc(100dvh - 140px);
  }

  #account-crm-iframe {
    min-height: 0;
  }

  html.account-role-manager .crm-sections-grid--compact,
  .crm-sections-grid--compact.crm-sections-grid--manager,
  .crm-sections-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-profile-card {
    padding: 12px;
  }

  .crm-tabs {
    gap: 0.35rem;
  }

  .crm-tab {
    font-size: 0.82rem;
    padding: 0.55rem 0.65rem;
  }

  .marketplace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .listing-card--row .listing-title {
    font-size: 1.05rem;
  }

  .classified-ad-card__content {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .crm-iframe-container,
  body.account-view--crm .crm-iframe-container {
    min-height: min(65vh, 450px);
    height: calc(100dvh - 170px);
    border-radius: 8px;
  }

  html.account-role-manager .crm-sections-grid--compact,
  .crm-sections-grid--compact.crm-sections-grid--manager,
  .crm-sections-grid--compact {
    grid-template-columns: 1fr;
  }

  .user-profile-card {
    padding: 10px;
  }

  .crm-section-card .btn-section {
    width: 100%;
  }

  .listing-card--row .listing-thumb {
    height: 160px;
  }

  .listing-card--row .listing-meta {
    font-size: 0.85rem;
  }

  .classified-ad-card {
    padding: 0.8rem 0.85rem;
  }

  .classified-ad-card__author,
  .classified-ad-card__phone,
  .classified-ad-card__email {
    font-size: 0.88rem;
    overflow-wrap: anywhere;
  }
}

/* ==================== RESPONSIVE Этап 5: Footer, модалки, таблицы, полировка ==================== */

/* Таблицы — базовые адаптивные обёртки */
.responsive-table-wrapper,
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.responsive-table-wrapper table,
.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.responsive-table-wrapper th,
.responsive-table-wrapper td,
.table-responsive th,
.table-responsive td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

/* Footer map min-height (десктоп) */
.footer-col--map .map-container {
  min-height: 280px;
}

@media (max-width: 900px) {
  .footer {
    padding: 0 0 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    padding-top: 1.5rem;
    gap: 1.25rem;
  }

  .footer-col--map {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 260px;
  }

  .footer-col--map .map-container {
    min-height: 250px;
  }

  .footer-important-band {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: 0.5rem;
  }

  .modal-content {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .modal-content--privacy,
  .privacy-modal {
    padding: 2rem 1.5rem;
    padding-top: 3rem;
    max-height: 85vh;
  }

  .delete-account-modal__content {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-col h3 {
    font-size: 0.92rem;
  }

  .footer-col--map .map-container {
    min-height: 220px;
  }

  .footer-address {
    justify-content: flex-start;
  }

  .footer-bottom {
    font-size: 0.8rem;
    padding-top: 0.65rem;
  }

  .modal-overlay {
    padding: 0.65rem;
    align-items: center;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    padding: 1.25rem 1rem 1rem;
    border-radius: 12px;
  }

  .modal-content--privacy,
  .privacy-modal {
    max-width: 100%;
    max-height: 92vh;
    padding: 1.35rem 1rem;
    padding-top: 2.75rem;
  }

  .modal-content h2 {
    font-size: 1.2rem;
    padding-right: 2.5rem;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    top: 0.65rem;
    right: 0.65rem;
  }

  .delete-account-modal {
    width: min(95%, 450px);
  }

  .delete-account-modal__content {
    padding: 1.25rem;
  }

  .delete-account-modal__title {
    font-size: 1.25rem;
  }

  .delete-account-modal__btn {
    min-height: 44px;
  }

  .responsive-table-wrapper th,
  .responsive-table-wrapper td,
  .table-responsive th,
  .table-responsive td {
    padding: 8px;
    font-size: 0.875rem;
  }

  .chat-widget {
    bottom: 12px;
    right: 12px;
  }

  .chat-button {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding-top: 1.15rem;
    gap: 1rem;
  }

  .footer-col h3 {
    font-size: 0.88rem;
  }

  .footer-col p,
  .footer-col .phone-link,
  .footer-col .footer-email-link,
  .footer-nav a {
    font-size: 0.875rem;
  }

  .footer-col--map .map-container {
    min-height: 200px;
  }

  .footer-important-person,
  .footer-important-label {
    font-size: 0.85rem;
  }

  .modal-content {
    padding: 1rem 0.85rem 0.85rem;
    border-radius: 10px;
  }

  .modal-content h2 {
    font-size: 1.1rem;
  }

  .modal-intro,
  .modal-content p {
    font-size: 0.875rem;
  }

  .modal-content--privacy,
  .privacy-modal {
    padding: 1.1rem 0.85rem;
    padding-top: 2.5rem;
  }

  .delete-account-modal {
    width: min(98%, 450px);
  }

  .delete-account-modal__content {
    padding: 1rem;
  }

  .delete-account-modal__title {
    font-size: 1.1rem;
  }

  .delete-account-modal__text {
    font-size: 0.875rem;
  }

  .delete-account-modal__input {
    font-size: 16px;
    min-height: 44px;
  }

  .responsive-table-wrapper table,
  .table-responsive table {
    min-width: 420px;
  }

  .responsive-table-wrapper th,
  .responsive-table-wrapper td,
  .table-responsive th,
  .table-responsive td {
    padding: 6px;
    font-size: 0.8rem;
  }

  a,
  .listing-desc,
  .classified-ad-card__content {
    overflow-wrap: anywhere;
  }
}

/* ==================== BREAKPOINT ≤375px (iPhone SE / узкий mobile) ==================== */
@media (max-width: 375px) {
  :root {
    --font-size-root: 12px;
    --font-size-body: 12px;
    --container-padding: 10px;
    --card-gap: 10px;
    --header-logo-gap: 0.35rem;
    --header-toolbar-even-gap: 0.3rem;
    --header-user-btn-w: 6rem;
    --header-control-h: 36px;
    --header-icon-size: 16px;
    --font-size-h1: 1.35rem;
    --font-size-h2: 1.2rem;
    --font-size-h3: 1.05rem;
    --font-size-lead: 0.95rem;
  }

  html {
    font-size: 12px;
  }

  body {
    font-size: 12px;
    line-height: 1.55;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .header {
    padding: 0.4rem 0;
  }

  .header-inner {
    gap: 0.4rem;
  }

  .header-toolbar {
    gap: 0.3rem;
    min-width: 0;
  }

  .logo-mark,
  .logo img,
  .logo .custom-logo {
    width: 30px;
    height: 30px;
    max-height: 30px;
  }

  .burger {
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    margin: -8px;
  }

  .burger span {
    width: 20px;
  }

  .btn.btn-phone {
    font-size: 0.7rem;
    padding: 0 0.4rem;
    min-height: 36px;
    height: 36px;
    gap: 0.25rem;
  }

  .btn.btn-phone .icon {
    width: 14px;
    height: 14px;
  }

  .header-messenger {
    width: 32px;
    height: 32px;
  }

  .header-messenger .icon {
    width: 18px;
    height: 18px;
  }

  .header-auth {
    max-width: var(--header-user-btn-w);
  }

  .header-auth-link {
    font-size: 0.68rem;
    padding: 0 0.25rem;
    min-height: 36px;
    height: 36px;
  }

  .header-username {
    max-width: 3.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .phone-dropdown-menu a,
  .header-phone-dropdown .phone-dropdown-menu .phone-link {
    font-size: 12px;
    min-height: 40px;
  }

  .hero {
    min-height: 260px;
    padding-bottom: 1.1rem;
  }

  .hero h1 {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    min-height: 40px;
    font-size: 0.9rem;
    padding: 0.65rem 0.9rem;
  }

  .card,
  .feature-card,
  .service-card,
  .vacancy-card .card-body {
    padding: 0.75rem;
  }

  .card h3,
  .feature-card h3,
  .service-card-image h3 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .card p,
  .feature-card p,
  .service-card-description {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .features-grid,
  .services-grid,
  .vacancy-cards-grid {
    gap: 10px;
  }

  .btn:not(.btn-phone):not(.burger) {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea,
  .form-group select,
  .contact-form input,
  .contact-form textarea,
  .contact-form select,
  .auth-form input {
    font-size: 16px;
    min-height: 40px;
  }

  .footer-col h3 {
    font-size: 0.95rem;
  }

  .footer-col p,
  .footer-col a,
  .footer-nav a {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .footer-col--map .map-container {
    min-height: 180px;
  }

  .crm-sections-grid--compact .crm-section-card h3 {
    font-size: 0.8rem;
  }

  .crm-sections-grid--compact .crm-section-card p {
    font-size: 0.8rem;
  }
}

@media (min-width: 376px) and (max-width: 400px) {
  :root {
    --font-size-root: 12px;
    --font-size-body: 12px;
    --header-user-btn-w: 6.25rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.95rem;
  }
}

/* ==================== UI: features + nav stacking ==================== */
@media (max-width: 768px) {
  .features-grid > .card {
    padding: 1.25rem 1rem;
  }

  .features-grid > .card h3 {
    font-size: 1.1rem;
  }

  .features-grid > .card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

@media (max-width: 375px) {
  .features-grid > .card {
    padding: 1.1rem 0.9rem;
  }

  .features-grid > .card h3 {
    font-size: 1.05rem;
  }

  .features-grid > .card p {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}
