:root{--bg:#F6F5F1;--panel:#FFFFFF;--ink:#14213D;--muted:#5B6575;--line:#DDD8CE;--accent:#C2571A;--teal:#1F6F78;
--blue:#2F6FD1;--blue-bg:#E7EFFC;--green:#2F7D4F;--green-bg:#E5F3EA;--red:#B83A3A;--red-bg:#FBE9E9;--amber:#A86A12;--amber-bg:#FCF1DF;--grey-bg:#ECEBE7;
--r:14px;--tap:48px;color-scheme:light}
@media (prefers-color-scheme:dark){:root{--bg:#0E1524;--panel:#17203A;--ink:#EEF1F7;--muted:#A3ADC2;--line:#2A3553;--accent:#E8874A;--teal:#5FC1C9;
--blue:#7FA8F0;--blue-bg:#1B2B4B;--green:#6CC48F;--green-bg:#173826;--red:#F08A8A;--red-bg:#3D1C1F;--amber:#F0B860;--amber-bg:#3A2C12;--grey-bg:#222B42;color-scheme:dark}}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%}
body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit;color:inherit}
button{min-height:var(--tap);border-radius:12px;border:1px solid var(--line);background:var(--panel);padding:0 16px;cursor:pointer}
button.pri{background:var(--ink);color:var(--bg);border-color:var(--ink);font-weight:600}
button.small{min-height:36px;padding:0 12px;font-size:14px}
button:disabled{opacity:.5}
input,select,textarea{width:100%;min-height:var(--tap);border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:10px 12px}
textarea{min-height:90px}
label{display:block;font-size:14px;color:var(--muted);margin:12px 0 6px}
.center{min-height:80vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center}
.muted{color:var(--muted)}.small{font-size:14px}.err{color:var(--red)}
header.top{position:sticky;top:0;z-index:5;background:var(--bg);padding:calc(10px + env(safe-area-inset-top)) 16px 8px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px}.brand img{width:32px;height:32px;border-radius:8px}.brand b{font-size:18px}
.people{display:flex;gap:10px;overflow-x:auto;padding:10px 0 2px;scrollbar-width:none}
.person{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:46px}
.face{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--panel);display:grid;place-items:center;padding:0;min-height:0}
.face.ai{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 30%,transparent)}
.face svg{width:26px;height:26px}
.person span{font-size:12px;font-weight:600}
.person input{width:18px;height:18px;min-height:0;margin:0}
main{padding:12px 16px;max-width:760px;margin:0 auto}
h1{font-size:22px;margin:6px 0 12px}h2{font-size:17px;margin:18px 0 8px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:14px;margin:10px 0}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.badge{display:inline-block;font-size:12px;font-weight:600;padding:2px 8px;border-radius:99px;border:1px solid var(--line);background:var(--grey-bg);white-space:nowrap}
.badge.btn{min-height:28px;cursor:pointer}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:6;display:flex;background:var(--panel);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.tabs button{flex:1;border:0;border-radius:0;min-height:62px;background:transparent;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);padding:0}
.tabs button.on{color:var(--ink);font-weight:700}
.tabs svg{width:22px;height:22px}
.vid{display:flex;gap:12px;align-items:center}
.vid .thumb{width:64px;height:64px;border-radius:12px;background:var(--ink);display:grid;place-items:center;flex:none}
.vid .thumb svg{width:26px;height:26px;fill:var(--bg)}
video{width:100%;border-radius:12px;background:#000;max-height:60vh}
.player .ctrl{display:flex;gap:8px;justify-content:space-between;margin-top:8px}
.player .ctrl button{flex:1}
.pilot{border-left:6px solid var(--line)}
.st-prospect{background:var(--blue-bg);border-left-color:var(--blue)}
.st-ongoing,.st-won{background:var(--green-bg);border-left-color:var(--green)}
.st-problem,.st-abandoned,.st-lost{background:var(--red-bg);border-left-color:var(--red)}
.st-closing{background:var(--amber-bg);border-left-color:var(--amber)}
.st-post-mortem{background:var(--grey-bg);border-left-color:var(--muted)}
.logo{width:44px;height:44px;border-radius:12px;background:var(--ink);color:var(--bg);display:grid;place-items:center;font-weight:700;flex:none}
.kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.kpi{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px}
.kpi b{display:block;font-size:22px}.kpi small{color:var(--muted)}
.sheet{position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.45);display:flex;align-items:flex-end}
.sheet>.box{background:var(--bg);width:100%;max-height:92vh;overflow:auto;border-radius:18px 18px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}
.sheet .head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.chat{display:flex;flex-direction:column;height:86vh}
.msgs{flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:6px 0}
.msg{max-width:85%;padding:10px 12px;border-radius:16px;white-space:pre-wrap;overflow-wrap:anywhere}
.msg.me{align-self:flex-end;background:var(--ink);color:var(--bg);border-bottom-right-radius:4px}
.msg.jerome{align-self:flex-start;background:var(--panel);border:1px solid var(--line);border-bottom-left-radius:4px}
.msg small{display:block;opacity:.7;font-size:11px;margin-top:4px}
.composer{display:flex;gap:8px;align-items:flex-end;padding-top:8px}
.composer textarea{min-height:48px;max-height:140px}
.composer button{min-width:var(--tap);padding:0 12px}
.sendbar{position:fixed;left:12px;right:12px;bottom:calc(72px + env(safe-area-inset-bottom));z-index:7}
.sendbar button{width:100%}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom));z-index:30;background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:12px;max-width:90vw}
.list{display:flex;flex-direction:column;gap:6px}
.chk{display:flex;gap:10px;align-items:center;min-height:var(--tap)}
.chk input{width:22px;height:22px;min-height:0}
.sp{height:10px}
@media print{body.sheet-open #app{display:none!important}.sheet{position:static!important;background:none!important}.sheet>.box{max-height:none!important;border-radius:0}header.top,.tabs,.noprint,.sendbar{display:none!important}body{padding:0}.card{border:0}}

[hidden]{display:none!important}

.fab{position:fixed;right:14px;bottom:calc(74px + env(safe-area-inset-bottom));z-index:15;background:var(--ink);color:var(--bg);border-color:var(--ink);border-radius:999px;font-weight:600;box-shadow:0 4px 14px rgba(0,0,0,.25)}

.chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}.chip{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:8px 12px;min-height:44px;font-size:15px}.chip input{width:auto;margin:0}.order h1{margin:8px 0 0}
#mic.rec{background:#d92d20;color:#fff;border-color:#d92d20;min-width:64px;font-size:20px;animation:micpulse 1.1s ease-in-out infinite}
@keyframes micpulse{0%,100%{box-shadow:0 0 0 0 rgba(217,45,32,.55)}50%{box-shadow:0 0 0 12px rgba(217,45,32,0)}}

.talkbar{display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:13px;color:var(--muted)}
.talkbar .dot{width:10px;height:10px;border-radius:50%;background:#d33;animation:pulse 1s infinite}
.talkbar .dot[data-s=speak]{background:#2a7}.talkbar .dot[data-s=wait]{background:#c90;animation:none}
.talkbar .lvl{flex:1;height:4px;background:var(--line);border-radius:2px;overflow:hidden}.talkbar .lvl i{display:block;height:100%;width:0;background:#d33;transition:width .05s}
@keyframes pulse{50%{opacity:.35}}

a.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:0 14px;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:inherit}a.btn.pri{background:var(--ink);color:var(--bg);border-color:var(--ink)}.row.wrap{flex-wrap:wrap}.po{display:block;margin:6px 0}

.tabs{overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tabs button{min-width:52px}
