/* MC Safety: first commercial visual direction. No external fonts or trackers. */
:root{--blue:#195c8b;--border:#dce5e5;--muted:#5e7079;color:#18313c;background:#f3f6f6;font-family:Inter,"Segoe UI",Arial,sans-serif}
button{border-radius:9px;transition:background .15s,border-color .15s}button:focus-visible,a:focus-visible{outline:3px solid #287ec2;outline-offset:3px}button.primary{background:#195c8b;border-color:#195c8b}button:hover{background:#edf7f5;border-color:#69a8a2}
#header{border-top:4px solid #195c8b;padding-top:12px;padding-bottom:12px;flex-wrap:wrap;gap:14px 28px}.brand-by{display:block;font-size:9px;letter-spacing:1.6px;color:#195c8b;margin-top:4px}.brand strong{line-height:1}.brand select{background:#eff5f4;color:#244a50;border:1px solid #d9e5e2}.brand small{letter-spacing:.3px}#header nav{flex:1;min-width:0}#header nav button{min-height:46px;text-transform:none;font-size:12px;letter-spacing:0;border-radius:7px}#header nav button.active{background:#eaf2fa;border-bottom:0;color:#195c8b}.account-bar{background:white;font-size:12px}.local-note{background:#edf3f2;color:#536f72;font-size:10px;border-color:#dce7e5}
#main{padding-top:34px}.page-head h1{font-size:30px;letter-spacing:-1px;color:#12343d}.page-head p{font-size:14px}.eyebrow{font-size:10px;font-weight:750;letter-spacing:2px;color:#195c8b;display:block;margin-bottom:14px}.home-intro{padding:14px 0 6px}.home-tiles{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.home-tiles .settings-tile{min-height:192px;padding:24px;border-radius:16px;position:relative;box-shadow:0 4px 14px #143b3c04}.home-tiles .settings-tile:hover{border-color:#287ec2;box-shadow:0 8px 24px #164c4810;background:white}.home-tiles .settings-tile strong{font-size:18px;color:#183a41}.home-tiles .settings-tile span{font-size:12px}.home-tiles .room-symbol{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#eaf2fa;color:#195c8b;font-size:24px;margin-bottom:6px}.home-tiles [data-action=locked-section]{background:#f9fbfb}.home-tiles [data-action=locked-section] .room-symbol{background:#edf0f2;color:#71828a}.card{border-radius:14px;box-shadow:0 4px 18px #183a3a04}.card-head{padding:20px 22px}.card-head h2{font-size:17px}th{background:#edf3f2;color:#476266;font-size:10px;text-transform:uppercase;letter-spacing:.6px}td{padding-top:17px;padding-bottom:17px}input,select,textarea{border-radius:8px;min-height:42px}
.mc-login{min-height:100dvh;display:grid;grid-template-columns:1.1fr 1fr;background:#f7faf9}.login-story{background:radial-gradient(ellipse at 0 100%,#2169ae 0,transparent 60%),#122f49;color:white;padding:52px 10%;display:flex;flex-direction:column;justify-content:space-between;min-height:100dvh;position:relative;overflow:hidden}.login-story:after{content:"";position:absolute;width:420px;height:420px;border:1px solid #ffffff12;border-radius:50%;right:-270px;top:28%;box-shadow:0 0 0 65px #ffffff04,0 0 0 130px #ffffff03;pointer-events:none}.mc-wordmark{font-size:20px;font-weight:800;letter-spacing:3px}.mc-wordmark span{display:block;font-size:9px;letter-spacing:5px;color:#9bc5c2;margin-top:8px}.login-story-copy{position:relative;z-index:1;padding:60px 0}.login-story .eyebrow{color:#b8d9ff}.login-story h2{font-size:clamp(36px,4vw,62px);line-height:1.1;letter-spacing:-2px;font-weight:650}.login-story p{font-size:16px;line-height:1.8;color:#bed3d6;max-width:400px;margin-top:24px}.story-lines{display:flex;flex-wrap:wrap;gap:20px;margin-top:42px;font-size:9px;font-weight:700;letter-spacing:1.5px;color:#b8d9ff}.login-story>small{color:#9db8bd;font-size:11px}.mc-login .login-panel{align-self:center;width:min(440px,calc(100% - 48px));margin:40px auto;padding:34px;background:transparent;border:0;box-shadow:none}.login-panel h1{font-size:14px;letter-spacing:3px;color:#195c8b;margin-bottom:24px}.login-panel h2{font-size:28px;letter-spacing:-.8px;margin-bottom:12px}.login-panel form{gap:18px}.login-panel form button{min-height:48px}.login-panel input{min-height:48px}.login-panel .actions{margin-top:24px}.login-panel p{font-size:12px}
@media(min-width:1100px){#header nav{flex-basis:100%;margin-top:4px}#header nav button{padding:10px 16px}}
@media(max-width:1000px){.home-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.mc-login{grid-template-columns:1fr}.login-story{min-height:0;padding:28px}.login-story-copy{padding:28px 0 12px}.login-story h2{font-size:34px;letter-spacing:-1px}.login-story p,.story-lines,.login-story>small{display:none}.mc-login .login-panel{margin:18px auto;padding:20px}.home-tiles .settings-tile{padding:20px;min-height:174px}}
@media(max-width:380px){.home-tiles{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
@media print{.login-story{display:none}#main{padding:0}.card{box-shadow:none}}

.mc-wordmark img{width:130px;background:white;padding:12px;border-radius:10px;display:block}.brand-by{display:flex;align-items:center;gap:5px}.brand-by img{width:60px;height:28px;object-fit:contain}.mc-wordmark span{color:#bdd3e9}

/* Original AI-generated rescue scenes: decorative, content stays on solid surfaces. */
[data-scene="home"]{--scene:url("/scenes/home.png")}
[data-scene="radio"]{--scene:url("/scenes/radio.png")}
[data-scene="vehicles"]{--scene:url("/scenes/vehicles.png")}
[data-scene="rooms"]{--scene:url("/scenes/rooms.png")}
[data-scene="casermaggio"]{--scene:url("/scenes/casermaggio.png")}
[data-scene="warehouses"]{--scene:url("/scenes/warehouses.png")}
[data-scene="personale"]{--scene:url("/scenes/personale.png")}
[data-scene="events"]{--scene:url("/scenes/events-control.png")}

#main>.page-head,#main .home-intro{background-image:linear-gradient(90deg,rgba(10,34,56,.96),rgba(10,34,56,.80) 48%,rgba(10,34,56,.18)),var(--scene);background-size:cover;background-position:center 48%;padding:34px;border-radius:18px;min-height:205px;align-items:center;border:1px solid #193c57;margin-bottom:26px}
#main>.page-head h1,#main .home-intro h1{color:white}#main>.page-head p,#main .home-intro p{color:#e0eaf3;max-width:600px}#main .home-intro .eyebrow{color:#bfddf5}#main .home-intro .page-head{margin-bottom:0}#main>.page-head .actions{background:#ffffffed;padding:10px;border-radius:12px}#main>.page-head .actions:empty{display:none}
.mc-login .login-story{background-image:linear-gradient(90deg,rgba(10,34,56,.94),rgba(10,34,56,.64)),url('/scenes/home.png');background-size:cover;background-position:62% center}.login-story:after{display:none}.login-story p{color:#e0eaf3}
@media(max-width:600px){#main>.page-head,#main .home-intro{padding:24px;min-height:220px;background-position:65% center}#main>.page-head{gap:20px}#main>.page-head .actions{width:100%}.mc-login .login-story{background-position:65% 45%}}
@media print{#main>.page-head,#main .home-intro{background:none!important;padding:0;min-height:0;border:0}#main>.page-head h1,#main .home-intro h1{color:black}#main>.page-head p,#main .home-intro p{color:#333}}


/* Centred product identity and independent association branding. */
#header{display:block}.identity-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:24px;min-height:136px;width:100%}.diego-sign{grid-column:2;text-align:center}.diego-sign strong{display:block;font-family:"Arial Black","Segoe UI",sans-serif;font-style:italic;font-weight:950;font-size:58px;letter-spacing:-3px;line-height:1.1;color:#195c8b;text-shadow:2px 3px 0 #dce9f4}.diego-sign>span{display:block;font-size:10px;letter-spacing:3px;font-weight:800;color:#476478;margin-top:9px}.association-sign{grid-column:3;justify-self:end;text-align:right;max-width:100%;min-width:0}.association-sign .org-logos{justify-content:flex-end;gap:12px}.association-sign .org-logo{width:66px;height:60px;max-height:60px;object-fit:contain}.association-name{font-size:24px;font-weight:750;line-height:1.25;overflow-wrap:anywhere;color:#18394d;margin:10px 0}.association-sign select{font-size:12px}.font-modern{font-family:Arial,sans-serif}.font-humanist{font-family:"Trebuchet MS",sans-serif}.font-bold{font-family:"Arial Black",Arial,sans-serif}.font-classic{font-family:Georgia,serif}#association-preview{padding:16px;background:#edf3f9;border-radius:10px}#header nav{margin-top:14px;min-height:46px}
@media(max-width:750px){.identity-row{grid-template-columns:1fr;gap:20px;padding:12px 0}.diego-sign{grid-column:1}.diego-sign strong{font-size:48px}.association-sign{grid-column:1;justify-self:end;width:100%}.association-name{font-size:22px}.association-sign .org-logo{width:52px;height:48px}}

.font-verdana{font-family:Verdana,sans-serif}.font-tahoma{font-family:Tahoma,sans-serif}.font-times{font-family:"Times New Roman",serif}.font-mono{font-family:"Courier New",monospace}input[type=color]{width:100%;height:48px;padding:5px}#association-preview{background:white;border:1px solid #dce5e5}

.stat.warehouse-counter-alert{background:#fee2e2;border:1px solid #dc2626;color:#991b1b}.stat.warehouse-counter-alert strong,.stat.warehouse-counter-alert span{color:#991b1b}

.home-tiles .home-button-image{display:block;width:104px;height:104px;flex-shrink:0;margin-bottom:8px;background-image:url('/home-illustrations-v1.png');background-size:400% 300%;background-repeat:no-repeat}.home-tiles .warehouse-button-image{margin-bottom:8px}.home-tiles .settings-tile{min-height:235px}.home-tiles [data-action=locked-section] .home-button-image{opacity:.7}@media(max-width:560px){.home-tiles .home-button-image{width:84px;height:84px}.home-tiles .settings-tile{padding:18px;min-height:218px}}

.warehouse-sidebar-links .home-button-image{display:block;width:48px;height:58px;flex-shrink:0;background-image:url('/home-illustrations-v1.png');background-size:400% 300%;background-repeat:no-repeat}

/* Consistent desktop card colours; printing keeps its dedicated layout. */
@media screen {
 #modal .modal-head{background:linear-gradient(110deg,#123b58,#195c8b);color:#fff;border-bottom:4px solid #69a8a2;position:sticky;top:0;z-index:4}
 #modal .modal-head h2{color:#fff}
 #modal .modal-head button{background:#fff;color:#195c8b;border-color:#dce5e5}
 #modal .modal-body{background:#f3f7f8}
 #modal .modal-body h3{color:#195c8b;border-left:4px solid #69a8a2;padding:10px 12px;background:#e8f1f5;margin:18px 0 12px;border-radius:0 7px 7px 0}
 #modal input:not([type=checkbox]):not([type=radio]),#modal select,#modal textarea{background:#fff}
 #modal input[type=checkbox],#modal input[type=radio]{accent-color:#195c8b}
 #modal .modal-actions{position:sticky;bottom:0;background:#edf3f5;padding:14px 0;border-top:1px solid #cfdee5;z-index:3}
 #modal.personnel-fullscreen{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;inset:0}
 #modal.personnel-fullscreen .modal-body{min-height:calc(100dvh - 82px);padding:24px clamp(18px,5vw,90px)}
 #modal.personnel-fullscreen .modal-body>label{margin-bottom:14px}
 #modal.personnel-fullscreen #role-panel,#modal.personnel-fullscreen #fee-panel,#modal.personnel-fullscreen #fitness-panel,#modal.personnel-fullscreen #safety-panel{background:#fff;border:1px solid #cfdee5;border-left:4px solid #69a8a2;border-radius:10px;padding:18px;margin:12px 0 20px}
 #modal.personnel-fullscreen [id^=toggle-]{background:#e4eef5;color:#123b58;border-color:#aac4d6;margin:12px 8px 12px 0;min-height:46px}
 #main .card-head{background:linear-gradient(110deg,#edf3f8,#edf6f3);border-bottom-color:#cfdee5}
 #main .card-head h2{color:#195c8b}
}

@media screen{dialog.personnel-roles-dialog{width:min(960px,96vw);max-height:94dvh;padding:0;border:1px solid #aac4d6}dialog.personnel-roles-dialog .modal-head{position:sticky;top:0;background:#195c8b;color:white;padding:20px;z-index:5}dialog.personnel-roles-dialog .modal-actions{padding:16px 22px}#modal .personnel-roles-dialog #role-panel{margin:0;border:0;padding:0}#selected-roles{padding:12px 16px;background:#e8f1f5;border-radius:8px;color:#123b58;font-weight:600}}

@media screen{#modal button.expiry-red{background:#fee2e2;color:#991b1b;border:2px solid #dc2626}#modal button.expiry-yellow{background:#fef3c7;color:#713f12;border:2px solid #d5a000}}
/* One dedicated scroll area per personnel sheet, including nested dialogs. */
@media screen {
 #modal.personnel-fullscreen[open]{display:flex;flex-direction:column;overflow:hidden}
 #modal.personnel-fullscreen>.modal-head{flex:none;position:relative}
 #modal.personnel-fullscreen>.modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;-webkit-overflow-scrolling:touch}
 #modal.personnel-fullscreen>.back{flex:none}
 #modal dialog.personnel-roles-dialog[open]{display:flex;flex-direction:column;overflow:hidden;height:min(850px,94dvh);max-height:94dvh}
 #modal dialog.personnel-roles-dialog>.modal-head,#modal dialog.personnel-roles-dialog>.modal-actions{flex:none;position:relative}
 #modal dialog.personnel-roles-dialog>.modal-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;padding:20px}
}
/* Scroll the actual sheet, so its scrollbar always belongs to the active dialog. */
@media screen {
 #modal.personnel-fullscreen[open],#modal.personnel-fullscreen dialog.personnel-roles-dialog[open]{display:block;overflow-y:scroll;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y}
 #modal.personnel-fullscreen>.modal-body,#modal.personnel-fullscreen dialog.personnel-roles-dialog>.modal-body{min-height:0;height:auto;max-height:none;overflow:visible;flex:none}
 #modal.personnel-fullscreen>.modal-head,#modal.personnel-fullscreen dialog.personnel-roles-dialog>.modal-head{position:sticky;top:0}
 #modal.personnel-fullscreen::-webkit-scrollbar,#modal.personnel-fullscreen dialog.personnel-roles-dialog::-webkit-scrollbar{width:18px}
 #modal.personnel-fullscreen::-webkit-scrollbar-track,#modal.personnel-fullscreen dialog.personnel-roles-dialog::-webkit-scrollbar-track{background:#e6eef3}
 #modal.personnel-fullscreen::-webkit-scrollbar-thumb,#modal.personnel-fullscreen dialog.personnel-roles-dialog::-webkit-scrollbar-thumb{background:#517994;border:3px solid #e6eef3;border-radius:10px;min-height:40px}
}

.personnel-deadlines{display:flex;flex-direction:column;gap:6px;min-width:165px}.personnel-deadline{display:block;padding:7px 10px;border-radius:7px;background:#edf1f4;font-size:12px;color:#354957}.personnel-deadline.expiry-red,#modal button.expiry-red{background:#fee2e2;color:#991b1b;border:1px solid #dc2626}.personnel-deadline.expiry-yellow{background:#fef3c7;color:#713f12;border:1px solid #d5a000}.personnel-deadline.expiry-green,#modal button.expiry-green{background:#dcfce7;color:#166534;border:1px solid #22a652}
#personnel-rows tr:has([data-expiry-tone="green"]){background:#f0fdf4}#personnel-rows tr:has([data-expiry-tone="yellow"]){background:#fffbeb}#personnel-rows tr:has([data-expiry-tone="red"]){background:#fff1f2}

.personnel-button-image{width:68px;height:68px;object-fit:contain;flex:none;display:block}

.uniform-menu-image{width:58px;height:58px;flex:none;object-fit:contain}

.uniform-label-pending{display:block;width:fit-content;background:#dff3ff;color:#075985;border:1px solid #38bdf8;border-radius:20px;padding:6px 10px;font-size:12px;font-weight:700;margin-top:6px}

/* Shared request status across every sector panel. */
button.event-request-new{background:#fee2e2!important;color:#991b1b!important;border:2px solid #dc2626!important;animation:event-request-pulse 1.8s ease-in-out infinite}
button.event-request-pending{background:#fef3c7!important;color:#78350f!important;border:2px solid #eab308!important}
button.event-request-done{background:#dcfce7!important;color:#14532d!important;border:2px solid #16a34a!important}
@keyframes event-request-pulse{50%{background:#fca5a5;box-shadow:0 0 0 4px #ef444455}}
@media(prefers-reduced-motion:reduce){button.event-request-new{animation:none}}
