#catalog-dialog { width: 100%; }
.shell:has(#catalog-dialog:not([hidden])) { max-width:none; width:100%; }
#catalog-dialog .account-table table { width:100%; min-width:850px; table-layout:fixed; }
#catalog-dialog th:first-child { width:44px; }
#catalog-dialog th:nth-child(2) { width:15%; }
#catalog-dialog th:nth-child(3) { width:12%; }
#catalog-dialog th:nth-child(5) { width:64px; }
#catalog-dialog th:nth-child(6) { width:24%; }
#catalog-dialog td:nth-child(4) { white-space:normal; overflow-wrap:anywhere; }
#catalog-dialog .account-table { max-height:calc(100dvh - 340px); min-height:300px; }
#catalog-dialog .catalog-pagination { align-items:center; flex-wrap:wrap; position:sticky; bottom:0; padding:12px; background:#fff; border:1px solid #e3e8f0; border-radius:10px; }
#catalog-page-range { margin-right:auto; color:#53647a; font-size:.875rem; }
#catalog-dialog th, #catalog-dialog td { font-size: .875rem; }
#catalog-dialog select { font-size: .875rem; padding: 8px; border: 1px solid #cbd5e1; border-radius: 7px; max-width: 100%; }
#catalog-search { display: block; width: min(360px, 100%); min-height: 3rem; resize: vertical; padding: 8px; font-family: inherit; font-size: .875rem; line-height: 1.5; border: 1px solid #cbd5e1; border-radius: 7px; }
#catalog-search-help { font-size: .875rem; max-width: 360px; }
#catalog-dialog button, #catalog-row-dialog button { font-size: .875rem; }
#catalog-dialog button:disabled { cursor: default; opacity: .55; }
#catalog-coverage { height: auto; max-height: 180px; font-size: .875rem; }
#catalog-duplicate-files { height:auto; max-height:280px; font-size:.875rem; overflow-wrap:anywhere; }
.catalog-duplicate-badge { display:block; color:#92400e; font-size:.8125rem; margin-top:4px; }
.catalog-sources summary { cursor:pointer; color:#1d4ed8; }
.catalog-sources label { display:block; border-top:1px solid #e3e8f0; padding:8px 0; line-height:1.5; }
.catalog-sources p { color:#53647a; line-height:1.5; }
#catalog-notice { color: #92400e; }
#catalog-dialog .catalog-window-link { white-space: normal; min-width: 180px; max-width: 300px; }
#catalog-row-text { width: 100%; height: 40vh; resize: vertical; padding: 12px; font: .875rem/1.5 ui-monospace, monospace; }
#catalog-history-dialog { width: min(1000px, 96vw); }
#catalog-history-results { max-height: 45vh; overflow: auto; overflow-wrap: anywhere; }
#catalog-history-results button { font-size: .875rem; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
#catalog-history-detail { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35vh; overflow: auto; font-size: .875rem; }
#catalog-windows-dialog { width: min(1000px, 96vw); }
#catalog-windows-results { overflow-wrap: anywhere; }
#catalog-windows-results pre { white-space: pre-wrap; font-size: .875rem; }
#window-history-dialog { width: min(1000px, 96vw); }
#window-history-list { max-height: 40vh; overflow: auto; overflow-wrap: anywhere; }
#window-history-detail { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 35vh; overflow: auto; font-size: .875rem; }
@media (max-width: 650px) { #catalog-dialog .dialog-toolbar { align-items: stretch; } #catalog-dialog .dialog-toolbar > * { flex: 1 1 45%; } }

/* Independent, persistent working pages rather than stacked dashboard cards. */
[hidden] { display: none !important; }
.hub-tabs { display:flex; gap:6px; margin:20px 0 0; padding:0 0 10px; border-bottom:1px solid #dbe3ef; overflow-x:auto; }
.hub-tabs [role="tab"] { flex:none; font-family:inherit; font-weight:600; font-size:.9375rem; line-height:1.5; padding:10px 18px; background:transparent; border-color:transparent; color:#53647a; }
.hub-tabs [aria-selected="true"] { color:#1d4ed8; background:#e8f0ff; border-color:#c3d5fa; }
.hub-tabs button:focus-visible, .hub-page button:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.hub-page { min-width:0; padding-top:22px; }
.hub-feedback { padding:10px 14px; margin:14px 0 0; border-left:3px solid #2563eb; background:#edf4ff; color:#26456b; font-size:.875rem; line-height:1.5; overflow-wrap:anywhere; }
.page-heading { margin-bottom:18px; }
.page-heading h2 { font-size:1.25rem; margin:0 0 8px; }
.page-heading p, .hub-page > p { color:#53647a; font-size:.9375rem; line-height:1.6; margin:8px 0; }
.hub-page button { font-size:.875rem; line-height:1.5; }
.hub-page .toolbar { margin-top:0; }
#page-hosts .content { display:block; }
#page-hosts th, #page-hosts td { font-size:.875rem; padding:12px 10px; }
.event-log { margin-top:14px; background:white; border:1px solid #e3e8f0; border-radius:12px; padding:20px; }
.event-log pre { height:60vh; font-size:.875rem; }
.catalog-page .dialog-toolbar { background:#fff; padding:16px; border:1px solid #e3e8f0; border-radius:12px; align-items:flex-end; }
.catalog-page .dialog-toolbar label { display:flex; flex-direction:column; gap:6px; font-size:.875rem; }
.catalog-page .account-table { max-height:60vh; background:#fff; border:1px solid #e3e8f0; border-radius:10px; }
.catalog-page footer { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.catalog-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; margin:16px 0; }
.catalog-action-group { border:1px solid #d4dce8; border-radius:7px; background:#fff; font-size:.875rem; }
.catalog-action-group summary { padding:8px 12px; cursor:pointer; }
.catalog-action-group > div { display:flex; flex-wrap:wrap; gap:8px; max-width:540px; padding:12px; border-top:1px solid #e3e8f0; }
@media(max-width:760px) { .shell {padding:12px;} .topbar {align-items:flex-start;flex-direction:column;gap:14px;} .connection {flex-wrap:wrap;} .summary {gap:18px;flex-wrap:wrap;} .hub-tabs [role="tab"] {padding:9px 12px;} }

/* TextFlow workspace: light professional palette with an account detail rail. */
:root { --hub-blue:#2563eb; --hub-ink:#18243c; --hub-muted:#64748b; --hub-line:#e4eaf2; --hub-surface:#fff; --hub-backdrop:#f5f7fb; color:var(--hub-ink); background:var(--hub-backdrop); font-size:16px; }
[hidden] { display:none !important; }
.shell, .shell:has(#catalog-dialog:not([hidden])) { width:auto; max-width:none; margin:0 0 0 208px; padding:0 28px 28px; }
.app-sidebar { position:fixed; inset:0 auto 0 0; width:208px; z-index:30; display:flex; flex-direction:column; padding:28px 14px 18px; background:#fff; border:0; border-right:1px solid var(--hub-line); }
.app-brand { display:flex; align-items:center; gap:10px; padding:0 8px 30px; }
.brand-mark { display:grid; place-items:center; flex-shrink:0; width:36px; height:38px; border-radius:10px; background:var(--hub-blue); color:white; font-size:.8125rem; font-weight:750; box-shadow:0 5px 12px #2563eb20; }
.app-brand h1 { font-size:1rem; line-height:1.35; margin:0; letter-spacing:-.02em; }
.app-brand h1 span { display:block; font-size:.875rem; }
.nav-caption { font-size:.75rem; color:#7b879a; padding:0 14px; margin:0 0 10px; }
.app-sidebar .hub-tabs { display:flex; flex-direction:column; gap:6px; margin:0; padding:0; border:0; background:none; }
.app-sidebar .hub-tabs button { width:100%; display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; border:0; border-radius:8px; color:#526079; font-size:.9375rem; background:transparent; font-weight:500; }
.app-sidebar .hub-tabs button span { width:20px; text-align:center; font-size:1.125rem; }
.app-sidebar .hub-tabs button:hover { background:#f1f5fc; }
.app-sidebar .hub-tabs button[aria-selected="true"] { color:#fff; background:var(--hub-blue); box-shadow:0 4px 10px #2563eb24; }
.sidebar-footer { margin-top:auto; padding:18px 6px 0; border-top:1px solid var(--hub-line); color:var(--hub-muted); font-size:.75rem; }
.sidebar-indicator { display:inline-block; width:6px; height:6px; background:#7d90ac; border-radius:50%; margin-right:6px; }
.topbar { min-height:80px; border:0; border-bottom:1px solid var(--hub-line); border-radius:0; padding:18px 0; background:transparent; gap:18px; }
.workspace-label { font-weight:650; font-size:.9375rem; }
.workspace-label span { display:block; margin-top:5px; font-size:.75rem; font-weight:400; }
.connection { font-size:.8125rem; flex-wrap:wrap; }
button { transition:background .15s,color .15s; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid #93b4fd; outline-offset:2px; }
button:disabled { cursor:not-allowed; opacity:.5; }
.hub-page { padding-top:26px; }
.page-heading { margin-bottom:20px; }
.page-heading h2 { font-size:1.5rem; letter-spacing:-.025em; font-weight:700; }
.page-heading p { font-size:.875rem; color:var(--hub-muted); margin-top:6px; }
.account-host-card { display:grid; grid-template-columns:minmax(220px,1fr) minmax(320px,1.15fr); gap:24px; align-items:center; }
.account-host-card h3,.account-host-card p { margin-top:0; }
.account-host-picker { display:grid; grid-template-columns:auto minmax(220px,1fr) auto; gap:10px; align-items:center; }
.account-host-picker label { color:var(--hub-muted); font-size:.875rem; font-weight:600; }
.account-host-picker select { width:100%; min-width:0; padding:10px 34px 10px 12px; border:1px solid var(--hub-line); border-radius:8px; background:#fff; color:var(--hub-ink); }
.account-host-hint { grid-column:1/-1; margin:0!important; color:var(--hub-muted); font-size:.8125rem; }
@media (max-width:760px) { .account-host-card { grid-template-columns:1fr; } .account-host-picker { grid-template-columns:1fr; } }
.toolbar,.summary,.content,.files,.history,.advanced,.event-log { border-color:var(--hub-line); border-radius:10px; }
.toolbar button,.catalog-actions button,.connection button { border-color:#dce3ed; background:#fff; }
.hub-page button:hover { border-color:#b7caf0; background:#f3f7ff; }
#refresh, [data-command="start_task"], #catalog-dialog .primary-button { background:var(--hub-blue); color:white; border-color:var(--hub-blue); }
#catalog-dialog .danger-button, [data-command="reboot_host"], [data-command="delete_batch_windows"] { color:#b42332; border-color:#f0d5d9; }
.catalog-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.metric-card { background:#fff; border:1px solid var(--hub-line); border-radius:10px; padding:18px 20px; display:flex; align-items:flex-start; gap:14px; }
.metric-symbol { width:38px; height:38px; display:grid; place-items:center; background:#edf3ff; color:#2563eb; border-radius:9px; font-size:1.375rem; }
.metric-symbol.sources { color:#087f8c; background:#e8f7fa; }
.metric-symbol.duplicates { color:#b76b12; background:#fff4e4; }
.metric-card div>span { font-size:.8125rem; color:var(--hub-muted); }
.metric-card strong { display:block; font-size:1.625rem; line-height:1.3; margin:4px 0; font-variant-numeric:tabular-nums; }
.metric-card small { font-size:.75rem; color:var(--hub-muted); }
.catalog-page .dialog-toolbar { margin:0; padding:14px 16px; border-radius:10px; gap:14px; }
#catalog-search { width:320px; min-height:40px; height:40px; }
#catalog-search-help { font-size:.75rem; color:var(--hub-muted); max-width:220px; }
.catalog-actions { margin:12px 0; align-items:center; }
.catalog-actions button,.catalog-action-group summary { font-size:.8125rem; }
.catalog-action-group { position:relative; }
.catalog-action-group[open]>div { position:absolute; top:100%; left:0; z-index:25; min-width:260px; background:white; border:1px solid var(--hub-line); border-radius:10px; box-shadow:0 12px 32px #18243c1c; }
#catalog-summary { font-size:.8125rem; margin:12px 0 8px; }
.catalog-explanations { display:flex; flex-wrap:wrap; gap:8px 22px; color:var(--hub-muted); font-size:.8125rem; }
.catalog-explanations details { max-width:100%; }
.catalog-explanations summary { cursor:pointer; padding:4px 0; }
.catalog-explanations details[open] { flex-basis:100%; background:#edf2f9; border-radius:8px; padding:8px 12px; }
.catalog-explanations p { line-height:1.6; }
#catalog-notice:empty { display:none; }
.catalog-workspace { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; margin-top:14px; align-items:start; }
.catalog-workspace:has(#catalog-detail:not([hidden])) { grid-template-columns:minmax(0,1fr) 340px; }
.catalog-table-panel { min-width:0; }
#catalog-dialog .account-table { margin:0; min-height:320px; max-height:calc(100dvh - 420px); border-radius:10px; }
#catalog-dialog .account-table table { min-width:760px; }
#catalog-dialog .account-table th { background:#f8faff; color:#63728b; font-size:.8125rem; font-weight:600; z-index:1; }
#catalog-dialog .account-table td { height:54px; padding:11px 12px; border-bottom-color:#edf1f7; }
#catalog-dialog .account-table tr:hover td { background:#f8faff; }
#catalog-dialog .account-table tr.catalog-inspected td { background:#eef4ff; }
#catalog-dialog th:nth-child(2) { width:21%; }
#catalog-dialog th:nth-child(3) { width:16%; }
#catalog-dialog th:nth-child(6) { width:28%; }
#catalog-dialog .catalog-pagination { margin-top:10px; font-size:.8125rem; padding:10px 12px; }
#catalog-dialog .catalog-account-button { border:0; background:transparent; color:#233454; padding:2px 0; font-weight:600; text-align:left; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
#catalog-dialog .catalog-account-button:hover { color:var(--hub-blue); }
#catalog-dialog .catalog-source-button { color:#2563eb; border:0; background:#edf3ff; padding:3px 7px; font-size:.75rem; white-space:normal; }
.catalog-detail { padding:0; background:#fff; border:1px solid var(--hub-line); border-radius:10px; position:sticky; top:16px; overflow:hidden; }
.catalog-detail>header { display:flex; justify-content:space-between; align-items:center; padding:16px 18px; border-bottom:1px solid var(--hub-line); }
.catalog-detail h3 { margin:0; font-size:.9375rem; }
#catalog-detail-close { border:0; padding:0 6px; font-size:1.5rem; color:var(--hub-muted); }
#catalog-detail-content { padding:18px; max-height:calc(100dvh - 200px); overflow:auto; overflow-wrap:anywhere; }
.detail-identity { display:flex; gap:10px; align-items:center; padding-bottom:16px; border-bottom:1px solid var(--hub-line); }
.detail-avatar { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#edf3ff; color:var(--hub-blue); font-weight:700; flex-shrink:0; }
.detail-identity strong { font-size:.9375rem; }
.detail-identity small { display:block; color:var(--hub-muted); margin-top:5px; }
.detail-properties { display:grid; grid-template-columns:70px minmax(0,1fr); gap:12px 8px; font-size:.8125rem; line-height:1.6; margin:18px 0; }
.detail-properties dt { color:var(--hub-muted); }.detail-properties dd { margin:0; }
.detail-sources-title { margin:20px 0 10px; font-size:.875rem; }
.detail-source { padding:12px; margin-bottom:10px; border:1px solid var(--hub-line); border-radius:8px; background:#fafcff; font-size:.8125rem; }
.detail-source label { display:flex; gap:8px; align-items:flex-start; line-height:1.6; }
.detail-source small { display:block; color:var(--hub-muted); margin:7px 0; }
#catalog-dialog .detail-source button { font-size:.75rem; }
.detail-note { font-size:.75rem; color:var(--hub-muted); line-height:1.6; }
@media(max-width:1200px) { .shell,.shell:has(#catalog-dialog:not([hidden])) {margin-left:184px;padding:0 20px 20px;} .app-sidebar{width:184px;} .catalog-workspace:has(#catalog-detail:not([hidden])) {grid-template-columns:minmax(0,1fr);} .catalog-detail {position:fixed;right:16px;top:90px;bottom:16px;width:340px;z-index:35;box-shadow:0 16px 60px #18243c30;} #catalog-detail-content{max-height:calc(100dvh - 185px);} }
@media(max-width:760px) { .shell,.shell:has(#catalog-dialog:not([hidden])) {margin:0;padding:0 12px 18px;} .app-sidebar{position:static;width:auto;padding:16px 0 12px;background:transparent;border:0;} .app-brand{padding:0 4px 12px;} .app-brand h1 span{display:inline;margin-left:5px;} .nav-caption,.sidebar-footer{display:none;} .app-sidebar .hub-tabs{flex-direction:row;overflow:auto;gap:4px;} .app-sidebar .hub-tabs button{width:auto;flex-shrink:0;padding:10px;font-size:.8125rem;gap:5px;} .topbar{min-height:0;padding:12px 0;flex-direction:row;flex-wrap:wrap;} .workspace-label{display:none;} .hub-page{padding-top:20px;} .catalog-metrics{gap:8px;} .metric-card{padding:12px 10px;gap:0;} .metric-symbol,.metric-card small{display:none;} .metric-card strong{font-size:1.375rem;} .metric-card div>span{font-size:.75rem;} .catalog-detail{width:min(340px,calc(100vw - 24px));right:12px;top:18px;bottom:18px;} #catalog-detail-content{max-height:calc(100dvh - 104px);} #catalog-search{max-width:100%;width:280px;} #catalog-dialog .catalog-pagination{position:static;} }
.account-real-file-warning { padding:.7rem .85rem; border:1px solid #bfdbfe; border-radius:.7rem; background:#eff6ff; color:#1e3a5f; }
.account-source-status { display:inline-flex; padding:.2rem .55rem; border-radius:999px; font-size:.78rem; font-weight:650; white-space:nowrap; background:#eef2f7; color:#475569; }
.account-source-status.formal { background:#dcfce7; color:#166534; }
.account-source-status.excluded { background:#fee2e2; color:#991b1b; }
.account-source-status.format_error { background:#ffedd5; color:#9a3412; }
.account-source-status.directory { background:#e0e7ff; color:#3730a3; }
.account-tree-row td { height:36px; padding-top:6px; padding-bottom:6px; }
.account-tree-row.directory td { background:#fbfcff; }
.account-tree-name { display:flex; align-items:center; min-width:0; padding-left:calc(var(--tree-depth) * 22px); }
.account-tree-toggle { width:19px; height:19px; margin:0 5px 0 0; padding:0; display:inline-grid; place-items:center; flex:0 0 auto; border:1px solid #aeb9ca; border-radius:3px; color:#43516a; background:#fff; font:600 14px/1 ui-monospace,monospace; }
.account-tree-toggle:hover { background:#eaf1ff; border-color:#7798d8; }
.account-tree-leaf { width:19px; margin-right:5px; flex:0 0 auto; color:#a8b2c2; text-align:center; }
.account-tree-name .account-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; }
.account-tree-row.directory .account-name { color:#1f3355; font-weight:600; }
#accounts-dialog .account-table { min-height:420px; }
#accounts-dialog .account-table table { min-width:880px; }
#accounts-dialog .account-table th:nth-child(1) { width:42px; }
#accounts-dialog .account-table th:nth-child(2) { width:42%; }
#accounts-dialog .account-table th:nth-child(3) { width:70px; }
.text-editor-shell { display:grid; grid-template-columns:auto minmax(0,1fr); height:55vh; min-height:260px; border:1px solid #cbd5e1; border-radius:8px; overflow:hidden; background:#fff; }
#editor-lines { margin:0; height:100%; min-width:3.5rem; padding:12px 10px; overflow:hidden; border-right:1px solid #e2e8f0; background:#f8fafc; color:#94a3b8; text-align:right; user-select:none; font:13px/1.5 ui-monospace,monospace; white-space:pre; }
#editor-text { width:100%; height:100%; min-width:0; resize:none; border:0; border-radius:0; outline:0; padding:12px; font:13px/1.5 ui-monospace,monospace; white-space:pre; overflow:auto; }
#editor-text:focus { box-shadow:inset 3px 0 0 #3b6eea; }
.editor-position { margin:6px 2px 0; color:#64748b; font-size:.78rem; text-align:right; }
