/* Presentation only: retain routes, permissions, forms and operational status colours. */
@media screen {
 body{background:#e7f2fb;color:#16364f;font-family:"Segoe UI",Arial,sans-serif}
 body.home-fit{background:linear-gradient(105deg,#d9edfac9,#eaf5fcba),url('/scenes/home.png') center/cover no-repeat fixed}
 body.home-fit #header{background:#f1f8fff2;border-top:3px solid #246b9b;box-shadow:0 2px 14px #19456818}
 #header .diego-sign strong{font-family:"Arial Black","Segoe UI",sans-serif;font-style:italic;font-weight:900;color:#092f50;letter-spacing:-1.7px}
 #header .association-name{font-weight:800}
 body.home-fit #account .account-bar{background:#e8f4fdd9}
 body.home-fit #local-note{background:#edf7fdd9}
 body.home-fit #main{max-width:1450px;padding:12px 28px 18px}
 body.home-fit #main .home-intro{background:transparent;box-shadow:none;border:0;padding:2px 6px;min-height:0}
 body.home-fit .home-intro h1{font-size:17px;color:#244d6d}
 body.home-fit .home-tiles{gap:12px}
 body.home-fit .home-tiles .settings-tile{flex-direction:column;justify-content:center;gap:6px;text-align:center;background:linear-gradient(150deg,#f7fbffed,#dceefbea);border:1px solid #fff;border-radius:14px;box-shadow:0 4px 15px #1a507a18;padding:8px}
 body.home-fit .home-tiles .settings-tile strong{font-size:clamp(14px,1.2vw,19px);font-weight:800;line-height:1.18;text-align:center;color:#102f4c}
 body.home-fit .home-tiles .home-button-image,body.home-fit .home-tiles .warehouse-button-image,body.home-fit .home-tiles .settings-tile>img{width:clamp(42px,7vh,86px)!important;height:clamp(42px,7vh,86px)!important;margin:0;object-fit:contain}
 body.home-fit .home-tiles .settings-tile:hover{background:#fff;border-color:#5ba4d4;box-shadow:0 7px 20px #17496f30;transform:translateY(-2px)}
 body.home-fit .home-tiles .settings-tile:active{transform:translateY(1px)}
 .page-window-bar{background:linear-gradient(100deg,#e7f4ff,#cfe5f5);color:#153f5f;border-bottom:1px solid #a7c9df;min-height:40px}
 .page-window-bar>strong{font-weight:800}
 .page-window-bar button{border-radius:7px;min-height:30px}
 .warehouse-sidebar{background:linear-gradient(170deg,#22699e,#103f70);border:1px solid #2c74a9;border-radius:14px;padding:16px;color:#fff;box-shadow:0 5px 18px #143f6420}
 .warehouse-sidebar h2,.warehouse-sidebar p{color:#fff}
 .warehouse-sidebar-links>button,.warehouse-sidebar-links>a{background:#ffffff12;color:#fff;border:1px solid #ffffff35;border-radius:10px;padding:12px;font-weight:700;min-height:58px}
 .warehouse-sidebar-links>button:hover,.warehouse-sidebar-links>a:hover{background:#ffffff28;color:#fff}
 .warehouse-sidebar-links>.primary{background:#e5f4ff;color:#123d60}
 .warehouse-sidebar-links>.check-register-alert{background:#a91d23;color:white}
 .card{border:1px solid #c6ddec;box-shadow:0 4px 16px #193f6310;border-radius:14px}
 .card-head{background:#dceefa;color:#163e5c}
 th{background:#e5f1fa;color:#284c67;font-weight:800}
 label.field,.modal-body label:not(.check){font-weight:750;color:#153952}
 input:not([type=checkbox]):not([type=radio]),select,textarea{border:1px solid #a6c4d8;border-radius:8px;background:#fff;color:#17354b}
 input:focus,select:focus,textarea:focus{outline:2px solid #4b9ac9;outline-offset:1px}
 button.primary{background:#176baf;color:white;border-color:#176baf}
 .modal-body{background:#eff7fd}
 .desktop-ops{background:linear-gradient(145deg,#0c1c2c,#07121d);border-color:#294a63}
 .central-panel{background:#102538;border:1px solid #365873;box-shadow:0 4px 14px #0002}
 .central-panel h3{background:linear-gradient(120deg,#193f5d,#112c43);color:#fff;padding:10px 12px}
 .central-sidebar button,.central-sidebar a{background:#183a56;border-color:#355d7b;color:#f5faff;font-weight:650}
 .central-sidebar button:hover,.central-sidebar a:hover{background:#245b84}
 .central-sidebar [data-action=mission]{background:#c8192b;border-color:#e13b48;color:#fff;font-weight:800}
 .central-mission{background:#152e42;border-color:#38596f}
 .central-row,.central-row strong{color:#f5fbff}
 @media(max-width:700px){body.home-fit #main{padding:8px 12px}body.home-fit .home-tiles{gap:7px}body.home-fit .home-tiles .settings-tile{flex-direction:row;justify-content:flex-start}body.home-fit .home-tiles .settings-tile strong{text-align:left}}
 @media(max-height:640px){body.home-fit .home-tiles .home-button-image,body.home-fit .home-tiles .settings-tile>img{width:38px!important;height:38px!important}body.home-fit .home-tiles .settings-tile{gap:4px}}
}
@media screen and (min-width:701px) and (min-height:700px){body.home-fit .home-tiles .home-button-image,body.home-fit .home-tiles .warehouse-button-image,body.home-fit .home-tiles .settings-tile>img{width:clamp(72px,11vh,110px)!important;height:clamp(72px,11vh,110px)!important}body.home-fit #main .home-intro h1{color:#173c58!important;text-shadow:0 1px 0 white}body.home-fit .home-tiles img[src="/scenes/events-control.png"]{filter:brightness(1.4)}}
/* Approved visual direction: compact masthead, illustrated tiles and blue workspaces. */
@media screen {
 body.home-fit #header nav{display:none}
 body.home-fit #local-note{display:none}
 body.home-fit #main{max-width:1100px!important;margin:0 auto;padding:20px 24px 12px!important;gap:12px}
 body.home-fit #header{padding:10px 28px!important;background:linear-gradient(110deg,#f7fcff,#dcedfa)!important}
 body.home-fit #header .diego-sign{display:flex;align-items:baseline;gap:10px}
 body.home-fit #header .diego-sign strong{font-family:"Arial Black",Arial,sans-serif!important;font-size:46px!important;font-style:italic!important;font-weight:1000;letter-spacing:-2px;color:#071e43!important}
 body.home-fit #header .association-name{font-size:21px;font-weight:800;color:#092c4b}
 body.home-fit #account .account-bar{padding:3px 28px;background:#e4f2fac7;font-size:11px}
 body.home-fit .home-tiles{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px!important}
 body.home-fit .home-tiles .settings-tile{flex-direction:column!important;align-items:center;justify-content:center!important;padding:10px!important;border:1px solid #c0dff1!important;border-radius:12px!important;background:linear-gradient(130deg,#f9fcfff5,#e6f4ffeb)!important;box-shadow:0 4px 14px #22659a20!important;gap:6px}
 body.home-fit .home-tiles .settings-tile strong{font-size:clamp(15px,1.5vw,23px)!important;text-align:center!important;color:#071f43!important;font-weight:800;line-height:1.1}
 body.home-fit .home-tiles .home-button-image{width:clamp(60px,12vh,124px)!important;height:clamp(60px,12vh,124px)!important;flex:none;margin:0;object-fit:contain;filter:none}
 .home-secondary{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:none}
 .home-secondary button{display:flex;gap:8px;align-items:center;border:0;background:#e9f5ffdb;color:#123b61;font-weight:700;padding:7px 12px}
 .home-secondary .home-button-image{width:28px;height:28px;display:block;background-size:400% 300%;background-image:url('/home-illustrations-v1.png')}
 body:not(.desktop-central-page) #main>.page-head{background:#dfedfa!important;min-height:0!important;color:#0b3158!important;padding:14px 18px!important;margin:0 0 16px!important;border:1px solid #bfd8eb;border-radius:10px;box-shadow:none}
 body:not(.desktop-central-page) #main>.page-head:before,body:not(.desktop-central-page) #main>.page-head:after{display:none!important}
 body:not(.desktop-central-page) #main>.page-head h1{color:#0b3158!important;text-shadow:none!important;font-size:24px}
 body:not(.desktop-central-page) #main>.page-head p{color:#38566d!important;text-shadow:none!important}
 .warehouse-hub-layout{grid-template-columns:210px minmax(0,1fr);gap:18px}
 .warehouse-sidebar{border-radius:10px;background:linear-gradient(170deg,#165d9b,#093a6b)!important;padding:12px}
 .warehouse-sidebar-links button{box-shadow:0 2px 3px #071f4320;text-align:left;display:flex;align-items:center;gap:10px;font-size:14px}
 .warehouse-sidebar-links img,.warehouse-sidebar-links .warehouse-button-image{width:38px;height:38px;flex:none}
 .warehouse-sidebar-links button.primary{background:#e8f6ff!important;color:#093969!important}
 #modal .modal-body{background:linear-gradient(135deg,#eaf5fd,#d9ebfa)}
 #modal label.field{color:#0b2c50;font-weight:750;font-size:14px}
 #modal input,#modal textarea,#modal select{box-shadow:inset 0 1px 3px #12395a08}
 .central-panel{border-color:#3c6b91!important;background:#eaf2f9!important}
 .central-panel-body{color:#15354e;background:#f7fbff}
 .central-panel .central-mission{background:#edf7f2;border-color:#c5dcd4;color:#0a2b42}
 .central-panel .central-row,.central-panel .central-row strong{color:#112e46}
 .central-panel .central-row small{color:#486477}
 .desktop-ops .central-panel .card{background:white;color:#19374f;border-color:#c4d8e7}
 .desktop-ops .central-panel .card p,.desktop-ops .central-panel .card small{color:#39576d}
 .central-sidebar .illustrated-section-button{background:#163b58!important;color:white!important;border-color:#355b76!important}
 @media(max-width:700px){body.home-fit .home-tiles{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(0,1fr))}body.home-fit #main{padding:8px!important}body.home-fit #header .diego-sign strong{font-size:28px!important}body.home-fit #header .association-name{font-size:14px}body.home-fit .home-tiles .home-button-image{width:56px!important;height:56px!important}.warehouse-hub-layout{grid-template-columns:155px minmax(0,1fr)}}
}
@media screen {
 body,button,input,select,textarea{font-family:"Segoe UI",Arial,sans-serif}
 body.home-fit .home-tiles .settings-tile strong{font-family:Arial,sans-serif;font-weight:700!important}
 body.home-fit #header .diego-sign strong{transform:skewX(-12deg);font-family:Arial,sans-serif!important;font-weight:900!important}
}
@media screen {
 .central-sidebar>details,.central-sidebar .central-more{background:transparent!important;border:0!important;padding:0!important;margin:0!important;box-shadow:none!important}
 .central-sidebar summary.illustrated-section-button{margin:0!important;width:100%;box-sizing:border-box}
}
@media screen {
 body.home-fit .home-tiles .realistic-image{display:block;width:clamp(74px,15vh,150px)!important;height:clamp(74px,15vh,150px)!important;background-repeat:no-repeat;opacity:1!important}
 .warehouse-sidebar .realistic-image{display:block;width:44px;height:44px;flex:none;background-repeat:no-repeat}
}
.realistic-image{clip-path:inset(4% 5% 2% 5%)}
@media screen {
 body .realistic-inner{display:inline-block!important;width:44px!important;height:44px!important;min-width:44px;flex:0 0 44px!important;background-repeat:no-repeat!important;vertical-align:middle;pointer-events:none;clip-path:inset(3%);margin:0!important;filter:none!important;object-fit:contain}
 body .settings-tile .realistic-inner{width:68px!important;height:68px!important;flex-basis:68px!important}
 body .central-sidebar .realistic-inner{width:44px!important;height:44px!important;flex-basis:44px!important}
}
@media screen {
 html[data-display-mode=manual] body{max-width:min(100%,var(--diego-display-width));margin-left:auto!important;margin-right:auto!important}
 html[data-display-mode=manual] .desktop-ops.central-window-maximized{max-width:min(100%,var(--diego-display-width));margin-left:auto;margin-right:auto}
}

/* Calendario turni: contrasto esplicito anche con il tema chiaro. */
.station-calendar article,.station-calendar article label,.station-calendar article div,.station-calendar article b,.station-calendar article span,.station-calendar article small,.station-legend span{color:#f5faff!important}
.station-calendar article button{background:#fff!important;color:#17364a!important}

/* Equal-sized home entries, including clinics and tutorial. */
body.home-fit .home-tiles{grid-template-rows:repeat(4,minmax(0,1fr))!important}
body.home-fit .home-tiles .home-button-image,body.home-fit .home-tiles .realistic-image{width:clamp(42px,9vh,96px)!important;height:clamp(42px,9vh,96px)!important}
@media(max-width:700px){body.home-fit .home-tiles{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(7,minmax(0,1fr))!important}body.home-fit .home-tiles .settings-tile{flex-direction:row!important;padding:6px!important}body.home-fit .home-tiles .home-button-image{width:32px!important;height:32px!important}body.home-fit .home-tiles .settings-tile strong{font-size:13px!important}}
.central-sidebar .event-menu-group{border:1px solid #52728b;border-radius:10px;background:#173449;color:#f4f9ff;overflow:hidden}.central-sidebar .event-menu-group summary{cursor:pointer;display:flex;align-items:center;gap:8px;padding:12px;font-weight:700;list-style:none}.central-sidebar .event-menu-group summary::-webkit-details-marker{display:none}.event-menu-group summary img{width:32px;height:32px;object-fit:contain}.event-menu-group summary small{margin-left:auto;font-size:10px}.event-menu-group[open] summary{background:#265274}.event-menu-group>div{display:grid;gap:6px;padding:8px}.event-menu-group summary:focus-visible{outline:3px solid #59baff;outline-offset:-3px}

/* Registri leggibili: griglia tipo foglio di calcolo, senza cambiare i colori di stato. */
@media screen {
 body,button,input,select,textarea{font-family:"Segoe UI",Arial,sans-serif;}
 .table-wrap{border:1px solid #b7c9d8;border-radius:8px;background:#fff;isolation:isolate;}
 table{font-family:"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.4;font-variant-numeric:tabular-nums;border-collapse:separate;border-spacing:0;color:#17364d;background:#fff;width:100%;}
 table th{position:sticky;top:0;z-index:2;background:#dceaf5!important;color:#153d5c!important;font-size:13px;font-weight:700;text-align:left;padding:11px 12px;border-right:1px solid #b9cddd;border-bottom:2px solid #8faec5;white-space:normal;}
 table td{padding:10px 12px;border-right:1px solid #d9e3eb;border-bottom:1px solid #d9e3eb;vertical-align:middle;}
 table tbody tr:not([class]):nth-child(even)>td{background:#f2f6fa;}
 table tbody tr:not([class]):hover>td{background:#e5f1fb;}
 table tbody tr:focus-within{outline:2px solid #2875b7;outline-offset:-2px;}
 table th:last-child,table td:last-child{border-right:0;}
 table td.num,table td.numeric,table td[data-number]{text-align:right;}
 table input:not([type=checkbox]):not([type=radio]),table select{font:inherit;min-height:34px;}
 table button{font:600 13px "Segoe UI",Arial,sans-serif;min-height:34px;}
 table input[type=checkbox]{width:17px;height:17px;accent-color:#1874b7;}
 @media(max-width:700px){table{font-size:13px}table td,table th{padding:9px 10px}}
}

.package-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;margin:16px 0}.package-options .check{display:flex!important;align-items:center;justify-content:flex-start;gap:10px;min-height:42px!important;padding:8px 12px!important;margin:0!important;border:1px solid #b7cfdf;border-radius:7px;background:#fff;font-weight:600}.package-options input{flex:none;width:18px!important;height:18px!important;margin:0!important}.package-options .check:has(input:checked){background:#e1f2ee;border-color:#53a28b}


/* Registri adattivi: tutte le informazioni visibili, testi a capo. */
@media screen {
 #main[data-scene="personale"] .warehouse-hub-layout,#main:has(#warehouse-open-panel) .warehouse-hub-layout{grid-template-columns:180px minmax(0,1fr)!important;gap:12px!important;}
 #main[data-scene="personale"] .warehouse-sidebar button,#main:has(#warehouse-open-panel) .warehouse-sidebar button{padding:8px!important;font-size:13px!important;gap:6px!important;}
 #main[data-scene="personale"] .warehouse-sidebar .realistic-inner,#main:has(#warehouse-open-panel) .warehouse-sidebar .realistic-inner{width:30px!important;height:30px!important;min-width:30px!important;flex-basis:30px!important;}
 #main[data-scene="personale"] .table-wrap table,#warehouse-open-panel .table-wrap table{width:100%;min-width:0!important;table-layout:fixed;font-size:14px;}
 #main[data-scene="personale"] .table-wrap td,#warehouse-open-panel .table-wrap td,#main[data-scene="personale"] .table-wrap th,#warehouse-open-panel .table-wrap th{white-space:normal!important;overflow-wrap:anywhere;padding:8px 6px;}
 #main[data-scene="personale"] .table-wrap .subtext{display:block;font-size:13px;line-height:1.4;margin-top:4px;}
 #main[data-scene="personale"] .table-wrap th:nth-child(1){width:21%}#main[data-scene="personale"] .table-wrap th:nth-child(2){width:18%}#main[data-scene="personale"] .table-wrap th:nth-child(3){width:23%}#main[data-scene="personale"] .table-wrap th:nth-last-child(2){width:25%}#main[data-scene="personale"] .table-wrap th:last-child{width:13%}
 #warehouse-open-panel .table-wrap th:nth-child(1){width:23%}#warehouse-open-panel .table-wrap th:nth-child(2){width:12%}#warehouse-open-panel .table-wrap th:nth-child(3){width:13%}#warehouse-open-panel .table-wrap th:nth-child(4){width:10%}#warehouse-open-panel .table-wrap th:nth-child(5){width:25%}#warehouse-open-panel .table-wrap th:last-child{width:17%}
 #main[data-scene="personale"] .table-wrap td:last-child button,#warehouse-open-panel .table-wrap td:last-child button{display:block;width:100%;white-space:normal;margin:3px 0;min-height:32px;padding:6px 3px;font-size:13px;}
 #warehouse-open-panel .table-wrap td .actions{display:flex;flex-direction:column;gap:2px;min-width:0;}
 #main[data-scene="personale"] .warehouse-hub-main>.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
 #main[data-scene="personale"] td .personnel-deadlines{display:flex!important;flex-direction:column;gap:4px!important;min-width:0!important;}
 #main[data-scene="personale"] td .personnel-deadline{display:block!important;padding:4px 5px!important;min-height:0!important;line-height:1.3;font-size:13px;white-space:normal;}
 #main[data-scene="personale"] td .personnel-deadline strong{font-size:13px;min-width:0;}
 #main[data-scene="personale"] .page-head,#main[data-scene="warehouses"] .page-head{padding:12px 16px!important;}
 #main[data-scene="personale"] .page-head h1,#main[data-scene="warehouses"] .page-head h1{font-size:21px!important;margin:0!important;}
}

@media screen {
 #main[data-scene="personale"] .warehouse-sidebar button,#main:has(#warehouse-open-panel) .warehouse-sidebar button{width:100%!important;min-width:0!important;box-sizing:border-box;white-space:normal!important;overflow-wrap:anywhere;}
 #warehouse-open-panel .table-wrap td button,#warehouse-open-panel .table-wrap td small,#warehouse-open-panel .table-wrap td span{white-space:normal!important;overflow-wrap:anywhere;max-width:100%;}
}
