/* Rent & Stay — фирменный слой поверх base.css (15.10.2026).
   Цвета логотипа: чёрный + оранжевый #EF965A; заголовки Georgia, как «RENT & STAY».
   Меню слева на компьютере, нижнее меню на телефоне, значки Lucide. */

/* --- Цвета ------------------------------------------------------------------ */
:root {
  --bg: #f6f5f3;            /* тёплый светлый фон */
  --surface: #ffffff;
  --surface-2: #f1efec;
  --text: #17150f;
  --muted: #6b665d;
  --border: #e6e2dc;
  --shadow: 0 1px 2px rgba(23, 21, 15, .04), 0 6px 20px rgba(23, 21, 15, .05);
  --shadow-hover: 0 2px 4px rgba(23, 21, 15, .06), 0 12px 28px rgba(23, 21, 15, .09);
  --side-bg: #0b0b0b;       /* меню — всегда чёрное, как логотип */
  --side-text: #d9d6d0;
  --side-muted: #8a857c;
  --side-hover: #1c1b19;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b;
    --surface: #151514;
    --surface-2: #1e1d1b;
    --text: #ece9e3;
    --muted: #9b968c;
    --border: #2a2926;
    --accent-soft: #33221a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
    --side-bg: #000000;
    --side-hover: #171614;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #151514;
  --surface-2: #1e1d1b;
  --text: #ece9e3;
  --muted: #9b968c;
  --border: #2a2926;
  --accent-soft: #33221a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
  --side-bg: #000000;
  --side-hover: #171614;
}

/* --- Типографика ------------------------------------------------------------ */
h1 { font-family: var(--serif); font-weight: 400; font-size: 1.65rem; letter-spacing: .01em; }
h2 { font-weight: 650; letter-spacing: .01em; }
.card h2, section > h2 { font-size: 1.02rem; }

/* --- Значки ------------------------------------------------------------------ */
.icon {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 1em; height: 1em; }

/* --- Каркас: меню слева (компьютер) ------------------------------------------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar { gap: 12px; }
.topbar .theme-toggle { margin-left: 0; flex: none; }
.topbar .global-search { flex: 1 1 auto; max-width: none; }
.topnav { display: none !important; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px; padding: 20px 14px;
    background: var(--side-bg); color: var(--side-text); scrollbar-width: thin;
  }
  .sidebar .brand { color: #fff; padding: 2px 8px 6px; font-size: .9rem; }
  .sidebar .brand span { display: inline !important; }
  .topbar { display: none; }
  .bottomnav { display: none !important; }
  .page { max-width: 1040px; padding: 28px 32px 56px; }
  .page:has(.kanban) { max-width: none; }

  .side-nav { display: grid; gap: 2px; }
  .side-group { margin: 14px 10px 4px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); }
  .side-link, .side-call {
    display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
    color: var(--side-text); font-size: .95rem; transition: background-color .15s, color .15s;
  }
  .side-link:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
  .side-link[aria-current="page"] { background: var(--side-hover); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
  .side-link .icon { width: 19px; height: 19px; }
  .side-call {
    justify-content: center; background: var(--accent); color: var(--accent-text); font-weight: 650;
    margin-bottom: 4px;
  }
  .side-call:hover { text-decoration: none; filter: brightness(1.05); }
  .side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }
  .side-foot .side-link { flex: 1; }
  .sidebar .theme-toggle { margin: 0; background: transparent; border-color: #2a2926; color: var(--side-text); }

  .sidebar .global-search { max-width: none; flex: none; }
  .sidebar .global-search input { background: #161513; border-color: #2a2926; color: #fff; }
  .sidebar .gs-dropdown:not(:empty) { left: 0; right: auto; width: 460px; }
}

/* Поиск: значок внутри поля. */
.global-search { position: relative; }
.global-search .gs-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.global-search input { padding-left: 36px; }

/* --- Нижнее меню (телефон) ----------------------------------------------------- */
.bottomnav { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
.bottomnav a { gap: 3px; }
.bottomnav a .icon { width: 22px; height: 22px; }
.bottomnav a[aria-current="page"] { color: var(--accent); }
.bottomnav a.call .ico { width: 44px; height: 44px; margin-top: -14px; box-shadow: 0 6px 16px rgba(239, 150, 90, .45); }
.bottomnav a.call .ico .icon { width: 22px; height: 22px; }
.theme-toggle .icon { width: 18px; height: 18px; }

/* --- Карточки и списки -------------------------------------------------------- */
.card, .fin-card, .dossier-item, .match, .list > li > .list-item, .list > .list-item {
  box-shadow: var(--shadow);
}
.card { border-radius: var(--radius); padding: 18px; }
@media (hover: hover) {
  .list > li > a.list-item:hover, a.fin-card:hover, .lead-card:hover, .match:hover {
    box-shadow: var(--shadow-hover); text-decoration: none;
  }
}
.btn-primary { box-shadow: 0 4px 12px rgba(239, 150, 90, .28); }
.btn-primary .icon, .btn-ghost .icon { width: 18px; height: 18px; }

/* Инициалы в кружке (лиды, контакты). */
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.avatar-sm { width: 28px; height: 28px; font-size: .72rem; }
.with-avatar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.with-avatar > span { min-width: 0; display: grid; }
.list-item > .avatar + .list-main { flex: 1; min-width: 0; }
.list-item:has(> .avatar) { justify-content: flex-start; }
.list-item:has(> .avatar) > .list-side { margin-left: auto; }

/* Фото в карточке сделки. */
.deal-card.has-photo { grid-template-columns: 64px 1fr; column-gap: 10px; }
.deal-thumb { grid-row: span 3; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }

/* --- Графики ------------------------------------------------------------------ */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line-a { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .area-a { fill: var(--accent); opacity: .14; }
.chart .line-b { fill: none; stroke: var(--text); stroke-width: 2; opacity: .55; }
.chart .dot-a { fill: var(--accent); }
.chart .bar-a { fill: var(--accent); }
.chart .bar-b { fill: var(--muted); opacity: .45; }
.chart .target { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ring { display: inline-grid; place-items: center; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--surface-2); }
.ring .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s ease-out; }
.ring.is-done .ring-fg { stroke: var(--ok); }
.ring-label { position: absolute; text-align: center; line-height: 1.1; }
.ring-label strong { display: block; font-size: 1.35rem; font-family: var(--serif); font-weight: 400; }
.ring-label small { display: block; color: var(--muted); font-size: .7rem; }
.donut-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.donut-legend li { display: flex; justify-content: space-between; gap: 8px; }
.donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.charts-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 12px; }
.charts-grid .card { margin-top: 0; }
@media (max-width: 420px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }

/* --- «Сегодня»: приветствие и кольца ------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 20px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--side-bg); color: #f3efe8; box-shadow: var(--shadow);
}
.hero h1 { color: #fff; }
.hero .muted { color: #a9a398; }
.hero-rings { display: flex; gap: 14px; }
.hero .ring .ring-bg { stroke: #2a2926; }
.hero .ring-label strong { color: #fff; }
.hero .ring-label small { color: #a9a398; }
.hero-next { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #1c1b19; color: #f3efe8; }
.hero-next:hover { text-decoration: none; background: #26241f; }
.hero-next strong { color: var(--accent); }
@media (max-width: 560px) { .hero { grid-template-columns: 1fr; } .hero-rings { justify-content: flex-start; } }

/* Планшет (768–1023): меню слева ещё нет — нижнее меню остаётся. */
@media (min-width: 768px) and (max-width: 1023px) {
  .bottomnav { display: grid !important; }
  .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.charts-grid > .card:first-child { grid-column: 1 / -1; }

/* --- Счётчики дня и недели ------------------------------------------------------ */
.tiles-label {
  display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--text);
  text-transform: none; letter-spacing: .01em;
}
.tiles-label small { font-family: system-ui, sans-serif; font-size: .82rem; color: var(--muted); }
.counters { gap: 10px; }
.counter {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-top-width: 1px;
  box-shadow: var(--shadow); color: var(--text);
}
.counter-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.counter-head .icon { width: 18px; height: 18px; color: var(--accent); }
.counter-pct { margin-left: auto; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.counter-value { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1; }
.counter-value small { font-family: system-ui, sans-serif; font-size: .95rem; color: var(--muted); }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--muted); transition: width .8s ease-out; }
.counter-note { font-size: .78rem; color: var(--muted); }
.counter-green .meter > span { background: var(--ok); }
.counter-green .counter-pct { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.counter-yellow .meter > span { background: var(--warn); }
.counter-yellow .counter-pct { background: color-mix(in srgb, var(--warn) 18%, transparent); color: #9a7b00; }
.counter-red .meter > span { background: var(--danger); }
.counter-red .counter-pct { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.counter-none .meter > span { background: var(--accent); }
@media (min-width: 900px) { .counters-3 { grid-template-columns: repeat(3, 1fr); } }

/* Канбан: свой цвет у каждого этапа (полоска колонки и точка в заголовке). */
.kanban-contacted { border-top-color: #5a8fd1; }
.kanban-showing_booked { border-top-color: #7b6fc9; }
.kanban-showing_done { border-top-color: #3f7f6e; }
.kanban-col { border-top-width: 4px; box-shadow: var(--shadow); }
.kanban-head::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; flex: none;
  background: currentColor; color: inherit;
}
.kanban-head { justify-content: flex-start; }
.kanban-head .kanban-count { margin-left: auto; }
.kanban-col .kanban-head::before { background: var(--border); }
.kanban-new .kanban-head::before, .kanban-signed .kanban-head::before { background: var(--accent); }
.kanban-contacted .kanban-head::before { background: #5a8fd1; }
.kanban-showing_booked .kanban-head::before { background: #7b6fc9; }
.kanban-showing_done .kanban-head::before { background: #3f7f6e; }
.kanban-decision .kanban-head::before { background: var(--warn); }
.kanban-deal .kanban-head::before, .kanban-paid .kanban-head::before { background: var(--ok); }
.kanban-lost .kanban-head::before, .kanban-failed .kanban-head::before { background: var(--danger); }

/* Водный знак */
.wm-layout { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.wm-mark { padding: 12px; border-radius: 10px; background: repeating-conic-gradient(#555 0 25%, #777 0 50%) 0 0 / 16px 16px; }
.wm-mark img { max-width: 100%; max-height: 120px; display: block; margin: 0 auto; }
.wm-preview img { width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; }

/* --- Карточки квартир (как на Otodom) -------------------------------------------- */
.prop-cards { gap: 16px; }
@media (min-width: 1024px) { .prop-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } .page:has(.prop-cards) { max-width: 1240px; } }
.prop-card { display: grid; overflow: hidden; padding: 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.prop-card:hover { box-shadow: var(--shadow-hover); text-decoration: none; }
.prop-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); }
.prop-slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.prop-slides::-webkit-scrollbar { display: none; }
.prop-slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.prop-card:hover .prop-slides img { transform: none; }
.prop-media .no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; color: var(--muted); gap: 6px; }
.prop-media .no-photo .icon { width: 28px; height: 28px; }
.prop-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.prop-badges .status, .prop-badges .badge { box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.prop-code { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; letter-spacing: .04em; }
.prop-price-tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65)); color: #fff; display: flex; align-items: baseline; gap: 6px;
}
.prop-price-tag strong { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; }
.prop-price-tag small { opacity: .85; }
.prop-dots { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 4px; }
.prop-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.prop-dots i.on { background: #fff; }
.prop-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.prop-body .prop-title { font-size: 1.02rem; line-height: 1.3; }
.prop-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: .82rem; color: var(--muted); }
.prop-facts > span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }

/* --- «Сегодня»: серия, фокус дня, мини-графики, план дня ---------------------------- */
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-chips .hero-next { margin-top: 0; }
.hero-streak { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: #2a1a0f; color: var(--accent); font-weight: 600; }
.focus { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 4px; }
.focus-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text);
}
.focus-item:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.focus-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--link); flex: none; }
.focus-icon .icon { width: 20px; height: 20px; }
.focus-text { display: grid; min-width: 0; }
.focus-text strong { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.focus-text small { color: var(--muted); }
.focus-go { margin-left: auto; color: var(--muted); }
.focus-done { display: flex; align-items: center; gap: 8px; color: var(--ok); margin: 4px 0; }
.counter-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.counter-spark { color: var(--accent); opacity: .9; flex: none; }
.counter-red .counter-spark { color: var(--danger); }
.counter-green .counter-spark { color: var(--ok); }
.day-plan { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 8px; position: relative; }
.day-plan::before { content: ""; position: absolute; left: 62px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.plan-item { display: grid; grid-template-columns: 48px 1fr; gap: 26px; align-items: center; }
.plan-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; text-align: right; }
.plan-card {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text);
}
.plan-card::before { content: ""; position: absolute; left: -21px; top: 50%; width: 10px; height: 10px; margin-top: -6px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.plan-card:hover { text-decoration: none; box-shadow: var(--shadow-hover); }
.plan-card > span { display: grid; }
.plan-card small { color: var(--muted); }
.plan-card .icon { color: var(--accent); }
.plan-showing .plan-card .icon { color: #3f7f6e; }
.plan-showing .plan-card::before { border-color: #3f7f6e; }
.plan-done .plan-card { opacity: .6; }
.plan-overdue .plan-card::before { border-color: var(--danger); }
.plan-now span { display: flex; align-items: center; gap: 8px; color: var(--danger); font-size: .78rem; font-weight: 700; }
.plan-now span::after { content: ""; flex: 1; height: 2px; background: var(--danger); border-radius: 2px; }

/* --- Шрифт Inter (встроенный, OFL — static/fonts/LICENSE-inter.txt) -------------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
body, input, select, textarea, button { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
body { font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em; }
.counter-value small, .tiles-label small { font-family: "Inter", system-ui, sans-serif; }

/* --- Единые цвета статусов: квартиры, лиды, сделки ------------------------------------ */
.status-prospect { --c: #8a857c; } .status-agreement_signed { --c: #c9a227; } .status-listed { --c: #e07b35; }
.status-showing { --c: #3f7f6e; } .status-rented { --c: #2e7d32; } .status-archived { --c: #8a857c; }
.stage-new, .kanban-new { --c: #e07b35; } .stage-contacted, .kanban-contacted { --c: #5a8fd1; }
.stage-showing_booked, .kanban-showing_booked { --c: #7b6fc9; } .stage-showing_done, .kanban-showing_done { --c: #3f7f6e; }
.stage-decision, .kanban-decision { --c: #c9a227; } .stage-deal, .kanban-deal, .stage-paid, .kanban-paid { --c: #2e7d32; }
.stage-lost, .kanban-lost, .stage-failed, .kanban-failed { --c: #c62828; } .stage-signed, .kanban-signed { --c: #e07b35; }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 14%, transparent);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prop-badges .status { background: var(--c, #555); color: #fff; }
.prop-badges .status::before { background: #fff; }
.kanban-col[class*="kanban-"] { border-top-color: var(--c, var(--border)); }
.kanban-col .kanban-head::before { background: var(--c, var(--border)); }
.stage-step.is-current { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; }
.stage-step[class*="stage-"]:not(.is-current) { border-color: color-mix(in srgb, var(--c, var(--border)) 45%, var(--border)); }

/* Теги квартир в списке — оранжевые. */
.prop-facts > span { background: var(--accent-soft); color: var(--link); font-weight: 600; }

/* --- Пустые экраны: иллюстрация в фирменных цветах -------------------------------------- */
.empty { display: grid; justify-items: center; gap: 10px; padding: 28px 12px; }
.empty::before {
  content: ""; width: 120px; height: 96px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 96' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 86h84'/%3E%3Cpath d='M30 86V46l30-24 30 24v40'/%3E%3Cpath d='M52 86V64h16v22'/%3E%3Crect x='37' y='50' width='10' height='9' rx='1.5'/%3E%3Crect x='73' y='50' width='10' height='9' rx='1.5'/%3E%3Cpath d='M60 6v6M42 12l3 4M78 12l-3 4' opacity='.7'/%3E%3Ccircle cx='100' cy='26' r='3'/%3E%3Ccircle cx='16' cy='34' r='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 96' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 86h84'/%3E%3Cpath d='M30 86V46l30-24 30 24v40'/%3E%3Cpath d='M52 86V64h16v22'/%3E%3Crect x='37' y='50' width='10' height='9' rx='1.5'/%3E%3Crect x='73' y='50' width='10' height='9' rx='1.5'/%3E%3Cpath d='M60 6v6M42 12l3 4M78 12l-3 4' opacity='.7'/%3E%3Ccircle cx='100' cy='26' r='3'/%3E%3Ccircle cx='16' cy='34' r='2'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .85;
}
.empty a { font-weight: 600; }

/* --- Уведомления внизу экрана ------------------------------------------------------------ */
.toasts { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
@media (min-width: 1024px) { .toasts { bottom: 24px; left: calc(50% + 124px); } }
.toast-float {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px;
  background: #151514; color: #f3efe8; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); animation: toast-in .25s ease-out both;
}
.toast-float > .icon { color: var(--accent); width: 20px; height: 20px; }
.toast-float > span { flex: 1; }
.toast-float form { margin: 0; }
.toast-float > a { color: var(--accent); font-weight: 700; }
.toast-float form button { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.toast-close { background: none; border: 0; color: #9b968c; cursor: pointer; padding: 4px; display: grid; }
.toast-float.is-leaving { animation: toast-out .3s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* --- Загрузка: полоса сверху и «скелетон» списков ----------------------------------------- */
body.is-loading::before {
  content: ""; position: fixed; top: 0; left: 0; height: 3px; z-index: 80; width: 40%;
  background: var(--accent); animation: loading-bar 1s ease-in-out infinite; border-radius: 0 3px 3px 0;
}
@keyframes loading-bar { 0% { left: -40%; } 100% { left: 100%; } }
#results.is-loading { position: relative; }
#results.is-loading > * { opacity: .45; transition: opacity .15s; }
#results.is-loading::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 80%) 0 0 / 200% 100%;
  animation: shimmer 1s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* --- Конфетти и просмотр фото ----------------------------------------------------------- */
.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.no-scroll { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0, 0, 0, .92); animation: toast-in .2s ease-out; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .12); color: #fff; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox .icon { width: 24px; height: 24px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; background: rgba(0, 0, 0, .5); padding: 4px 12px; border-radius: 999px; }
.gallery-item > a { cursor: zoom-in; }

/* --- История клиента — лента со значками ------------------------------------------------- */
.timeline { position: relative; gap: 10px; padding-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline > li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.tl-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tl, var(--accent)); color: var(--tl, var(--accent)); }
.tl-icon .icon { width: 17px; height: 17px; }
.tl-call { --tl: #e07b35; } .tl-meeting { --tl: #7b6fc9; } .tl-showing { --tl: #3f7f6e; } .tl-message { --tl: #5a8fd1; } .tl-other { --tl: #8a857c; }
.timeline-item { box-shadow: var(--shadow); border-radius: 12px; }
.tl-outcome { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--tl, var(--accent)); background: color-mix(in srgb, var(--tl, var(--accent)) 14%, transparent); }

/* --- Профиль клиента ------------------------------------------------------------------- */
.profile { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; margin-bottom: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; font-family: var(--serif); font-weight: 400; }
.profile h1 { margin: 0; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; color: var(--muted); }
.flags { display: inline-flex; gap: 4px; }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); display: block; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; grid-column: 1 / -1; }
.contact-actions a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-weight: 600; color: #fff; }
.contact-actions a:hover { text-decoration: none; filter: brightness(1.06); }
.ca-call { background: var(--accent); color: var(--accent-text) !important; }
.ca-wa { background: #25a35a; }
.ca-tg { background: #2a9fd6; }
.ca-mail { background: var(--surface-2); color: var(--text) !important; }
@media (max-width: 520px) { .profile { grid-template-columns: 1fr; justify-items: start; } }

/* --- Страница входа ---------------------------------------------------------------------- */
body:has(.auth) { background: #0b0b0b; min-height: 100vh; }
.auth { max-width: 420px; padding-top: 9vh; }
.auth-brand h1 { color: #fff; font-family: var(--serif); font-weight: 400; letter-spacing: .32em; text-transform: uppercase; font-size: 1.5rem; }
.auth-brand p { color: var(--accent); }
.auth-brand img { width: 96px; height: 96px; filter: drop-shadow(0 8px 24px rgba(239, 150, 90, .35)); }
.auth .card { background: #151514; border-color: #2a2926; color: #ece9e3; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.auth .card input { background: #0f0f0e; border-color: #2a2926; color: #fff; }
.auth-tagline { text-align: center; color: #8a857c; font-size: .85rem; margin-top: 16px; }
.auth-theme { background: transparent; border-color: #2a2926; color: #d9d6d0; }

.gallery-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* --- Команда: «Смотреть как агент», профиль в меню, ответственный, сотрудники --- */
.view-as { display: block; margin: 12px 0 6px; }
.view-as label { display: grid; gap: 4px; }
.view-as label > span { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); }
.view-as select {
  width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--side-hover);
  background: var(--side-hover); color: var(--side-text); font: inherit; font-size: .9rem;
}
.view-as.is-on select { border-color: var(--accent); color: var(--accent); }
.view-as-mobile { display: none; padding: 8px 16px 0; }
.view-as-mobile .view-as { margin: 0; }
.view-as-mobile .view-as label { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.view-as-mobile .view-as label > span { color: var(--muted); }
.view-as-mobile .view-as select { background: var(--surface); color: var(--text); border-color: var(--border); }
@media (max-width: 1023px) { .view-as-mobile { display: block; } }
.side-me {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 10px; border-radius: 10px;
  color: var(--side-text);
}
.side-me:hover { background: var(--side-hover); text-decoration: none; }
.side-me-text { display: grid; font-size: .9rem; font-weight: 500; line-height: 1.25; }
.side-me-text small { color: var(--side-muted); font-size: .72rem; }
.responsible { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; color: var(--muted); }
.responsible .icon { width: 16px; height: 16px; }
.responsible-form label { display: flex; align-items: center; gap: 8px; }
.responsible-form select {
  padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: .9rem;
}
.badge-brand { background: var(--accent-soft); color: var(--text); }
.team-list .list-item { display: flex; align-items: center; gap: 12px; }
.team-list .is-off { opacity: .55; }
.team-counts { margin-left: auto; white-space: nowrap; }
@media (max-width: 600px) { .team-counts { display: none; } }
.team-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.team-stats strong { font-size: 1.4rem; margin-right: 4px; }
.deactivate-form { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.deactivate-form .field { margin: 0; min-width: 200px; }
.temp-password-value { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.temp-password-value code { font-size: 1.5rem; letter-spacing: .08em; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); }
.agent-share-form .grid-3 { align-items: end; }

/* --- Дашборд: вкладки, период, плитки, воронки, соотношения, тепловая карта --- */
.page:has(.dash-tabs) { max-width: 1180px; }
.dash-head { align-items: flex-start; }
.dash-who .view-as { margin: 0; min-width: 220px; }
.dash-who .view-as label { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.dash-who .view-as label > span { color: var(--muted); }
.dash-who .view-as select { background: var(--surface); color: var(--text); border-color: var(--border); }
.dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.chip-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tab {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text);
  font-size: .88rem; background: var(--surface);
}
.chip-tab:hover { text-decoration: none; border-color: var(--accent); }
.chip-tab[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.dash-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-custom input[type="date"] { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; }
.dash-custom.is-on input { border-color: var(--accent); }
.dash-tabs {
  display: flex; gap: 4px; overflow-x: auto; margin: 0 0 16px; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar { display: none; }
.dash-tab { padding: 10px 14px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 550; }
.dash-tab:hover { color: var(--text); text-decoration: none; }
.dash-tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.dash-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 12px; }
.dash-tile {
  display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow);
}
.dash-tile:hover { text-decoration: none; border-color: var(--accent); }
.dash-tile-title { font-size: .82rem; color: var(--muted); }
.dash-tile-value { font-size: 1.6rem; font-family: var(--serif); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dash-tile-spark .chart, .dash-tile-spark svg { width: 100%; height: 28px; }
.delta { font-size: .8rem; font-weight: 600; }
.delta-up { color: var(--ok); }
.delta-down { color: var(--danger); }
.delta-flat, .delta-none { color: var(--muted); font-weight: 500; }

.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.funnel-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto 48px; align-items: center; gap: 10px; color: var(--text); padding: 4px 0; }
.funnel-row:hover { text-decoration: none; }
.funnel-row:hover .funnel-title { color: var(--accent); }
.funnel-title { font-size: .9rem; }
.funnel-bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.funnel-bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); }
.funnel-value { font-variant-numeric: tabular-nums; text-align: right; min-width: 2.5em; }
.funnel-conv { font-size: .8rem; color: var(--muted); text-align: right; }
@media (max-width: 600px) { .funnel-row { grid-template-columns: 1fr auto 44px; } .funnel-bar { grid-column: 1 / -1; grid-row: 2; } }

.ratio-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ratio-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ratio { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
a.ratio:hover { text-decoration: none; outline: 1px solid var(--accent); }
.ratio strong { font-size: 1.35rem; font-family: var(--serif); font-variant-numeric: tabular-nums; }
.ratio span { font-size: .88rem; }
.ratio small { font-size: .75rem; }
.cost-row { margin-top: 12px; }
.chart-wide .chart { width: 100%; height: auto; }

.heat-wrap { overflow-x: auto; }
.heat { border-collapse: separate; border-spacing: 3px; font-size: .75rem; min-width: 560px; }
.heat th { color: var(--muted); font-weight: 500; padding: 2px 4px; }
.heat td {
  width: 34px; height: 28px; text-align: center; border-radius: 6px; background: var(--surface-2);
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.heat td.has { background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--surface-2)); color: var(--text); }

.kpi-person + .kpi-person { margin-top: 24px; }
.kpi-person-title { margin: 4px 0 8px; }
.pct-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.pct-badge.is-green { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pct-badge.is-yellow { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--text); }
.pct-badge.is-red { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.table-scroll { overflow-x: auto; }
.team-table table { min-width: 900px; }
.team-table td, .team-table th { white-space: nowrap; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.feedback-top li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 1023px) { .dash-who { display: none; } }
.dash-custom input[type="date"] { width: auto; flex: 0 0 auto; margin: 0; min-height: 0; }
.dash-custom .btn-sm { margin: 0; }
@media (min-width: 900px) { .dash-tiles { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 899px) { .dash-tiles { grid-template-columns: repeat(2, 1fr); } }
.charts-grid .chart-wide { grid-column: 1 / -1; }

/* --- Сайт --- */
.site-line { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: .92rem; }
.site-line .icon { width: 16px; height: 16px; color: var(--accent); }
.site-publish { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.notice-error { border-color: var(--danger); }
.lang-tabs { display: grid; gap: 8px; margin-bottom: 8px; }
.lang-tab { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: var(--surface); }
.lang-tab summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.lang-tab[open] summary { margin-bottom: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.kpi-targets { margin-top: 10px; }

/* --- Безопасность и вход по коду --- */
.auth-wide .card { max-width: 460px; }
.setup-steps { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; text-align: left; }
.qr { display: flex; justify-content: center; margin: 10px auto; padding: 12px; background: #fff; border-radius: 12px; width: fit-content; }
.qr svg { width: 200px; height: 200px; display: block; }
.secret-key { font-size: 1rem; letter-spacing: .08em; word-break: break-all; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-codes { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.recovery-codes code { display: block; text-align: center; padding: 6px; border-radius: 8px; background: var(--surface-2); font-size: 1.05rem; letter-spacing: .06em; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.security-alerts { display: grid; gap: 6px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); }
.security-alert { margin: 0; display: flex; gap: 8px; align-items: center; }
.security-alert .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.security-alert-backup .icon { color: var(--danger); }
.security-alerts form { justify-self: end; }
.session-list .list-item { display: flex; align-items: center; gap: 12px; }
.session-list form { margin-left: auto; }
.logout-all { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.twofa-actions .form { gap: 6px; }
.journal tr.is-warn th, .journal tr.is-warn td:first-child { color: var(--danger); }
.card h2 .icon { width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }
@media print { .app-shell, .sidebar, .topbar, .bottomnav, .actions-row, .notice, .auth-brand img, .btn-primary { display: none !important; } }
.auth-logo { display: flex; justify-content: center; margin-bottom: 6px; }
.auth-title { text-align: center; margin: 4px 0 2px; font-size: 1.3rem; letter-spacing: normal; text-transform: none; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 10px; font-size: .9rem; }

/* --- Ключик --- */
.kluchik { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 1023px) { .kluchik { right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); } }
.kluchik-btn {
  position: relative; width: 58px; height: 82px; padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 85%; transition: transform .2s ease; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .18));
}
.kluchik-btn:hover, .kluchik-btn:focus-visible { transform: rotate(-8deg) scale(1.06); }
.kluchik-svg { width: 100%; height: 100%; display: block; }
.kl-head { fill: #ef965a; }
.kl-rim { fill: none; stroke: #c9773e; stroke-width: 4; }
.kl-shaft { fill: #c9773e; }
.kl-eyes ellipse, .kl-eyes path { fill: #2b2620; stroke: #2b2620; }
.kl-eyes path { fill: none; }
.kl-glint { fill: #fff; }
.kl-mouth { fill: none; stroke: #2b2620; stroke-width: 4; stroke-linecap: round; }
.kl-cheek { fill: #f5b78a; }
.kl-eyes-wink { display: none; }
.kluchik.is-talking .kl-eyes-open { display: none; }
.kluchik.is-talking .kl-eyes-wink { display: inline; }
.kluchik-logo {
  position: absolute; left: 50%; top: 10%; width: 40%; aspect-ratio: 1; transform: translateX(-50%);
  background: #fdf1e6; -webkit-mask: var(--emblem) center / contain no-repeat; mask: var(--emblem) center / contain no-repeat;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .kluchik-btn { animation: kl-bob 4s ease-in-out infinite; }
  @keyframes kl-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
}
.kl-spot {
  position: fixed; z-index: 61; border-radius: 12px; pointer-events: auto; cursor: pointer;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgb(0 0 0 / .5); transition: all .25s ease;
}
.kl-spot-none { box-shadow: 0 0 0 9999px rgb(0 0 0 / .35); width: 0; height: 0; }
.kl-bubble, .kl-offer {
  z-index: 62; background: var(--surface); color: var(--text); border: 1px solid var(--accent);
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
}
.kl-bubble { position: fixed; transition: top .25s ease, left .25s ease; }
.kl-bubble strong { display: block; margin-bottom: 4px; }
.kl-bubble p, .kl-offer p { margin: 0 0 10px; font-size: .92rem; line-height: 1.45; }
.kl-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.kl-count { margin-right: auto; color: var(--muted); font-size: .8rem; }
.kl-offer { position: relative; max-width: 260px; }
.kl-offer::after { content: ""; position: absolute; right: 22px; bottom: -7px; width: 12px; height: 12px; background: var(--surface); border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: rotate(45deg); }
@media print { .kluchik { display: none; } }
.prop-summary { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
@media (max-width: 700px) { .prop-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.story-img { width: 100%; max-width: 360px; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; }

/* --- Анализ цены и горячие совпадения --- */
.price-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.price-checks li { display: flex; gap: 8px; align-items: flex-start; }
.price-checks .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.pc-warn .icon { color: var(--danger); }
.pc-info .icon { color: var(--accent); }
.pc-ok .icon { color: var(--ok); }
.price-alert { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.comp-form { margin-top: 8px; }
tr.is-stale td { opacity: .45; }
.hot-list { gap: 10px; }
.hot-item { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.hot-item:last-child { border-bottom: 0; }
.hot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hot-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-msg summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
.tag-warn { background: color-mix(in srgb, var(--warn) 22%, transparent); }
#hot h2 .icon { color: var(--accent); }
