/* The panel as a CRM: the sections on the left, the chosen section on the right, its parts as a row of pills. */
body.crm-page main{max-width:1440px}
.crm{display:grid;grid-template-columns:232px minmax(0,1fr);gap:28px;align-items:start}
.side{position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}
.side-toggle{display:none}
.side-search{position:relative;margin-bottom:10px}
.side-search input{margin:0;padding:10px 34px 10px 12px;font-size:14px}
.side-search kbd{position:absolute;right:10px;top:9px;font:600 11px system-ui;color:var(--muted);border:1px solid var(--line);border-radius:5px;padding:2px 6px;pointer-events:none}
.side-search input:focus+kbd{display:none}
.nav-found{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:5;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px #0002;padding:6px;max-height:60vh;overflow:auto}
.nav-found button{display:block;width:100%;text-align:left;background:none;color:#172d31;padding:9px 10px;border-radius:8px;font-size:14px;font-weight:600}
.nav-found button small{display:block;font-weight:400;font-size:12px;color:var(--muted)}
.nav-found button.on,.nav-found button:hover{background:#eef5f2;filter:none}
.nav-found p{margin:6px 10px;font-size:13px;color:var(--muted)}
.side .tabs{display:block;background:none;padding:0;border-radius:0}
.nav-group{margin:4px 0 10px}
.nav-group:not(:has(button:not([hidden]),a)){display:none}
.nav-group p{margin:12px 10px 4px;font-size:11px;letter-spacing:1.4px;font-weight:750;text-transform:uppercase;color:var(--muted)}
.side .tabs button{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;background:none;color:#245c57;padding:9px 10px;border-radius:9px;font-size:14px;box-shadow:none}
.side .tabs button:hover{background:#eef5f2;filter:none}
.side .tabs button.on{background:var(--accent);color:#fff}
.side .tabs a{display:flex;align-items:center;justify-content:space-between;width:100%;padding:9px 10px;border-radius:9px;font-size:14px;font-weight:600;color:#245c57;text-decoration:none}
.side .tabs a:hover{background:#eef5f2}
.side .tabs a.on{background:var(--accent);color:#fff}
.nav-group.mine{border-top:1px solid var(--line);padding-top:6px}
header.shell-head .head-space{flex:1}
body.staff-shell .crm-main{margin:0}
.side-refresh{width:100%;margin-top:6px;font-size:13px;padding:10px}
.crm-head{margin:0 0 20px}
.crm-head h1{font-size:30px;letter-spacing:-.8px;margin:2px 0 14px}
.subnav{display:flex;gap:6px;flex-wrap:wrap}
.subnav button{background:#e8f1ee;color:#245c57;padding:8px 14px;border-radius:999px;font-size:13px}
.subnav button.on{background:#172d31;color:#fff}
.subnav button.all{background:none;color:var(--muted);border:1px dashed var(--line)}
.subnav button.all.on{color:#172d31;border-color:#172d31}
.sub-off{display:none!important}
.panel.found-flash{animation:found-flash 1.6s ease-out}
@keyframes found-flash{0%{box-shadow:0 0 0 4px #207f8066}100%{box-shadow:0 0 0 4px #207f8000}}
@media(max-width:900px){
 .crm{grid-template-columns:minmax(0,1fr);gap:16px}
 .side{position:static;max-height:none;padding:8px}
 .side-toggle{display:block;width:100%;text-align:left;background:none;color:#172d31;font-size:15px;padding:10px}
 .side-body{display:none;padding:4px 6px 6px}
 .side.open .side-body{display:block}
 .side-search kbd{display:none}
 .crm-head h1{font-size:24px}
 .subnav{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;margin:0 -16px;padding-left:16px;padding-right:16px}
 .subnav button{white-space:nowrap}
}
/* «Входящие» */
.side .tabs button[data-count]:not([data-count=""])::after,.side .tabs a[data-count]:not([data-count=""])::after{content:attr(data-count);min-width:22px;padding:1px 7px;border-radius:999px;background:#e8f1ee;color:#245c57;font-size:12px;text-align:center}
.side .tabs button.has-high::after,.side .tabs a.has-high::after{background:#c8452f;color:#fff}
.side .tabs button.on[data-count]::after,.side .tabs a.on[data-count]::after{background:#ffffff33;color:#fff}
.inbox-head{display:flex;justify-content:space-between;align-items:center;gap:10px 16px;flex-wrap:wrap;margin-bottom:18px}
.ib-levels{display:flex;gap:6px;flex-wrap:wrap}
.ib-pill{display:inline-flex;align-items:center;gap:7px;background:#fff;color:#172d31;border:1px solid var(--line);border-radius:999px;padding:7px 10px 7px 12px;font-size:13px;font-weight:650;white-space:nowrap}
.ib-pill:hover{border-color:#9fbfb8;filter:none}
.ib-pill.on{background:#207f80;color:#fff;border-color:#207f80}
.ib-pill.all .ib-dot{display:none}
.ib-pill .ib-count{background:#e8f1ee;color:#245c57}
.ib-pill.on .ib-count{background:#ffffff26;color:#fff}
.ib-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#9bb8b2;flex:none}
.lvl-high>.ib-dot,.ib-pill.lvl-high .ib-dot{background:#c8452f}
.lvl-mid>.ib-dot,.ib-pill.lvl-mid .ib-dot{background:#e0a630}
.lvl-low>.ib-dot,.ib-pill.lvl-low .ib-dot{background:#8fb8b0}
.ib-pill.mine .ib-dot{background:#207f80}
.ib-count{display:inline-block;min-width:22px;padding:1px 7px;border-radius:999px;background:#eef3f1;color:#33494c;font-size:12px;font-weight:700;text-align:center;letter-spacing:0}
.ib-tools{display:flex;align-items:center;gap:8px}
.ib-tools .inline-select{padding:8px 10px;font-size:13px;max-width:240px}
#inboxRefresh{padding:7px 12px;font-size:16px;line-height:1}
.inbox-list.look-list{display:flex;flex-direction:column;gap:8px}
.ib-sec{display:flex;align-items:center;gap:9px;margin:20px 0 4px;font-size:13px;letter-spacing:1.2px;text-transform:uppercase;font-weight:800;color:#172d31}
.ib-sec:first-child{margin-top:0}
.ib-sec .ib-dot{width:11px;height:11px}
.ib-sec small{font-size:13px;letter-spacing:0;text-transform:none;font-weight:500;color:#657775}
.ib-sec.lvl-high{color:#b3261e}
.ib-sec.calm{color:#657775}
.ib-sec.calm>.ib-dot{background:#2e9c7c}
.ib-sec.calm .ib-count{display:none}
.ib-group{background:#fff;border:1px solid var(--line);border-left:4px solid var(--line);border-radius:14px;overflow:hidden}
.ib-group.lvl-high{border-left-color:#c8452f}
.ib-group.lvl-mid{border-left-color:#e0a630}
.ib-group.lvl-low{border-left-color:#8fb8b0}
.ib-ghead{display:block;width:100%;text-align:left;background:none;color:#172d31;padding:12px 16px;border-radius:0;font-weight:400}
.ib-ghead:hover{background:#f6faf8;filter:none}
.ib-ghead:disabled{opacity:1;cursor:default;background:none}
.ib-group.open .ib-ghead{border-bottom:1px solid var(--line)}
.ib-gtitle{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ib-gtitle strong{font-size:15px}
.ib-chev{margin-left:auto;font-size:13px;font-weight:650;color:#207f80;white-space:nowrap}
.ib-ghead:disabled .ib-chev{display:none}
.ib-do{margin:3px 0 0;font-size:13px;line-height:1.45;color:#245c57}
.ib-do::before{content:'→ ';color:#207f80;font-weight:700}
.ib-peek{margin:3px 0 0;font-size:13px;color:#657775;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ib-rows{display:flex;flex-direction:column}
.ib-row{display:flex;align-items:center;gap:14px;padding:10px 16px;border-top:1px solid #edf2f0}
.ib-rows>.ib-row:first-child{border-top:0}
.ib-group.single .ib-row{padding:12px 16px;border:0}
.ib-main{flex:1;min-width:0}
.ib-top{display:flex;align-items:center;gap:6px 8px;flex-wrap:wrap}
.ib-ktitle{font-size:15px;font-weight:700;color:#172d31}
.ib-sep{color:#9bb8b2;font-weight:700}
.ib-label{font-size:14px;font-weight:700;color:#172d31;overflow-wrap:anywhere}
button.ib-label.link{background:none;padding:0;border-radius:0;color:#172d31;text-align:left;font-weight:700;font-size:14px;line-height:1.4}
button.ib-label.link::after{content:' →';color:#207f80}
button.ib-label.link:hover{color:#207f80;filter:none}
.ib-badge{font-size:12px;font-weight:700;padding:1px 8px;border-radius:999px;background:#eef3f1;color:#33494c;white-space:nowrap}
.ib-row.lvl-high .ib-badge{background:#fdecea;color:#b3261e}
.ib-row.lvl-mid .ib-badge{background:#fff3d6;color:#8a5a00}
.ib-who{font-size:12px;font-weight:650;padding:1px 8px;border-radius:999px;background:#e7f3ef;color:#216a62;white-space:nowrap}
.ib-who.me{background:#207f80;color:#fff}
.ib-line{margin:2px 0 0;font-size:13px;line-height:1.45;color:#33494c;overflow-wrap:anywhere}
.ib-again{margin:4px 0 0;font-size:12px;line-height:1.45;color:#9a5b0b}
.ib-acts{display:flex;gap:6px;flex-shrink:0}
.ib-acts button{padding:7px 12px;font-size:13px}
.ib-sub{display:flex;align-items:center;gap:8px;padding:7px 16px;background:#f6f9f8;border-top:1px solid #edf2f0;font-size:13px}
.ib-rows>.ib-sub:first-child{border-top:0}
.ib-sub .ib-takeall{margin-left:auto}
.ib-takeall{padding:5px 11px;font-size:12px}
.inbox-empty{background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px;text-align:center}
.inbox-empty strong{font-size:18px}
.inbox-empty p{margin:6px 0 0}
.inbox-done{margin-top:22px}
.inbox-done summary{font-size:14px;font-weight:650;color:#245c57;margin:0 0 10px}
.inbox-done .ib-rows{background:#fff;border:1px solid var(--line);border-radius:14px}
.ib-row.is-done{opacity:.75}
.ib-hint{margin:18px 0 0}
@media(max-width:700px){
 .inbox-head{display:block}
 .ib-levels{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 10px;padding:0 16px 4px;scrollbar-width:none}
 .ib-levels::-webkit-scrollbar{display:none}
 .ib-tools{flex-wrap:wrap}
 .ib-tools .inline-select{flex:1 1 150px;max-width:none}
 .ib-row{flex-direction:column;align-items:stretch;gap:8px}
 .ib-acts button{flex:1}
 .ib-ghead,.ib-row,.ib-sub,.ib-group.single .ib-row{padding-left:12px;padding-right:12px}
 .ib-peek{white-space:normal}
}
/* «Клиенты» */
.crm-search{display:flex;gap:8px;max-width:720px}
.crm-search input{margin:0;flex:1}
.crm-recent-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:22px 0 10px}
.crm-recent-head h3{margin:0;font-size:17px}
.crm-rows{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.crm-row{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;text-align:left;background:#fff;color:#172d31;border:1px solid var(--line);border-radius:12px;padding:12px 16px}
.crm-row:hover{border-color:var(--accent);filter:none}
.crm-row strong{display:block;font-size:15px}
.crm-row small{display:block;color:var(--muted);font-weight:400;margin-top:2px}
.crm-row-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.crm-tag{display:inline-flex;align-items:center;gap:4px;background:#e8f1ee;color:#245c57;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:650}
.crm-tag.task{background:#fff1d6;color:#8a5a00}
.crm-tag.add{border:1px dashed #9fbdb6;background:none;cursor:pointer}
.crm-tag-x{background:none;color:#245c57;padding:0 2px;font-size:14px;line-height:1}
.crm-tag-input{display:inline-block;width:150px;margin:0;padding:5px 10px;font-size:13px;border-radius:999px}
.crm-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.crm-back{padding:6px 0;margin-bottom:10px}
.crm-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px 24px;margin-bottom:18px}
.crm-name{font-size:26px;font-weight:700;letter-spacing:-.6px}
.crm-card-head p{margin:2px 0 0}
.crm-phone{display:flex;flex-direction:column;align-items:flex-end;gap:6px;font-size:16px;font-weight:650;white-space:nowrap}
.crm-phone button{padding:7px 12px;font-size:13px}
.crm-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px;align-items:start}
.crm-col .panel{padding:20px;margin-bottom:18px}
.crm-panel h3{margin:0 0 10px;font-size:17px}
.crm-orders td,.crm-orders th{padding:9px 6px}
.crm-orders td small{display:block;color:#a24b2b;margin:2px 0 0}
.crm-orders .st-ok{color:#257462;font-weight:650}
.crm-orders .st-off{color:var(--muted)}
.crm-orders .st-work{color:#8a5a00;font-weight:650}
.crm-items{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.crm-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--line);border-radius:10px}
.crm-item>div{flex:1;min-width:0}
.crm-item strong{display:block;font-size:14px}
.crm-item small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.crm-item input[type=checkbox]{width:18px;height:18px;margin:0;flex-shrink:0}
.crm-item.late{border-color:#e7b4a6;background:#fff7f4}
.crm-item.done strong{text-decoration:line-through;color:var(--muted)}
.crm-del{padding:4px 8px;font-size:12px}
.crm-form{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}
.crm-form input,.crm-form select{margin:0;padding:9px 12px;font-size:14px}
.crm-form button{justify-self:start;padding:9px 16px}
.crm-task-form{grid-template-columns:150px 1fr auto!important}
.crm-task-form input[name=text]{grid-column:1/-1}
.crm-add summary,.crm-done summary{margin:6px 0 0;font-size:13px;color:#245c57;font-weight:600}
.crm-note-form textarea{margin:0 0 8px}
.crm-note-form button{padding:9px 16px}
.crm-feed{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.crm-note{border-left:3px solid var(--line);padding:2px 0 2px 12px}
.crm-note small{color:var(--muted);font-size:12px}
.crm-note p{margin:2px 0 0;font-size:14px;white-space:pre-wrap}
@media(max-width:900px){
 .crm-grid{grid-template-columns:minmax(0,1fr)}
 .crm-card-head{flex-direction:column}
 .crm-phone{align-items:flex-start}
}
.crm-summary{margin-bottom:18px}
.crm-summary .tile{cursor:default}
.crm-order-row{cursor:pointer}
.crm-order-row:hover td{background:#f6faf8}
.crm-order-row:focus-visible{outline:2px solid var(--accent)}
.crm-lines>td{background:#f6faf8;padding:4px 10px 10px}
.crm-lines table{font-size:13px}
.crm-lines td{padding:7px 6px;border-bottom:1px solid #e3ece9}
.crm-lines td strong{display:block;font-size:13px}
.crm-lines td small{display:block;color:var(--muted);margin:1px 0 0;max-width:none}
.crm-line-st{color:#245c57;white-space:nowrap}
.crm-phone-list{display:flex;flex-direction:column;gap:4px;align-items:flex-end}
.crm-phone-list div{display:flex;align-items:center;gap:6px}
.crm-phone-list a{color:#172d31;text-decoration:none;font-size:17px}
.crm-phone-list a:hover{text-decoration:underline}
.crm-copy{padding:4px 8px;font-size:12px}
.crm-quick{display:flex;gap:6px;flex-wrap:wrap;grid-column:1/-1}
.crm-quick button{background:#eef5f2;color:#245c57;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:600}
.crm-quick button.on{background:#245c57;color:#fff}
.crm-quick.ideas button{background:none;border:1px dashed #9fbdb6}
@media(max-width:900px){.crm-phone-list{align-items:flex-start}}
/* «Заказы»: the funnel */
.fn-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.fn-stats{display:flex;gap:10px;flex-wrap:wrap}
.fn-stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px;min-width:110px}
.fn-stat strong{display:block;font-size:20px;letter-spacing:-.4px}
.fn-stat span{font-size:12px;color:var(--muted)}
.fn-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fn-tools input[type=search]{margin:0;width:220px;padding:9px 12px;font-size:14px}
.fn-tools .check{margin:0}
.fn-tools button{padding:10px 14px}
.fn-board{display:flex;flex-direction:column;gap:18px}
.fn-row-head{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:0 2px 8px}
.fn-row-head h3{margin:0;font-size:17px}
.fn-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.fn-col{background:#eef3f1;border-radius:14px;padding:10px;min-height:120px;scroll-snap-align:start;display:flex;flex-direction:column}
.fn-col.order{background:#f1f1ec}
.fn-col.drop{outline:2px dashed var(--accent);background:#e3f0ec}
.fn-col header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;gap:4px 8px;padding:2px 4px 10px;background:none;border:0}
.fn-col header small{flex-basis:100%;font-size:10px;letter-spacing:1.4px;font-weight:750;color:var(--muted)}
.fn-col header strong{font-size:15px}
.fn-count{background:#fff;border-radius:999px;padding:1px 8px;font-size:12px;font-weight:700;color:#245c57}
.fn-col header .fn-sum{margin-left:auto;font-size:12px;color:var(--muted)}
.fn-list{display:flex;flex-direction:column;gap:8px;flex:1}
.fn-empty{color:var(--muted);font-size:13px;text-align:center;margin:20px 0}
.fn-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:10px 12px;cursor:pointer;font-size:13px}
.fn-card:hover{border-color:var(--accent)}
.fn-card:focus-visible{outline:2px solid var(--accent)}
.fn-card.lead{cursor:grab}
.fn-card.dragging{opacity:.4}
.fn-card.late{border-left:4px solid #e0a630}
.fn-card.bad{border-left:4px solid #c8452f}
.fn-card p{margin:4px 0;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.fn-card small{display:block;color:var(--muted);font-size:12px}
.fn-card .fn-car{color:#245c57}
.fn-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.fn-top strong{font-size:14px}
.fn-src,.fn-top .fn-sum{font-size:11px;color:var(--muted);white-space:nowrap}
.fn-top .fn-sum{font-size:13px;color:#172d31;font-weight:650}
.fn-flags{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}
.fn-flag{font-size:11px;font-weight:650;padding:2px 7px;border-radius:999px;background:#eef3f1;color:#245c57}
.fn-flag.warn{background:#fff1d6;color:#8a5a00}
.fn-flag.bad{background:#fbe3dd;color:#a2361f}
.fn-closed{margin-top:22px}
.fn-closed summary{font-size:14px;font-weight:650;color:#245c57}
.fn-modal{position:fixed;inset:0;background:#10262a66;z-index:20;display:flex;justify-content:flex-end}
.fn-sheet{position:relative;width:min(560px,100%);height:100%;overflow:auto;background:#f6f8f7;padding:24px 24px 40px;box-shadow:-10px 0 40px #0003}
.fn-x{position:absolute;right:14px;top:12px;font-size:24px;line-height:1;padding:4px 10px}
.fn-sheet h3{margin:20px 0 10px;font-size:17px}
.fn-sheet-head p{margin:2px 0 0}
.fn-contact{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0;font-size:16px;font-weight:650}
.fn-contact a{color:#172d31}
.fn-contact button{padding:7px 12px;font-size:13px}
.fn-stages{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}
.fn-stages button{background:#e8f1ee;color:#245c57;padding:8px 14px;border-radius:999px;font-size:13px}
.fn-stages button.on{background:#245c57;color:#fff}
.fn-result{font-weight:650;margin:6px 0 0}
.fn-result.won{color:#257462}
.fn-result.lost{color:#a2361f}
.fn-form{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;margin:10px 0}
.fn-form h3{margin:0 0 12px}
.fn-form label{margin-bottom:12px}
.fn-form input,.fn-form select,.fn-form textarea{padding:9px 12px;font-size:14px;margin-top:5px}
.fn-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fn-closing{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.fn-close{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px}
.fn-close.win{border-color:#b9dccf}
.fn-close strong{display:block;margin-bottom:8px;font-size:14px}
.fn-close .row{flex-wrap:nowrap}
.fn-close input{margin:0;padding:9px 10px;font-size:14px;min-width:0}
.fn-close button{padding:9px 12px;font-size:13px;white-space:nowrap}
.fn-reasons{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px}
.fn-reasons button{background:#f4eeec;color:#7a3a2a;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:600}
/* «Заказы ABCP» (31.10.2026, «Доска»): what is in each order, paid or not, what to do, who took it */
.fo-tools{display:flex;justify-content:space-between;align-items:flex-start;gap:8px 12px;margin:0 0 12px}
.fo-pills{display:flex;gap:6px;flex-wrap:wrap;flex:1 1 auto;min-width:0}
.ib-pill.free .ib-dot{background:#7c8f8c}
.fo-selects{display:flex;gap:8px}
.fo-selects .inline-select{padding:8px 10px;font-size:13px;max-width:240px}
.fo-card{display:flex;flex-direction:column;gap:6px}
.fo-card.lvl-high{border-left:4px solid #c8452f}
.fo-card.lvl-mid{border-left:4px solid #e0a630}
.fo-card.is-mine{box-shadow:inset 0 0 0 1px #207f80}
.fo-card p{margin:0}
.fo-who{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.fo-who strong{font-size:14px;font-weight:650}
.fo-phone{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#33494c;white-space:nowrap}
.fo-phone a{font-weight:650;color:#172d31}
button.fo-show{padding:2px 6px;font-size:12px;color:#1a7674;font-weight:600}
.fo-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px}
.fo-pay{font-size:11px;font-weight:650;padding:2px 8px;border-radius:999px;background:#eef3f1;color:#33494c;white-space:nowrap}
.fo-pay.ok{background:#e1f2e9;color:#1e6b4f}
.fo-pay.part{background:#fff1d6;color:#8a5a00}
.fo-todo{font-size:12px;line-height:1.4;padding:6px 9px;border-radius:8px;background:#f1f5f3;color:#33494c;font-weight:600}
.fo-todo.lvl-high{background:#fbe3dd;color:#a2361f}
.fo-todo.lvl-mid{background:#fff1d6;color:#7a5000}
.fo-todo.lvl-low{background:#e8f1ee;color:#245c57}
.fo-todo.lvl-ok{background:none;padding:0;color:#657775;font-weight:500}
.fo-items{display:flex;flex-direction:column;gap:4px;border-top:1px solid #edf2f0;padding-top:6px}
.fo-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:baseline;padding-left:10px;position:relative}
.fo-item::before{content:'';position:absolute;left:0;top:6px;width:6px;height:6px;border-radius:50%;background:#9bb8b2}
.fo-item.bad::before{background:#c8452f}
.fo-item.warn::before{background:#e0a630}
.fo-item.ok::before{background:#2e9c7c}
.fo-card .fo-item small,.fo-item small{display:block;font-size:11px;color:#657775;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fo-what{min-width:0}
.fo-what strong{font-size:12px;font-weight:650;overflow-wrap:anywhere}
.fo-state{text-align:right;min-width:0}
.fo-st{font-size:12px;font-weight:600;color:#33494c;white-space:nowrap}
.fo-item.bad .fo-st{color:#a2361f}
.fo-item.warn .fo-st{color:#8a5a00}
.fo-item.ok .fo-st{color:#1e6b4f}
.fo-card .fo-more{font-size:11px;color:#657775;padding-left:10px}
.fo-card button.fo-more{align-self:flex-start;padding:2px 10px;font-size:12px;font-weight:600;color:#1a7674}
button.fo-lead{display:block;width:100%;text-align:left;background:#f1f6f4;color:#245c57;padding:5px 9px;border-radius:8px;font-size:12px;font-weight:500;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fo-lead-k{font-weight:700;color:#207f80}
.fo-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.fo-acts button{padding:6px 11px;font-size:12px}
.fo-now{margin:6px 0 0;padding:8px 10px;border-radius:10px;background:#eef3f1;color:#33494c;font-size:13px;line-height:1.45}
.fo-now.lvl-high{background:#fbe3dd;color:#a2361f}
.fo-now.lvl-mid{background:#fff1d6;color:#7a5000}
@media(max-width:900px){
 .fn-cols{grid-template-columns:repeat(3,82vw);overflow-x:auto;margin:0 -16px;padding:0 16px 10px;scroll-snap-type:x proximity}
 .fn-tools input[type=search]{width:100%}
 .fn-closing,.fn-two{grid-template-columns:1fr}
 .fn-sheet{padding:20px 16px 40px}
 .fo-tools{flex-wrap:wrap}
 .fo-pills{flex:none;flex-wrap:nowrap;overflow-x:auto;margin:0 -16px;padding:0 16px 4px;scrollbar-width:none;width:calc(100% + 32px)}
 .fo-pills::-webkit-scrollbar{display:none}
 .fo-selects{width:100%}
 .fo-selects .inline-select{flex:1 1 140px;max-width:none}
}
/* «Сообщения» */
.ch-wrap{display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;height:calc(100vh - 210px);min-height:480px}
.ch-list{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.ch-list input{margin:10px;width:auto;padding:9px 12px;font-size:14px}
#chItems{overflow:auto;flex:1}
#chItems>p{padding:0 14px}
.ch-item{display:block;width:100%;text-align:left;background:none;color:#172d31;border-radius:0;border-top:1px solid var(--line);padding:10px 14px;font-weight:400}
.ch-item:hover{background:#f4f8f6;filter:none}
.ch-item.on{background:#e8f1ee}
.ch-top,.ch-bottom{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.ch-top strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-top small{color:var(--muted);font-size:11px;white-space:nowrap}
.ch-last{font-size:13px;color:#4b6063;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-item.unread .ch-last{color:#172d31;font-weight:600}
.ch-badge{background:#c8452f;color:#fff;border-radius:999px;font-size:11px;font-weight:700;padding:1px 7px}
.ch-meta{display:flex;gap:6px;margin-top:4px;font-size:11px;color:var(--muted)}
.ch-chan{font-weight:700}
.ch-chan.tg{color:#2a8bc4}
.ch-chan.max{color:#7046c9}
.ch-thread{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;min-width:0}
.ch-empty{margin:auto;max-width:420px;text-align:center;padding:24px}
.ch-head{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.ch-head>div:first-of-type{flex:1;min-width:0}
.ch-head strong{display:block;font-size:16px}
.ch-head small{color:var(--muted);font-size:12px}
.ch-acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.ch-acts button{padding:8px 12px;font-size:13px}
.ch-back{display:none;padding:4px 10px;font-size:18px}
.ch-messages{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:8px;background:#f6f8f7}
.ch-msg{max-width:72%;padding:9px 12px;border-radius:14px;background:#fff;border:1px solid var(--line);align-self:flex-start}
.ch-msg.out{align-self:flex-end;background:#dff0e9;border-color:#c5e3d6}
.ch-msg.auto{align-self:flex-end;background:#f1f1ec;border-style:dashed;color:#5a6b6d}
.ch-msg.failed{border-color:#e7b4a6;background:#fff4f1}
.ch-msg p{margin:0;font-size:14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.ch-msg small{display:block;margin-top:4px;font-size:11px;color:var(--muted)}
.ch-photo{display:block;max-width:260px;max-height:260px;border-radius:10px;margin-bottom:6px;cursor:zoom-in;background:#eef3f1;min-width:80px;min-height:60px}
.ch-nophoto{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.ch-form{border-top:1px solid var(--line);padding:10px 12px;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
.ch-form .crm-quick{grid-column:1/-1}
.ch-form textarea{margin:0;padding:10px 12px;font-size:14px;resize:none}
.ch-form button{padding:11px 16px}
.ch-form>p{grid-column:1/-1;margin:4px}
@media(max-width:900px){
 .ch-wrap{grid-template-columns:minmax(0,1fr);height:calc(100vh - 170px)}
 .ch-wrap .ch-thread{display:none}
 .ch-wrap.reading .ch-list{display:none}
 .ch-wrap.reading .ch-thread{display:flex}
 .ch-back{display:inline-block}
 .ch-msg{max-width:88%}
 .ch-head{flex-wrap:wrap}
}
.ch-form .crm-quick{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.ch-form .crm-quick button{white-space:nowrap;flex-shrink:0}
.ch-sources{display:flex;gap:8px 18px;flex-wrap:wrap;margin:-6px 0 12px;font-size:13px}
.ch-source strong{font-weight:650}
.ch-source.ok strong{color:#257462}
.ch-source.off{color:var(--muted)}
.ch-file{display:block;padding:6px 0;font-size:13px;color:#245c57}
.ch-media{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin-bottom:6px}
.ch-media .ch-nophoto{flex-basis:100%;margin:0}
.ch-media a.ch-file{display:inline-block;text-decoration:none}
.ch-video{display:block;width:320px;max-width:100%;max-height:420px;border-radius:10px;background:#000}
.ch-audio{display:block;width:280px;max-width:100%}
/* «Как в мессенджере» (09.11.2026): days, the unread line, «↓ Новые сообщения», answers being sent, the photo viewer */
.ch-body{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.ch-day{align-self:center;margin:6px 0 2px;padding:3px 12px;border-radius:999px;background:#e6ecea;color:#4b6063;font-size:12px;font-weight:600}
.ch-unread-line{display:flex;align-items:center;gap:10px;color:#b4442f;font-size:12px;font-weight:650;margin:4px 0}
.ch-unread-line::before,.ch-unread-line::after{content:"";flex:1;height:1px;background:#e7b4a6}
.ch-msg.cont{margin-top:-5px}
.ch-msg.pending{opacity:.72}
.ch-msg .ch-time{text-align:right}
.ch-msg.in .ch-time{text-align:left}
.ch-fail{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:6px;font-size:12px;color:#a33d29}
.ch-fail .ch-retry{padding:4px 10px;font-size:12px}
.ch-more{align-self:center;padding:6px 14px;font-size:13px}
.ch-pill{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);padding:7px 14px;border-radius:999px;font-size:13px;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.ch-pill[hidden]{display:none}
.ch-notice-hint{display:inline-flex;gap:6px;align-items:center}
.ch-notice-hint button{padding:3px 10px;font-size:12px}
.chv{position:fixed;inset:0;z-index:1000;background:rgba(10,16,18,.92);display:flex;align-items:center;justify-content:center}
.chv-img{max-width:calc(100vw - 120px);max-height:calc(100vh - 110px);object-fit:contain;border-radius:6px;background:rgba(255,255,255,.04);min-width:60px;min-height:60px}
.chv button{position:absolute;background:rgba(255,255,255,.14);color:#fff;border:0;border-radius:999px;width:46px;height:46px;padding:0;font-size:24px;line-height:46px;cursor:pointer}
.chv button:hover{background:rgba(255,255,255,.26);filter:none}
.chv-prev{left:18px;top:50%;transform:translateY(-50%)}
.chv-next{right:18px;top:50%;transform:translateY(-50%)}
.chv.single .chv-nav{display:none}
.chv-close{top:16px;right:18px;font-size:18px}
.chv-bar{position:absolute;left:0;right:0;bottom:16px;display:flex;justify-content:center;gap:18px;color:rgba(255,255,255,.85);font-size:14px}
.chv-save{color:#fff;text-decoration:none}
.chv-save[hidden]{display:none}
@media(max-width:700px){.chv-img{max-width:100vw;max-height:calc(100vh - 140px);border-radius:0}.chv-prev,.chv-next{top:auto;bottom:56px;transform:none}}
/* Этап 2 (09.11.2026): files to the client, quoting a message, how far an answer got */
.ch-form.can-attach{grid-template-columns:auto minmax(0,1fr) auto}
.ch-form .ch-extras{grid-column:1/-1;display:flex;flex-direction:column;gap:6px}
.ch-form .ch-extras[hidden]{display:none}
.ch-form .ch-clip{padding:9px 11px;font-size:18px;line-height:1}
.ch-replying{display:flex;align-items:center;gap:10px;padding:6px 8px 6px 12px;border-left:3px solid var(--accent);background:#f1f6f4;border-radius:8px}
.ch-replying>div{flex:1;min-width:0}
.ch-replying small{display:block;font-size:11px;font-weight:650;color:#245c57}
.ch-replying span{display:block;font-size:13px;color:#4b6063;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-form .ch-replying button,.ch-form .ch-attach-item button{padding:4px 9px;font-size:13px}
.ch-attach{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.ch-attach-item{display:flex;align-items:center;gap:8px;flex-shrink:0;max-width:260px;padding:5px 6px 5px 5px;border:1px solid var(--line);border-radius:10px;background:#fff}
.ch-attach-item img{width:44px;height:44px;object-fit:cover;border-radius:7px;background:#eef3f1}
.ch-attach-icon{width:44px;height:44px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:7px;background:#eef3f1;font-size:20px}
.ch-attach-item>div{min-width:0}
.ch-attach-item>div>span{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}
.ch-attach-item small{font-size:11px;color:var(--muted)}
.ch-form .ch-attach-note{margin:0;font-size:12px}
.ch-msg{position:relative}
.ch-messages{overflow-x:hidden}
.ch-quote{display:block;width:100%;text-align:left;margin:0 0 6px;padding:4px 8px;border:0;border-left:3px solid var(--accent);border-radius:6px;background:rgba(128,128,128,.13);color:inherit;font-weight:400;cursor:pointer}
.ch-quote:hover{filter:none;background:rgba(128,128,128,.2)}
.ch-quote small{display:block;margin:0;font-size:11px;font-weight:650;color:inherit;opacity:.85}
.ch-quote span{display:block;font-size:13px;color:inherit;opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:420px}
.ch-ticks{margin-left:2px;letter-spacing:-2px}
.ch-msg.out .ch-file{color:inherit}
.ch-ticks.read{color:#2a8bc4;font-weight:700}
/* 16.11.2026: the latest answer says in words how far it got; the list marks the chats where the client read it and is silent */
.ch-state{margin-left:5px}
.ch-state.read{color:#2a8bc4;font-weight:650}
.ch-meta{flex-wrap:wrap;row-gap:0}
.ch-meta>span{white-space:nowrap}
.ch-meta .ch-seen.read{color:#2a8bc4;font-weight:650}
/* Этап 3: ↩ ✎ 🗑 beside a message (hover; on a phone — tap the message), the voice recording, the clients' pictures */
/* 14.11.2026: the buttons used to vanish on the way to them — a 6 px gap between the message and them dropped the hover.
   Now they touch the message (the gap is their own transparent padding) and stay 0.4 s after the pointer leaves. */
.ch-tools{position:absolute;top:50%;transform:translateY(-50%);display:flex;gap:4px;opacity:0;visibility:hidden;transition:opacity .15s,visibility 0s linear .4s;z-index:2}
.ch-msg.in .ch-tools{left:100%;padding-left:8px}
.ch-msg.out .ch-tools{right:100%;padding-right:8px}
.ch-msg:hover .ch-tools,.ch-msg.tools-on .ch-tools,.ch-tools:focus-within{opacity:1;visibility:visible;transition-delay:0s}
.ch-tool{width:28px;height:28px;padding:0;border-radius:999px;border:1px solid var(--line);background:#fff;color:#245c57;font-size:13px;line-height:26px;font-weight:400}
.ch-tool:hover{filter:none;background:#eef6f3}
.ch-tool.danger:hover{background:#fff1ee;border-color:#e7b4a6}
@media(hover:none){.ch-msg:hover .ch-tools{opacity:0;visibility:hidden}.ch-msg.tools-on .ch-tools{opacity:1;visibility:visible}}
@media(max-width:900px){.ch-msg .ch-tools{top:auto;bottom:100%;transform:none;padding:0 0 4px}.ch-msg.in .ch-tools{left:4px}.ch-msg.out .ch-tools{right:4px}.ch-tool{width:34px;height:34px;line-height:32px;font-size:15px}}
.ch-side{display:flex;gap:2px;align-items:flex-end}
.ch-form.recording .ch-mic{background:#fbe3dd;color:#b4442f}
.ch-rec{display:flex;align-items:center;gap:10px;padding:6px 8px 6px 12px;border-radius:8px;background:#fff4f1;border:1px solid #f0cfc6}
.ch-rec>div{flex:1;min-width:0;font-size:14px}
.ch-rec-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#d0402a;margin-right:8px;vertical-align:middle;animation:ch-rec 1s ease-in-out infinite alternate}
.ch-rec-time{font-variant-numeric:tabular-nums}
.ch-form .ch-rec button{padding:6px 12px;font-size:13px}
@keyframes ch-rec{to{opacity:.25}}
.ch-editing{border-left-color:#e0a630}
.ch-msg.gone p{font-style:italic;opacity:.65}
.ch-send-icon{display:none}
@media(max-width:700px){.ch-form .ch-send{padding:11px 14px}.ch-send-word{display:none}.ch-send-icon{display:inline}.ch-form .ch-clip{padding:9px 7px}}
.ch-item.has-ava{display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;align-items:center}
.ch-item-text{min-width:0}
.ch-ava{width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;color:#fff;font-size:14px;font-weight:650;letter-spacing:.3px;background:#5b8a83}
.ch-ava img{width:100%;height:100%;object-fit:cover;display:block}
.ch-head .ch-head-ava{width:36px;height:36px;font-size:13px}
.ch-msg.flash{animation:ch-flash 1.4s ease-out}
@keyframes ch-flash{0%,30%{box-shadow:0 0 0 3px rgba(42,139,196,.55)}100%{box-shadow:0 0 0 3px rgba(42,139,196,0)}}
#chThread.ch-drop .ch-body{outline:2px dashed var(--accent);outline-offset:-8px}
#chThread.ch-drop .ch-body::after{content:"Отпустите — файл прикрепится к ответу";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:10px 16px;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.15);font-size:14px;font-weight:600;color:#245c57;pointer-events:none}
.crm-car-form{grid-template-columns:1fr}
.crm-vin{display:flex;gap:8px}
.crm-vin input{flex:1;font-family:ui-monospace,Menlo,monospace;letter-spacing:.5px;text-transform:uppercase}
.crm-vin button{padding:9px 12px;white-space:nowrap}
.crm-vin-out{margin:0;color:#245c57}
.crm-car-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.crm-car-grid label{margin:0;font-size:12px;color:var(--muted)}
.crm-car-grid select,.crm-car-grid input{margin-top:4px}
@media(max-width:700px){.crm-car-grid{grid-template-columns:1fr}}
/* «Главная» → «Сегодня в работе» */
.desk{margin-bottom:22px}
.desk-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.desk-tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:#fff;color:#172d31;border:1px solid var(--line);border-left:5px solid #8fb8b0;border-radius:14px;padding:14px 16px;font-weight:400;cursor:pointer}
.desk-tile:hover{border-color:var(--accent);filter:none}
.desk-tile.warn{border-left-color:#e0a630;background:#fffcf3}
.desk-tile.calm{border-left-color:var(--line)}
.desk-tile small{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:var(--muted);font-weight:700}
.desk-tile strong{font-size:28px;letter-spacing:-.6px;margin:4px 0 2px}
.desk-tile span{font-size:12px;color:var(--muted);line-height:1.35}
/* «Аналитика» */
.st-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.st-head p{margin:0}
.st-panel h3{font-size:15px;margin:18px 0 10px}
.st-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.st-bars{display:flex;flex-direction:column;gap:8px}
.st-bar{display:grid;grid-template-columns:150px 1fr 60px;align-items:center;gap:10px;font-size:13px}
.st-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-track{background:#eef3f1;border-radius:6px;height:12px;overflow:hidden}
.st-fill{background:var(--accent);height:100%;border-radius:6px}
.st-value{text-align:right;font-weight:650}
.st-note{grid-column:1/-1;color:var(--muted);font-size:11px;margin-top:-4px}
.st-chart{display:flex;align-items:flex-end;gap:3px;height:170px;padding:8px 0;overflow-x:auto}
.st-col{flex:1;min-width:10px;display:flex;flex-direction:column;align-items:center;gap:3px;height:100%}
.st-colwrap{flex:1;width:100%;position:relative;display:flex;align-items:flex-end}
.st-colbar{width:100%;background:#cfe3dd;border-radius:4px 4px 0 0;min-height:1px}
.st-colm{position:absolute;left:0;right:0;bottom:0;background:var(--accent);border-radius:4px 4px 0 0;min-height:0}
.st-col small{font-size:10px;color:var(--muted)}
.st-table td,.st-table th{padding:9px 8px}
@media(max-width:800px){.st-grid{grid-template-columns:1fr}.st-bar{grid-template-columns:110px 1fr 50px}}
/* «Клиенты» → «Сегменты» */
.crm-seg{margin:18px 0 6px;padding:20px}
.crm-seg h3{margin:0 0 12px;font-size:17px}
.seg-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:12px 0}
.seg-form label{margin:0;font-size:12px;color:var(--muted)}
.seg-form input,.seg-form select{margin-top:4px;padding:8px 10px;font-size:14px;width:150px}
.seg-form .check input{width:18px}
.seg-form button{padding:9px 14px}
.seg-form .fine{flex-basis:100%;margin:0}
.seg-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:baseline;margin:8px 0}
.seg-bulk{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#f6faf8;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0}
.seg-bulk strong{font-size:13px}
.seg-bulk input[name=text]{flex:1;min-width:220px;margin:0;padding:8px 10px;font-size:14px}
.seg-bulk input[type=date],.seg-bulk select{width:auto;margin:0;padding:8px 10px;font-size:14px}
.seg-bulk button{padding:9px 14px}
.seg-result .crm-rows{max-height:520px;overflow:auto}
.seg-auto{margin-top:14px}
.seg-auto summary{font-size:14px;font-weight:650;color:#245c57}
/* Quick actions */
.nav-found-group{margin:8px 10px 2px!important;font-size:10px!important;letter-spacing:1.2px;text-transform:uppercase;font-weight:750;color:var(--muted)}
.fab-wrap{position:fixed;right:24px;bottom:24px;z-index:15;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.fab{width:56px;height:56px;border-radius:50%;font-size:28px;line-height:1;padding:0;box-shadow:0 8px 24px #10262a40}
.fab-menu{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:6px;box-shadow:0 10px 30px #0002;min-width:210px}
.fab-menu button{background:none;color:#172d31;text-align:left;padding:10px 12px;border-radius:9px;font-size:14px}
.fab-menu button:hover{background:#eef5f2;filter:none}
.ch-edit{background:none!important;color:var(--muted)!important;border:none!important}
.ch-replies{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;padding:8px 0}
.ch-replies textarea{margin:0;font-size:14px}
.ch-replies button{align-self:flex-start}
@media(max-width:900px){.fab-wrap{right:16px;bottom:16px}}
/* The light / dark switch in the header */
.theme-btn{width:36px;height:36px;padding:0;border-radius:50%;background:none;border:1px solid var(--line);color:#245c57;font-size:17px;line-height:1;flex-shrink:0}
.theme-btn:hover{background:#eef5f2;filter:none}
/* Telegram / Max badges (crm.js → Chan) */
.chan{display:inline-flex;align-items:center;gap:4px;font-weight:650;white-space:nowrap}
.chan.telegram{color:#1f86bf}
.chan.max{color:#6a46d6}
.chan-ico{display:inline-flex;width:15px;height:15px;flex-shrink:0}
.chan-ico svg{display:block;width:100%;height:100%}
.ch-source .chan-ico,.ch-head .chan-ico{width:16px;height:16px}
.ch-source strong{display:inline-flex;align-items:center;gap:5px}
/* «Переписка» in the client's card; «Привязать к клиенту» in a chat */
.crm-talk+.crm-talk{margin-top:16px}
.crm-talk-head{display:flex;align-items:center;gap:10px}
.crm-talk-head small{color:var(--muted);font-size:12px}
.crm-talk-head button{margin-left:auto;padding:6px 10px;font-size:13px}
.crm-talk-more{display:block;margin:6px auto 0;padding:4px 10px;font-size:12px}
.crm-talk-msgs{flex:none;max-height:380px;margin-top:8px;border:1px solid var(--line);border-radius:12px;padding:12px}
.ch-link{padding:12px 16px;border-bottom:1px solid var(--line);background:#f6f8f7}
.ch-link .crm-search{display:flex;gap:8px}
.ch-link .crm-search input{margin:0}
.ch-link>.quiet{margin-top:8px}
.ch-relink{padding:6px 9px}
/* «Сменить пароль» in the profile menu (shell.js) */
.prof-menu button.prof-link{width:100%;text-align:left;background:none;font-weight:400}
.prof-menu button.prof-link:hover{background:#eef5f2;filter:none}
.pw-modal{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:#10262a66}
.pw-sheet{width:min(380px,100%);background:#fff;border-radius:16px;padding:22px;box-shadow:0 20px 60px #0003}
.pw-sheet h2{font-size:19px;margin:0 0 14px}
.pw-sheet label{margin-bottom:12px}
.pw-sheet button{margin:4px 8px 0 0}
.pw-msg{font-size:13px;line-height:1.45;margin:2px 0 8px}
.pw-msg:empty{display:none}
.pw-msg.bad{color:#b23b25}
.pw-msg.ok{color:#257462}
/* a form being sent (admin.js run): the pressed button dims, a second press is ignored */
button.is-busy{opacity:.6;cursor:progress}
/* «Закупки» (28.10.2026) */
.rs-parts{margin-bottom:14px}
.subnav .rs-count{display:inline-block;margin-left:6px;font-size:12px;opacity:.75}
.rs-art strong{display:block;font-weight:600}
.rs-art small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.rs-pair{display:flex;align-items:center;gap:6px;white-space:nowrap}
.rs-limits small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.rs-num{width:64px;margin:0;padding:6px 8px}
.rs-actions{display:flex;gap:6px;flex-wrap:wrap}
.rs-actions button,.st-table td>button{padding:6px 10px;margin:0;white-space:nowrap}
.rs-low{color:#c8452f}
.rs-bad td{color:#c8452f}
.rs-total td{font-weight:650}
.rs-copy{margin-top:10px;font-family:inherit}
.rs-ordered td{opacity:.6}.rs-ordered td:last-child{opacity:1}
.rs-done{display:flex;flex-direction:column;gap:2px;font-size:12px}.rs-done small{color:var(--muted)}
.rs-mark,.rs-undo{white-space:nowrap}.rs-undo{padding:4px 0!important;align-self:flex-start}
.rs-add{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) auto;gap:8px;align-items:end}
.rs-add label{margin:0}
.rs-add input{margin:4px 0 0}
.rs-hidden{margin-top:18px}
.rs-hidden summary{cursor:pointer;color:var(--muted)}
@media(max-width:900px){.rs-add{grid-template-columns:1fr 1fr}}
/* «RFM-анализ» (28.10.2026) */
.rfm-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin:12px 0 18px}
.rfm-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;background:#fff;color:#172d31;border:1px solid #dfe8e5;border-radius:14px;padding:14px 16px;font:inherit;cursor:pointer;box-shadow:none}
.rfm-card:hover{border-color:#9cc3bd}
.rfm-card.on{border-color:#245c57;box-shadow:0 0 0 1px #245c57}
.rfm-card .rfm-name{font-weight:650;font-size:14px}
.rfm-card strong{font-size:24px;letter-spacing:-.4px}
.rfm-card .rfm-share{font-size:13px;color:#245c57}
.rfm-card small{color:var(--muted);font-size:12px;line-height:1.35}
.rfm-card.rfm-cant_lose .rfm-name,.rfm-card.rfm-at_risk .rfm-name{color:#c8452f}
.rfm-grid th,.rfm-grid td{text-align:center;padding:9px 6px;white-space:nowrap}
.rfm-grid th:first-child{text-align:left}
.rfm-l1{background:#eef6f4}
.rfm-l2{background:#d6ebe6}
.rfm-l3{background:#b5d9d1}
.rfm-l4{background:#8cc3b8;font-weight:650}
.rfm-score{font-variant-numeric:tabular-nums;white-space:nowrap}
/* «RFM-анализ»: комментарий к клиенту и «не писать» прямо в строке (16.11.2026) */
.rfm-item-line{display:flex;gap:8px;align-items:stretch}
.rfm-item-line .crm-row{flex:1;min-width:0}
.rfm-item-line .crm-row>div:first-child{min-width:0}
.rfm-note-btn{flex:none;width:46px;padding:0;background:#fff;border:1px solid var(--line);border-radius:12px;font-size:18px;filter:grayscale(1);opacity:.55}
.rfm-note-btn:hover,.rfm-note-btn.on{border-color:var(--accent);opacity:1;filter:none}
.rfm-note-btn.has{background:#e8f1ee;opacity:1;filter:none}
.rfm-item.no-write .crm-row{border-color:#e9c1b8;background:#fdf6f4}
.crm-tag.no-write{background:#fde3dd;color:#a3341f}
.rfm-card .rfm-card-quiet{color:#a3341f}
.crm-row small.rfm-comment{display:flex;gap:6px;align-items:baseline;min-width:0;margin-top:6px;color:#172d31}
.rfm-comment-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.rfm-comment-by{flex:none;color:var(--muted);font-size:12px}
.rfm-note-edit{display:flex;flex-direction:column;gap:10px;margin:6px 0 4px 18px;padding:12px 14px;background:#f6faf8;border:1px solid var(--line);border-radius:12px}
.rfm-note-edit .check{margin:0;font-size:14px;font-weight:650;cursor:pointer}
.rfm-note-edit>.fine{margin:-6px 0 0}
.rfm-notes{display:flex;flex-direction:column;gap:8px}
.rfm-note-acts{display:flex;gap:4px;margin-top:2px}
.rfm-note-form textarea{margin:0 0 8px;min-height:64px}
.rfm-note-buttons{display:flex;flex-wrap:wrap;gap:8px}
.rfm-note-buttons button{padding:9px 14px}
.rfm-hide{margin:2px 0 6px;font-size:14px;cursor:pointer}
.rfm-hide-count{font-size:12px;color:var(--muted)}
@media(max-width:640px){.rfm-note-edit{margin-left:0}.rfm-item-line .crm-row{flex-wrap:wrap;padding:10px 12px}.rfm-item-line .crm-row-tags{justify-content:flex-start}.rfm-note-btn{width:42px}
 .crm-row small.rfm-comment{display:block}.rfm-comment-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}.rfm-comment-by{display:block;margin-top:2px}}
/* «Аналитика» as the owner's dashboard (29.10.2026): parts, conclusions, one shipment, the tooltip */
.bz-parts{margin-bottom:14px}
.st-head select{width:auto;margin:0;padding:8px 12px;font-size:14px}
.bz-tiles{grid-template-columns:repeat(4,1fr)}
.tile.bz-warn{border-color:#e7cb86;background:#fffaf0}.tile.bz-bad{border-color:#e3a093;background:#fff5f2}
.bz-notes{display:flex;flex-direction:column;gap:8px}
.bz-note{display:flex;gap:10px;align-items:flex-start;margin:0;padding:10px 14px;border-radius:12px;background:#f6f9f8;line-height:1.5;font-size:14px}
.bz-note b{flex:none;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;background:#dbe5e2;color:#172d31}
.bz-note.bz-good b{background:#cfe9dd;color:#17574f}.bz-note.bz-warn b{background:#f6e2b0;color:#6b4a00}.bz-note.bz-bad b{background:#f4c9c0;color:#8a1c12}
.bz-tip{position:fixed;z-index:50;pointer-events:none;background:#172d31;color:#fff;border:1px solid #ffffff33;border-radius:10px;padding:8px 11px;font-size:12px;line-height:1.5;box-shadow:0 6px 20px #0003;max-width:260px}
.bz-tip strong,.bz-tip span{display:block}
.bz-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:0 0 6px}
.bz-legend span{display:inline-flex;align-items:center;gap:6px}.bz-legend i{display:inline-block;width:12px;height:12px;border-radius:3px}
.bz-sw-sold{background:#cfe3dd}.bz-sw-margin{background:var(--accent)}
.st-col{cursor:default}.st-col:hover .st-colbar{filter:brightness(.93)}
.bz-strip{display:flex;gap:2px;height:44px;margin:12px 0 18px;border-radius:8px;overflow:hidden}
.bz-seg{display:flex;align-items:center;padding:0 10px;min-width:0;color:#fff;font-size:12px;font-weight:650;white-space:nowrap}
.bz-seg span{overflow:hidden;text-overflow:ellipsis}
.bz-goods{background:#2a78d6}.bz-costs{background:#eb6834}.bz-profit{background:#1baf7a}
.bz-legend .bz-goods,.bz-legend .bz-costs,.bz-legend .bz-profit{display:inline-block}
.bz-unit td:nth-child(n+2),.bz-unit th:nth-child(n+2){text-align:right;white-space:nowrap}
.bz-unit tr:last-child td{font-weight:700}
.bz-calc{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:6px}
.bz-colstack{flex-direction:column;justify-content:flex-end;gap:2px}
.bz-ret,.bz-new{width:100%;min-height:0}.bz-ret{background:#2a78d6;border-radius:0 0 4px 4px}.bz-new{background:#eb6834;border-radius:4px 4px 0 0}
.bz-sw-ret{background:#2a78d6}.bz-sw-new{background:#eb6834}
.bz-staff td{white-space:nowrap}.bz-staff td:first-child{white-space:normal;min-width:160px;font-weight:650}
.bz-costs-form h3{margin:22px 0 4px}.bz-costs-form h3:first-child{margin-top:0}
.bz-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px 16px;margin-top:10px}
.bz-extra{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.bz-extra-row{display:grid;grid-template-columns:2fr 1fr auto;gap:8px;align-items:center}.bz-extra-row input{margin:0}
.bz-costs-form>button{margin:8px 8px 0 0}
@media(max-width:900px){.bz-tiles{grid-template-columns:1fr 1fr}.bz-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.bz-calc,.bz-grid{grid-template-columns:1fr}.bz-tiles{grid-template-columns:1fr}.bz-seg{font-size:0;padding:0}}
.st-panel .st-bar{grid-template-columns:150px 1fr 104px}
@media(max-width:800px){.st-panel .st-bar{grid-template-columns:96px 1fr 88px}}
/* «Сейф» (29.10.2026) */
.safe-move{display:grid;grid-template-columns:1.6fr .8fr 1.3fr 2fr 1fr auto;gap:12px;align-items:end}
.safe-move label{margin:0}.safe-move button{white-space:nowrap}
.candidate-form.safe-form{grid-template-columns:minmax(200px,340px) auto;justify-content:start}
.safe-rows td{white-space:nowrap}.safe-rows td:nth-child(6){white-space:normal;min-width:180px}
.safe-rows tr.safe-diff td{background:#fff6e5}
@media(max-width:900px){.safe-move{grid-template-columns:1fr 1fr}.safe-move button{grid-column:1/-1}}
@media(max-width:560px){.safe-move,.candidate-form.safe-form{grid-template-columns:1fr}}
/* «ABCP ↗»: the order straight in the ABCP cabinet (31.10.2026) */
.abcp-link{font-size:12px;font-weight:600;color:#1a7674;text-decoration:none;white-space:nowrap;padding:2px 6px;border-radius:6px}
.abcp-link:hover{text-decoration:underline;background:#e8f1ee}
.ib-abcp{align-self:center;padding:8px 10px}

/* «Аналитика» → «Сайт» (01.11.2026): visitors by day stacked by source; colours come from stats.js (a validated palette) */
.ss-chart{display:flex;align-items:flex-end;gap:3px;height:220px;padding:20px 0 4px;overflow-x:auto}
.ss-col{flex:1;min-width:9px;display:flex;flex-direction:column;align-items:center;gap:3px;height:100%;cursor:pointer;border-radius:5px}
.ss-col:hover .ss-stack,.ss-col:focus-visible .ss-stack{filter:brightness(.92)}
.ss-col.on{outline:2px solid var(--accent);outline-offset:2px}
.ss-col.partial .ss-seg{opacity:.45}
.ss-stack{flex:1;width:100%;position:relative;display:flex;flex-direction:column-reverse}
.ss-seg{width:100%;min-height:0}
.ss-seg+.ss-seg{margin-bottom:2px}
.ss-stack .ss-seg:last-of-type{border-radius:4px 4px 0 0}
.ss-mark{position:absolute;left:0;right:0;margin-bottom:3px;text-align:center;font-size:11px;line-height:1;color:var(--text)}
.ss-col small{font-size:10px;color:var(--muted);height:12px;line-height:12px}
.ss-ev{width:6px;height:6px;border-radius:50%;background:var(--muted)}
.ss-ev.none{visibility:hidden}
.ss-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--muted);margin:2px 0 6px}
.ss-legend i,.ss-sw{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.ss-head{font-size:15px;line-height:1.5;margin:4px 0 6px;font-weight:600}
.ss-events{margin:4px 0 10px 18px;padding:0;font-size:13px}
#ssDay h4{margin:16px 0 6px;font-size:14px}
/* the bonus card's status in the client's card (02.11.2026) */
.crm-level{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:2px 0 8px;font-size:14px}.crm-level small{font-size:13px}.crm-level select{width:auto;max-width:100%;margin:0}.crm-level-note{flex-basis:100%;margin:0}
.bz-svc{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-bottom:14px}
.bz-svc-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.bz-svc-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}
.bz-svc-head strong{font-size:15px}
.bz-svc-head small{color:var(--muted);font-size:12px;white-space:nowrap}
.bz-svc-row{display:flex;justify-content:space-between;gap:12px;font-size:14px;line-height:1.75}
.bz-svc-row span{color:var(--muted)}
.bz-svc-row b{font-weight:600;white-space:nowrap}
.bz-svc-inc{background:#e6f4ea;border-radius:10px;padding:8px 12px;margin:8px 0}
.bz-svc-inc .bz-svc-row span,.bz-svc-inc .bz-svc-row b,.bz-svc-inc small{color:#1e6b3a}
.bz-svc-inc .bz-svc-row b{font-size:18px}
.bz-svc-inc small{display:block;font-size:12px}
.bz-svc-sum{border-top:1px solid var(--line);margin-top:6px;padding-top:6px}
.bz-svc-sum span{color:inherit;font-weight:600}
.bz-svc-own{border-top:1px dashed var(--line);margin-top:10px;padding-top:8px}
.bz-svc-own>small{display:block;font-size:11px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}
.bz-svc-own .fine{margin:6px 0 0}
.fn-notclient{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-4px 0 8px}
.fn-notclient small{margin:0}
