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

:root {
  --red-base: #d32f2f;
  --red-dark: #b71c1c;
  --red-bright: #ef5350;
  --red-gradient-start: #d32f2f;
  --red-gradient-end: #f44336;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #222;
  --text-muted: #777;
  --border: rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 320px;
}

a { color: var(--red-base); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--red-dark); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =========================================
   ШАПКА
   ========================================= */
.site-header {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 14px 0 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 14px;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--red-base);
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s;
}

.logo:hover .logo-img { transform: scale(1.03); }

.logo-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--red-base);
  margin-top: 2px;
  opacity: 0.9;
}

.header-city { flex-shrink: 0; }
.city-selector-form { margin: 0; }

.city-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 36px 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background-color: #fff;
  cursor: pointer;
  min-width: 180px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.city-select:focus {
  outline: none;
  border-color: var(--red-base);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-greeting {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--red-base); background: #fff5f5; }

.btn-login {
  background: transparent;
  color: var(--red-base);
  border: 1.5px solid var(--red-base);
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-login:hover { background: var(--red-base); color: #fff; }

.btn-logout {
  font-size: 13px;
  font-weight: 600;
  color: #999;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-logout:hover { color: var(--red-dark); background: #ffebee; }

/* === ИЗМЕНЕНО: nowrap вместо wrap === */
.header-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #eee;
}

/* === ИЗМЕНЕНО: gap 4px, nowrap, overflow hidden === */
.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* === ИЗМЕНЕНО: font-size 14px, добавлены padding и white-space === */
.main-nav a {
  color: #555;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  padding: 8px 10px;
  white-space: nowrap;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red-base);
  transition: width 0.25s;
}

.main-nav a:hover { color: var(--red-base); }
.main-nav a:hover::after { width: 100%; }

.btn-request-bottom {
  background: var(--red-base);
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.btn-request-bottom:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  color: #fff;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  background: linear-gradient(135deg, var(--red-gradient-start) 0%, var(--red-gradient-end) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin: 24px 0 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(211, 47, 47, 0.2);
  animation: fadeInUp 0.6s ease-out;
  display: flex;
  min-height: 220px;
  max-width: 1200px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%; width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  pointer-events: none;
  animation: pulseLight 6s infinite ease-in-out alternate;
  z-index: 1;
}

.hero-left {
  flex: 0 0 55%;
  background: transparent;
  color: #fff;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 80px) 100%, 0 100%);
  position: relative;
  z-index: 2;
}

.hero-left h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero-left p {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--red-base);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  width: fit-content;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.hero-right {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #1a1a2e;
  margin-left: -80px;
  border-radius: var(--radius-lg);
  z-index: 1;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.hero-slide.active { opacity: 1; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(211, 47, 47, 0.85);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.slider-arrow:hover {
  background: var(--red-base);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dots .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.slider-dots .dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* =========================================
   СЕТКА КАРТОЧЕК
   ========================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
  justify-items: center;
}

/* Базовая карточка (для div — отзывы, статистика) */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-base);
}

/* Карточка-ссылка (отзывы, услуги) */
a.card {
  display: block;
  text-decoration: none;
  color: #333 !important;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

a.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-base);
  color: #333 !important;
}

a.card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  line-height: 1.3;
  color: #1a1a1a !important;
  font-weight: 700;
}

a.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #555 !important;
}

a.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 4px;
  background: var(--red-bright);
  transition: width 0.3s ease;
  z-index: 2;
}

a.card:hover::before { width: 100%; }

/* =========================================
   КАРТОЧКА ОБЪЕКТА (card-link)
   ========================================= */
a.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #333 !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  padding: 0;
  transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

a.card-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red-base);
}

/* Красная полоска сверху при наведении */
a.card-link::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 4px;
  background: var(--red-bright);
  transition: width 0.3s ease;
  z-index: 5;
}

a.card-link:hover::after { width: 100%; }

/* --- БЛОК С ФОТО --- */
.card-photo {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  flex-shrink: 0;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

a.card-link:hover .card-photo img {
  transform: scale(1.05);
}

/* Заглушка "Нет фото" */
.card-no-photo {
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  gap: 6px;
}

.card-no-photo span:first-child { font-size: 28px; }

/* Бейдж статуса */
.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 3;
}

.status-reserved { background: #fff3e0; color: #ef6c00; }
.status-sold { background: #f5f5f5; color: #757575; }

/* Бейдж типа объекта */
.card-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
}

/* --- ТЕЛО КАРТОЧКИ --- */
.card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Адрес */
.card-body h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a !important;
  line-height: 1.3;
}

/* Цена */
.card-body .price {
  font-size: 22px;
  font-weight: 800;
  color: var(--red-base) !important;
  margin: 0 0 12px 0;
  line-height: 1;
}

/* --- ХАРАКТЕРИСТИКИ --- */
.card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 10px 0;
  margin-bottom: 12px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
  background: #f8f8f8;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* --- АГЕНТ --- */
.card-body .agent {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================
   ЦЕНЫ И АГЕНТЫ (страница объекта)
   ========================================= */
.price-big {
  font-size: 30px;
  font-weight: 800;
  color: var(--red-base);
  margin-bottom: 16px;
}

.agent-photo-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #eee;
  margin-bottom: 16px;
  position: relative;
  background: #fafafa;
}

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

.agent-photo-wrapper::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 18px; height: 18px;
  background: var(--red-base);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.agent-photo-wrapper:hover { border-color: var(--red-base); }

.agent-initials {
  width: 80px; height: 80px;
  border-radius: 10px;
  background: #ffe6e6;
  color: var(--red-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700;
}

.share-indicator-wrapper {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 12px 0;
}

.share-bar {
  height: 100%;
  background: var(--red-base);
  border-radius: 3px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-percent-text {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.hot-deal-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 10px; height: 10px;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(239, 83, 80, 0.4);
  animation: pulseHot 1.8s infinite ease-in-out;
  z-index: 10;
}

/* =========================================
   ТАБЛИЦЫ
   ========================================= */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th {
  background: linear-gradient(180deg, var(--red-gradient-start), var(--red-dark));
  color: #fff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: #333;
}

.admin-table tbody tr:hover { background: #fff5f5; }

.admin-table .price-col {
  text-align: right;
  font-weight: 800;
  color: var(--red-base);
  font-size: 15px;
}

.admin-table .status-col { text-align: center; }

.action-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.2s;
}

.action-btn:hover { background: #f0f0f0; color: var(--text); }
.action-btn.delete { color: var(--red-bright); }
.action-btn.delete:hover { background: #ffebee; color: var(--red-dark); }

/* =========================================
   ФОРМЫ
   ========================================= */
.auth-form {
  max-width: 440px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--red-base);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
  background-color: #fff8f8;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-gradient-start), var(--red-dark));
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.4);
}

/* =========================================
   СТАТИСТИКА
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.stat-card {
  background: var(--card-bg);
  padding: 28px 20px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red-base), var(--red-bright));
  transform: scaleX(0.3);
  transition: transform 0.3s ease;
}

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

.stat-card:hover::after { transform: scaleX(1); }

.stat-card h3 {
  font-size: 36px;
  font-weight: 800;
  color: var(--red-base);
  margin-bottom: 4px;
}

.stat-card p {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================================
   НАВИГАЦИЯ АДМИНКИ
   ========================================= */
.admin-nav {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.admin-nav a {
  background: var(--card-bg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}

.admin-nav a:hover {
  background: linear-gradient(135deg, var(--red-base), var(--red-dark));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.admin-nav a.active {
  background: linear-gradient(135deg, var(--red-base), var(--red-dark));
  color: #fff;
}

/* =========================================
   БЕЙДЖИ
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active { background: #e8f5e9; color: #2e7d32; }
.badge-sold { background: #f5f5f5; color: #757575; }
.badge-reserved { background: #fff3e0; color: #ef6c00; }
.badge-archived { background: #eceff1; color: #546e7a; }
.badge-rejected { background: #ffebee; color: #c62828; }
.badge-hot {
  background: linear-gradient(135deg, var(--red-base), var(--red-bright));
  color: #fff;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.3);
}

/* =========================================
   ОТЗЫВЫ И ДЕТАЛИ
   ========================================= */
.rating { color: #ffc107; font-size: 16px; margin-bottom: 10px; letter-spacing: 2px; }
.author { color: #888; font-size: 13px; margin-top: 10px; }
.bio { font-size: 14px; color: #555; margin-top: 12px; line-height: 1.6; }
.comment { color: #555; margin-bottom: 10px; }

.object-detail {
  background: var(--card-bg);
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.object-detail p { margin-bottom: 12px; font-size: 15px; }

.description {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px dashed #eee;
}

.contacts-info {
  background: var(--card-bg);
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red-base);
}

/* =========================================
   АЛЕРТЫ
   ========================================= */
.alert-error { background: #ffebee; color: #c62828; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; border-left: 4px solid var(--red-base); font-weight: 500; }
.alert-success { background: #e8f5e9; color: #2e7d32; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; border-left: 4px solid #2e7d32; font-weight: 500; }
.alert-warning { background: #fff3e0; color: #ef6c00; padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; border-left: 4px solid #ef6c00; font-weight: 500; }

.btn-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--red-base); text-decoration: none; font-size: 14px; font-weight: 600; transition: gap 0.2s; }
.btn-back:hover { gap: 10px; color: var(--red-dark); }

/* =========================================
   ПАГИНАЦИЯ
   ========================================= */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 6px; font-size: 13px; color: #555; border: 1px solid transparent; transition: all 0.2s; }
.pagination a:hover { background: #f0f0f0; border-color: var(--border); color: var(--text); }
.pagination .current { background: linear-gradient(135deg, var(--red-base), var(--red-dark)); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25); }

/* =========================================
   ЗАГОЛОВКИ СЕКЦИЙ
   ========================================= */
.section-title { margin-top: 36px; margin-bottom: 20px; font-size: 22px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 12px; }
.section-title::before { content: ''; display: block; width: 4px; height: 24px; background: linear-gradient(180deg, var(--red-base), var(--red-bright)); border-radius: 4px; }

/* =========================================
   АНИМАЦИИ
   ========================================= */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseLight { 0% { transform: scale(0.8); opacity: 0.4; } 100% { transform: scale(1.2); opacity: 0.2; } }
@keyframes pulseHot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.7; } }
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.cards-grid .card,
.cards-grid .card-link { animation: cardFadeIn 0.5s ease-out backwards; }
.cards-grid .card:nth-child(1), .cards-grid a.card-link:nth-child(1) { animation-delay: 0.05s; }
.cards-grid .card:nth-child(2), .cards-grid a.card-link:nth-child(2) { animation-delay: 0.10s; }
.cards-grid .card:nth-child(3), .cards-grid a.card-link:nth-child(3) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(4), .cards-grid a.card-link:nth-child(4) { animation-delay: 0.20s; }
.cards-grid .card:nth-child(5), .cards-grid a.card-link:nth-child(5) { animation-delay: 0.25s; }
.cards-grid .card:nth-child(6), .cards-grid a.card-link:nth-child(6) { animation-delay: 0.30s; }

/* =========================================
   ОТЗЫВЫ (КАРТОЧКИ)
   ========================================= */
.review-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.review-card .rating {
  font-size: 24px;
  line-height: 1.2;
  color: var(--red-base);
  margin: 0 0 16px 0;
  letter-spacing: 2px;
}

.review-card .comment {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.review-card .author {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin: 0;
  text-align: right;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

/* =========================================
   ПРИЖАТИЕ ФУТЕРА + ФУТЕР
   ========================================= */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content { flex: 1; }

main.main-content { flex: 1; }

.site-footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  margin-top: 48px;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--red-bright); }

/* =========================================
   ГАЛЕРЕЯ ФОТО
   ========================================= */
.object-gallery,
.object-docs {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 16px;
}

.gallery-slider {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

.gallery-item {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.badge-main {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #ba0100;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.thumb-item {
  aspect-ratio: 4/3;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.thumb-item:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-color: #ccc;
}

/* =========================================
   АДАПТИВ
   ========================================= */

/* === ИЗМЕНЕНО: порог 1024px вместо 768px === */
@media (max-width: 1024px) {
  .desktop-header { display: none; }
  .mobile-top-bar { display: flex; }
  .mobile-nav-overlay { display: block; }
}

@media (min-width: 1025px) {
  .mobile-top-bar { display: none; }
  .mobile-main-nav { display: none; }
  .mobile-nav-overlay { display: none; }
}

@media (max-width: 768px) {
  .header-top-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .header-brand-group {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .header-user-actions { justify-content: center; }

  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-left {
    flex: none;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
    padding: 40px 24px;
  }

  .hero-left h1 { font-size: 32px; }

  .hero-right {
    margin-left: 0;
    height: 240px;
  }

  .slider-arrow {
    width: 32px; height: 32px;
    font-size: 14px;
  }

  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-table { display: block; overflow-x: auto; }
  .object-detail { padding: 20px; }
  .auth-form { padding: 24px; margin: 16px; }
  .admin-nav a { flex: 1; text-align: center; min-width: 120px; }
  .gallery-item { aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .btn-primary { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}

.object-detail {
  background: var(--card-bg);
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .object-detail > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .object-photo { height: 260px !important; }
}

/* =========================================
   КАРТОЧКА ОБЪЕКТА (СТРАНИЦА)
   ========================================= */

.object-gallery-block {
    margin-bottom: 28px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #eee;
    margin-bottom: 12px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.gallery-thumbs-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.thumb-strip-item {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
    background: #eee;
}

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

.thumb-strip-item:hover {
    transform: scale(1.03);
}

.thumb-strip-item.active {
    border-color: var(--red-base);
}

.object-title {
    margin: 0 0 12px 0;
    font-size: 26px;
    color: #1a1a1a;
    font-weight: 800;
    line-height: 1.3;
}

.object-price-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.object-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: var(--radius-md);
    border: 1px solid #f0f0f0;
}

.object-detail-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.object-description {
    margin-bottom: 28px;
}

.object-section-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px 0;
}

.object-description p {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.object-agent-block {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed #eee;
}

.object-agent-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.object-agent-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.object-agent-phone {
    font-size: 15px;
    color: var(--red-base);
    text-decoration: none;
    transition: color 0.2s;
}

.object-agent-phone:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .gallery-main {
        aspect-ratio: 4/3;
    }
    .object-title {
        font-size: 20px;
    }
    .object-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================
   КАРТОЧКА АГЕНТА
   ========================================= */

.agent-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 280px;
    max-width: 100%;
    padding: 24px 20px;
    box-sizing: border-box;
    cursor: pointer;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 4px;
    background: var(--red-bright);
    transition: width 0.3s ease;
    z-index: 2;
}

.agent-card:hover::before { width: 100%; }

/* --- Аватар --- */

.agent-avatar-wrapper {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 16px;
}

.agent-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* --- Заглушка: красно-белая с инициалом --- */

.agent-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red-base) 0%, var(--red-bright) 100%);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.25);
}

.agent-initial {
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-transform: uppercase;
}

/* --- Инфо --- */

.agent-info {
    width: 100%;
}

.agent-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.agent-role {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--red-base);
    font-weight: 600;
}

.agent-city {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.agent-phone,
.agent-email {
    margin: 4px 0;
    font-size: 14px;
    color: #555;
}

/* --- Рейтинг --- */

.agent-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 8px 0;
    font-size: 14px;
}

.star {
    color: #ddd;
    font-size: 16px;
}

.star.star-filled {
    color: #f5a623;
}

.rating-value {
    font-weight: 600;
    color: #333;
}

.reviews-count-link {
    color: var(--red-base);
    text-decoration: none;
    font-size: 13px;
}

.reviews-count-link:hover {
    text-decoration: underline;
    color: var(--red-dark);
}

.rating-no-reviews {
    font-size: 13px;
    color: #aaa;
}

/* =========================================
   ФИЛЬР АГЕНТОВ ПО ГОРОДУ
   ========================================= */

.agents-filter {
    margin-bottom: 28px;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 38px 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    min-width: 220px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d32f2f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--red-base);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.filter-select:hover {
    border-color: var(--red-base);
}


/* =========================================
   ПРОФИЛЬ — АВАТАР
   ========================================= */

.profile-avatar-block {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.profile-avatar-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-wrapper .agent-avatar-placeholder {
    width: 110px;
    height: 110px;
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-avatar-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.profile-avatar-delete {
    font-size: 13px;
    font-weight: 600;
    color: var(--red-bright);
    text-decoration: none;
    transition: color 0.2s;
}

.profile-avatar-delete:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

.profile-avatar-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 480px) {
    .profile-avatar-block {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar-actions {
        align-items: center;
    }
}
.agent-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.agent-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #d32f2f;
    background: #fff5f5;
    border: 1px solid rgba(211, 47, 47, 0.15);
    text-decoration: none;
    transition: all 0.2s;
}

.agent-contact-link:hover {
    background: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

.agent-contact-link i {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .agent-contacts {
        justify-content: center;
    }
}
/* Блок обертки всего медиа-раздела */
.complex-media-block { margin-bottom: 40px; }

/* Адаптивный контейнер для видео */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Пропорция 16:9 */
    background-color: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-md);
}

.badge-building {
    background: #dc2626;
    color: #fff;
}

.badge-planning {
    background: #6366f1;
    color: #fff;
}

/* --- Стили для миниатюры аватара --- */
.header-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background-color: #f0f0f0;
}

/* --- Стили для заглушки (буквы вместо фото) --- */
.header-avatar-placeholder {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    background-color: #007bff;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    display: block;
}

/* --- Опционально: стили для ссылки-обертки, чтобы кликать было удобно --- */
.header-avatar-link {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* =========================================
   СТИЛИ ДЛЯ ПРОФИЛЯ (ДОПОЛНИТЕЛЬНЫЕ)
   ========================================= */

/* Контейнер профиля - центрируем контент */
.profile-page {
  padding-top: 32px;
  padding-bottom: 60px;
}

/* Шапка профиля (карточка с именем и аватаром) */
.profile-header-card {
  padding: 32px;
  border-left: 5px solid var(--red-base);
  margin-bottom: 32px;
}

/* Стилизация форм внутри карточек */
.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form input[type="url"],
.auth-form input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--red-base);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Специфично для инпута файла (он всегда выглядит по-разному в браузерах) */
.auth-form input[type="file"] {
  background: #f9f9f9;
  border-style: dashed;
  border-color: #ddd;
  cursor: pointer;
  text-align: center;
}

/* Аватар в шапке - делаем его круглым и фиксированным */
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  display: block;
}

/* Плейсхолдер для аватара */
.agent-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  color: var(--red-base);
  font-weight: 700;
  font-size: 48px;
}

/* Кнопка удаления аватара (ссылка-кнопка) */
.btn-link {
  background: none;
  border: none;
  color: var(--red-base);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
  display: inline-block;
}

.btn-link:hover {
  color: var(--red-dark);
  text-decoration: none;
}


/* Адаптив для сетки на мобильных */
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .profile-header-card {
    flex-direction: column;
    text-align: center;
  }
  .profile-avatar-wrapper {
    margin-bottom: 20px;
  }
}
.mc-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .mc-layout {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   FAQ
   ========================================= */
.faq-list {
    margin-bottom: 32px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-item[open] {
    border-color: var(--red-base);
    box-shadow: 0 2px 12px rgba(211, 47, 47, 0.08);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    list-style: none;
    user-select: none;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #fff5f5;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    flex-shrink: 0;
    color: var(--red-base);
    font-size: 14px;
    transition: transform 0.25s;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 22px 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
/* =========================================
   СТРАНИЦА НАСТРОЕК ПРОФИЛЯ
   ========================================= */

/* Сетка: 2 колонки */
.profile-page .cards-grid {
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
    justify-items: stretch;
    margin-bottom: 0;
}

/* Карточки — без анимации hover */
.profile-page .card {
    padding: 24px;
    transition: none;
}
.profile-page .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Блок аватара — вертикальный */
.settings-avatar-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-avatar-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}
.settings-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.settings-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

/* Кнопки загрузки/удаления */
.settings-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.avatar-upload-btn {
    display: block;
    width: 100%;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.avatar-upload-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}
.avatar-delete-btn {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--red-base);
    border: 1px solid var(--red-base);
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.avatar-delete-btn:hover {
    background: var(--red-base);
    color: #fff;
}
.profile-avatar-hint {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    text-align: center;
}

/* Сетка полей формы */
.settings-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}
.settings-grid-2 {
    grid-template-columns: 1fr 1fr;
}
.settings-cell-full {
    grid-column: span 2;
}

/* Заголовки секций — отступ сверху */
.settings-form .object-section-heading {
    margin-top: 24px;
}
.settings-form .object-section-heading:first-child {
    margin-top: 0;
}

/* Поля ввода */
.settings-form input[type="text"],
.settings-form input[type="tel"],
.settings-form input[type="email"],
.settings-form input[type="url"],
.settings-form input[type="password"],
.settings-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--red-base);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

/* Чекбоксы */
.detail-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}
.detail-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--red-base);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* Кнопка сохранения */
.settings-save-btn {
    margin-top: 8px;
    width: 100%;
}

/* Адаптив */
@media (max-width: 768px) {
    .profile-page .cards-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid-2 {
        grid-template-columns: 1fr;
    }
    .settings-cell-full {
        grid-column: span 1;
    }
}
/* Кнопка выхода — по центру */
.profile-logout-wrapper {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed #eee;
    text-align: center;
}
.profile-logout-wrapper .btn-logout {
    display: inline-block;
}
.profile-role-badge {
    display: block;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--red-base), #e85a5a);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}
