:root{--ap-blue:#123b97;--ap-blue2:#1f63d4;--ap-bg:#f4f8ff;--ap-text:#102a62;--ap-muted:#6f82a6;--ap-line:#dfe9f8;--ap-card:#fff;--ap-green:#2b9a5c;--ap-orange:#ff8a1d;--ap-red:#e84e57;--ap-radius:22px;--ap-shadow:0 10px 30px rgba(31,74,150,.08)}
body.page-template-default:has(#apsem-app) header:not(.apsem-header),body.page-template-default:has(#apsem-app) footer{display:none!important}body:has(#apsem-app){background:var(--ap-bg)!important}.apsem-app{min-height:100vh;background:linear-gradient(135deg,#f7fbff,#eef5ff);color:var(--ap-text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.apsem-app *{box-sizing:border-box}.apsem-header{height:86px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:10px 28px;border-bottom:1px solid var(--ap-line);position:sticky;top:0;z-index:40}.apsem-brand{display:flex;align-items:center;gap:14px}.apsem-brand img{width:62px;height:62px;object-fit:contain;border-radius:50%}.apsem-brand strong{display:block;font-family:Georgia,serif;font-size:26px;color:#12347d}.apsem-brand span{display:block;color:var(--ap-muted);font-size:14px}.apsem-header-actions{display:flex;gap:18px;align-items:center}.apsem-icon-btn{border:0;background:transparent;font-size:22px;position:relative}.apsem-badge{position:absolute;right:-8px;top:-6px;background:#ef4444;color:#fff;font-size:10px;border-radius:20px;padding:2px 5px}.apsem-avatar{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ap-text);font-weight:700}.apsem-avatar span{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--ap-blue2);color:#fff}.apsem-shell{display:grid;grid-template-columns:340px minmax(0,1fr) 330px;gap:16px;max-width:1680px;margin:auto;padding:18px}.apsem-left,.apsem-center,.apsem-right{min-width:0}.apsem-welcome{padding:4px 8px 14px}.apsem-welcome small{letter-spacing:.28em;color:var(--ap-muted)}.apsem-welcome h1{font-family:Georgia,serif;font-size:42px;margin:4px 0 0}.apsem-welcome p{margin:4px 0;color:var(--ap-muted);font-size:18px}.apsem-navcards{display:grid;gap:9px}.apsem-navcard{width:100%;min-height:84px;border:1px solid var(--ap-line);background:#fff;border-radius:18px;display:flex;align-items:center;gap:14px;padding:12px 14px;text-align:left;box-shadow:var(--ap-shadow);cursor:pointer;color:var(--ap-text)}.apsem-navcard:hover{border-color:#b6d0ff;transform:translateY(-1px)}.apsem-nav-icon{width:58px;height:58px;border-radius:16px;background:#eaf2ff;display:grid;place-items:center;font-size:28px}.apsem-nav-copy{flex:1}.apsem-nav-copy strong{display:block;font-size:18px}.apsem-nav-copy small{display:block;color:var(--ap-muted);margin-top:3px}.apsem-arrow{font-size:24px;color:var(--ap-blue)}.apsem-planner,.apsem-widget,.apsem-apmedia,.apsem-operator-main{background:#fff;border:1px solid var(--ap-line);border-radius:var(--ap-radius);box-shadow:var(--ap-shadow)}.apsem-planner{padding:18px}.apsem-planner-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.apsem-planner h2{font-size:28px;margin:0}.apsem-planner p{color:var(--ap-muted);margin:2px 0}.apsem-week-switch{display:flex;align-items:center;gap:8px}.apsem-week-switch button,.apsem-outline{border:1px solid var(--ap-line);background:#f7faff;color:var(--ap-blue);border-radius:13px;padding:9px 12px;font-weight:700}.apsem-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:15px 0}.apsem-summary>div{border-radius:16px;padding:13px 15px;background:#eff5ff}.apsem-summary>div:nth-child(2){background:#effaf1}.apsem-summary>div:nth-child(3){background:#fff5e9}.apsem-summary>div:nth-child(4){background:#f5efff}.apsem-summary b{font-size:24px;display:block}.apsem-summary span{color:var(--ap-muted);font-size:13px}.apsem-weeklist{border:1px solid var(--ap-line);border-radius:18px;overflow:hidden}.apsem-dayrow{display:grid;grid-template-columns:78px 1fr;min-height:85px;border-bottom:1px solid var(--ap-line)}.apsem-dayrow:last-child{border-bottom:0}.apsem-daylabel{background:#f7faff;display:grid;place-content:center;text-align:center}.apsem-daylabel b{font-size:14px}.apsem-daylabel span{font-size:28px;font-weight:800}.apsem-daylabel small{text-transform:uppercase;color:var(--ap-muted)}.apsem-dayitems{padding:9px;display:grid;gap:6px}.apsem-planitem{display:grid;grid-template-columns:58px 110px minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 7px;border-radius:11px}.apsem-planitem:hover{background:#f8fbff}.apsem-planitem time{color:var(--ap-muted)}.apsem-type{font-size:12px;font-weight:800;padding:5px 8px;border-radius:10px;background:#eef4ff}.type-travel .apsem-type{background:#f3ecff}.type-magazine .apsem-type{background:#ebf9ee}.type-event .apsem-type{background:#fff0f2}.type-meeting .apsem-type{background:#fff4e7}.type-invoice2 .apsem-type{background:#fff0f0}.apsem-navlink{font-size:12px;text-decoration:none;color:var(--ap-blue);background:#eef4ff;padding:6px 9px;border-radius:10px}.apsem-empty-add{border:1px dashed #bdd0ef;background:#f9fbff;border-radius:10px;color:var(--ap-blue);padding:9px;cursor:pointer}.apsem-fab{margin-top:12px;border:0;background:var(--ap-blue2);color:#fff;border-radius:13px;padding:12px 16px;font-weight:800}.apsem-widget{padding:16px;margin-bottom:14px}.apsem-widget-title{display:flex;align-items:center;justify-content:space-between}.apsem-widget h3{margin:0 0 10px}.apsem-widget-title button{border:1px solid var(--ap-line);background:#f7faff;border-radius:10px;color:var(--ap-blue);padding:7px 9px}.apsem-widget label{display:block;padding:7px 0;color:#40577e}.apsem-widget p{border-bottom:1px solid #edf2fa;padding-bottom:10px}.apsem-apmedia{padding:12px;position:sticky;top:100px}.apsem-aplogo{display:block;text-align:center}.apsem-aplogo img{max-width:100%;height:90px;object-fit:contain}.apsem-player{margin-top:10px;border-radius:15px;overflow:hidden;background:#07142f;color:#fff}.apsem-player-title{padding:9px 12px;font-size:12px;font-weight:800}.live-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#ff3147;margin-right:6px}.apsem-player iframe,.apsem-player video{width:100%;aspect-ratio:16/9;border:0}.apsem-player-placeholder{aspect-ratio:16/9;display:grid;place-content:center;text-align:center;color:#c9d6f4;padding:10px}.apsem-ticker{margin-top:10px;background:#0d2869;color:#fff;border-radius:12px;padding:10px;overflow:hidden}.apsem-ticker b{font-size:11px;color:#ff5d64}.apsem-ticker-track{white-space:nowrap;overflow:hidden;margin-top:5px}.apsem-ticker-track span{display:inline-block;animation:apsemTicker 26s linear infinite}@keyframes apsemTicker{to{transform:translateX(-60%)}}.apsem-operator-home{grid-template-columns:minmax(0,1fr) 350px}.apsem-operator-main{padding:24px}.apsem-operator-main .apsem-navcards{grid-template-columns:repeat(2,minmax(0,1fr))}.apsem-modal{position:fixed;inset:0;background:rgba(4,19,55,.58);backdrop-filter:blur(5px);z-index:99999;display:none;padding:24px;overflow:auto}.apsem-modal.open{display:grid;place-items:center}.apsem-modal-panel{width:min(720px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:24px;padding:22px;position:relative;box-shadow:0 30px 80px rgba(0,0,0,.25)}.apsem-modal-lg{width:min(920px,100%)}.apsem-modal-xl{width:min(1180px,100%)}.apsem-close{position:sticky;float:right;top:0;z-index:3;width:44px;height:44px;border-radius:50%;border:0;background:#eef4ff;color:var(--ap-blue);font-size:28px}.apsem-no-scroll{overflow:hidden}.apsem-wizard-head h2{font-size:30px;margin:3px 0}.apsem-wizard-head p,.apsem-help{color:var(--ap-muted)}.apsem-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:20px 0}.apsem-steps button{border:1px solid var(--ap-line);background:#f8fbff;border-radius:14px;padding:10px;color:var(--ap-muted);font-weight:700}.apsem-steps b{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e8eef8;margin-right:7px}.apsem-steps button.active{background:#eaf2ff;color:var(--ap-blue);border-color:#93b8f5}.apsem-steps button.active b,.apsem-steps button.done b{background:var(--ap-blue2);color:#fff}.apsem-steps button.done{color:var(--ap-green)}.apsem-step{display:none}.apsem-step.active{display:block}.apsem-step h3{font-size:22px}.apsem-grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.apsem-span2{grid-column:1/-1}.apsem-step label,.apsem-grid2 label{display:grid;gap:6px;font-weight:700}.apsem-step input,.apsem-step select,.apsem-step textarea,.apsem-grid2 input,.apsem-grid2 select,.apsem-grid2 textarea{width:100%;border:1px solid #cfdcf0;background:#fff;border-radius:12px;padding:12px;font:inherit;color:var(--ap-text)}.apsem-step fieldset{border:0;padding:0;margin-top:15px;display:flex;gap:10px;flex-wrap:wrap}.apsem-step fieldset label{display:flex;align-items:center;border:1px solid var(--ap-line);padding:9px 12px;border-radius:12px}.apsem-media-spec{border:1px solid #b9d4ff;background:#f1f7ff;border-radius:16px;padding:14px;display:grid;gap:4px;margin-bottom:12px}.apsem-media-spec strong{font-size:20px;color:var(--ap-blue)}.apsem-media-spec span{color:var(--ap-muted)}.apsem-upload{border:2px dashed #adc8ef;border-radius:16px;min-height:170px;position:relative;background:#fbfdff}.apsem-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.apsem-upload>div{height:170px;display:grid;place-content:center;text-align:center;pointer-events:none}.apsem-upload b,.apsem-upload span{display:block;margin-top:5px}.apsem-media-preview{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:10px}.apsem-media-preview>div{min-height:120px;border-radius:12px;background:#eef4ff;overflow:hidden;display:grid;place-content:center;text-align:center}.apsem-media-preview img{width:100%;aspect-ratio:16/9;object-fit:cover}.apsem-media-preview span{font-size:11px;padding:5px}.apsem-media-preview .error{background:#fff0f0;color:#b91c1c;padding:10px}.apsem-review{background:#f7faff;border-radius:14px;padding:15px}.apsem-confirm{display:flex!important;grid-template-columns:auto 1fr!important;align-items:start;margin-top:14px}.apsem-wizard-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.apsem-wizard-actions button{border:0;border-radius:12px;padding:12px 18px;font-weight:800}.apsem-primary{background:var(--ap-blue2);color:#fff}.apsem-secondary{background:#eef4ff;color:var(--ap-blue)}.apsem-success{background:var(--ap-green);color:#fff}.apsem-toast{position:fixed;right:20px;bottom:20px;background:#0f8d55;color:#fff;padding:12px 16px;border-radius:12px;opacity:0;transform:translateY(10px);transition:.2s;z-index:100000}.apsem-toast.show{opacity:1;transform:translateY(0)}.apsem-toast.bad{background:#b91c1c}.apsem-login{max-width:480px;margin:60px auto;padding:30px;text-align:center;background:#fff;border-radius:20px;box-shadow:var(--ap-shadow)}.apsem-login img{width:110px}
@media(max-width:1200px){.apsem-shell{grid-template-columns:300px minmax(0,1fr)}.apsem-right{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.apsem-apmedia{position:static}.apsem-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.apsem-header{height:72px;padding:8px 12px}.apsem-brand img{width:48px;height:48px}.apsem-brand strong{font-size:18px}.apsem-brand span{font-size:11px}.apsem-avatar{font-size:0}.apsem-shell,.apsem-operator-home{display:block;padding:10px}.apsem-left{margin-bottom:12px}.apsem-admin-home .apsem-left .apsem-navcards{grid-template-columns:repeat(2,1fr)}.apsem-navcard{min-height:72px}.apsem-nav-icon{width:46px;height:46px;font-size:21px}.apsem-nav-copy strong{font-size:15px}.apsem-nav-copy small{font-size:11px}.apsem-center{margin-bottom:12px}.apsem-planner-head{display:block}.apsem-week-switch{margin-top:10px;flex-wrap:wrap}.apsem-planitem{grid-template-columns:48px 92px 1fr}.apsem-navlink{grid-column:3}.apsem-right{display:block}.apsem-apmedia{position:static}.apsem-player-placeholder{aspect-ratio:16/9}.apsem-operator-main{padding:14px}.apsem-operator-main .apsem-navcards{grid-template-columns:1fr}.apsem-grid2{grid-template-columns:1fr}.apsem-span2{grid-column:auto}.apsem-steps{grid-template-columns:1fr 1fr}.apsem-media-preview{grid-template-columns:repeat(2,1fr)}.apsem-modal{padding:6px}.apsem-modal-panel{border-radius:18px;padding:14px}.apsem-welcome h1{font-size:34px}}
@media(max-width:520px){.apsem-admin-home .apsem-left .apsem-navcards{grid-template-columns:1fr}.apsem-summary{grid-template-columns:1fr 1fr}.apsem-dayrow{grid-template-columns:62px 1fr}.apsem-planitem{grid-template-columns:45px 1fr}.apsem-planitem strong{grid-column:1/-1;padding-left:45px}.apsem-navlink{grid-column:2}.apsem-steps{grid-template-columns:1fr}.apsem-media-preview{grid-template-columns:1fr 1fr}}
.apsem-userbox{display:flex;align-items:center;gap:10px}.apsem-logout{font-size:12px;text-decoration:none;color:var(--ap-muted);font-weight:700}.apsem-login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#f7fbff,#eef5ff);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.apsem-login-card{width:min(520px,100%);background:#fff;border:1px solid var(--ap-line);border-radius:26px;box-shadow:0 24px 70px rgba(22,63,135,.14);padding:30px;text-align:center}.apsem-login-logos{display:flex;align-items:center;justify-content:center;gap:24px;margin-bottom:12px}.apsem-login-logos img{width:96px;height:96px;object-fit:contain}.apsem-login-card h2{font-size:28px;color:var(--ap-text);margin:8px 0}.apsem-login-card>p{color:var(--ap-muted)}.apsem-app-login-form{display:grid;gap:14px;text-align:left;margin-top:22px}.apsem-app-login-form label{display:grid;gap:7px;font-weight:800;color:var(--ap-text)}.apsem-app-login-form input{width:100%;border:1px solid #cfdcf0;border-radius:13px;padding:13px 14px;font:inherit}.apsem-app-login-form button{border:0;border-radius:13px;padding:14px 18px;font-weight:800;font-size:16px;cursor:pointer}.apsem-login-error{background:#fff0f0;color:#b91c1c;border:1px solid #f3b9b9;border-radius:12px;padding:10px 12px;margin:14px 0;text-align:left}.apsem-back-home{display:inline-block;margin-top:18px;color:var(--ap-blue);text-decoration:none;font-weight:700}
@media(max-width:800px){.apsem-userbox{gap:5px}.apsem-logout{font-size:11px}.apsem-login-card{padding:20px}.apsem-login-logos img{width:76px;height:76px}}

/* PWA / installazione applicativo */
.apsem-install-btn{display:none;align-items:center;gap:7px;border:1px solid #c9daf6;background:#eef5ff;color:var(--ap-blue);border-radius:12px;padding:9px 12px;font-weight:800;cursor:pointer;white-space:nowrap}.apsem-install-btn:hover{background:#e4efff;border-color:#9ebef0}.apsem-install-guide{display:flex;align-items:center;gap:18px;margin:8px 0 20px}.apsem-install-guide img{width:92px;height:92px;border-radius:22px;box-shadow:0 10px 28px rgba(18,59,151,.15)}.apsem-install-guide h2{margin:3px 0 5px}.apsem-install-guide small{letter-spacing:.15em;color:var(--ap-muted);font-weight:800}.apsem-install-guide p{color:var(--ap-muted);margin:0}.apsem-install-steps{display:grid;gap:10px}.apsem-install-steps p{margin:0;border:1px solid var(--ap-line);background:#f8fbff;border-radius:14px;padding:13px 15px;color:#40577e}.apsem-install-native{width:100%;border:0;border-radius:13px;padding:14px 18px;font-weight:800;font-size:16px;margin-top:16px;cursor:pointer}
@media(max-width:800px){.apsem-install-btn span{display:none}.apsem-install-btn{padding:9px 10px}.apsem-install-guide{align-items:flex-start}.apsem-install-guide img{width:72px;height:72px;border-radius:18px}}

/* 1.0.4: shell applicativo standalone, completamente separato dal tema WordPress */
html:has(body.apsem-standalone-body),body.apsem-standalone-body{margin:0!important;padding:0!important;width:100%!important;min-width:0!important;min-height:100%!important;background:#f4f8ff!important;overflow-x:hidden!important}
body.apsem-standalone-body #wpadminbar{display:none!important}
body.apsem-standalone-body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important}
body.apsem-standalone-body>.apsem-app,body.apsem-standalone-body>.apsem-login-shell{width:100vw!important;max-width:none!important;margin:0!important;min-height:100vh!important}
body.apsem-standalone-body .apsem-app{position:relative;isolation:isolate}
body.apsem-standalone-body .apsem-header{top:0!important;width:100%!important}
body.apsem-standalone-body .apsem-shell{max-width:none!important;width:100%!important;padding:18px 22px 26px!important;grid-template-columns:minmax(280px,340px) minmax(540px,1fr) minmax(300px,350px)!important;align-items:start!important}
body.apsem-standalone-body .apsem-right{min-width:0!important}
body.apsem-standalone-body .apsem-apmedia{top:104px!important}
@media(max-width:1320px){body.apsem-standalone-body .apsem-shell{grid-template-columns:300px minmax(0,1fr)!important}body.apsem-standalone-body .apsem-right{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:800px){body.apsem-standalone-body .apsem-shell{display:block!important;padding:10px!important}body.apsem-standalone-body .apsem-right{display:block!important}}

/* 1.0.6: app shell hard-isolated from any WordPress theme layout */
html,body.apsem-standalone-body{margin:0!important;padding:0!important;width:100%!important;min-width:0!important;min-height:100%!important;background:#f4f8ff!important;overflow-x:hidden!important}
body.apsem-standalone-body *{box-sizing:border-box}
body.apsem-standalone-body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important}
body.apsem-standalone-body #wpadminbar,body.apsem-standalone-body header:not(.apsem-header),body.apsem-standalone-body footer:not(.apsem-modal *),body.apsem-standalone-body .site-header,body.apsem-standalone-body .site-footer,body.apsem-standalone-body .sidebar,body.apsem-standalone-body .widget-area,body.apsem-standalone-body .breadcrumbs{display:none!important}
body.apsem-standalone-body>.apsem-app,body.apsem-standalone-body>.apsem-login-shell{width:100%!important;max-width:none!important;margin:0!important;min-height:100vh!important}
body.apsem-standalone-body .apsem-header{position:sticky!important;top:0!important;left:0!important;right:0!important;width:100%!important;z-index:1000!important}
body.apsem-standalone-body .apsem-shell{display:grid!important;width:100%!important;max-width:none!important;margin:0!important;padding:18px!important;grid-template-columns:minmax(270px,320px) minmax(0,1fr) minmax(280px,330px)!important;gap:18px!important;align-items:start!important}
body.apsem-standalone-body .apsem-left,body.apsem-standalone-body .apsem-center,body.apsem-standalone-body .apsem-right{min-width:0!important;width:auto!important;max-width:none!important}
body.apsem-standalone-body .apsem-right{grid-column:auto!important;display:block!important}
body.apsem-standalone-body .apsem-apmedia{position:sticky!important;top:92px!important}
body.apsem-standalone-body .apsem-planner{min-width:0!important;overflow:hidden!important}
body.apsem-standalone-body .apsem-weeklist{min-width:0!important}
body.apsem-standalone-body .apsem-planitem{min-width:0!important}
body.apsem-standalone-body .apsem-planitem>*{min-width:0!important;overflow-wrap:anywhere}

/* Login sempre indipendente dalla sessione WordPress */
.apsem-login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 10%,#eaf2ff 0,#f4f8ff 45%,#edf3fb 100%)}
.apsem-login-card{width:min(440px,100%);background:#fff;border:1px solid #d9e4f4;border-radius:24px;padding:26px;box-shadow:0 24px 70px rgba(15,42,94,.14)}
.apsem-login-logos{display:flex;align-items:center;justify-content:center;gap:26px;margin-bottom:18px}
.apsem-login-logos img{max-width:130px;max-height:72px;object-fit:contain}
.apsem-login-card h2{text-align:center;margin:4px 0 8px;color:#102a62}.apsem-login-card>p{text-align:center;color:#60759b;margin:0 0 18px}
.apsem-app-login-form{display:grid;gap:14px}.apsem-app-login-form label{display:grid;gap:6px;font-weight:800;color:#243d6b}.apsem-app-login-form input{width:100%;border:1px solid #cbd8eb;border-radius:12px;padding:13px 14px;font:inherit;outline:none}.apsem-app-login-form input:focus{border-color:#2b67d6;box-shadow:0 0 0 3px rgba(43,103,214,.12)}.apsem-app-login-form button{border:0;border-radius:12px;padding:14px 16px;font-weight:900;font-size:16px;cursor:pointer}.apsem-login-error{background:#fff0f0;color:#a51111;border:1px solid #ffcaca;border-radius:12px;padding:10px 12px;margin-bottom:14px}.apsem-back-home{display:block;text-align:center;margin-top:16px;color:#123b97;text-decoration:none;font-weight:800}

@media(max-width:1280px){
 body.apsem-standalone-body .apsem-shell{grid-template-columns:minmax(250px,290px) minmax(0,1fr)!important}
 body.apsem-standalone-body .apsem-right{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
 body.apsem-standalone-body .apsem-apmedia{position:static!important;top:auto!important}
}
@media(max-width:900px){
 body.apsem-standalone-body .apsem-header{height:auto!important;min-height:72px!important;padding:10px 12px!important;gap:10px!important;flex-wrap:wrap!important}
 body.apsem-standalone-body .apsem-header-actions{margin-left:auto!important;flex-wrap:wrap!important;justify-content:flex-end!important}
 body.apsem-standalone-body .apsem-shell,body.apsem-standalone-body .apsem-operator-home{display:block!important;padding:10px!important}
 body.apsem-standalone-body .apsem-left,body.apsem-standalone-body .apsem-center,body.apsem-standalone-body .apsem-right{width:100%!important;margin:0 0 12px!important}
 body.apsem-standalone-body .apsem-right{display:block!important}
 body.apsem-standalone-body .apsem-admin-home .apsem-left .apsem-navcards,body.apsem-standalone-body .apsem-operator-main .apsem-navcards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.apsem-standalone-body .apsem-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
 body.apsem-standalone-body .apsem-brand div{display:none!important}
 body.apsem-standalone-body .apsem-header-actions{width:auto!important;gap:7px!important}
 body.apsem-standalone-body .apsem-userbox{max-width:150px!important}
 body.apsem-standalone-body .apsem-admin-home .apsem-left .apsem-navcards,body.apsem-standalone-body .apsem-operator-main .apsem-navcards{grid-template-columns:1fr!important}
 body.apsem-standalone-body .apsem-navcard{min-height:70px!important;padding:10px!important}
 body.apsem-standalone-body .apsem-nav-icon{width:46px!important;height:46px!important;flex:0 0 46px!important}
 body.apsem-standalone-body .apsem-planner{padding:12px!important;border-radius:16px!important}
 body.apsem-standalone-body .apsem-planner-head{display:block!important}
 body.apsem-standalone-body .apsem-week-switch{margin-top:10px!important;display:grid!important;grid-template-columns:1fr 1fr!important}
 body.apsem-standalone-body .apsem-week-switch>*{width:100%!important}
 body.apsem-standalone-body .apsem-summary{grid-template-columns:1fr 1fr!important}
 body.apsem-standalone-body .apsem-dayrow{grid-template-columns:58px minmax(0,1fr)!important}
 body.apsem-standalone-body .apsem-planitem{grid-template-columns:48px minmax(0,1fr)!important;gap:5px!important;align-items:start!important}
 body.apsem-standalone-body .apsem-planitem .apsem-type{grid-column:2!important;width:max-content!important;max-width:100%!important}
 body.apsem-standalone-body .apsem-planitem .apsem-navlink{grid-column:2!important;width:max-content!important;max-width:100%!important}
 body.apsem-standalone-body .apsem-grid2{grid-template-columns:1fr!important}
 body.apsem-standalone-body .apsem-span2{grid-column:auto!important}
 body.apsem-standalone-body .apsem-modal{padding:8px!important}
 body.apsem-standalone-body .apsem-modal-panel{border-radius:16px!important;padding:14px!important;max-height:97vh!important}
 body.apsem-standalone-body .apsem-steps{grid-template-columns:1fr 1fr!important}
 body.apsem-standalone-body .apsem-media-preview{grid-template-columns:repeat(2,1fr)!important}
 .apsem-login-shell{padding:12px}.apsem-login-card{padding:18px;border-radius:18px}.apsem-login-logos{gap:16px}.apsem-login-logos img{max-width:105px;max-height:60px}
}
\n\n/* 1.0.9: player AP reale e richiamo cromatico al sito principale */\n:root{--ap-site-panel:#171717;--ap-site-panel-border:#2b2b2b;--ap-site-panel-muted:#b7bcc5}\nbody.apsem-standalone-body .apsem-apmedia{background:var(--ap-site-panel)!important;border-color:var(--ap-site-panel-border)!important;color:#fff!important;box-shadow:0 14px 34px rgba(0,0,0,.18)!important}\nbody.apsem-standalone-body .apsem-aplogo{background:var(--ap-site-panel)!important;border-radius:14px 14px 0 0!important;padding:10px 12px 6px!important}\nbody.apsem-standalone-body .apsem-aplogo img{filter:none!important}\nbody.apsem-standalone-body .apsem-player{background:#0f0f0f!important;border:1px solid #303030!important}\nbody.apsem-standalone-body .apsem-player-title{background:var(--ap-site-panel)!important;color:#fff!important;border-bottom:1px solid #2d2d2d!important}\nbody.apsem-standalone-body .apsem-player-embed{width:100%!important;min-width:0!important;overflow:hidden!important;background:var(--ap-site-panel)!important}\nbody.apsem-standalone-body .apsem-player-embed>*{max-width:100%!important}\nbody.apsem-standalone-body .apsem-player-embed iframe,body.apsem-standalone-body .apsem-player-embed video{display:block!important;width:100%!important;max-width:100%!important;height:auto;aspect-ratio:16/9!important;border:0!important}\nbody.apsem-standalone-body .apsem-ticker{background:#222!important;border:1px solid #343434!important;color:#fff!important}\nbody.apsem-standalone-body .apsem-ticker-track{color:var(--ap-site-panel-muted)!important}\n@media(max-width:1280px){body.apsem-standalone-body .apsem-apmedia{width:100%!important;max-width:none!important}}\n

/* 1.0.10: colonna AP sul grigio del sito + player ridotto al solo video/controlli */
:root{--ap-site-grey:#1d1d1d;--ap-site-grey-2:#181818;--ap-site-border:#343434}
body.apsem-standalone-body .apsem-apmedia{
  background:var(--ap-site-grey)!important;
  border-color:var(--ap-site-border)!important;
  color:#fff!important;
  padding:14px!important;
}
body.apsem-standalone-body .apsem-aplogo{
  display:block!important;
  background:var(--ap-site-grey)!important;
  padding:8px 10px 12px!important;
  border-radius:14px!important;
}
body.apsem-standalone-body .apsem-aplogo img{
  display:block!important;
  width:min(230px,82%)!important;
  height:auto!important;
  max-height:92px!important;
  margin:0 auto!important;
  object-fit:contain!important;
}
body.apsem-standalone-body .apsem-player-video-only{
  margin-top:8px!important;
  background:transparent!important;
  border:0!important;
  border-radius:12px!important;
  overflow:hidden!important;
}
body.apsem-standalone-body .apsem-player-video-only .apsem-player-embed{
  background:transparent!important;
  overflow:hidden!important;
}
/* Lo shortcode sidebar resta operativo, ma nel gestionale mostriamo soltanto il quadro video e i tre comandi principali. */
body.apsem-standalone-body .apsem-player-video-only .aptv-root{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border:0!important;
  border-radius:0!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-card{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border:0!important;
  border-radius:10px!important;
  overflow:hidden!important;
  box-shadow:none!important;
  background:#08090b!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-header,
body.apsem-standalone-body .apsem-player-video-only .aptv-meta,
body.apsem-standalone-body .apsem-player-video-only .aptv-view-controls,
body.apsem-standalone-body .apsem-player-video-only .aptv-clean-brand,
body.apsem-standalone-body .apsem-player-video-only .aptv-upcoming,
body.apsem-standalone-body .apsem-player-video-only .aptv-actions{
  display:none!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-body{
  display:block!important;
  padding:0!important;
  margin:0!important;
  background:#08090b!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-video-column{
  width:100%!important;
  min-width:0!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-screen{
  width:100%!important;
  aspect-ratio:16/9!important;
  min-height:0!important;
  border-radius:0!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-controls{
  display:grid!important;
  grid-template-columns:1fr 1.18fr 1fr!important;
  gap:7px!important;
  padding:7px 8px 8px!important;
  background:#0d0e11!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-prev,
body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-play,
body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-next{
  display:flex!important;
  width:100%!important;
  height:34px!important;
  min-width:0!important;
  margin:0!important;
}
body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-play{
  border-radius:7px!important;
}
body.apsem-standalone-body .apsem-ticker{
  background:#202020!important;
  border-color:#383838!important;
  color:#fff!important;
}
@media(max-width:1180px){
  body.apsem-standalone-body .apsem-apmedia{position:static!important;top:auto!important}
}
@media(max-width:640px){
  body.apsem-standalone-body .apsem-apmedia{padding:10px!important;border-radius:16px!important}
  body.apsem-standalone-body .apsem-aplogo img{width:min(190px,78%)!important;max-height:78px!important}
  body.apsem-standalone-body .apsem-player-video-only .aptv-controls{gap:5px!important;padding:6px!important}
  body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-prev,
  body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-play,
  body.apsem-standalone-body .apsem-player-video-only .aptv-controls>.aptv-next{height:38px!important}
}
\n\n/* 1.0.11: LIVE AP realmente operativo, in alto a destra e ridotto al solo quadro video */
:root{--ap-live-bg:#111214;--ap-live-bg-2:#171719;--ap-live-line:#5a2a1a;--ap-live-accent:#ef3b22;--ap-site-grey:#171717}
body.apsem-standalone-body .apsem-right{display:flex!important;flex-direction:column!important;gap:14px!important}
body.apsem-standalone-body .apsem-right>.apsem-apmedia{order:0!important}
body.apsem-standalone-body .apsem-right>.apsem-widget{order:1!important;margin-bottom:0!important}
body.apsem-standalone-body .apsem-apmedia{
  position:sticky!important;top:100px!important;
  background:var(--ap-live-bg)!important;
  border:1px solid var(--ap-live-line)!important;
  border-radius:18px!important;
  padding:10px!important;
  overflow:hidden!important;
  box-shadow:0 12px 28px rgba(0,0,0,.18)!important;
}
body.apsem-standalone-body .apsem-aplogo{
  background:var(--ap-live-bg)!important;
  padding:2px 8px 8px!important;
  border-radius:12px 12px 0 0!important;
}
body.apsem-standalone-body .apsem-aplogo img{
  width:min(165px,62%)!important;
  max-height:58px!important;
  margin:0 auto!important;
}
body.apsem-standalone-body .apsem-player-video-only{margin:0!important;background:#050607!important;border:1px solid #6d2b17!important;border-radius:12px!important;overflow:hidden!important}
body.apsem-standalone-body .apsem-player-video-only .apsem-player-embed{background:#050607!important;line-height:0!important}
body.apsem-standalone-body .apsem-player-video-only .aptv-root,
body.apsem-standalone-body .apsem-player-video-only .aptv-card,
body.apsem-standalone-body .apsem-player-video-only .aptv-body,
body.apsem-standalone-body .apsem-player-video-only .aptv-video-column{margin:0!important;padding:0!important;width:100%!important;max-width:none!important;background:#050607!important;border:0!important;border-radius:0!important;box-shadow:none!important}
body.apsem-standalone-body .apsem-player-video-only .aptv-header,
body.apsem-standalone-body .apsem-player-video-only .aptv-meta,
body.apsem-standalone-body .apsem-player-video-only .aptv-controls,
body.apsem-standalone-body .apsem-player-video-only .aptv-view-controls,
body.apsem-standalone-body .apsem-player-video-only .aptv-video-preferences,
body.apsem-standalone-body .apsem-player-video-only .aptv-contact-ticker,
body.apsem-standalone-body .apsem-player-video-only .aptv-clean-brand{display:none!important}
body.apsem-standalone-body .apsem-player-video-only .aptv-screen{display:block!important;width:100%!important;aspect-ratio:16/9!important;height:auto!important;min-height:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:#050607!important}
body.apsem-standalone-body .apsem-player-video-only .aptv-screen iframe,
body.apsem-standalone-body .apsem-player-video-only .aptv-screen video{width:100%!important;height:100%!important;aspect-ratio:16/9!important;object-fit:cover!important}
body.apsem-standalone-body .apsem-ticker{margin-top:8px!important;background:var(--ap-live-bg-2)!important;border:1px solid #494949!important;border-radius:10px!important;padding:8px 9px!important;color:#fff!important}
body.apsem-standalone-body .apsem-ticker b{color:#ff4b3a!important}
body.apsem-standalone-body .apsem-ticker-track{color:#f0f0f0!important}
@media(max-width:1280px){
 body.apsem-standalone-body .apsem-right{display:grid!important;grid-template-columns:1fr 1fr!important;align-items:start!important}
 body.apsem-standalone-body .apsem-right>.apsem-apmedia{grid-column:1/-1!important;position:static!important}
}
@media(max-width:900px){body.apsem-standalone-body .apsem-right{display:block!important}body.apsem-standalone-body .apsem-apmedia{position:static!important;margin-bottom:14px!important}}

/* 1.0.12: player AP leggero, asincrono e palette identica al fondo scuro del sito */
:root{--ap-site-exact-grey:#121212;--ap-site-exact-grey-2:#171717;--ap-site-exact-border:#3b3b3b;--ap-live-red:#ff3b30}
body.apsem-standalone-body .apsem-apmedia{
  background:var(--ap-site-exact-grey)!important;
  border:1px solid var(--ap-site-exact-border)!important;
  color:#fff!important;
  padding:10px!important;
  border-radius:18px!important;
}
body.apsem-standalone-body .apsem-aplogo{
  display:block!important;
  background:var(--ap-site-exact-grey)!important;
  padding:2px 8px 8px!important;
  border-radius:12px!important;
  text-decoration:none!important;
}
body.apsem-standalone-body .apsem-aplogo img{
  display:block!important;width:min(154px,58%)!important;height:auto!important;max-height:54px!important;margin:0 auto!important;object-fit:contain!important;
}
.apsem-livebox{background:var(--ap-site-exact-grey)!important;border:1px solid #542519;border-radius:11px;overflow:hidden}
.apsem-live-stage{position:relative;width:100%;aspect-ratio:16/9;background:#050505;overflow:hidden}
.apsem-live-youtube,.apsem-live-youtube iframe,.apsem-live-direct{position:absolute;inset:0;width:100%!important;height:100%!important;border:0!important;display:block;object-fit:cover;background:#050505}
.apsem-live-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:9px;background:#090909;color:#ddd;font-size:11px;letter-spacing:.06em;z-index:3}
.apsem-live-loading span{width:15px;height:15px;border:2px solid rgba(255,255,255,.18);border-top-color:var(--ap-live-red);border-radius:50%;animation:apsemLiveSpin .8s linear infinite}
.apsem-live-loading.is-hidden{display:none}
@keyframes apsemLiveSpin{to{transform:rotate(360deg)}}
.apsem-live-audio{position:absolute;right:7px;bottom:7px;z-index:6;display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.25);background:rgba(10,10,10,.82);color:#fff;border-radius:8px;padding:6px 8px;font:700 10px/1 system-ui;cursor:pointer;backdrop-filter:blur(6px)}
.apsem-live-audio:hover{background:rgba(28,28,28,.94)}
.apsem-live-audio[aria-pressed="true"]{border-color:#5fbc7a;background:rgba(11,71,31,.88)}
.apsem-live-meta{display:flex;align-items:center;gap:7px;padding:7px 9px;background:var(--ap-site-exact-grey);color:#f4f4f4;font-size:10px;min-height:28px;overflow:hidden}
.apsem-live-meta strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apsem-live-dot{width:7px;height:7px;border-radius:50%;background:var(--ap-live-red);box-shadow:0 0 8px rgba(255,59,48,.45);flex:0 0 auto}
body.apsem-standalone-body .apsem-ticker.apsem-next-program{margin-top:7px!important;background:var(--ap-site-exact-grey)!important;border:1px solid #555!important;border-radius:9px!important;padding:7px 9px!important;color:#fff!important}
body.apsem-standalone-body .apsem-next-program b{display:block;color:#ff4638!important;font-size:10px!important;margin-bottom:3px!important}
body.apsem-standalone-body .apsem-next-program .apsem-ticker-track{margin-top:0!important;color:#f1f1f1!important;font-size:11px!important}
body.apsem-standalone-body .apsem-next-program .apsem-ticker-track span{animation:none!important;display:block!important;white-space:normal!important;line-height:1.25!important}
@media(max-width:900px){.apsem-live-audio{padding:7px 9px;font-size:10px}}

/* 1.0.14: player ufficiale AP TV dentro AUTOS, video + SINCRONIZZA + AUDIO */
.apsem-livebox-engine{background:#121212!important;border:1px solid #542519!important;border-radius:11px!important;overflow:hidden!important}
.apsem-live-engine-wrap{position:relative;width:100%;background:#121212;overflow:hidden}
.apsem-live-engine{display:block;width:100%;height:auto;aspect-ratio:16/10.65;border:0;background:#121212}
.apsem-livebox-engine .apsem-live-loading{position:absolute;inset:0;z-index:5;background:#121212}
@media(max-width:900px){.apsem-live-engine{aspect-ratio:16/10.9}}

/* 1.0.15 · Telecomando TV AUTOS + video AP ufficiale */
body.apsem-standalone-body .apsem-livebox-engine{background:#121212!important;border:1px solid #4a2a20!important;border-radius:12px!important;overflow:hidden!important;padding:0!important}
body.apsem-standalone-body .apsem-live-engine-wrap{position:relative;width:100%;background:#121212!important;overflow:hidden!important}
body.apsem-standalone-body .apsem-live-engine{display:block!important;width:100%!important;height:auto!important;aspect-ratio:16/9!important;border:0!important;background:#050505!important}
body.apsem-standalone-body .apsem-live-loading{position:absolute!important;inset:0!important;display:grid!important;place-content:center!important;gap:10px!important;text-align:center!important;background:#121212!important;color:#fff!important;z-index:5!important;font-size:11px!important;letter-spacing:.02em!important}
body.apsem-standalone-body .apsem-live-loading.is-hidden{display:none!important}
body.apsem-standalone-body .apsem-live-loading span{width:20px;height:20px;border:3px solid #3a3a3a;border-top-color:#f04432;border-radius:50%;margin:auto;animation:apsemTvSpin .8s linear infinite}
@keyframes apsemTvSpin{to{transform:rotate(360deg)}}
body.apsem-standalone-body .apsem-tv-remote-open{width:100%;min-height:38px;border:0;border-top:1px solid #383838;background:#171717;color:#fff;font-weight:900;letter-spacing:.045em;cursor:pointer}
body.apsem-standalone-body .apsem-tv-remote-open:hover{background:#202020}
.apsem-tv-remote-modal{position:fixed;inset:0;z-index:100120;display:none;place-items:center;padding:20px;background:rgba(0,0,0,.72);backdrop-filter:blur(7px)}
.apsem-tv-remote-modal.open{display:grid}
.apsem-tv-remote-panel{position:relative;width:min(460px,96vw);max-height:92vh;overflow:auto;background:linear-gradient(180deg,#171717,#101010);border:1px solid #3d3d3d;border-radius:26px;padding:22px;box-shadow:0 30px 90px rgba(0,0,0,.55);color:#fff}
.apsem-tv-remote-close{position:absolute;right:12px;top:12px;width:40px;height:40px;border-radius:50%;border:1px solid #414141;background:#202020;color:#fff;font-size:24px;cursor:pointer}
.apsem-tv-remote-brand{display:flex;align-items:center;gap:12px;padding-right:48px;margin-bottom:14px}
.apsem-tv-remote-brand img{width:82px;height:56px;object-fit:contain}
.apsem-tv-remote-brand div{display:grid;gap:2px}.apsem-tv-remote-brand small{font-size:9px;color:#a8a8a8;font-weight:800;letter-spacing:.16em}.apsem-tv-remote-brand strong{font-size:20px;letter-spacing:.02em}
.apsem-tv-remote-status{border:1px solid #363636;background:#111;border-radius:12px;padding:9px 11px;margin-bottom:12px;font-size:11px;color:#bfc7d3}.apsem-tv-remote-status.is-bad{border-color:#8a2b22;color:#ffb3aa}
.apsem-tv-remote-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.apsem-tv-remote-grid button{min-height:92px;border:1px solid #3a3a3a;border-radius:16px;background:#1c1c1c;color:#fff;padding:12px;display:grid;place-items:center;text-align:center;gap:3px;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.apsem-tv-remote-grid button:hover{background:#242424;border-color:#535353}.apsem-tv-remote-grid button.is-primary{background:linear-gradient(180deg,#153f78,#0b2447);border-color:#2a68ad}.apsem-tv-remote-grid button span{font-size:24px;line-height:1}.apsem-tv-remote-grid button b{font-size:12px;letter-spacing:.03em}.apsem-tv-remote-grid button small{font-size:9px;color:#aeb7c4}
.apsem-tv-schedule-panel{display:none;margin-top:12px;border:1px solid #373737;border-radius:14px;overflow:hidden;background:#111}.apsem-tv-schedule-panel.open{display:block}.apsem-tv-schedule-loading{padding:14px;color:#b9c1ce;font-size:11px}.apsem-tv-schedule-row{display:grid;grid-template-columns:54px 1fr;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #292929}.apsem-tv-schedule-row:last-child{border-bottom:0}.apsem-tv-schedule-row time{font-size:10px;color:#98a4b4;font-weight:900}.apsem-tv-schedule-row strong{font-size:11px;line-height:1.25}.apsem-tv-schedule-row.is-now{background:#1c1513}.apsem-tv-schedule-row.is-now time{color:#ff5a47}
@media(max-width:640px){.apsem-tv-remote-panel{padding:18px;border-radius:20px}.apsem-tv-remote-grid{grid-template-columns:1fr}.apsem-tv-remote-grid button{min-height:76px;grid-template-columns:34px 1fr;grid-template-rows:auto auto;text-align:left;justify-items:start}.apsem-tv-remote-grid button span{grid-row:1/3}.apsem-tv-remote-brand img{width:70px}}


/* 1.0.16 · Estrai video, fullscreen e condivisione LIVE nel telecomando AUTOS */
.apsem-tv-remote-grid button.is-share{grid-column:1/-1;background:linear-gradient(180deg,#7b1717,#4e0e0e);border-color:#a83a32}
.apsem-tv-remote-grid button.is-share:hover{background:linear-gradient(180deg,#8d1d1d,#5b1212);border-color:#c44c43}
.apsem-live-engine-wrap:fullscreen,.apsem-live-engine-wrap:-webkit-full-screen{width:100vw!important;height:100vh!important;background:#000!important;display:grid!important;place-items:center!important}
.apsem-live-engine-wrap:fullscreen .apsem-live-engine,.apsem-live-engine-wrap:-webkit-full-screen .apsem-live-engine{width:100vw!important;height:100vh!important;aspect-ratio:auto!important;object-fit:contain!important;background:#000!important}
.apsem-live-engine-wrap:fullscreen .apsem-live-loading,.apsem-live-engine-wrap:-webkit-full-screen .apsem-live-loading{background:#000!important}
@media(max-width:640px){.apsem-tv-remote-grid button.is-share{grid-column:auto}}


/* 1.0.17 · AUTOS: nel riquadro TV resta solo il video 16:9; COMANDI TV sotto */
body.apsem-standalone-body .apsem-live-engine-wrap{aspect-ratio:16/9!important;height:auto!important;background:#050505!important}
body.apsem-standalone-body .apsem-live-engine{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;aspect-ratio:auto!important}
body.apsem-standalone-body .apsem-tv-remote-open{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important}

/* 1.0.19 · Solo video dal master /ap-tv/live/, fullscreen sullo stesso player, barra comandi su hover */
body.apsem-standalone-body .apsem-live-engine-wrap{position:relative!important;aspect-ratio:16/9!important;height:auto!important;background:#000!important;overflow:hidden!important}
body.apsem-standalone-body .apsem-live-engine{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important;background:#000!important}
.apsem-fs-controls{display:none;position:absolute;left:50%;bottom:18px;transform:translate(-50%,12px);z-index:40;gap:8px;padding:8px;border:1px solid rgba(255,255,255,.2);border-radius:14px;background:rgba(10,10,10,.78);backdrop-filter:blur(10px);opacity:0;transition:opacity .18s ease,transform .18s ease;pointer-events:none}
.apsem-fs-controls button{border:1px solid rgba(255,255,255,.2);background:#171717;color:#fff;border-radius:10px;padding:9px 12px;font:800 11px/1 system-ui;cursor:pointer}
.apsem-live-engine-wrap:fullscreen,.apsem-live-engine-wrap:-webkit-full-screen{width:100vw!important;height:100vh!important;aspect-ratio:auto!important;background:#000!important;display:block!important}
.apsem-live-engine-wrap:fullscreen .apsem-live-engine,.apsem-live-engine-wrap:-webkit-full-screen .apsem-live-engine{position:absolute!important;inset:0!important;width:100vw!important;height:100vh!important}
.apsem-live-engine-wrap:fullscreen .apsem-fs-controls,.apsem-live-engine-wrap:-webkit-full-screen .apsem-fs-controls{display:flex}
.apsem-live-engine-wrap:fullscreen:hover .apsem-fs-controls,.apsem-live-engine-wrap:-webkit-full-screen:hover .apsem-fs-controls{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.apsem-live-engine-wrap.is-extracted:after{content:"VIDEO ESTRATTO SU UN'ALTRA FINESTRA";position:absolute;inset:0;display:grid;place-items:center;background:#090909;color:#d8d8d8;font:900 11px/1.3 system-ui;letter-spacing:.08em;text-align:center;padding:20px;z-index:7}
@media(max-width:640px){.apsem-fs-controls{bottom:12px}.apsem-fs-controls button{padding:8px 9px;font-size:10px}}

/* 1.0.22 · LIVE a sinistra, video completamente libero, menu compatto */
body.apsem-standalone-body .apsem-admin-home>.apsem-left{display:flex!important;flex-direction:column!important;gap:12px!important}
body.apsem-standalone-body .apsem-admin-home>.apsem-left>.apsem-welcome{order:0!important;padding:2px 8px 0!important}
body.apsem-standalone-body .apsem-admin-home>.apsem-left>.apsem-apmedia{order:1!important;position:static!important;top:auto!important;width:100%!important;margin:0!important}
body.apsem-standalone-body .apsem-admin-home>.apsem-left>.apsem-navcards{order:2!important}
body.apsem-standalone-body .apsem-admin-home>.apsem-right{display:block!important}
body.apsem-standalone-body .apsem-admin-home>.apsem-right>.apsem-widget{margin-bottom:14px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-navcard{min-height:66px!important;padding:8px 10px!important;border-radius:15px!important;gap:10px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-icon{width:44px!important;height:44px!important;border-radius:12px!important;font-size:21px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-copy strong{font-size:15px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-copy small{font-size:10px!important;margin-top:1px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-arrow{font-size:18px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-apmedia{padding:10px!important;border-radius:18px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-aplogo img{height:66px!important}
body.apsem-standalone-body .apsem-live-engine-wrap{aspect-ratio:16/9!important;background:#000!important;overflow:hidden!important}
body.apsem-standalone-body .apsem-live-engine{display:block!important;width:100%!important;height:100%!important;border:0!important;background:#000!important}
body.apsem-standalone-body .apsem-tv-remote-open{min-height:34px!important;padding:6px 10px!important;font-size:12px!important}
body.apsem-standalone-body .apsem-next-program{padding:8px 9px!important;margin-top:8px!important}
@media(max-width:1320px){
  body.apsem-standalone-body .apsem-admin-home>.apsem-left>.apsem-apmedia{max-width:360px!important}
}
@media(max-width:800px){
  body.apsem-standalone-body .apsem-admin-home>.apsem-left>.apsem-apmedia{max-width:none!important}
}


/* 1.0.23 · branding AP, layout compatto, operatori/chat */
body.apsem-standalone-body .apsem-brand-stack{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important}
body.apsem-standalone-body .apsem-brand-ap{display:block!important;line-height:0!important}
body.apsem-standalone-body .apsem-brand-ap img{width:128px!important;height:auto!important;max-height:46px!important;object-fit:contain!important}
body.apsem-standalone-body .apsem-brand-autos{display:flex!important;align-items:center!important;gap:6px!important}
body.apsem-standalone-body .apsem-brand-autos>img{width:28px!important;height:28px!important;object-fit:contain!important}
body.apsem-standalone-body .apsem-brand-autos strong{font-size:10px!important;line-height:1.1!important}
body.apsem-standalone-body .apsem-brand-autos span{font-size:7px!important;line-height:1.1!important}
body.apsem-standalone-body .apsem-admin-home .apsem-welcome{padding:0 6px!important;margin:0!important}
body.apsem-standalone-body .apsem-admin-home .apsem-welcome small{font-size:8px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-welcome h1{font-size:22px!important;line-height:1!important;margin:2px 0!important}
body.apsem-standalone-body .apsem-admin-home .apsem-welcome p{font-size:9px!important;margin:2px 0 0!important}
body.apsem-standalone-body .apsem-admin-home .apsem-navcard{min-height:50px!important;padding:6px 8px!important;border-radius:12px!important;gap:8px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-icon{width:33px!important;height:33px!important;border-radius:10px!important;font-size:16px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-copy strong{font-size:11.5px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-nav-copy small{font-size:8px!important}
body.apsem-standalone-body .apsem-admin-home .apsem-arrow{font-size:14px!important}
.apsem-operators-widget{padding:12px!important}.apsem-operators-sub{display:block;color:#7a8aa5;font-size:9px;margin-top:1px}.apsem-online-count{font-size:9px;font-weight:800;color:#138a4b;background:#e9f8ef;border-radius:999px;padding:4px 7px}.apsem-operator-list{display:grid;gap:6px;margin-top:8px}.apsem-operator-row{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:7px;padding:6px;border:1px solid #e7edf6;border-radius:10px;background:#fff}.apsem-operator-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eaf1ff;color:#164d9e;font-weight:900;position:relative}.apsem-presence-dot{position:absolute;right:-1px;bottom:0;width:9px;height:9px;border-radius:50%;background:#a5adba;border:2px solid #fff}.apsem-operator-row.is-online .apsem-presence-dot{background:#20bf63}.apsem-operator-copy strong{display:block;font-size:10px;color:#17335f}.apsem-operator-copy small{display:block;font-size:8px;color:#7b8aa3;margin-top:1px}.apsem-operator-chat{border:0;background:#1d63d5;color:#fff;border-radius:8px;padding:5px 7px;font-size:8px;font-weight:900;cursor:pointer}.apsem-operator-chat:disabled{background:#e8edf5;color:#7e8ca2}.apsem-operator-loading{font-size:9px;color:#7889a5;padding:8px;text-align:center}
.apsem-chat-panel{position:fixed;right:18px;bottom:18px;width:min(350px,calc(100vw - 24px));height:min(520px,calc(100vh - 36px));z-index:100050;background:#fff;border:1px solid #cfd9e9;border-radius:16px;box-shadow:0 22px 70px rgba(12,31,62,.28);display:none;grid-template-rows:auto auto 1fr auto;overflow:hidden}.apsem-chat-panel.open{display:grid}.apsem-chat-head{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;background:#123b97;color:#fff}.apsem-chat-head small{display:block;font-size:8px;letter-spacing:.12em;opacity:.78}.apsem-chat-head strong{display:block;font-size:14px;margin-top:2px}.apsem-chat-head button{width:30px;height:30px;border-radius:50%;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.08);color:#fff;font-size:20px;cursor:pointer}.apsem-chat-status{padding:6px 12px;font-size:9px;color:#7183a3;border-bottom:1px solid #edf2f8;background:#f8fbff}.apsem-chat-status.is-online{color:#0c7a42;font-weight:800}.apsem-chat-messages{overflow:auto;padding:10px;background:#eef3f9;display:flex;flex-direction:column;gap:7px}.apsem-chat-empty{text-align:center;color:#7c8aa4;font-size:10px;margin:auto}.apsem-msg{align-self:flex-start;max-width:84%;background:#fff;border-radius:12px 12px 12px 4px;padding:7px 9px;font-size:10px;box-shadow:0 1px 2px rgba(0,0,0,.06)}.apsem-msg.mine{align-self:flex-end;background:#d8f7cf;border-radius:12px 12px 4px 12px}.apsem-msg time{display:block;text-align:right;color:#7d8796;font-size:7px;margin-top:3px}.apsem-chat-compose{display:grid;grid-template-columns:1fr auto;gap:7px;padding:8px;background:#fff;border-top:1px solid #e4ebf5}.apsem-chat-compose textarea{resize:none;border:1px solid #cad8ec;border-radius:10px;padding:8px;font:inherit;font-size:10px;min-height:40px;max-height:100px}.apsem-chat-compose button{border:0;background:#1e64d9;color:#fff;border-radius:10px;padding:0 13px;font-weight:800;font-size:10px;cursor:pointer}
@media(max-width:800px){body.apsem-standalone-body .apsem-brand-ap img{width:105px!important}.apsem-chat-panel{right:6px;bottom:6px;width:calc(100vw - 12px);height:calc(100vh - 12px)}}


/* 1.0.24 · header AP + AUTOS in linea, separatore elegante */
body.apsem-standalone-body .apsem-brand-stack{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:12px!important;
}
body.apsem-standalone-body .apsem-brand-ap{
  display:flex!important;
  align-items:center!important;
  padding-right:12px!important;
  margin-right:0!important;
  border-right:1px solid #c8cdd6!important;
  line-height:0!important;
}
body.apsem-standalone-body .apsem-brand-ap img{
  width:108px!important;
  height:42px!important;
  max-height:42px!important;
  object-fit:contain!important;
}
body.apsem-standalone-body .apsem-brand-autos{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
}
body.apsem-standalone-body .apsem-brand-autos>img{
  width:29px!important;
  height:29px!important;
  object-fit:contain!important;
}
body.apsem-standalone-body .apsem-brand-autos strong{
  font-size:11px!important;
  line-height:1.05!important;
}
body.apsem-standalone-body .apsem-brand-autos span{
  font-size:7.5px!important;
  line-height:1.1!important;
}
@media(max-width:720px){
  body.apsem-standalone-body .apsem-brand-stack{gap:8px!important}
  body.apsem-standalone-body .apsem-brand-ap{padding-right:8px!important}
  body.apsem-standalone-body .apsem-brand-ap img{width:82px!important;height:34px!important;max-height:34px!important}
  body.apsem-standalone-body .apsem-brand-autos strong{font-size:9px!important}
  body.apsem-standalone-body .apsem-brand-autos span{font-size:6.7px!important}
}

/* 1.0.25 · Operatori, ruoli e permessi */
.apsem-operators-head{align-items:flex-start!important;gap:8px}.apsem-operators-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}.apsem-operators-manage{border:1px solid #bcd0ef;background:#f4f8ff;color:#174d9a;border-radius:999px;padding:4px 7px;font-size:7px;font-weight:900;letter-spacing:.03em;cursor:pointer}.apsem-operators-manage:hover{background:#eaf2ff}
.apsem-operator-manager-panel{width:min(1120px,calc(100vw - 28px));max-height:min(860px,calc(100vh - 28px));display:flex;flex-direction:column;overflow:hidden}.apsem-operator-manager-head{padding-right:44px}.apsem-operator-manager-head small{font-size:9px;letter-spacing:.14em;color:#6881a8}.apsem-operator-manager-head h2{margin:3px 0 4px;color:#0c326f;font-size:25px}.apsem-operator-manager-head p{margin:0;color:#6c7f9f;font-size:11px}.apsem-operator-manager-toolbar{display:flex;align-items:center;gap:10px;margin:13px 0 10px}.apsem-operator-manager-toolbar input{flex:1;min-width:160px;border:1px solid #cbd8ea;border-radius:11px;padding:9px 11px;font-size:11px;background:#fff}.apsem-operator-manager-toolbar span{font-size:9px;color:#6980a1;white-space:nowrap}.apsem-operator-manager-toolbar span.is-bad{color:#b42318;font-weight:800}.apsem-operator-admin-list{overflow:auto;display:grid;gap:10px;padding:2px 3px 8px}.apsem-operator-admin-loading{padding:22px;text-align:center;color:#70829f;font-size:11px}.apsem-operator-admin-loading.is-error{color:#b42318}.apsem-operator-admin-card{border:1px solid #dce5f1;border-radius:14px;background:#fafdff;padding:11px;box-shadow:0 2px 8px rgba(19,51,95,.04)}.apsem-operator-admin-id{display:flex;align-items:center;gap:9px}.apsem-operator-admin-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#dfeaff;color:#123f8c;font-weight:900;font-size:14px}.apsem-operator-admin-id strong{font-size:12px;color:#153866}.apsem-operator-admin-id small{display:block;font-size:8px;color:#7b8ba5;margin-top:2px}.apsem-admin-lock{display:inline-block;margin-left:6px;padding:2px 5px;border-radius:99px;background:#fff2d9;color:#8a5700;font-size:6px;vertical-align:middle}.apsem-operator-presets{display:flex;gap:5px;margin:9px 0}.apsem-operator-presets button{border:1px solid #cfdaea;background:#fff;color:#244a82;border-radius:8px;padding:5px 7px;font-size:7px;font-weight:900;cursor:pointer}.apsem-operator-presets button[data-preset="clear"]{color:#9c2f2f;border-color:#eccccc}.apsem-permissions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.apsem-perm-toggle{display:flex;align-items:center;gap:6px;padding:6px 7px;border:1px solid #e2e9f3;border-radius:9px;background:#fff;cursor:pointer;min-width:0}.apsem-perm-toggle input{position:absolute;opacity:0;pointer-events:none}.apsem-perm-toggle span{width:24px;height:14px;border-radius:99px;background:#cbd5e3;position:relative;flex:0 0 auto;transition:.15s}.apsem-perm-toggle span:after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#fff;left:2px;top:2px;box-shadow:0 1px 2px rgba(0,0,0,.18);transition:.15s}.apsem-perm-toggle input:checked+span{background:#1d63d5}.apsem-perm-toggle input:checked+span:after{transform:translateX(10px)}.apsem-perm-toggle b{font-size:8px;color:#385170;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apsem-operator-admin-foot{display:flex;align-items:flex-end;gap:9px;margin-top:9px}.apsem-operator-admin-foot label{flex:1;font-size:8px;color:#667d9f;font-weight:700}.apsem-operator-admin-foot select{display:block;width:100%;margin-top:3px;border:1px solid #cbd8ea;border-radius:9px;padding:7px 8px;background:#fff;font-size:9px;color:#183a69}.apsem-save-operator{border:0;background:#1760ce;color:#fff;border-radius:9px;padding:8px 11px;font-size:8px;font-weight:900;cursor:pointer;min-width:112px}.apsem-save-operator:disabled{opacity:.6;cursor:wait}
@media(max-width:1050px){.apsem-permissions-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.apsem-operator-manager-panel{width:calc(100vw - 12px);max-height:calc(100vh - 12px);padding:14px}.apsem-operator-manager-head h2{font-size:19px}.apsem-operator-manager-toolbar{align-items:stretch;flex-direction:column}.apsem-permissions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.apsem-operator-admin-foot{align-items:stretch;flex-direction:column}.apsem-save-operator{width:100%;min-height:42px}.apsem-perm-toggle{min-height:38px}.apsem-perm-toggle b{white-space:normal;line-height:1.1}}
@media(max-width:420px){.apsem-permissions-grid{grid-template-columns:1fr}.apsem-operator-presets{display:grid;grid-template-columns:1fr 1fr}.apsem-operator-presets button[data-preset="clear"]{grid-column:1/-1}}

/* 1.0.29 status candidatura AUTOS */
.apsem-autos-badge{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:99px;font-size:6px;font-weight:900;letter-spacing:.04em;vertical-align:middle}.apsem-autos-badge.is-requested{background:#eaf2ff;color:#245ca8;border:1px solid #bfd4f4}.apsem-autos-badge.is-enabled{background:#e8f8ee;color:#16733a;border:1px solid #b9e4c8}

/* 1.0.30 · Planning operativo */
.apsem-planitem{position:relative;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.apsem-planitem .apsem-plan-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-left:auto}
.apsem-plan-status,.apsem-plan-priority,.apsem-plan-assignee{font-size:10px;line-height:1;padding:5px 7px;border:1px solid #dbe5f5;border-radius:999px;background:#fff;color:#27416d;white-space:nowrap}
.apsem-planitem.priority-high{box-shadow:inset 3px 0 0 #f59e0b}
.apsem-planitem.priority-urgent{box-shadow:inset 3px 0 0 #dc2626}
.apsem-planitem.status-done{opacity:.68}
.apsem-planitem.status-done strong{text-decoration:line-through}
.apsem-plan-edit{border:1px solid #bfd1ef;background:#f7faff;color:#174a9b;border-radius:9px;padding:5px 8px;font-weight:700;font-size:10px;cursor:pointer}
.apsem-plan-edit:hover{background:#eaf2ff}
@media(max-width:780px){.apsem-planitem .apsem-plan-meta{width:100%;margin-left:0}.apsem-plan-edit{margin-left:auto}.apsem-plan-status,.apsem-plan-priority,.apsem-plan-assignee{font-size:9px}}

/* 1.0.34: la preview TV AUTOS e' uno schermo passivo. Tutti i comandi passano da COMANDI TV. */
.apsem-live-engine{pointer-events:none!important;user-select:none!important;-webkit-user-select:none!important}
.apsem-live-engine-wrap{cursor:default!important}

/* 1.0.37 · fullscreen smartphone landscape centrato sul viewport reale */
.apsem-live-engine-wrap:fullscreen,
.apsem-live-engine-wrap:-webkit-full-screen{
  position:fixed!important;
  inset:0!important;
  width:var(--apsem-fs-width,100%)!important;
  height:var(--apsem-fs-height,100%)!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:0!important;
  padding:0!important;
  background:#000!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  transform:none!important;
  translate:none!important;
}
.apsem-live-engine-wrap:fullscreen .apsem-live-engine,
.apsem-live-engine-wrap:-webkit-full-screen .apsem-live-engine{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  right:auto!important;
  bottom:auto!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:center center!important;
  background:#000!important;
}
@media (orientation:landscape) and (max-height:700px){
  .apsem-live-engine-wrap:fullscreen,
  .apsem-live-engine-wrap:-webkit-full-screen{
    width:var(--apsem-fs-width,100%)!important;
    height:var(--apsem-fs-height,100%)!important;
  }
  .apsem-live-engine-wrap:fullscreen .apsem-live-engine,
  .apsem-live-engine-wrap:-webkit-full-screen .apsem-live-engine{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
  }
}

/* APSEM 1.0.38 — Admin-only AUTOS WhatsApp invitations */
.apsem-invite-widget{display:flex;flex-direction:column;gap:9px}.apsem-invite-widget label{font-weight:700;font-size:13px}.apsem-invite-widget input{width:100%;box-sizing:border-box;padding:11px;border-radius:8px;border:1px solid #bfc8d5;color:#17263a;background:#fff}.apsem-invite-widget .apsem-invite-note{font-size:12px;line-height:1.5;color:#754b0c;background:#fff5df;padding:10px;border-radius:8px}.apsem-invite-actions{display:flex;gap:8px;flex-wrap:wrap}.apsem-invite-actions button{cursor:pointer;padding:10px;border-radius:7px}.apsem-invite-feedback{font-size:12px;min-height:1.2em}
