:root{--bg: #f6f7fb;--surface: #ffffff;--surface-2: #f1f2f7;--border: #e4e6ef;--text: #171a26;--text-2: #5d6275;--text-3: #9398aa;--accent: #6d4aff;--accent-2: #8b6dff;--accent-soft: #efebff;--green: #16a34a;--green-soft: #e8f7ee;--orange: #ea8a0c;--orange-soft: #fdf3e3;--red: #dc2626;--red-soft: #fdecec;--blue: #2563eb;--blue-soft: #e9f0fe;--radius: 12px;--shadow: 0 1px 2px rgba(20, 22, 40, .04), 0 4px 16px rgba(20, 22, 40, .05);--sidebar-w: 248px;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--bg: #0f1117;--surface: #171a23;--surface-2: #1f2330;--border: #2a2f3d;--text: #eceef5;--text-2: #a4a9ba;--text-3: #6d7285;--accent: #8b6dff;--accent-2: #a58dff;--accent-soft: #272040;--green-soft: #13291d;--orange-soft: #2e2413;--red-soft: #321a1a;--blue-soft: #16223b;--shadow: 0 1px 2px rgba(0,0,0,.3);color-scheme:dark}}:root[data-theme=dark]{--bg: #0f1117;--surface: #171a23;--surface-2: #1f2330;--border: #2a2f3d;--text: #eceef5;--text-2: #a4a9ba;--text-3: #6d7285;--accent: #8b6dff;--accent-2: #a58dff;--accent-soft: #272040;--green-soft: #13291d;--orange-soft: #2e2413;--red-soft: #321a1a;--blue-soft: #16223b;--shadow: 0 1px 2px rgba(0,0,0,.3);color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter,system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit;color:inherit}h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.01em}h1{font-size:22px}h2{font-size:17px}h3{font-size:15px}p{margin:0}.app{display:flex;height:100%}.sidebar{width:var(--sidebar-w);flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:16px 12px;gap:4px;overflow-y:auto}.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 16px;font-weight:700;font-size:17px}.brand-logo{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--accent),#c04bff);font-size:15px}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);padding:14px 10px 6px}.nav-link{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;color:var(--text-2);font-weight:500}.nav-link:hover{background:var(--surface-2);color:var(--text)}.nav-link.active{background:var(--accent-soft);color:var(--accent)}.nav-link .count{margin-left:auto;font-size:12px;background:var(--accent);color:#fff;border-radius:99px;padding:0 7px}.sidebar-footer{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:10px}.plan-card{background:var(--surface-2);border-radius:10px;padding:12px;font-size:13px}.plan-card .bar{margin-top:8px}.user-chip{display:flex;align-items:center;gap:10px;padding:8px;border-radius:10px}.user-chip:hover{background:var(--surface-2)}.main{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:60px;flex-shrink:0;display:flex;align-items:center;gap:12px;padding:0 24px;border-bottom:1px solid var(--border);background:var(--surface)}.topbar .search{flex:1;max-width:420px}.content{flex:1;overflow-y:auto;padding:24px}.content.flush{padding:0;overflow:hidden;display:flex}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}.page-head p{color:var(--text-2);margin-top:4px}.mobile-only,.btn.mobile-only{display:none}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.card-pad{padding:20px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border)}.grid{display:grid;gap:16px}.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}.g21{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}.row{display:flex;align-items:center;gap:8px}.col{display:flex;flex-direction:column;gap:8px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.muted{color:var(--text-2)}.faint{color:var(--text-3)}.small{font-size:12.5px}.bold{font-weight:600}.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:0 14px;border-radius:9px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-weight:500;white-space:nowrap;transition:background .15s,border-color .15s}.btn:hover{background:var(--surface-2)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-2)}.btn.ghost{border-color:transparent;background:transparent}.btn.ghost:hover{background:var(--surface-2)}.btn.danger{color:var(--red)}.btn.sm{height:30px;padding:0 10px;font-size:13px}.btn.icon{width:36px;padding:0}.btn.sm.icon{width:30px}.btn:disabled{opacity:.5;cursor:default}.input,.select,.textarea{width:100%;height:38px;padding:0 12px;border-radius:9px;border:1px solid var(--border);background:var(--surface);outline:none}.textarea{height:auto;padding:10px 12px;resize:vertical;line-height:1.55}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.input-icon{position:relative}.input-icon svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-3)}.input-icon .input{padding-left:36px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-weight:500;font-size:13px}.field .hint{font-size:12px;color:var(--text-3)}.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:99px;font-size:12px;font-weight:500;background:var(--surface-2);color:var(--text-2);white-space:nowrap}.badge.green{background:var(--green-soft);color:var(--green)}.badge.orange{background:var(--orange-soft);color:var(--orange)}.badge.red{background:var(--red-soft);color:var(--red)}.badge.blue{background:var(--blue-soft);color:var(--blue)}.badge.violet{background:var(--accent-soft);color:var(--accent)}.dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:600;font-size:13px;color:#fff;flex-shrink:0;position:relative}.avatar.sm{width:28px;height:28px;font-size:11px}.avatar.lg{width:56px;height:56px;font-size:19px}.avatar .ai-mark{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;border-radius:50%;background:var(--accent);border:2px solid var(--surface);display:grid;place-items:center}.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:20px;overflow-x:auto}.tab{padding:10px 14px;border:none;background:none;cursor:pointer;color:var(--text-2);font-weight:500;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}.tab:hover{color:var(--text)}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}.seg{display:inline-flex;background:var(--surface-2);border-radius:9px;padding:3px}.seg button{white-space:nowrap;border:none;background:none;padding:5px 12px;border-radius:7px;cursor:pointer;color:var(--text-2);font-weight:500;font-size:13px}.seg button.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.switch{width:36px;height:20px;border-radius:99px;background:var(--border);position:relative;cursor:pointer;border:none;flex-shrink:0;transition:background .15s}.switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px #0003}.switch.on{background:var(--accent)}.switch.on:after{left:18px}.bar{height:6px;border-radius:99px;background:var(--border);overflow:hidden}.bar>span{display:block;height:100%;background:var(--accent);border-radius:99px}.table{width:100%;border-collapse:collapse}.table th{text-align:left;font-weight:500;font-size:12.5px;color:var(--text-3);padding:10px 16px;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:12px 16px;border-bottom:1px solid var(--border);vertical-align:middle}.table tr:last-child td{border-bottom:none}.table tbody tr:hover{background:var(--surface-2);cursor:pointer}.table-wrap{overflow-x:auto}.stat .label{color:var(--text-2);font-size:13px}.stat .value{font-size:26px;font-weight:700;letter-spacing:-.02em;margin-top:4px}.stat .delta{font-size:12.5px;font-weight:500}.delta.up{color:var(--green)}.delta.down{color:var(--red)}.icon-box{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex-shrink:0}.empty{text-align:center;padding:48px 20px;color:var(--text-2)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(15,17,28,.45);z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;animation:fade .15s}.modal{width:100%;max-width:560px;max-height:calc(100vh - 32px);overflow-y:auto;background:var(--surface);border-radius:16px;box-shadow:0 20px 60px #00000040}.modal.wide{max-width:820px}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border)}.modal-body{padding:22px;display:flex;flex-direction:column;gap:16px}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:16px 22px;border-top:1px solid var(--border)}.drawer-overlay{justify-content:flex-end;padding:0;align-items:stretch}.drawer{width:100%;max-width:480px;background:var(--surface);height:100%;overflow-y:auto;animation:slide .2s}@keyframes fade{0%{opacity:0}}@keyframes slide{0%{transform:translate(40px);opacity:0}}.toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:var(--text);color:var(--surface);padding:10px 18px;border-radius:10px;z-index:100;font-weight:500;animation:fade .2s}.chat-list{width:320px;flex-shrink:0;border-right:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column}.chat-list-items{overflow-y:auto;flex:1}.chat-item{display:flex;gap:10px;padding:12px 16px;cursor:pointer;border-bottom:1px solid var(--border)}.chat-item:hover{background:var(--surface-2)}.chat-item.active{background:var(--accent-soft)}.chat-main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg)}.chat-header{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--surface)}.messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:10px}.msg{max-width:72%;padding:9px 13px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word}.msg.in{background:var(--surface);border:1px solid var(--border);align-self:flex-start;border-bottom-left-radius:4px}.msg.out{background:var(--accent);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}.msg.out.human{background:#2c3145}.msg.draft{background:var(--orange-soft);color:var(--text);border:1px dashed var(--orange);align-self:flex-end}.msg .meta{font-size:11px;opacity:.7;margin-top:4px;display:flex;gap:6px;align-items:center}.msg.system{align-self:center;background:none;color:var(--text-3);font-size:12px;padding:2px}.composer{padding:12px 16px;border-top:1px solid var(--border);background:var(--surface)}.chat-side{width:300px;flex-shrink:0;border-left:1px solid var(--border);background:var(--surface);overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:18px}.kv{display:grid;grid-template-columns:110px 1fr;gap:6px 10px;font-size:13px}.kv dt{color:var(--text-3)}.kv dd{margin:0}.kanban{display:flex;gap:14px;overflow-x:auto;padding-bottom:12px;align-items:flex-start}.kan-col{width:290px;flex-shrink:0;background:var(--surface-2);border-radius:var(--radius);padding:10px}.kan-col-head{display:flex;align-items:center;gap:8px;padding:4px 6px 10px;font-weight:600}.kan-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px;margin-bottom:8px;cursor:grab;box-shadow:var(--shadow)}.kan-card:active{cursor:grabbing}.kan-col.drop{outline:2px dashed var(--accent)}.channel-logo{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:#fff;font-weight:700;font-size:13px;flex-shrink:0}.tile{padding:16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);display:flex;flex-direction:column;gap:10px}.tile:hover{border-color:var(--accent)}.steps{display:flex;flex-direction:column;gap:10px}.step{display:flex;gap:12px;align-items:flex-start}.step-num{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);font-weight:600;font-size:12px;flex-shrink:0}.step.done .step-num{background:var(--green);color:#fff}.chart{display:flex;align-items:flex-end;gap:8px;height:160px}.chart .col-bar{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end}.chart .col-bar span.b{width:100%;max-width:38px;background:var(--accent);border-radius:6px 6px 3px 3px;min-height:3px}.chart .col-bar span.b.alt{background:var(--accent-soft)}.chart .col-bar small{color:var(--text-3);font-size:11.5px}.code{font-family:ui-monospace,Menlo,monospace;font-size:12.5px;background:var(--surface-2);padding:10px 12px;border-radius:8px;overflow-x:auto;white-space:pre}.prompt-block{border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:var(--surface-2);font-size:12.5px}.auth-wrap{min-height:100%;display:grid;place-items:center;padding:24px;background:radial-gradient(1200px 600px at 20% -10%,var(--accent-soft),transparent),var(--bg)}.auth-card{width:100%;max-width:420px}.checklist li{margin-bottom:6px}.dropzone{border:2px dashed var(--border);border-radius:var(--radius);padding:28px;text-align:center;color:var(--text-2);cursor:pointer}.dropzone:hover{border-color:var(--accent);color:var(--accent)}@media (max-width: 1200px){.chat-side{display:none}.g4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 900px){.sidebar{position:fixed;z-index:40;height:100%;transform:translate(-100%);transition:transform .2s}.sidebar.open{transform:none;box-shadow:0 0 40px #0003}.mobile-only,.btn.mobile-only{display:inline-flex}.g2,.g3,.g21{grid-template-columns:1fr}.content{padding:16px}.topbar{padding:0 16px}.chat-list{width:100%}.chat-list.hide-mobile,.chat-main.hide-mobile{display:none}}@media (max-width: 560px){.hide-sm{display:none}.g4{grid-template-columns:1fr}.msg{max-width:88%}}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
