/* WorkBlock 5.6.8 — Document & Knowledge Workspace */
.document-hub-page,.document-editor-page{min-width:0}.document-hub-head{align-items:flex-end}.document-library-switch{display:inline-flex;gap:4px;padding:4px;margin:0 0 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff)}.document-library-switch button{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 15px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:700;cursor:pointer}.document-library-switch button.active{background:var(--accent-soft,#eef4ff);color:var(--accent,#246bfd)}
.document-library-shell{display:grid;grid-template-columns:230px minmax(420px,1fr) minmax(360px,440px);min-height:calc(100vh - 235px);overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff)}
.document-library-sidebar{min-width:0;padding:16px 12px;overflow:auto;border-right:1px solid var(--line);background:color-mix(in srgb,var(--surface,#fff) 94%,var(--page,#f6f8fb))}.document-sidebar-title{display:flex;align-items:center;justify-content:space-between;padding:2px 10px 12px}.document-library-sidebar>button{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:38px;padding:7px 10px;border:0;border-radius:10px;background:transparent;color:var(--text);text-align:left;cursor:pointer}.document-library-sidebar>button:hover{background:var(--hover,#f1f4f8)}.document-library-sidebar>button.active{background:var(--accent-soft,#edf3ff);color:var(--accent,#246bfd);font-weight:700}.document-library-sidebar button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-library-sidebar button em{font-style:normal;font-size:11px;color:var(--muted)}.document-sidebar-section{padding:18px 10px 7px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.document-tree-row{padding-left:calc(10px + var(--tree-depth,0)*16px)!important}
.document-library-list{min-width:0;overflow:auto;border-right:1px solid var(--line)}.document-library-toolbar{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface,#fff) 94%,transparent);backdrop-filter:blur(12px)}.document-library-toolbar .search-field{flex:1}.document-library-toolbar>span{white-space:nowrap;color:var(--muted);font-size:12px}.document-list-head,.document-list-row{display:grid;grid-template-columns:minmax(240px,1fr) 130px 145px 92px;gap:12px;align-items:center}.document-list-head{padding:10px 16px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--line)}.document-list-row{width:100%;min-height:76px;padding:12px 16px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);text-align:left;cursor:pointer}.document-list-row:hover{background:var(--hover,#f8fafc)}.document-list-row.active{background:var(--accent-soft,#f1f5ff);box-shadow:inset 3px 0 var(--accent,#246bfd)}.document-list-main{display:grid;grid-template-columns:34px minmax(0,1fr) 18px;gap:10px;align-items:center}.document-list-main>i{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--panel,#f2f5f8);color:var(--accent,#246bfd);font-style:normal}.document-list-main>span{display:flex;min-width:0;flex-direction:column;gap:3px}.document-list-main b,.document-list-main small,.document-list-main em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-list-main small,.document-list-main em,.document-list-row>span>small{color:var(--muted);font-size:11px;font-style:normal}.document-list-row>span:nth-child(2){display:flex;flex-direction:column;align-items:flex-start;gap:5px}.review-mini{font-style:normal}.review-mini.pending{color:#b66a00}.review-mini.approved{color:#137447}.review-mini.changes_requested{color:#bd3131}.document-empty{margin:24px}
.document-preview-panel{position:relative;display:flex;min-width:0;flex-direction:column;overflow:hidden;background:var(--surface,#fff)}.document-preview-header{display:flex;justify-content:space-between;gap:16px;padding:20px 20px 10px}.document-preview-header h2{margin:4px 0 0;font-size:21px;line-height:1.25}.document-preview-meta{display:flex;flex-wrap:wrap;gap:6px;padding:0 20px 13px}.document-preview-meta span{padding:4px 8px;border-radius:999px;background:var(--panel,#f2f5f8);color:var(--muted);font-size:11px}.document-preview-tabs{display:flex;gap:2px;padding:0 14px;border-bottom:1px solid var(--line);overflow-x:auto}.document-preview-tabs button{min-height:38px;padding:0 9px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-weight:700;white-space:nowrap;cursor:pointer}.document-preview-tabs button.active{border-color:var(--accent,#246bfd);color:var(--accent,#246bfd)}.document-preview-body,.document-info-panel,.document-version-list,.document-comments-panel{flex:1;min-height:0;padding:20px;overflow:auto}.document-rendered{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.document-rendered h1,.document-rendered h2,.document-rendered h3{margin:1.3em 0 .55em;line-height:1.25}.document-rendered h1:first-child,.document-rendered h2:first-child{margin-top:0}.document-rendered pre{max-width:100%;padding:14px;overflow:auto;border-radius:12px;background:#101621;color:#eef5ff}.document-rendered code{padding:2px 5px;border-radius:5px;background:var(--panel,#f0f3f7)}.document-rendered pre code{padding:0;background:transparent}.document-rendered blockquote{margin:14px 0;padding:10px 14px;border-left:3px solid var(--accent,#246bfd);background:var(--accent-soft,#eef4ff)}.document-rendered img{max-width:100%;border-radius:12px}.document-preview-actions{display:flex;gap:8px;padding:14px 20px;border-top:1px solid var(--line);background:var(--surface,#fff)}.helpful-box{display:flex;align-items:center;gap:8px;margin-top:28px;padding:12px;border-radius:12px;background:var(--panel,#f4f6f8)}.helpful-box span{margin-right:auto;font-weight:700}.helpful-box button{border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);padding:6px 9px;cursor:pointer}
.document-info-panel dl{display:grid;gap:8px;margin:0 0 20px}.document-info-panel dl>div{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line)}.document-info-panel dt{color:var(--muted)}.document-info-panel dd{margin:0;text-align:right}.document-info-panel h3{margin:22px 0 10px}.document-attachment,.document-version-list article,.document-review-log{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}.document-attachment>span,.document-version-list article>div{display:flex;min-width:0;flex:1;flex-direction:column}.document-attachment small,.document-version-list small,.document-review-log small{color:var(--muted)}.document-review-log{display:block}.document-review-log p{margin:4px 0}.document-version-list article{align-items:flex-start}.document-comments-panel{display:flex;flex-direction:column;gap:14px}.document-comments-panel>article{display:grid;grid-template-columns:32px 1fr;gap:9px}.document-comments-panel>article>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--accent-soft,#edf3ff);color:var(--accent,#246bfd);font-size:11px;font-weight:800}.document-comments-panel p{margin:4px 0}.document-comments-panel small{color:var(--muted)}.document-comment-compose{display:grid;gap:8px;margin-top:auto;padding-top:12px}.document-comment-compose textarea{min-height:84px}
.document-editor-page{max-width:none!important}.document-editor-header{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:-4px 0 16px;padding:10px 0 14px;border-bottom:1px solid var(--line);background:var(--page,#f6f8fb)}.document-editor-heading{display:flex;align-items:flex-start;gap:10px;min-width:0}.document-editor-heading h1{max-width:720px;margin:2px 0;font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-editor-heading p{margin:0}.document-save-state{font-size:12px;color:var(--muted)}.document-save-state.active{color:var(--accent,#246bfd)}.document-editor-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.document-editor-layout{display:grid;grid-template-columns:minmax(520px,1.15fr) minmax(420px,.85fr);gap:18px;min-height:calc(100vh - 175px)}.document-editor-canvas,.document-editor-aside>section{border:1px solid var(--line);border-radius:18px;background:var(--surface,#fff)}.document-editor-canvas{display:flex;min-width:0;flex-direction:column;padding:24px}.document-title-input{width:100%;padding:0 0 12px;border:0;border-bottom:1px solid var(--line);outline:0;background:transparent;color:var(--text);font:800 30px/1.2 inherit}.document-excerpt-input{min-height:58px;margin:12px 0;padding:0;border:0;resize:vertical;outline:0;background:transparent;color:var(--muted);font:14px/1.5 inherit}.document-editor-toolbar{display:flex;justify-content:space-between;gap:10px;padding:9px 12px;border:1px solid var(--line);border-bottom:0;border-radius:12px 12px 0 0;background:var(--panel,#f3f5f8)}.document-editor-toolbar span{font-weight:800}.document-editor-toolbar small{color:var(--muted)}.document-content-editor{flex:1;min-height:580px;padding:18px;border:1px solid var(--line);border-radius:0 0 12px 12px;resize:vertical;outline:0;background:var(--surface,#fff);color:var(--text);font:14px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace}.document-content-editor:focus{border-color:var(--accent,#246bfd);box-shadow:0 0 0 3px var(--accent-soft,#eef4ff)}.document-editor-aside{display:grid;grid-template-rows:minmax(360px,1fr) auto;gap:18px;min-width:0}.document-editor-preview{min-height:0;overflow:auto;padding:22px}.document-editor-preview>header{display:flex;justify-content:space-between;gap:15px;margin-bottom:18px}.document-editor-preview h2{margin:4px 0}.document-editor-settings{padding:20px}.document-editor-settings h3{margin:0 0 15px}.document-editor-settings label{display:grid;gap:6px;margin:0 0 12px;color:var(--muted);font-size:12px;font-weight:700}.document-editor-settings select,.document-editor-settings input,.document-editor-settings textarea{width:100%}.document-editor-settings select[multiple]{min-height:116px}.document-review-state{display:flex;align-items:flex-start;gap:10px;margin:15px 0;padding:12px;border-radius:12px;background:var(--panel,#f3f5f8)}.document-review-state>div{display:flex;flex-direction:column}.document-review-state small{color:var(--muted)}.status-dot{width:10px;height:10px;margin-top:5px;border-radius:50%;background:#9aa3b1}.status-dot.pending{background:#e29219}.status-dot.approved{background:#1b9c62}.status-dot.changes_requested{background:#d54848}.document-review-actions{display:flex;gap:8px}
html[data-theme="black"] .document-library-shell,html[data-theme="black"] .document-preview-panel,html[data-theme="black"] .document-library-sidebar,html[data-theme="black"] .document-editor-canvas,html[data-theme="black"] .document-editor-aside>section,html[data-theme="black"] .document-preview-actions{background:var(--surface)}html[data-theme="black"] .document-content-editor{background:#111723}html[data-theme="black"] .document-rendered pre{background:#05080e}
@media(max-width:1280px){.document-library-shell{grid-template-columns:210px minmax(380px,1fr) 360px}.document-list-head,.document-list-row{grid-template-columns:minmax(220px,1fr) 120px 110px}.document-list-head span:last-child,.document-list-row>span:last-child{display:none}.document-editor-layout{grid-template-columns:minmax(480px,1fr) 380px}}
@media(max-width:1024px){.document-library-shell{grid-template-columns:210px minmax(0,1fr)}.document-preview-panel{position:fixed;z-index:70;inset:64px 0 0 210px;border-left:1px solid var(--line);box-shadow:-16px 0 40px rgb(15 23 42/.16)}.document-editor-layout{grid-template-columns:1fr}.document-editor-aside{grid-template-columns:1fr 1fr;grid-template-rows:auto}.document-content-editor{min-height:470px}}
@media(max-width:760px){.document-hub-page,.document-editor-page{padding-bottom:84px}.document-hub-head{align-items:flex-start}.document-hub-head .actions{width:100%;overflow-x:auto;flex-wrap:nowrap}.document-hub-head .actions .btn{white-space:nowrap}.document-library-switch{display:grid;grid-template-columns:1fr 1fr;width:100%}.document-library-switch button{justify-content:center}.document-library-shell{display:block;min-height:calc(100vh - 310px);border-radius:16px}.document-library-sidebar{position:fixed;z-index:100;inset:0 auto 0 0;width:min(88vw,330px);padding:calc(16px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));transform:translateX(-105%);transition:transform .2s ease;box-shadow:18px 0 45px rgb(15 23 42/.22)}.document-library-sidebar.open{transform:translateX(0)}.document-library-list{border:0}.document-library-toolbar{padding:10px}.document-library-toolbar>span{display:none}.document-list-head{display:none}.document-list-row{grid-template-columns:minmax(0,1fr) auto;min-height:82px;padding:12px}.document-list-row>span:nth-child(3),.document-list-row>span:nth-child(4){display:none}.document-list-row>span:nth-child(2){align-items:flex-end}.document-preview-panel{inset:0;z-index:110;padding-top:env(safe-area-inset-top);box-shadow:none}.document-preview-header{padding-top:16px}.document-preview-actions{padding-bottom:calc(14px + env(safe-area-inset-bottom))}.document-editor-header{position:static;align-items:flex-start;flex-direction:column}.document-editor-heading{width:100%}.document-editor-heading h1{max-width:calc(100vw - 100px);font-size:19px}.document-editor-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.document-editor-actions .btn:last-child{grid-column:1/-1}.document-editor-layout{display:block}.document-editor-canvas{padding:16px;border-radius:15px}.document-title-input{font-size:24px}.document-editor-toolbar{align-items:flex-start;flex-direction:column}.document-content-editor{min-height:56vh;padding:14px}.document-editor-aside{display:block}.document-editor-aside>section{margin-top:14px;border-radius:15px}.document-editor-preview{max-height:none}.document-editor-settings{padding:16px}.document-review-actions{display:grid;grid-template-columns:1fr 1fr}.helpful-box{align-items:flex-start;flex-wrap:wrap}.helpful-box span{width:100%}}
@media(max-width:440px){.document-list-main{grid-template-columns:32px minmax(0,1fr)}.document-list-main>svg{display:none}.document-editor-actions{grid-template-columns:1fr}.document-editor-actions .btn:last-child{grid-column:auto}.document-preview-tabs{padding:0 8px}.document-preview-tabs button{padding:0 7px;font-size:12px}}
