
/* ═══════════════════════════════════════════════
   ПроДом — Design System
   Palette: light content + dark sidebar
   Accent: #33507A (muted blue) + #9A7B29 (muted gold)
   Fonts: Manrope (display) + Inter (body)
═══════════════════════════════════════════════ */

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

:root {
  /* ── Sidebar (остаётся тёмным) ── */
  --sidebar-bg:     #1a2035;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-text:   #e2e8f0;
  --sidebar-muted:  #8899aa;

  /* ── Content area (светлая) ── */
  --bg:          #F1F4F8;
  --bg-card:     #FFFFFF;
  --bg-surface:  #F7F9FC;
  --bg-input:    #F1F4F8;
  --border:      #E2E8F0;
  --border-focus:#33507A;

  /* ── Акценты (приглушённые) ── */
  --primary:     #33507A;   /* спокойный синий — кнопки, активные состояния */
  --primary-dark:#28405F;
  --primary-light:#EEF1F6;
  --accent:      #9A7B29;   /* приглушённое золото — цены, премиум-бейджи */
  --accent-light:#F3EAD9;

  /* ── Текст ── */
  --text:        #1a2035;
  --text-muted:  #64748B;
  --text-dim:    #94A3B8;

  /* ── Статусы (приглушённые) ── */
  --success:     #3D7A52;
  --error:       #B4433E;
  --warning:     #9A7B29;

  /* ── Форма и радиусы ── */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── ФОН ─── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(51,80,122,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51,80,122,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(51,80,122,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(51,80,122,0.04) 0%, transparent 60%);
}

/* ─── ШАПКА ─── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(20px);
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-icon { flex-shrink: 0; }
.logo-text {
  font-family: 'Manrope', sans-serif;
  font-size: 22px; font-weight: 800; color: var(--text);
  letter-spacing: -0.5px;
}
.logo-accent { color: var(--primary); }

.header-tagline {
  font-size: 13px; color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* ─── MAIN LAYOUT ─── */
.main {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 40px 60px;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── ЛЕВАЯ СЕКЦИЯ ─── */
.left-section {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 36px;
  max-width: 520px;
}

.brand-badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(51,80,122,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  width: fit-content;
}

h1 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-top: 16px;
}

h1 .accent { color: var(--primary); }

.tagline {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Фичи */
.feature-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 16px;
}
.feature-list li {
  display: flex; align-items: flex-start; gap: 14px;
}
.feature-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); margin-top: 5px; flex-shrink: 0;
  box-shadow: none;
}
.feature-list strong {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
}
.feature-list span {
  display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px;
}

/* Роли */
.roles-block {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.role-chip {
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid;
}
.role-realtor { color: #3E6E86; border-color: rgba(62,110,134,0.3); background: rgba(62,110,134,0.06); }
.role-dev     { color: #5B4FA0; border-color: rgba(91,79,160,0.3); background: rgba(91,79,160,0.06); }
.role-admin   { color: #3D7A52; border-color: rgba(61,122,82,0.3); background: rgba(61,122,82,0.06); }

.feedback-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  z-index: 9999;
  text-decoration: none;
  transition: all .2s ease;
  animation: fb-pulse 2.5s infinite;
}
.feedback-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,.55);
}
.feedback-bubble svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}
.feedback-tooltip {
  position: fixed;
  bottom: 38px;
  right: 92px;
  background: #1F2937;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.feedback-bubble:hover + .feedback-tooltip {
  opacity: 1;
}

@keyframes fb-pulse {
  0%   { box-shadow: 0 4px 16px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,.4); }
  70%  { box-shadow: 0 4px 16px rgba(37,211,102,.4), 0 0 0 12px rgba(37,211,102,0); }
  100% { box-shadow: 0 4px 16px rgba(37,211,102,.4), 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 640px) {
  .feedback-bubble { bottom: 16px; right: 16px; width: 54px; height: 54px; }
  .feedback-tooltip { display: none; }
}
/* ─── ПРАВАЯ СЕКЦИЯ — ФОРМ-КАРТОЧКА ─── */
.right-section {
  flex-shrink: 0;
  width: 420px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* тонкая линия сверху */
.form-card::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.4;
}

/* ─── ТАБЫ ─── */
.tabs {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 4px; gap: 4px;
  margin-bottom: 28px;
}
.tab {
  flex: 1; padding: 9px 0;
  background: none; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text-muted);
  transition: all 0.25s;
}
.tab.active {
  background: var(--primary);
  color: #fff;
}
.tab:not(.active):hover { color: var(--text); }

/* ─── ФОРМА ─── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.field-group {
  display: flex; flex-direction: column; gap: 6px;
}
.field-group label {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.dp-input-group { display: flex; }
.dp-input-group input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
  flex: 1;
}
.dp-type-select {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
input::placeholder { color: var(--text-dim); }
input:focus {
  border-color: var(--border-focus);
  background: var(--primary-light);
}
input.error { border-color: var(--error); }

/* input с кнопкой глаза */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.eye-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); padding: 4px;
  transition: color 0.2s;
}
.eye-btn:hover { color: var(--text-muted); }

/* Выбор роли */
.role-toggle {
  display: flex; gap: 8px;
}
.role-btn {
  flex: 1; padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.role-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.role-btn:not(.active):hover { border-color: #C7CEDA; color: var(--text); }

/* Кнопки */
.btn-primary {
  width: 100%; padding: 14px;
  background: var(--primary);
  border: none; border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px; font-weight: 700;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 4px;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-outline {
  width: 100%; padding: 13px;
  background: none;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--primary-light); }

/* Спиннер */
.spinner {
  animation: spin 0.8s linear infinite;
  stroke: #fff;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ошибка */
.form-error {
  font-size: 13px; color: var(--error);
  background: rgba(180,67,62,0.08);
  border: 1px solid rgba(180,67,62,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* Подсказка */
.form-hint {
  text-align: center;
  font-size: 13px; color: var(--text-muted);
}
.form-hint a {
  color: var(--primary); text-decoration: none; font-weight: 600;
}
.form-hint a:hover { text-decoration: underline; }

/* Успех */
.success-block {
  text-align: center;
  padding: 20px 0;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.success-block.hidden { display: none; }
.success-icon {
  width: 72px; height: 72px;
  background: var(--primary-light);
  border: 1px solid rgba(51,80,122,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.success-block h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px; font-weight: 700;
}
.success-block p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

/* ─── ФУТЕР ─── */
.footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 20px 40px;
  font-size: 12px; color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ─── УТИЛИТЫ ─── */
.hidden { display: none !important; }

/* ═══ АДАПТИВ ═══ */
@media (max-width: 960px) {
  .main {
    flex-direction: column;
    align-items: center;
    padding: 90px 24px 48px;
    gap: 40px;
  }
  .left-section { max-width: 100%; }
  .right-section { width: 100%; max-width: 480px; }
  .header { padding: 16px 24px; }
  .header-tagline { display: none; }
}

@media (max-width: 480px) {
  .main { padding: 80px 16px 40px; }
  .form-card { padding: 24px 20px; }
  h1 { font-size: 32px; }
  .form-card::before { display: none; }
}