/* Брокер CRM — стиль «Бизнес Маркет». Один акцент — оранжевый. Без градиентов, теней и свечения. */
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Montserrat-Medium.a2f9e886eacb.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Montserrat-SemiBold.8f6d0563f2bf.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/Montserrat-ExtraBold.9a001537d0c5.ttf") format("truetype"); }

:root {
  --bm-orange: #F5921E;
  --bm-orange-light: #FB992A;
  --bm-amber: #E1B52D;
  --bm-graphite: #23272B;
  --bm-paper: #F4F5F6;
  --bm-sage: #869791;
  --bm-white: #FFFFFF;
  --bm-line: #E3E6E8;
  --bm-danger: #C2412D;
  --bm-ok: #3F7D58;
  --radius: 10px;
  --radius-sm: 6px;
  --tap: 44px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bm-white); color: var(--bm-graphite);
  font-family: var(--font); font-weight: 500; font-size: 15px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--bm-graphite); border-bottom: 1px solid var(--bm-orange); }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--bm-sage); }
.small { font-size: 13px; }
.danger { color: var(--bm-danger); }
.num-big { font-size: 28px; font-weight: 800; color: var(--bm-orange); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- каркас ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bm-white); border-bottom: 1px solid var(--bm-line);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
.brand { font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.brand b { color: var(--bm-orange); font-weight: 800; }
.topbar form { flex: 1; }
.search-input { width: 100%; }
.main { flex: 1; padding: 16px; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1440px; width: 100%; margin: 0 auto; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bm-white); border-top: 1px solid var(--bm-line);
  display: grid; grid-template-columns: repeat(6, 1fr); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--bm-sage); min-height: var(--tap); }
.bottomnav a.active { color: var(--bm-graphite); }
.bottomnav a.active .ico { border-color: var(--bm-orange); }
.bottomnav .plus .ico { background: var(--bm-graphite); color: var(--bm-white); border-color: var(--bm-graphite); }
.bottomnav a.home { color: var(--bm-graphite); font-weight: 800; }
.bottomnav .ico .i { width: 18px; height: 18px; flex-basis: 18px; }
@media (max-width: 380px) { .bottomnav a { font-size: 10px; letter-spacing: -0.01em; } }
.ico { width: 28px; height: 28px; border: 1.5px solid var(--bm-line); border-radius: 8px; display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.sidenav { display: none; }

@media (min-width: 1024px) {
  .bottomnav { display: none; }
  .app { flex-direction: row; }
  .sidenav { display: flex; flex-direction: column; gap: 2px; width: 220px; flex: 0 0 220px; border-right: 1px solid var(--bm-line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
  .sidenav .brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 16px 10px; }
  .sidenav .brand { font-size: 17px; }
  .sidenav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--bm-graphite);
    border-left: 3px solid transparent; transition: background-color .15s ease, color .15s ease; }
  .sidenav a .i { width: 18px; height: 18px; flex-basis: 18px; stroke: var(--bm-orange); }
  .sidenav a:hover { background: var(--bm-paper); }
  .sidenav a.active { background: var(--bm-paper); border-left-color: var(--bm-orange); border-radius: 0; font-weight: 600; }
  .sidenav .sep { height: 1px; background: var(--bm-line); margin: 10px 4px; }
  .sidenav .nav-home { font-size: 16px; font-weight: 800; }  /* «Главная» — заметнее остальных пунктов */
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar .brand-row { display: none; }
  .main { padding: 24px 28px 40px; }
}

/* ---------- кнопки и формы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border: 1.5px solid var(--bm-graphite); border-radius: var(--radius); background: var(--bm-white); color: var(--bm-graphite);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--bm-graphite); color: var(--bm-white); }
.btn-ghost { border-color: var(--bm-line); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-danger { border-color: var(--bm-danger); color: var(--bm-danger); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=datetime-local],
input[type=time], input[type=search], input[type=url], input[type=password], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; font: inherit; font-size: 16px; color: var(--bm-graphite);
  background: var(--bm-white); border: 1.5px solid var(--bm-line); border-radius: var(--radius); appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bm-orange); }
label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-size: 13px; color: var(--bm-sage); margin-bottom: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--bm-danger); font-size: 13px; }
.form-error { border-left: 3px solid var(--bm-danger); background: var(--bm-paper); padding: 10px 12px; margin-bottom: 14px; border-radius: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.check input { width: 22px; height: 22px; accent-color: var(--bm-orange); }

/* чипы = радио/чекбоксы без JS */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--bm-line);
  border-radius: 999px; color: var(--bm-graphite); cursor: pointer; font-size: 14px;
}
.chip input:checked + span { border-color: var(--bm-orange); background: var(--bm-paper); }
.chip input:focus-visible + span { outline: 2px solid var(--bm-orange); outline-offset: 2px; }

.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: var(--bm-white); padding: 12px 0; border-top: 1px solid var(--bm-line); margin-top: 8px; }
@media (min-width: 1024px) { .sticky-actions { bottom: 0; } }

/* ---------- блоки ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bm-sage); font-weight: 600; }
.section.danger h2 { color: var(--bm-danger); }
.panel { background: var(--bm-paper); border-radius: var(--radius); padding: 14px 16px; }
.accent { border-left: 3px solid var(--bm-orange); border-radius: 0; padding: 10px 14px; background: var(--bm-paper); }
form > .accent { margin-bottom: 14px; }
.warn { border-left: 3px solid var(--bm-amber); border-radius: 0; padding: 8px 12px; background: var(--bm-paper); font-size: 13px; margin-top: 8px; }
.alert { border-left: 3px solid var(--bm-danger); border-radius: 0; padding: 8px 12px; background: var(--bm-paper); font-size: 13px; margin-top: 8px; }
.messages { list-style: none; padding: 0; margin: 0 0 14px; }
.messages li { border-left: 3px solid var(--bm-orange); background: var(--bm-paper); padding: 10px 12px; margin-bottom: 6px; }
.messages li.error { border-left-color: var(--bm-danger); }

.rows { border-top: 1px solid var(--bm-line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bm-line); min-height: 56px; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 13px; color: var(--bm-sage); }
.row .when { font-size: 13px; color: var(--bm-sage); white-space: nowrap; }
.row.overdue .when { color: var(--bm-danger); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
details.fold > summary { cursor: pointer; list-style: none; padding: 10px 0; color: var(--bm-sage); font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }

.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1.5px solid var(--bm-line); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.stage { border-color: var(--bm-orange); }
.badge.muted { color: var(--bm-sage); }
.progress { width: 100%; height: 4px; appearance: none; border: 0; background: var(--bm-paper); border-radius: 2px; }
.progress::-webkit-progress-bar { background: var(--bm-paper); border-radius: 2px; }
.progress::-webkit-progress-value { background: var(--bm-orange); border-radius: 2px; }
.progress::-moz-progress-bar { background: var(--bm-orange); }

/* ---------- карточка ---------- */
.card-head h1 { font-size: 22px; }
.card-sub { color: var(--bm-sage); font-size: 14px; margin-top: 2px; }
.quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; margin: 14px 0; }
.quick form { display: contents; }
.quick a, .quick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; min-height: 60px; min-width: 0; border: 0; background: none; font: inherit; font-size: 11px; color: var(--bm-graphite); cursor: pointer; overflow-wrap: break-word; text-align: center; }
@media (min-width: 420px) { .quick a, .quick button { font-size: 12px; } }
.quick .ico { width: 34px; height: 34px; border-radius: 10px; }
.quick .ico-app { border: 0; background: none; }
.quick .ico-app .app-i { width: 34px; height: 34px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 16px 0 10px; border-bottom: 1px solid var(--bm-line); scroll-margin-top: 80px; }
.tabs a { padding: 10px 12px; white-space: nowrap; color: var(--bm-sage); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--bm-graphite); border-bottom-color: var(--bm-orange); }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--bm-sage); } .kv dd { margin: 0; }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.figure { background: var(--bm-paper); padding: 10px 12px; }
.figure .label { font-size: 12px; color: var(--bm-sage); }
.figure .value { font-size: 18px; font-weight: 600; }

/* ---------- лента ---------- */
.timeline { margin-top: 6px; }
.ev { border-left: 2px solid var(--bm-line); padding: 2px 0 12px 12px; margin-left: 2px; }
.ev.hot { border-left-color: var(--bm-orange); }
.ev.sys { opacity: 0.7; }
.ev .meta { font-size: 12px; color: var(--bm-sage); }
.ev .text { white-space: pre-wrap; word-break: break-word; }
.ev-actions { font-size: 12px; margin-top: 4px; display: flex; gap: 10px; }
.ev-actions a { color: var(--bm-sage); }

/* ---------- десктоп: три колонки ---------- */
@media (min-width: 1024px) {
  .card-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .figures { grid-template-columns: repeat(4, 1fr); }
  .quick { max-width: 520px; }
  .form-narrow { max-width: 640px; }
}

.banner { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 40; background: var(--bm-graphite); color: var(--bm-white); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.banner .btn { border-color: var(--bm-white); background: var(--bm-white); color: var(--bm-graphite); }
.banner .close { background: none; border: 0; color: var(--bm-white); font-size: 20px; cursor: pointer; min-width: var(--tap); min-height: var(--tap); }
@media (min-width: 1024px) { .banner { left: auto; right: 24px; bottom: 24px; max-width: 420px; } }
.htmx-request .spinner { display: inline-block; }
.spinner { display: none; }

/* вход */
.auth { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.auth .brand { font-size: 22px; margin-bottom: 24px; display: block; }

/* iPhone: действия строки уходят под текст, название не сжимается */
@media (max-width: 767px) {
  .row { flex-wrap: wrap; row-gap: 8px; }
  .row .grow { flex: 1 1 60%; }
  .row .row-actions { flex: 1 1 100%; justify-content: flex-start; }
  .row .row-actions form { display: contents; }
}
.auth form .btn { margin-top: 8px; }
.next-steps { display: grid; gap: 6px; }
.next-step { display: flex; align-items: center; gap: 12px; }
.next-step .grow { flex: 1; min-width: 0; }
.next-step .title { font-weight: 600; }

/* Telegram: неразобранные чаты */
.row-actions form { display: inline; margin: 0; }
.tg-chat { border-left: 3px solid var(--bm-orange); padding: 10px 0 12px 14px; margin-bottom: 14px; border-bottom: 1px solid var(--bm-line); }
.tg-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tg-head .title { font-weight: 600; }
.tg-head .when { font-size: 13px; color: var(--bm-sage); white-space: nowrap; }
.tg-preview { margin: 8px 0; display: grid; gap: 4px; }
.tg-msg { font-size: 14px; padding: 6px 10px; background: var(--bm-paper); border-radius: var(--radius-sm); max-width: 92%; justify-self: start; }
.tg-msg.out { justify-self: end; background: var(--bm-white); border: 1px solid var(--bm-line); }
.tg-bind { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.tg-bind select { flex: 1 1 220px; width: auto; }
.btn-row form { display: inline; margin: 0; }
.steps { padding-left: 18px; margin: 0 0 16px; }
.steps li { margin-bottom: 6px; }
.btn-block + .btn-block { margin-top: 8px; }

/* звонки и голос: блок расшифровки в ленте */
.rec { margin-top: 8px; padding: 10px 12px; background: var(--bm-paper); border-radius: var(--radius-sm); display: grid; gap: 8px; }
.rec-status { font-size: 13px; color: var(--bm-sage); display: flex; align-items: center; gap: 8px; }
.rec-status.failed { color: var(--bm-danger); }
.rec-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bm-orange); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .rec-status .dot { animation: none; } }
.rec-summary { font-weight: 600; font-size: 14px; }
.rec-fields { display: grid; gap: 8px; }
.rec-field { font-size: 14px; border-left: 3px solid var(--bm-orange); padding-left: 10px; }
.rec-field.done { border-left-color: var(--bm-sage); }
.rec-field .quote { font-size: 13px; color: var(--bm-sage); margin: 2px 0 6px; }
.rec-step { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rec-step form, .rec form { display: inline; margin: 0; }
.rec-transcript summary { font-size: 13px; color: var(--bm-sage); cursor: pointer; }
.rec-transcript .small { margin-top: 6px; }
.ok { color: var(--bm-ok); }
form.inline { display: inline; margin: 0; }

/* голосовая заметка */
.recorder { display: grid; justify-items: center; gap: 10px; padding: 24px 0 8px; }
.rec-btn { width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--bm-orange); background: var(--bm-white); display: grid; place-items: center; cursor: pointer; }
.rec-btn .rec-ico { width: 34px; height: 34px; border-radius: 50%; background: var(--bm-orange); }
.rec-btn.on .rec-ico { width: 28px; height: 28px; border-radius: 6px; background: var(--bm-graphite); }
.rec-time { font-size: 28px; font-weight: 800; color: var(--bm-graphite); font-variant-numeric: tabular-nums; }
.dropzone input[type=file] { padding: 22px 12px; border: 1.5px dashed var(--bm-line); border-radius: var(--radius-sm); width: 100%; background: var(--bm-paper); }
.tg-bind input[type=search] { flex: 1 1 220px; width: auto; }
.tg-found { margin-top: 8px; }

/* подбор */
.match { border-bottom: 1px solid var(--bm-line); padding: 12px 0; display: grid; gap: 8px; }
.match.fallback { opacity: 0.85; }
.match-head { display: flex; gap: 12px; align-items: center; }
.match-score { font-size: 24px; font-weight: 800; color: var(--bm-orange); min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.match-head .title { font-weight: 600; }
.match-head .sub { font-size: 13px; color: var(--bm-sage); }
.match-why summary { font-size: 13px; color: var(--bm-sage); cursor: pointer; }
.match-why ul { margin: 6px 0 0; padding-left: 18px; }
.match .btn-row form { display: inline; margin: 0; }

/* сделка: чек-листы */
.deal-checklists { display: grid; gap: 6px; margin-top: 10px; }
.checklist { display: grid; gap: 2px; margin-top: 6px; }
.checklist form { margin: 0; }
.check-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--bm-graphite); text-align: left; cursor: pointer; }
.check-item .box { width: 20px; height: 20px; flex: 0 0 20px; border: 1.5px solid var(--bm-line); border-radius: 4px; }
.check-item.on .box { background: var(--bm-orange); border-color: var(--bm-orange); }
.check-item.on { color: var(--bm-sage); }
.panel.deal { display: grid; gap: 6px; }

/* деньги и аналитика */
.money-hero { margin: 4px 0 12px; }
.actions-strip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bm-paper); border-left: 3px solid var(--bm-orange); margin-bottom: 12px; }
.actions-today { font-size: 26px; font-weight: 800; color: var(--bm-graphite); font-variant-numeric: tabular-nums; white-space: nowrap; }
.actions-today small { font-size: 13px; font-weight: 600; color: var(--bm-sage); }
.actions-today.done { color: var(--bm-orange); }
.bars { display: grid; gap: 8px; margin-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.bar-label { min-width: 0; overflow-wrap: anywhere; }
.bar { width: 100%; height: 10px; display: block; }
.bar-bg { fill: var(--bm-paper); }
.bar-fill { fill: var(--bm-orange); }
.bar-fill.done { fill: var(--bm-ok); }
.bar-value { font-size: 13px; color: var(--bm-graphite); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .bar-row { grid-template-columns: minmax(0, 1fr) auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--bm-line); white-space: nowrap; }
.table th { font-size: 12px; color: var(--bm-sage); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.table tr.total td { font-weight: 700; }

/* канбан (Mac) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--bm-paper); border-radius: var(--radius-sm); padding: 10px; min-height: 160px; border: 2px solid transparent; }
.kcol.over { border-color: var(--bm-orange); }
.kcol-head { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bm-sage); margin: 0 0 8px; display: flex; justify-content: space-between; }
.kcount { color: var(--bm-graphite); font-weight: 800; }
.kcol-body { display: grid; gap: 8px; }
.kcard { display: block; background: var(--bm-white); border-radius: var(--radius-sm); padding: 8px 10px; border-left: 3px solid var(--bm-orange); cursor: grab; }
.kcard.nostep { border-left-color: var(--bm-danger); }
.kcard.dragging { opacity: 0.5; }
.kcard .title { font-weight: 600; font-size: 14px; }
.kcard .sub { font-size: 12px; color: var(--bm-sage); }

/* объект: галерея и панель как на сайте БМ */
.obj-top { display: grid; gap: 16px; margin-top: 12px; }
@media (min-width: 900px) { .obj-top { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; gap: 24px; } }
.gallery { position: relative; min-width: 0; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: var(--bm-paper); scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; display: block; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip-dark, .gallery-count, .gallery-edit { background: rgba(35, 39, 43, 0.82); color: var(--bm-white); font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: var(--radius-sm); white-space: nowrap; }
.gallery-count { position: absolute; top: 10px; right: 10px; }
.gallery-edit { position: absolute; top: 10px; left: 10px; }
.gallery-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; scrollbar-width: thin; }
.gallery-thumb { flex: 0 0 76px; height: 57px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; background: var(--bm-paper); cursor: pointer; }
.gallery-thumb.on { border-color: var(--bm-orange); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-empty { min-height: 120px; display: grid; place-content: center; justify-items: center; gap: 2px; border: 1.5px dashed var(--bm-line); border-radius: var(--radius); background: var(--bm-paper); font-weight: 600; text-align: center; padding: 12px; }
.gallery-empty .plus { font-size: 28px; line-height: 1; color: var(--bm-orange); font-weight: 800; }
@media (min-width: 900px) { .gallery-empty { aspect-ratio: 4 / 3; } }
.obj-panel { border: 1px solid var(--bm-line); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.obj-price .label, .obj-person .label { font-size: 13px; color: var(--bm-sage); }
.obj-price .value { font-size: 28px; font-weight: 800; color: var(--bm-orange); line-height: 1.15; }
.obj-facts { margin: 0; display: grid; gap: 8px; }
.obj-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--bm-line); padding-bottom: 8px; }
.obj-facts dt { color: var(--bm-sage); }
.obj-facts dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.obj-person { display: grid; gap: 4px; }
.obj-person .name { font-weight: 600; }
.obj-buyers { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bm-paper); border-left: 3px solid var(--bm-orange); }
.obj-buyers b { font-size: 20px; font-weight: 800; }

/* объект: блоки «О бизнесе / Финансы / Помещение / Сотрудники» */
.info-grid { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1024px) { .info-grid { grid-template-columns: 1fr 1fr; } .info-block.wide { grid-column: 1 / -1; } }
.info-block { border: 1px solid var(--bm-line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.info-block h3 { font-size: 17px; margin-bottom: 12px; }
.info-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-item { background: var(--bm-paper); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.info-item.wide { grid-column: 1 / -1; }
.info-item .t { font-size: 12px; color: var(--bm-sage); margin-bottom: 4px; }
.info-item .v { font-weight: 600; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.info-block .kv { margin: 0; }

/* список объектов: плитки как в каталоге БМ */
.chips-sep { width: 8px; }
.ogrid { display: grid; gap: 12px; }
@media (min-width: 640px) { .ogrid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; } }
.ocard { display: grid; grid-template-columns: 102px minmax(0, 1fr); gap: 12px; border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; background: var(--bm-white); }
.ocard:hover, .ocard:focus-visible { border-color: var(--bm-orange); }
.ocard-img { position: relative; background: var(--bm-paper); aspect-ratio: 1 / 1; align-self: start; margin: 10px 0 10px 10px; border-radius: var(--radius-sm); overflow: hidden; }
.ocard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ocard-noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; color: var(--bm-sage); }
.sticker { position: absolute; top: 6px; left: 6px; max-width: calc(100% - 12px); background: var(--bm-orange); color: var(--bm-white); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticker.muted { background: var(--bm-graphite); }
.ocard-chips { display: none; }
.ocard .sticker { top: 4px; left: 4px; max-width: calc(100% - 8px); font-size: 10px; padding: 2px 5px; white-space: normal; line-height: 1.2; }
.ocard-body { padding: 10px 12px 10px 0; display: grid; gap: 3px; min-width: 0; align-content: start; }
.ocard-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ocard-id { font-size: 12px; color: var(--bm-sage); }
.ocard-props { margin: 4px 0 0; display: grid; gap: 2px; font-size: 13px; }
.ocard-props div { display: flex; gap: 6px; min-width: 0; }
.ocard-props dt { color: var(--bm-sage); flex: 0 0 64px; }
.ocard-props dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.ocard-price { font-size: 17px; font-weight: 800; color: var(--bm-orange); white-space: nowrap; }
.ocard-next { font-size: 12px; color: var(--bm-sage); white-space: nowrap; }
@media (min-width: 640px) {
  .ocard { grid-template-columns: 1fr; gap: 0; }
  .ocard-img { aspect-ratio: 4 / 3; margin: 0; border-radius: 0; }
  .ocard .sticker { top: 8px; left: 8px; max-width: calc(100% - 16px); font-size: 11px; padding: 3px 8px; white-space: nowrap; }
  .ocard-chips { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
  .ocard-body { padding: 12px 14px 14px; }
  .ocard-price { font-size: 19px; }
}
.row-thumb { width: 56px; height: 42px; flex: 0 0 56px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bm-paper); display: block; }

/* фото объекта: управление */
.photo-upload { display: grid; gap: 8px; justify-items: start; margin-bottom: 8px; }
.photo-upload .dropzone { width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-tile { margin: 0; position: relative; border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; }
.photo-tile.cover { border-color: var(--bm-orange); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.photo-actions form { margin: 0; }

/* телефон: кнопки «Номер / Telegram / Итог» над галереей — звонок в один тап; миниатюры не нужны, фото листаются */
.obj-stack { display: flex; flex-direction: column; }
@media (max-width: 899px) {
  .obj-stack > .quick { order: -1; margin-top: 4px; }
  .gallery-thumbs { display: none; }
  .gallery-slide { aspect-ratio: 16 / 10; }
}

/* фото на весь экран — внутри страницы: в PWA на iPhone новая вкладка открылась бы без входа */
.lightbox { margin: 0; inset: 0; padding: 0; border: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: transparent; }
.lightbox::backdrop { background: rgba(35, 39, 43, 0.94); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lightbox-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: var(--bm-white); color: var(--bm-graphite); font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }

/* карточка клиента: комментарии сверху, телефоны с мессенджерами, правка полей на месте */
.client-id { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bm-sage); margin-bottom: 4px; }
.client-types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.comments { background: var(--bm-paper); border-left: 3px solid var(--bm-amber); padding: 12px 16px 14px; margin: 14px 0 16px; }
.comments-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.comments-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bm-graphite); }
.comment { padding: 8px 0; border-bottom: 1px solid var(--bm-line); }
.comment .meta { font-size: 12px; color: var(--bm-sage); }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; font-size: 14px; }
.comment.pinned .meta { color: var(--bm-graphite); }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.comment-form textarea { min-height: 44px; }
.client-grid { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 1024px) { .client-grid { grid-template-columns: 1fr 1fr; } }
.client-block h3 { margin-bottom: 10px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.block-head h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.block-head > a { white-space: nowrap; }
.phones { display: grid; gap: 10px; margin-bottom: 12px; }
.phone-row { padding: 10px 12px; background: var(--bm-paper); border-radius: var(--radius-sm); border-left: 3px solid transparent; }
.phone-row.primary { border-left-color: var(--bm-orange); }
.phone-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.phone-num { font-size: 19px; font-weight: 800; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.phone-line form { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--bm-sage); border-bottom: 1px solid var(--bm-line); cursor: pointer; }
.phone-actions, .client-links { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-actions form { display: contents; }
.pa { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1.5px solid var(--bm-line); border-radius: 999px; background: var(--bm-white); color: var(--bm-graphite); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pa:hover, .pa:focus-visible { border-color: var(--bm-orange); }
.pa-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
/* мессенджеры — цветными значками приложений (спрайт web/partials/app_icons.html), звонок — текстовой кнопкой */
.app-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pa-app { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: none; }
.pa-app.pa-sm { width: 30px; }
.pa-app:hover, .pa-app:focus-visible { border-color: var(--bm-line); background: var(--bm-paper); }
.app-i { width: 26px; height: 26px; flex: none; display: block; }
.pa-sm .app-i { width: 22px; height: 22px; }
.pa-form { display: contents; }
.i { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone-add { display: flex; gap: 8px; }
.phone-add input { flex: 1; }
.client-kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 10px 12px; margin: 0 0 6px; font-size: 14px; align-items: baseline; }
.client-kv dt { color: var(--bm-sage); }
.client-kv dd { margin: 0; min-width: 0; }
.client-kv dd > div + div { margin-top: 4px; }
.client-quick { display: grid; gap: 2px; }
.qrow { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; align-items: center; padding: 4px 0; font-size: 14px; }
.qrow > span:first-child { color: var(--bm-sage); }
.qval { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qval input, .qval select { min-height: 40px; padding: 8px 10px; }
.qval-2 { flex-wrap: wrap; }
.qval-2 select, .qval-2 input { flex: 1 1 140px; width: auto; }
.qstatus { font-size: 12px; min-height: 18px; padding-top: 2px; }
@media (max-width: 520px) { .qrow, .client-kv { grid-template-columns: 1fr; gap: 4px; } }
.client-obj { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--bm-line); }
.client-obj:first-of-type { border-top: 0; }
.client-obj .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.client-obj .title { font-weight: 600; }
.client-obj .sub { font-size: 13px; color: var(--bm-sage); }
.client-roles { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* карточка продавца: бизнес — одной понятной ссылкой */
.seller-object { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 12px 0 4px; border: 1px solid var(--bm-line); border-left: 3px solid var(--bm-orange); border-radius: var(--radius-sm); background: var(--bm-white); }
.seller-object:hover, .seller-object:focus-visible { border-color: var(--bm-orange); }
.seller-object-img { position: relative; width: 132px; height: 96px; flex: 0 0 132px; overflow: hidden; border-radius: var(--radius-sm); background: var(--bm-paper); display: block; }
.seller-object-img .slide-btn { width: 24px; height: 24px; margin-top: -12px; font-size: 16px; }
.seller-object-img .slide-btn.prev { left: 4px; } .seller-object-img .slide-btn.next { right: 4px; }
.seller-object-img .slide-dots { right: 4px; bottom: 4px; padding: 3px 5px; }
.seller-object .grow { flex: 1; min-width: 0; display: grid; gap: 1px; }
.seller-object .label { font-size: 12px; color: var(--bm-sage); }
.seller-object .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-object .sub { font-size: 13px; color: var(--bm-sage); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-object .go { font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--bm-orange); }
@media (max-width: 520px) { .seller-object { flex-wrap: wrap; } .seller-object .go { flex: 1 1 100%; border: 0; color: var(--bm-graphite); } }
.seller-more { margin-bottom: 4px; }
.obj-seller-link { font-weight: 600; justify-self: start; border-bottom: 1px solid var(--bm-orange); }

/* «Покупатели» и «Продавцы»: таблица как в CRM БМ; на телефоне — карточки */
.ct-filters { margin-bottom: 12px; }
.ct-filters .chips { margin-bottom: 8px; }
.ct-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-filter-row select { width: auto; min-width: 170px; }
.ct-search { flex: 1 1 260px; }
.ct { border-top: 2px solid var(--bm-graphite); }
.ct-row { display: grid; grid-template-columns: 76px minmax(150px, 1.1fr) minmax(170px, 1fr) 120px 220px minmax(220px, 1.8fr); gap: 14px; align-items: start; padding: 12px 10px; border-bottom: 1px solid var(--bm-line); border-left: 3px solid transparent; }
.ct-row.overdue { border-left-color: var(--bm-danger); }
.ct-row.nostep { border-left-color: var(--bm-amber); }
.ct-row:not(.ct-head):hover { background: var(--bm-paper); }
.ct-head { padding-top: 8px; padding-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bm-sage); background: var(--bm-white); }
.ct-id { font-weight: 800; font-variant-numeric: tabular-nums; }
.ct-name .title { font-weight: 600; }
.ct-row .sub { font-size: 13px; color: var(--bm-sage); margin-top: 2px; overflow-wrap: anywhere; }
.ct-status .badge { white-space: normal; }
.ct-dates { font-size: 14px; font-variant-numeric: tabular-nums; }
.ct-mlabel { display: none; }
.ct-phone .num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ct-comment { font-size: 14px; overflow-wrap: anywhere; }
.ct-comment a { color: var(--bm-graphite); }
.ct-empty { padding: 16px 0; }
.ct-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 1100px) {
  .ct-head { display: none; }
  .ct-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name id" "status status" "phone phone" "comment comment" "dates dates"; gap: 6px 12px; padding: 12px 8px; }
  .ct-id { grid-area: id; font-size: 13px; color: var(--bm-sage); }
  .ct-name { grid-area: name; } .ct-status { grid-area: status; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .ct-status .sub { margin-top: 0; }
  .ct-phone { grid-area: phone; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .ct-actions { margin-top: 0; }
  .ct-comment { grid-area: comment; }
  .ct-dates { grid-area: dates; display: flex; gap: 10px; font-size: 12px; color: var(--bm-sage); }
  .ct-dates .sub { margin-top: 0; font-size: 12px; }
  .ct-mlabel { display: inline; }
}
.seller-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.seller-add input { flex: 1 1 160px; width: auto; }

/* «План дня»: списки — заголовок обычным регистром со счётчиком, лишнее свёрнуто */
.plan-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.plan-h small { flex-basis: 100%; font-size: 12px; font-weight: 500; color: var(--bm-sage); }
@media (min-width: 760px) { .plan-h small { flex-basis: auto; } }
.count { display: inline-flex; min-width: 24px; height: 22px; padding: 0 7px; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--bm-paper); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.count.hot { background: var(--bm-graphite); color: var(--bm-white); }
.plan-empty { padding: 10px 0; }
.list-count { margin: -4px 0 12px; }

/* «План дня»: план месяца одной полосой (мелкий серый текст — затемнённый серо-зелёный, контраст AA). Темп по рабочим дням — фирменными цветами и формой метки:
   в графике — серо-зелёный, отстаёт — янтарный (метка в контуре), под угрозой — оранжевый (метка залита),
   выполнен — графит с «✓». Ниже полосы — ничего: что проседает, сказано в строке заголовка. */
.kpi { --good: var(--bm-sage); --muted: #66756F; --mid: var(--bm-amber); --mid-ink: #87650A; --bad: var(--bm-orange); --bad-ink: #B35A00;
  margin: 0 0 16px; border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; }
.kpi-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; padding: 10px 16px;
  background: var(--bm-paper); border-bottom: 1px solid var(--bm-line); }
.kpi-head h2 { font-size: 16px; font-weight: 800; }
.kpi-day { font-size: 13px; color: var(--muted); }
.kpi-verdict { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font-size: 13px; font-weight: 600; }
.kpi-verdict span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; background: var(--good); }
.kpi-verdict .s-mid { color: var(--mid-ink); }
.kpi-verdict .s-mid::before { background: none; box-shadow: inset 0 0 0 2px var(--mid); }
.kpi-verdict .s-bad { color: var(--bad-ink); }
.kpi-verdict .s-bad::before { background: var(--bad); }
.kpi-verdict .s-none { color: var(--muted); }
.kpi-verdict .s-none::before { background: var(--bm-line); }
.kpi-acts { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 4px 14px; margin-left: auto; }
.kpi-norm { font-size: 13px; color: var(--muted); }
.kpi-norm b { color: var(--bm-graphite); font-weight: 800; }
.kpi-norm.done b { color: var(--bm-orange); }
.kpi-edit { font-size: 13px; font-weight: 600; }

.kpi { container-type: inline-size; }
.kpi-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none;
  background: var(--bm-line); }
.kpi-c { --c: var(--good); --ink: var(--bm-graphite); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "n n" "v m" "bar bar" "d d"; align-items: center; gap: 3px 6px; min-width: 0; padding: 10px 16px 11px; background: var(--bm-white); }
.kpi-c.s-done { --c: var(--bm-graphite); }
.kpi-c.s-mid { --c: var(--mid); --ink: var(--mid-ink); }
.kpi-c.s-bad { --c: var(--bad); --ink: var(--bad-ink); }
.kpi-c.s-none { --c: var(--bm-line); --ink: var(--bm-sage); }
.kpi-n { grid-area: n; overflow: hidden; font-size: 12px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
.kpi-m { grid-area: m; justify-self: start; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 800;
  line-height: 18px; text-align: center; color: var(--bm-graphite); }
.kpi-c.s-mid .kpi-m { box-shadow: inset 0 0 0 1.5px var(--mid); color: var(--mid-ink); }
.kpi-c.s-bad .kpi-m { background: var(--bad); }
.kpi-c.s-done .kpi-m { padding: 0; font-size: 13px; }
.kpi-v { grid-area: v; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kpi-v b { margin-right: 2px; font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.kpi-d { grid-area: d; display: flex; flex-wrap: wrap; gap: 0 10px; min-width: 0; font-size: 11px; line-height: 14px; color: var(--muted); white-space: nowrap; }
.kpi-d b { color: var(--bm-graphite); font-weight: 800; }
.kpi-bar { grid-area: bar; display: block; width: 100%; height: 8px; margin-top: 3px; overflow: visible; }
.kpi-track { fill: #E9EBED; }
.kpi-fill { fill: var(--c); }
.kpi-tick { stroke: var(--bm-graphite); stroke-width: 2; }
.kpi + .warn { margin: 0 0 16px; }
/* колонки — по ширине самого блока, а не окна: с боковым меню на 1280 px шести ячейкам уже тесно */
@container (max-width: 960px) { .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 500px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-c { padding: 8px 12px 9px; gap: 2px 6px; }
  .kpi-v b { font-size: 21px; }
}
@media (max-width: 560px) {
  .kpi-head { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "h e" "v v" "d n"; align-items: baseline; gap: 3px 10px; }
  .kpi-head h2 { grid-area: h; }
  .kpi-acts { display: contents; }
  .kpi-edit { grid-area: e; justify-self: end; }
  .kpi-verdict { grid-area: v; gap: 0 12px; font-size: 12px; }
  .kpi-day { grid-area: d; font-size: 12px; }
  .kpi-norm { grid-area: n; justify-self: end; margin-left: 0; font-size: 12px; }
  .kpi-long { display: none; }
}

/* списки «Плана дня»: заголовок на месте, под ним окно на пару строк (край третьей виден) с прокруткой */
/* каждый раздел — карточка: светлая шапка с названием и счётчиком, под ней строки; оранжевая полоса слева —
   в разделе есть то, что нужно сделать сейчас */
.plan-box { margin: 0 0 16px; border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; background: var(--bm-white); }
.plan-head { display: flex; align-items: baseline; gap: 4px 16px; padding: 10px 16px; background: var(--bm-paper); border-bottom: 1px solid var(--bm-line); }
.plan-box.hot > .plan-head { box-shadow: inset 3px 0 0 var(--bm-orange); }
.plan-head .plan-h { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 800; }
/* «Показать все» — окно раскрывается на весь список; ещё раз — «Свернуть» */
.plan-all { flex: none; padding: 2px 0; border: 0; border-bottom: 1px solid var(--bm-orange); background: none; color: var(--bm-graphite);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.plan-all:hover, .plan-all:focus-visible { color: var(--bm-orange); }
.plan-scroll.open { overflow: visible; }
.plan-box .count { background: var(--bm-white); box-shadow: inset 0 0 0 1px var(--bm-line); }
.plan-box .count.hot { background: var(--bm-graphite); box-shadow: none; }
.plan-box .rows { border-top: 0; }
.plan-box .row { min-height: 0; gap: 10px; padding: 6px 16px; }
.plan-box .row .title { font-size: 14px; line-height: 1.3; }
.plan-box .row .sub, .plan-box .row .when { font-size: 12.5px; line-height: 1.3; }
.plan-box .row .badge { display: inline-block; min-height: 0; padding: 0 6px; border-width: 1px; font-size: 10.5px; line-height: 14px; vertical-align: 1px; }
.plan-box .row-actions { gap: 4px; }
.plan-box .btn-sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.plan-box .plan-empty { margin: 0; padding: 12px 16px; }
/* в окне — две строки и краешек третьей; остальное прокруткой или «Показать все» */
.plan-scroll { max-height: 110px; overflow-y: auto; scrollbar-width: thin; }
.plan-scroll .row .title, .plan-scroll .row .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-scroll .row:last-child { border-bottom: 0; }
.plan-scroll:focus-visible { outline: 2px solid var(--bm-orange); outline-offset: -2px; }
@media (max-width: 359px) {
  .kpi-head { grid-template-areas: "h e" "v v" "d d" "n n"; }
  .kpi-norm { justify-self: start; }
}
@media (max-width: 767px) { /* та же граница, где кнопки строки уходят под текст */
  .kpi-head, .plan-head { padding: 9px 12px; }
  .plan-box .plan-empty { padding-left: 12px; padding-right: 12px; }
  .plan-scroll { max-height: 182px; }
  .plan-box .row .grow { flex: 1 1 calc(100% - 44px); }
  .plan-box .row .when { flex: 0 0 auto; order: 3; }  /* время — в одной строке с кнопками */
  .plan-box .row .row-actions { flex: 1 1 auto; order: 4; justify-content: flex-end; }
  .plan-head .plan-h { font-size: 14px; }
  .plan-box .when-note, .plan-head .sec-ico, .plan-head .plan-h small { display: none; }  /* на телефоне — только суть */
  .plan-box .row { row-gap: 5px; padding: 7px 12px; }
  .plan-scroll .row .title, .plan-scroll .row .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.form-lead { margin: -6px 0 14px; }

.ct-head .sort { color: var(--bm-sage); border-bottom: 1px dotted var(--bm-line); }
.ct-head .sort:hover, .ct-head .sort:focus-visible, .ct-head .sort.on { color: var(--bm-graphite); border-bottom-color: var(--bm-orange); }

/* ---------- календарь: месяц, неделя, день ---------- */
.c-showing { --cat: var(--bm-orange); } .c-meeting { --cat: var(--bm-graphite); } .c-zoom { --cat: var(--bm-amber); } .c-task { --cat: var(--bm-sage); }
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 10px; }
.cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-nav .btn { min-width: 40px; }
.cal-title { margin: 0 0 0 8px; font-size: 18px; font-weight: 800; }
.cal-views { display: inline-flex; padding: 3px; border: 1px solid var(--bm-line); border-radius: 999px; background: var(--bm-white); }
.cal-views a { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--bm-graphite); }
.cal-views a.on { background: var(--bm-graphite); color: var(--bm-white); }
.cal-views a:focus-visible { outline: 2px solid var(--bm-orange); outline-offset: 1px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 12.5px; color: #66756F; }
.cal-legend li { display: inline-flex; align-items: center; }
.cal-legend b { color: var(--bm-graphite); font-weight: 800; }
/* типы дел — кнопки-фильтры: нажал «Показы» — в календаре только показы, ещё раз (или «Все») — снова всё */
.cal-type { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 11px 5px 6px; border: 1px solid transparent; border-radius: 999px;
  color: #66756F; transition: background-color .15s, border-color .15s, color .15s, opacity .15s; }
.cal-type.all { padding-left: 12px; }
.cal-type:hover { background: var(--bm-white); border-color: var(--bm-line); color: var(--bm-graphite); }
.cal-type:focus-visible { outline: 2px solid var(--bm-orange); outline-offset: 1px; }
.cal-type.on { background: var(--bm-white); border-color: var(--bm-graphite); color: var(--bm-graphite); font-weight: 600; box-shadow: inset 0 -2px 0 var(--bm-orange); }
.cal-type.on .i { width: 12px; height: 12px; flex-basis: 12px; margin-left: 1px; color: #66756F; stroke-width: 2.2; }
.cal-type.on:hover .i { color: var(--bm-graphite); }
.cal-type.zero b { color: #A3AEAA; font-weight: 600; }
.cal-legend.filtered .cal-type:not(.on) { opacity: .6; }
.cal-legend.filtered .cal-type:not(.on):hover, .cal-legend.filtered .cal-type:not(.on):focus-visible { opacity: 1; }
.cal-legend .cal-toggle { margin-left: auto; }
.cal-legend .cal-toggle::before { display: none; }

/* месяц */
.cal-month { border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; }
.cal-wd, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { background: var(--bm-paper); border-bottom: 1px solid var(--bm-line); }
.cal-wd span { padding: 7px 10px; font-size: 12px; font-weight: 600; color: #66756F; }
.cal-week + .cal-week { border-top: 1px solid var(--bm-line); }
.cal-cell { position: relative; min-width: 0; min-height: 118px; padding: 6px 6px 8px; overflow: hidden; }
.cal-cell + .cal-cell { border-left: 1px solid var(--bm-line); }
.cal-cell.out { background: #FAFAFB; }
.cal-cell.out .cal-num { color: #A3AEAA; }
.cal-num { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.cal-num:hover, .cal-num:focus-visible { background: var(--bm-paper); }
.cal-cell.today .cal-num { background: var(--bm-orange); color: var(--bm-graphite); }
.cal-chips { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; min-width: 0; }
.cal-chips li { min-width: 0; }
.cal-chip { display: block; overflow: hidden; padding: 2px 6px; border-left: 3px solid var(--cat); background: var(--bm-paper); font-size: 11.5px; line-height: 1.35;
  text-overflow: ellipsis; white-space: nowrap; }
.cal-chip:hover, .cal-chip:focus-visible { background: #ECEEEF; }
.cal-chip b { font-weight: 800; }
.cal-chip.done, .cal-card.done, .cal-item.done { opacity: 0.55; }
.cal-chip.done { text-decoration: line-through; }
.cal-chip.late b, .cal-card.late .cal-card-time { color: var(--bm-danger); }
.cal-more { display: block; padding: 1px 6px; font-size: 11.5px; font-weight: 600; color: #66756F; }
.cal-dots { display: none; }

/* неделя */
.cal-weekview { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--bm-line); border-radius: var(--radius); overflow: hidden; }
.cal-col { min-width: 0; min-height: 320px; padding: 0 6px 10px; }
.cal-col + .cal-col { border-left: 1px solid var(--bm-line); }
.cal-col.weekend { background: #FAFAFB; }
.cal-colhead { display: flex; align-items: baseline; gap: 4px; margin: 0 -6px 8px; padding: 8px 10px; border-bottom: 1px solid var(--bm-line); background: var(--bm-paper); font-size: 12px; color: #66756F; }
.cal-colhead b { font-size: 16px; font-weight: 800; color: var(--bm-graphite); }
.cal-colhead .count { margin-left: auto; height: 20px; min-width: 20px; background: var(--bm-white); box-shadow: inset 0 0 0 1px var(--bm-line); }
.cal-col.today .cal-colhead { box-shadow: inset 0 3px 0 var(--bm-orange); }
.cal-col.today .cal-colhead b { color: var(--bm-orange); }
.cal-card { display: grid; gap: 1px; margin: 0 0 6px; padding: 6px 8px; border-left: 3px solid var(--cat); background: var(--bm-paper); }
.cal-card:hover, .cal-card:focus-visible { background: #ECEEEF; }
.cal-card-time { font-size: 11px; font-weight: 800; color: #66756F; }
.cal-card-type { font-size: 12px; font-weight: 600; }
.cal-card-title { display: -webkit-box; overflow: hidden; font-size: 12px; color: #4A5154; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-free { margin: 4px 4px 0; font-size: 12px; color: #A3AEAA; }

/* день — подробный список по времени */
.cal-day { display: grid; gap: 10px; }
.cal-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 4px 18px; align-items: start; padding: 14px 16px;
  border: 1px solid var(--bm-line); border-left: 4px solid var(--cat); border-radius: var(--radius); background: var(--bm-white); }
.cal-item-time { display: grid; }
.cal-item-time b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.cal-item-time span { font-size: 12px; color: #66756F; }
.cal-item-type { font-size: 13px; font-weight: 800; }
.cal-item-title { margin: 2px 0 6px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.cal-item-title a:hover { color: var(--bm-orange); }
.cal-meta { display: grid; gap: 3px; margin: 0; font-size: 13px; }
.cal-meta div { display: flex; gap: 8px; min-width: 0; }
.cal-meta dt { flex: 0 0 76px; color: #66756F; }
.cal-meta dd { min-width: 0; margin: 0; }
.cal-meta a { border-bottom: 1px solid var(--bm-line); }
.cal-meta a:hover { border-bottom-color: var(--bm-orange); }
.cal-item-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cal-status { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--bm-paper); color: #66756F; }
.cal-status.s-overdue { background: var(--bm-danger); color: var(--bm-white); }
.cal-status.s-done { background: var(--bm-paper); color: #66756F; }
.cal-status.s-confirmed { box-shadow: inset 0 0 0 1px var(--bm-sage); background: none; }
.cal-empty { padding: 18px 0; }
.nowrap { white-space: nowrap; }

/* страница задачи */
.task-sheet { max-width: 760px; border-left: 4px solid var(--cat); }
.task-sheet .kv { grid-template-columns: 150px minmax(0, 1fr); }
.task-msg { margin-top: 14px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.task-actions form { margin: 0; }

@media (max-width: 1000px) {
  .cal-weekview { grid-template-columns: 1fr; }
  .cal-col { min-height: 0; padding-bottom: 6px; }
  .cal-col + .cal-col { border-left: 0; border-top: 1px solid var(--bm-line); }
  .cal-card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; }
  .cal-card-time { grid-row: span 2; font-size: 12px; }
}
@media (max-width: 760px) {
  .cal-title { flex-basis: 100%; margin: 4px 0 0; font-size: 17px; }
  .cal-cell { min-height: 56px; padding: 4px 2px 6px; text-align: center; }
  .cal-num { font-size: 12px; min-width: 24px; height: 24px; }
  .cal-num::after { content: ""; position: absolute; inset: 0; }  /* на телефоне вся клетка открывает день */
  .cal-chips { display: none; }
  .cal-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
  .cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cat); }
  .cal-wd span { padding: 6px 0; text-align: center; }
  .cal-item { grid-template-columns: 64px minmax(0, 1fr); padding: 12px; }
  .cal-item-time b { font-size: 17px; }
  .cal-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cal-meta dt { flex-basis: 64px; }
}

/* «Главная»: сегодняшняя дата и текущее время — графитовая плашка, время оранжевым */
.home-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 14px 20px;
  border-radius: var(--radius); background: var(--bm-graphite); color: var(--bm-white); }
.home-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.home-date b { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.home-date span { font-size: 16px; font-weight: 600; color: #C9D0CD; }
.home-clock { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--bm-orange); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .home-now { padding: 12px 14px; }
  .home-date b, .home-clock { font-size: 24px; }
  .home-date span { font-size: 14px; }
}

/* ---------- переключатель панели: луна — сделать тёмной, солнце — вернуть светлую ---------- */
.brand-row { display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 1px solid var(--bm-line); border-radius: 999px;
  background: var(--bm-white); color: var(--bm-graphite); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--bm-orange); }
.theme-toggle .i { width: 16px; height: 16px; flex-basis: 16px; }
.theme-toggle .t-sun { display: none; }
.nav-dark .theme-toggle .t-sun { display: inline-flex; }
.nav-dark .theme-toggle .t-moon { display: none; }
.sidenav, .bottomnav { transition: background-color .25s ease, border-color .25s ease; }
.nav-dark .sidenav { background: #1C2024; border-right-color: #1C2024; }
.nav-dark .sidenav .brand { color: #F4F5F6; }
.nav-dark .sidenav a { color: #D3D8DA; }
.nav-dark .sidenav a:hover { background: #262B30; }
.nav-dark .sidenav a.active { background: #2C3237; color: #FFFFFF; }
.nav-dark .sidenav .sep { background: #30363B; }
.nav-dark .sidenav .theme-toggle { background: #262B30; border-color: #3A4146; color: var(--bm-amber); }
.nav-dark .bottomnav { background: #1C2024; border-top-color: #1C2024; }
.nav-dark .bottomnav a { color: #A9B2AE; }
.nav-dark .bottomnav a.active, .nav-dark .bottomnav a.home { color: #FFFFFF; }
.nav-dark .bottomnav .ico { border-color: #3A4146; }
.nav-dark .topbar .theme-toggle { color: var(--bm-orange); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- верхняя строка: умный поиск, колокольчик, профиль ---------- */
.topbar { min-height: 60px; }
.gsearch { position: relative; display: flex; align-items: center; flex: 1; max-width: 680px; }
.gsearch > .i { position: absolute; left: 14px; width: 18px; height: 18px; flex-basis: 18px; color: #66756F; pointer-events: none; }
.gsearch .gsearch-input { width: 100%; height: 42px; min-height: 0; padding: 0 58px 0 42px; border: 1px solid transparent; border-radius: 12px; background: var(--bm-paper);
  font: inherit; font-size: 14px; color: var(--bm-graphite); transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.gsearch-input::placeholder { color: #8A9692; }
.gsearch-input:hover { border-color: var(--bm-line); }
.gsearch-input:focus { outline: none; background: var(--bm-white); border-color: var(--bm-orange); box-shadow: 0 0 0 4px rgba(245, 146, 30, .14); }
.gsearch-input::-webkit-search-cancel-button { display: none; }
.gsearch-kbd { position: absolute; right: 12px; padding: 3px 6px; border: 1px solid var(--bm-line); border-radius: 6px; background: var(--bm-white);
  font: 600 11px/1.2 var(--font); color: #66756F; pointer-events: none; }
.gsearch-close { display: none; }
.gsearch.htmx-request > .i { color: var(--bm-orange); }
.gsearch-dd, .pop-panel { position: absolute; z-index: 60; background: var(--bm-white); border: 1px solid var(--bm-line); border-radius: 14px;
  box-shadow: 0 22px 48px -18px rgba(35, 39, 43, .32), 0 2px 6px rgba(35, 39, 43, .05);
  opacity: 0; transform: translateY(-6px) scale(.985); transform-origin: top; pointer-events: none; visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.gsearch-dd { top: calc(100% + 8px); left: 0; right: 0; max-height: min(72vh, 600px); overflow: auto; padding: 6px; overscroll-behavior: contain; }
.gsearch.open .gsearch-dd, .pop.open .pop-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.dd-title { padding: 9px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #66756F; }
.dd-group + .dd-group { margin-top: 2px; border-top: 1px solid #EEF0F1; }
.dd-item { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px; transition: background-color .12s ease; }
.dd-item:hover, .dd-item.sel { background: var(--bm-paper); }
.dd-item.sel { box-shadow: inset 3px 0 0 var(--bm-orange); }
.dd-item.done { opacity: .6; }
.dd-photo { width: 44px; height: 32px; flex: none; border-radius: 6px; object-fit: cover; background: var(--bm-paper); }
.dd-ico { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--bm-paper); }
.dd-ico .i { stroke: var(--bm-orange); }
.dd-text { display: grid; min-width: 0; }
.dd-text b, .dd-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-text b { font-size: 14px; font-weight: 600; }
.dd-text small { font-size: 12px; color: #66756F; }
mark { padding: 0 1px; border-radius: 3px; background: rgba(245, 146, 30, .24); color: inherit; }
.dd-all { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding: 10px; border-top: 1px solid var(--bm-line);
  border-radius: 0 0 10px 10px; font-size: 13px; font-weight: 600; }
.dd-all.sel, .dd-all:hover { background: var(--bm-paper); }
.dd-all kbd { padding: 2px 6px; border: 1px solid var(--bm-line); border-radius: 6px; font: 600 11px var(--font); color: #66756F; }
.dd-hint { padding: 14px 12px; font-size: 13px; line-height: 1.5; color: #66756F; }

.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.top-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--bm-graphite); cursor: pointer; transition: background-color .15s ease; }
.top-btn:hover, .top-btn:focus-visible, .pop.open > .top-btn { background: var(--bm-paper); }
.top-btn .i { width: 20px; height: 20px; flex-basis: 20px; }
.top-search { display: none; }
.bell-badge { display: none; }
.bell-badge.on { position: absolute; top: 3px; right: 2px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border: 2px solid var(--bm-white); border-radius: 999px; background: var(--bm-orange); font-size: 10.5px; font-weight: 800; color: var(--bm-graphite);
  animation: badge-in .35s ease; }
@keyframes badge-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pop { position: relative; }
.pop-panel { top: calc(100% + 8px); right: 0; width: 380px; max-width: calc(100vw - 24px); max-height: calc(100vh - 84px); overflow: auto;
  overscroll-behavior: contain; padding: 6px; }
.pop-loading { padding: 16px; font-size: 13px; color: #66756F; }
.pop-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 10px; }
.pop-head b { font-size: 15px; font-weight: 800; }
.pop-sec { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; color: #66756F; }
.pop-foot { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--bm-line); font-size: 13px; font-weight: 600; text-align: center; }
.pop-foot:hover { color: var(--bm-orange); }
.bell-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 4px 4px; }
.bell-tile { display: grid; gap: 2px; padding: 10px; border-radius: 10px; background: var(--bm-paper); transition: background-color .12s ease; }
.bell-tile:hover { background: #ECEEEF; }
.bell-tile b { font-size: 22px; font-weight: 800; line-height: 1; }
.bell-tile.hot b { color: #B35A00; }
.bell-tile span { font-size: 11.5px; line-height: 1.3; color: #4A5154; }
.bell-list { margin: 0; padding: 0; list-style: none; }
.bell-list a, .bell-list .bell-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: 10px; }
.bell-list a:hover { background: var(--bm-paper); }
.bell-list span:last-child { display: grid; min-width: 0; }
.bell-list b { font-size: 13px; font-weight: 600; }
.bell-list small { overflow: hidden; font-size: 12px; color: #4A5154; text-overflow: ellipsis; white-space: nowrap; }
.bell-list em { font-size: 11px; font-style: normal; color: #66756F; }
.ev-dot { flex: none; width: 8px; height: 8px; margin: 6px 4px 0; border-radius: 50%; background: var(--bm-sage); }
.ev-call { background: var(--bm-graphite); } .ev-message { background: #2AABEE; } .ev-meeting { background: var(--bm-amber); }
.ev-showing { background: var(--bm-orange); } .ev-stage_change { background: #B35A00; }

.me { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: none; font: inherit;
  color: var(--bm-graphite); cursor: pointer; transition: background-color .15s ease; }
.me:hover, .me:focus-visible, .pop.open > .me { background: var(--bm-paper); }
.me .i { width: 16px; height: 16px; flex-basis: 16px; color: #66756F; transition: transform .2s ease; }
.pop.open > .me .i { transform: rotate(180deg); }
.me-ava { width: 36px; height: 36px; flex: none; border-radius: 50%; object-fit: cover; }
.me-ava.lg { width: 48px; height: 48px; }
.me-ini { display: grid; place-items: center; background: var(--bm-graphite); color: var(--bm-white); font-size: 13px; font-weight: 800; box-shadow: inset 0 -3px 0 var(--bm-orange); }
.me-ava.lg.me-ini { font-size: 16px; }
.me-text { display: grid; text-align: left; line-height: 1.2; }
.me-text b { font-size: 13px; font-weight: 800; }
.me-text small { font-size: 11px; color: #66756F; }
.me-panel { width: 280px; }
.me-card { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; padding: 10px 10px 12px; border-bottom: 1px solid var(--bm-line); }
.me-card div { display: grid; min-width: 0; }
.me-card small { overflow: hidden; font-size: 12px; color: #66756F; text-overflow: ellipsis; }
.me-panel a, .me-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px;
  background: none; font: inherit; font-size: 14px; color: var(--bm-graphite); text-align: left; cursor: pointer; }
.me-panel a:hover, .me-panel button:hover, .me-panel a:focus-visible, .me-panel button:focus-visible { background: var(--bm-paper); }
.me-panel .i { stroke: var(--bm-orange); }
.me-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--bm-line); }

/* символы видов дел */
.ki { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; }
.ki .i { width: 16px; height: 16px; flex-basis: 16px; stroke-width: 1.9; }
.ki-task { background: #E5EBE9; color: #4C5C57; }
.ki-meeting { background: var(--bm-graphite); color: var(--bm-white); }
.ki-zoom { background: var(--bm-amber); color: var(--bm-graphite); }
.ki-showing { background: var(--bm-orange); color: var(--bm-graphite); }
.ki-deposit { background: var(--bm-sage); color: var(--bm-white); }
.ki-deal { background: var(--bm-graphite); color: var(--bm-orange); }

@media (max-width: 1023px) {
  .topbar { gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .gsearch { display: none; }
  .top-search { display: grid; }
  .me-text, .me > .i { display: none; }
  .me { padding: 2px; }
  .gsearch-open .gsearch { position: fixed; inset: 0 0 auto 0; z-index: 80; display: flex; flex-wrap: wrap; max-width: none; padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top)); background: var(--bm-white); border-bottom: 1px solid var(--bm-line); }
  .gsearch-open .gsearch > .i { top: calc(max(10px, env(safe-area-inset-top)) + 12px); left: 26px; }
  .gsearch-open .gsearch .gsearch-input { flex: 1; width: auto; padding-right: 12px; font-size: 16px; }
  .gsearch-open .gsearch-kbd { display: none; }
  .gsearch-open .gsearch-close { display: grid; place-items: center; width: 42px; height: 42px; margin-left: 6px; border: 0; border-radius: 12px;
    background: var(--bm-paper); font-size: 22px; color: var(--bm-graphite); }
  .gsearch-open .gsearch-dd { position: static; flex-basis: 100%; max-height: calc(100vh - 90px); margin-top: 8px; border: 0; box-shadow: none; }
  .gsearch-open body { overflow: hidden; }
}

.obj-search { position: relative; display: flex; align-items: center; max-width: 520px; margin: 0 0 12px; }
.obj-search .i { position: absolute; left: 12px; color: #66756F; }
.obj-search input[type=search] { padding-left: 38px; }

.ava-form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 8px; }
.ava-form .me-ava { width: 64px; height: 64px; font-size: 22px; }
.ava-form input[type=file] { max-width: 260px; font-size: 13px; }

.ki-sm { width: 20px; height: 20px; border-radius: 6px; }
.ki-sm .i { width: 12px; height: 12px; flex-basis: 12px; stroke-width: 2.1; }
.ki-lg { width: 40px; height: 40px; border-radius: 11px; }
.ki-lg .i { width: 22px; height: 22px; flex-basis: 22px; }
.row > .ki { align-self: center; }
.cal-chip { display: flex; align-items: center; gap: 5px; }
.cal-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip .ki-sm { width: 16px; height: 16px; border-radius: 4px; }
.cal-chip .ki-sm .i { width: 10px; height: 10px; flex-basis: 10px; }
.cal-card-type, .cal-item-type { display: flex; align-items: center; gap: 6px; }
.task-h { display: flex; align-items: center; gap: 12px; }
.c-deposit { --cat: var(--bm-sage); } .c-deal { --cat: #B35A00; }

/* ---------- «холст» «Главной» и «Календаря»: серый фон, белые карточки — блоки не сливаются ---------- */
.main.canvas { background: #F1F3F4; max-width: none; }
.content:has(> .main.canvas), .app:has(.main.canvas) { background: #F1F3F4; }
.main.canvas > * { max-width: 1384px; margin-left: auto; margin-right: auto; }
.main.canvas .kpi, .main.canvas .plan-box { border-color: #E3E6E8; border-radius: 14px; background: var(--bm-white);
  box-shadow: 0 1px 2px rgba(35, 39, 43, .04), 0 6px 18px -14px rgba(35, 39, 43, .18); }
.main.canvas .kpi-head, .main.canvas .plan-head { background: var(--bm-white); border-bottom-color: #ECEEF0; }
.main.canvas .plan-box.hot > .plan-head { box-shadow: none; }
.main.canvas .warn { background: var(--bm-white); border-radius: 0 10px 10px 0; }
.main.canvas .plan-box { margin-bottom: 14px; }
.plan-head { align-items: center; }
.plan-head .plan-h { align-items: center; }
.sec-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 2px; border-radius: 9px; background: #EEF0F1; color: #4A5154; }
.sec-ico .i { width: 16px; height: 16px; flex-basis: 16px; }
.plan-box.hot .sec-ico { background: #FDEBD6; color: #B35A00; }
.plan-box .row { transition: background-color .12s ease; }
.plan-box .row:hover { background: #F7F8F9; }
.plan-box .row + .row, .plan-box .rows .row { border-bottom-color: #EEF0F1; }
.plan-scroll { transition: max-height .35s cubic-bezier(.2, .7, .2, 1); }
.main.canvas .cal-month, .main.canvas .cal-weekview, .main.canvas .cal-item { background: var(--bm-white); border-color: #E3E6E8;
  box-shadow: 0 1px 2px rgba(35, 39, 43, .04); }
.main.canvas .cal-month, .main.canvas .cal-weekview { border-radius: 14px; }
.main.canvas .cal-views { border-color: #E3E6E8; }
.main.canvas .cal-wd, .main.canvas .cal-colhead { background: #FAFBFB; }
.cal-item { transition: box-shadow .15s ease, transform .15s ease; }
.cal-item:hover { box-shadow: 0 10px 24px -16px rgba(35, 39, 43, .35); }
.cal-card, .cal-chip { transition: background-color .12s ease; }

/* мягкое появление страницы при переходе и нажатие кнопок */
.main { animation: page-in .22s ease both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }  /* без сдвига — он давал лишнюю прокрутку */
.btn { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .08s ease; }
.btn:active { transform: translateY(1px); }

/* предпросмотр дела при наведении (календарь) */
.preview-card { position: fixed; z-index: 90; width: 300px; padding: 12px 14px; border: 1px solid var(--bm-line); border-radius: 14px; background: var(--bm-white);
  box-shadow: 0 22px 48px -18px rgba(35, 39, 43, .35); font-size: 13px; pointer-events: none; opacity: 0; transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease; }
.preview-card.on { opacity: 1; transform: none; }
.pv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 800; }
.pv-title { margin: 0 0 6px; font-weight: 600; line-height: 1.35; }
.pv-row { display: flex; gap: 8px; color: #4A5154; }
.pv-row dt { flex: 0 0 62px; color: #66756F; }
.pv-row dd { margin: 0; min-width: 0; }
.preview-card dl { display: grid; gap: 2px; margin: 0; }

/* ---------- фото листаются в плитке ---------- */
.slides { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.slides::-webkit-scrollbar { display: none; }
.slides img { position: relative; inset: auto; flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start;
  scroll-snap-stop: always; user-select: none; }
.slide-btn { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--bm-graphite); font-size: 20px; font-weight: 600; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(35, 39, 43, .18); opacity: 0; transform: scale(.9); transition: opacity .15s ease, transform .15s ease; }
.slide-btn.prev { left: 8px; } .slide-btn.next { right: 8px; }
.ocard:hover .slide-btn, .ocard:focus-visible .slide-btn, .seller-object:hover .slide-btn { opacity: 1; transform: none; }
.slide-btn:hover { background: var(--bm-white); color: var(--bm-orange); }
.slide-dots { position: absolute; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 4px; padding: 4px 6px; border-radius: 999px;
  background: rgba(35, 39, 43, .45); pointer-events: none; }
.slide-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: background-color .15s ease, transform .15s ease; }
.slide-dots i.on { background: var(--bm-white); transform: scale(1.3); }
.ocard { transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease; }
.ocard:hover { box-shadow: 0 14px 30px -20px rgba(35, 39, 43, .45); transform: translateY(-2px); }
@media (hover: none) { .slide-btn { display: none; } }
@media (max-width: 1023px) { .ocard .slide-dots { bottom: 6px; right: 6px; } }

/* ---------- «Главная» плотнее: всё на одном экране ---------- */
.main.canvas { padding-top: 12px; padding-bottom: 0; }
@media (max-width: 1023px) { .main.canvas { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); } }
@media (min-width: 1024px) and (max-width: 1399px) { .main.canvas .kpi-long { display: none; } }
.main.canvas .home-now { margin-bottom: 10px; padding: 8px 18px; }
.main.canvas .home-date b, .main.canvas .home-clock { font-size: 23px; }
.main.canvas .home-date span { font-size: 14px; }
.main.canvas .kpi { margin-bottom: 10px; }
.main.canvas .kpi-head { padding: 6px 14px; }
.main.canvas .kpi-c { padding: 6px 12px 7px; gap: 1px 6px; }
.main.canvas .kpi-v b { font-size: 21px; }
.main.canvas .kpi-bar { margin-top: 1px; }
.main.canvas .warn { margin: 0 0 10px; padding: 4px 12px; font-size: 12.5px; }
.main.canvas .plan-box { margin-bottom: 10px; }
.main.canvas .plan-head { padding: 5px 14px; }
.main.canvas .plan-head .plan-h { flex-wrap: nowrap; min-width: 0; font-size: 14px; white-space: nowrap; }
.main.canvas .plan-head .plan-h small { overflow: hidden; flex-basis: auto; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.main.canvas .sec-ico { width: 24px; height: 24px; border-radius: 7px; }
.main.canvas .sec-ico .i { width: 14px; height: 14px; flex-basis: 14px; }
/* на широком экране — две колонки без пустот: разделы укладываются друг под друга, высоты не выравниваются */
@media (min-width: 1200px) {
  .main.canvas .plan-lists { column-count: 2; column-gap: 12px; }
  .main.canvas .plan-lists > .plan-box { break-inside: avoid; display: block; }
  .plan-lists .row-actions .btn-sm { padding: 0 8px; }
}

/* =========================================================================================
   «Главная» — рабочий стол брокера: план, дела сегодня и шкала дня, воронка, действия, правая колонка
   ========================================================================================= */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.home-main { display: grid; gap: 14px; min-width: 0; }
.home-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.home-rail { display: grid; gap: 12px; min-width: 0; }
.hcard { min-width: 0; border: 1px solid #E5E8EA; border-radius: 14px; background: var(--bm-white);
  box-shadow: 0 1px 2px rgba(35, 39, 43, .04), 0 8px 24px -20px rgba(35, 39, 43, .22); }
.hc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px 8px; }
.hc-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 800; white-space: nowrap; }
.hc-sub { font-size: 12.5px; color: #66756F; }
.hc-spacer { flex: 1; }
.hc-link { font-size: 12.5px; font-weight: 600; color: #4A5154; border-bottom: 1px solid var(--bm-orange); }
.hc-link:hover { color: var(--bm-graphite); }
.hc-empty { margin: 0; padding: 12px 16px 14px; font-size: 13px; color: #66756F; }
.home .count { height: 20px; min-width: 22px; padding: 0 6px; font-size: 11.5px; }

/* план месяца: шкала выполнения и плитки с мини-графиком по рабочим дням */
.pmeter { display: block; width: 180px; height: 8px; overflow: hidden; border-radius: 999px; }
.pmeter svg { display: block; width: 100%; height: 100%; }
.pm-track { fill: #ECEEF0; } .pm-fill { fill: var(--bm-orange); } .pm-time { stroke: var(--bm-graphite); stroke-width: 2; }
.pm-pct { font-size: 13px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 4px 16px 14px; list-style: none; }
.stat { display: grid; gap: 4px; min-width: 0; padding: 10px 12px 8px; border: 1px solid #EEF0F1; border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.stat:hover { border-color: #E0E3E5; box-shadow: 0 6px 16px -14px rgba(35, 39, 43, .4); }
.stat-l { overflow: hidden; font-size: 12.5px; font-weight: 600; color: #4A5154; text-overflow: ellipsis; white-space: nowrap; }
.stat-v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.stat-v b { font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.stat-v small { margin-left: -4px; font-size: 14px; font-weight: 600; color: #8A9692; }
.delta { margin-left: auto; padding: 1px 6px; border-radius: 6px; background: var(--bm-paper); font-size: 11px; font-weight: 800; color: #66756F; white-space: nowrap; }
.delta.up { background: #E6F2EA; color: #2F6346; }
.delta.down { background: #FBE7E3; color: #A3311F; }
.spark { display: block; width: 100%; height: 20px; margin-top: 2px; }
.spark .on { fill: #B9C3BF; } .spark .zero { fill: #E2E6E8; } .spark .future { fill: #F1F3F4; } .spark .today { fill: var(--bm-orange); }
.stat.s-bad { border-color: #F3D5CE; } .stat.s-mid { border-color: #F2E3B6; }

/* сегодня: дела по времени с фильтром по виду */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 999px; background: #F1F3F4; }
.seg button { padding: 4px 10px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 12px; font-weight: 600; color: #4A5154; cursor: pointer;
  transition: background-color .15s ease, color .15s ease; }
.seg button span { color: #8A9692; }
.seg button[aria-selected="true"] { background: var(--bm-graphite); color: var(--bm-white); }
.seg button[aria-selected="true"] span { color: #C9D0CD; }
.agenda { max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.ag-row { display: grid; grid-template-columns: 20px 44px minmax(0, 1fr) auto 28px 18px; align-items: center; gap: 10px; padding: 8px 16px;
  border-top: 1px solid #F0F2F3; transition: background-color .12s ease; }
.ag-row:hover { background: #FAFBFB; }
.ag-row.hidden { display: none; }
.ag-check { display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid #C9D0CD; border-radius: 50%; font-size: 11px; font-weight: 800; color: var(--bm-white);
  transition: border-color .15s ease, background-color .15s ease; }
a.ag-check:hover { border-color: var(--bm-orange); background: #FFF4E8; }
.ag-check.on { border-color: var(--bm-orange); background: var(--bm-orange); color: var(--bm-graphite); }
.ag-time { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ag-time.late { color: var(--bm-danger); }
.ag-main { display: grid; min-width: 0; }
.ag-main b, .ag-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-main b { font-size: 14px; font-weight: 600; }
.ag-main small { font-size: 12px; color: #66756F; }
.ag-main:hover b { color: #B35A00; }
.ag-row.done .ag-main b { text-decoration: line-through; color: #8A9692; }
.ag-more { display: grid; place-items: center; height: 24px; border-radius: 6px; font-size: 16px; color: #8A9692; }
.ag-more:hover { background: #F1F3F4; color: var(--bm-graphite); }
.pill { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.p-call { background: #EEF0F1; color: #23272B; } .p-meeting { background: var(--bm-graphite); color: var(--bm-white); }
.p-showing { background: #FDEBD6; color: #8A4A00; } .p-message { background: #E3F2FB; color: #1C6A93; } .p-task { background: #EEF2F0; color: #3E5550; }
.ava { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.ava.t0 { background: var(--bm-graphite); color: var(--bm-white); } .ava.t1 { background: #FDEBD6; color: #8A4A00; } .ava.t2 { background: #E2EAE7; color: #3E5550; }
.ava.t3 { background: #F7EFD3; color: #6E5406; } .ava.t4 { background: #ECE6DE; color: #5E4A38; } .ava.t5 { background: #DFE7EE; color: #34506A; }

/* шкала дня: полчаса — строка, дело — блок на своё время */
.tl { position: relative; display: grid; grid-template-columns: 40px 1fr 1fr; grid-template-rows: repeat(24, 15px); padding: 6px 14px 14px 10px; }
.tl-h { grid-column: 1; align-self: start; transform: translateY(-6px); font-size: 10.5px; font-weight: 600; color: #8A9692; font-variant-numeric: tabular-nums; }
.tl-line { grid-column: 2 / 4; align-self: start; border-top: 1px solid #EEF0F1; }
.tl-now { position: relative; z-index: 3; grid-column: 2 / 4; align-self: center; border-top: 2px solid var(--bm-orange); }
.tl-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--bm-orange); }
.tl-ev { --cat: var(--bm-sage); position: relative; z-index: 2; display: grid; align-content: start; min-width: 0; margin: 1px 2px; padding: 2px 6px; overflow: hidden;
  border-left: 3px solid var(--cat); border-radius: 6px; background: #F3F5F4; font-size: 11px; line-height: 13px; transition: transform .12s ease, box-shadow .12s ease; }
.tl-ev:hover { z-index: 4; box-shadow: 0 8px 18px -12px rgba(35, 39, 43, .5); }
.tl-ev b { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev span { overflow: hidden; color: #4A5154; text-overflow: ellipsis; white-space: nowrap; }
.tl-ev.solo { grid-column: 2 / 4; } .tl-ev.l1 { grid-column: 2; } .tl-ev.l2 { grid-column: 3; }
.tl-ev.c-showing { background: #FEF1E2; } .tl-ev.c-meeting { background: #EEF0F1; } .tl-ev.c-zoom { background: #FBF4DC; }
.tl-ev.done { opacity: .5; }
.r1 { grid-row-start: 1; }
.r2 { grid-row-start: 2; }
.r3 { grid-row-start: 3; }
.r4 { grid-row-start: 4; }
.r5 { grid-row-start: 5; }
.r6 { grid-row-start: 6; }
.r7 { grid-row-start: 7; }
.r8 { grid-row-start: 8; }
.r9 { grid-row-start: 9; }
.r10 { grid-row-start: 10; }
.r11 { grid-row-start: 11; }
.r12 { grid-row-start: 12; }
.r13 { grid-row-start: 13; }
.r14 { grid-row-start: 14; }
.r15 { grid-row-start: 15; }
.r16 { grid-row-start: 16; }
.r17 { grid-row-start: 17; }
.r18 { grid-row-start: 18; }
.r19 { grid-row-start: 19; }
.r20 { grid-row-start: 20; }
.r21 { grid-row-start: 21; }
.r22 { grid-row-start: 22; }
.r23 { grid-row-start: 23; }
.r24 { grid-row-start: 24; }
.s1 { grid-row-end: span 1; }
.s2 { grid-row-end: span 2; }
.s3 { grid-row-end: span 3; }
.s4 { grid-row-end: span 4; }

/* воронка: этапы одним оттенком, насыщенность растёт к сделке */
.fun { display: flex; gap: 3px; margin: 0; padding: 4px 16px 16px; list-style: none; }
.fun.hidden { display: none; }
.fs { position: relative; display: grid; flex: 1; align-content: start; gap: 2px; min-width: 0; padding: 10px 10px 10px 18px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.fs:first-child { padding-left: 12px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 10px 0 0 10px; }
.fs:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 10px 10px 0; }
.fs span { overflow: hidden; font-size: 11.5px; font-weight: 600; color: #4A5154; text-overflow: ellipsis; white-space: nowrap; }
.fs b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.fs small { overflow: hidden; font-size: 10.5px; color: #4A5154; text-overflow: ellipsis; white-space: nowrap; }
.f0 { background: #FFF6EC; } .f1 { background: #FEEDD9; } .f2 { background: #FDE2C2; } .f3 { background: #FCD3A3; }
.f4 { background: #FAC07D; } .f5 { background: #F8AA54; } .f6 { background: var(--bm-orange); }

/* последние действия */
.act { margin: 0; padding: 0 0 8px; list-style: none; }
.act a, .act .act-row { display: grid; grid-template-columns: 10px 92px minmax(0, 1fr); align-items: start; gap: 8px; padding: 6px 16px; transition: background-color .12s ease; }
.act a:hover { background: #FAFBFB; }
.act .ev-dot { margin: 5px 0 0; }
.act time { font-size: 11.5px; color: #8A9692; white-space: nowrap; }
.act-text { display: grid; min-width: 0; }
.act-text b, .act-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-text b { font-size: 13px; font-weight: 600; } .act-text small { font-size: 12px; color: #66756F; }

.sysbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #F6D7A9; border-radius: 12px; background: #FFF8EC; font-size: 13px; }
.sysbar > span:nth-child(2) { flex: 1; }
.sysbar-ico .app-i { width: 22px; height: 22px; }

/* правая колонка: дата, главное действие, списки «что требует внимания» */
.rail-date { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.rail-date > .i { width: 18px; height: 18px; flex-basis: 18px; color: var(--bm-orange); }
.rail-date b { font-size: 14px; font-weight: 600; }
.rail-date .home-clock { margin-left: auto; font-size: 20px; }
.btn-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--bm-orange);
  color: var(--bm-graphite); font-size: 15px; font-weight: 800; transition: background-color .15s ease, transform .08s ease; }
.btn-cta:hover { background: #EC8710; } .btn-cta:active { transform: translateY(1px); }
.btn-cta .i { width: 18px; height: 18px; flex-basis: 18px; stroke-width: 2.4; }
.rl-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.rl-head h2 { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; margin: 0; overflow: hidden; font-size: 14px; font-weight: 800; white-space: nowrap; }
.rail-list.hot .rl-head h2::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--bm-orange); }
.rl-head .plan-all { font-size: 12px; }
.rl-body.plan-scroll { max-height: 104px; }
.rl-row { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-top: 1px solid #F0F2F3; transition: background-color .12s ease; }
.rl-row:hover { background: #FAFBFB; }
.rl-row form { display: contents; }
.rl-main { display: grid; flex: 1; min-width: 0; }
.rl-main b, .rl-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-main b { font-size: 13px; font-weight: 600; } .rl-main small { font-size: 11.5px; color: #66756F; }
.rl-main small .badge { min-height: 0; padding: 0 5px; border-width: 1px; font-size: 10px; line-height: 13px; vertical-align: 1px; }
.rl-main:hover b { color: #B35A00; }
.rl-meta { flex: none; font-size: 11.5px; color: #8A9692; white-space: nowrap; }
.rl-late { display: inline-flex; flex: none; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--bm-danger); white-space: nowrap; }
.rl-late.soft { color: #87650A; }
.rl-late .i { width: 12px; height: 12px; flex-basis: 12px; }
.rl-btn { flex: none; padding: 3px 8px; border: 1px solid #E3E6E8; border-radius: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; transition: border-color .15s ease, color .15s ease; }
.rl-btn:hover { border-color: var(--bm-orange); color: #B35A00; }
.rl-x { flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; font-size: 15px; color: #8A9692; cursor: pointer; }
.rl-x:hover { background: #F1F3F4; color: var(--bm-graphite); }
.rl-row .ava { width: 28px; height: 28px; }

@media (max-width: 1279px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-rail { display: contents; }
  .home-rail > .rail-date { order: -2; } .home-rail > .btn-cta, .home-rail > .add-pop { order: -1; }
  .home-rail > .rail-list { order: 1; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-row { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-head .pmeter { width: 100%; order: 5; }
  .ag-row { grid-template-columns: 20px 40px minmax(0, 1fr) 18px; gap: 8px; padding: 8px 12px; }
  .ag-row .pill, .ag-row .ava { display: none; }
  .hday { display: none; }
  .fun { flex-wrap: wrap; }
  .fs, .fs:first-child, .fs:last-child { flex: 1 1 30%; clip-path: none; border-radius: 10px; padding-left: 12px; }
}

/* ---------- «Главная»: уточнения плотности ---------- */
.home { grid-template-columns: minmax(0, 1fr) 300px; }
.home-row { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.hplan .hc-head { flex-wrap: nowrap; }
.hplan .pmeter { flex: 1 1 100px; max-width: 220px; min-width: 60px; }
.hplan .kpi-norm { margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.hplan .hc-link, .hplan .hc-sub { white-space: nowrap; }
.htoday .hc-head { flex-wrap: nowrap; }
.htoday h2 a:hover { color: #B35A00; }
.seg button { padding: 3px 8px; font-size: 11.5px; }
.htoday .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.agenda { max-height: 276px; }
.ag-row { padding: 7px 16px; }
.tl { grid-template-rows: repeat(24, 13px); padding-bottom: 10px; }
.tl-ev { font-size: 10.5px; line-height: 11px; padding: 1px 6px; }
.tl-ev span { display: none; }
.tl-ev.s2 span, .tl-ev.s3 span, .tl-ev.s4 span { display: block; }
.tl-more { position: absolute; right: 14px; bottom: 2px; font-size: 10.5px; color: #8A9692; }
.hfunnel .fun { padding-top: 6px; }
.fs b { font-size: 24px; }
.act a, .act .act-row { padding: 5px 16px; }
.rail-date { padding: 8px 14px; }
.btn-cta { height: 44px; }
.home-rail { gap: 10px; }
.rl-head { padding: 8px 14px 5px; }
.rl-body.plan-scroll { max-height: 96px; }
.rl-row { padding: 5px 14px; }

.seg button { flex: none; white-space: nowrap; }
.fun .fs:nth-child(1) { background: #FFF3E5; } .fun .fs:nth-child(2) { background: #FEE3C4; } .fun .fs:nth-child(3) { background: #FCCB93; }
.fun .fs:nth-child(4) { background: #F9AF5C; } .fun .fs:nth-child(5) { background: var(--bm-orange); }
.tl { grid-template-rows: repeat(22, 12px); }
.agenda { max-height: 264px; }

.tl { grid-template-rows: repeat(22, 14px); }
.tl-ev { padding: 0 6px; line-height: 12px; }
.agenda { max-height: 300px; }
.p-meeting { background: #E7EAEC; color: var(--bm-graphite); }
/* счётчики в левой панели (подгружаются вместе со счётчиком колокольчика) */
.nav-badge { display: none; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bm-orange);
  font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; color: var(--bm-graphite); }
.nav-badge.on { display: inline-block; }
.nav-dark .nav-badge { color: var(--bm-graphite); }
.tl { padding: 2px 14px 4px 10px; }

/* «Главная» на узких экранах — после всех уточнений, чтобы перекрывать их */
@media (max-width: 1279px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-rail { display: contents; }
  .home-rail > .rail-date { order: -2; } .home-rail > .btn-cta, .home-rail > .add-pop { order: -1; }
  .home-rail > .rail-list { order: 1; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-row { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hplan .hc-head { flex-wrap: wrap; }
  .hplan .pmeter { flex-basis: 100%; max-width: none; order: 5; }
  .hplan .kpi-norm { margin-left: 0; }
  .htoday .hc-head { flex-wrap: wrap; }
  .htoday .seg { max-width: 100%; }
  .ag-row { grid-template-columns: 20px 40px minmax(0, 1fr) 18px; gap: 8px; padding: 8px 12px; }
  .ag-row .pill, .ag-row .ava { display: none; }
  .hday { display: none; }
  .fun { flex-wrap: wrap; }
  .fun .fs, .fun .fs:first-child, .fun .fs:last-child { flex: 1 1 30%; clip-path: none; border-radius: 10px; padding-left: 12px; }
  .rail-date .home-clock { font-size: 18px; }
}

/* «Главная» на ноутбуке (высота до 860 px): ужимаем, чтобы всё осталось на одном экране */
@media (min-width: 1280px) and (max-width: 1439px) { .hplan .hc-sub { display: none; } }
@media (min-width: 1280px) and (max-height: 860px) {
  .home, .home-main, .home-row { gap: 10px; }
  .home-rail { gap: 8px; }
  .hc-head { padding: 9px 16px 6px; }
  .stats { gap: 8px; padding-bottom: 10px; }
  .stat { gap: 2px; padding: 7px 10px 6px; }
  .stat-v b { font-size: 22px; }
  .spark { height: 14px; }
  .tl { grid-template-rows: repeat(22, 11px); }
  .tl-ev { line-height: 10px; font-size: 10px; }
  .agenda { max-height: 236px; }
  .ag-row { padding: 6px 16px; }
  .fs { padding-top: 7px; padding-bottom: 7px; }
  .fs b { font-size: 20px; }
  .act a, .act .act-row { padding: 4px 16px; }
  .rail-date { padding: 6px 14px; }
  .btn-cta { height: 40px; }
  .rl-head { padding: 6px 14px 4px; }
  .rl-body.plan-scroll { max-height: 84px; }
  .rl-row { padding: 4px 14px; }
  .sysbar { padding: 5px 10px; }
}

/* ---------- «Объекты»: фильтры (статус, сфера, город → район → метро, цена, прибыль, окупаемость) и «Список» ---------- */
.ofilter { margin: 0 0 6px; }
.ofilter .chips { gap: 6px; margin-bottom: 10px; }
.ofilter .chip span { min-height: 32px; padding: 0 13px; font-size: 13px; font-weight: 600; }
.of-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; align-items: end; }
.of-search { grid-column: 1 / -1; max-width: none; margin: 0; }
.of-field { display: grid; gap: 3px; min-width: 0; margin: 0; padding: 0; border: 0; }
.of-field > span, .of-field > legend { padding: 0; font-size: 11.5px; font-weight: 600; color: #66756F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-grid input, .of-grid select { min-height: 38px; padding: 7px 10px; border-width: 1px; border-radius: 8px; }
.of-grid select { padding-right: 28px; background: var(--bm-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366756F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 14px; text-overflow: ellipsis; }
.of-field:not(.of-sort) select:has(option:checked:not([value=""])), .of-grid input:not(:placeholder-shown):not([type=search]) { border-color: var(--bm-graphite); }
.of-search input[type=search] { padding-left: 36px; }
.of-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px; color: #66756F; }
.of-apply { grid-column: 1 / -1; min-height: 38px; }
.of-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 12px; }
.of-result .list-count { margin: 0; }
.of-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.of-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 8px 0 11px; border: 1px solid var(--bm-graphite); border-radius: 999px; background: var(--bm-white); font-weight: 600; transition: border-color .15s; }
.of-chip .i { width: 12px; height: 12px; flex-basis: 12px; color: #66756F; stroke-width: 2.2; }
.of-chip:hover, .of-chip:focus-visible { border-color: var(--bm-orange); }
.of-chip:hover .i { color: var(--bm-graphite); }
@media (min-width: 720px) {
  .of-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .of-apply { grid-column: auto; }
}
@media (min-width: 1100px) {  /* две строки: поиск, статус, сфера, сортировка — затем где и сколько стоит */
  .of-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .of-search { grid-column: 1 / span 2; }
  .of-grid .of-sort { grid-column: 5; grid-row: 1; }
  .of-apply { grid-column: 6; grid-row: 1; justify-self: start; }
  .of-grid input, .of-grid select { font-size: 14px; }
}

/* «Список» объектов: таблица с ценой, прибылью, окупаемостью, городом, районом и метро; на телефоне — карточки */
.olist { border-top: 2px solid var(--bm-graphite); }
.ol-row { display: grid; grid-template-columns: minmax(220px, 2.2fr) 136px minmax(104px, 1fr) minmax(100px, 1fr) 112px 128px 96px 92px; gap: 12px; align-items: center;
  padding: 9px 10px; border-bottom: 1px solid var(--bm-line); border-left: 3px solid transparent; font-size: 14px; transition: background-color .15s, border-color .15s; }
a.ol-row:hover, a.ol-row:focus-visible { background: var(--bm-paper); border-left-color: var(--bm-orange); outline: none; }
.ol-head { padding-top: 8px; padding-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--bm-sage); }
.ol-head .sort { color: var(--bm-sage); border-bottom: 1px dotted var(--bm-line); }
.ol-head .sort:hover, .ol-head .sort:focus-visible, .ol-head .sort.on { color: var(--bm-graphite); border-bottom-color: var(--bm-orange); }
.ol-obj { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ol-name { display: grid; gap: 1px; min-width: 0; }
.ol-name b { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ol-name small, .ol-loc small { font-size: 12px; color: var(--bm-sage); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-loc { display: grid; min-width: 0; }
.ol-metro { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-status .badge { white-space: normal; min-height: 22px; padding: 2px 8px; line-height: 1.2; font-size: 11.5px; }
.ol-num { text-align: right; white-space: nowrap; }
.ol-price { font-weight: 800; color: var(--bm-orange); }
.ol-step { font-size: 12.5px; color: var(--bm-sage); white-space: nowrap; }
.ol-k { display: none; }
@media (max-width: 1099px) {
  .ol-row.ol-head { display: none; }
  .ol-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 10px 8px; }
  .ol-obj { flex: 1 1 100%; align-items: flex-start; }
  .ol-status { flex: 1 1 100%; padding-left: 66px; }
  .ol-loc, .ol-metro, .ol-num { display: block; text-align: left; font-size: 13px; }
  .ol-loc small { display: inline; margin-left: 4px; }
  .ol-k { display: inline; margin-right: 4px; font-size: 12px; color: var(--bm-sage); font-weight: 500; }
  .ol-loc, .ol-metro, .ol-num, .ol-step { padding-left: 0; }
  .ol-loc { margin-left: 66px; }
  .ol-step { margin-left: auto; }
}

/* «Назад» на внутренних экранах — одно место для всех: над заголовком слева */
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: -6px 0 6px -6px; padding: 0 10px 0 4px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #66756F; transition: background-color .15s, color .15s; }
.back-link .i { width: 18px; height: 18px; flex-basis: 18px; stroke-width: 2.2; }
.back-link:hover, .back-link:focus-visible { color: var(--bm-graphite); background: var(--bm-paper); }
.back-link:focus-visible { outline: 2px solid var(--bm-orange); outline-offset: 1px; }
.main.canvas .back-link:hover { background: var(--bm-white); }
@media (max-width: 767px) { .back-link { min-height: var(--tap); margin-top: -10px; margin-bottom: 2px; font-size: 14px; } }

/* голос: «Надиктовать», «Текстом / Голосом» под комментарием итога */
.btn-mic { display: inline-flex; align-items: center; gap: 6px; }
.btn-mic .i, .say-opt .i { width: 16px; height: 16px; flex-basis: 16px; }
.btn-mic.on, .say-opt.on[data-dictate-btn], .say-opt[aria-pressed="true"] { border-color: var(--bm-danger); color: var(--bm-danger); }
.btn-mic[aria-pressed="true"] .i, .say-opt[aria-pressed="true"] .i { animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .btn-mic[aria-pressed="true"] .i, .say-opt[aria-pressed="true"] .i { animation: none; } }
.say-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -8px 0 14px; }
.say-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--bm-line); border-radius: 999px;
  background: var(--bm-white); color: #66756F; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.say-opt:hover { color: var(--bm-graphite); border-color: var(--bm-graphite); }
.say-opt.on { color: var(--bm-graphite); border-color: var(--bm-orange); background: var(--bm-paper); }
.say-opt:focus-visible { outline: 2px solid var(--bm-orange); outline-offset: 1px; }
.say-hint { flex: 1 1 100%; }

/* файлы к итогу задачи */
.tfiles { margin: 4px 0 16px; padding: 12px 14px 2px; border: 0; border-left: 3px solid var(--bm-orange); background: var(--bm-paper); border-radius: 0 var(--radius) var(--radius) 0; }
.tfiles legend { float: left; display: flex; align-items: center; gap: 6px; padding: 0; margin-bottom: 2px; font-weight: 600; }
.tfiles legend .i { width: 16px; height: 16px; flex-basis: 16px; color: var(--bm-orange); }
.tfiles > p { clear: both; margin: 0 0 8px; }
.tfiles-row { display: grid; gap: 0 12px; }
@media (min-width: 720px) { .tfiles-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }

/* новая задача / файл: фраза, «Понял так», выбор клиента */
.tnew .page-head .muted { margin-top: 4px; max-width: 60ch; }
.tn-say { padding: 14px 14px 4px; margin-bottom: 16px; border: 1px solid var(--bm-line); border-radius: var(--radius); background: var(--bm-white); }
.tn-say .field { margin-bottom: 10px; }
.tn-say-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tn-hint { flex: 1 1 220px; }
.tn-understood { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--bm-orange); background: var(--bm-paper); font-size: 14px; }
.tn-understood .i { width: 14px; height: 14px; flex-basis: 14px; align-self: center; color: var(--bm-ok); }
.tn-block { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.tn-block > legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--bm-sage); }
.tn-block .chips { margin-bottom: 6px; }
.tn-when { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.tn-when .field { margin-bottom: 8px; }
.tn-days .badge { cursor: pointer; background: var(--bm-white); font: inherit; font-size: 12px; font-weight: 600; color: var(--bm-graphite); }
.tn-days .badge:hover { border-color: var(--bm-orange); }
.tn-search { max-width: none; margin: 0 0 8px; }
.tn-search input[type=search] { padding-left: 38px; }
.who-list { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.who-opt { position: relative; display: block; }
.who-opt input { position: absolute; opacity: 0; pointer-events: none; }
.who-opt > span { display: grid; gap: 1px; padding: 8px 12px; border: 1.5px solid var(--bm-line); border-radius: var(--radius); cursor: pointer; }
.who-opt small { color: var(--bm-sage); font-size: 12.5px; }
.who-opt input:checked + span { border-color: var(--bm-orange); background: var(--bm-paper); }
.who-opt input:focus-visible + span { outline: 2px solid var(--bm-orange); outline-offset: 2px; }
.who-empty { margin: 4px 0; }
.tn-place { margin-top: 2px; }

/* «Добавить»: меню под кнопкой на Главной и страница с теми же пунктами (боковая и нижняя панели) */
.add-pop { position: relative; }
.add-pop > .btn-cta { width: 100%; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.add-panel { left: 0; right: 0; width: auto; padding: 6px; }
.add-panel a, .add-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--bm-graphite); }
.add-panel a:hover, .add-panel a:focus-visible, .add-list a:hover, .add-list a:focus-visible { background: var(--bm-paper); outline: none; }
.add-panel a > .i, .add-list a > .i { flex: 0 0 34px; width: 34px; height: 34px; padding: 8px; border-radius: 9px; background: var(--bm-paper); color: var(--bm-graphite); }
.add-panel a:hover > .i, .add-list a:hover > .i { background: var(--bm-orange); color: var(--bm-graphite); }
.add-panel span, .add-list span { display: grid; gap: 1px; min-width: 0; }
.add-panel b, .add-list b { font-weight: 600; font-size: 14px; }
.add-panel small, .add-list small { font-size: 12px; color: var(--bm-sage); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-list { display: grid; gap: 4px; }
.add-list a { padding: 12px; border: 1px solid var(--bm-line); }
.add-list a > .i { flex-basis: 40px; width: 40px; height: 40px; padding: 10px; }
.who-none { margin-bottom: 8px; }
.who-none > span { border-style: dashed; }
