@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --portal-bg: #f4f6f9;
  --portal-surface: #ffffff;
  --portal-text: #0f172a;
  --portal-muted: #64748b;
  --portal-border: #e2e8f0;
  --portal-accent: #2563eb;
  --portal-accent-2: #0ea5e9;
  --portal-accent-hover: #1d4ed8;
  --portal-warm: #f97316;
  --portal-dark: #0c1222;
  --portal-dark-2: #151d32;
  --portal-radius: 16px;
  --portal-radius-lg: 24px;
  --portal-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 20px 40px -12px rgba(15, 23, 42, 0.08);
  --portal-shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
  --portal-max: 1240px;
  --portal-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.portal {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--portal-text);
  background: var(--portal-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.portal-container {
  width: min(var(--portal-max), calc(100% - 40px));
  margin: 0 auto;
}

main { flex: 1; }

/* ─── Header ─── */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.portal-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.portal-logo__img {
  height: 34px;
  width: auto;
  display: block;
}

.portal-logo__img--footer {
  height: 40px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
}

.portal-logo span { color: var(--portal-accent); }

.portal-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.portal-nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-muted);
  transition: color 0.2s var(--portal-ease), background 0.2s var(--portal-ease);
}

.portal-nav a:hover {
  color: var(--portal-text);
  background: rgba(15, 23, 42, 0.04);
}

.portal-nav a.is-active {
  color: var(--portal-accent);
  background: rgba(37, 99, 235, 0.08);
}

.portal-nav a.portal-nav__promo {
  color: #166534;
  background: rgba(22, 163, 74, 0.08);
  font-weight: 700;
}

.portal-nav a.portal-nav__promo::after {
  content: '%';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.portal-nav a.portal-nav__promo:hover {
  color: #14532d;
  background: rgba(22, 163, 74, 0.14);
}

.portal-nav a.portal-nav__promo.is-active {
  color: #fff;
  background: #16a34a;
}

.portal-nav a.portal-nav__promo.is-active::after {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.portal-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

.portal-header__phone {
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-text);
  white-space: nowrap;
}

.portal-header__user {
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Buttons ─── */
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--portal-ease), box-shadow 0.2s var(--portal-ease), background 0.2s;
}

.portal-btn:active { transform: scale(0.98); }

.portal-btn--primary {
  background: linear-gradient(135deg, var(--portal-accent) 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.portal-btn--primary:hover {
  background: linear-gradient(135deg, var(--portal-accent-hover) 0%, var(--portal-accent) 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.portal-btn--outline {
  background: #fff;
  border: 1.5px solid var(--portal-border);
  color: var(--portal-text);
}

.portal-btn--outline:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  background: rgba(37, 99, 235, 0.03);
}

.portal-btn--ghost {
  background: transparent;
  color: var(--portal-muted);
  padding: 8px 14px;
}

.portal-btn--ghost:hover { color: var(--portal-text); background: rgba(0,0,0,0.04); }

.portal-btn--sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; }

.portal-btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  flex: none !important;
  border-radius: 10px;
  font-size: 18px;
}

/* ─── Hero banner ─── */
.portal-hero-banner {
  position: relative;
  padding: 56px 0 0;
  overflow: hidden;
}

.portal-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 420px;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(37, 99, 235, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #e8eef8 0%, var(--portal-bg) 100%);
  z-index: 0;
}

.portal-hero-banner__inner {
  position: relative;
  z-index: 1;
}

.portal-hero-banner__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 40px;
}

.portal-hero-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  color: var(--portal-accent);
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.portal-hero-banner__badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.portal-hero-banner h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.portal-hero-banner h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portal-hero-banner__lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--portal-muted);
  max-width: 480px;
  line-height: 1.65;
}

.portal-hero-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-hero-banner__visual {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  box-shadow: var(--portal-shadow-lg);
  background: linear-gradient(145deg, #1e3a5f 0%, #0f2744 40%, #1a4d7a 100%);
}

.portal-hero-banner__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.5) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 48px);
}

.portal-hero-banner__visual-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  z-index: 1;
  color: #fff;
}

.portal-hero-banner__visual-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.portal-hero-banner__visual-sub {
  font-size: 14px;
  opacity: 0.85;
  margin: 0;
}

.portal-hero-banner__float {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--portal-shadow);
  font-size: 13px;
  font-weight: 700;
}

.portal-hero-banner__float span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--portal-accent);
  letter-spacing: -0.02em;
}

/* Compact hero (catalog etc.) */
.portal-hero {
  padding: 40px 0 24px;
  background: linear-gradient(180deg, #e8eef8 0%, var(--portal-bg) 100%);
}

.portal-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.portal-hero p {
  margin: 0;
  font-size: 16px;
  color: var(--portal-muted);
}

/* ─── Filters ─── */
.portal-filters {
  position: relative;
  z-index: 2;
  background: var(--portal-surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--portal-radius-lg);
  padding: 28px 32px;
  margin: -20px 0 40px;
  box-shadow: var(--portal-shadow-lg);
}

.portal-filters--flat {
  margin: 0 0 24px;
}

.portal-chips--catalog {
  margin: 0 0 16px;
}

.portal-filters--advanced {
  padding: 24px 28px 20px;
  box-shadow: var(--portal-shadow);
}

.portal-filters__grid-advanced {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
}

.portal-filter-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.portal-filter-cell__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.portal-filter-cell__label--ghost {
  visibility: hidden;
}

.portal-filter-cell__control {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.portal-filter-cell--range .portal-filter-cell__control {
  align-items: stretch;
}

.portal-filter-cell--action .portal-filter-cell__control {
  align-items: stretch;
}

.portal-room-tabs {
  display: flex;
  width: 100%;
  gap: 0;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--portal-border);
}

.portal-room-tabs__btn {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.portal-room-tabs__btn:hover {
  color: var(--portal-text);
}

.portal-room-tabs__btn.is-active {
  background: #fff;
  color: var(--portal-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.portal-filter-select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--portal-text);
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.portal-filter-select:hover {
  border-color: #cbd5e1;
}

.portal-filter-select:focus {
  outline: none;
  border-color: var(--portal-accent);
}

.portal-filter-select.is-set {
  border-color: #94a3b8;
  font-weight: 600;
}

.portal-range {
  --range-left: 0%;
  --range-right: 0%;
  width: 100%;
  padding-top: 2px;
}

.portal-range__values {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--portal-text);
  line-height: 1;
}

.portal-range.is-active .portal-range__values span {
  color: var(--portal-accent);
}

.portal-range__track {
  position: relative;
  height: 20px;
}

.portal-range__track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: #e2e8f0;
  border-radius: 999px;
}

.portal-range__track::after {
  content: '';
  position: absolute;
  left: var(--range-left);
  right: var(--range-right);
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: var(--portal-text);
  border-radius: 999px;
}

.portal-range input[type='range'] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.portal-range input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--portal-text);
  background: #fff;
  pointer-events: auto;
  cursor: grab;
}

.portal-range input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--portal-text);
  background: #fff;
  pointer-events: auto;
  cursor: grab;
}

.portal-filters__submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--portal-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.portal-filters__submit:hover {
  background: var(--portal-accent-hover);
}

.portal-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-border);
}

.portal-filter-tag {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.portal-filter-tag input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.portal-filter-tag span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--portal-border);
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.portal-filter-tag:hover span {
  border-color: #cbd5e1;
  color: var(--portal-text);
}

.portal-filter-tag.is-active span,
.portal-filter-tag input:checked + span {
  background: #fff;
  border-color: var(--portal-text);
  color: var(--portal-text);
  font-weight: 600;
}

.portal-filters__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--portal-text);
}

.portal-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}

.portal-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--portal-muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-field select,
.portal-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--portal-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: #fafbfc;
  color: var(--portal-text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.portal-field select:hover,
.portal-field input:hover { border-color: #cbd5e1; background: #fff; }

.portal-field select:focus,
.portal-field input:focus {
  outline: none;
  border-color: var(--portal-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.portal-password-field {
  position: relative;
}

.portal-password-field input {
  padding-right: 46px;
}

.portal-password-field__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s, background 0.2s;
}

.portal-password-field__toggle:hover {
  color: var(--portal-accent);
  background: rgba(37, 99, 235, 0.08);
}

.portal-password-field__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.portal-password-field__icon--hide {
  display: none;
}

.portal-password-field__toggle.is-visible .portal-password-field__icon--show {
  display: none;
}

.portal-password-field__toggle.is-visible .portal-password-field__icon--hide {
  display: block;
}

.portal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-border);
}

.portal-chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--portal-border);
  background: #fafbfc;
  transition: all 0.2s var(--portal-ease);
}

.portal-chip:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  background: rgba(37, 99, 235, 0.06);
}

.portal-chip.is-active {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  background: rgba(37, 99, 235, 0.1);
}

.portal-curator-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 180;
}

.portal-curator-fab__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--portal-accent) 0%, var(--portal-accent-2) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.35),
    0 12px 28px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s var(--portal-ease);
}

.portal-curator-fab__btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(37, 99, 235, 0.42),
    0 16px 32px rgba(15, 23, 42, 0.14);
}

.portal-curator-fab__btn:active {
  transform: translateY(0);
}

.portal-curator-fab__icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.portal-curator-fab__label {
  white-space: nowrap;
}

.portal-curator-modal[hidden] {
  display: none;
}

.portal-curator-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
}

.portal-curator-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.portal-curator-modal__dialog {
  position: relative;
  width: min(1100px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 32px 32px 36px;
  box-shadow: var(--portal-shadow-lg);
  outline: none;
  animation: portal-curator-modal-in 0.28s var(--portal-ease);
}

@keyframes portal-curator-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-curator-modal__header {
  margin: 0 44px 28px 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--portal-border);
  text-align: center;
}

.portal-curator-modal__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--portal-text);
}

.portal-curator-modal__lead {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--portal-muted);
  font-size: 15px;
  line-height: 1.6;
}

.portal-curator-modal__lead-link {
  color: var(--portal-accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.28);
  transition: color 0.2s var(--portal-ease), border-color 0.2s var(--portal-ease);
}

.portal-curator-modal__lead-link:hover {
  color: var(--portal-accent-hover);
  border-bottom-color: var(--portal-accent);
}

.portal-curator-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portal-manager-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s var(--portal-ease), box-shadow 0.25s var(--portal-ease);
}

.portal-manager-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.portal-manager-card__media {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(145deg, #dce4f0 0%, #eef2f7 100%);
}

.portal-manager-card__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 18, 34, 0.12) 100%);
  pointer-events: none;
}

.portal-manager-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.portal-manager-card__media--portrait .portal-manager-card__photo {
  object-position: center 24%;
}

.portal-manager-card__media--portrait-high .portal-manager-card__photo {
  object-position: center 30%;
}

.portal-manager-card__media--portrait-full .portal-manager-card__photo {
  object-position: center 10%;
}

.portal-manager-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 18px 18px 20px;
}

.portal-manager-card__head {
  flex: 1;
}

.portal-manager-card__name {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--portal-text);
}

.portal-manager-card__role {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--portal-muted);
}

.portal-manager-card__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-manager-card__contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--portal-bg);
  color: var(--portal-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s var(--portal-ease), color 0.2s var(--portal-ease);
}

.portal-manager-card__contact span:last-child {
  min-width: 0;
  word-break: break-word;
}

.portal-manager-card__contact:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--portal-accent);
}

.portal-manager-card__contact-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--portal-accent);
}

.portal-curator-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--portal-bg);
  color: var(--portal-muted);
  cursor: pointer;
  transition: background 0.2s var(--portal-ease), color 0.2s var(--portal-ease);
}

.portal-curator-modal__close:hover {
  background: rgba(15, 23, 42, 0.08);
  color: var(--portal-text);
}

body.portal-curator-modal-open {
  overflow: hidden;
}

/* ─── Stats ─── */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}

.portal-stat {
  position: relative;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 24px;
  overflow: hidden;
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s;
}

.portal-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow);
}

.portal-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--portal-accent), var(--portal-accent-2));
  opacity: 0;
  transition: opacity 0.2s;
}

.portal-stat:hover::before { opacity: 1; }

.portal-stat__value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.portal-stat__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-muted);
  margin-top: 6px;
}

/* ─── Cooperation terms ─── */
.portal-cooperation {
  background: #eef1f5;
  padding: 48px 0 56px;
  margin-bottom: 0;
}

.portal-cooperation__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.portal-cooperation__period {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-muted);
  letter-spacing: 0.01em;
}

.portal-cooperation__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.portal-cooperation__lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--portal-text);
  font-weight: 600;
}

.portal-cooperation__intro {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--portal-text);
}

.portal-cooperation__intro--highlight {
  font-size: 16px;
  font-weight: 700;
  color: var(--portal-accent);
}

.portal-cooperation__alert {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  font-size: 14px;
  line-height: 1.6;
  color: var(--portal-text);
  font-weight: 600;
}

.portal-cooperation__clauses {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.portal-cooperation__clause-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--portal-text);
}

.portal-cooperation__clause-bullets {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-cooperation__clause-bullets li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--portal-text);
}

.portal-cooperation__clause-bullets li::before {
  content: '- ';
}

.portal-cooperation__rates {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-cooperation__rate {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  line-height: 1.5;
}

.portal-cooperation__rate-num {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--portal-muted);
  min-width: 1.2em;
}

.portal-cooperation__rate-value {
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-cooperation__rate-text {
  color: var(--portal-text);
}

.portal-cooperation__notes {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.portal-cooperation__notes-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.portal-cooperation__notes ul,
.portal-cooperation__notes-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portal-cooperation__notes li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--portal-muted);
}

.portal-cooperation__cta {
  display: inline-flex;
}

.portal-cooperation__visual {
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  aspect-ratio: 4 / 5;
  max-height: 520px;
}

.portal-cooperation__visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ─── Sections ─── */
.portal-section {
  margin-bottom: 56px;
}

.portal-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.portal-section-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

.portal-section-sub {
  font-size: 14px;
  color: var(--portal-muted);
  margin: 6px 0 0;
  font-weight: 500;
}

.portal-section-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-accent);
  white-space: nowrap;
}

.portal-section-link:hover { text-decoration: underline; }

/* ─── Project cards ─── */
.portal-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.portal-project-card {
  background: var(--portal-surface);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  border: 1px solid var(--portal-border);
  box-shadow: var(--portal-shadow);
  transition: transform 0.25s var(--portal-ease), box-shadow 0.25s;
}

.portal-project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--portal-shadow-lg);
}

.portal-project-card__visual {
  position: relative;
  height: 200px;
  background:
    linear-gradient(160deg, rgba(15,23,42,0) 30%, rgba(15,23,42,0.55) 100%),
    linear-gradient(135deg, #2d6a4f 0%, #40916c 30%, #52b788 60%, #74c69d 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: #fff;
}

.portal-project-card__visual-city {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-project-card__visual-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  color: var(--portal-accent);
  font-size: 12px;
  font-weight: 800;
}

.portal-project-card__body { padding: 24px; }

.portal-project-card__name {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.portal-project-card__meta {
  font-size: 14px;
  color: var(--portal-muted);
  margin: 0 0 16px;
  font-weight: 500;
}

.portal-project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.portal-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.portal-tag--accent {
  background: rgba(37, 99, 235, 0.1);
  color: var(--portal-accent);
}

.portal-tag--green {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
}

.portal-project-card__price {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.portal-project-card__price small {
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-muted);
}

/* ─── Project news ─── */
.portal-section--news {
  margin-bottom: 56px;
}

.portal-section-head--news {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.portal-news__more {
  flex-shrink: 0;
}

.portal-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portal-news-card.is-hidden {
  display: none;
}

.portal-news-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.portal-news-card__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  background: #e2e8f0;
  margin-bottom: 16px;
}

.portal-news-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-news-card__arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-news-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--portal-muted);
  margin-bottom: 12px;
  white-space: nowrap;
}

.portal-news-card__meta time {
  white-space: nowrap;
}

.portal-news-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.portal-news-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--portal-text);
  letter-spacing: -0.02em;
}

.portal-news-card__excerpt {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--portal-muted);
}

.portal-news__grid--page,
.portal-news__grid--related {
  margin-bottom: 56px;
}

.portal-hero--news {
  padding-bottom: 36px;
}

.portal-news-page {
  padding-bottom: 56px;
}

.portal-news-article__top {
  padding: 28px 0 24px;
  max-width: 820px;
}

.portal-news-article__back {
  display: inline-flex;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-accent);
  text-decoration: none;
}

.portal-news-article__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--portal-muted);
  margin-bottom: 12px;
}

.portal-news-article__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 800;
}

.portal-news-article__lead {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--portal-muted);
}

.portal-news-article__hero {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: #e2e8f0;
}

.portal-news-article__hero img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  padding: 16px 0;
}

.portal-news-article__body-wrap {
  padding: 32px 0 56px;
  max-width: 820px;
}

.portal-news-article__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--portal-text);
}

.portal-news-article__body p {
  margin: 0 0 18px;
}

.portal-news-article__gallery {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--portal-border);
}

.portal-news-article__gallery h2 {
  margin: 0 0 20px;
  font-size: 22px;
}

.portal-news-article__gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-news-article__gallery-item {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.portal-news-article__gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  display: block;
}

.portal-section--news-related {
  padding-bottom: 56px;
  background: #f8fafc;
}

.portal-news__load-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.portal-news__load {
  min-width: 220px;
}

/* ─── Construction progress ─── */
.portal-section--construction {
  margin-bottom: 56px;
}

.portal-section-head--construction {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.portal-construction__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-construction__filter {
  border: none;
  background: #f1f5f9;
  color: var(--portal-text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.portal-construction__filter.is-active {
  background: #7ab800;
  color: #fff;
}

.portal-construction__track-wrap {
  overflow: hidden;
}

.portal-construction__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.portal-construction-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.portal-construction-card.is-hidden {
  display: none;
}

.portal-construction-card__visual {
  position: relative;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  background: #e2e8f0;
}

.portal-construction-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-construction-card__label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.45);
}

/* ─── Location map (Yandex) ─── */
.portal-section--location {
  margin-bottom: 56px;
}

.portal-section-head--location {
  align-items: flex-end;
  margin-bottom: 24px;
}

.portal-location-map {
  position: relative;
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  border: 1px solid var(--portal-border);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow);
}

.portal-location-map__toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.portal-location-map__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.portal-location-map__filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--portal-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  transition: background 0.2s var(--portal-ease), color 0.2s var(--portal-ease), transform 0.15s;
}

.portal-location-map__filter:hover {
  transform: translateY(-1px);
}

.portal-location-map__filter.is-active {
  background: var(--filter-color, #7AB800);
  color: #fff;
}

.portal-location-map__filter.is-active svg {
  color: #fff;
}

.portal-location-map__filter:not(.is-active) svg {
  color: var(--filter-color, var(--portal-muted));
}

.portal-location-map__open {
  pointer-events: auto;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 13px;
}

.portal-btn--dark {
  background: var(--portal-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(12, 18, 34, 0.25);
}

.portal-btn--dark:hover {
  background: var(--portal-dark-2);
  color: #fff;
}

.portal-location-map__toolbar--simple {
  position: static;
  justify-content: flex-end;
  padding: 12px 16px 0;
  pointer-events: auto;
}

.portal-location-map__constructor {
  width: 100%;
  min-height: 520px;
  line-height: 0;
  background: #e8edf2;
}

.portal-location-map__constructor iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

.portal-location-map__canvas {
  width: 100%;
  height: 520px;
  background: #e8edf2;
}

.portal-location-map__fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(244, 246, 249, 0.96);
}

.portal-location-map__fallback p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.5;
}

.portal-location-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--portal-border);
}

.portal-location-stats__value {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--portal-text);
  line-height: 1.1;
}

.portal-location-stats__value span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-muted);
  margin-top: 2px;
}

.portal-location-stats__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--portal-muted);
}

.portal-ymap-pin--main {
  position: relative;
  width: 56px;
  height: 60px;
}

.portal-ymap-pin__photo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  background: #fff;
}

.portal-ymap-pin__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-ymap-pin__tail {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 4px rgba(15, 23, 42, 0.12);
}

/* ─── Features strip ─── */
.portal-amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
  align-items: stretch;
}

.portal-amenity-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s;
}

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

.portal-amenity-card__photo {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.portal-amenity-card__body {
  flex: 1;
  padding: 18px 20px 22px;
}

.portal-amenity-card__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.portal-amenity-card__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--portal-muted);
}


.portal-section--banks {
  margin-bottom: 48px;
}

.portal-bank-marquee {
  position: relative;
  overflow: hidden;
  margin-top: 4px;
  padding: 18px 0;
  border-radius: var(--portal-radius);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--portal-border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.portal-bank-marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  will-change: transform;
  opacity: 0;
  animation: portal-bank-marquee var(--marquee-duration, 36s) linear infinite;
}

.portal-bank-marquee__track.is-ready {
  opacity: 1;
}

.portal-bank-marquee:hover .portal-bank-marquee__track {
  animation-play-state: paused;
}

.portal-bank-marquee__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
}

.portal-bank-marquee__logo img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s;
}

.portal-bank-marquee__logo:hover img {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

.portal-bank-marquee__logo--mkb {
  width: 96px;
}

.portal-bank-marquee__logo--mkb img {
  width: 88px;
  height: 28px;
  border-radius: 0;
  box-shadow: none;
}

.portal-bank-marquee__logo--psb {
  width: 92px;
}

.portal-bank-marquee__logo--psb img {
  width: 84px;
  height: auto;
  max-height: 32px;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

@keyframes portal-bank-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--marquee-distance, 0px)), 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-bank-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: none;
  }

  .portal-bank-marquee::-webkit-scrollbar {
    display: none;
  }

  .portal-bank-marquee__track {
    animation: none;
  }
}

.portal-feature__title {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 4px;
}

.portal-feature__text {
  font-size: 13px;
  color: var(--portal-muted);
  margin: 0;
  font-weight: 500;
}

/* ─── Genplan ─── */
.portal-genplan-wrap {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 32px;
  margin-bottom: 56px;
  box-shadow: var(--portal-shadow);
}

.portal-genplan-wrap .agent-genplan__stage { position: relative; width: 100%; border-radius: 12px; overflow: hidden; }
.portal-genplan-wrap .agent-genplan__svg { display: block; width: 100%; height: auto; }
.portal-genplan-wrap .agent-genplan__link { cursor: pointer; }
.portal-genplan-wrap .agent-genplan__zone { cursor: default; }
.portal-genplan-wrap .agent-genplan__house {
  fill: transparent;
  stroke: transparent;
  transition: fill 0.25s, stroke 0.25s, filter 0.25s;
}
.portal-genplan-wrap .agent-genplan__link:hover .agent-genplan__house,
.portal-genplan-wrap .agent-genplan__zone:hover .agent-genplan__house {
  fill: rgba(37, 99, 235, 0.35);
  stroke: var(--portal-accent);
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.6));
}

.portal-genplan-wrap .agent-genplan__tooltip {
  position: absolute;
  background: var(--portal-dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: var(--portal-shadow-lg);
  pointer-events: none;
  z-index: 5;
}

.portal-chip--static {
  cursor: default;
  pointer-events: none;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: var(--portal-muted);
}

/* ─── Catalog cards ─── */
.portal-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.portal-apt-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s, border-color 0.2s;
}

.portal-apt-card--clickable {
  position: relative;
  cursor: pointer;
}

.portal-apt-card__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.portal-apt-card__actions {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 8px;
}

.portal-apt-card__actions .portal-btn { flex: 1; }

.portal-apt-card__open-hint {
  pointer-events: none;
}

.portal-apt-card__fav {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.portal-apt-card__fav.is-active {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.portal-apt-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--portal-shadow);
  border-color: #cbd5e1;
}

.portal-apt-card__visual {
  height: 200px;
  min-height: 200px;
  padding: 10px 12px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(37,99,235,0.05) 23px, rgba(37,99,235,0.05) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(37,99,235,0.05) 23px, rgba(37,99,235,0.05) 24px),
    linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portal-apt-card__visual-room {
  font-size: 42px;
  font-weight: 800;
  color: rgba(37, 99, 235, 0.2);
  letter-spacing: -0.04em;
}

.portal-apt-card__plan {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.portal-apt-card__visual-num {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--portal-muted);
  background: rgba(255,255,255,0.92);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  z-index: 1;
}

.portal-apt-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.portal-apt-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-apt-card__rooms {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-apt-card__status {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-apt-card__status--6 { background: #f1f5f9; color: #64748b; }
.portal-apt-card__status--7 { background: #dcfce7; color: #166534; }
.portal-apt-card__status--8 { background: #fef3c7; color: #b45309; }
.portal-apt-card__status--9 { background: #f1f5f9; color: #64748b; }

.portal-apt-card__place {
  font-size: 13px;
  color: var(--portal-muted);
  font-weight: 500;
}

.portal-apt-card__price {
  font-size: 20px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.02em;
}

.portal-apt-card--discount {
  border-color: #fdba74;
  box-shadow: 0 8px 24px rgba(251, 146, 60, 0.12);
}

.portal-apt-card__discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

.portal-apt-card__discount-icon {
  font-size: 13px;
  line-height: 1;
}

.portal-apt-card__price--discount {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.portal-apt-card__price-old {
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-muted);
  text-decoration: line-through;
}

.portal-apt-card__area {
  font-size: 13px;
  color: var(--portal-muted);
  font-weight: 600;
}

.portal-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--portal-surface);
  border-radius: var(--portal-radius-lg);
  border: 1px dashed var(--portal-border);
  color: var(--portal-muted);
  margin-bottom: 56px;
}

.portal-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* ─── Footer ─── */
.portal-footer {
  background: var(--portal-dark);
  color: #94a3b8;
  padding: 56px 0 28px;
  margin-top: auto;
}

.portal-footer a { color: #cbd5e1; transition: color 0.15s; }
.portal-footer a:hover { color: #fff; }

.portal-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.portal-footer__brand {
  max-width: 280px;
}

.portal-footer__brand .portal-logo {
  color: #fff;
  margin-bottom: 12px;
}

.portal-footer__brand p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.portal-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.portal-footer__title {
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}

.portal-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-footer__links li { margin-bottom: 10px; font-size: 14px; font-weight: 500; }

.portal-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0 24px;
  margin-bottom: 4px;
}

.portal-footer__legal a {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.35);
  text-underline-offset: 3px;
  max-width: 42ch;
}

.portal-footer__legal a:hover {
  color: #e2e8f0;
  text-decoration-color: rgba(226, 232, 240, 0.6);
}

.portal-footer__copy {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 13px;
  font-weight: 500;
}

.portal-legal {
  padding-bottom: 64px;
}

.portal-legal__top {
  padding: 40px 0 28px;
}

.portal-legal__back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-muted);
}

.portal-legal__back:hover {
  color: var(--portal-accent);
}

.portal-legal__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--portal-text);
}

.portal-legal__subtitle {
  margin: 14px 0 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--portal-muted);
}

.portal-legal__body {
  max-width: 820px;
  padding-bottom: 24px;
}

.portal-legal__section + .portal-legal__section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--portal-border);
}

.portal-legal__section h2 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--portal-text);
}

.portal-legal__section p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--portal-text-secondary, #475569);
}

.portal-legal__section p:last-child {
  margin-bottom: 0;
}

.portal-legal__section ul {
  margin: 0;
  padding-left: 1.2em;
}

.portal-legal__section li {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--portal-text-secondary, #475569);
}

.portal-legal__section li:last-child {
  margin-bottom: 0;
}

/* ─── Auth ─── */
.portal-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.portal-auth__side {
  position: relative;
  background: linear-gradient(145deg, #0f2744 0%, #1e3a5f 50%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: #fff;
  overflow: hidden;
}

.portal-auth__side::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(14,165,233,0.3) 0%, transparent 50%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 60px);
}

.portal-auth__side-content {
  position: relative;
  z-index: 1;
}

.portal-auth__side h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.portal-auth__side p {
  font-size: 16px;
  opacity: 0.85;
  margin: 0 0 24px;
  max-width: 360px;
  line-height: 1.6;
}

.portal-auth__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 380px;
}

.portal-auth__steps li {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.92;
  padding-left: 0;
}

.portal-auth__steps strong {
  font-weight: 800;
}

.portal-auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--portal-bg);
}

.portal-auth-card {
  width: 100%;
  max-width: 400px;
}

.portal-auth-card--register {
  max-width: 480px;
}

.portal-auth-card__logo {
  display: inline-flex;
  margin-bottom: 20px;
}

.portal-auth-card__logo img {
  display: block;
}

.portal-auth-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portal-auth-form__grid .portal-field {
  margin-bottom: 0;
}

.portal-auth-card--register .portal-field {
  margin-bottom: 16px;
}

.portal-auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--portal-muted);
  font-weight: 500;
  cursor: pointer;
}

.portal-auth-consent input {
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--portal-accent);
}

.portal-auth-captcha {
  margin: 0 0 16px;
}

.portal-auth-captcha__widget {
  min-height: 102px;
}

.portal-auth-card__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--portal-muted);
  font-weight: 500;
}

.portal-auth-card__footer a {
  color: var(--portal-accent);
  font-weight: 700;
}

.portal-auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.portal-auth-card .portal-sub {
  color: var(--portal-muted);
  font-size: 15px;
  margin: 0 0 32px;
  font-weight: 500;
}

.portal-auth-card .portal-field { margin-bottom: 18px; }
.portal-auth-card .portal-btn { width: 100%; margin-top: 8px; padding: 14px; }

.portal-err {
  background: #fef2f2;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #fecaca;
}

/* ─── Chess ─── */
.portal-chess-wrap {
  padding: 32px 0 56px;
  background: var(--portal-bg);
}

.portal-chess-wrap .container {
  width: min(var(--portal-max), calc(100% - 40px));
  margin: 0 auto;
  background: var(--portal-surface);
  border-radius: var(--portal-radius-lg);
  border: 1px solid var(--portal-border);
  padding: 28px;
  box-shadow: var(--portal-shadow);
}

.portal-page-head { margin-bottom: 24px; }

.portal-page-head--with-photo {
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-page-head__photo {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--portal-radius);
  flex-shrink: 0;
  box-shadow: var(--portal-shadow);
}

.portal-page-head h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-page-head p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 14px;
  font-weight: 500;
}

.portal-house-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px;
  background: #f1f5f9;
  border-radius: 14px;
  width: fit-content;
}

.portal-house-tabs a {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--portal-muted);
  transition: all 0.2s;
}

.portal-house-tabs a:hover { color: var(--portal-text); }

.portal-house-tabs a.is-active {
  background: #fff;
  color: var(--portal-accent);
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}

.portal-chess-wrap .cards-row { align-items: flex-start; }
.portal-chess-wrap .cards-row > .card { flex: 0 0 auto; }

/* Force visible chess grid layout for Bitrix data */
.portal-chess-section-title {
  margin: 28px 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--portal-text, #1e293b);
  letter-spacing: -0.02em;
}

.portal-chess-wrap #chess-container .table-wrapper { margin-top: 8px; overflow-x: auto; }
.portal-chess-wrap #chess-container .table-wrapper table { min-width: 1200px; }
.portal-chess-wrap #chess-container .table-wrapper table tr {
  display: flex;
  align-items: stretch;
  min-height: 48px;
}

/* Колонка этажей: сброс унаследованного .tile tr td { width: 38px } */
.portal-chess-wrap #chess-container .table-wrapper .table.tile tr td.col-first {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: auto !important;
  min-height: 48px;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
  border-right: 1px solid var(--portal-border);
  overflow: hidden;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--portal-text);
}

.portal-chess-wrap #chess-container .table-wrapper .table.tile tr td.col-first .heading {
  display: block;
  margin: 0 !important;
  height: auto !important;
  line-height: 1 !important;
  font-size: inherit;
  font-weight: inherit;
}

.portal-chess-wrap #chess-container .table-wrapper table tr > td:nth-child(2) {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 3px;
  min-height: 48px;
  width: auto !important;
  height: auto !important;
  padding-left: 6px;
  flex: 1 1 auto;
  overflow: visible;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table tr > td:nth-child(2) .card-btn {
  display: block;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table tr > td:nth-child(2) .card {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  box-shadow: none !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card-number {
  display: none !important;
}

.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper .table.tile tr td.col-first,
.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper .table.tile-plus tr td.col-first {
  min-height: 44px;
  align-self: stretch;
}

.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper {
  overflow: visible;
}

.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper table {
  min-width: auto;
  width: 100%;
}

.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper table tr {
  align-items: center;
  min-height: 44px;
}

.portal-chess-wrap.chess-view-tile #chess-container .table-wrapper table tr > td:nth-child(2) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 4px;
  min-height: 44px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin: 0;
  overflow: visible;
}

.chess-discount-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.45);
  pointer-events: none;
}

.chess-discount-badge--compact {
  top: -4px;
  right: -4px;
  width: 14px;
  min-width: 14px;
  height: 14px;
  padding: 0;
  font-size: 8px;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card-btn {
  position: relative;
  overflow: visible;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card {
  position: relative !important;
  overflow: visible !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .chess-discount-badge {
  top: -6px;
  right: -6px;
  font-size: 7px;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-number {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  box-sizing: border-box;
  border-radius: 5px;
  border: 1px solid var(--portal-border);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #2e3a4d;
  cursor: pointer;
  z-index: 1;
  overflow: visible;
  transition: background 0.15s var(--portal-ease), border-color 0.15s var(--portal-ease);
}

.portal-chess-wrap.chess-view-tile #chess-container .card-number.card-status-7:hover {
  background: #ffffff !important;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Tooltip: полный сброс grid-стилей из main.css */
.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  width: 188px !important;
  min-width: 188px !important;
  max-width: 188px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #cfd8e3 !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  transition: opacity 0.15s var(--portal-ease), visibility 0.15s var(--portal-ease);
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn:hover .card:not(.card-status-9):not(.card--agent-locked) {
  opacity: 1;
  visibility: visible;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: auto;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #cfd8e3;
  border-top: 1px solid #cfd8e3;
  border-right: none;
  border-bottom: none;
  transform: translateX(-50%) rotate(45deg);
  z-index: 1;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .left-card {
  display: flex !important;
  flex: 0 0 auto;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .content-card {
  display: block !important;
  flex: 1 1 auto;
  width: 100% !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .rooms {
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #2e3a4d !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .number {
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  text-align: right;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .content-card .price {
  display: block !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  text-align: left;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .metres {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 !important;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .metres .metrage span,
.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .metres .metrage-price {
  display: inline !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: var(--portal-muted);
  margin: 0 !important;
}

/* Cleaner chess cells — tile-plus view */
.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card-btn {
  display: inline-flex;
  width: auto;
  height: auto;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card {
  width: 86px !important;
  min-width: 86px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 6px !important;
  border: 1px solid #cfd8e3 !important;
  padding: 3px 4px !important;
  margin: 2px !important;
  grid-template-columns: 20px 1fr !important;
  grid-template-rows: 16px 16px !important;
  row-gap: 1px !important;
  background: #f2f5f9 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card::after {
  left: 24px !important;
  top: 3px !important;
  bottom: 3px !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .left-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 18px !important;
  padding: 0 !important;
  border: 0 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .rooms {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 14px !important;
  border-radius: 3px !important;
  margin: 0 !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .number {
  margin: 1px 0 0 !important;
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  opacity: 0.8 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .content-card {
  padding-left: 6px !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .content-card .price {
  font-size: 9px !important;
  line-height: 1.05 !important;
  font-weight: 700 !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .metres {
  margin: 0 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .metres .metrage span {
  font-size: 8px !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card .metres .metrage-price {
  display: none !important;
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card.card--pulse {
  animation: portal-card-pulse 1.2s ease 2;
  z-index: 2;
}

@keyframes portal-card-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); transform: scale(1); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35); transform: scale(1.03); }
}

.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card.card-status-9,
.portal-chess-wrap.chess-view-tile-plus #chess-container .table-wrapper table .card.card--agent-locked {
  background: #e7edf3 !important;
  border-color: #c7d2df !important;
}

.portal-door-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  background: #fff;
}

.portal-door-tabs button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--portal-border);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.portal-door-tabs button:hover { border-color: var(--portal-accent); color: var(--portal-accent); }

.portal-door-tabs button.is-active {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.portal-chess-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  background: #fff;
}

.portal-chess-filters button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--portal-border);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.portal-chess-filters button:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
}

.portal-chess-filters button.is-active {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.portal-chess-filter-stats {
  margin: -8px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-text);
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .content-card .price--discount .price__old {
  display: block;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--portal-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.portal-chess-wrap.chess-view-tile #chess-container .card-btn .card .metrage-price__old {
  display: block;
  font-size: 9px !important;
  color: var(--portal-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.apt-modal__price-original {
  font-size: 16px;
  color: var(--portal-muted);
  text-decoration: line-through;
  margin-top: 4px;
}

.apt-modal__price-economy {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 13px;
  font-weight: 700;
}

.portal-chess-view-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  background: #fff;
}

.portal-chess-view-tabs__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.portal-chess-view-tabs button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--portal-border);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.portal-chess-view-tabs button:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
}

.portal-chess-view-tabs button.is-active {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.portal-door-tabs button:active,
.portal-chess-filters button:active,
.portal-chess-view-tabs button:active {
  transform: translateY(1px);
}

.portal-chess-wrap.chess-filter-sale-only .card-btn:not([data-status="7"]),
.portal-chess-wrap.chess-filter-sale-only .card-tambour[data-door] {
  display: none !important;
}

.portal-chess-wrap .card-btn.is-chess-filtered-out,
.portal-chess-wrap .card-tambour.is-chess-filtered-out,
.portal-chess-wrap tr.is-chess-filtered-out {
  display: none !important;
}

/* ─── Chess legend ─── */
.portal-chess-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: -8px 0 20px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
}

.portal-chess-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-text);
}

.portal-chess-legend__item i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid;
  display: inline-block;
}

.portal-chess-legend__hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--portal-muted);
  font-weight: 500;
}

/* ─── Apartment modal ─── */
.apt-modal { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.apt-modal.is-open { visibility: visible; }

.apt-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 34, 0.45);
  opacity: 0;
  transition: opacity 0.25s var(--portal-ease);
}
.apt-modal.is-open .apt-modal__overlay { opacity: 1; }

.apt-modal__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s var(--portal-ease);
  overflow-y: auto;
  padding: 20px;
}
.apt-modal.is-open .apt-modal__panel { transform: translateX(0); }

.apt-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--portal-border);
  background: #fff;
  font-size: 20px;
  line-height: 1;
  color: var(--portal-muted);
  cursor: pointer;
  z-index: 1;
}
.apt-modal__close:hover { color: var(--portal-text); border-color: #cbd5e1; }

.apt-modal__loading, .apt-modal__error {
  padding: 60px 10px;
  text-align: center;
  color: var(--portal-muted);
  font-weight: 600;
}

.apt-modal__gallery {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apt-modal__plan-wrap {
  background: #f8fafc;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 10px 12px 26px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 190px;
  overflow: hidden;
}

.apt-modal__plan-wrap--floor {
  background: #f1f5f9;
  max-height: 150px;
}

.apt-modal__plan {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 155px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.apt-modal__plan-wrap--floor .apt-modal__plan {
  max-height: 118px;
}

.apt-modal__plan-label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--portal-muted);
  background: rgba(255,255,255,0.9);
  padding: 3px 8px;
  border-radius: 6px;
}

.apt-modal__photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--portal-radius);
  margin-top: 12px;
}

.apt-modal__info { margin-top: 20px; }

.apt-modal__title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }

.apt-modal__status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.apt-modal__status--6 { background: #f1f5f9; color: #64748b; }
.apt-modal__status--7 { background: #dcfce7; color: #166534; }
.apt-modal__status--8 { background: #fef3c7; color: #b45309; }
.apt-modal__status--9 { background: #f1f5f9; color: #64748b; }

.apt-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.apt-modal__grid div { background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
.apt-modal__grid span { display: block; font-size: 12px; color: var(--portal-muted); font-weight: 600; margin-bottom: 2px; }
.apt-modal__grid b { font-size: 15px; font-weight: 800; }

.apt-modal__price {
  font-size: 24px;
  font-weight: 800;
  color: var(--portal-accent);
  margin-bottom: 0;
}

.apt-modal__price-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.apt-modal__price-block .apt-modal__price {
  margin-bottom: 0;
}

.apt-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.apt-modal__actions .portal-btn { flex: 1; min-width: 140px; text-align: center; }

.apt-modal__specs {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-border);
}

.apt-modal__spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--portal-border);
  font-size: 13px;
}
.apt-modal__spec-row:last-child { border-bottom: none; }
.apt-modal__spec-row span { color: var(--portal-muted); }
.apt-modal__spec-row b { font-weight: 700; text-align: right; }

.apt-modal__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.apt-modal__panel .popup-btns {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.apt-modal__panel .popup-btns__star {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-accent);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.apt-modal__panel .popup-btns__star.active {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
}

.apt-modal__panel .popup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.apt-modal__panel .popup-table td {
  padding: 10px 0;
  border-bottom: 1px dashed var(--portal-border);
  font-size: 13px;
  vertical-align: top;
}

.apt-modal__panel .popup-table td:first-child {
  color: var(--portal-muted);
  width: 52%;
  padding-right: 12px;
}

.apt-modal__panel .popup-table td:last-child {
  font-weight: 700;
  text-align: right;
}

.apt-modal__panel .shk-calc-mount {
  margin-top: 0;
}

.apt-modal__calc-mount {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--portal-border);
  background: #fff;
}

.apt-modal__calc-mount.is-open {
  margin-top: 8px;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__gallery,
.apt-modal__panel.apt-modal--calc-open .apt-modal__grid,
.apt-modal__panel.apt-modal--calc-open .apt-modal__details {
  display: none;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__price-block {
  margin-bottom: 0;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__title {
  font-size: 18px;
  margin-bottom: 4px;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__status {
  margin-bottom: 8px;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__price {
  font-size: 20px;
  margin-bottom: 8px;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__calc-btn {
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  color: var(--portal-text);
  border: 1px solid var(--portal-border);
  box-shadow: none;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__calc-btn:hover,
.apt-modal__panel.apt-modal--calc-open .apt-modal__calc-btn.is-active {
  background: #f8fafc;
  color: var(--portal-text);
  border-color: #cbd5e1;
  box-shadow: none;
  transform: none;
}

.apt-modal__panel.apt-modal--calc-open .apt-modal__calc-btn-icon {
  background: #f1f5f9;
  color: var(--portal-muted);
}

.apt-modal__panel .shk-calc-mount.is-open {
  display: block !important;
}

.apt-modal__calc-mount:focus,
.apt-modal__calc-mount:focus-within,
#shakhmatka-calculator-root:focus,
#shakhmatka-calculator-root:focus-within {
  outline: none;
  box-shadow: none;
}

/* Скрываем служебную и любые лишние кнопки интеграции калькулятора */
.apt-modal__panel .shk-calc-action-btn,
.apt-modal__panel .apt-modal__calc-proxy {
  display: none !important;
}

.apt-modal__calc-btn {
  width: 100%;
  min-height: 56px;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.28);
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: transform 0.15s var(--portal-ease), box-shadow 0.15s var(--portal-ease), background 0.15s;
}

.apt-modal__calc-btn:hover,
.apt-modal__calc-btn.is-active {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  color: #fff;
  border: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.34);
}

.apt-modal__calc-btn-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.apt-modal__calc-btn-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.apt-modal__calc-btn-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apt-modal__calc-btn-text strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.apt-modal__calc-btn-text small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.3;
}

.apt-modal__calc-btn-arrow {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  opacity: 0.9;
}

.apt-modal__panel .popup-btns.apt-modal__actions {
  margin-top: 0;
}

body.apt-modal-opened { overflow: hidden; }

/* ─── Cabinet ─── */
.portal-hero--cabinet {
  padding-bottom: 28px;
}

.cabinet-page {
  margin-bottom: 56px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 20px;
  margin-bottom: 20px;
}

.cabinet-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 28px;
  box-shadow: var(--portal-shadow);
}

.cabinet-card__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cabinet-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--portal-border);
}

.cabinet-profile__avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--portal-accent) 0%, var(--portal-accent-2) 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.cabinet-profile__name {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cabinet-profile__role {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-muted);
}

.cabinet-details {
  margin: 0 0 24px;
  display: grid;
  gap: 14px;
}

.cabinet-details__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
}

.cabinet-details__row dt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-muted);
}

.cabinet-details__row dt svg {
  flex: 0 0 auto;
  opacity: 0.75;
}

.cabinet-details__row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--portal-text);
  word-break: break-word;
}

.cabinet-details__row dd a {
  color: var(--portal-accent);
}

.cabinet-details__row dd a:hover {
  text-decoration: underline;
}

.cabinet-details__empty {
  color: var(--portal-muted);
  font-weight: 600;
}

.cabinet-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cabinet-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cabinet-metric {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 20px 22px;
  box-shadow: var(--portal-shadow);
}

.cabinet-metric--accent {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, #fff 100%);
}

.cabinet-metric--muted .cabinet-metric__value {
  color: var(--portal-muted);
}

.cabinet-metric__value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--portal-accent);
}

.cabinet-metric__label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--portal-muted);
}

.cabinet-aside__hint {
  margin: 4px 2px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--portal-muted);
}

.cabinet-card--sync {
  padding: 28px 32px;
}

.cabinet-sync__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cabinet-sync__lead {
  margin: 0;
  font-size: 15px;
  color: var(--portal-muted);
  font-weight: 500;
  max-width: 560px;
}

.cabinet-sync__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cabinet-sync__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: cabinet-sync-pulse 1.8s ease-in-out infinite;
}

@keyframes cabinet-sync-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.92); }
}

.cabinet-sync__status {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--portal-border);
  font-size: 14px;
  color: var(--portal-muted);
  margin-bottom: 18px;
}

.cabinet-sync__status strong {
  color: var(--portal-text);
}

.cabinet-sync__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.cabinet-sync__note {
  margin: 0;
  font-size: 13px;
  color: var(--portal-muted);
  font-weight: 500;
}

.cabinet-sync__msg {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 600;
  min-height: 1.2em;
}

.cabinet-sync__msg.is-success {
  color: #166534;
}

.cabinet-sync__msg.is-error {
  color: #b91c1c;
}

.cabinet-card--fixations {
  margin-top: 28px;
}

.cabinet-fixations__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cabinet-fixations__lead {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--portal-muted);
}

.cabinet-fixations__empty {
  padding: 28px 20px;
  border: 1px dashed var(--portal-border);
  border-radius: var(--portal-radius-lg);
  text-align: center;
  color: var(--portal-muted);
}

.cabinet-fixations__empty p {
  margin: 0;
}

.cabinet-fixations__empty-note {
  margin-top: 8px !important;
  font-size: 13px;
}

.cabinet-fixations-table-wrap {
  overflow-x: auto;
}

.cabinet-fixations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cabinet-fixations-table th,
.cabinet-fixations-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--portal-border);
  text-align: left;
  vertical-align: middle;
}

.cabinet-fixations-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--portal-muted);
  font-weight: 700;
}

.cabinet-fixation-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.cabinet-fixation-status--in_progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.cabinet-fixation-status--unique {
  background: #dcfce7;
  color: #166534;
}

.cabinet-fixation-status--not_unique {
  background: #fee2e2;
  color: #b91c1c;
}

.cabinet-fixation-status--other {
  background: #f1f5f9;
  color: #475569;
}

/* ─── Fixation form ─── */
.portal-hero--fixation {
  padding-bottom: 36px;
}

.portal-hero--broker-tour {
  padding-bottom: 36px;
}

.fixation-aside__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--portal-muted);
}

.fixation-page {
  padding-bottom: 56px;
}

.fixation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.fixation-card,
.fixation-aside {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  box-shadow: var(--portal-shadow);
}

.fixation-card {
  padding: 28px;
}

.fixation-aside {
  padding: 24px;
}

.fixation-aside h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.fixation-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--portal-muted);
  line-height: 1.6;
}

.fixation-steps li + li {
  margin-top: 8px;
}

.fixation-status-legend p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--portal-muted);
}

.fixation-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fixation-required {
  color: #dc2626;
}

.fixation-field-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--portal-muted);
}

.fixation-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  font: inherit;
  resize: vertical;
  background: #fff;
}

.fixation-consent {
  margin: 20px 0;
}

.fixation-submit {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.fixation-success {
  padding: 28px 20px;
  border-radius: var(--portal-radius-lg);
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  text-align: center;
}

.fixation-success h2 {
  margin: 0 0 10px;
  color: #166534;
}

.fixation-success p {
  margin: 0 0 20px;
  color: #15803d;
}

.fixation-success__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Promo page ─── */
.portal-hero--promo {
  padding-bottom: 28px;
}

.portal-promo {
  margin-bottom: 56px;
}

.portal-promo__updated {
  font-size: 13px;
  color: var(--portal-muted);
  margin: 0 0 24px;
}

.portal-promo-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--portal-shadow-sm);
}

.portal-promo-featured__visual {
  position: relative;
  min-height: 320px;
  background: #eff6ff;
}

.portal-promo-featured__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 12px;
}

.portal-promo-featured__badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: #7ab800;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 14px;
  letter-spacing: -0.02em;
}

.portal-promo-featured__body {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.portal-promo-featured__body h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.portal-promo-featured__lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--portal-muted);
}

.portal-promo-featured__note {
  margin: 0;
  font-size: 13px;
  color: var(--portal-muted);
  opacity: 0.85;
}

.portal-promo-list__title {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.portal-promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.portal-promo-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s, border-color 0.2s;
}

.portal-promo-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.portal-promo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow);
  border-color: #cbd5e1;
}

.portal-promo-card__visual {
  aspect-ratio: 16 / 10;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-promo-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 8px;
}

.portal-promo-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.portal-promo-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--portal-muted);
}

.portal-promo-card__tag {
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
}

.portal-promo-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.portal-promo-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--portal-muted);
  flex: 1;
}

/* ─── Documents ─── */
.portal-hero--documents {
  padding-bottom: 32px;
}

.portal-documents {
  margin-bottom: 56px;
  padding-top: 48px;
}

.portal-documents__heading {
  margin: 0 0 24px;
}

.portal-documents__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.portal-doc-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  padding: 24px;
  box-shadow: var(--portal-shadow-sm);
  transition: transform 0.2s var(--portal-ease), box-shadow 0.2s, border-color 0.2s;
}

.portal-doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow);
  border-color: #cbd5e1;
}

.portal-doc-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-doc-card--pdf .portal-doc-card__icon { background: #fef2f2; }
.portal-doc-card--doc .portal-doc-card__icon { background: #eff6ff; }
.portal-doc-card--xlsx .portal-doc-card__icon { background: #f0fdf4; }

.portal-doc-card__tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--portal-muted);
  margin-bottom: 6px;
}

.portal-doc-card__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.portal-doc-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--portal-muted);
}

.portal-doc-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--portal-muted);
  margin-top: auto;
  padding-top: 8px;
}

.portal-doc-card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.portal-doc-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.portal-doc-card__missing {
  font-size: 13px;
  color: #dc2626;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .portal-curator-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-curator-modal__grid .portal-manager-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .portal-hero-banner__grid { grid-template-columns: 1fr; gap: 32px; }
  .portal-hero-banner__visual { max-height: 280px; aspect-ratio: auto; }
  .portal-filters__grid { grid-template-columns: repeat(3, 1fr); }
  .portal-stats { grid-template-columns: repeat(2, 1fr); }
  .portal-cooperation__grid { grid-template-columns: 1fr; gap: 32px; }
  .portal-cooperation__visual { max-height: 360px; aspect-ratio: 16 / 10; }
  .cabinet-grid { grid-template-columns: 1fr; }
  .fixation-layout { grid-template-columns: 1fr; }
  .fixation-form__grid { grid-template-columns: 1fr; }
  .portal-section-head--construction { flex-direction: column; align-items: flex-start; }
  .portal-news__grid { grid-template-columns: 1fr; }
  .portal-news-article__gallery-grid { grid-template-columns: 1fr; }
  .portal-section-head--news { flex-direction: column; align-items: flex-start; }
  .portal-construction-card { flex-basis: 240px; }
  .portal-amenities { grid-template-columns: 1fr; }
  .portal-location-stats { grid-template-columns: repeat(2, 1fr); }
  .portal-location-map__canvas { height: 420px; }
  .portal-location-map__toolbar { flex-direction: column; align-items: stretch; }
  .portal-location-map__open { width: 100%; text-align: center; }
  .portal-auth { grid-template-columns: 1fr; }
  .portal-auth__side { min-height: 240px; padding: 32px; }
}

@media (max-width: 768px) {
  .portal-header__inner { flex-wrap: wrap; min-height: auto; padding: 14px 0; gap: 12px; }
  .portal-header__phone { display: none; }
  .portal-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .portal-curator-fab { right: 16px; bottom: 16px; }
  .portal-curator-fab__btn { padding: 12px 16px 12px 14px; font-size: 13px; }
  .portal-curator-modal__dialog { padding: 24px 20px 28px; }
  .portal-curator-modal__header { margin-bottom: 22px; padding-bottom: 18px; }
  .portal-manager-card__media { height: 220px; }
  .portal-filters { padding: 20px; margin-top: 0; }
  .portal-filters__grid { grid-template-columns: 1fr 1fr; }
  .portal-filters__grid-advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-footer__grid { grid-template-columns: 1fr 1fr; }
  .portal-footer__top { flex-direction: column; }
  .cabinet-details__row { grid-template-columns: 1fr; gap: 4px; }
  .cabinet-sync__head { flex-direction: column; }
  .cabinet-quick .portal-btn { flex: 1 1 auto; text-align: center; }
  .portal-auth-form__grid { grid-template-columns: 1fr; }
  .portal-promo-featured { grid-template-columns: 1fr; }
  .portal-promo-featured__body { padding: 0 20px 24px; }
}

@media (max-width: 480px) {
  .portal-filters__grid { grid-template-columns: 1fr; }
  .portal-filters__grid-advanced { grid-template-columns: 1fr; }
  .portal-stats { grid-template-columns: 1fr; }
  .portal-footer__grid { grid-template-columns: 1fr; }
  .portal-location-stats { grid-template-columns: 1fr; }
  .portal-location-map__canvas { height: 360px; }
  .portal-curator-fab__label { display: none; }
  .portal-curator-fab__btn {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .portal-curator-modal__grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Demo mode ─── */
.portal-demo-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #dbeafe;
}

.portal-demo-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.portal-demo-banner__text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--portal-text);
}

.portal-demo-banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.portal-apt-card--demo .portal-apt-card__visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: linear-gradient(145deg, #e8eef7 0%, #f4f7fb 100%);
}

.portal-apt-card__demo-lock {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--portal-primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.portal-apt-card__demo-note {
  font-size: 13px;
  color: var(--portal-muted);
}

.portal-demo-catalog-more {
  margin-top: 28px;
  padding: 24px;
  text-align: center;
  border-radius: var(--portal-radius-lg);
  border: 1px dashed #bfdbfe;
  background: #f8fbff;
}

.portal-demo-catalog-more p {
  margin: 0 0 16px;
  color: var(--portal-muted);
}

@media (max-width: 768px) {
  .portal-demo-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-demo-banner__actions {
    justify-content: stretch;
  }

  .portal-demo-banner__actions .portal-btn {
    flex: 1;
    text-align: center;
  }
}

