:root{--page-bg:#f4f2fa;--header-bg:#f9f8fd;--surface:#fff;--soft-surface:#faf9fd;--ink:#222133;--muted:#817d92;--line:#e7e3f0;--purple:#7351ef;--lime:#d1fb79;--shell-rail:224px}
:root[data-theme=dark]{--page-bg:#15161c;--header-bg:#191a22;--surface:#1c1e27;--soft-surface:#22242d;--ink:#e4e5ee;--muted:#969bad;--line:#303241;--purple:#a27af5}
body{background:var(--page-bg);color:var(--ink)}
.rail{position:fixed!important;inset:0 auto 0 0!important;width:var(--shell-rail)!important;height:100vh!important;padding:34px 20px!important;background:#1c1929!important;color:#fff!important;border:0!important;display:flex!important;flex-direction:column!important;gap:0!important;z-index:20}
.wordmark{display:flex!important;align-items:center;gap:12px;padding:0 9px 50px!important;font-size:24px!important;letter-spacing:.06em;font-weight:800;color:#fff!important;margin:0!important}
.wordmark-sub{display:block;font-size:8px;color:#9d95b6;letter-spacing:.14em;font-weight:500;margin-top:6px}
.logo{display:grid;place-items:center;width:40px;height:40px;background:var(--lime);border-radius:50%;position:relative;flex:none}.logo:before,.logo:after{content:'';position:absolute;border:1px solid #1c192966;border-radius:50%;inset:7px}.logo:after{inset:12px}.logo i{width:8px;height:8px;border-radius:50%;background:#1c1929}
.rail-label{font-size:9px;letter-spacing:.12em;color:#716986;margin:0 12px 18px}
.rail .rail-link{display:flex!important;align-items:center;gap:12px;padding:14px!important;margin:0 0 7px!important;border-radius:11px!important;font-size:13px!important;color:#aaa3bd!important;line-height:normal}
.rail-link span{font-size:19px;display:inline-flex;width:22px;justify-content:center}.rail .rail-link:hover{color:#fff!important;background:#2a263b}.rail .rail-link.active{background:#7351ef!important;color:#fff!important;box-shadow:0 8px 25px #7351ef26}
.rail-bottom{margin-top:auto;padding:22px 9px 0;border-top:1px solid #383146}.system-state{display:flex;align-items:center;gap:8px;font-size:10px;color:#a39bb4}.system-state i{width:6px;height:6px;border-radius:50%;background:#817b91;flex:none}.system-state i.online{background:var(--lime);box-shadow:0 0 0 4px #d1fb7910}
.main-column,.workspace{margin-left:var(--shell-rail)!important;min-width:0}.main-column{width:calc(100% - var(--shell-rail))}
.topbar,.workspace>header{height:80px!important;padding:0 48px!important;background:var(--header-bg)!important;border-bottom:1px solid var(--line)!important;display:flex;justify-content:space-between;align-items:center;gap:16px}
.top-actions,.workspace>header>div:last-child{display:flex;align-items:center;gap:12px}
.theme-toggle{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink);font-size:22px;cursor:pointer}.theme-toggle:hover{border-color:var(--purple);color:var(--purple)}.theme-toggle:focus-visible{outline:3px solid #a58af8;outline-offset:3px}
:root[data-theme=dark] .breadcrumb b,:root[data-theme=dark] .section-head h2{color:var(--ink)}
:root[data-theme=dark] input,:root[data-theme=dark] textarea,:root[data-theme=dark] select{color:var(--ink);background:var(--soft-surface);border-color:var(--line)}
:root[data-theme=dark] .template-card,:root[data-theme=dark] .project-card,:root[data-theme=dark] .asset-card,:root[data-theme=dark] .asset-panel,:root[data-theme=dark] .create-form,:root[data-theme=dark] dialog{background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .template-copy,:root[data-theme=dark] .project-copy,:root[data-theme=dark] .process-card,:root[data-theme=dark] .custom-panel{background:var(--surface);color:var(--ink)}
@media(max-width:1200px){:root{--shell-rail:190px}.rail{padding:28px 14px!important}.topbar,.workspace>header{padding:0 28px!important}}
@media(max-width:760px){:root{--shell-rail:0px}.rail{position:relative!important;width:100%!important;height:auto!important;padding:16px!important;flex-direction:row!important;flex-wrap:wrap!important;gap:6px!important}.wordmark{width:100%;padding:0 0 12px!important}.rail-label,.rail-bottom{display:none}.rail .rail-link{padding:10px!important;margin:0!important;font-size:12px!important}.site-shell{display:block}.main-column{width:100%}.topbar,.workspace>header{padding:0 16px!important;height:auto!important;min-height:72px;flex-wrap:wrap;padding-top:12px!important;padding-bottom:12px!important}.workspace>header>div:last-child{flex-wrap:wrap}}
main:has(#customWorkbench:not(.hidden)){max-width:none;padding:0}
.workbench-native .shell>.rail{display:none!important}.workbench-native .workspace{margin-left:0!important}.workbench-native .workspace>header{height:60px!important;padding:0 28px!important;background:var(--page-bg)!important}.workbench-native .workspace>header>div:first-child,.workbench-native [data-theme-toggle]{display:none}.workbench-native .workspace>header{justify-content:flex-end}.workbench-native .shell{min-height:calc(100vh - 80px)}
:root[data-theme=dark] .top-actions a{background:var(--surface);color:var(--ink)}
