/* SEVN: фирменные токены поверх канона. Один цвет — стальной синий из упаковки и каталогов SEVN; остальное чёрный, белый, серый. */
:root {
  --bg: #F2F3F5; --bg2: #E8EAEE; --panel: #FFFFFF; --panel2: #F7F8FA; --line: #E2E5EA; --line2: #C9CED6;
  --ink: #15181D; --ink2: #4A515C; --ink3: #8A919C;
  --accent: #2C6A96; --accent2: #22587F; --accent-soft: #E7EFF6;
  --p1: #2C6A96; --p2: #5B8DB3; --p3: #8AAFC9; --p4: #6B7480; --p5: #9AA1AB; --p6: #3F7FAD;
  --rail: 236px;
}
:root[data-theme="dark"] {
  --bg: #121417; --bg2: #181B1F; --panel: #1B1E23; --panel2: #20242A; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.17);
  --ink: #EDEFF2; --ink2: #B2B8C1; --ink3: #737B87; --on-accent: #0E1720;
  --accent: #7EAFD4; --accent2: #A0C5E3; --accent-soft: rgba(126,175,212,.14);
  --p1: #7EAFD4; --p2: #5D90B8; --p3: #A9C8E0; --p4: #8C939D; --p5: #646B75; --p6: #4C7FA6;
}
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.inp:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
/* карточки без тени (правило дизайна CRM-платформы) */
.card { box-shadow: none; }

/* логотип */
.brand .logo { color: var(--ink); width: auto; }
.brand .wm { height: 15px; width: auto; display: block; color: var(--ink); }
.brand .s { margin-top: 6px; }
.min .brand .wm { display: none; }
.brand .mark { display: none; width: 30px; height: 30px; color: var(--ink); }
.min .brand .mark { display: block; }

/* вход */
.login { min-height: var(--vh, 100vh); display: grid; grid-template-columns: 55% 45%; background: var(--panel); }
.login .side { position: relative; background: #0F1114; color: #fff; overflow: hidden; }
.login .side canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login .side .cap { position: absolute; left: 40px; bottom: 36px; right: 40px; }
.login .side .cap b { display: block; font: 700 22px/1.25 var(--head); }
.login .side .cap span { display: block; margin-top: 6px; color: rgba(255,255,255,.62); font-size: 13.5px; }
.login .side .wm { position: absolute; left: 40px; top: 36px; height: 20px; color: #fff; }
.login .form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 72px); max-width: 520px; width: 100%; margin: 0 auto; }
.login h1 { font: 700 26px/1.2 var(--head); }
.login .sub { color: var(--ink3); margin: 6px 0 26px; }
.login .field { margin-bottom: 14px; }
.login .btn.p { height: 42px; justify-content: center; width: 100%; margin-top: 6px; }
.login .err { color: var(--rose); font-size: 13px; min-height: 20px; margin-top: 8px; }
.login .foot { margin-top: 28px; font-size: 12px; color: var(--ink3); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: 240px 1fr; }
  .login .side .cap { left: 20px; right: 20px; bottom: 18px; }
  .login .side .cap b { font-size: 17px; }
  .login .side .wm { left: 20px; top: 20px; height: 16px; }
}

/* обзор */
.ov { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.ov-side { display: grid; gap: 14px; }
.scene-card { position: relative; overflow: hidden; }
.scene-card .hd { position: relative; z-index: 2; }
.scene { position: relative; height: clamp(380px, 52vh, 560px); background: var(--bg2); }
.scene canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene .tag { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: 700 12px/1 var(--body); white-space: nowrap; transition: border-color .15s, color .15s, opacity .2s; }
.scene .tag i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 10px/1 var(--mono); font-style: normal; }
.scene .tag:hover, .scene .tag.on { border-color: var(--accent); color: var(--accent2); }
.scene .tag.hid { opacity: 0; pointer-events: none; }
.scene .tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: var(--line2); }
.scene .hint { position: absolute; left: 14px; bottom: 12px; font-size: 11.5px; color: var(--ink3); background: color-mix(in srgb, var(--panel) 80%, transparent); padding: 4px 8px; border-radius: 8px; }
.scene .zones { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; }
.scene .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink3); font-size: 13px; }
.zone-info { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; }
.zone-info .t { font: 700 15px/1.25 var(--head); }
.zone-info .d { color: var(--ink2); font-size: 13px; grid-column: 1 / -1; }
.zone-info .nums { grid-column: 1 / -1; display: flex; gap: 18px; margin-top: 6px; }
.zone-info .nums div { display: flex; flex-direction: column; }
.zone-info .nums b { font: 600 18px/1.2 var(--mono); }
.zone-info .nums span { font-size: 11.5px; color: var(--ink3); }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kt { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-height: 118px; }
.kt .l { font-size: 12px; font-weight: 700; color: var(--ink3); letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.kt .l svg.i { width: 16px; height: 16px; color: var(--accent); }
.kt .v { font: 600 26px/1.2 var(--mono); margin-top: 6px; letter-spacing: -.02em; }
.kt .s { font-size: 12.5px; color: var(--ink2); }
.kt .s.r { color: var(--rose); }
.kt.go { cursor: pointer; transition: border-color .15s; }
.kt.go:hover { border-color: var(--line2); }

.fbars { display: flex; flex-direction: column; gap: 9px; }
.fbar2 { display: grid; grid-template-columns: 128px 1fr 86px; gap: 10px; align-items: center; font-size: 12.5px; cursor: pointer; }
.fbar2 .n { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbar2 .b { height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.fbar2 .b i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.fbar2.won .b i { background: var(--ink2); }
.fbar2.lost .b i { background: var(--line2); }
.fbar2 .m { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; }
.fbar2:hover .n { color: var(--accent2); }

.alist { display: flex; flex-direction: column; }
.ai { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.ai:first-child { border-top: 0; padding-top: 0; }
.ai .ck { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line2); background: transparent; display: grid; place-items: center; padding: 0; margin-top: 1px; color: transparent; }
.ai .ck:hover { border-color: var(--accent); }
.ai.done .ck { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai .ck svg { width: 12px; height: 12px; stroke-width: 3; }
.ai .tx { min-width: 0; }
.ai .tx b { font-weight: 600; font-size: 13px; display: block; }
.ai.done .tx b { text-decoration: line-through; color: var(--ink3); }
.ai .tx small { color: var(--ink3); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai .tx small a { color: var(--ink2); }
.ai .tx small a:hover { color: var(--accent2); }
.ai .w { font-size: 12px; color: var(--ink3); white-space: nowrap; font-family: var(--mono); }
.ai .w.od { color: var(--rose); }

.dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dir { padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; }
.dir:hover { border-color: var(--line2); }
.dir .t { font-size: 12px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; }
.dir .v { font: 600 18px/1.3 var(--mono); margin-top: 4px; }
.dir .s { font-size: 12px; color: var(--ink2); }

@media (max-width: 1240px) { .ov { grid-template-columns: 1fr; } .ov-side { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .ov-side { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kt { padding: 12px 14px; min-height: 0; }
  .kt .v { font-size: 20px; }
  .scene { height: 340px; }
  .fbar2 { grid-template-columns: 104px 1fr 74px; }
}

/* панель над доской и списками */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bar .qsr { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--ink3); min-width: 220px; }
.bar .qsr input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
.seg2 { display: inline-flex; background: var(--bg2); padding: 3px; border-radius: 10px; gap: 2px; }
.seg2 button { border: 0; background: transparent; color: var(--ink2); font-size: 12.5px; font-weight: 700; padding: 0 12px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg2 button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.seg2 button svg.i { width: 15px; height: 15px; }
.seg2 .n { font: 600 11px/1 var(--mono); color: var(--ink3); }

/* таблицы */
.card > .tscroll { border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.m { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.tbl .sub { display: block; color: var(--ink3); font-size: 12px; }
.tbl tr.go:hover td { background: var(--panel2); cursor: pointer; }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl th[data-sort]:hover { color: var(--ink); }
.tbl th .ar { color: var(--accent); margin-left: 3px; }
.pager2 { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink3); }
.pager2 b { color: var(--ink); font-family: var(--mono); font-weight: 600; }

.stdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.stdot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc, var(--accent)); }

/* доска */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban .col { flex: 0 0 272px; max-width: 272px; }
.dc .tg { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* карточка сделки и клиента */
.ec { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.ec .kv { grid-template-columns: 140px 1fr; }
.stages2 { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.stages2 button { flex: 1 1 0; min-width: 112px; height: 34px; border: 0; background: var(--bg2); color: var(--ink3); font-size: 12px; font-weight: 700; padding: 0 12px; white-space: nowrap; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.stages2 button:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.stages2 button:hover { color: var(--ink); }
.stages2 button.done { background: color-mix(in srgb, var(--accent) 22%, var(--bg2)); color: var(--accent2); }
.stages2 button.cur { background: var(--accent); color: #fff; }
.stages2 button.won { background: var(--ink); color: var(--panel); }
.stages2 button.lost { background: var(--rose-soft); color: var(--rose); }
.tl2 { display: flex; flex-direction: column; }
.tl2 .e { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.tl2 .e:first-child { border-top: 0; }
.tl2 .e .ic2 { width: 30px; height: 30px; border-radius: 9px; background: var(--bg2); color: var(--ink2); display: grid; place-items: center; }
.tl2 .e .ic2 svg.i { width: 15px; height: 15px; }
.tl2 .e b { font-weight: 600; font-size: 13px; }
.tl2 .e small { display: block; color: var(--ink3); font-size: 12px; }
.tl2 .e p { font-size: 13px; color: var(--ink2); white-space: pre-wrap; margin-top: 2px; }
.addnote { display: flex; gap: 8px; margin-bottom: 12px; }
.addnote textarea.inp { min-height: 40px; height: 40px; }
@media (max-width: 1100px) { .ec { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .ec .kv { grid-template-columns: 110px 1fr; } }

/* формы */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.ferr { color: var(--rose); font-size: 12.5px; min-height: 18px; margin-top: 10px; }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } }

/* доступы */
.pgrp { margin-top: 14px; }
.pgrp h4 { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); margin-bottom: 6px; }
.prow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.prow.sub { padding-left: 18px; }
.prow b { font-weight: 600; font-size: 13px; display: block; }
.prow small { color: var(--ink3); font-size: 12px; }
.prow .def { font-size: 11px; color: var(--ink3); margin-left: 6px; font-weight: 600; }
.prow .def.ch { color: var(--accent2); }
.sw2 { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.sw2 input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sw2 i { position: absolute; inset: 0; border-radius: 11px; background: var(--line2); transition: background .15s; pointer-events: none; }
.sw2 i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw2 input:checked + i { background: var(--accent); }
.sw2 input:checked + i::after { transform: translateX(16px); }

/* «скоро» в меню */
.nav a.soon { opacity: .6; }
.nav a.soon .badge { font-family: var(--body); font-size: 10px; }

.toast { display: flex; align-items: center; gap: 8px; }
.brand .logo svg.wm { width: auto; height: 16px; fill: currentColor; stroke: none; }
.brand .logo svg.mark { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3; }
.login .side svg.wm { fill: currentColor; stroke: none; width: auto; }

/* задачи: доска */
.tkb .col { flex: 0 0 286px; max-width: 286px; }
.tk { cursor: pointer; }
.tk .t { font-weight: 600; line-height: 1.35; }
.tk-h { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.tk-h:empty { display: none; }
.tk-h .chip { height: 19px; font-size: 10.5px; padding: 0 7px; }
.tk-f { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 12px; color: var(--ink3); }
.tk-f span { display: inline-flex; align-items: center; gap: 4px; }
.tk-f svg.i { width: 13px; height: 13px; }
.tk-add { width: 100%; height: 34px; border: 1px dashed var(--line2); border-radius: 12px; background: transparent; color: var(--ink3); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.tk-add:hover { color: var(--accent2); border-color: var(--accent); }
.tk-add svg.i { width: 15px; height: 15px; }

/* задачи: карточка */
.modal.tmodal { width: min(1040px, 100%); }
.tm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
.tm-title { font: 700 21px/1.3 var(--head); margin-bottom: 4px; }
.tm-sec { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.tm-title + .tm-sec { border-top: 0; margin-top: 4px; padding-top: 4px; }
.tm-sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 30px; }
.tm-sh > span { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.tm-desc { font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.tm-desc p { margin: 0 0 10px; }
.tm-desc p:last-child { margin-bottom: 0; }
.tm-desc a { color: var(--accent2); }
.tm-desc .tb-img { display: block; margin: 10px 0; }
.tm-desc .tb-img img { display: block; max-width: 100%; max-height: 460px; border-radius: 10px; border: 1px solid var(--line); }
.tm-ed .tm-title-in { height: 44px; font: 700 17px/1 var(--head); margin-bottom: 8px; }
.tm-ed textarea.inp { min-height: 180px; line-height: 1.55; }
.tm-files { display: flex; flex-direction: column; gap: 6px; border-radius: 12px; }
.tm-files.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.tf { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 6px 6px 6px; border: 1px solid var(--line); border-radius: 12px; }
.tf-th, .tf-ic { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--bg2); }
.tf-th img { width: 100%; height: 100%; object-fit: cover; }
.tf-ic b { font: 700 10.5px/1 var(--mono); color: var(--accent2); }
.tf-n { min-width: 0; }
.tf-n a { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-n a:hover { color: var(--accent2); }
.tf-n small { color: var(--ink3); font-size: 11.5px; }
.tf-drop { font-size: 12px; color: var(--ink3); padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 12px; text-align: center; }
.tck { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.tck input { width: 16px; height: 16px; accent-color: var(--accent); }
.tck.d span { text-decoration: line-through; color: var(--ink3); }
.tck .xbtn { width: 26px; height: 26px; opacity: 0; }
.tck:hover .xbtn { opacity: 1; }
.tm-side { display: flex; flex-direction: column; gap: 12px; padding-left: 22px; border-left: 1px solid var(--line); }
.tm-meta { font-size: 12px; color: var(--ink3); line-height: 1.6; }
.tm-side .btn.danger { align-self: flex-start; }
@media (max-width: 860px) { .tm-grid { grid-template-columns: 1fr; } .tm-side { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }
.tk .t { white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* шоурум 1:1: выбор товара */
.scene { height: clamp(440px, 60vh, 680px); }
.scene .tag.tip, .scene .tag.sel { pointer-events: none; padding: 5px 10px; }
.scene .tag.tip { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.scene .tag.sel { background: var(--accent); color: #fff; border-color: var(--accent); }
.scene .tag.tip::after, .scene .tag.sel::after { display: none; }
.picker { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--panel2); }
.picker:empty { display: none; }
.pk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pk-l { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pk-l button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2); font: 600 12px/1 var(--mono); display: inline-flex; align-items: center; gap: 6px; }
.pk-l button i { font-style: normal; color: var(--ink3); font-size: 10.5px; }
.pk-l button:hover { border-color: var(--accent); color: var(--accent2); }
.pk-l button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pk-l button.on i { color: rgba(255,255,255,.7); }
.pk-s { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); margin: 0 2px 0 8px; }
.pk-s:first-child { margin-left: 0; }
.zone-info .nums { flex-wrap: wrap; gap: 10px 26px; }
.pc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pc-s { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent2); }
.pc-t { font: 700 19px/1.25 var(--head); margin-top: 3px; }
.pc-n { color: var(--ink2); font-size: 13px; margin-top: 2px; }
.pc-a { display: flex; align-items: center; gap: 8px; }
.pc-p { font: 600 13px/1 var(--mono); color: var(--ink2); margin-right: 4px; white-space: nowrap; }
.pc-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pc-l { font-size: 12px; color: var(--ink3); margin-right: 4px; }
.pc-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 26px; margin-top: 12px; }
.pc-g > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pc-g span { color: var(--ink3); }
.pc-g b { font-weight: 600; text-align: right; }
.pc-f { font-size: 11.5px; color: var(--ink3); margin-top: 10px; }

/* шоурум: кнопки в сцене, прогулка, полный экран */
.scene { overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.scene:fullscreen { height: 100vh; width: 100vw; background: #16191D; }
.sc-ui { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.sc-ui > * { pointer-events: auto; }
.sc-top { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.sc-b { height: 36px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font: 700 12.5px/1 var(--body); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.sc-b svg.i { width: 17px; height: 17px; }
.sc-b.ic { width: 36px; padding: 0; justify-content: center; }
.sc-b:hover { border-color: var(--accent); color: var(--accent2); }
.sc-b.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sc-b[hidden] { display: none; }
.sc-pad { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 6px; }
.sc-pad[hidden], .sc-help[hidden] { display: none; }
.sc-pad > div { display: flex; flex-direction: column; gap: 6px; }
.sc-pad button { width: 48px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); display: grid; place-items: center; touch-action: none; transition: background .1s, color .1s, transform .1s; }
.sc-pad button svg.i { width: 20px; height: 20px; }
.sc-pad button:hover { border-color: var(--accent); }
.sc-pad button.on { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(.95); }
.sc-help { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 6px 12px; border-radius: 9px; background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-help b { color: var(--ink); font-weight: 700; }
.scene .hint[hidden] { display: none; }
.picker.dim { opacity: .55; }

/* боковая панель товара: полупрозрачная, поверх сцены */
.sc-info { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(360px, calc(100% - 24px)); z-index: 5; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--line2) 70%, transparent); background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); color: var(--ink); overflow: hidden; animation: siIn .28s cubic-bezier(.2, .8, .2, 1); user-select: text; -webkit-user-select: text; touch-action: auto; }
.sc-info[hidden] { display: none; }
@keyframes siIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.si-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 12px 12px 18px; border-bottom: 1px solid color-mix(in srgb, var(--line2) 60%, transparent); }
.si-s { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); }
.si-t { font: 700 23px/1.15 var(--head); margin-top: 4px; letter-spacing: -.01em; }
.si-w { font-size: 12px; color: var(--ink2); margin-top: 5px; }
.si-b { flex: 1; overflow-y: auto; padding: 4px 18px 14px; }
.si-n { font-size: 13px; color: var(--ink2); margin-top: 12px; }
.si-l { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); margin: 16px 0 8px; }
.si-c { display: flex; flex-wrap: wrap; gap: 5px; }
.si-c span { height: 24px; padding: 0 9px; border-radius: 7px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent2); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; }
.si-f { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink); margin-top: 8px; line-height: 1.4; }
.si-f svg.i { width: 14px; height: 14px; color: var(--accent); margin-top: 2px; stroke-width: 2.4; }
.si-g > div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--line2) 45%, transparent); font-size: 12.5px; }
.si-g > div:last-child { border-bottom: 0; }
.si-g span { color: var(--ink2); }
.si-g b { font-weight: 600; text-align: right; }
.si-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid color-mix(in srgb, var(--line2) 60%, transparent); background: color-mix(in srgb, var(--panel) 55%, transparent); }
.si-ft small { display: block; font-size: 10.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.si-ft b { font: 600 15px/1.3 var(--mono); }
@media (max-width: 760px) {
  .sc-info { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 62%; }
  .sc-b span { display: none; } .sc-b { width: 38px; padding: 0; justify-content: center; }
  .sc-help { display: none; }
  .sc-pad { bottom: 12px; }
}

/* панель показателей обзора: одна карточка, четыре секции */
.kbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; padding: 4px 0; }
.kb { display: flex; gap: 16px; padding: 18px 22px; position: relative; color: inherit; transition: background .15s; border-radius: 12px; }
a.kb:hover { background: var(--panel2); }
.kb + .kb::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.kb-i { flex-shrink: 0; color: var(--accent); padding-top: 2px; }
.kb-i svg.i { width: 34px; height: 34px; stroke-width: 1.5; }
.kb-b { min-width: 0; flex: 1; }
.kb-l { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.kb-v { font: 600 28px/1.15 var(--mono); letter-spacing: -.02em; margin-top: 6px; white-space: nowrap; }
.kb-v small { font: 700 13px/1 var(--body); color: var(--ink3); letter-spacing: 0; margin-left: 8px; }
.kb-s { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.kb-s .up, .kb-s.up { color: var(--accent2); font-weight: 700; }
.kb-s .dn, .kb-s.dn { color: var(--rose); font-weight: 700; }
.kb-split { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin-top: 12px; }
.kb-split i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.kb-leg { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11.5px; color: var(--ink2); white-space: nowrap; }
.kb-leg span { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; }
.kb-leg b { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.kb-leg b.l2 { background: var(--line2); }
.kb-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.kb-kv + .kb-kv { margin-top: 0; padding-top: 6px; border-top: 0; }
.kb-kv span { color: var(--ink3); }
.kb-kv b { font: 600 12.5px/1.2 var(--mono); }
@media (max-width: 1240px) { .kbar { grid-template-columns: 1fr 1fr; } .kb:nth-child(3)::before { display: none; } .kb:nth-child(n+3) { border-top: 1px solid var(--line); border-radius: 0; } }
@media (max-width: 760px) { .kbar { grid-template-columns: 1fr; } .kb::before { display: none; } .kb + .kb { border-top: 1px solid var(--line); border-radius: 0; } .kb { padding: 14px 16px; } .kb-i svg.i { width: 28px; height: 28px; } .kb-v { font-size: 24px; } }

/* логотип в меню крупнее */
.brand .logo svg.wm { height: 22px; }
.brand { padding-top: 10px; padding-bottom: 20px; }

/* прогулка: крестовина стрелок */
.sc-pad { display: block; }
.sc-pad-g { display: grid; grid-template-columns: repeat(3, 48px); grid-auto-rows: 44px; gap: 6px; }
.sc-pad-g span { display: block; }
.scene canvas { cursor: inherit; }

.kb-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-kv b.up { color: var(--accent2); } .kb-kv b.dn { color: var(--rose); }
.kb-kv { margin-top: 10px; padding-top: 0; border-top: 0; }
.kb-kv + .kb-kv { margin-top: 5px; padding-top: 0; }
.kb-kv span, .kb-kv b { white-space: nowrap; }
.kb-kv span { overflow: hidden; text-overflow: ellipsis; }
.sc-pad > .sc-pad-g { display: grid; flex-direction: row; }

/* ===== списки уровня CRM: сводка, карточки воронки, раскрытие, фильтры ===== */
.dsum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; padding: 4px 0; }
.ds-c { display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; border: 0; background: transparent; text-align: left; position: relative; color: inherit; font: inherit; border-radius: 12px; }
.ds-c + .ds-c::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
button.ds-c { cursor: pointer; transition: background .15s; }
button.ds-c:hover { background: var(--panel2); }
button.ds-c.on { background: var(--accent-soft); }
.ds-c span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.ds-c b { font: 600 21px/1.25 var(--mono); }
.ds-c small { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-bar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin-top: 6px; }
.ds-bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 1240px) { .dsum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ds-c:nth-child(4)::before { display: none; } }
@media (max-width: 760px) { .dsum { grid-template-columns: 1fr 1fr; } .ds-c::before { display: none; } }

.dtb { margin-bottom: 12px; }
.dtb-f .qsr { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); color: var(--ink3); width: 300px; max-width: 100%; }
.dtb-f .qsr input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 13px; }
.dtb-f .qsr:focus-within { border-color: var(--accent); }
/* списки с раскрытием растут вместе со страницей, а не в окне с прокруткой */
.tscroll:has(> .tbl.dl), .tscroll:has(> .tbl.ut), .tscroll:has(> .tbl.aud) { max-height: none; overflow-y: visible; }
.dtb-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.on-f { border-color: var(--accent); color: var(--accent2); }
.fcnt { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font: 700 10.5px/18px var(--body); text-align: center; }
.fpop { width: 280px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.fp-h { display: flex; align-items: center; justify-content: space-between; }
.fp-h b { font: 700 14px/1 var(--head); }
.fbar { margin-bottom: 12px; }
.nsum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.nsg { --gc: var(--accent); }

/* карточка сделки на доске */
.dc2 .dc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11.5px; color: var(--ink3); }
.dc-n { font: 600 11px/1 var(--mono); color: var(--ink3); }
.dc-dir { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink2); }
.dc-dir svg.i { width: 13px; height: 13px; }
.dc-src { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc2 .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.dc-m { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; font-size: 12px; color: var(--ink2); }
.dc-m span { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-m svg.i { width: 13px; height: 13px; color: var(--ink3); flex-shrink: 0; }
.dc-ago { font: 600 11px/1 var(--mono); color: var(--ink3); padding: 4px 6px; border-radius: 6px; background: var(--bg2); }
.dc-ago.old { color: var(--rose); background: var(--rose-soft); }
.dact.none { color: var(--ink3); font-style: italic; }
.dc.is-od { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rose) 35%, transparent); }
.ch-od { margin-left: 8px; font: 700 11px/1 var(--body); color: var(--rose); background: var(--rose-soft); padding: 3px 7px; border-radius: 8px; }
.col-empty { font-size: 12px; color: var(--ink3); text-align: center; padding: 22px 8px; border: 1px dashed var(--line2); border-radius: 12px; }

/* раскрытые строки */
.xcm { font-size: 12.5px; color: var(--ink2); padding: 8px 10px; border-radius: 8px; background: var(--bg2); margin-top: 6px; white-space: pre-wrap; }
.xi .xn small { display: block; font-size: 11.5px; color: var(--ink3); font-weight: 500; }
.xprog { margin: 6px 0 8px; }
.xprog i { display: block; height: 5px; border-radius: 3px; background: var(--accent); }
.xprog span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 5px; }
.tprog { height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; margin-top: 5px; }
.tprog i { display: block; height: 100%; background: var(--accent); }
.xdesc { font-size: 13px; line-height: 1.55; max-height: 220px; overflow: auto; }
.xdesc p { margin: 0 0 8px; }
.xdesc img { max-width: 100%; max-height: 120px; border-radius: 8px; }
.xck { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 3px 0; cursor: pointer; }
.xck input { accent-color: var(--accent); margin-top: 3px; }
.xck.d span { text-decoration: line-through; color: var(--ink3); }
.seg.sm button { height: 26px; font-size: 11.5px; padding: 0 9px; }

/* задачи */
.tk-d { font-size: 12px; color: var(--ink2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.tk-p { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.tk-p span { flex: 1; height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.tk-p i { display: block; height: 100%; background: var(--accent); }
.tk-p b { font: 600 11px/1 var(--mono); color: var(--ink2); }
.tk-who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); font-weight: 600; }
.tst { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 700; background: var(--bg2); color: var(--ink2); white-space: nowrap; }
.tst::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tst.work, .tst.review { background: var(--accent-soft); color: var(--accent2); }
.tst.done { background: var(--ink); color: var(--panel); }
.tst.hold { color: var(--ink3); }
.tprog2 { display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px/1 var(--mono); color: var(--ink2); }
.tprog2 i { width: 54px; height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; display: block; }
.tprog2 b { display: block; height: 100%; background: var(--accent); }
.tbl th svg.i { width: 13px; height: 13px; vertical-align: -2px; }

/* администрирование */
.ut-st.warn { color: #B87A1E; }
.dstg { display: flex; flex-direction: column; gap: 8px; }
.dst { display: grid; grid-template-columns: 26px 1fr auto 34px; gap: 10px; align-items: center; }
.dst-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12px/1 var(--mono); color: #fff; background: var(--cc); }
.dst .m { text-align: right; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tbl.aud td { padding: 9px 12px; }
.aud-day td { background: var(--panel2); font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); padding: 8px 12px !important; }
.sy { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sy-t { display: flex; flex-direction: column; gap: 3px; padding: 16px 22px; position: relative; }
.sy-t + .sy-t::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.sy-t span { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.sy-t b { font: 600 22px/1.2 var(--mono); }
.sy-t small { font-size: 12px; color: var(--ink2); }
.sy-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 140px; align-items: end; }
.sy-bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 5px; }
.sy-bars i { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.sy-bars span { font: 500 10.5px/1 var(--mono); color: var(--ink3); }
