/* WINDETECT v4.145 — unified visual-first personal page & settings.
   This stylesheet does not modify HSE inspection or its PDF template. */
#mypageView.wd145-page,#mySettingsView.wd145-settings{width:min(100%,740px);margin:0 auto;color:#182b43}
#mypageView .wd145-profile{padding:16px!important;border-radius:18px!important;box-shadow:none!important}
.wd145-media{width:100%;aspect-ratio:4/3;display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:10px;background:#f6f8fb;border:1px solid #dbe5ef;border-radius:17px;overflow:hidden}
.wd145-photo,.wd145-qr{appearance:none;border:1px solid #d5e0ed;background:#fff;border-radius:13px;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;overflow:hidden;cursor:pointer}
.wd145-photo img{width:100%;height:100%;object-fit:cover}
.wd145-qr canvas,.wd145-qr img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.wd145-placeholder{display:grid;place-items:center;color:#526e8b;width:100%;height:100%}
.wd145-placeholder svg{width:clamp(40px,16vw,92px);height:clamp(40px,16vw,92px);stroke:currentColor;fill:none;stroke-width:1.5}
.wd145-qr-canvas{display:grid;place-items:center;background:#fff;width:100%;height:100%}
.wd145-info{padding:14px 5px 3px;display:grid;gap:9px}
.wd145-name{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;font-size:20px;font-weight:750}
.wd145-name small{font-size:12px;font-weight:500;color:#657b91}
.wd145-dept{font-size:13px;color:#526b82}
.wd145-row{display:flex;align-items:center;gap:10px;min-width:0;color:#1f344b;font-size:14px;overflow-wrap:anywhere}
.wd145-row svg,.wd145-settings-form label svg{width:20px;height:20px;min-width:20px;fill:none;stroke:#456889;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wd145-tasks{margin-top:14px;display:flex;gap:12px;align-items:flex-start;min-height:58px}
.wd145-drop{flex:0 0 56px;width:56px;height:58px;border-radius:19px 19px 24px 24px;border:1px solid #d3e2ee;background:linear-gradient(165deg,#fff,#f6faff);display:grid;place-items:center;box-shadow:0 3px 9px #193b6012;cursor:pointer;color:#1d3750}
.wd145-drop svg{width:31px;height:31px}
.wd145-task-panel{flex:1;min-width:0;padding:10px 12px;border:1px solid #d7e4ee;border-radius:15px;background:#fff}
.wd145-task-panel[hidden]{display:none!important}
.wd145-task-row{display:flex;align-items:center;gap:9px;font-size:13px;min-height:39px}
.wd145-ppe-symbol{font-size:23px;color:#2f587f}
.wd145-task-state{margin-left:auto;white-space:nowrap;color:#60758c;font-size:12px}
.wd145-task-state.wd-ok{color:#168359}.wd145-task-state.wd-no{color:#9e4838}
.wd145-task-action{border:1px solid #cbdbe8;background:#f7faff;border-radius:12px;color:#305a7e;width:37px;height:37px;font-size:24px;cursor:pointer}
#mypageView #myPageMenu{display:none!important}
#mySettingsView.wd145-settings{background:transparent!important;border:0!important;box-shadow:none!important;padding:8px 0 24px!important}
.wd145-settings-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}
.wd145-settings-heading>span{font-size:25px;color:#345b82}
.wd145-settings-media{margin:0 0 16px}
.wd145-settings-form{display:flex;flex-direction:column;gap:14px;align-items:stretch}
.wd145-settings-form label{display:flex;align-items:center;gap:12px;border:1px solid #d3e0ee;border-radius:15px;background:#fff;padding:8px 15px}
.wd145-settings-form label input{min-width:0;border:0!important;outline:0;flex:1;box-shadow:none!important;background:transparent!important;color:#233950;font-size:15px;min-height:45px}
.wd145-save{align-self:center;display:grid;place-items:center;width:64px;height:64px;min-height:64px;border:1px solid #cfddeb;border-radius:21px;background:#f9fcff;color:#284d71;cursor:pointer}
.wd145-save svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.wd145-message{text-align:center;font-size:12px;color:#6a7c8d;min-height:20px}
#mySettingsView .wd145-photo,#mySettingsView .wd145-qr{min-height:0}
/* Bottom back remains available on My Page and Settings. */
body:not(.wd-launcher-active) #globalBack:not([hidden]){visibility:visible}
@media(max-width:500px){#mypageView .wd145-profile{padding:12px!important}.wd145-media{gap:8px;padding:7px;border-radius:13px}.wd145-photo,.wd145-qr{border-radius:10px}.wd145-info{padding:12px 3px 1px;gap:8px}.wd145-name{font-size:18px}.wd145-row{font-size:12px;gap:8px}.wd145-tasks{gap:9px}.wd145-task-row{font-size:12px}.wd145-drop{width:51px;height:53px;flex-basis:51px}}
/* Respect dynamic hidden state even when styled display values are set. */
#mySettingsView [hidden],#mypageView [hidden]{display:none!important}
.wd145-dept{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.wd145-dept::before{content:'⚡';font-size:15px;color:#426e90;margin-right:3px}
.wd145-ppe-symbol{display:inline-block;width:23px;height:23px;min-width:23px;background:url('helmet-simple.svg') center/contain no-repeat;font-size:0}

/* v4.146 — visual-only Home brand, always-expanded tasks and editing dock */
.wd146-brand-home{display:grid;place-items:center;width:52px;height:52px;min-width:52px;border:1px solid #d3dfe9;border-radius:17px;background:linear-gradient(145deg,#fff,#f7fafc);color:#111;padding:10px;box-shadow:0 3px 12px #172b4212;cursor:pointer}
.wd146-brand-home svg{width:100%;height:100%;display:block}
.wd146-brand-home:active,.wd146-edit:active{transform:scale(.96)}
body:has(#mypageView:not([hidden])) .mainbar,body:has(#mySettingsView:not([hidden])) .mainbar{display:none!important}
.wd146-task-check{flex:0 0 35px;width:35px;height:43px;display:grid;place-items:center;color:#17283b}
.wd146-task-check svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#wdMyPersonalDetails.wd145-task-panel{display:block!important;padding:9px 10px}
.wd146-tasks{align-items:center;margin-top:13px;gap:7px}
.wd146-edit-row{display:flex;justify-content:flex-end;margin:13px 0 0}
.wd146-edit{width:56px;height:56px;display:grid;place-items:center;border:1px solid #d2dfeb;border-radius:18px;background:linear-gradient(150deg,#fff,#f6faff);color:#17283b;padding:13px;box-shadow:0 3px 10px #15324b0d}
.wd146-edit svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#mySettingsView .wd145-save{align-self:flex-end;margin:0 0 0 auto}
#mySettingsView .wd145-settings-heading{display:none!important}
#mySettingsView .wd145-settings-media{margin-top:0}

/* v4.148: My Tasks is a heading above the status, not a toggle. */
#mypageView .wd146-tasks{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;margin-top:16px!important}
#mypageView .wd148-task-title{display:flex;align-items:center;gap:10px;min-height:40px;font-weight:700;font-size:16px;color:#182b43}
#mypageView .wd146-task-check{width:35px;height:35px;flex:0 0 35px;pointer-events:none}
#mypageView #wdMyPersonalDetails.wd145-task-panel{width:100%;box-sizing:border-box;padding:9px 12px!important}
#mypageView .wd145-task-row{min-height:44px;gap:9px}
/* Same fixed bottom dock level, shape and measurements as the global Back button. */
#mypageView .wd146-edit-row{position:static!important;margin:0!important}
body:has(#mypageView:not([hidden])) #wd146ProfileEdit{position:fixed!important;right:max(12px,calc((100vw - 550px)/2));bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;width:49px!important;height:49px!important;min-width:49px!important;min-height:49px!important;z-index:951!important;border-radius:17px!important;padding:11px!important;background:#fff!important;border:1px solid #dae3e9!important;box-shadow:0 3px 12px #1a355512!important}
body:has(#mypageView[hidden]) #wd146ProfileEdit{display:none!important}
@media(max-width:520px){body:has(#mypageView:not([hidden])) #wd146ProfileEdit{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}}
/* The inspection dock uses viewport-center positioning rather than bottom positioning. */
html:root body.wd-icon-inspection:has(#mypageView:not([hidden])) #wd146ProfileEdit{top:var(--wd-dock-center-y)!important;bottom:auto!important;transform:translateY(-50%)!important}

/* v4.149 — settings save action mirrors global back on opposite edge.
   Use the same shared inspection dock vertical center, shape, and scale. */
#mySettingsView .wd145-save{
 position:fixed!important;
 top:var(--wd-dock-center-y,calc(100dvh - 58px))!important;
 bottom:auto!important;
 right:max(10px,calc((100vw - 550px)/2))!important;
 left:auto!important;
 transform:translateY(-50%)!important;
 width:49px!important;height:49px!important;min-width:49px!important;min-height:49px!important;
 margin:0!important;padding:0!important;
 display:grid!important;place-items:center!important;
 border:1px solid #dae3e9!important;border-radius:17px!important;
 background:#fff!important;box-shadow:0 3px 12px #1a355512!important;
 color:#172332!important;z-index:951!important;cursor:pointer;
}
#mySettingsView .wd145-save svg{width:25px!important;height:25px!important;stroke:#172332!important;stroke-width:2!important;fill:none!important}
@media(max-width:520px){#mySettingsView .wd145-save{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}}
html:root body.wd-icon-inspection:has(#mySettingsView:not([hidden])) #mySettingsView .wd145-save{
 width:var(--wd-dock-side-size,40px)!important;height:var(--wd-dock-side-size,40px)!important;
 min-width:var(--wd-dock-side-size,40px)!important;min-height:var(--wd-dock-side-size,40px)!important;
}
@media(max-width:360px){html:root body.wd-icon-inspection:has(#mySettingsView:not([hidden])) #mySettingsView .wd145-save{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}}
