:root {
  --ink: #20201e;
  --muted: #71716c;
  --soft: #9c9c96;
  --line: #e5e5e1;
  --wash: #f6f6f4;
  --panel: #fbfbfa;
  --violet: #6257d5;
  --green: #168d5a;
  --blue: #3478d4;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; }
body { min-width: 920px; min-height: 640px; overflow: hidden; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.web-app { height: 100%; display: flex; flex-direction: column; background: #fff; }

.topbar { height: 52px; flex: none; display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 0 18px; background: rgba(255,255,255,.94); }
.logo { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 680; letter-spacing: -.01em; }
.logo-mark { width: 22px; height: 22px; border-radius: 7px; background: #222220; position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 7px; border: 1.5px solid #fff; border-radius: 2px; transform: rotate(45deg); }
.topbar-center { margin: 0 auto; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.search-button, .avatar-button { border: 0; background: transparent; cursor: pointer; }
.search-button { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #666660; }
.search-button:hover { background: var(--wash); }
.avatar-button { width: 27px; height: 27px; border-radius: 50%; background: #e6e6e2; font-size: 9px; font-weight: 650; }
.topbar .avatar-button { display: grid; place-items: center; cursor: pointer; }
.topbar .avatar-button:hover { background: #dcdcd7; }

.home-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.global-sidebar { min-height: 0; display: flex; flex-direction: column; padding: 13px 10px 10px; border-right: 1px solid var(--line); background: #f7f7f5; }
.primary-nav { display: grid; gap: 3px; }
.primary-nav button { height: 36px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 10px; padding: 0 10px; background: transparent; color: #555550; font-size: 10px; cursor: pointer; }
.primary-nav button.active, .primary-nav button:hover { color: var(--ink); background: #eaeae7; }
.nav-label { margin: 21px 9px 7px; color: var(--soft); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.mini-workspace-row { position: relative; }
.mini-workspace { width: 100%; min-height: 43px; border: 0; border-radius: 7px; display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 8px; padding: 6px 8px; background: transparent; text-align: left; cursor: pointer; }
.mini-workspace:hover { background: #eaeae7; }
.mini-workspace-row .mini-workspace { padding-right: 34px; }
.mini-workspace-more { position: absolute; top: 7px; right: 4px; width: 27px; height: 29px; border: 0; border-radius: 6px; padding: 0; opacity: 0; color: var(--soft); background: transparent; letter-spacing: .06em; cursor: pointer; }
.mini-workspace-row:hover .mini-workspace-more, .mini-workspace-more:focus-visible, .mini-workspace-row.has-menu .mini-workspace-more { opacity: 1; }
.mini-workspace-more:hover { color: var(--ink); background: #deded9; }
.workspace-badge { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--violet); font-size: 9px; font-weight: 700; }
.workspace-badge.amber { background: #b67730; }
.workspace-badge.green { background: #287e5b; }
.mini-workspace b, .mini-workspace small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-workspace b { font-size: 9px; }
.mini-workspace small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.sidebar-user { width: 100%; margin-top: auto; height: 49px; border: 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 8px 7px 0; background: transparent; text-align: left; cursor: pointer; }
.sidebar-user:hover { background: #eeeeeb; }
.sidebar-user > span:first-child { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #e5e5e1; font-size: 9px; font-weight: 650; }
.sidebar-user b, .sidebar-user small { display: block; }
.sidebar-user b { font-size: 9px; }
.sidebar-user small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.home-main { min-width: 0; min-height: 0; overflow: auto; padding: 45px 48px 70px; }
.home-content { width: min(920px, 100%); margin: 0 auto; }
.eyebrow { color: var(--muted); font-size: 9px; }
.home-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; }
.home-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.home-heading p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.new-workspace-button { height: 34px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 7px; padding: 0 13px; color: #fff; background: #252523; font-size: 10px; font-weight: 600; cursor: pointer; }
.new-workspace-button:hover { background: #000; }
.workspace-grid { margin-top: 31px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workspace-card { min-width: 0; height: 157px; border: 1px solid var(--line); border-radius: 12px; position: relative; padding: 16px; background: #fff; text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
.workspace-card:hover { transform: translateY(-1px); border-color: #cfcfca; box-shadow: 0 7px 20px rgba(25,25,22,.06); }
.workspace-card:focus-visible { outline: 2px solid rgba(98,87,213,.38); outline-offset: 2px; }
.workspace-card.has-menu { z-index: 4; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-menu { width: 29px; height: 27px; margin: -5px -7px 0 0; border: 0; border-radius: 6px; display: grid; place-items: center; padding: 0; color: var(--soft); background: transparent; letter-spacing: .08em; cursor: pointer; }
.card-menu:not(.card-menu-static):hover, .workspace-card.has-menu .card-menu { color: var(--ink); background: var(--wash); }
.card-menu-static { cursor: default; }
.workspace-card h2 { margin: 15px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.workspace-card p { margin: 0; color: var(--muted); font-size: 8px; }
.card-footer { margin-top: 17px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 8px; }
.running-dot { display: inline-flex; align-items: center; gap: 5px; color: #4b675a; }
.running-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.workspace-list-empty { min-height: 220px; grid-column: 1 / -1; border: 1px dashed #d8d8d3; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; background: #fbfbfa; }
.workspace-list-empty .agent-symbol { margin-bottom: 11px; }
.workspace-list-empty b { font-size: 12px; }
.workspace-list-empty p { margin: 6px 0 14px; color: var(--muted); font-size: 9px; }
.workspace-list-empty button { height: 30px; border: 1px solid #d4d4cf; border-radius: 7px; padding: 0 11px; background: #fff; font-size: 9px; cursor: pointer; }
.workspace-list-empty button:hover { background: var(--wash); }
.list-page-heading { margin-top: 6px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.list-page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.list-page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.all-files-list { margin-top: 8px; }
.file-list-empty { padding: 64px 10px; color: var(--muted); text-align: center; }
.file-list-empty b { color: var(--ink); font-size: 11px; }
.file-list-empty p { margin: 7px 0 0; font-size: 9px; }
.recent-row { width: 100%; height: 55px; border: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 29px minmax(0,1fr) 125px 72px 16px; align-items: center; gap: 9px; padding: 0 7px; background: #fff; text-align: left; cursor: pointer; }
.recent-row:hover { background: #fafaf8; }
.file-icon { width: 25px; height: 29px; border-radius: 3px 6px 6px 3px; display: grid; place-items: center; color: #fff; background: var(--blue); font-size: 7px; font-weight: 750; }
.file-icon.excel { background: #25815a; }
.file-icon.slides { background: #d46d35; }
.file-copy b, .file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy b { font-size: 9px; }
.file-copy small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.recent-row > span:not(.file-icon):not(.file-copy) { color: var(--muted); font-size: 8px; }

.workspace-layout { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.workspace-header { height: 57px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 17px 0 12px; border-bottom: 1px solid var(--line); }
.workspace-id { min-width: 0; display: flex; align-items: center; gap: 9px; }
.back-button { width: 30px; height: 30px; border: 0; border-radius: 7px; display: grid; place-items: center; background: transparent; color: #656560; cursor: pointer; }
.back-button:hover { background: var(--wash); }
.workspace-id b, .workspace-id small { display: block; }
.workspace-id b { font-size: 12px; }
.workspace-id small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.workspace-actions { display: flex; align-items: center; gap: 7px; }
.workspace-state { margin-right: 5px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.workspace-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #b3b3ad; }
.workspace-state.live::before { background: var(--green); }
.plain-button { height: 29px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; background: #fff; font-size: 9px; cursor: pointer; }
.plain-button:hover { background: var(--wash); }

.empty-workspace { min-height: 0; flex: 1; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 43px 34px 28px; background: radial-gradient(circle at 50% 0, #fbfbfa 0, #fff 42%); }
.start-copy { text-align: center; }
.agent-symbol { width: 32px; height: 32px; margin: 0 auto 14px; border: 1px solid #d6d6d1; border-radius: 9px; display: block; position: relative; background: #fff; box-shadow: 0 3px 10px rgba(25,25,22,.05); }
.agent-symbol::after { content: ""; position: absolute; inset: 9px; border: 1.5px solid #373733; border-radius: 2px; transform: rotate(45deg); }
.start-copy h1 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.start-copy p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.drop-zone { width: min(680px, 100%); min-height: 169px; margin-top: 26px; border: 1px dashed #c9c9c3; border-radius: 14px; display: grid; place-items: center; background: var(--panel); transition: .15s; }
.drop-zone.dragging { border-color: var(--violet); background: #f7f6fd; box-shadow: 0 0 0 3px rgba(98,87,213,.08); }
.drop-placeholder { padding: 20px; text-align: center; }
.upload-icon { width: 34px; height: 34px; margin: 0 auto 10px; border: 1px solid #dadad5; border-radius: 9px; display: grid; place-items: center; color: #666661; background: #fff; }
.drop-placeholder b { display: block; font-size: 11px; }
.drop-placeholder p { margin: 5px 0 12px; color: var(--muted); font-size: 8px; }
.pick-file { height: 28px; border: 1px solid var(--line); border-radius: 7px; padding: 0 11px; background: #fff; font-size: 8px; cursor: pointer; }
.pick-file:hover { background: var(--wash); }
.staged-panel { width: 100%; align-self: stretch; padding: 15px 17px; }
.staged-heading { display: flex; align-items: center; gap: 9px; }
.ready-icon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--green); background: #e5f5ec; font-size: 9px; }
.staged-heading b, .staged-heading small { display: block; }
.staged-heading b { font-size: 10px; }
.staged-heading small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.staged-heading button { margin-left: auto; }
.staged-list { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.staged-chip { height: 31px; max-width: 210px; border: 1px solid var(--line); border-radius: 7px; display: flex; align-items: center; gap: 7px; padding: 0 8px; background: #fff; }
.staged-chip .tiny-file { width: 17px; height: 20px; flex: none; border-radius: 2px 4px 4px 2px; display: grid; place-items: center; color: #fff; background: #6b778a; font-size: 5px; font-weight: 700; }
.staged-chip > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.staged-chip > small { flex: none; color: var(--soft); font-size: 7px; }
.staged-chip button { width: 15px; height: 15px; border: 0; padding: 0; background: transparent; color: var(--soft); cursor: pointer; }
.storage-spinner { position: relative; }
.storage-spinner::after { content: ""; width: 13px; height: 13px; border: 1.5px solid #d4d4cf; border-top-color: var(--violet); border-radius: 50%; animation: storage-spin .8s linear infinite; }
@keyframes storage-spin { to { transform: rotate(360deg); } }
.local-storage-note { width: min(680px,100%); min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 6px 3px 0; color: var(--muted); }
.local-icon { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: #f0f0ed; color: #656560; font-size: 9px; }
.local-storage-note b, .local-storage-note small { display: block; }
.local-storage-note b { color: #686863; font-size: 8px; font-weight: 600; }
.local-storage-note small { margin-top: 2px; color: var(--soft); font-size: 7px; }
.local-storage-note button { margin-left: auto; border: 0; background: transparent; color: #5e55bc; font-size: 8px; cursor: pointer; }
.persisted-label { margin-left: auto; color: var(--green); font-size: 8px; }
.import-error { width: min(680px,100%); margin-top: 4px; color: #b44840; font-size: 8px; }
.divider { width: min(680px,100%); height: 36px; display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 7px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: #eeeeeb; }
.composer { width: min(680px,100%); min-height: 111px; border: 1px solid #cecec8; border-radius: 14px; padding: 11px 11px 8px; background: #fff; box-shadow: 0 8px 25px rgba(25,25,22,.08); }
.composer:focus-within { border-color: #aaa9a2; }
.composer-input { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 9px; }
.small-agent { width: 24px; height: 24px; border: 1px solid #d5d5d0; border-radius: 7px; position: relative; }
.small-agent::after { content: ""; position: absolute; inset: 7px; border: 1.5px solid #333330; border-radius: 2px; transform: rotate(45deg); }
.composer textarea { min-width: 0; height: 48px; border: 0; outline: 0; resize: none; padding: 3px 0; font-size: 11px; line-height: 1.5; }
.composer-footer { height: 30px; display: flex; align-items: center; }
.attach-button { width: 26px; height: 26px; border: 0; border-radius: 6px; display: grid; place-items: center; background: transparent; color: #686862; cursor: pointer; }
.attach-button:hover { background: var(--wash); }
.context-pill { height: 25px; border: 0; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: #f2f2ef; font-size: 8px; }
.context-pill i { width: 5px; height: 5px; border-radius: 50%; background: #aaa9a3; }
.context-pill i.ready { background: var(--green); }
.send-hint { margin-left: auto; color: var(--soft); font-size: 7px; }
.send-button { width: 28px; height: 28px; margin-left: 8px; border: 0; border-radius: 8px; display: grid; place-items: center; color: #fff; background: #292927; cursor: pointer; }
.send-button:hover { background: #000; }
.validation { height: 0; overflow: hidden; padding-left: 34px; color: #b44840; font-size: 8px; }
.validation.visible { height: 16px; padding-top: 4px; }
.suggestion-row { width: min(680px,100%); margin-top: 12px; display: flex; justify-content: center; gap: 6px; }
.suggestion-row button { height: 27px; border: 1px solid var(--line); border-radius: 7px; padding: 0 10px; color: #666661; background: #fff; font-size: 8px; cursor: pointer; }
.suggestion-row button:hover { border-color: #cacac5; color: var(--ink); }

.workbench { min-height: 0; flex: 1; display: grid; grid-template-columns: 246px minmax(0,1fr); }
.workspace-explorer { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--panel); }
.explorer-head { min-height: 66px; display: grid; grid-template-columns: 30px minmax(0,1fr) 30px; align-items: center; gap: 7px; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.explorer-head-copy { min-width: 0; }
.explorer-head h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.explorer-head p { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.explorer-back, .explorer-more, .task-narrow-back { width: 30px; height: 30px; border: 0; border-radius: 7px; display: grid; place-items: center; padding: 0; color: #656560; background: transparent; cursor: pointer; }
.explorer-back:hover, .explorer-more:hover, .task-narrow-back:hover { color: var(--ink); background: #eeeeeb; }
.explorer-more { font-size: 13px; letter-spacing: .04em; }
.explorer-head { position: relative; }

.workspace-context-menu { position: absolute; z-index: 30; top: 38px; right: 7px; width: 148px; border: 1px solid #deded9; border-radius: 9px; padding: 5px; background: rgba(255,255,255,.98); box-shadow: 0 10px 30px rgba(25,25,22,.14); cursor: default; }
.workspace-card .workspace-context-menu { top: 39px; right: 9px; }
.mini-workspace-row .workspace-context-menu { top: 36px; right: 3px; }
.workspace-context-menu button { width: 100%; height: 31px; border: 0; border-radius: 6px; display: flex; align-items: center; padding: 0 9px; color: #393936; background: transparent; text-align: left; font-size: 10px; cursor: pointer; }
.workspace-context-menu button:hover, .workspace-context-menu button:focus-visible { outline: 0; background: #f0f0ed; }
.workspace-context-menu button.destructive { color: #b33f38; }
.workspace-context-menu button.destructive:hover, .workspace-context-menu button.destructive:focus-visible { background: #fff0ee; }
.workspace-menu-divider { height: 1px; margin: 4px; background: var(--line); }
.workspace-start-header { height: 44px; flex: none; display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; position: relative; padding: 0 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.workspace-start-header b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.workspace-loading-back { position: fixed; z-index: 3; top: 9px; left: 9px; }
.explorer-section { padding: 11px 9px 7px; }
.explorer-section.tasks { border-bottom: 1px solid var(--line); }
.explorer-title { height: 27px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; color: var(--muted); font-size: 10px; font-weight: 650; }
.explorer-title button { border: 0; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.task-item, .file-item { width: 100%; border: 0; border-radius: 7px; display: grid; align-items: center; background: transparent; text-align: left; cursor: pointer; }
.task-item:hover, .file-item:hover, .task-item.active, .file-item.active { background: #ecece9; }
.task-item { min-height: 42px; grid-template-columns: 17px minmax(0,1fr); gap: 8px; padding: 6px; }
.task-state { width: 15px; height: 15px; border: 1px solid #d2d2cd; border-radius: 50%; position: relative; }
.task-state::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--violet); }
.task-state.done { border: 0; display: grid; place-items: center; color: var(--green); background: #e2f3e9; font-size: 7px; }
.task-state.done::after { display: none; }
.task-item b, .task-item small, .file-item b, .file-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item b, .file-item b { font-size: 12px; }
.task-item small, .file-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.explorer-section.files { min-height: 0; flex: 1; overflow: auto; }
.file-item { min-height: 42px; grid-template-columns: 23px minmax(0,1fr); gap: 8px; padding: 5px 6px; }
.file-item .file-icon { width: 22px; height: 26px; font-size: 6px; }
.explorer-context { min-height: 52px; margin-top: auto; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 9px 14px; }
.explorer-context > i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.explorer-context b, .explorer-context small { display: block; }
.explorer-context b { font-size: 10px; }
.explorer-context small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.content-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: #eeeeeb; }
.tabs { height: 38px; flex: none; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); background: #f6f6f4; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-width: 112px; max-width: 235px; flex: 0 1 190px; border-right: 1px solid var(--line); display: flex; align-items: center; color: var(--muted); background: #f1f1ee; font-size: 8px; }
.tab.active { color: var(--ink); background: #fff; }
.tab-open { min-width: 0; height: 100%; flex: 1; border: 0; display: flex; align-items: center; gap: 7px; padding: 0 5px 0 10px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.tab-open span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-close { width: 23px; height: 23px; flex: none; margin-right: 5px; border: 0; border-radius: 5px; padding: 0; color: #aaa9a3; background: transparent; font-size: 13px; line-height: 1; cursor: pointer; }
.tab-close:hover { color: var(--ink); background: #e7e7e3; }
.tabs > small { min-width: max-content; margin-left: auto; align-self: center; padding: 0 12px; color: var(--muted); font-size: 7px; }
.history-button { height: 25px; align-self: center; margin-left: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; color: var(--muted); background: #fff; font-size: 8px; cursor: pointer; }
.history-button:hover { color: var(--ink); background: var(--wash); }
.document-scroll { min-height: 0; flex: 1; overflow: auto; padding: 23px 24px 38px; }
.history-button[href] { display: inline-flex; align-items: center; text-decoration: none; }
.server-document-scroll { display: block; }
.server-preview-frame { width: min(780px,100%); min-height: 820px; height: 100%; margin: 0 auto; display: block; border: 1px solid #dfdfda; background: #fff; box-shadow: 0 13px 34px rgba(26,26,23,.08); }
.server-pdf-preview { width: min(780px,100%); min-height: 820px; margin: 0 auto; }
.pdf-page-stack { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.pdf-page-canvas { max-width: 100%; height: auto; display: block; border: 0; background: #fff; box-shadow: 0 3px 14px rgba(26,26,23,.11); }
.preview-loading, .preview-error { min-height: 220px; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.preview-error { color: #8a3d3d; }
.preview-page-indicator { min-width: 48px; height: 25px; align-self: center; margin-left: 8px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 7px; color: var(--muted); background: #fff; font-size: 10px; font-variant-numeric: tabular-nums; }
.preview-page-indicator i { color: var(--soft); font-style: normal; }
.preview-zoom-controls { height: 25px; align-self: center; margin-left: 8px; border: 1px solid var(--line); border-radius: 6px; display: flex; overflow: hidden; background: #fff; }
.preview-zoom-controls button { width: 25px; border: 0; border-right: 1px solid var(--line); padding: 0; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.preview-zoom-controls button:last-child { border-right: 0; }
.preview-zoom-controls button:hover { color: var(--ink); background: var(--wash); }
.preview-zoom-controls .preview-zoom-value { width: 40px; font-size: 8px; }
.empty-content-stage { display: grid; place-items: center; background: #f7f7f5; }
.empty-file-state { max-width: 310px; padding: 30px; color: var(--muted); text-align: center; }
.empty-file-state > span { width: 42px; height: 42px; margin: 0 auto 13px; border: 1px solid var(--line); border-radius: 11px; display: grid; place-items: center; color: #73736d; background: #fff; }
.empty-file-state b { display: block; color: var(--ink); font-size: 11px; }
.empty-file-state p { margin: 6px 0 0; font-size: 8px; line-height: 1.6; }
.source-file-preview { min-height: 0; flex: 1; display: grid; place-items: center; overflow: auto; padding: 28px; }
.source-file-card { width: min(430px,100%); border: 1px solid var(--line); border-radius: 14px; padding: 34px; background: #fff; box-shadow: 0 8px 30px rgba(25,25,22,.06); text-align: center; }
.source-file-icon { width: 42px; height: 49px; margin: 0 auto 16px; font-size: 9px; }
.source-file-card h2 { margin: 0; overflow-wrap: anywhere; font-size: 15px; }
.source-file-card > p { margin: 6px 0 0; color: var(--muted); font-size: 8px; }
.source-file-note { margin-top: 25px; border-radius: 9px; padding: 12px 14px; background: #f3f3f0; text-align: left; }
.source-file-note b, .source-file-note span { display: block; }
.source-file-note b { font-size: 8px; }
.source-file-note span { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.6; }
.paper { width: min(565px,100%); min-height: 640px; margin: 0 auto; padding: 58px 64px 75px; outline: none; background: #fff; box-shadow: 0 1px 5px rgba(28,28,24,.14); }
.paper h1 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.paper .meta { margin: 8px 0 28px; color: #85857f; font-size: 8px; }
.paper h3 { margin: 22px 0 8px; font-size: 12px; }
.paper p { margin: 0; font-family: SimSun, "Songti SC", serif; font-size: 9px; line-height: 1.85; }
.result-table { margin-top: 10px; border: 1px solid #dcdcd7; border-radius: 3px; overflow: hidden; font-size: 8px; }
.result-table > div { min-height: 28px; display: grid; grid-template-columns: 1fr 74px 55px; align-items: center; padding: 0 9px; border-top: 1px solid #e5e5e1; }
.result-table > div:first-child { border-top: 0; background: #f4f4f1; color: var(--muted); font-size: 7px; }
.result-table em { color: var(--green); font-style: normal; }
.bottom-composer { height: 87px; flex: none; margin: 9px 13px 13px; border: 1px solid #cecec8; border-radius: 11px; padding: 10px; background: #fff; box-shadow: 0 5px 17px rgba(25,25,22,.08); }
.bottom-composer textarea { width: 100%; height: 34px; border: 0; outline: 0; resize: none; padding: 0; font-size: 9px; }
.bottom-tools { display: flex; align-items: center; }
.bottom-tools span { color: var(--muted); font-size: 9px; }
.bottom-tools button { margin-left: auto; }

.task-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.task-top { height: 49px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); }
.task-heading { min-width: 0; display: flex; align-items: center; gap: 7px; }
.task-narrow-back { display: none; }
.task-top h2 { margin: 0; font-size: 13px; }
.task-top span { color: var(--muted); font-size: 10px; }
.task-top span:empty { display: none; }
.task-top-actions { display: flex; align-items: center; gap: 8px; }
.preview-reveal { height: 29px; border: 1px solid var(--line); border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; color: var(--muted); background: #fff; font-size: 10px; cursor: pointer; }
.preview-reveal:hover { color: var(--ink); background: var(--wash); }
.preview-reveal.is-hidden { display: none; }
.preview-reveal .icon { width: 14px; height: 14px; }
.thread { min-height: 0; flex: 1; overflow: auto; padding: 29px max(28px, calc((100% - 660px)/2)) 40px; }
.conversation-turn + .conversation-turn { margin-top: 34px; padding-top: 34px; border-top: 1px solid #ecece8; }
.user-message { margin-left: 72px; border-radius: 11px 11px 3px 11px; padding: 12px 14px; background: #f1f1ee; font-size: 13px; line-height: 1.65; }
.agent-message { margin-top: 22px; display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 10px; }
.agent-response { margin: 1px 0 14px; font-size: 13px; line-height: 1.7; }
.markdown-body { overflow-wrap: anywhere; }
.markdown-body p { margin: 0 0 9px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body a { color: #3b55aa; text-decoration: underline; text-underline-offset: 2px; }
.markdown-body code, .step code { border-radius: 4px; padding: 1px 4px; background: #f0f0ed; font-family: Consolas, "SFMono-Regular", monospace; font-size: .92em; }
.markdown-body pre { overflow: auto; margin: 10px 0; border-radius: 8px; padding: 11px 12px; background: #f4f4f1; }
.markdown-body pre code { padding: 0; background: transparent; }
.markdown-body ul, .markdown-body ol { margin: 7px 0 9px; padding-left: 22px; }
.markdown-body li + li { margin-top: 4px; }
.markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 13px 0 7px; font-size: 1em; }
.agent-activity { margin-top: 10px; }
.agent-activity > summary { min-height: 35px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; list-style: none; }
.agent-activity > summary::-webkit-details-marker { display: none; }
.agent-activity > summary::before { content: "›"; font-size: 12px; transform: rotate(0); transition: transform .15s ease; }
.agent-activity[open] > summary::before { transform: rotate(90deg); }
.agent-activity > summary small { margin-left: auto; color: var(--soft); font-size: 9px; }
.step-list { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.step { min-height: 49px; display: grid; grid-template-columns: 17px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step b, .step small { display: block; }
.step b { font-size: 11px; line-height: 1.45; }
.step small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.step > span:last-child { color: var(--muted); font-size: 9px; }
.step.pending { opacity: .48; }
.task-state.pending::after { display: none; }
.task-state.failed { border: 0; display: grid; place-items: center; color: #a74841; background: #f8e8e5; font-size: 8px; }
.task-state.failed::after { display: none; }
.task-progress { height: 3px; margin-top: 12px; border-radius: 3px; overflow: hidden; background: #eeeeea; }
.task-progress i { height: 100%; display: block; border-radius: inherit; background: var(--violet); transition: width .45s ease; }
.created-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; display: flex; align-items: center; gap: 9px; padding: 10px; cursor: pointer; }
.created-card:hover { background: var(--panel); }
.created-card b, .created-card small { display: block; }
.created-card b { font-size: 12px; }
.created-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.created-card > span:last-child { margin-left: auto; color: var(--muted); }
.task-reply { width: min(660px,calc(100% - 56px)); min-height: 75px; margin: 9px auto 13px; border: 1px solid #cecec8; border-radius: 11px; padding: 10px; background: #fff; box-shadow: 0 5px 17px rgba(25,25,22,.07); }
.task-reply textarea { width: 100%; height: 36px; border: 0; outline: 0; resize: none; font-size: 13px; }
.server-workbench.preview-open { grid-template-columns: 246px minmax(360px,.9fr) minmax(480px,1.1fr); }
.server-workbench.preview-closed { grid-template-columns: 246px minmax(0,1fr); }
.preview-dock { border-left: 1px solid var(--line); }
.preview-dock.is-hidden { display: none; }
.preview-dock .document-scroll { padding-left: 18px; padding-right: 18px; }
.preview-hide-button { width: 27px; height: 27px; flex: none; align-self: center; margin: 0 7px 0 6px; border: 0; border-radius: 6px; display: grid; place-items: center; color: var(--muted); background: transparent; cursor: pointer; }
.preview-hide-button:hover { color: var(--ink); background: #e8e8e4; }
.preview-hide-button .icon { width: 15px; height: 15px; transform: scaleX(-1); }
.empty-conversation-stage { background: #fff; }
.empty-conversation { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.empty-conversation .agent-symbol { margin: 0 0 14px; }
.empty-conversation h2 { margin: 0; font-size: 15px; }
.empty-conversation p { max-width: 360px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.version-panel { position: absolute; z-index: 8; top: 38px; right: 0; bottom: 0; width: 275px; border-left: 1px solid var(--line); background: rgba(251,251,250,.98); box-shadow: -8px 0 24px rgba(25,25,22,.08); }
.version-panel > header { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid var(--line); }
.version-panel header b, .version-panel header small { display: block; }
.version-panel header b { font-size: 10px; }
.version-panel header small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.version-panel header button { width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.version-panel header button:hover { background: #eeeeeb; }
.version-list { max-height: calc(100% - 58px); overflow: auto; padding: 8px; }
.version-row { width: 100%; min-height: 50px; border: 0; border-radius: 7px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; background: transparent; text-align: left; cursor: pointer; }
.version-row:hover { background: #eeeeeb; }
.version-dot { width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 1px #bdbdb7; }
.version-row b, .version-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-row b { font-size: 8px; }
.version-row small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.version-row i { color: var(--muted); font-size: 7px; font-style: normal; }

.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; transform: translate(-50%, 12px); border: 1px solid #deded9; border-radius: 8px; padding: 9px 12px; opacity: 0; pointer-events: none; color: #fff; background: #292927; box-shadow: 0 7px 25px rgba(20,20,18,.18); font-size: 8px; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.workspace-dialog-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(24,24,22,.26); backdrop-filter: blur(2px); }
.workspace-dialog { width: min(390px,100%); border: 1px solid #deded9; border-radius: 13px; padding: 18px; background: #fff; box-shadow: 0 22px 70px rgba(20,20,18,.22); }
.workspace-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.workspace-dialog h2 { margin: 1px 0 0; font-size: 16px; line-height: 1.35; letter-spacing: -.015em; }
.workspace-dialog header button { width: 27px; height: 27px; flex: none; border: 0; border-radius: 6px; padding: 0; color: var(--muted); background: transparent; font-size: 17px; cursor: pointer; }
.workspace-dialog header button:hover { color: var(--ink); background: var(--wash); }
.workspace-dialog label { display: block; margin: 20px 0 7px; color: #565651; font-size: 10px; font-weight: 650; }
.workspace-dialog input { width: 100%; height: 38px; border: 1px solid #cecec8; border-radius: 8px; outline: 0; padding: 0 11px; color: var(--ink); background: #fff; font-size: 12px; }
.workspace-dialog input:focus { border-color: #888881; box-shadow: 0 0 0 3px rgba(98,87,213,.1); }
.workspace-dialog-error { min-height: 17px; margin: 5px 0 0; color: #b33f38; font-size: 9px; }
.workspace-delete-warning { margin: 15px 0 4px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.workspace-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.workspace-dialog footer button { height: 34px; border: 1px solid #d9d9d4; border-radius: 8px; padding: 0 13px; color: #444440; background: #fff; font-size: 10px; font-weight: 600; cursor: pointer; }
.workspace-dialog footer button:hover { background: var(--wash); }
.workspace-dialog footer button.primary { border-color: #292927; color: #fff; background: #292927; }
.workspace-dialog footer button.primary:hover { background: #000; }
.workspace-dialog footer button.danger { border-color: #b9453e; color: #fff; background: #b9453e; }
.workspace-dialog footer button.danger:hover { background: #a93832; }
.workspace-dialog button:disabled, .workspace-dialog input:disabled { opacity: .55; cursor: wait; }
.account-dialog { width: min(410px,100%); }
.account-dialog header > div { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 9px; }
.account-dialog header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.microsoft-mark { width: 22px; height: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }
.account-intro { margin: 19px 0 16px; color: #5f5f5a; font-size: 10px; line-height: 1.65; }
.account-email { margin: 5px 0 17px 31px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-privacy, .account-connection { border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: var(--panel); }
.account-privacy b, .account-privacy small, .account-connection b, .account-connection small { display: block; }
.account-privacy b, .account-connection b { font-size: 10px; }
.account-privacy small, .account-connection small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.account-connection { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 9px; align-items: start; }
.account-connection > span { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #b4b4ae; }
.account-connection.connected > span { background: var(--green); box-shadow: 0 0 0 3px rgba(22,141,90,.1); }
.account-dialog footer { margin-top: 18px; }
.device-code { width: 100%; height: 68px; border: 1px solid #d7d7d2; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--ink); background: #f7f7f5; font-size: 25px; font-weight: 700; letter-spacing: .13em; cursor: pointer; }
.device-code:hover { border-color: #bdbdb7; background: #f2f2ef; }
.device-code small { color: var(--muted); font-size: 8px; font-weight: 500; letter-spacing: 0; }
.microsoft-login-link { width: 100%; height: 38px; margin-top: 10px; border: 0; border-radius: 8px; color: #fff; background: #292927; font-size: 10px; font-weight: 650; cursor: pointer; }
.microsoft-login-link:hover { background: #000; }
.login-progress { min-height: 18px; margin: 13px 0 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.login-progress > span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: login-pulse 1.3s ease-in-out infinite; }
.login-progress.has-error { color: #b33f38; }
.login-progress.has-error > span { background: #b33f38; animation: none; }
@keyframes login-pulse { 50% { opacity: .3; transform: scale(.8); } }
.boot-screen { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); background: #fff; font-size: 9px; }
.boot-screen .logo-mark { display: block; }

@media (max-width: 1100px) {
  .home-main { padding-left: 32px; padding-right: 32px; }
  .workspace-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workbench { grid-template-columns: 232px minmax(0,1fr); }
  .paper { padding-left: 52px; padding-right: 52px; }
}

@media (max-width: 1180px) {
  .server-workbench.preview-open { grid-template-columns: minmax(360px,.85fr) minmax(480px,1.15fr); }
  .server-workbench.preview-open > .workspace-explorer { display: none; }
  .server-workbench.preview-open .task-narrow-back { display: grid; }
}

@media (max-height: 730px) {
  .empty-workspace { padding-top: 28px; }
  .drop-zone { min-height: 151px; margin-top: 20px; }
  .start-copy .agent-symbol { margin-bottom: 10px; }
  .suggestion-row { margin-top: 9px; }
}
