.workspace-stage{grid-column:1;min-width:0;min-height:0;overflow:hidden;background:#fff}
#workspace-explorer-host,.workspace-explorer{width:100%;height:100%;min-height:0}
.workspace-explorer [hidden]{display:none!important}.workspace-table-wrap{flex:1;min-height:0}.workspace-toolbar,.workspace-feedback,.workspace-selection{flex-shrink:0}
.workspace-progress{display:block;width:100%;height:8px;margin:0 0 .65rem;border:0;border-radius:999px;accent-color:#14744a}
.workspace-import-log{margin-top:1rem;padding:.75rem 1rem;border:1px solid #d7dfda;border-radius:.6rem;background:#f7faf8}
.workspace-import-log h2{margin:0 0 .45rem;font-size:.9rem}
.workspace-import-log-list{display:grid;gap:.3rem;margin:0;padding-left:1.5rem;max-height:11rem;overflow:auto;font-size:.82rem}
.workspace-import-log-entry{color:#385047}
.workspace-import-log-entry time{color:#687b74;font-variant-numeric:tabular-nums}
.workspace-import-log-entry.is-success{color:#17633f}
.workspace-import-log-entry.is-error{color:#a12d2d;font-weight:600}
.workspace-explorer{--workspace-line:#dde5e9;--workspace-bg:#f5f7f8;--workspace-ink:#173847;--workspace-muted:#647b87;--workspace-accent:#0d736d;--workspace-tint:#e7f3f1;--workspace-folder:#bd8927;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;color:var(--workspace-ink);background:#fff;font:14px/1.45 'Segoe UI',Arial,sans-serif}
.workspace-explorer svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px;background:var(--workspace-bg);border-bottom:1px solid var(--workspace-line)}
.workspace-heading h1{margin:0;font-size:25px;font-weight:600;letter-spacing:-.5px}.workspace-heading p{margin:4px 0 0;color:var(--workspace-muted);font-size:12px}
.workspace-sync,.workspace-item-sync{display:inline-flex;align-items:center;gap:6px;color:var(--workspace-muted);font-size:11px;white-space:nowrap}.workspace-sync::before,.workspace-item-sync::before{width:7px;height:7px;border-radius:50%;background:#8d9ca5;content:''}
.workspace-sync.is-synced::before,.workspace-item-sync.is-synced::before{background:#1d8d60}.workspace-sync.is-pending::before,.workspace-sync.is-syncing::before,.workspace-item-sync.is-pending::before,.workspace-item-sync.is-syncing::before{background:#bd8927}.workspace-sync.is-conflict::before,.workspace-sync.is-failed::before,.workspace-sync.is-stale::before,.workspace-item-sync.is-conflict::before,.workspace-item-sync.is-failed::before,.workspace-item-sync.is-stale::before{background:#c4493d}
.workspace-pathbar{display:flex;gap:10px;align-items:center;padding:11px 15px;border-bottom:1px solid var(--workspace-line)}
.workspace-breadcrumb{display:flex;align-items:center;gap:5px;flex:1;min-width:0;min-height:34px;padding:6px 9px;border:1px solid var(--workspace-line);border-radius:4px;overflow:hidden;white-space:nowrap}.workspace-breadcrumb>span{overflow:hidden;text-overflow:ellipsis}.workspace-path-separator{color:var(--workspace-muted)}.workspace-folder-icon{color:var(--workspace-folder)}
.workspace-path-button{padding:1px 3px;border:0;background:transparent;color:var(--workspace-accent);cursor:pointer}
.workspace-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 11px;border:1px solid var(--workspace-line);border-radius:4px;background:#fff;color:var(--workspace-ink);font:inherit;font-size:12px;cursor:pointer}.workspace-button:hover:not(:disabled){background:var(--workspace-tint)}.workspace-button:disabled{cursor:not-allowed;opacity:.48}.workspace-button.is-primary{border-color:var(--workspace-accent);background:var(--workspace-accent);color:#fff}.workspace-icon-button{width:36px;padding:7px;font-size:0}
.workspace-explorer-body{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:0}.workspace-tree{min-height:0;padding:17px 8px;overflow:auto;border-right:1px solid var(--workspace-line);background:var(--workspace-bg)}.workspace-tree-label{margin:0;padding:0 12px 9px;color:var(--workspace-muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.workspace-tree-group>summary{padding:8px;cursor:pointer;font-size:12px}.workspace-tree-project{margin-left:13px}.workspace-tree-folder{width:calc(100% - 18px);margin-left:18px;justify-content:flex-start;border-color:transparent;background:transparent;text-align:left}.workspace-tree-folder svg{color:var(--workspace-folder)}.workspace-tree-folder.is-active{background:var(--workspace-tint);color:var(--workspace-accent);font-weight:600}
.workspace-content{display:flex;flex-direction:column;min-width:0;min-height:0}.workspace-toolbar{display:flex;align-items:center;gap:9px;padding:12px 14px;border-bottom:1px solid var(--workspace-line)}.workspace-toolbar .workspace-button:last-of-type{margin-left:auto}
.workspace-file-input{display:none}.workspace-table-wrap{min-width:0;overflow:auto}.workspace-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.workspace-table th{padding:10px 14px;border-bottom:1px solid var(--workspace-line);color:var(--workspace-muted);font-size:11px;font-weight:500;white-space:nowrap}.workspace-table td{padding:13px 14px;border-bottom:1px solid var(--workspace-line);white-space:nowrap}.workspace-table tr.is-selected{background:var(--workspace-tint)}.workspace-name{display:inline-flex;align-items:center;gap:9px;padding:0;border:0;background:transparent;color:var(--workspace-ink);font:inherit;cursor:pointer}.workspace-name svg{color:var(--workspace-accent)}
.workspace-empty{display:grid;place-content:center;gap:6px;min-height:250px;padding:30px;color:var(--workspace-muted);text-align:center}.workspace-empty h2,.workspace-empty p{margin:0}.workspace-empty h2{color:var(--workspace-ink);font-size:17px}.workspace-empty code{margin-top:9px;font-size:10px}.workspace-selection{display:flex;align-items:center;gap:12px;min-height:51px;padding:10px 15px;border-top:1px solid var(--workspace-line);font-size:12px}.workspace-selection:empty{display:none}.workspace-selection svg{color:var(--workspace-accent)}.workspace-selection span{color:var(--workspace-muted)}.workspace-feedback{padding:10px 15px;color:var(--workspace-muted);font-size:11px}
.workspace-statusbar{display:flex;justify-content:space-between;gap:10px;padding:9px 15px;border-top:1px solid var(--workspace-line);background:var(--workspace-bg);color:var(--workspace-muted);font-size:11px}
@media(max-width:760px){.workspace-explorer-body{grid-template-columns:190px minmax(0,1fr)}.workspace-heading{padding:18px 15px}.workspace-toolbar{flex-wrap:wrap}}
@media(max-width:560px){.workspace-explorer-body{display:flex;flex-direction:column;overflow:auto}.workspace-tree{max-height:220px;border-right:0;border-bottom:1px solid var(--workspace-line)}.workspace-content{overflow:visible}.workspace-table-wrap{overflow:auto}.workspace-heading{align-items:flex-start;flex-direction:column}.workspace-pathbar{flex-wrap:wrap}.workspace-breadcrumb{order:3;flex-basis:100%}.workspace-button{min-height:42px}.workspace-statusbar{flex-direction:column}}

.workspace-dataset{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;background:#fff;color:#173847;font:12px/1.4 'Segoe UI',Arial,sans-serif}.workspace-dataset-tools{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 10px;border-bottom:1px solid #dde5e9;background:#f5f7f8}.workspace-dataset-state{margin-left:auto;color:#647b87;font-size:11px}.workspace-dataset-state[data-tone="error"]{color:#b13d32}.workspace-sheet-wrap{flex:1;min-width:0;min-height:0;overflow:auto}.workspace-sheet-pagination{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:8;min-height:38px;padding:4px 10px;border-bottom:1px solid #dde5e9;background:#f5f7f8}.workspace-sheet-pagination-status{color:#647b87;font-size:11px}.workspace-sheet-grid{display:grid;width:max-content;min-width:100%;align-content:start}.workspace-corner,.workspace-column-heading,.workspace-row-heading{display:grid;position:sticky;z-index:3;place-items:center;border-right:1px solid #d4dde0;border-bottom:1px solid #d4dde0;background:#f4f6f7;color:#64777e;font-size:11px}.workspace-corner,.workspace-column-heading{top:38px;min-height:25px}.workspace-corner{left:0;z-index:5}.workspace-row-heading{left:0;z-index:4;min-height:29px}.workspace-cell{min-width:0;min-height:29px;border-right:1px solid #d4dde0;border-bottom:1px solid #d4dde0;background:#fff}.workspace-cell.is-header{background:#e6f3eb;font-weight:600}.workspace-cell.has-draft{background:#fff1cd}.workspace-cell-input{display:block;width:100%;height:100%;min-height:28px;padding:5px 7px;border:0;border-radius:0;background:transparent;color:#233b45;font:11px 'Segoe UI',Arial,sans-serif;white-space:nowrap;text-overflow:ellipsis}.workspace-cell-input:focus{position:relative;z-index:2;outline:2px solid #14744a;outline-offset:-2px}.workspace-cell-input[readonly]{cursor:default}.workspace-dataset-tabs{display:flex;min-height:36px;padding:0 10px;border-top:1px solid #dde5e9;background:#f4f6f7}.workspace-dataset-tabs button{padding:8px 14px;border:0;border-bottom:2px solid transparent;background:transparent;color:#64777e;font:12px 'Segoe UI',Arial,sans-serif;cursor:pointer}.workspace-dataset-tabs button.is-active{border-bottom-color:#14744a;background:#fff;color:#14744a;font-weight:600}
.workspace-cell.has-error{background:#fff0ee}.workspace-cell.has-error .workspace-cell-input{color:#a03329;font-weight:600}
.workspace-sheet-empty{display:grid;min-width:min(680px,calc(100vw - 80px));min-height:260px;place-items:center;padding:32px;background:#fff;color:#647b87;text-align:center}.workspace-sheet-limit{display:grid;min-width:min(680px,calc(100vw - 80px));min-height:260px;place-items:center;padding:32px;background:#fff;color:#647b87;text-align:center}
.workspace-history-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 40px);padding:0;border:1px solid #d4dde0;border-radius:8px;box-shadow:0 18px 55px #0f283530;background:#fff;color:#173847}.workspace-history-dialog::backdrop{background:#0d22304d}.workspace-history-dialog>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #dde5e9}.workspace-history-dialog h2,.workspace-history-dialog p{margin:0}.workspace-history-dialog h2{font-size:19px}.workspace-history-dialog p{margin-top:4px;color:#647b87;font-size:12px}.workspace-history-list{max-height:500px;margin:0;padding:0;overflow:auto;list-style:none}.workspace-history-list li{display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(150px,220px);align-items:center;gap:14px;padding:13px 20px;border-bottom:1px solid #edf1f3}.workspace-history-list li>div{display:grid;gap:3px}.workspace-history-list li>div span{color:#647b87;font-size:11px}.workspace-history-list code{overflow:hidden;color:#647b87;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.workspace-history-state{padding:4px 8px;border-radius:999px;background:#edf2f4;color:#536872;font-size:10px;font-weight:600}.workspace-history-state.is-synced{background:#e2f3e9;color:#12633f}.workspace-history-state.is-pending{background:#fff1cd;color:#835e0c}.workspace-history-state.is-conflict{background:#fde5e2;color:#a03329}.workspace-history-empty{display:block!important;padding:32px 20px!important;color:#647b87;text-align:center}
.workspace-history-list li{grid-template-columns:minmax(180px,1fr) auto minmax(120px,190px) minmax(0,auto)}.workspace-history-actions{display:block!important}.workspace-history-actions .workspace-button{white-space:nowrap}
.workspace-save-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100vh - 40px);padding:0;border:1px solid #d4dde0;border-radius:8px;box-shadow:0 18px 55px #0f283530;background:#fff;color:#173847}.workspace-save-dialog::backdrop{background:#0d22304d}.workspace-save-dialog h2,.workspace-save-dialog>p,.workspace-save-reason,.workspace-save-actions{margin:0;padding:16px 20px}.workspace-save-dialog h2{padding-bottom:4px;font-size:20px}.workspace-save-dialog>p{padding-top:0;color:#647b87}.workspace-change-list{max-height:280px;margin:0;padding:0 20px;overflow:auto;list-style:none}.workspace-change-list li{display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid #dde5e9}.workspace-change-list span{overflow-wrap:anywhere}.workspace-save-reason{display:grid;gap:6px;color:#526571;font-size:12px}.workspace-save-reason textarea{min-height:80px;padding:9px;border:1px solid #c6d1d7;border-radius:4px;resize:vertical;font:13px 'Segoe UI',sans-serif}.workspace-save-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #dde5e9;background:#f5f7f8}
.workspace-button.is-danger{border-color:#b13d32;color:#9b3128}.workspace-button.is-danger:hover:not(:disabled){background:#fff0ee}
.desktop-app[data-workspace-view="explorer"][data-chat-open="true"] .desktop-workspace{grid-template-columns:minmax(0,1fr) var(--ws-chat-width)}
.desktop-app[data-workspace-view="explorer"] .chat-stage{grid-column:2}
@media(max-width:680px){.desktop-app[data-workspace-view="explorer"][data-chat-open="true"] .desktop-workspace{grid-template-columns:minmax(0,1fr)}.desktop-app[data-workspace-view="explorer"] .chat-stage{position:fixed;z-index:12;inset:58px 0 0;grid-column:1}}
.workspace-tree-status{color:var(--workspace-muted);font-size:11px;font-weight:400;white-space:normal}.workspace-tree-project>.workspace-tree-status{display:block;padding:0 8px 8px 18px}.workspace-tree-note{margin:0;padding:2px 8px 8px 20px;color:var(--workspace-muted);font-size:11px}.workspace-item-sync{max-width:320px;white-space:normal}
.workspace-item-sync.is-sql-synchronized::before{background:#1d8d60}.workspace-item-sync.is-sql-pending-export::before,.workspace-item-sync.is-sql-pending-import::before{background:#bd8927}.workspace-item-sync.is-sql-export-conflict::before,.workspace-item-sync.is-sql-export-reconciliation-required::before,.workspace-item-sync.is-sql-invalid-excel::before{background:#c4493d}

/* Portal monochrome theme: semantic success uses neutral gray instead of green. */
.workspace-explorer{--workspace-accent:#111;--workspace-tint:#f0f0f0}
.workspace-button.is-primary{border-color:#111;background:#111;color:#fff}
.workspace-button.is-primary:hover:not(:disabled){background:#2a2a2a}
.workspace-tree-folder.is-active{background:#f0f0f0;color:#111}
.workspace-sync.is-synced::before,.workspace-item-sync.is-synced::before,.workspace-item-sync.is-sql-synchronized::before{background:#555}
.workspace-cell.is-header{background:#f0f0f0}
.workspace-cell-input:focus{outline-color:#111}
.workspace-dataset-tabs button.is-active{border-bottom-color:#111;color:#111}
