:root{--bg: #f5f6fa;--panel: #fff;--border: #e3e6ee;--text: #1c2233;--muted: #7a8296;--primary: #3d6bff;--primary-text: #fff;--danger: #e5484d;--radius: 10px;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px;color:var(--text)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}input,select,textarea,button{font:inherit}input,select,textarea{padding:8px 10px;border:1px solid var(--border);border-radius:8px;background:#fff;width:100%}input[type=checkbox]{width:auto}input[type=number]{width:90px}textarea{resize:vertical;min-height:60px}button{padding:7px 12px;border-radius:8px;border:1px solid var(--border);background:#fff;cursor:pointer;white-space:nowrap}button:hover{border-color:var(--primary)}button.primary{background:var(--primary);color:var(--primary-text);border-color:var(--primary)}button.active{background:#e8eeff;border-color:var(--primary)}button.link{border:0;background:none;color:var(--primary);padding:0}code,.mono{font-family:ui-monospace,Menlo,monospace;font-size:12px}h2,h3,h4{margin:0 0 8px}.center{display:flex;align-items:center;justify-content:center;height:100%;min-height:100vh;flex:1}.main .center{min-height:0}.muted{color:var(--muted)}.small{font-size:12px}.right{text-align:right}.error{color:var(--danger)}.pad{padding:16px}.row{display:flex;gap:8px;align-items:center}.row.between{justify-content:space-between}.row.wrap{flex-wrap:wrap}.grow{flex:1}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:10px;margin-bottom:12px}.card.row{flex-direction:row}.auth{width:340px}.check{display:inline-flex;gap:6px;align-items:center;font-size:13px}.notice{background:#fff6e0;padding:8px 16px;font-size:13px;border-bottom:1px solid var(--border)}.shell{display:flex;height:100vh;height:100dvh}.sidebar{width:210px;background:#151a2b;color:#cdd3e3;display:flex;flex-direction:column;padding:16px 10px;gap:2px}.sidebar .logo{font-weight:700;color:#fff;padding:4px 10px 16px}.sidebar a{color:inherit;text-decoration:none;padding:9px 10px;border-radius:8px}.sidebar a.active,.sidebar a:hover{background:#262d45;color:#fff}.sidebar .me{padding:10px;font-size:13px}.main{flex:1;overflow:hidden;display:flex}.page{flex:1;overflow:auto;padding:20px}.page.narrow{max-width:860px}.toolbar{display:flex;gap:8px;margin-bottom:12px;align-items:center}.toolbar select{width:auto}.kanban{display:flex;gap:12px;align-items:flex-start;overflow-x:auto;padding-bottom:20px}.column{min-width:260px;width:260px;background:#eceef4;border-radius:var(--radius);padding:8px;min-height:200px}.column-head{border-top:3px solid;padding:8px 4px;display:flex;flex-direction:column;gap:2px;margin-bottom:6px}.deal{background:#fff;border-radius:8px;padding:10px;margin-bottom:8px;cursor:grab;border:1px solid var(--border)}.deal-title{font-weight:600;margin-bottom:4px}.badge{color:#fff;border-radius:4px;padding:1px 5px;font-size:10px;font-weight:700}.inbox{flex:1;display:flex;height:100%}.conv-list{width:330px;border-right:1px solid var(--border);background:#fff;overflow-y:auto}.conv-list .toolbar{padding:10px;margin:0;border-bottom:1px solid var(--border)}.conv{display:flex;gap:10px;padding:10px 12px;cursor:pointer;border-bottom:1px solid #f0f1f5}.conv:hover{background:#f7f8fc}.conv.selected{background:#eef2ff}.conv-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.avatar{width:36px;height:36px;min-width:36px;border-radius:50%;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}.unread{background:var(--primary);color:#fff;border-radius:10px;padding:0 7px;font-size:11px}.stage-chip{align-self:flex-start;color:#fff;font-size:10px;border-radius:4px;padding:1px 6px}.chat{flex:1;display:flex;flex-direction:column;min-width:0}.chat-head{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;background:#fff;border-bottom:1px solid var(--border);gap:10px}.chat-head select{width:auto}.messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:8px}.msg{max-width:70%;padding:8px 12px;border-radius:12px;background:#fff;border:1px solid var(--border);display:flex;flex-direction:column;gap:4px}.msg.in{align-self:flex-start}.msg.out{align-self:flex-end;background:#e6ecff;border-color:#d3ddff}.msg.draft{background:#fff9e6;border-style:dashed;border-color:#f0c050}.msg-text{white-space:pre-wrap;word-break:break-word}.composer{display:flex;gap:8px;padding:10px 16px;background:#fff;border-top:1px solid var(--border);align-items:flex-end}.composer textarea{min-height:44px;max-height:160px}.grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:16px}.channel-tile{display:flex;align-items:center;gap:8px;padding:10px;background:#fff}.action{border:1px dashed var(--border);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px}.attachments{display:flex;flex-direction:column;gap:6px}.att-image{max-width:280px;max-height:280px;border-radius:8px;cursor:zoom-in;object-fit:cover}.att-video{max-width:320px;border-radius:8px}.file-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:#fff;color:inherit;text-decoration:none;max-width:100%}.file-chip.error{color:var(--danger)}.pending-files{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px 0;background:#fff;border-top:1px solid var(--border)}.lightbox{position:fixed;inset:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:100;cursor:zoom-out}.lightbox img{max-width:92vw;max-height:92vh}.chat.drag{outline:3px dashed var(--primary);outline-offset:-6px}.toolbar.wrap{flex-wrap:wrap}button.link.small{font-size:12px}.steps{display:flex;flex-direction:column;gap:8px}.step{border:1px solid var(--border);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:8px;background:#fbfcfe}.branch{border-left:3px solid var(--border);padding:4px 0 4px 10px;display:flex;flex-direction:column;gap:6px}.branch.yes{border-color:#1baf7a}.branch.no{border-color:#eda100}.branch-title{font-size:12px;font-weight:600;color:var(--muted)}.add-step{border-style:dashed;color:var(--muted);width:auto;align-self:flex-start}button.icon{padding:2px 8px}.cond{display:flex;flex-direction:column;gap:6px}details summary{cursor:pointer;padding:4px 0}.runs{border-top:1px solid var(--border);padding-top:8px;display:flex;flex-direction:column;gap:4px;max-height:260px;overflow:auto}.bell{background:transparent;color:inherit;border:0;text-align:left;padding:9px 10px}.bell:hover{background:#262d45}.notif-panel{position:fixed;left:220px;bottom:60px;width:340px;max-height:60vh;overflow:auto;background:#fff;color:var(--text);border:1px solid var(--border);border-radius:var(--radius);padding:12px;z-index:50;box-shadow:0 10px 30px #00000026;display:flex;flex-direction:column;gap:6px}.notif{padding:8px;border-radius:8px;cursor:pointer}.notif:hover{background:#f3f5fa}.notif.new{background:#eef2ff}.toast{position:fixed;right:20px;bottom:20px;background:#151a2b;color:#fff;padding:12px 16px;border-radius:10px;max-width:360px;cursor:pointer;z-index:60;box-shadow:0 10px 30px #00000040}.hook{border-top:1px solid var(--border);padding-top:8px}.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin-bottom:12px}.tile{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:14px}.tile-value{font-size:24px;font-weight:700;margin:4px 0}.chart{position:relative}.chart-svg{width:100%;height:auto;display:block}.chart-svg .grid{stroke:#eceef3;stroke-width:1}.chart-svg .axis{fill:var(--muted);font-size:10px}.chart-svg .hover-band{fill:#f1f3f8}.legend{display:flex;gap:14px;margin-bottom:6px;color:var(--muted)}.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}.tooltip{position:absolute;top:0;right:0;background:#fff;border:1px solid var(--border);border-radius:8px;padding:6px 10px;box-shadow:0 4px 12px #00000014}.funnel{display:flex;flex-direction:column;gap:8px}.funnel-row{display:grid;grid-template-columns:160px 1fr 150px 130px;gap:10px;align-items:center}.funnel-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.funnel-track{background:#f1f3f8;border-radius:4px;height:22px;overflow:hidden}.funnel-bar{height:100%;border-radius:0 4px 4px 0;min-width:2px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{text-align:left;padding:7px 10px;border-bottom:1px solid var(--border);white-space:nowrap}th{color:var(--muted);font-weight:500;font-size:12px}.tabbar,.mobile-only{display:none}.menu-list{display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.menu-list a,.menu-list button{padding:14px 16px;border:0;border-bottom:1px solid var(--border);border-radius:0;text-align:left;color:inherit;text-decoration:none;background:#fff;font-size:16px}.menu-list>:last-child{border-bottom:0}.danger-link{color:var(--danger)!important}.install-hint ol{padding-left:20px;margin:6px 0;line-height:1.7}.ios-share{display:inline-block;border:1px solid var(--border);border-radius:4px;padding:0 4px}button.big{padding:12px 16px;font-size:16px;width:100%}.chat-title{min-width:0;flex:1}.chat-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.toolbar.chips{flex-wrap:wrap}@media(max-width:800px){:root{font-size:15px}input,select,textarea{font-size:16px}button{min-height:38px}.mobile-only{display:inline-flex}.desktop-only{display:none!important}.sidebar{display:none}.shell{flex-direction:column}.main{flex:1;min-height:0}.page{padding:12px 12px 20px}.page.narrow{max-width:none}.card{padding:12px}.card.row{flex-direction:column;align-items:stretch}.card.row>.row{flex-wrap:wrap}.tabbar{display:flex;background:#fffffff5;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0 4px;font-size:11px;color:var(--muted);text-decoration:none}.tabbar a.active{color:var(--primary)}.tab-icon{font-size:22px;line-height:26px;position:relative}.tab-icon .dot{position:absolute;top:-2px;left:60%;background:var(--danger);color:#fff;font-style:normal;font-size:10px;font-weight:700;border-radius:9px;padding:0 5px;line-height:16px;min-width:16px;text-align:center}.shell.in-chat .tabbar{display:none}.inbox{flex-direction:column}.conv-list{width:100%;border-right:0;flex:1;-webkit-overflow-scrolling:touch}.inbox:has(.chat) .conv-list{display:none}.inbox>.center{display:none}.conv-list .toolbar.chips{flex-wrap:nowrap;overflow-x:auto;padding:8px 10px;position:sticky;top:0;background:#fff;z-index:2;scrollbar-width:none}.conv-list .toolbar.chips::-webkit-scrollbar{display:none}.conv-list .toolbar.chips button{border-radius:16px;padding:6px 12px;min-height:32px}.conv{padding:12px}.avatar{width:44px;height:44px;min-width:44px}.chat{height:100%}.chat-head{position:relative;padding:8px 10px;padding-top:calc(8px + env(safe-area-inset-top));gap:6px;flex-wrap:nowrap}.back{font-size:30px;line-height:1;border:0;background:none;padding:0 8px 0 0;color:var(--primary);min-height:0}.icon-btn{border:0;background:none;font-size:20px;padding:4px 8px}.chat-controls{display:none;position:absolute;top:100%;left:0;right:0;z-index:10;background:#fff;border-bottom:1px solid var(--border);padding:10px;flex-direction:column;align-items:stretch;box-shadow:0 8px 20px #00000014}.chat-controls.open{display:flex}.chat-controls select,.chat-controls button{width:100%}.messages{padding:10px;-webkit-overflow-scrolling:touch}.msg{max-width:85%}.att-image,.att-video{max-width:100%}.composer{padding:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));gap:6px}.composer textarea{min-height:40px;border-radius:20px;padding:9px 14px;resize:none}.send-btn{border-radius:50%;width:40px;height:40px;min-width:40px;padding:0;justify-content:center;align-items:center;display:inline-flex;font-size:18px}.send-btn:disabled{opacity:.4}.pending-files{padding:6px 8px 0}.kanban{scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding:0 0 12px}.column{min-width:85vw;width:85vw;scroll-snap-align:start}.deal{cursor:default}.card-stage{margin-top:6px;font-size:14px;padding:6px 8px;width:100%}.toolbar{flex-wrap:wrap}.grid-cards,.tiles{grid-template-columns:repeat(2,1fr)}.tile-value{font-size:20px}.funnel-row{grid-template-columns:90px 1fr 80px;gap:6px}.funnel-extra,.funnel-num .muted{display:none}.toast{left:12px;right:12px;bottom:calc(70px + env(safe-area-inset-bottom));max-width:none}.notif{padding:12px 8px;border-bottom:1px solid var(--border)}.auth{width:calc(100vw - 32px)}.lightbox img{max-width:100vw}}
