/* Live cabinets: login, client / manager / director screens. Base look - app.css (approved site style). */
.live-cab #sup,.live-cab .ft{display:none}
.nav button,.nav a{white-space:nowrap}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:200;background:var(--navy);color:#fff;padding:14px 20px;border-radius:16px;font-weight:700;box-shadow:0 18px 40px -16px rgba(27,37,80,.6);max-width:min(92vw,520px);text-align:center}
.toast.bad{background:var(--r)}
.small{font-size:14px}
.err{background:var(--rs);color:var(--r);border-radius:14px;padding:12px 14px;font-weight:700;margin:6px 0 10px}
.wide{width:100%}
select.in{width:100%;height:52px;border-radius:14px;border:1.5px solid var(--line2);background:#fff;padding:0 12px;font-size:16px}
.in.sm,select.in.sm{height:40px;font-size:15px;padding:0 10px;border-radius:10px;width:auto;min-width:90px}
.lnk.danger{color:var(--r)}
.loadc{display:flex;gap:14px;align-items:center;font-weight:700;color:var(--muted)}
.spin{width:22px;height:22px;border-radius:50%;border:3px solid var(--line2);border-top-color:var(--g);animation:spin .8s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* login */
.auth{max-width:500px;margin:10px auto 0}
.auth h1{font-size:28px}
.atabs{margin-bottom:6px}
.atabs button{flex:1;justify-content:center}
.aform .lb{margin-top:16px}
.aform .btn.wide{margin-top:20px}

/* top bar of the cabinet */
.ctop{justify-content:space-between}
.ltabs{flex-wrap:wrap;max-width:100%;scrollbar-width:none}
.ltabs::-webkit-scrollbar{display:none}
.ltabs button{white-space:nowrap;position:relative}
.ltabs .ts{display:none}
.bdg{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--r);color:#fff;font:800 12.5px/1 var(--fb);font-style:normal}
.cme{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-left:auto}
.cme .faint{font-weight:700;font-size:15px}
.hint{display:flex;gap:12px;align-items:center;margin-bottom:18px}
.hint .xb{margin-left:auto}

/* forms */
.fgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 16px}
.fgrid .lb{margin-top:14px}
.fgrid .span2{grid-column:1/-1}
.row-f{display:flex;gap:8px;align-items:center}
.row-f .in{flex:1;min-width:0}
.row-f.wrapf{flex-wrap:wrap}
.row-f.wrapf .in{flex:0 1 auto}
.span2.row-f{margin-top:16px;flex-wrap:wrap}
.newc{background:var(--bg);border-radius:16px;padding:4px 16px 16px;margin:6px 0 14px}
.xb{border:0;background:#EEF1F7;color:var(--muted);width:30px;height:30px;border-radius:50%;font-size:18px;line-height:1;flex:none}
.xb:hover{background:var(--rs);color:var(--r)}
details>summary{cursor:pointer}
.sumh{font:600 18px/1.3 var(--fh);list-style:none;display:flex;align-items:center;gap:8px}
.sumh::-webkit-details-marker{display:none}
.sumh::after{content:'▾';color:var(--faint);font-size:15px}
details[open]>.sumh::after{content:'▴'}
.oedit{margin-top:12px;border-top:1px dashed var(--line2);padding-top:10px}
.oedit>summary{color:var(--gd);font-weight:800;font-size:15px}

/* orders, stages */
.ticks{margin-top:10px}
.tick-r{display:flex;align-items:center;gap:8px}
.tick-r .tick{flex:1}
.tick-r .xb{opacity:.35}
.tick-r:hover .xb{opacity:1}

/* chat */
.chat.lc{max-height:min(62vh,560px);overflow-y:auto;padding:2px 4px 2px 0;overscroll-behavior:contain}
.chat .bub .who{display:block;font-size:13px;color:var(--gd);margin-bottom:2px}
.chat .bub.me .who{color:#E2F5E9}
.chat .bub .mt{white-space:pre-wrap;word-break:break-word}
.chat .bub a{color:inherit;text-decoration:underline}
.mfiles{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.mfiles img{max-width:220px;max-height:200px;border-radius:12px;display:block}
.mfiles .fl{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.25);border-radius:10px;padding:6px 10px;text-decoration:none;font-weight:700;font-size:14px}
.bub:not(.me) .mfiles .fl{background:#fff}
.mfiles .fl .ic{width:18px;height:18px}
.chat-f{align-items:flex-end}
.chat-f textarea.in{flex:1;min-height:46px;max-height:160px;resize:none;padding:11px 14px;line-height:1.4}
.att{width:46px;height:46px;border-radius:14px;border:1.5px solid var(--line2);display:grid;place-items:center;cursor:pointer;flex:none;color:var(--muted);background:#fff}
.att:hover{border-color:var(--g);color:var(--gd)}
.att input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.fchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.fchips .chip{background:var(--bs);color:var(--navy)}
.fchips .chip .ic{width:16px;height:16px}
.fchips .chip button{border:0;background:none;font-size:18px;line-height:1;color:inherit;padding:0 0 0 4px}
.chat-col{display:flex;flex-direction:column;gap:20px;min-width:0;position:sticky;top:90px}

/* manager / director */
button.kpi{border:0;text-align:left;font:inherit;color:inherit;cursor:pointer;width:100%;transition:transform .15s}
button.kpi:hover{transform:translateY(-2px)}
.leadc{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:14px 0;border-top:1px solid var(--line)}
.leadc:first-of-type{border-top:0}
.leadc>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}
.leadc span{color:var(--muted);font-size:15px}
.leadc .lnote{color:var(--ink);background:var(--bg);border-radius:10px;padding:6px 10px;white-space:pre-wrap}
.leadc a{word-break:break-all}
.cl2{display:grid;grid-template-columns:340px minmax(0,1fr);gap:20px;align-items:start}
.clpanel{padding:14px;position:sticky;top:90px;max-height:calc(100vh - 110px);display:flex;flex-direction:column}
.clpanel .chips.sm{gap:6px;margin:10px 0 6px}
.chips.sm .chp{height:34px;padding:0 12px;font-size:14px}
.clist{overflow-y:auto;display:flex;flex-direction:column;gap:2px;min-height:0}
.crow{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:0;background:none;padding:10px;border-radius:14px}
.crow:hover{background:var(--bg)}
.crow.on{background:var(--gs)}
.crow .cn,.chead .cn{font:700 13px/1 var(--fb);background:var(--navy);color:#fff;border-radius:8px;padding:5px 7px;flex:none}
.chead .cn{font-size:15px;vertical-align:3px}
.crow .cb{display:flex;flex-direction:column;min-width:0;flex:1}
.crow .cb b{font-size:15.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crow .cb small{color:var(--muted);font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crow .cr{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:none}
.crow .cr small{color:var(--faint);font-size:12.5px}
.crow .cr .mg{color:var(--muted)}
.cdetail{display:flex;flex-direction:column;gap:20px;min-width:0}
.cdetail .empty{text-align:center;padding:60px 20px}
.chead h2{font-size:22px}
.cinfo{font-size:15.5px;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.backl{display:none;margin-bottom:-6px}
.team .chat.lc{max-height:calc(100vh - 330px);min-height:300px}
.rule{margin-bottom:12px}
.rule>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:17px}
.art-body p{margin:0 0 12px}
.art-body h2{font-family:var(--fh)}
.tbl .in.sm{min-width:0}

@media (max-width:1060px){
  .chat-col{position:static;order:-1}
  .cl2{grid-template-columns:290px minmax(0,1fr)}
}
@media (max-width:900px){
  .cl2{grid-template-columns:minmax(0,1fr)}
  .clpanel{position:static;max-height:none}
  .cl2.has-c .clpanel{display:none}
  .cl2:not(.has-c) .cdetail{display:none}
  .backl{display:inline-flex}
  .cme .faint{display:none}
}
@media (max-width:640px){
  .fgrid{grid-template-columns:minmax(0,1fr)}
  .ctop{gap:10px}
  /* phone: cabinet sections as an app-style bottom bar */
  .ltabs{position:fixed;left:0;right:0;bottom:0;z-index:60;width:auto;border-radius:0;background:rgba(255,255,255,.97);backdrop-filter:blur(10px);box-shadow:0 -1px 0 var(--line),0 -10px 30px -20px rgba(27,37,80,.35);padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));gap:2px;overflow:visible;flex-wrap:nowrap}
  .ltabs button{flex:1 1 auto;flex-direction:column;height:54px;padding:4px 3px 0;gap:2px;font-size:11.5px;justify-content:center;border-radius:12px;min-width:0}
  .ltabs button.on{background:var(--gs);box-shadow:none;color:var(--gd)}
  .roles.ltabs .ic{display:block;width:22px;height:22px}
  .ltabs .tl{display:none}
  .ltabs .ts{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .ctop{padding-block:8px}
  .ltabs .bdg{position:absolute;top:2px;left:calc(50% + 6px);min-width:18px;height:18px;font-size:11px;padding:0 4px}
  .live-cab .cab-w{padding-bottom:96px}
  .live-cab .ft{padding-bottom:90px}  .cme{margin-left:0;width:100%;justify-content:flex-end}
  .cme .btn .tx{display:none}
  .leadc{flex-direction:column;align-items:stretch}
  .chat.lc{max-height:60vh}
  .mfiles img{max-width:100%}
  .auth h1{font-size:24px}
}
