@import 'tailwindcss';
:root{--ink:#211f1c;--muted:#817c75;--line:#e8e2dc;--paper:#fffdf9;--orange:#ed4b00;--orange-deep:#c93600;--blue:#346ef1}*{box-sizing:border-box}html,body{margin:0;min-height:100%}button{color:inherit;font:inherit}body{background:#ece8e2;color:var(--ink);font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif}.app-shell{display:grid;grid-template-columns:286px minmax(0,1fr);height:100vh;min-height:720px;overflow:hidden;background:var(--paper)}.sidebar{position:relative;display:flex;flex-direction:column;padding:22px 16px 16px;border-right:1px solid var(--line);background:#f8f9fa}.brand-row{display:flex;align-items:center;gap:11px;padding:0 6px;font-size:19px}.brand-mark{display:flex;align-items:end;gap:2px;width:37px;height:37px;padding:8px;border-radius:10px;background:linear-gradient(145deg,#ff6a12,#e64200);box-shadow:0 7px 18px rgba(226,66,0,.19)}.brand-mark i{display:block;width:4px;border:1.5px solid white;border-radius:3px}.brand-mark i:nth-child(1){height:13px}.brand-mark i:nth-child(2){height:20px}.brand-mark i:nth-child(3){height:9px}.icon-button,.section-heading button,.sidebar-footer button{border:0;background:transparent;cursor:pointer}.sidebar-toggle{margin-left:auto;color:#6d7176}.new-chat{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:30px;height:52px;border:1px solid #dedbd7;border-radius:13px;background:white;font-weight:700;cursor:pointer;box-shadow:0 1px 1px rgba(0,0,0,.02)}.new-chat span{font-size:22px;font-weight:400}.workspace-section{margin-top:28px;min-height:0;overflow:hidden}.section-heading{display:flex;justify-content:space-between;align-items:center;padding:0 7px 12px;color:#96999d}.section-heading div{display:flex;gap:4px}.section-heading button{padding:3px 5px;font-size:19px;color:#676b70}.workspace{display:flex;align-items:center;gap:9px;padding:10px 8px;font-size:15px;border-radius:9px}.workspace.open{color:var(--blue)}.folder-icon{width:22px;font-size:24px;line-height:1}.conversation-list{margin-top:6px}.conversation{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;width:100%;padding:11px 10px 11px 33px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}.conversation span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.conversation small{color:#9a9da1}.conversation.active{background:#e9ebed;font-weight:650}.sidebar-footer{display:flex;align-items:center;gap:10px;margin-top:auto;padding:13px 7px 3px;border-top:1px solid var(--line)}.avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:white;background:#f26722;font-weight:750}.sidebar-footer div{display:flex;flex:1;flex-direction:column;gap:2px}.sidebar-footer small{color:#97999c;font-size:11px}.main-panel{display:grid;grid-template-rows:72px 50px minmax(0,1fr);min-width:0;background:white}.topbar{display:flex;justify-content:space-between;align-items:center;padding:0 28px 0 34px;border-bottom:1px solid var(--line)}.title-cluster,.top-actions{display:flex;align-items:center;gap:14px}.title-cluster h1{margin:0;font-size:18px;letter-spacing:-.02em}.mode-pill{color:#8c8d90;font-size:13px}.mode-dot{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#e84a08}.top-actions button{height:38px;border-radius:12px;cursor:pointer}.ghost-button{padding:0 13px;border:1px solid #e3e0dc;background:white}.usage-button{padding:0 15px;border:0;background:#f3f4f5;font-weight:650}.subnav{display:flex;align-items:end;gap:36px;padding:0 34px;border-bottom:1px solid var(--line)}.subnav button{height:50px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;color:#8a8b8e;font-weight:650;cursor:pointer}.subnav .selected{color:var(--blue);border-bottom-color:var(--blue)}.conversation-stage{display:grid;grid-template-columns:minmax(520px,1fr) 320px;min-height:0}.chat-column{position:relative;overflow:auto;padding:38px max(34px,6vw) 172px;background:linear-gradient(180deg,#fff 0%,#fffdf9 100%)}.user-message{width:fit-content;max-width:72%;margin-left:auto;padding:14px 18px;border-radius:18px 18px 5px 18px;background:#edf3ff;font-size:15px}.assistant-message{max-width:770px;margin:34px auto 0}.assistant-label{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:750}.mini-brand{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;color:white;background:var(--orange);font-size:10px}.assistant-message p{margin:0 0 18px;color:#4e4b47;line-height:1.8}.project-card{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:white;box-shadow:0 12px 32px rgba(54,37,20,.05)}.card-head{display:flex;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line);background:#fbf8f3;font-weight:700}.card-head b{color:var(--orange-deep);font-size:12px}.project-card dl{margin:0}.project-card dl div{display:grid;grid-template-columns:130px 1fr;padding:12px 18px;border-bottom:1px solid #f1ede8}.project-card dl div:last-child{border:0}.project-card dt{color:#8a857f}.project-card dd{margin:0;font-weight:560}.thinking-row{display:flex;align-items:center;gap:9px;margin-top:18px;color:#88837c;font-size:13px}.pulse-dot{width:8px;height:8px;border-radius:50%;background:var(--orange);box-shadow:0 0 0 5px rgba(237,75,0,.1)}.composer-wrap{position:fixed;left:calc(286px + (100vw - 286px - 320px)/2);bottom:16px;z-index:4;width:min(740px,calc(100vw - 666px));transform:translateX(-50%)}.composer{min-height:116px;padding:17px;border:1px solid #dedbd6;border-radius:20px;background:rgba(255,255,255,.96);box-shadow:0 14px 45px rgba(35,26,18,.12);backdrop-filter:blur(14px)}.composer-placeholder{color:#a8a6a2}.composer-tools{display:flex;justify-content:space-between;align-items:end;margin-top:30px}.composer-tools>div{display:flex;align-items:center;gap:8px}.composer-tools button{height:34px;border:0;background:transparent;cursor:pointer}.write-mode,.model-button{color:#73706c;font-size:13px}.send-button{width:36px;border-radius:50%;color:white;background:#4f82ef!important;font-size:18px}.status-line{margin:8px 0 0;text-align:center;color:#a4a09a;font-size:11px}.task-panel{padding:24px 22px;border-left:1px solid var(--line);background:#fbfaf8;overflow:auto}.task-panel-head{display:flex;justify-content:space-between;align-items:start}.task-panel-head small,.skill-card small{color:#9b958e}.task-panel h2{margin:4px 0 0;font-size:18px}.running-badge{padding:6px 9px;border-radius:999px;color:#bd3f0c;background:#fff0e8;font-size:11px;font-weight:700}.progress-block{margin-top:28px}.progress-block div{display:flex;justify-content:space-between;font-size:12px}.progress-track{display:block;height:7px;margin-top:9px;overflow:hidden;border-radius:5px;background:#e8e2db}.progress-track i{display:block;width:64%;height:100%;background:linear-gradient(90deg,#f47622,#df3e00)}.task-list{display:flex;flex-direction:column;gap:20px;margin:30px 0 0;padding:0;list-style:none}.task-list li{display:flex;gap:12px;color:#aaa49c}.task-list li>span{display:grid;place-items:center;flex:0 0 26px;height:26px;border:1px solid #d9d2ca;border-radius:50%;font-size:11px}.task-list li div{display:flex;flex-direction:column;gap:5px}.task-list b{color:#8d8882;font-size:13px}.task-list small{font-size:11px}.task-list .done>span{color:white;border-color:#4cad77;background:#4cad77}.task-list .done b{color:#4a4946}.task-list .current>span{color:white;border-color:var(--orange);background:var(--orange)}.task-list .current b{color:var(--ink)}.skill-card{margin-top:32px;padding:16px;border:1px solid var(--line);border-radius:14px;background:white}.skill-card strong{display:block;margin-top:6px;font-size:13px}.skill-card p{margin:7px 0 0;color:#8a857f;font-size:11px}@media(max-width:1080px){.conversation-stage{grid-template-columns:1fr}.task-panel{display:none}.composer-wrap{left:calc(286px + (100vw - 286px)/2);width:min(720px,calc(100vw - 340px))}}@media(max-width:760px){.app-shell{grid-template-columns:1fr}.sidebar{display:none}.topbar{padding:0 16px}.mode-pill,.top-actions .ghost-button{display:none}.conversation-stage{min-width:0}.chat-column{padding:28px 18px 160px}.composer-wrap{left:50%;width:calc(100vw - 24px)}.subnav{padding:0 18px}.user-message{max-width:88%}}

.sidebar-footer a { color: #7b7771; font-size: 12px; text-decoration: none; }
.message-stack { max-width: 820px; margin: 0 auto; }
.message-stack .user-message { margin-top: 18px; }
.message-stack .assistant-message { margin-top: 26px; }
.signin-banner { display: flex; justify-content: space-between; align-items: center; max-width: 820px; margin: 0 auto 22px; padding: 10px 13px; border: 1px solid #f5d9c8; border-radius: 11px; background: #fff6ef; color: #7f4a2d; font-size: 12px; }
.signin-banner a { padding: 7px 10px; border-radius: 8px; color: white; background: var(--orange); text-decoration: none; }
.empty-state { display: grid; place-items: center; min-height: 390px; text-align: center; }
.large-brand { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; color: white; background: linear-gradient(145deg,#ff6a12,#dc3b00); box-shadow: 0 14px 30px rgba(226,66,0,.2); font-weight: 800; }
.empty-state h2 { margin: 20px 0 5px; font-size: 26px; }
.empty-state p { margin: 0; color: #8c8780; }
.empty-state div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.empty-state button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #706b65; cursor: pointer; }
.composer textarea { display: block; width: 100%; height: 34px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.composer textarea::placeholder { color: #aaa6a1; }
.composer-tools { margin-top: 18px; }
.composer-tools select { max-width: 180px; height: 34px; border: 0; outline: 0; background: transparent; color: #73706c; font-size: 13px; }
.send-button:disabled { opacity: .5; }
.detail-view { max-width: 820px; margin: 0 auto; padding: 12px 0 170px; }
.detail-view > small { color: var(--orange); font-weight: 800; letter-spacing: .08em; }
.detail-view h2 { margin: 8px 0 28px; font-size: 26px; }
.trace-row { display: flex; gap: 14px; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.trace-row > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: white; background: #4cad77; font-size: 12px; }
.trace-row:last-child > span { background: var(--orange); }
.trace-row div { display: flex; flex-direction: column; gap: 5px; }
.trace-row small { color: #99938c; }
.workbench-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.workbench-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(40,30,20,.04); }
.workbench-grid article > span { color: #918b84; font-size: 12px; }
.workbench-grid strong { display: block; margin-top: 12px; font-size: 18px; }
.workbench-grid p { margin: 8px 0 18px; color: #89837d; font-size: 13px; }
.workbench-grid button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #faf8f5; cursor: pointer; }
@media (max-width: 760px) { .workbench-grid { grid-template-columns: 1fr; } .signin-banner { align-items: flex-start; gap: 10px; } .signin-banner a { white-space: nowrap; } .top-actions .usage-button { display: none; } }

html, body, #root { min-height: 100%; }
body { margin: 0; }
.portable-loading { min-height: 100vh; display: grid; place-content: center; gap: 14px; color: #736e69; background: #f8f6f2; text-align: center; }
.portable-loading span { width: 30px; height: 30px; margin: auto; border: 3px solid #ffd7c2; border-top-color: #ef5a16; border-radius: 50%; animation: portable-spin .8s linear infinite; }
@keyframes portable-spin { to { transform: rotate(360deg); } }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .95fr) minmax(520px, 1.35fr); background: #fffdfb; color: #201b18; }
.login-brand-panel { padding: clamp(40px, 6vw, 92px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: radial-gradient(circle at 20% 90%, rgba(255,255,255,.14), transparent 34%), linear-gradient(145deg, #f25c05 0%, #df3500 100%); overflow: hidden; }
.login-brand { display: flex; align-items: center; gap: 14px; font-size: 25px; }
.login-brand .brand-mark { background: rgba(255,255,255,.95); }
.login-eyebrow, .login-kicker { display: block; letter-spacing: .26em; font-weight: 800; font-size: 12px; }
.login-brand-panel h1 { margin: 25px 0 20px; font-size: clamp(50px, 6vw, 88px); line-height: 1.03; letter-spacing: -.055em; }
.login-brand-panel p { font-size: 18px; opacity: .82; }
.login-brand-panel > small { opacity: .72; }
.login-form-panel { display: grid; place-items: center; padding: 44px; }
.login-form-panel form { width: min(620px, 100%); }
.login-kicker { color: #b04a1d; }
.login-form-panel h2 { margin: 18px 0 8px; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.05em; }
.login-form-panel > form > p { margin: 0 0 34px; color: #8b817b; font-size: 16px; }
.login-form-panel label { display: grid; gap: 10px; margin: 20px 0; color: #59514d; font-weight: 700; }
.login-form-panel input { width: 100%; box-sizing: border-box; padding: 18px 20px; border: 1px solid #dfd6d0; border-radius: 15px; background: #fff; color: #241d19; font: inherit; outline: none; }
.login-form-panel input:focus { border-color: #ed6a2d; box-shadow: 0 0 0 4px rgba(237,106,45,.10); }
.password-wrap { position: relative; display: block; }
.password-wrap button { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #d14910; font-weight: 800; cursor: pointer; }
.login-submit { width: 100%; margin-top: 18px; padding: 18px; border: 0; border-radius: 15px; background: #de3b03; color: white; font-size: 18px; font-weight: 800; cursor: pointer; }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-help { display: block; margin-top: 22px; color: #968d87; text-align: center; }
.login-error { padding: 12px 14px; border-radius: 10px; color: #b42318; background: #fff0ee; }
.workspace { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.conversation-search { width: calc(100% - 14px); margin: 0 7px 8px; padding: 10px 12px; border: 1px solid #ddd8d2; border-radius: 9px; background: white; outline: none; }
.conversation-search:focus { border-color: #4f82ef; box-shadow: 0 0 0 3px rgba(79,130,239,.1); }
.no-conversations { padding: 18px 10px 18px 33px; color: #999; font-size: 13px; }
.mode-pill.disconnected { color: #b54708; }
.mode-pill.disconnected .mode-dot { background: #f79009; }
.engine-warning { display: flex; align-items: center; gap: 12px; padding: 9px 34px; border-bottom: 1px solid #fedf89; background: #fffaeb; color: #93370d; font-size: 12px; }
.engine-warning span { color: #b54708; }
.main-panel:has(.engine-warning) { grid-template-rows: 72px 50px 42px minmax(0,1fr); }
.conversation-loading { display: grid; place-items: center; gap: 10px; min-height: 260px; color: #8a857f; }
.conversation-loading span { width: 24px; height: 24px; border: 3px solid #f2d6ca; border-top-color: #ed4b00; border-radius: 50%; animation: portable-spin .8s linear infinite; }
.message-error { padding: 16px; border: 1px solid #fecdca; border-radius: 12px; background: #fff6f5; }
.message-error p { color: #b42318; }
.running-badge.blocked { color: #b42318; background: #fee4e2; }
.running-badge.idle { color: #475467; background: #eaecf0; }
.task-empty { margin-top: 28px; padding: 18px; border: 1px dashed #d8d1c9; border-radius: 14px; color: #736d66; background: white; }
.task-empty strong { display: block; color: #423d38; }
.task-empty p { margin: 10px 0 0; line-height: 1.7; font-size: 12px; }
.task-error,.trace-error { margin-top: 20px; padding: 14px; border-radius: 10px; color: #b42318; background: #fff0ee; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(25,20,16,.32); backdrop-filter: blur(5px); }
.app-modal { width: min(560px,100%); max-height: 75vh; overflow: auto; padding: 22px; border: 1px solid #e4ded8; border-radius: 18px; background: white; box-shadow: 0 24px 80px rgba(30,20,10,.22); }
.app-modal header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.app-modal h2 { margin: 0; font-size: 20px; }
.app-modal header button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f2f2f2; cursor: pointer; font-size: 22px; }
.session-list { display: grid; gap: 14px; padding: 0; list-style: none; }
.session-list li { display: flex; gap: 12px; }
.session-list li>span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: #f2f4f7; font-size: 12px; }
.session-list b { font-size: 13px; }.session-list p { margin: 4px 0 0; color: #667085; line-height: 1.6; }
.usage-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.usage-grid div { display: flex; flex-direction: column; gap: 5px; padding: 18px; border-radius: 12px; background: #f8f8f7; }
.usage-grid strong { font-size: 26px; }.usage-grid span { color: #7b7772; font-size: 12px; }
.sidebar-collapsed { grid-template-columns: 0 minmax(0,1fr); }.sidebar-collapsed .sidebar { visibility: hidden; padding: 0; overflow: hidden; }
.sidebar-collapsed .composer-wrap { left: calc((100vw - 320px)/2); }
@media (max-width: 880px) { .login-shell { grid-template-columns: 1fr; } .login-brand-panel { min-height: 260px; gap: 36px; } .login-brand-panel h1 { font-size: 48px; } .login-form-panel { padding: 34px 24px; } }
