:root{--bg:#f6f8fc;--surface:#fff;--ink:#17243b;--muted:#697992;--stroke:#e3e9f2;--accent:#2563eb;--text:var(--ink);--card:var(--surface);--line:var(--stroke);color-scheme:light}
body{background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,'Segoe UI',sans-serif}.app-shell{background:var(--bg)}.sidebar{background:var(--surface);border-right:1px solid var(--stroke);box-shadow:none}.brand{color:var(--ink)}.ff-brand-symbol{background:#edf3ff;color:var(--accent);border-radius:13px}.side-nav a{border-radius:10px}.side-nav a.active{background:#edf3ff;color:var(--accent)}.topbar{background:var(--surface);border-bottom:1px solid var(--stroke);box-shadow:none}.global-search{background:var(--bg);border:1px solid var(--stroke)}.main-content{max-width:1600px;margin:0 auto;width:100%;padding:28px}.page-heading h1{font-size:28px;letter-spacing:-.8px}.card,.panel,.ff-welcome,.ff-start-card{background:var(--surface);border:1px solid var(--stroke);box-shadow:0 5px 20px #16325704;border-radius:16px}.ff-tool-icon{background:#edf3ff;color:var(--accent)}.ff-tool{padding:22px}.ff-tool h3{font-size:17px}.ff-tool p{line-height:1.6}.ff-tool-link{color:var(--accent)}.btn{border-radius:10px;background:var(--accent);color:#fff}.btn.secondary{background:var(--surface);border:1px solid var(--stroke);color:var(--ink)}.avatar{background:#edf3ff;color:var(--accent)}input,textarea,select{background:var(--surface);color:var(--ink);border-color:var(--stroke)}[hidden]{display:none!important}:focus-visible{outline:3px solid #93b6fa;outline-offset:3px}.workspace-toolbar{background:var(--surface);border-color:var(--stroke);padding:10px 14px}.workspace-page{padding:0;overflow:hidden}.workspace-frame{background:var(--surface);height:calc(100dvh - 230px);min-height:520px}.workspace-focus .workspace-page{position:fixed;inset:0;border-radius:0;z-index:1000}.workspace-focus .workspace-frame{height:calc(100dvh - 60px);min-height:0}.tool-search{width:min(600px,calc(100% - 28px));border:1px solid var(--stroke);border-radius:18px;padding:20px;background:var(--surface);color:var(--ink);box-shadow:0 25px 90px #10213d44;max-height:80dvh}.tool-search::backdrop{background:#10213d55;backdrop-filter:blur(4px)}.search-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.tool-search input{width:100%;padding:13px;border:1px solid var(--stroke);border-radius:10px}.search-results{max-height:55dvh;overflow:auto;margin-top:12px}.search-results>a{display:flex;gap:14px;padding:13px 10px;text-decoration:none;color:var(--ink);border-radius:10px}.search-results>a:hover{background:var(--bg)}.search-results strong,.search-results small{display:block}.search-results small{color:var(--muted);font-size:12px;margin-top:4px}.search-results .icon{width:22px;flex-shrink:0;color:var(--accent)}
[data-theme=dark]{color-scheme:dark;--bg:#0d1729;--surface:#162238;--ink:#edf2fa;--muted:#a0b0c7;--stroke:#2a3a54;--accent:#7aa9ff}[data-theme=dark] .app-content,[data-theme=dark] .main-content{background:var(--bg)}[data-theme=dark] .brand,[data-theme=dark] .side-nav a,[data-theme=dark] .page-heading h1,[data-theme=dark] h2,[data-theme=dark] h3,[data-theme=dark] .profile strong,[data-theme=dark] .tenant-pill strong{color:var(--ink)}[data-theme=dark] .side-nav a.active,[data-theme=dark] .ff-brand-symbol,[data-theme=dark] .ff-tool-icon,[data-theme=dark] .avatar{background:#243c65;color:#9fc0ff}[data-theme=dark] .ff-welcome,[data-theme=dark] .ff-start-card,[data-theme=dark] .login-card{background:var(--surface);color:var(--ink)}[data-theme=dark] .ff-welcome h2,[data-theme=dark] .ff-welcome p,[data-theme=dark] .login-card h1{color:var(--ink)}[data-theme=dark] .global-search input{color:var(--ink)}[data-theme=dark] .btn.secondary{color:var(--ink)}[data-theme=dark] td,[data-theme=dark] th{border-color:var(--stroke)}[data-theme=dark] .ff-chip{background:var(--surface);color:var(--ink);border-color:var(--stroke)}[data-theme=dark] .ff-chip.active{background:#243c65;color:#9fc0ff}
@media(max-width:760px){.main-content{padding:18px 14px}.page-heading h1{font-size:24px}.workspace-toolbar{flex-wrap:wrap;gap:8px}.workspace-toolbar strong{display:none}.workspace-frame{height:calc(100dvh - 240px);min-height:440px}.topbar{padding:12px}.profile-copy{display:none}}
.workspace-page{display:flex;flex-direction:column;height:calc(100dvh - 215px);min-height:450px}.workspace-toolbar{flex:0 0 auto}.workspace-frame{flex:1;width:100%;border:0;height:auto;min-height:0}.workspace-focus .workspace-page{height:100dvh;min-height:0}.workspace-focus .workspace-frame{height:auto}.ff-quick{background:var(--surface);color:var(--ink)}.ff-quick>span{background:var(--bg)}[data-theme=dark] .ff-quick:hover{background:#1d2e49}[data-theme=dark] .global-search,[data-theme=dark] .tenant-pill{background:var(--bg)}[data-theme=dark] .ff-filters button{background:var(--surface);color:var(--ink);border-color:var(--stroke)}[data-theme=dark] .ff-filters button.active{background:#243c65;color:#b7d0ff}[data-theme=dark] .notice{background:#15453b;color:#b8eed6}[data-theme=dark] .notice.error{background:#492731;color:#ffc7d1}
@media(max-width:760px){.workspace-page{height:calc(100dvh - 200px);min-height:440px}.workspace-focus .workspace-page{min-height:0;height:100dvh}}
/* One central sidebar, including the active tool's native actions. */
.app-shell[data-workspace=true]{grid-template-columns:260px minmax(0,1fr)}
.sidebar{display:flex;flex-direction:column;overflow:hidden}.side-nav{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.sidebar-footer{flex:none}
.module-navigation{border-block:1px solid var(--stroke);padding:10px 0;margin:12px 0}.module-navigation p{font-size:12px;color:var(--muted);padding:0 12px;line-height:1.5}
.module-nav-item{display:block;width:100%;padding:10px 12px;border:0;background:transparent;text-align:left;font:inherit;font-size:13px;line-height:1.45;color:var(--ink);border-radius:9px;cursor:pointer}
.module-nav-item:hover{background:var(--bg)}.module-nav-item.active{background:#edf3ff;color:#2563eb;font-weight:650}.module-nav-item:disabled{opacity:.5;cursor:default}
.module-navigation details{margin:5px 0}.module-navigation summary{padding:10px 12px;color:var(--muted);cursor:pointer;font-size:12px;font-weight:650}.module-navigation details .module-nav-item{padding-left:22px}
.module-navigation label{display:block;padding:10px 12px;font-size:12px;color:var(--muted)}.module-navigation select{display:block;margin-top:7px;width:100%;padding:8px;border-radius:8px;border:1px solid var(--stroke)}
[data-theme=dark] .module-nav-item.active{background:#243c65;color:#b7d0ff}.workspace-focus .page-heading{display:none}.workspace-focus .workspace-page{position:static;inset:auto;z-index:auto;height:calc(100dvh - 115px);border-radius:12px}
@media(max-width:980px){.app-shell[data-workspace=true]{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.sidebar,.sidebar-overlay{transition:none!important}}

#moduleNavFilter{display:block;width:calc(100% - 24px);margin:4px 12px 10px;padding:9px 10px;border:1px solid var(--stroke);border-radius:8px;font-size:12px}#moduleNavFilter[hidden]{display:none}
