/* Engineering workbench enhancements */
:root{--control-h:38px;--status-green:#16845b;--status-amber:#b7790b;--status-red:#c63f45}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.page-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px}.page-head>div:first-child{min-width:0}.workbench-controls{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;min-height:42px;margin-top:3px;padding:0 5px 0 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 3px 12px #2b303a08}.engineering-state,.view-controls{display:flex;align-items:center;gap:8px}.engineering-state>span{display:inline-flex;align-items:center;gap:7px;padding-right:13px;color:var(--muted);font-size:10px}.engineering-state>span+span{padding-left:13px;border-left:1px solid var(--line)}.engineering-state b{color:var(--ink);font-weight:700}.engineering-state .state-ok{color:var(--status-green);font-weight:700}.engineering-state .ui-icon{width:14px;height:14px}.icon-control{display:inline-flex;min-height:32px;align-items:center;gap:7px;padding:0 10px;border-color:transparent;font-size:10px}.icon-control:hover,.icon-control[aria-pressed=true]{border-color:var(--line);background:var(--surface2)}.icon-control .ui-icon{width:15px;height:15px}
body.engineering-view .content{max-width:1600px}.workspace,.route-layout{align-items:stretch}.workspace>.panel,.route-layout>.panel,.route-layout>.canvas{min-height:500px}.tree{border-radius:10px!important}.tree .panel-head{margin-bottom:12px;padding-bottom:14px;border-bottom:1px solid var(--line)}.tree>div:last-child{padding:5px 0}.tree section{position:relative;margin-left:14px;padding-left:18px;border-left:1px solid #e7d8cb}.tree section::before{content:"";position:absolute;top:15px;left:0;width:13px;border-top:1px solid #e7d8cb}.tree-node{display:block;margin:2px -8px;padding:8px 10px;border-radius:7px;color:var(--ink);cursor:pointer;font:700 11px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.tree-node:hover{background:#fbf5f0;color:var(--blue)}.tree-node[aria-selected=true]{background:#faf3ec;color:#c9461a;box-shadow:inset 3px 0 #e4551d}.tree .tree-node+small{display:block;margin:-5px 2px 6px 24px;color:var(--muted);font-size:9px}.inspector{border-radius:10px!important;background:linear-gradient(180deg,var(--surface),var(--surface2))}.inspector h3{margin-bottom:7px;font:750 17px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace}.selection-kind{display:inline-block;margin-bottom:18px;padding:4px 7px;border-radius:4px;background:#fbf4ed;color:var(--blue);font-size:9px;font-weight:800;text-transform:uppercase}.inline-status{display:inline-flex;align-items:center;gap:5px;font-weight:750}.inline-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}.inline-status.good{color:var(--status-green)}.inspector-note{margin-top:22px;padding:13px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.inspector-note b{font-size:10px}.inspector-note p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.tabs{overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tabs button{white-space:nowrap}.tabs button[aria-selected=true]{color:var(--blue);border-color:var(--blue)}.table-panel{overflow:auto;max-height:min(64vh,720px)}.table-panel thead{position:sticky;top:0;z-index:2;background:var(--surface)}.table-panel tbody tr{transition:background .15s ease}.table-panel tbody tr:hover{background:#fcf7f3}.table-panel td code{padding:3px 6px;border-radius:4px;background:var(--surface2);color:var(--ink2);font-size:11px}.toolbar{position:sticky;top:115px;z-index:5;padding:10px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--paper) 92%,transparent);backdrop-filter:blur(10px)}
html[data-density=compact] .content{padding-top:20px}html[data-density=compact] .page-head{margin-bottom:16px}html[data-density=compact] .panel{padding:17px}html[data-density=compact] .metrics article{padding:15px}html[data-density=compact] .hero{min-height:220px;padding:32px}html[data-density=compact] .hero h2{font-size:39px}html[data-density=compact] table td,html[data-density=compact] table th{padding-top:9px;padding-bottom:9px}html[data-density=compact] .workspace>.panel,html[data-density=compact] .route-layout>.panel,html[data-density=compact] .route-layout>.canvas{min-height:430px}
body.inspectors-collapsed #architecture .workspace{grid-template-columns:1fr}body.inspectors-collapsed #architecture .inspector,body.inspectors-collapsed #routes>.route-layout>.inspector{display:none}body.inspectors-collapsed #routes .route-layout{grid-template-columns:240px 1fr}
@media(max-width:900px){.page-head{grid-template-columns:1fr}.workbench-controls{grid-column:1;overflow:auto}.engineering-state>span:nth-child(2){display:none}.workspace>.panel,.route-layout>.panel,.route-layout>.canvas{min-height:auto}.toolbar{position:static}.icon-control span{display:none}.icon-control{width:34px;justify-content:center;padding:0}}
@media(max-width:639px){.content{padding-top:18px}.page-head{gap:11px;margin-bottom:15px}.page-head h1{font-size:24px}.page-head>div:first-child>p:last-child{font-size:12px}.workbench-controls{order:3;min-height:38px;margin:0;border-radius:8px}.engineering-state>span{font-size:9px}.view-controls{margin-left:auto}.hero{min-height:250px}.metrics{grid-template-columns:1fr 1fr}.tabs{margin-inline:-16px;padding-inline:16px}.table-panel{margin-inline:-16px;border-radius:0}.route-layout{display:grid}.route-layout>.palette{order:2}.route-layout>.canvas{order:1;min-height:330px}.route-layout>.inspector{order:3}.topbar{position:sticky;top:0;z-index:20}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Readable application scale: optimized for full-HD engineering workstations */
body{font-size:15px;line-height:1.45}.wrap{width:min(1680px,calc(100% - 64px))}.top-main{height:76px}.navwrap{height:54px}.navwrap nav button{height:54px;padding-inline:16px;font-size:13px}.navwrap nav button .ui-icon{width:19px;height:19px}.navwrap>.primary{min-height:40px;padding-inline:18px;font-size:13px}.product{width:184px}.product img{width:172px;height:58px}.context{gap:18px}.context label{font-size:10px}.context select{min-width:180px;font-size:13px}.top-actions>button{width:42px;height:42px}.health{padding:8px 12px;font-size:12px}.profile>span{font-size:12px}.profile>span small{font-size:10px}.profile>b{width:34px;height:34px;font-size:13px}
.content{padding-top:38px}.page-head{margin-bottom:28px}.page-head h1{margin:7px 0 4px;font-size:36px}.page-head>div:first-child>p:last-child{font-size:15px}.overline,.breadcrumbs{font-size:11px}.workbench-controls{min-height:50px;padding-left:17px}.engineering-state>span,.icon-control{font-size:12px}.icon-control{min-height:38px;padding-inline:13px}.engineering-state .ui-icon,.icon-control .ui-icon{width:17px;height:17px}
.tabs{margin-bottom:16px}.tabs button{min-height:48px;padding:12px 17px;font-size:13px}.panel{padding:28px}.panel h3{font-size:19px}.workspace{grid-template-columns:minmax(0,1fr) 340px;gap:16px}.workspace>.panel,.route-layout>.panel,.route-layout>.canvas{min-height:540px}.tree .panel-head{margin-bottom:18px;padding-bottom:18px}.tree section{margin-left:19px;padding-left:23px}.tree section::before{top:21px;width:18px}.tree-node{margin:3px -8px;padding:11px 12px;font-size:14px;line-height:1.35}.tree .tree-node+small{margin:-7px 2px 8px 30px;font-size:11px}.inspector h3{font-size:20px}.selection-kind{padding:5px 8px;font-size:10px}.inspector dl>div{padding:14px 0;font-size:13px}.hint,.inspector-note p,.inspector-note b{font-size:12px}
.hero{min-height:300px;padding:50px}.hero h2{font-size:50px}.hero>div>p:last-of-type{font-size:16px}.hero-actions button{min-height:44px;font-size:13px}.hero aside{min-width:210px;padding:26px}.hero aside span,.hero aside small{font-size:11px}.metrics{gap:16px;margin:18px 0}.metrics article{gap:17px;padding:25px}.metrics article>i{width:48px;height:48px}.metrics small{font-size:10px}.metrics strong{font-size:34px}.metrics p{font-size:13px}.dashgrid{gap:16px}.pipeline button{min-height:64px;padding:14px}.pipeline button b{font-size:13px}.pipeline button small,.palette small{font-size:11px}.tasks span{font-size:13px}.tasks button{font-size:12px}
.toolbar{gap:10px;padding:12px}.toolbar select,.searchfield{min-height:46px;font-size:13px}.secondary,.primary{min-height:44px;font-size:13px}.table-panel th,.table-panel td{padding:16px;font-size:14px}.table-panel th{font-size:11px}.table-panel td code{font-size:13px}.chip{padding:6px 10px;font-size:11px}.project-grid,.admin-grid{grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px}.project-card{padding:26px}.project-card h3,.admin-grid h3{font-size:18px}.project-card p,.admin-grid p{font-size:14px;line-height:1.55}
.route-layout{grid-template-columns:270px minmax(0,1fr) 300px;gap:16px;min-height:540px}.palette p{padding:13px;font-size:13px}.canvas>div{padding:32px}.canvas h3{font-size:21px}.canvas p{font-size:14px}.legend{font-size:12px}.import-grid{grid-template-columns:minmax(0,1fr) 340px;gap:16px;max-width:1100px}.upload-card{padding:42px}.upload-card h3{font-size:21px}.upload-card p,.checklist p{font-size:13px}.upload-card select{min-height:46px;font-size:13px}.filezone{padding:32px}.filezone small{font-size:12px}.analysis-grid strong{font-size:30px}.analysis-grid small,.diag{font-size:12px}.timeline article{padding:16px 20px;font-size:13px}.empty h2{font-size:26px}.empty p{font-size:14px}
.team-summary h2{font-size:30px}.team-summary p:last-child{font-size:15px}.team-stats>div{padding:22px}.team-stats strong{font-size:30px}.team-stats span{font-size:13px}.team-stats small{font-size:11px}.team-toolbar h3{font-size:19px}.team-toolbar p{font-size:12px}.team-row{grid-template-columns:48px minmax(200px,1.2fr) minmax(260px,1.3fr) minmax(170px,.8fr) auto;padding:18px 24px}.member-avatar{width:44px;height:44px}.member-identity b{font-size:14px}.member-identity small,.member-role small,.member-access small{font-size:11px}.role-pill,.status-pill{font-size:11px}.permission-grid b{font-size:12px}.permission-grid p{font-size:11px}.team-empty,.team-loading{font-size:14px}
.popover-eyebrow{font-size:10px}.account-card-head b,.popover-title b{font-size:17px}.account-card-head small,.account-role,.popover .popover-action{font-size:13px}.notification-item b{font-size:13px}.notification-item p{font-size:12px}.notification-item small,.popover-footer{font-size:11px}.dialog-head h3{font-size:23px}.dialog-subtitle,dialog:not(#searchDialog) form label{font-size:13px}dialog input,dialog select,dialog textarea{font-size:14px}
@media(min-width:1800px){.wrap{width:min(1680px,calc(100% - 96px))}.workspace>.panel,.route-layout>.panel,.route-layout>.canvas{min-height:580px}}
@media(max-width:1180px) and (min-width:901px){.wrap{width:calc(100% - 36px)}.navwrap nav button{padding-inline:10px;font-size:12px}.workspace{grid-template-columns:minmax(0,1fr) 300px}.route-layout{grid-template-columns:230px minmax(0,1fr) 270px}}
@media(max-width:900px){.wrap{width:min(100% - 28px,1680px)}.top-main{height:64px}.content{padding-top:22px}.page-head h1{font-size:30px}.workspace{grid-template-columns:1fr}.workspace>.panel,.route-layout>.panel,.route-layout>.canvas{min-height:auto}.route-layout{grid-template-columns:1fr}.import-grid{grid-template-columns:1fr}.panel{padding:22px}}
@media(max-width:639px){body{font-size:14px}.wrap{width:calc(100% - 24px)}.page-head h1{font-size:27px}.metrics{grid-template-columns:1fr}.hero h2{font-size:34px}.panel{padding:19px}.table-panel th,.table-panel td{padding:13px;font-size:13px}.workbench-controls{padding-left:12px}.engineering-state>span,.icon-control{font-size:11px}}
html[data-density=compact] .content{padding-top:26px}html[data-density=compact] .page-head{margin-bottom:20px}html[data-density=compact] .panel{padding:22px}html[data-density=compact] .metrics article{padding:19px}html[data-density=compact] .hero{min-height:250px;padding:38px}html[data-density=compact] .hero h2{font-size:43px}html[data-density=compact] .table-panel td,html[data-density=compact] .table-panel th{padding-top:11px;padding-bottom:11px}html[data-density=compact] .tree-node{padding-block:8px;font-size:13px}html[data-density=compact] .workspace>.panel,html[data-density=compact] .route-layout>.panel,html[data-density=compact] .route-layout>.canvas{min-height:470px}
.tree b.tree-node{margin:3px -8px;padding:11px 12px;font-size:14px;line-height:1.35}.tree b.tree-node:hover{background:#fbf5f0;color:var(--blue)}.tree b.tree-node[aria-selected=true]{background:#faf3ec;color:#c9461a;box-shadow:inset 3px 0 #e4551d}html[data-density=compact] .tree b.tree-node{padding:9px 10px;font-size:13px}

/* Controller structure explorer */
#architecture .workspace{grid-template-columns:minmax(560px,1.55fr) minmax(360px,.65fr);gap:18px}#architecture .tree{padding:0;overflow:hidden}#architecture .tree>.panel-head{margin:0;padding:24px 26px 20px;background:var(--surface)}#architecture .tree>div:last-child{margin:0;padding:18px 22px 28px;background:var(--surface2);min-height:460px}#architecture .tree section{margin-left:22px;padding-left:26px;border-left:1px solid #facea2}#architecture .tree section::before{display:none}.controller-node{position:relative;display:flex;width:min(100%,620px);min-height:52px;align-items:center;justify-content:space-between;gap:18px;margin:7px 0;padding:5px 10px 5px 4px;border:1px solid var(--line);border-radius:9px;background:var(--surface);box-shadow:0 2px 8px #2b303a08;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.controller-node:hover{border-color:#fac998;box-shadow:0 6px 18px #2b303a12;transform:translateX(2px)}.controller-node::before{content:"";position:absolute;right:14px;bottom:-8px;width:1px;height:8px;background:#facea2}.controller-node:last-of-type::before{display:none}.controller-node>.tree-node{flex:1;min-width:0;margin:0!important;background:transparent!important;box-shadow:none!important}.controller-node>.tree-node[aria-selected=true]{color:#c9461a}.controller-node:has(.tree-node[aria-selected=true]){border-color:#f2b06a;background:#fbf4ee;box-shadow:inset 4px 0 #e4551d,0 5px 16px #e4551d14}.controller-node>small{flex:0 0 auto;margin:0!important;padding:5px 8px;border-radius:999px;background:var(--paper);font-size:10px!important;font-weight:700;white-space:nowrap}.controller-node:has(.tree-node[aria-selected=true])>small{background:#fff;color:#e4551d}#architecture .inspector{padding:26px;min-height:540px}.inspector-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line)}.inspector-heading h3{margin-top:7px}.inspector-heading .selection-kind{margin:0}.inspector-heading+dl{margin:6px 0 0}.inspector-note{margin-top:24px;background:var(--surface)}
@media(max-width:1100px){#architecture .workspace{grid-template-columns:minmax(0,1fr) 320px}.controller-node{width:100%}}
@media(max-width:900px){#architecture .workspace{grid-template-columns:1fr}#architecture .tree>div:last-child{min-height:auto}.controller-node{width:100%}#architecture .inspector{min-height:auto}}
@media(max-width:639px){#architecture .tree>.panel-head{padding:19px}#architecture .tree>div:last-child{padding:12px}#architecture .tree section{margin-left:13px;padding-left:14px}.controller-node{min-height:48px;gap:8px}.controller-node>small{font-size:9px!important}.inspector-heading{display:block}.inspector-heading .selection-kind{margin-top:8px}}
