.compact-work-header{min-height:34px;margin-bottom:8px;align-items:center}.compact-work-header .breadcrumbs{margin:0}.plc-card{width:auto;text-align:left;color:#fff;cursor:pointer}.plc-card em{font-style:normal;color:#8fa0ba}.mini-plc{width:62px;height:40px;padding:5px;display:grid;grid-template-columns:1fr repeat(4,5px);align-items:center;gap:3px;border:1px solid #6f819d;border-radius:5px;background:#334158}.mini-plc b{font-size:.48rem;color:#dce8f8}.mini-plc i{width:5px;height:5px;border-radius:50%;background:#66758c}.mini-plc i:first-of-type{background:#34d17b;box-shadow:0 0 5px #34d17b}
.menu-bar{display:flex;align-self:stretch;margin-left:8px;padding-left:8px;border-left:1px solid #d5dce6}.app-menu{position:relative}.app-menu>button{height:28px;border-color:transparent!important;background:transparent!important;font:600 .7rem "Segoe UI",sans-serif!important}.app-menu:hover>button,.app-menu.open>button{background:#e5ebf3!important}.menu-popover{position:absolute;z-index:100;left:0;top:28px;display:none;width:245px;padding:5px;border:1px solid #bcc6d4;background:#fff;box-shadow:0 12px 30px rgba(25,43,69,.22)}.app-menu.open .menu-popover{display:block}.menu-popover button{width:100%;height:30px!important;padding:0 8px!important;display:flex;justify-content:space-between;align-items:center;border:0!important;border-radius:3px!important;background:#fff!important;text-align:left;font:400 .75rem "Segoe UI",sans-serif!important}.menu-popover button:hover{background:#e8f2ff!important;color:#075fb9}.menu-popover hr{margin:4px 5px;border:0;border-top:1px solid #e1e5ea}.menu-popover kbd{color:#7c8796;font:400 .65rem "Segoe UI",sans-serif}
.plc-dialog{width:min(940px,calc(100vw - 30px));max-width:none}.plc-console{overflow:hidden;border:1px solid #25374b;border-radius:18px;color:#e9f5ff;background:#52677a;box-shadow:0 35px 90px rgba(5,15,28,.42)}.plc-console>header{height:76px;padding:0 24px;display:flex;align-items:center;gap:18px;background:linear-gradient(160deg,#293a4c,#40566a);border-bottom:1px solid #71869a}.plc-console>header div{margin-right:auto}.plc-console>header small,.plc-console>header strong{display:block}.plc-console>header small{font-size:.58rem;letter-spacing:.18em;color:#89d8e4}.plc-console>header strong{margin-top:4px;font-size:1.35rem}.cpu-mode{padding:7px 12px;border-radius:7px;background:#a8b2bd;color:#263545;font-weight:900}.cpu-mode.run{background:#25c66d;color:#fff;box-shadow:0 0 16px rgba(37,198,109,.5)}.plc-face{min-height:410px;padding:28px;display:grid;grid-template-columns:1fr 220px 1fr;gap:24px;align-items:center;background:linear-gradient(90deg,rgba(255,255,255,.04),transparent 25%,transparent 75%,rgba(255,255,255,.04))}.plc-face section{height:100%;padding:18px;border:1px solid #3d5266;border-radius:12px;background:#465c70}.plc-face h3{margin:0 0 18px;font-size:.7rem;letter-spacing:.13em;color:#b9c8d5}.io-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px 8px}.io-channel{padding:8px 3px;border:0;border-radius:7px;display:grid;justify-items:center;gap:6px;background:#3c5064;color:#dce7ef;cursor:default}.io-channel.input{cursor:pointer}.io-channel.input:hover{background:#33495e}.io-led{width:13px;height:13px;border-radius:3px;background:#9aa8b4;box-shadow:inset 0 0 0 2px #bdc7cf}.io-channel.on .io-led{background:#ffec31;box-shadow:0 0 12px #ffec31,inset 0 0 0 2px #fff681}.io-channel small{font:700 .58rem Consolas,monospace}.cpu-center{display:grid;gap:22px}.cpu-display{min-height:150px;padding:24px 15px;border:7px solid #33495d;border-radius:9px;display:grid;place-content:center;text-align:center;background:#122535;box-shadow:inset 0 0 28px rgba(40,231,130,.08)}.cpu-display small{letter-spacing:.14em;color:#82a2b8}.cpu-display strong{margin:8px;font:900 2rem Consolas;color:#b8c6cf}.cpu-display strong.run{color:#51f08e;text-shadow:0 0 12px #1eca68}.cpu-display span{font:.72rem Consolas;color:#6fc5f5}.cpu-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cpu-controls button{height:42px;border:1px solid #8091a0;border-radius:7px;background:#354b60;color:#fff;font-weight:800;cursor:pointer}.cpu-controls button:hover{background:#263d52}.plc-console>footer{padding:12px 22px;display:flex;justify-content:space-between;background:#2f4357;color:#aebdca;font-size:.62rem}
body.cpu-running .editing-control,body.cpu-running .ladder-quickbar>[data-quick-type],body.cpu-running .instruction-palette button[draggable]{opacity:.42;cursor:not-allowed}.online-badge{color:#48e78a!important}.menu-popover button:disabled{opacity:.4;pointer-events:none}
@media print{body *{visibility:hidden!important}#ladderView,#ladderView *{visibility:visible!important}#ladderView{position:absolute!important;inset:0!important;padding:0!important}.compact-work-header,.block-editor-meta,.simulation-strip,.instruction-palette,.editor-toolbar button,.delete-rung,.remove-element,.remove-coil{display:none!important}.ladder-layout{display:block!important}.ladder-editor{border:0!important;box-shadow:none!important}.workspace{overflow:visible!important}.app-shell{display:block!important}}
@media(max-width:760px){.menu-bar{width:100%;margin:4px 0 0;padding:4px 0 0;border-left:0;border-top:1px solid #d5dce6}.ladder-quickbar{flex-wrap:wrap}.plc-face{grid-template-columns:1fr}.plc-face section{min-height:250px}.plc-dialog{max-height:calc(100vh - 20px);overflow:auto}}

/* Barra applicazione sempre sopra la rete Ladder. */
.block-editor-meta{position:relative;z-index:40;overflow:visible!important}.ladder-layout{position:relative;z-index:1}.menu-bar{overflow:visible}.menu-popover{z-index:1000}.quickbar-divider{align-self:center;width:1px;height:21px;margin:0 5px;background:#ccd5e0}.ladder-quickbar .bar-action{min-width:auto;padding:2px 10px;font-family:"Segoe UI",sans-serif;font-size:.68rem;color:#31516f;background:#edf3f8;border-color:#c7d3df}.ladder-quickbar .bar-action:hover{background:#dfeeff;color:#0875df;border-color:#75ace8}
.key-binding{min-width:92px;padding:6px 9px;border:1px solid #cbd6e3;border-radius:7px;background:#f5f8fb;color:#31516f;font-size:.68rem;font-weight:750;cursor:pointer}.key-binding:hover{border-color:#78afea;background:#eaf4ff}.key-binding.listening{border-color:#1680ef;background:#1680ef;color:#fff;animation:key-pulse 1s infinite}.no-key{color:#a2abb7}@keyframes key-pulse{50%{box-shadow:0 0 0 4px rgba(22,128,239,.14)}}
.app-shell{grid-template-rows:48px 1fr 26px}.topbar{min-height:48px}.brand{padding:0 12px;gap:8px}.brand-mark{width:28px;height:28px;border-radius:8px}.brand strong{font-size:.82rem}.brand small{font-size:.52rem}.project-title{font-size:.85rem}.top-actions{padding-right:8px}.project-nav{padding-top:0}.panel-heading{padding:12px 14px 8px}.panel-heading h1{font-size:1rem}.view{padding:22px}
.topbar{grid-template-columns:284px auto 1fr auto}.top-menu{align-self:center;margin-left:8px}.top-menu .menu-popover{top:28px}.top-actions{grid-column:4}
.top-menu .app-menu>button{font-size:.68rem!important;color:#26384d!important;padding:0 7px}.top-menu .app-menu>button:before{content:'▾ ';color:#69809a;font-size:.55rem}.project-title strong{font-family:"Segoe UI",sans-serif;font-size:.82rem}.project-title strong:before{content:'P) ';color:#2d78c9}.tree-row{border-bottom:1px solid rgba(255,255,255,.06);border-radius:0;min-height:35px;font-size:.76rem}.tree-icon{width:20px;height:20px;display:grid;place-items:center;border-radius:4px;background:rgba(255,255,255,.08);font-size:.7rem}.tree-icon.cpu{color:#78bdff;background:#17395e}.tree-icon.folder{color:#ffd166;background:#4b3e20}.tree-icon.vars{color:#c5a8ff;background:#382b5a}.panel-heading h1{font-size:.95rem;letter-spacing:-.02em}.classic-toolbar{display:flex;align-items:center;gap:2px}.classic-toolbar button{width:25px;height:25px;border:0;background:transparent;cursor:pointer;font-size:.82rem}.classic-toolbar button:hover{background:#e6eef7}.classic-toolbar span{width:1px;height:20px;background:#d5dce6;margin:0 5px}
