/* Section «Клиенты»: styles carried over from clients.html (the accepted spec), prefixed cl- to stay section-local. */

/* board main value */
.hd .cl-big{font:700 26px/1.1 var(--font-d);letter-spacing:-.01em;margin-top:6px}
.cl-pad{height:96px;flex:none}
.cl-note{margin:0}
.cl-hint{margin:6px 0 0}
.cl-full{flex:none;width:100%}
.cl-self{align-self:flex-start}
.cl-h20{font-size:20px!important}
.cl-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cl-opt{text-transform:none;letter-spacing:0;font-weight:500;color:var(--ink-3);margin-left:4px}
.cl-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.cl-chips .chip{min-height:44px;min-width:44px;justify-content:center}
.btn.cl-sm{flex:none;min-height:44px;font-size:15px;padding:0 14px}
.cl-lnk{border:0;background:none;color:var(--ink);font:600 15px/1 var(--font);text-decoration:underline;text-underline-offset:3px;min-height:44px;padding:0 4px;cursor:pointer;flex:none}
.cl-hchip{min-height:44px;flex:none}
.cl-shd h4{font-size:16px;display:flex;align-items:baseline;gap:8px;margin:4px 2px -4px}
.cl-shd h4 small{font:500 13px/1.2 var(--font);color:var(--ink-3)}
.cl-dayl{margin:0 2px;font-size:14px;color:var(--ink-2);padding-right:76px}
.cl-nores{margin:0 2px}

/* «Ждут вас»: reason + one action per row */
.cl-wl .cl-wrow{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:60px;padding:4px 0;border-top:1px solid var(--line)}
.cl-wl h4+.cl-wrow,.cl-wl .cl-calm+.cl-wrow{border-top:0;padding-top:0}
.cl-wtx{all:unset;cursor:pointer;min-width:0;min-height:44px;display:flex;flex-direction:column;justify-content:center}
.cl-wtx:focus-visible,.cl-wact:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:8px}
.cl-wtx b{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cl-wtx span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.5px;line-height:1.3;color:var(--attn-ink)}
.cl-wrow.quiet .cl-wtx span{color:var(--ink-3)}
.cl-wact{border:0;background:none;min-height:44px;padding:0 4px 0 8px;font:600 15px/1 var(--font);color:var(--ink);cursor:pointer;white-space:nowrap}
.cl-wact:active{opacity:.6}
.cl-ic2{width:36px;height:36px;border-radius:12px;background:var(--surface-2);color:var(--ink-2);display:grid;place-items:center;flex:none}
.cl-ic2 svg{width:18px;height:18px}
.cl-calm{margin:0 0 4px;font-size:15px;color:var(--ink-2)}
.cl-wfoot{display:flex;align-items:center;gap:8px;margin-top:6px;padding-top:8px;border-top:1px solid var(--line)}
.cl-wfoot span{flex:1;font-size:13px;color:var(--ink-3);line-height:1.3}

/* group chips: «+ Группа» */
.fchips .chip.cl-addg{background:transparent;box-shadow:inset 0 0 0 1.5px var(--surface-3);color:var(--ink-2)}
.fchips .chip.cl-addg svg{width:16px;height:16px}
.fchips .chip{min-height:44px}

/* phone table: fits the width — name takes the rest, metrics shrink to content */
.rt-wrap.fit .rt{width:100%}
.rt-wrap.fit .rt .nm{min-width:0;max-width:none;width:auto}
.rt-wrap.fit .rt th:not(.nm):not(.mc),.rt-wrap.fit .rt td:not(.nm):not(.mc){width:1%;padding-left:4px;padding-right:6px}
.rt-wrap.fit .rt td small{white-space:normal}
.rt-wrap.fit .rt td.mc,.rt-wrap.fit .rt th.mc{width:44px;padding:0}
.rt-wrap.fit .d7{grid-template-columns:repeat(7,6px)}
.rt-wrap.fit .d7 i{height:6px}
.rt-wrap.fit::after{display:none}
.rt-wrap.fit .rt th button{min-height:44px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}
.rt-wrap.fit .rt th.nm button{align-items:flex-start}
.rt-wrap.fit .rt th button .ar{position:relative;top:-1px}
.rt .nmc b{white-space:nowrap}
.rt .nmc small.two{white-space:normal;text-overflow:clip;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25;margin-top:1px}
.rt tr.row-l[hidden]{display:none}
.rt tr.sel td{background:var(--surface-2)}
.rt tr.cl-new td{animation:cl-flash 1.6s var(--ease)}
@keyframes cl-flash{0%,40%{background:var(--attn)}}
/* unread chat counter on the avatar */
.avw{position:relative;display:inline-block;flex:none;line-height:0}
.avw .ub{position:absolute;top:-6px;right:-8px;min-width:18px;height:18px;border-radius:9px;background:var(--danger);color:#fff;font:700 11px/18px var(--font);font-style:normal;text-align:center;padding:0 5px;box-shadow:0 0 0 2px var(--surface-1)}
.rt tr.sel .avw .ub{box-shadow:0 0 0 2px var(--surface-2)}

/* checkbox glyph */
.cl-cbx{width:22px;height:22px;border-radius:7px;box-shadow:inset 0 0 0 2px var(--ink-3);display:inline-grid;place-items:center;flex:none;color:var(--on-accent)}
.cl-cbx.on,.cl-cbx.mix{background:var(--accent);box-shadow:none}
.cl-cbx svg{width:15px;height:15px;color:inherit}
.cl-cbx.mix i{width:10px;height:2.5px;border-radius:2px;background:var(--on-accent)}

/* anchored menu */
.scrim-static.cl-soft{opacity:.45;z-index:39}
.cl-pmenu{position:absolute;right:16px;top:120px;z-index:40;width:262px;max-width:calc(100% - 32px);background:var(--surface-1);color:var(--ink);border-radius:18px;box-shadow:var(--sh-2);padding:6px}
.cl-pmenu.up{top:auto;bottom:164px}
.cl-pmenu .mh{display:flex;align-items:center;gap:8px;padding:6px 8px 8px;font-size:14px;color:var(--ink-2);border-bottom:1px solid var(--line);margin-bottom:4px;min-width:0}
.cl-pmenu .mh b{font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cl-pmenu .mh .av.sm{width:30px;height:30px;border-radius:10px;font-size:12px}
.cl-pmenu button{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;border:0;background:none;border-radius:12px;padding:0 10px;font-size:16px;color:var(--ink);cursor:pointer;text-align:left}
.cl-pmenu button:active,.cl-pmenu button:focus-visible{background:var(--surface-2);outline:none}
.cl-pmenu button>span[data-i] svg{width:20px;height:20px;color:var(--ink-2)}
.cl-pmenu button>span[data-i]{display:grid;flex:none}
.cl-pmenu .cl-ml{flex:none}
.cl-pmenu .mv{margin-left:auto;font-size:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:110px}
.cl-pmenu .msep{height:1px;background:var(--line);margin:4px 8px}

/* bulk bar: the count lives on the board, the bar carries only actions */
.cl-bulk{position:absolute;left:12px;right:12px;bottom:92px;z-index:38;background:var(--board);color:var(--board-ink);border-radius:20px;padding:8px;display:flex;align-items:center;gap:6px;box-shadow:var(--sh-2)}
.cl-bulk .bb-b{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:0;border-radius:14px;background:var(--board-plate);color:var(--board-ink);font:600 15px/1 var(--font);padding:0 10px;cursor:pointer;min-width:0;white-space:nowrap;overflow:hidden}
.cl-bulk .bb-b.on{background:var(--board-ink);color:var(--board)}
.cl-bulk .bb-b[disabled]{opacity:.45;cursor:not-allowed}
.cl-bulk .bb-b svg{width:18px;height:18px;flex:none}
.cl-bulk .bb-x{width:44px;height:44px;border:0;background:none;color:var(--board-2);display:grid;place-items:center;cursor:pointer;flex:none}
.cl-bulk .bb-x svg{width:20px;height:20px}
#ph:has(.cl-bulk) .ptoast{bottom:160px}

/* empty states */
.plate.cl-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:22px 18px}
.plate.cl-empty h4{justify-content:center;margin:0}
.plate.cl-empty p{margin:0;font-size:16px;color:var(--ink-2)}
.cl-eic{width:56px;height:56px;border-radius:18px;background:var(--surface-2);color:var(--ink-2);display:grid;place-items:center}
.cl-eic svg{width:26px;height:26px}
.cl-erow{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:4px}

/* lists of rows (hidden, former, invites) */
.cl-hrow{padding:8px 0;border-top:1px solid var(--line)}
.plate h4+.cl-hrow{border-top:0;padding-top:0}
.cl-hrow .tx b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* search */
.cl-srch{position:relative;flex:none}
.cl-srch>span{position:absolute;left:14px;top:14px;width:20px;height:20px;color:var(--ink-3);z-index:1;pointer-events:none}
.cl-srch>span svg{width:20px;height:20px}
.cl-srch input{padding-left:44px}

/* sheet menus */
.cl-mlist{display:flex;flex-direction:column}
.cl-lbtn{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;padding:8px 0;min-height:56px;text-align:left;cursor:pointer;color:inherit}
.cl-lbtn+.cl-lbtn{border-top:1px solid var(--line)}
.cl-lbtn .tx{flex:1;min-width:0}.cl-lbtn .tx b{display:block;font-size:16px;font-weight:600}.cl-lbtn .tx span{font-size:14px;color:var(--ink-2)}
.cl-lbtn .ic{width:40px;height:40px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;color:var(--ink-2);flex:none}
.cl-lbtn .ic svg{width:20px;height:20px}
.cl-chv{width:20px;height:20px;color:var(--ink-3);flex:none;display:grid}
.cl-chv svg{width:20px;height:20px}

/* thresholds */
.cl-thr{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.cl-thr:first-child{border-top:0;padding-top:0}
.cl-thr>div:first-child{flex:1;min-width:0}
.cl-thr b{display:block;font-size:16px;font-weight:600}
.cl-thr span{font-size:14px;color:var(--ink-2)}
.cl-thr .stp{align-items:center}
.cl-thr .stp .ibtn[disabled]{opacity:.35;cursor:not-allowed}
.cl-sv{min-width:28px;text-align:center;font:700 20px/1 var(--font-d)}

/* warning banner that carries a dangerous action (no red button — book) */
.cl-banner{background:var(--attn);color:var(--attn-ink);border-radius:16px;padding:12px 14px;font-size:15px;flex:none}
.cl-banner b{display:block;font-size:15px;margin-bottom:4px}
.cl-banner ul{margin:0;padding-left:18px;display:grid;gap:4px}
.cl-banner p{margin:6px 0 0}
.cl-banner .nplan div{border-top-color:rgba(0,0,0,.08)}
.cl-bnplan{margin-top:6px}
.cl-tar{display:block;font:700 22px/1.2 var(--font-d)}

/* forms */
.cl-segf{display:flex;width:100%;flex:none}
.cl-segf button{flex:1 1 auto;white-space:nowrap;padding:0 6px;min-height:40px}
.plate.cl-form{display:flex;flex-direction:column;gap:14px}
.cl-inp{margin-top:6px}
.plate .cl-inp input{background:var(--surface-2);box-shadow:none}
.psheet .cl-inp input{background:var(--surface-2);box-shadow:none}

/* invite */
.plate.cl-qrp{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;padding:18px}
.cl-qrsvg{width:176px;height:176px;color:var(--ink);display:block}
.cl-code{font:800 32px/1.05 var(--font-d);letter-spacing:.06em;margin:8px 0 0}
.cl-lnkbox{flex:1;min-width:0;min-height:44px;display:flex;align-items:center;padding:0 12px;border-radius:12px;background:var(--surface-2);font-size:16px;font-weight:600;overflow:hidden;white-space:nowrap}
.plate .ic,.cl-hrow .ic{width:40px;height:40px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;color:var(--ink-2);flex:none}
.cl-hrow .ic svg{width:20px;height:20px}

/* scanner: the viewfinder stays dark in every palette */
.cl-cam{position:relative;aspect-ratio:1;max-height:300px;border-radius:22px;background:var(--board);overflow:hidden;flex:none}
.cl-camhit{position:absolute;inset:0;border:0;background:none;padding:0;cursor:pointer}
.cl-camq{position:absolute;inset:22%;color:var(--board-ink);opacity:.8;transform:rotate(-6deg)}
.cl-camq .cl-qrsvg{width:100%;height:100%;color:inherit}
.cl-cf{position:absolute;width:44px;height:44px;border:4px solid var(--board-ink);pointer-events:none}
.cl-cf.tl{left:14%;top:14%;border-right:0;border-bottom:0;border-radius:14px 0 0 0}
.cl-cf.tr{right:14%;top:14%;border-left:0;border-bottom:0;border-radius:0 14px 0 0}
.cl-cf.bl{left:14%;bottom:14%;border-right:0;border-top:0;border-radius:0 0 0 14px}
.cl-cf.br{right:14%;bottom:14%;border-left:0;border-top:0;border-radius:0 0 14px 0}
.cl-camfl{position:absolute;right:12px;bottom:12px;width:44px;height:44px;border-radius:50%;border:0;background:var(--board-plate);color:var(--board-ink);display:grid;place-items:center;cursor:pointer}
.cl-camfl.on{background:var(--board-ink);color:var(--board)}
.cl-camfl svg{width:20px;height:20px}
.btn[disabled]{opacity:.4;cursor:not-allowed}

/* check-ins */
.plate.cl-ci{display:flex;flex-direction:column;gap:10px;flex:none}
.cl-cit{flex:1;min-width:0}
.cl-ans div{align-items:center}
.cl-ans b{font-weight:600}
.cl-sc5{display:inline-flex;align-items:center;gap:3px}
.cl-sc5 i{width:14px;height:8px;border-radius:3px;background:var(--track)}
.cl-sc5 i.on{background:var(--fill)}
.cl-sc5 em{font-style:normal;font-weight:600;font-size:15px;margin-left:6px}
.plate.cl-formc{display:flex;align-items:center;gap:10px;width:100%;border:0;text-align:left;cursor:pointer;color:inherit;font:inherit;flex:none}
.cl-formc .tx{flex:1;min-width:0}
.cl-formc .tx b{display:block;font-size:16px;font-weight:600}
.cl-formc .tx span{display:block;font-size:14px;color:var(--ink-2)}

/* «Кому» combobox */
.cl-combo{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;background:var(--surface-2);border-radius:16px;padding:6px}
.cl-combo input{flex:1;min-width:120px;min-height:44px;border:0;background:transparent;font:16px var(--font);color:var(--ink);padding:0 6px}
.cl-combo input::placeholder{color:var(--ink-3)}
.cl-combo input:focus{outline:none}
.cl-combo:focus-within{box-shadow:inset 0 0 0 2px var(--focus)}
.cl-pk{display:inline-flex;align-items:center;gap:6px;background:var(--surface-1);border-radius:14px;padding:4px 0 4px 4px;font-size:15px;font-weight:600;max-width:100%}
.cl-pk .av.sm{width:30px;height:30px;border-radius:10px;font-size:12px}
.cl-pkg{width:30px;height:30px;border-radius:10px;background:var(--surface-3);display:grid;place-items:center;color:var(--ink-2);flex:none}
.cl-pkg svg{width:16px;height:16px}
.cl-x{width:44px;height:44px;margin:-6px 0;border:0;background:none;color:var(--ink-3);display:grid;place-items:center;cursor:pointer}
.cl-x svg{width:16px;height:16px}
.cl-sugs{margin-top:6px;background:var(--surface-1);border-radius:14px;box-shadow:var(--sh-2);padding:4px}
.cl-sug{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;border:0;background:none;border-radius:10px;padding:4px 8px;text-align:left;cursor:pointer;color:inherit}
.cl-sug:active{background:var(--surface-2)}
.cl-sug .tx{flex:1;min-width:0}.cl-sug .tx b{display:block;font-size:15px;font-weight:600}.cl-sug .tx span{font-size:13px;color:var(--ink-2)}
.cl-when{margin-top:10px}
.cl-when .chip{min-height:44px}

/* questions */
.cl-qrow{display:flex;align-items:center;gap:8px;padding:4px 0;border-top:1px solid var(--line);background:var(--surface-1)}
.cl-qrow:first-child{border-top:0}
.cl-qrow.drag{box-shadow:var(--sh-2);border-radius:12px;position:relative;z-index:2}
.cl-grip{width:44px;height:44px;margin-left:-10px;color:var(--ink-3);flex:none;cursor:grab;display:grid;place-items:center;touch-action:none}
.cl-grip svg{width:20px;height:20px}
.cl-grip:focus-visible{outline:2px solid var(--focus);border-radius:10px}
.cl-qrow .tx{flex:1;min-width:0}.cl-qrow .tx b{display:block;font-size:16px;font-weight:600}.cl-qrow .tx span{font-size:14px;color:var(--ink-2)}
.cl-qrow .ibtn{color:var(--ink-3)}
.cl-qadd{margin-top:10px}

/* preview of a form as the client sees it */
.cl-pq{display:flex;flex-direction:column;gap:6px;padding:8px 0;border-top:1px solid var(--line)}
.cl-pq b{font-size:16px}
.cl-pv{min-height:48px;border-radius:14px;background:var(--surface-2);display:flex;align-items:center;gap:8px;padding:0 14px;color:var(--ink-3);font-size:16px}
.cl-pv svg{width:20px;height:20px}
.cl-pv5{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.cl-pv5 span{min-height:44px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;font-weight:600}

/* access request */
.cl-glist{display:flex;flex-direction:column}
.cl-gopt{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;border:0;border-top:1px solid var(--line);background:none;cursor:pointer;text-align:left;color:inherit;padding:4px 0}
.cl-gopt:first-child{border-top:0}
.cl-gopt .tx{flex:1}.cl-gopt .tx b{display:block;font-size:16px;font-weight:600}.cl-gopt .tx span{font-size:14px;color:var(--ink-2)}
.cl-gopt .cl-cbx{margin-right:4px}

@media (max-width:520px){
  .cl-bulk{bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  #ph:has(.cl-bulk) .ptoast{bottom:calc(160px + env(safe-area-inset-bottom,0px))}
}
@media (prefers-reduced-motion:reduce){.rt tr.cl-new td{animation:none}}
/* while a menu is open the undo toast moves to the top, so it never covers the menu it reports on */
#ph:has(.cl-pmenu) .ptoast{bottom:auto;top:calc(12px + env(safe-area-inset-top,0px))}
#ph:has(.psheet.open [class*="cl-"]) .ptoast{bottom:auto;top:calc(12px + env(safe-area-inset-top,0px))}
