:root {
  --dm-ink: #16202a;
  --dm-accent: #c9a227;      /* латунь: металл, но не «золото-кич» */
  --dm-accent-dark: #a3821c;
  --dm-muted: #6b7682;
  --dm-bg: #f6f7f9;
}
body.site { background: var(--dm-bg); color: var(--dm-ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.site .navbar { background: #fff; border-bottom: 1px solid #e6e9ee; }
.site .navbar-brand { font-weight: 700; letter-spacing: .01em; color: var(--dm-ink); }
.site .navbar-brand i { color: var(--dm-accent); }
.site .nav-link { color: var(--dm-ink); }
.site .nav-link.active { font-weight: 600; border-bottom: 2px solid var(--dm-accent); }
.site .btn-accent { background: var(--dm-accent); border-color: var(--dm-accent); color: #1a1a1a; font-weight: 600; }
.site .btn-accent:hover { background: var(--dm-accent-dark); border-color: var(--dm-accent-dark); color: #fff; }
.site .btn-outline-accent { border-color: var(--dm-accent); color: var(--dm-ink); }
.site .btn-outline-accent:hover { background: var(--dm-accent); color: #1a1a1a; }
.site .hero { background: linear-gradient(135deg, #16202a 0%, #243444 100%); color: #fff; padding: 4rem 0 3.5rem; }
.site .hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; }
.site .hero .lead { color: #d6dde6; max-width: 40rem; }
.site .hero .badge-line span { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 2rem; padding: .3rem .8rem; font-size: .9rem; margin: .25rem .25rem 0 0; }
.site .hero .badge-line i { color: var(--dm-accent); }
.site .hero .btn-outline-accent { color: #fff; }
.site .hero .btn-outline-accent:hover { color: #1a1a1a; }
.site .hero .text-secondary { color: #aeb8c4 !important; }
.site .section { padding: 3rem 0; }
.site .section-title { font-weight: 700; margin-bottom: 1.5rem; }
.site .step { background: #fff; border: 1px solid #e6e9ee; border-radius: .75rem; padding: 1.25rem; height: 100%; }
.site .step .num { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--dm-accent); color: #1a1a1a; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.site .step h5 { font-weight: 600; font-size: 1.05rem; }
.site .why i { font-size: 1.6rem; color: var(--dm-accent); }
.site .card-soft { background: #fff; border: 1px solid #e6e9ee; border-radius: .75rem; }
.site .accordion-button:not(.collapsed) { background: #fbf6e6; color: var(--dm-ink); box-shadow: none; }
.site .accordion-button:focus { box-shadow: none; border-color: #e6e9ee; }
.site footer { background: var(--dm-ink); color: #c5cdd6; padding: 2.5rem 0 2rem; font-size: .9rem; }
.site footer a { color: #e9eef3; }
.site footer .muted { color: #8a95a1; }
.site .legal p { text-align: justify; }
.site .req-table td { padding: .25rem .75rem .25rem 0; vertical-align: top; }
.site .req-table td:first-child { color: var(--dm-muted); white-space: nowrap; }
.site .contact-btn { min-width: 11rem; }
.site .dont li { margin-bottom: .35rem; }
@media (max-width: 575px) { .site .hero { padding: 2.5rem 0; } }

/* Чат с оператором на странице сделки: кнопка и панель в правом нижнем углу */
.site .chat-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; font-size: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center; z-index: 1040; }
.site .chat-fab .badge { position: absolute; top: -.25rem; right: -.25rem; font-size: .7rem; }
.site .chat-panel { position: fixed; right: 1.25rem; bottom: 5.25rem; width: 22rem; max-width: calc(100vw - 2.5rem); max-height: min(34rem, calc(100vh - 6.5rem));
  display: flex; flex-direction: column; z-index: 1041; overflow: hidden; }
.site .chat-panel.d-none { display: none !important; }
.site .chat-head { border-bottom: 1px solid #e6e9ee; background: #fbf6e6; }
.site .chat-body { overflow-y: auto; flex: 1 1 auto; min-height: 10rem; }
.site .chat-foot { border-top: 1px solid #e6e9ee; background: #fff; }
.site .chat-foot textarea { resize: none; }
.site .chat-camera { display: none; }
@media (hover: none) and (pointer: coarse) { .site .chat-camera { display: inline-block; } }
.site .chat-msg { max-width: 88%; padding: .4rem .6rem; border-radius: .6rem; font-size: .92rem; }
.site .chat-in { background: #f1f3f5; align-self: flex-end; }
.site .chat-out { background: #fbf6e6; align-self: flex-start; }
@media (max-width: 575px) {
  .site .chat-panel { right: 0; bottom: 0; left: 0; width: auto; max-width: none; max-height: 100vh; height: 100vh; border-radius: 0; }
}

/* Шаги сделки на странице клиента */
.site .step-nav { flex-wrap: nowrap; overflow-x: auto; gap: .25rem; scrollbar-width: thin; }
.site .step-nav .nav-link { white-space: nowrap; color: var(--dm-muted); background: #fff; border: 1px solid #e6e9ee; padding: .4rem .7rem; }
.site .step-nav .nav-link .step-n { display: inline-flex; width: 1.4rem; height: 1.4rem; border-radius: 50%; align-items: center; justify-content: center;
  font-size: .75rem; margin-right: .35rem; background: #eef0f3; color: var(--dm-muted); }
.site .step-nav .nav-link.st-done .step-n { background: #2e9e5b; color: #fff; }
.site .step-nav .nav-link.st-current { color: var(--dm-ink); font-weight: 600; border-color: var(--dm-accent); }
.site .step-nav .nav-link.st-current .step-n { background: var(--dm-accent); color: #1a1a1a; }
.site .step-nav .nav-link.active { background: #fbf6e6; color: var(--dm-ink); }
.site .step-todo { border: 2px solid var(--dm-accent); background: #fffdf6; }
.site .step-cam { display: none; }
@media (hover: none) and (pointer: coarse) { .site .step-cam { display: inline-block; } }
@media (max-width: 575px) { .site .step-nav .nav-link:not(.active) .step-t { display: none; } }

/* Полоса «сделка обновилась» на странице клиента */
.site .portal-update { position: fixed; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 1050; display: flex; align-items: center;
  background: var(--dm-accent); color: #1a1a1a; padding: .5rem .75rem; border-radius: .6rem; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.2);
  max-width: calc(100vw - 2rem); font-weight: 600; }
.site .portal-update.d-none { display: none !important; }

/* Текст договора на странице клиента */
.site .contract-scroll { max-height: 70vh; overflow-y: auto; }
.site .contract-text { font-family: "Times New Roman", Times, serif; font-size: .95rem; line-height: 1.35; }
.site .contract-text p { text-align: justify; margin-bottom: .35rem; }
/* Чат на странице сделки: вся история — этапы, действия и звонки строкой посередине (apps/core/timeline.py) */
.site .chat-day { align-self: center; font-size: .75rem; color: #6c757d; background: #f1f3f5; border-radius: 1rem; padding: .05rem .6rem; }
.site .chat-event { align-self: center; text-align: center; max-width: 95%; font-size: .8rem; color: #495057; }
.site .chat-event.chat-stage { font-weight: 600; }
.site .chat-event.chat-warn { color: #8a5a00; }
/* Статус СМС с кодом на странице подтверждения номера (templates/site/lead_code.html) */
.site .sms-state { color: #6c757d; }
.site .sms-state.sms-ok { color: #198754; }
.site .sms-state.sms-fail { color: #b02a37; font-weight: 600; }
