@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('vendor/fonts/inter-400.woff2') format('woff2')}@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('vendor/fonts/inter-500.woff2') format('woff2')}@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('vendor/fonts/inter-600.woff2') format('woff2')}@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('vendor/fonts/inter-700.woff2') format('woff2')}:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#17304b;background:#eef4fa}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{border:0;border-radius:10px;padding:11px 13px;background:#e4edf8;color:#17304b;font-weight:700;cursor:pointer}button.primary,.primary{background:#0869e6;color:white}button.good{background:#07965a;color:white}button.red{background:#d93842;color:white}button.outline{border:1px solid #c6d7e8;background:white}button:disabled{opacity:.5}header{position:sticky;top:0;z-index:3;background:#092c51;color:white;display:flex;align-items:center;justify-content:space-between;padding:13px 18px}header button{background:#24496d;color:white}nav{display:flex;overflow:auto;gap:7px;padding:11px;background:#dce8f5;position:sticky;top:55px;z-index:2}nav button{white-space:nowrap;font-size:12px;padding:9px}nav .active{background:#0869e6;color:white}main{max-width:940px;margin:auto;padding:16px 14px 90px}.card{background:white;border:1px solid #d7e4f2;border-radius:18px;padding:18px;margin:0 0 14px;box-shadow:0 2px 7px #17304b0b}.card h2{margin:0 0 15px;font-size:20px}.card h3{margin:10px 0}label{display:block;font-weight:650;font-size:13px;margin:11px 0 5px}input,select,textarea{width:100%;border:1px solid #c5d6e6;border-radius:10px;padding:11px;background:white;color:#19364f}textarea{min-height:86px;resize:vertical}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.tile{background:#f2f7fc;border-radius:12px;padding:16px}.tile b{font-size:26px;display:block}.tile span,.muted,small{color:#647b90}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.actions button{flex:1}.choices{display:flex;flex-wrap:wrap;gap:8px}.choices button.selected{background:#0869e6;color:white}.check{display:flex;align-items:center;gap:10px;padding:8px;border-bottom:1px solid #edf1f5;font-weight:500;font-size:14px}.check input{width:17px;height:17px}.steps{display:flex;gap:5px;margin-bottom:17px}.steps span{flex:1;text-align:center;padding:9px 3px;background:#edf3f9;border-radius:8px;font-size:11px}.steps .on{background:#0869e6;color:white}.result{background:#eef5fc;border-radius:12px;padding:15px;white-space:pre-wrap;line-height:1.6}.row{display:flex;justify-content:space-between;align-items:center;gap:8px}.pill{font-size:11px;background:#d9f5e7;color:#067844;border-radius:20px;padding:4px 9px}.item{padding:12px 0;border-bottom:1px solid #e8eff5}.item:last-child{border:0}.step{border:1px solid #d7e5f2;border-radius:12px;padding:10px;margin-bottom:9px}.lock{min-height:100vh;background:linear-gradient(145deg,#041b33,#0d4e80);display:grid;place-items:center;padding:22px;color:white}.login{width:min(400px,100%);text-align:center}.login label{text-align:left}.login input{margin-top:8px}.login button{width:100%;margin-top:15px}.lockicon{font-size:55px}.login .muted{color:#b7d0e4}.warn{color:#b04718;font-size:12px}.tiny{font-size:12px}.section-head{display:flex;justify-content:space-between;align-items:center}.route{padding:12px;background:#f1f6fb;border-radius:10px;line-height:1.6}footer{text-align:center;font-size:11px;color:#688199;padding:20px}@media(min-width:720px){.tiles{grid-template-columns:repeat(4,1fr)}.grid.three{grid-template-columns:repeat(3,1fr)}}@media print{header,nav,footer,.actions,button{display:none!important}main{padding:0}.card{box-shadow:none;border:0}}

/* Hidden must win over component display rules on Safari and standalone PWA. */
[hidden]{display:none!important}
:root{background:#eaf0f6;color:#18344d}body{min-height:100dvh}header{height:64px;background:linear-gradient(110deg,#061b30,#123b59);box-shadow:0 2px 14px #08263c30;padding-top:env(safe-area-inset-top)}header strong{letter-spacing:1px;font-size:15px}nav{display:none;position:fixed;top:64px;bottom:0;left:0;width:min(320px,88vw);padding:20px 12px;background:#0b263e;z-index:20;overflow-y:auto;box-shadow:10px 0 40px #0004}nav.open{display:flex;flex-direction:column}nav button{text-align:left;background:transparent;color:#c4d5e4;padding:15px;font-size:14px;border-radius:9px}nav .active{background:#0874e6;color:white}main{max-width:1040px;padding:22px 16px 45px}.welcome{padding:4px 4px 18px}.welcome small{letter-spacing:2px;font-size:10px;color:#58809b}.welcome h1{font-size:27px;margin:8px 0}.welcome p{color:#667f91;font-size:13px}.card{border-radius:15px;padding:21px;box-shadow:0 4px 18px #17304b06}.card h2{font-size:19px}.tile{border:1px solid #e3ebf4;background:linear-gradient(130deg,#fff,#f2f7fc);min-height:100px}.tile b{color:#0a3658;margin-bottom:7px}.tiles{gap:12px}.grid button[data-go]{min-height:88px;text-align:left;padding:20px;background:linear-gradient(135deg,#0879e5,#0656b3);box-shadow:0 5px 12px #0d60b323}.grid button[data-go=planning]{background:linear-gradient(135deg,#f3aa35,#dc8113)}.grid button[data-go=sites]{background:linear-gradient(135deg,#14b989,#058665)}.grid button[data-go=reports]{background:linear-gradient(135deg,#7773db,#4b4bb0)}.grid button[data-go=settings],.grid button[data-go=backup]{background:linear-gradient(135deg,#496b86,#29495f)}.steps{position:sticky;top:64px;z-index:1;background:white;padding:10px 0;gap:4px}.steps span{font-size:10px;padding:12px 2px}.check{min-height:45px;line-height:1.5}.check input{accent-color:#0874e6;flex-shrink:0}.actions{padding-top:12px}.actions button{min-height:46px}.result{background:#f5f8fc;border:1px solid #dce6f0;font-size:14px}.login{padding:35px 25px;border:1px solid #83b7db55;border-radius:22px;background:#072236a6;box-shadow:0 20px 80px #0004}.lock{background:radial-gradient(ellipse at 80% 20%,#1c5673,#041625 75%)}.login h1{letter-spacing:2px}.login input{min-height:50px}.login button{min-height:50px}input,select,textarea{min-height:44px}textarea{line-height:1.65}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #73baff;outline-offset:2px}footer{font-size:10px;letter-spacing:1px}@media(min-width:1000px){nav{display:flex;flex-direction:column;top:64px;width:235px;box-shadow:none}#app main{margin-left:255px;margin-right:20px;max-width:1100px}header #menu{visibility:hidden}}@media(max-width:400px){main{padding:12px 10px}.card{padding:15px}.steps span{font-size:9px}.welcome h1{font-size:23px}}@media print{body{background:white}#app main{margin:0;max-width:none}.welcome{display:none}#printArea{display:block}main>.card:has(#csv){display:none}}
.catalog-entry{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:12px 0;border-bottom:1px solid #e6edf4}.catalog-entry button{font-size:11px;padding:7px}.login .lockicon{width:90px;height:90px;background:url(icon-192.png) center/cover;margin:auto;border-radius:20px;font-size:0}#planText{min-height:220px}textarea[readonly]{background:#f4f8fc}#actualPreview{line-height:1.85}#narrativeWarnings:empty{display:none}#printArea .item p{white-space:pre-line;line-height:1.7}
.bulk-box{margin:20px 0;padding:18px;background:#f3f8fe;border:1px solid #c9dff1;border-radius:14px}.bulk-box h3{font-size:16px}.bulk-box textarea{min-height:135px}.bulk-box .section-head{flex-wrap:wrap}.match-row{margin:8px 0;padding:10px 12px;background:white;border-left:3px solid #258b61;border-radius:7px;overflow-wrap:anywhere}.match-row p{margin:5px 0;font-size:13px}.match-row.unmatched,.match-row.conflict{border-left-color:#d35c46}.match-row.ambiguous{border-left-color:#d39b25}.match-row.duplicate,.match-row.ignored{border-left-color:#9aaebb}#bulkResults{max-height:440px;overflow:auto}#masterList{overflow-wrap:anywhere}#importPreview{padding:12px 0}#mappingPanel details{padding:12px 0}.site-table-wrap{overflow-x:auto}.site-selection-table{width:100%;border-collapse:collapse;background:white;font-size:13px}.site-selection-table th{text-align:left;background:#e2edf8;color:#173d5c}.site-selection-table th,.site-selection-table td{padding:11px 9px;border-bottom:1px solid #d8e5ef;vertical-align:top;overflow-wrap:anywhere}.site-selection-table th:first-child{width:42%}.match-row.incomplete{border-left-color:#d35c46}
/* Work details layout: full-width date, paired times, separate OT total. */
input,select,textarea{min-width:0;max-width:100%;font-weight:500}label{min-width:0}.grid>*{min-width:0}.time-panel{display:grid;gap:16px;margin:5px 0 24px;padding:18px;background:#f6f9fd;border:1px solid #dce7f1;border-radius:15px}.work-date{margin:0;font-size:13px;letter-spacing:.2px}.work-date input{display:block;width:100%;margin-top:8px;min-height:64px;font-size:22px;font-weight:700;text-align:left;padding:12px 14px}.time-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.time-pair label{margin:0}.time-pair input{display:block;width:100%;margin-top:8px;min-height:54px;font-size:19px;font-weight:650;text-align:center;padding:10px 8px}input[type=date]::-webkit-date-and-time-value{text-align:left}input[type=time]::-webkit-date-and-time-value{text-align:center}.ot-duration{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-radius:12px;background:#0d3552;color:white}.ot-duration>span{font-size:10px;letter-spacing:1.3px;font-weight:650}.ot-duration div{display:flex;align-items:baseline;gap:6px}.ot-duration strong{font-size:30px;line-height:1}.ot-duration b{font-size:13px;font-weight:500;color:#c7dfee;margin-right:4px}.ot-duration small{width:100%;color:#c7dfee;font-size:12px}.steps{gap:6px}.steps button{flex:1;min-width:0;padding:10px 3px;font-size:11px;background:#edf3f9;color:#567187;font-weight:600}.steps button>span{display:block;padding:0;background:transparent;font-size:11px;margin-bottom:3px}.steps button.on{background:#0874e6;color:white}.draft-save{width:100%;margin-top:12px}.work-classification{display:grid;grid-template-columns:1fr;gap:2px}.field-description{margin:4px 2px 12px;font-size:12px;color:#657e91;line-height:1.5}.allowance-panel{background:#f7fafc;border:1px solid #dce7f1;padding:17px;margin:20px 0;border-radius:13px}.allowance-panel h3{margin-top:0}.allowance-panel .check input{min-height:18px}.delete-option{color:#b53036;background:#fff2f2;margin:4px;font-size:12px}.dashboard-date{color:#667f91;font-size:14px}#printArea p{white-space:pre-line;line-height:1.7}@media(max-width:430px){.card{padding:16px}.time-panel{padding:14px}.steps button{font-size:10px}.steps{top:64px}.time-pair{gap:12px}.time-pair input{font-size:18px}.grid select{font-size:14px}}@media print{.steps,.draft-save{display:none!important}main>.card:has(#wordExport){display:none}}
/* Corporate visual system */
:root{--ink:#142b40;--muted:#687b8d;--navy:#102c43;--blue:#1765b0;--line:#dce4eb;--surface:#fff;--canvas:#f1f4f7;color:var(--ink);background:var(--canvas);font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:15px;-webkit-text-size-adjust:100%}body{background:var(--canvas)}header{height:auto;min-height:64px;padding:calc(12px + env(safe-area-inset-top)) 18px 12px;background:var(--navy);box-shadow:0 3px 18px #102c4314}header strong{font-size:16px;letter-spacing:.2px;font-weight:650}header button{width:40px;height:40px;padding:10px;background:#ffffff0f;color:#e5eef7;border-radius:10px;display:grid;place-items:center}header svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}nav{top:calc(64px + env(safe-area-inset-top));background:var(--navy)}nav button{font-weight:500;border-radius:8px;font-size:13px}nav .active{background:#ffffff16;color:white;box-shadow:inset 3px 0 #74b9f7}main{padding:26px 18px calc(70px + env(safe-area-inset-bottom))}.welcome{padding:2px 2px 22px}.welcome small{font-size:10px;letter-spacing:1.7px;font-weight:600;color:#607b91}.welcome h1{font-size:27px;line-height:1.2;font-weight:650;letter-spacing:-.65px;margin:9px 0}.welcome p{font-size:13px;margin:0;color:var(--muted)}.card{padding:23px;border:1px solid var(--line);border-radius:17px;box-shadow:0 3px 14px #102c4305;margin-bottom:18px}.card h2{font-size:19px;font-weight:650;letter-spacing:-.35px;margin-bottom:14px}.card h3{font-size:15px;font-weight:600;letter-spacing:-.1px}.dashboard-date{font-size:13px}.tiles{gap:12px}.tile{border:1px solid #e2e8ef;background:#f8fafc;box-shadow:none;min-height:92px;padding:17px;border-radius:12px}.tile b{font-size:27px;font-weight:600;letter-spacing:-.8px;color:var(--navy)}.tile span{font-size:12px;font-weight:500;color:#6c7e8e}.grid button[data-go],.grid button[data-go=planning],.grid button[data-go=sites],.grid button[data-go=reports],.grid button[data-go=settings],.grid button[data-go=backup]{background:white;color:var(--ink);box-shadow:none;border:1px solid var(--line);min-height:82px;border-radius:12px;padding:17px;font-weight:600;text-align:left;transition:background .15s,border-color .15s}.grid button[data-go]:hover{background:#f3f8fe;border-color:#a5bfd7}.module-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#edf4fb;color:#23649b;flex:0 0 auto}.module-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.module-button{display:flex;align-items:center;gap:12px}.module-button>span:last-child{font-size:13px;line-height:1.45}.module-button small{display:block;color:#718294;font-size:10px;font-weight:400;margin-top:3px}label{font-size:12px;font-weight:600;line-height:1.55;color:#435b70;margin:14px 0 6px}input,select,textarea{border:1px solid #cfdbe5;border-radius:9px;background:white;color:#19364e;font-size:16px;font-weight:450;line-height:1.45;min-height:47px;padding:11px 12px;box-shadow:none}textarea{font-size:14px;line-height:1.8;font-weight:400;min-height:96px}input:focus,select:focus,textarea:focus{outline:2px solid #7fb1dd55;outline-offset:1px;border-color:#5b97c8}button{font-size:13px;font-weight:600;border-radius:9px;padding:12px 14px}button.primary,.primary{background:var(--blue);color:white}button.good{background:#17624c;color:white}button.outline{border:1px solid #cbd8e4;color:#335570;background:white}.pill{background:#edf5f2;color:#366452;font-weight:500;font-size:10px;border-radius:6px;padding:5px 8px}.muted,small{color:var(--muted)}.tiny{font-size:12px;line-height:1.65}.check{font-size:13px;font-weight:450;color:#2c465c;min-height:44px;padding:9px 2px}.check input{width:17px;height:17px;min-height:17px;accent-color:#1765b0;padding:0}.check strong{margin-left:auto;color:var(--navy);font-weight:650}.steps{top:calc(64px + env(safe-area-inset-top));margin:0 -2px 20px;padding:10px 0;background:white;border-bottom:1px solid #eef2f6;gap:6px}.steps button{padding:11px 4px;font-size:10px;font-weight:500;border:1px solid #e0e7ef;border-radius:9px;background:#f7f9fc;color:#60778c}.steps button>span{font-size:11px;font-weight:600;margin-bottom:4px;color:inherit}.steps button.on{background:var(--blue);border-color:var(--blue);color:white}.steps button.on>span{color:white}.time-panel{background:#f8fafc;border:1px solid #e0e7ee;border-radius:13px;padding:18px;gap:17px}.work-date{font-size:12px;font-weight:600;letter-spacing:0}.work-date input{font-size:23px;font-weight:600;letter-spacing:-.45px;min-height:66px;border-radius:10px}.time-pair input{font-size:20px;font-weight:550;min-height:56px}.ot-duration{background:var(--navy);border-radius:10px;padding:17px 18px}.ot-duration>span{font-size:10px;letter-spacing:1px}.ot-duration strong{font-size:29px;font-weight:600;letter-spacing:-.5px}.ot-duration small{font-size:11px}.allowance-panel,.bulk-box{border:1px solid #dde6ee;border-radius:12px;background:#f8fafc;padding:18px;margin:20px 0}.bulk-box .section-head button{background:#edf2f7;color:#3a5b76;font-size:11px}.result{background:#fafbfd;border:1px solid #e0e7ef;border-radius:10px;font-size:14px;line-height:1.9;padding:18px}.warn{color:#9a5229;font-size:12px;line-height:1.6}.delete-option{color:#aa3840;background:#fcf0f1;font-size:11px;font-weight:500}.item{padding:15px 0}details summary{font-size:13px;color:#415f77;cursor:pointer;padding:8px 0;line-height:1.6}footer{font-size:9px;letter-spacing:1.1px;color:#8595a4;padding:12px 20px 28px}.login{background:#112e45;border-color:#ffffff1a;padding:36px 28px;border-radius:20px}.login h1{letter-spacing:-.4px;font-size:26px;font-weight:600}.login p{font-size:13px;line-height:1.7}.login label{color:#cfdfed}.login input{font-size:16px;font-weight:400}.lock{background:#0a2032}.login .lockicon{box-shadow:0 10px 24px #06121d35}.actions{gap:9px}.actions button{min-height:46px}.field-description{font-size:12px;line-height:1.6}.site-selection-table{font-size:12px}.site-selection-table th{background:#eaf0f6;font-size:11px;font-weight:600;color:#38536b}.site-selection-table th,.site-selection-table td{padding:12px 10px}.match-row{font-size:12px;border-radius:8px}#exportStatus{font-size:12px;line-height:1.6}#configBody .row{align-items:flex-start}#configBody a{color:#1765b0;font-weight:500;text-decoration:none}#configBody a:hover{text-decoration:underline}@media(max-width:430px){main{padding:20px 13px calc(70px + env(safe-area-inset-bottom))}.card{padding:18px;border-radius:15px}.welcome h1{font-size:25px}.welcome p{font-size:12px}.tile{padding:14px;min-height:88px}.grid{gap:12px}.time-panel{padding:15px}.work-date input{font-size:22px}.time-pair{gap:12px}.time-pair input{font-size:19px;padding:12px 6px}.bulk-box,.allowance-panel{padding:15px}.card h2{font-size:18px}.module-button{gap:10px}.module-icon{width:30px;height:30px}.module-button>span:last-child{font-size:12px}.module-button small{font-size:9px}.grid button[data-go]{padding:14px}}@media(min-width:1000px){#app main{margin-left:255px;margin-right:20px}nav{top:calc(64px + env(safe-area-inset-top))}nav button{padding:15px 16px}}
.draft-actions{display:flex;gap:9px;margin-top:12px}.draft-actions button{flex:1;min-height:44px;font-size:12px}@media print{.draft-actions{display:none!important}}
/* Google Routing */
#googleRoutingPanel select{max-width:100%;}#routingRows .item{padding:16px;background:#f7f9fc;border:1px solid #dce4ed;border-radius:12px;margin:12px 0}.route-table{overflow:auto}.route-table table{width:100%;border-collapse:collapse;font-size:13px}.route-table th,.route-table td{padding:10px;border-bottom:1px solid #dce4ed;text-align:left}.route-result{background:#f5f8fc;border:1px solid #dce4ed;border-radius:14px;padding:18px;margin:18px 0}.google-attribution{display:block;white-space:nowrap;font:400 14px Inter,sans-serif;color:#5e5e5e;letter-spacing:normal;margin:12px 0}#googleRoutingPanel .check{align-items:center}#googleRoutingPanel .check input{width:auto;}#routingStatus{overflow-wrap:anywhere;}

.guide-note{background:#eef4fa;border-left:3px solid #1763a9;padding:14px 16px;border-radius:6px;line-height:1.65}.guide-card summary{font-weight:600;font-size:17px;color:#123c5a;cursor:pointer}.guide-card table{width:100%;border-collapse:collapse}.guide-card th,.guide-card td{padding:10px;text-align:left;border-bottom:1px solid #dce4ed}.guide-card .result{font-weight:400;line-height:1.75}.offline-ready{color:#16634d!important}#offlineState,#offlineLockState{font-size:12px;letter-spacing:normal}#checkOffline{font-size:12px;padding:6px 10px;min-height:30px;margin-top:8px}#lodgingSection{scroll-margin-top:88px;}

/* Travel workspace */
.eyebrow{font-size:10px;letter-spacing:.12em;color:#64798c;font-weight:600}.journey-flow{display:flex;gap:8px;margin:22px 0}.journey-flow span{flex:1;background:#edf3f9;border-radius:8px;padding:12px 8px;font-size:12px;font-weight:600;text-align:center;color:#33556f}.journey-flow .selected{background:#1762a8;color:white}.journey-summary{background:#f2f7fc;border:1px solid #dbe6f1;border-radius:10px;padding:16px;display:flex;flex-wrap:wrap;gap:10px 18px;margin:18px 0;font-size:13px}.journey-summary strong{color:#1762a8}.journey-map{height:340px;border-radius:12px;margin:16px 0;z-index:0}.advanced-route{margin:20px 0}.journey-card>details{padding:12px 0;border-bottom:1px solid #e4eaf0}.journey-card summary{cursor:pointer;font-weight:600}.journey-card #calculateGoogleRoute{width:100%;margin-top:12px}.leaflet-container{font-family:Inter,system-ui,sans-serif} 

.master-progress{border:1px solid #dbe7f1;background:#f3f7fb;border-radius:10px;padding:16px;margin:18px 0}.master-progress progress{width:100%;height:6px;margin:14px 0;accent-color:#1762a8}.import-spinner{display:inline-block;width:17px;height:17px;border:2px solid #c6d7e8;border-top-color:#1762a8;border-radius:50%;animation:import-spin .8s linear infinite;flex-shrink:0}.import-spinner[hidden]{display:none}@keyframes import-spin{to{transform:rotate(360deg)}}.import-stages{display:flex;gap:6px;font-size:11px;margin-top:12px;color:#72899a}.import-stages span{flex:1}.import-stages .active{color:#1762a8;font-weight:700}.import-stages .done{color:#167b65}.master-progress.complete{background:#eef8f4;border-color:#c8e4d9}.master-progress.failed{background:#fff5ef;border-color:#f1d8c7}.master-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.master-counts div{background:#f3f7fb;padding:12px 8px;border-radius:8px}.master-counts strong{display:block;font-size:21px;color:#173b58}.master-counts span{font-size:11px;color:#60768a}.master-dates{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:14px 0}.master-dates dt{font-size:11px;color:#60768a;margin-bottom:5px}.master-dates dd{margin:0;font-size:13px;font-weight:600}.master-file-name{overflow-wrap:anywhere}.master-status-item+.master-status-item{border-top:1px solid #e0e8ef;margin-top:20px;padding-top:12px}

#convertedDownloadDialog{width:min(440px,calc(100% - 32px));border:1px solid #dbe7f1;border-radius:16px;padding:24px;color:#173b58;box-shadow:0 20px 70px #061b3260}#convertedDownloadDialog::backdrop{background:#061b3280}#convertedDownloadDialog h2{margin-top:0}#convertedDownloadDialog .actions button{min-width:120px}.import-history-entry{border-top:1px solid #e0e8ef;padding:14px 0}.import-history-entry summary{overflow-wrap:anywhere}
/* Compact lifecycle labels: text carries meaning as well as colour. */
.workflow-badge{display:inline-flex;align-items:center;gap:6px;border-radius:5px;padding:4px 8px;font-size:11px;font-weight:600;line-height:1.45;max-width:100%;vertical-align:middle;margin:4px 4px 7px 0;letter-spacing:.05px}
.workflow-badge::before{content:'';width:5px;height:5px;background:currentColor;border-radius:50%;flex:none}
.workflow-badge.amber{background:#fff0d3;color:#885200}.workflow-badge.blue{background:#e6f0fb;color:#195c9a}.workflow-badge.green{background:#e2f3eb;color:#17664c}.workflow-badge.neutral{background:#edf1f5;color:#546576}
.workflow-scopes{padding:0 0 20px;border-bottom:1px solid #dce5ed;margin-bottom:20px}.workflow-scopes .choices{display:flex;flex-wrap:wrap}.workflow-scopes .choices button{font-size:13px;white-space:normal;max-width:100%;text-align:left}
.workflow-scope{border-top:1px solid #dce5ed;margin:20px 0;padding-top:18px}.workflow-days{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:6px}.workflow-days .check{margin:0;font-size:13px;padding:9px;background:#f2f6fa;border-radius:6px}
.workflow-link,.workflow-status{padding:14px 0;border-top:1px solid #dce5ed}.workflow-message{color:#17664c;font-size:13px}.workflow-scope select{width:100%}.workflow-status .actions{margin-top:8px}
@media(prefers-color-scheme:dark){.workflow-badge.amber{background:#44351c;color:#ffd18a}.workflow-badge.blue{background:#1a3a55;color:#a1cdf9}.workflow-badge.green{background:#163e33;color:#9cdfc0}.workflow-badge.neutral{background:#243745;color:#c0cfda}.workflow-message{color:#9cdfc0}.workflow-scopes,.workflow-scope,.workflow-link,.workflow-status{border-color:#345065}}

/* V5.0.1: day choices stay consistent with the light corporate form in either device appearance. */
.workflow-days .check{background:#f2f6fa;color:#19364e;border:1px solid #d4e0ea;font-size:14px;font-weight:600;line-height:1.5;padding:12px 10px;min-height:48px;opacity:1}
.workflow-days .check:has(input:checked){background:#e3effb;color:#123b59;border-color:#538dbb}
.workflow-days .check input{accent-color:#1765b0;width:19px;height:19px;min-height:19px;flex:0 0 19px}
#app input,#app select{font-weight:500}#app textarea{font-size:16px;font-weight:400;line-height:1.7}
#app label{color:#344f66}#app .muted,#app .field-description{color:#52677b}#planningWorkAreas{min-height:130px}
.area-picker{margin:18px 0;padding:16px;background:#f6f9fc;border:1px solid #d8e3ec;border-radius:10px}.area-picker h3 span{display:block;font-size:12px}.area-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px}.area-options .check{margin:0;padding:10px;color:#19364e;font-weight:500}.bulk-candidate{align-items:flex-start}.bulk-candidate span{min-width:0;overflow-wrap:anywhere}.bulk-candidate small{display:block;margin-top:5px}.overview-link{text-align:left;width:100%;cursor:pointer}.overview-link:focus-visible{outline:3px solid #1765b0}.history-details{display:grid;grid-template-columns:minmax(100px,1fr) 2fr;gap:10px;font-size:13px}.history-details dt{font-weight:600;color:#435b70}.history-details dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.history-scope{border-top:1px solid #dce5ed;padding:15px 0}#bottomNav{position:fixed;bottom:0;left:0;right:0;z-index:15;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#fff;border-top:1px solid #d5e1eb;padding:7px 6px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -3px 15px #14344d0a}#bottomNav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:transparent;color:#52677b;font-size:11px;font-weight:600;padding:4px;min-height:48px;border-radius:8px}#bottomNav button[aria-current]{background:#e8f1fb;color:#175f9f}#bottomNav .module-icon{width:25px;height:25px;background:transparent}#bottomNav svg{width:20px;height:20px}#app main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}#app footer{padding-bottom:calc(100px + env(safe-area-inset-bottom))}@media(min-width:1000px){#bottomNav{left:235px}}@media print{#bottomNav,.overview-link{display:none!important}}@media(max-width:380px){.history-details{grid-template-columns:1fr}.history-details dd{margin-bottom:10px}}
.site-identity{border:1px solid #dce6ef;border-radius:9px;padding:13px;margin:10px 0;background:#f8fafc;overflow-wrap:anywhere}.site-identity>strong{font-size:14px;color:#173b57}.site-identity>p{font-size:13px;margin:5px 0 12px}.site-identity dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:0}.site-identity dt{font-size:11px;color:#52677b;font-weight:600}.site-identity dd{margin:4px 0 0;font-size:13px;font-weight:500;color:#19364e}

/* Search proposals and committed site list are deliberately separate. */
.site-picker textarea{min-height:110px}.site-picker .actions{margin:14px 0}.site-picker #bulkResults:empty{display:none}.site-picker #bulkResults{margin:16px 0;max-height:440px;overflow:auto;overscroll-behavior:contain;border-radius:8px}.search-results-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;background:#eaf1f7}.site-picker .bulk-candidate{padding:14px 10px;margin:0;border-bottom:1px solid #e0e8ef;background:#fff;color:#19364e}.site-picker .bulk-candidate strong{font-size:14px;line-height:1.5}.site-picker .bulk-candidate small{font-size:12px;font-weight:400;line-height:1.7;color:#465d72}.site-picker #bulkResults>.actions{padding:8px;position:sticky;bottom:0;background:#f7f9fc;border-top:1px solid #d7e3ed}.site-picker #savedSiteList{padding-top:12px;border-top:1px solid #d5e1ec}.picked-site{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px 0;border-top:1px solid #e0e8ef}.picked-site>div{min-width:0;overflow-wrap:anywhere}.picked-site strong{display:block;font-size:14px;color:#18394f;line-height:1.5}.picked-site p{font-size:12px;line-height:1.8;color:#465d72;margin:6px 0 0}.picked-site button{font-size:12px;min-height:40px;padding:8px 10px;flex-shrink:0}.site-picker #manualSiteEntry{margin-top:16px;border-top:1px solid #d5e1ec;padding-top:16px}.site-identity dl{margin-top:12px}.site-picker .section-head h3{font-size:16px}@media(max-width:360px){.site-picker{padding:12px}.site-picker .actions{grid-template-columns:1fr}.search-results-head{align-items:flex-start;flex-direction:column}.picked-site{gap:8px}.picked-site button{padding:8px}}
/* Keep the navigation in an app-shell row. Only the work pane scrolls. */
html{height:100%;overscroll-behavior:none}body.workspace-open{position:fixed;inset:0;height:100%;overflow:hidden;overscroll-behavior:none}#app{position:fixed;inset:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;height:100%;overflow:hidden}#app>header{position:relative;top:auto;grid-row:1;min-height:calc(64px + env(safe-area-inset-top));height:calc(64px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 18px 0;z-index:10}#app>main{grid-row:2;min-height:0;height:100%;width:100%;max-width:1100px;margin:0 auto;padding-bottom:28px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scroll-padding-top:12px}#app>footer{display:none}#app>#bottomNav{grid-row:3;position:relative;inset:auto;left:auto;right:auto;bottom:auto;width:100%;margin:0;transform:none;transition:none;flex-shrink:0;padding:7px 6px calc(7px + env(safe-area-inset-bottom));z-index:25}#app .steps{top:0}#app>nav{top:calc(64px + env(safe-area-inset-top));bottom:calc(65px + env(safe-area-inset-bottom));z-index:30}#actualAreaPicker .area-picker{margin-top:18px}.template-library .section-head{gap:12px;flex-wrap:wrap}.template-options{display:grid;gap:14px;margin:16px 0}.template-option{border:1px solid #d5e1ec;padding:18px;border-radius:12px;background:#f7fafe}.template-option .section-head{align-items:flex-start}.template-option p{font-size:13px;line-height:1.8;color:#435d73}.template-option button{width:100%}.template-preview{margin:16px 0;font-size:15px;line-height:1.85;user-select:text}.guide-instructions{margin:22px 0;border-top:1px solid #dbe5ef;padding-top:18px;font-size:13px;line-height:1.8}.guide-instructions summary{cursor:pointer;font-weight:600}.template-library button{min-height:44px}#guideMessage:empty{display:none}@media(min-width:1000px){#app>main{width:calc(100% - 255px);max-width:none;margin:0 0 0 255px;padding-right:24px}#app>#bottomNav{width:calc(100% - 235px);margin-left:235px}.template-options{grid-template-columns:repeat(3,minmax(0,1fr))}}@media print{html,body.workspace-open{height:auto;position:static;overflow:visible}#app{position:static;display:block;height:auto;overflow:visible}#app>main{overflow:visible;height:auto;width:100%;margin:0}#app>#bottomNav{display:none!important}}

.template-preview,.template-option{overflow-wrap:anywhere}.template-option .section-head strong{font-size:14px;line-height:1.6}.template-library select{font-size:14px}
.diagnostic-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.diagnostic-steps button{min-width:0;min-height:60px;font-size:11px;padding:8px 4px}.diagnostic-steps button span{display:block;background:transparent;padding:0 0 5px;font-size:12px}.diagnostic-section{margin:20px 0;padding:18px 0;border-top:1px solid #d8e3ed}.diagnostic-guidance{margin:20px 0;padding:18px;border:1px solid #bbd5e9;border-left:4px solid #1765a2;border-radius:10px;background:#f3f8fc}.diagnostic-guidance h3{font-size:17px}.diagnostic-guidance p,.diagnostic-guidance li{font-size:13px;line-height:1.8}.diagnostic-guidance ol{padding-left:20px}.diagnostic-conclusion{background:#f1f7f4;border:1px solid #c7ddd0;border-radius:10px;padding:16px;margin:18px 0}.diagnostic-conclusion dt{font-size:12px;font-weight:700;color:#285a46}.diagnostic-conclusion dd{margin:6px 0 16px;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.diagnostic-checks label{font-size:12px}.diagnostic-checks select{font-size:14px}.diagnostic-guidance .actions{display:flex;flex-direction:column}.diagnostic-guidance .actions button{text-align:left;font-size:12px}.diagnostic-section textarea[readonly]{background:#f4f7fa;color:#254159}@media(min-width:900px){.diagnostic-steps{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(max-width:380px){.diagnostic-checks{grid-template-columns:1fr}.diagnostic-guidance{padding:14px}}

/* Dedicated Breakdown workspace: one purpose per stage. */
.guided-workspace{color:#19344a}.guided-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.guided-heading .eyebrow{display:block;font-size:10px;font-weight:700;letter-spacing:1.4px;color:#54718a;margin-bottom:8px}.guided-heading h2{font-size:23px;margin:0;letter-spacing:-.55px}.guided-heading>.workflow-badge{flex-shrink:0}.guided-progress{display:flex;align-items:center;justify-content:space-between;margin-top:12px;color:#50677b;font-size:12px}.text-action{background:transparent;color:#1763a5;padding:8px 4px;border:0;min-height:40px;font-size:12px;font-weight:600}.text-action:hover{color:#103a5b;background:#edf4fa}.guided-workspace .diagnostic-steps{margin:4px 0 0;padding:10px 0 12px;gap:6px;border-bottom:1px solid #dbe5ec}.guided-workspace .diagnostic-steps button{background:#f3f6fa;border:1px solid #e0e7ee;font-weight:600;font-size:11px;line-height:1.3;min-height:55px;color:#4d6478}.guided-workspace .diagnostic-steps button span{font-size:11px;padding:0 0 4px}.guided-workspace .diagnostic-steps button.on{background:#1764a8;border-color:#1764a8;color:white}.guided-step-title{display:flex;gap:12px;align-items:flex-start;margin:22px 0 18px}.guided-step-title>span{font-size:12px;font-weight:700;color:#1764a8;background:#eaf2fa;padding:8px;border-radius:8px;flex:none}.guided-step-title h3{font-size:17px;line-height:1.4;margin:0 0 6px}.guided-step-title p{color:#51697d;font-size:12px;line-height:1.7;margin:0}.compact-scope{padding:12px 0 16px;border-bottom:1px solid #dbe5ec;margin-bottom:20px}.compact-scope strong{display:block;font-size:13px;line-height:1.6;margin-top:4px;overflow-wrap:anywhere}.compact-scope .section-head{gap:14px;align-items:flex-start}.compact-scope .section-head>div{min-width:0}.compact-scope .outline{flex:none;font-size:12px;padding:8px 10px;min-height:40px}.compact-scope .choices{margin-top:12px}.compact-scope .choices button{font-size:11px;text-align:left}.guided-section,.guided-workspace .diagnostic-section{border-top:1px solid #dbe5ec;margin:22px 0 0;padding:20px 0 0}.guided-section h3,.guided-workspace .diagnostic-section h3,.action-entry h3,.recorded-sequence h3{font-size:15px;margin:0 0 14px}.guided-workspace label{color:#304d64;font-size:12px;font-weight:600;line-height:1.6;margin:16px 0 6px}.guided-workspace input,.guided-workspace select,.guided-workspace textarea{font-size:14px;font-weight:400;margin-top:6px;color:#19344a;background:#fff}.guided-workspace textarea{min-height:105px}.guided-workspace p{overflow-wrap:anywhere}.guided-workspace .tiny{line-height:1.75}.guided-extra{margin:18px 0;padding:14px 0;border-top:1px solid #dce5ed;border-bottom:1px solid #dce5ed}.guided-extra summary{font-size:12px;font-weight:600;color:#34536b;cursor:pointer;line-height:1.6}.guided-extra[open]>summary{margin-bottom:14px}.guided-extra .area-picker{border:0;padding:0;background:transparent}.guided-page-actions{margin-top:26px;padding-top:18px;border-top:1px solid #dbe5ec}.guided-page-actions .actions{margin:0;padding:0}.guided-page-actions .draft-actions{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:10px}.guided-page-actions .outline,.guided-page-actions .primary,.guided-page-actions .good{font-size:13px;min-height:46px}.guided-page-actions>p{font-size:11px}.guided-workspace .primary{background:#1764a8}.guided-workspace .good{background:#146b50}.action-record{border:1px solid #d9e4ed;border-radius:10px;padding:14px;margin:12px 0;background:#fff}.action-record-title{display:flex;align-items:flex-start;gap:9px}.action-record-title strong{font-size:13px;line-height:1.6;flex:1}.action-record-title .workflow-badge{margin:0;font-size:10px}.sequence-number{display:grid;place-items:center;border-radius:50%;width:24px;height:24px;flex:none;font-size:11px;font-weight:700;background:#eaf2fa;color:#1764a8}.action-record>p{font-size:12px;line-height:1.75;color:#496176;margin:10px 0 0}.action-record-tools{display:flex;gap:15px;margin-top:8px;flex-wrap:wrap}.action-record-tools button{font-size:11px;min-height:35px}.action-entry{margin:24px 0;padding:18px;border:1px solid #d7e3ec;background:#f7fafd;border-radius:10px}.action-entry button{width:100%;margin-top:14px}.empty-state{padding:18px;background:#f7f9fc;border:1px dashed #c7d7e4;border-radius:10px;font-size:12px;line-height:1.8;color:#526a7d}.workflow-badge.red{background:#fce9e9;color:#a93434}.diagnostic-history-section{padding:16px 0;border-top:1px solid #dbe5ec}.diagnostic-history-section h4{font-size:13px;color:#1764a8;margin:0 0 14px}.guided-workspace .diagnostic-conclusion h3{font-size:13px}.guided-workspace .diagnostic-conclusion p{font-size:12px;line-height:1.8;color:#285a46}.guided-workspace .diagnostic-guidance{padding:14px;background:#f3f8fc}.guided-workspace .diagnostic-guidance h3{font-size:15px}.guided-workspace .diagnostic-guidance p,.guided-workspace .diagnostic-guidance li{font-size:12px}.guided-workspace .check{font-size:13px;font-weight:500}.guided-workspace .check input{margin:0}.guided-workspace .result{line-height:1.9;font-size:14px;color:#213f55}
@media(max-width:380px){.guided-heading h2{font-size:20px}.guided-workspace{padding:15px}.guided-step-title h3{font-size:16px}.action-entry .grid{grid-template-columns:1fr}.action-record-title{flex-wrap:wrap}.action-record-title strong{min-width:120px}.guided-page-actions .draft-actions>.outline{max-width:65%}}

/* A single active question replaces the six manual Breakdown forms. */
.assistant-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;border-bottom:1px solid #dce5ed;padding-bottom:14px}.assistant-stages button{background:#f3f6fa;border:1px solid #dce5ed;color:#4c657a;min-height:56px;font-size:12px;font-weight:600}.assistant-stages button span{display:block;padding:0 0 5px;background:transparent;font-size:11px}.assistant-stages button.on{background:#1764a8;color:#fff;border-color:#1764a8}.assistant-flow{margin-top:4px}.assistant-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#556e82}.assistant-question{padding:22px 18px;border:1px solid #cddfea;border-radius:12px;background:#f7fafd;margin:12px 0 22px}.assistant-question h3{font-size:19px!important;line-height:1.5;margin:0 0 12px}.assistant-question>p{font-size:13px;line-height:1.8;color:#4a6378;margin:0 0 20px}.assistant-answers{display:grid;gap:10px}.assistant-answers button{min-height:50px;text-align:left;padding:13px 16px;font-size:14px;font-weight:600;background:white;border-color:#c6d9e9}.assistant-answers button:hover{border-color:#1764a8;background:#edf5fc}.assistant-results{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.assistant-results button{min-height:52px;font-size:12px;line-height:1.6}.assistant-recommendation{background:#e9f2fa;border:1px solid #c9dff0;border-left:4px solid #1764a8;padding:16px;border-radius:8px;margin:18px 0}.assistant-recommendation small{font-size:10px;font-weight:700;letter-spacing:1px;color:#466c8b;display:block;margin-bottom:9px}.assistant-recommendation strong{font-size:18px;line-height:1.5;display:block;color:#164c76}.assistant-question>.primary{width:100%;min-height:48px;font-size:13px}.assistant-question>.text-action{display:block;width:100%;margin-top:10px}.assistant-question .guided-extra{border-color:#d4e1eb;margin-bottom:4px}.assistant-summary{background:white;border:1px solid #d9e5ec;border-radius:9px;padding:16px;margin:16px 0 20px}.assistant-summary strong{font-size:13px}.assistant-summary p{font-size:13px;line-height:1.9;color:#39596f}.assistant-log-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #e0e8ef}.assistant-log-row>div{min-width:0}.assistant-log-row strong{font-size:12px;line-height:1.7;display:block}.assistant-log-row p{font-size:12px;color:#506b80;line-height:1.7;margin:4px 0 0}.assistant-log-row button{flex:none;font-size:11px}.assistant-log .text-action{min-height:36px}.assistant-cause-hint{background:#eef4fa;padding:12px;border-radius:8px;font-size:12px;line-height:1.8;color:#415e75}@media(max-width:360px){.assistant-question{padding:17px 13px}.assistant-question h3{font-size:17px!important}.assistant-caption{align-items:flex-start;flex-direction:column}.assistant-results{grid-template-columns:1fr}}

/* Work context, readable multi-symptom input and one consolidated history. */
.record-source{font-size:11px;line-height:1.8;color:#315d7f;background:#eef5fb;border-left:3px solid #1764a8;border-radius:6px;padding:10px 12px;margin:12px 0}.history-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:20px 0}.history-filters button{background:#f3f6fa;border:1px solid #d9e4ed;font-size:12px;color:#3a5870;min-height:56px;padding:9px}.history-filters button span{display:block;font-size:11px;margin-top:4px;font-weight:500}.history-filters button.selected{background:#1764a8;color:#fff;border-color:#1764a8}.history-date-filter{font-size:12px;color:#456378;margin:14px 0 22px}.history-date-filter summary{cursor:pointer;padding:8px 0}.history-entry{border-top:1px solid #dbe5ee;padding:20px 0}.history-entry h3{font-size:15px;line-height:1.7;overflow-wrap:anywhere;margin:10px 0}.history-entry .section-head{align-items:flex-start;gap:8px}.history-entry .section-head .workflow-badge{margin:0}.history-entry>.outline{font-size:12px;min-height:42px}.history-entry .actions{padding-top:0;margin-top:10px}.history-entry .actions button{font-size:12px}.history-preview>.eyebrow{font-size:10px;letter-spacing:1px;color:#4b6981;margin-top:24px}.history-preview h2{line-height:1.65;overflow-wrap:anywhere}.assistant-symptoms{display:grid;gap:7px;margin:18px 0}.assistant-symptoms .check{background:white;border:1px solid #d1dfeb;border-radius:9px;padding:12px;margin:0;min-height:48px;font-size:13px;line-height:1.6}.assistant-symptoms input{margin:0;min-height:0}.assistant-symptoms .check:has(input:checked){background:#e8f2fc;border-color:#1764a8;color:#164d7a}.assistant-symptoms+.primary{margin-top:8px}.assistant-question #assistantSelectionHint{margin:10px 0 0}.guided-workspace .assistant-stages{scroll-margin-top:0;box-shadow:0 -12px 0 white}.assistant-question{scroll-margin-top:100px}input[type=date],input[type=time]{min-width:0;max-width:100%;box-sizing:border-box}input::-webkit-date-and-time-value{min-width:0;text-align:left}.compact-scope .choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}.compact-scope .choices button{line-height:1.6;overflow-wrap:anywhere;min-height:42px}
.guided-workspace .assistant-stages{box-shadow:0 -36px 0 #fff}

/* ===== V5.7 UI layer: BM/EN toggle, toast, bottom sheet ===== */
.lang-seg{display:inline-flex;background:#ffffff14;border:1px solid #ffffff2e;border-radius:10px;padding:2px;height:36px;margin-left:auto;margin-right:8px;flex:none}
.lang-seg button{width:auto!important;height:30px!important;min-width:32px;padding:0 8px!important;margin:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#e5eef7!important;font-size:.72rem!important;font-weight:800!important;letter-spacing:.04em;display:block!important}
.lang-seg button.on{background:#fff!important;color:#102c43!important}
.ano-toasts{position:fixed;left:0;right:0;bottom:calc(84px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;align-items:center;gap:8px;z-index:400;pointer-events:none;padding:0 14px}
.ano-toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;max-width:460px;width:100%;background:#0f2638;color:#fff;padding:12px 14px;border-radius:12px;font-size:.86rem;font-weight:600;line-height:1.4;box-shadow:0 10px 30px rgba(0,0,0,.28);border-left:4px solid #3ecf9b;animation:uIn .22s ease both}
.ano-toast.error{border-left-color:#ff6b6b}.ano-toast.info{border-left-color:#5aa9ff}
.ano-toast .ico{width:20px;height:20px;flex:none;margin-top:1px;fill:none;stroke:#3ecf9b;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.ano-toast.error .ico{stroke:#ff8a8a}.ano-toast.info .ico{stroke:#7db9ff}
.ano-toast.out{opacity:0;transform:translateY(8px);transition:.2s}
@keyframes uIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
html.sheet-open{overflow:hidden}
.ano-sheet-back{position:fixed;inset:0;background:rgba(8,20,34,.5);z-index:500;display:flex;align-items:flex-end;justify-content:center;opacity:0;transition:opacity .2s}
.ano-sheet-back.in{opacity:1}.ano-sheet-back.out{opacity:0}
.ano-sheet{width:100%;max-width:560px;max-height:86vh;overflow:auto;background:var(--surface,#fff);color:var(--ink,#142b40);border-radius:20px 20px 0 0;padding:8px 18px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 40px rgba(0,0,0,.3);transform:translateY(30px);transition:transform .22s ease}
.ano-sheet.in{transform:none}.ano-sheet.out{transform:translateY(30px)}
.ano-sheet-grab{width:42px;height:4px;border-radius:4px;background:var(--line,#dce4eb);margin:2px auto 8px}
.ano-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.ano-sheet-head h3{margin:0;font-size:1rem;line-height:1.35;overflow-wrap:anywhere}
.ano-icon-btn{display:inline-grid!important;place-items:center;width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;border-radius:10px!important;background:#f1f4f7!important;color:var(--ink,#142b40)!important;border:1px solid var(--line,#dce4eb)!important}
.ano-icon-btn .ico{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ano-sheet-sub,.ano-sheet-msg{font-size:.9rem;line-height:1.55;color:var(--muted,#687b8d);margin:4px 0 14px}.ano-sheet-msg{color:var(--ink,#142b40)}
.ano-sheet-actions{display:flex;gap:10px;margin-top:12px}
.ano-sheet-actions button{flex:1;margin:0!important;min-height:46px}
.ano-sheet .secondary{background:#eef2f6;color:#18344d;border:1px solid var(--line,#dce4eb)}
.ano-sheet .danger{background:#c0392b;color:#fff}
.ano-sheet textarea,.ano-sheet input{width:100%;box-sizing:border-box;margin:0 0 4px}
@media(max-width:380px){header strong{font-size:.95rem;letter-spacing:.3px}}
header strong{margin:0 auto 0 12px;white-space:nowrap}
.lang-seg{margin-left:0}

/* ===== V5.8.0 professional layer ===== */
.theme-btn{margin:0 0 0 8px}
.pro-actions{display:grid;gap:10px}
.pro-cta{display:flex!important;align-items:center;gap:14px;width:100%;margin:0!important;padding:16px 18px!important;border-radius:14px!important;text-align:left;background:linear-gradient(120deg,#1765b0,#0f4f94)!important;color:#fff!important;box-shadow:0 6px 18px rgba(23,101,176,.28)}
.pro-cta .ico{width:26px;height:26px;flex:0 0 auto;stroke:#fff}
.pro-cta span{display:grid;gap:2px;font-size:1.05rem;font-weight:750}
.pro-cta small{font-weight:500;opacity:.85;font-size:.82rem}
.pro-sec{width:100%;margin:0!important}
.pro-alert{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #f0cf8a;background:#fff8e6;border-radius:12px;color:#5c3d00}
.pro-alert strong{display:block;font-size:.95rem}.pro-alert small{color:#7a5a12}
.pro-alert button{margin:0;flex:0 0 auto;background:#b86e00}
.pro-empty{padding:6px 0 2px}.pro-empty p{margin:4px 0 0;color:var(--muted,#687b8d)}
.pro-recent{display:grid;gap:8px;margin-top:10px}
.pro-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0!important;padding:12px 14px!important;text-align:left;background:var(--surface,#fff)!important;color:var(--ink,#142b40)!important;border:1px solid var(--line,#dce4eb)!important;border-radius:12px}
.pro-row span{display:grid;gap:2px;min-width:0}.pro-row strong{font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pro-row small{color:var(--muted,#687b8d);font-weight:500}.pro-row b{white-space:nowrap;font-size:.9rem;color:var(--blue,#1765b0)}
.pro-chips{display:flex;gap:8px;margin:0 0 10px;flex-wrap:wrap}
.pro-chip{margin:0!important;padding:8px 14px!important;border-radius:999px!important;background:var(--surface,#fff)!important;color:var(--blue,#1765b0)!important;border:1px solid var(--line,#dce4eb)!important;font-size:.85rem}
.pro-chip.on{background:var(--blue,#1765b0)!important;color:#fff!important;border-color:var(--blue,#1765b0)!important}
.pro-when{margin:8px 0 0;padding:9px 12px;border-radius:10px;background:rgba(23,101,176,.08);color:var(--ink,#142b40);font-weight:600;font-size:.9rem}
.pro-bar{position:fixed;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));z-index:30;display:flex;align-items:center;gap:10px;padding:9px 16px;background:#0f2a43;color:#fff;box-shadow:0 -4px 14px rgba(8,38,60,.22);font-size:.85rem}
.pro-bar-main b{font-size:1rem}.pro-bar small{opacity:.8}
.pro-bar-sub{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.9}
.pro-bar-state{padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.16);font-weight:650;font-size:.78rem}
body:has(.pro-bar) main{padding-bottom:56px}
.history-filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.history-filters::-webkit-scrollbar{display:none}
.history-filters button{flex:0 0 auto;width:auto!important;min-width:92px;display:flex!important;flex-direction:row!important;align-items:center;gap:8px;padding:8px 14px!important;white-space:nowrap}
.history-filters button *{display:inline!important}
header .theme-btn{width:40px!important;height:40px!important;min-width:40px!important;padding:10px!important;background:#ffffff0f!important;color:#e5eef7!important;border:0!important;border-radius:10px!important;margin:0 8px 0 0!important}
header .theme-btn svg{width:20px;height:20px}
.pro-cta small{color:#dbe9fb!important;opacity:1!important}
.pro-cta span{color:#fff}
.pro-sec{background:var(--surface,#fff)!important;color:var(--blue,#1765b0)!important;border:1px solid var(--line,#dce4eb)!important;padding:12px 14px!important;border-radius:12px!important}
.pro-alert button{color:#fff!important}

/* ===== V5.8.0 dark theme (manual toggle + system preference) ===== */
html[data-theme="dark"]{--ink:#e8f1f9;--muted:#9db2c6;--navy:#0b1a2a;--blue:#5aa2f0;--line:#2c455f;--surface:#14283b;--canvas:#0a1421;color-scheme:dark;background:#0a1421;color:#e8f1f9}
html[data-theme="dark"] body{background:#0a1421;color:#e8f1f9}
html[data-theme="dark"] header{background:linear-gradient(110deg,#040f1b,#0c2c46)}
html[data-theme="dark"] .card,html[data-theme="dark"] .tile,html[data-theme="dark"] .module-button,html[data-theme="dark"] .workflow-scope,html[data-theme="dark"] .template-option,html[data-theme="dark"] .template-preview,html[data-theme="dark"] .catalog-entry,html[data-theme="dark"] .bulk-box,html[data-theme="dark"] .guide-note,html[data-theme="dark"] .area-picker,html[data-theme="dark"] .site-picker textarea,html[data-theme="dark"] .guided-workspace,html[data-theme="dark"] .time-panel,html[data-theme="dark"] .history-date-filter,html[data-theme="dark"] details{background:#14283b!important;color:#e8f1f9!important;border-color:#2c455f!important}
html[data-theme="dark"] p,html[data-theme="dark"] small,html[data-theme="dark"] .muted,html[data-theme="dark"] .tiny,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .welcome small,html[data-theme="dark"] .welcome p,html[data-theme="dark"] .dashboard-date,html[data-theme="dark"] .tile span,html[data-theme="dark"] .module-button small,html[data-theme="dark"] .pro-empty p,html[data-theme="dark"] .pro-row small{color:#9db2c6!important}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] #app input,html[data-theme="dark"] #app select{background:#0c1c2d!important;color:#f2f8ff!important;border-color:#3a5874!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#7f97ad!important}
html[data-theme="dark"] button.outline,html[data-theme="dark"] button.secondary,html[data-theme="dark"] .workflow-link,html[data-theme="dark"] .workflow-status{background:#1a3350!important;color:#d6e6f6!important;border-color:#2f4d6b!important}
html[data-theme="dark"] nav,html[data-theme="dark"] #bottomNav{background:#0f2236!important;border-color:#2c455f!important}
html[data-theme="dark"] #bottomNav button{background:transparent!important;color:#b2c6da!important}
html[data-theme="dark"] #bottomNav button[aria-current]{background:#1d4468!important;color:#fff!important}
html[data-theme="dark"] .pro-row,html[data-theme="dark"] .pro-chip{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html[data-theme="dark"] .pro-row b,html[data-theme="dark"] .pro-chip:not(.on){color:#8cc0ff!important}
html[data-theme="dark"] .pro-chip.on{background:#2b6cb0!important;color:#fff!important}
html[data-theme="dark"] .pro-when{background:rgba(90,162,240,.14);color:#e8f1f9}
html[data-theme="dark"] .pro-alert{background:#3a2c0e;border-color:#6b5217;color:#ffe6b0}
html[data-theme="dark"] .pro-alert small,html[data-theme="dark"] .pro-alert strong{color:#f1d99b!important}
html[data-theme="dark"] .pro-cta{background:linear-gradient(120deg,#2b6cb0,#1d4f88)!important}
html[data-theme="dark"] .pro-cta span,html[data-theme="dark"] .pro-cta small{color:#fff!important}
html[data-theme="dark"] .ano-sheet,html[data-theme="dark"] .ano-toast{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html[data-theme="dark"] .ano-sheet textarea,html[data-theme="dark"] .ano-sheet input{background:#0c1c2d!important;color:#f2f8ff!important}
html[data-theme="dark"] hr,html[data-theme="dark"] .item,html[data-theme="dark"] tr,html[data-theme="dark"] td,html[data-theme="dark"] th{border-color:#2c455f!important}
html[data-theme="dark"] button.primary,html[data-theme="dark"] button.on,html[data-theme="dark"] .stage-tabs button.on,html[data-theme="dark"] [data-stage].on,html[data-theme="dark"] .tabs button.on,html[data-theme="dark"] .selected{background:#2b6cb0!important;color:#fff!important;border-color:#2b6cb0!important}
html[data-theme="dark"] #app label,html[data-theme="dark"] label,html[data-theme="dark"] label *,html[data-theme="dark"] .check,html[data-theme="dark"] .check span,html[data-theme="dark"] .work-date{color:#e8f1f9!important}
html[data-theme="dark"] .record-source{background:#10304a!important;color:#cfe3f7!important;border-left-color:#5aa2f0!important}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] strong,html[data-theme="dark"] b,html[data-theme="dark"] .tile b,html[data-theme="dark"] .card b,html[data-theme="dark"] .pill,html[data-theme="dark"] p.pill,html[data-theme="dark"] .text-action,html[data-theme="dark"] summary{color:#e8f1f9!important}
html[data-theme="dark"] .text-action{color:#8cc0ff!important;background:transparent!important}
html[data-theme="dark"] .pill,html[data-theme="dark"] p.pill{background:#1d3a57!important;color:#cfe3f7!important}
html[data-theme="dark"] .pro-alert button{background:#a85f00!important;color:#fff!important}
html[data-theme="dark"] [data-stage]:not(.on),html[data-theme="dark"] .stage-tabs button:not(.on){background:#14283b!important;color:#c9dcee!important;border-color:#2c455f!important}
@media(prefers-color-scheme:dark){
html:not([data-theme]){--ink:#e8f1f9;--muted:#9db2c6;--navy:#0b1a2a;--blue:#5aa2f0;--line:#2c455f;--surface:#14283b;--canvas:#0a1421;color-scheme:dark;background:#0a1421;color:#e8f1f9}
html:not([data-theme]) body{background:#0a1421;color:#e8f1f9}
html:not([data-theme]) header{background:linear-gradient(110deg,#040f1b,#0c2c46)}
html:not([data-theme]) .card,html:not([data-theme]) .tile,html:not([data-theme]) .module-button,html:not([data-theme]) .workflow-scope,html:not([data-theme]) .template-option,html:not([data-theme]) .template-preview,html:not([data-theme]) .catalog-entry,html:not([data-theme]) .bulk-box,html:not([data-theme]) .guide-note,html:not([data-theme]) .area-picker,html:not([data-theme]) .site-picker textarea,html:not([data-theme]) .guided-workspace,html:not([data-theme]) .time-panel,html:not([data-theme]) .history-date-filter,html:not([data-theme]) details{background:#14283b!important;color:#e8f1f9!important;border-color:#2c455f!important}
html:not([data-theme]) p,html:not([data-theme]) small,html:not([data-theme]) .muted,html:not([data-theme]) .tiny,html:not([data-theme]) .eyebrow,html:not([data-theme]) .welcome small,html:not([data-theme]) .welcome p,html:not([data-theme]) .dashboard-date,html:not([data-theme]) .tile span,html:not([data-theme]) .module-button small,html:not([data-theme]) .pro-empty p,html:not([data-theme]) .pro-row small{color:#9db2c6!important}
html:not([data-theme]) input,html:not([data-theme]) select,html:not([data-theme]) textarea,html:not([data-theme]) #app input,html:not([data-theme]) #app select{background:#0c1c2d!important;color:#f2f8ff!important;border-color:#3a5874!important}
html:not([data-theme]) input::placeholder,html:not([data-theme]) textarea::placeholder{color:#7f97ad!important}
html:not([data-theme]) button.outline,html:not([data-theme]) button.secondary,html:not([data-theme]) .workflow-link,html:not([data-theme]) .workflow-status{background:#1a3350!important;color:#d6e6f6!important;border-color:#2f4d6b!important}
html:not([data-theme]) nav,html:not([data-theme]) #bottomNav{background:#0f2236!important;border-color:#2c455f!important}
html:not([data-theme]) #bottomNav button{background:transparent!important;color:#b2c6da!important}
html:not([data-theme]) #bottomNav button[aria-current]{background:#1d4468!important;color:#fff!important}
html:not([data-theme]) .pro-row,html:not([data-theme]) .pro-chip{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html:not([data-theme]) .pro-row b,html:not([data-theme]) .pro-chip:not(.on){color:#8cc0ff!important}
html:not([data-theme]) .pro-chip.on{background:#2b6cb0!important;color:#fff!important}
html:not([data-theme]) .pro-when{background:rgba(90,162,240,.14);color:#e8f1f9}
html:not([data-theme]) .pro-alert{background:#3a2c0e;border-color:#6b5217;color:#ffe6b0}
html:not([data-theme]) .pro-alert small,html:not([data-theme]) .pro-alert strong{color:#f1d99b!important}
html:not([data-theme]) .pro-cta{background:linear-gradient(120deg,#2b6cb0,#1d4f88)!important}
html:not([data-theme]) .pro-cta span,html:not([data-theme]) .pro-cta small{color:#fff!important}
html:not([data-theme]) .ano-sheet,html:not([data-theme]) .ano-toast{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html:not([data-theme]) .ano-sheet textarea,html:not([data-theme]) .ano-sheet input{background:#0c1c2d!important;color:#f2f8ff!important}
html:not([data-theme]) hr,html:not([data-theme]) .item,html:not([data-theme]) tr,html:not([data-theme]) td,html:not([data-theme]) th{border-color:#2c455f!important}
html:not([data-theme]) button.primary,html:not([data-theme]) button.on,html:not([data-theme]) .stage-tabs button.on,html:not([data-theme]) [data-stage].on,html:not([data-theme]) .tabs button.on,html:not([data-theme]) .selected{background:#2b6cb0!important;color:#fff!important;border-color:#2b6cb0!important}
html:not([data-theme]) #app label,html:not([data-theme]) label,html:not([data-theme]) label *,html:not([data-theme]) .check,html:not([data-theme]) .check span,html:not([data-theme]) .work-date{color:#e8f1f9!important}
html:not([data-theme]) .record-source{background:#10304a!important;color:#cfe3f7!important;border-left-color:#5aa2f0!important}
html:not([data-theme]) h1,html:not([data-theme]) h2,html:not([data-theme]) h3,html:not([data-theme]) h4,html:not([data-theme]) strong,html:not([data-theme]) b,html:not([data-theme]) .tile b,html:not([data-theme]) .card b,html:not([data-theme]) .pill,html:not([data-theme]) p.pill,html:not([data-theme]) .text-action,html:not([data-theme]) summary{color:#e8f1f9!important}
html:not([data-theme]) .text-action{color:#8cc0ff!important;background:transparent!important}
html:not([data-theme]) .pill,html:not([data-theme]) p.pill{background:#1d3a57!important;color:#cfe3f7!important}
html:not([data-theme]) .pro-alert button{background:#a85f00!important;color:#fff!important}
html:not([data-theme]) [data-stage]:not(.on),html:not([data-theme]) .stage-tabs button:not(.on){background:#14283b!important;color:#c9dcee!important;border-color:#2c455f!important}
}

html[data-theme="dark"] .allowance-panel,html[data-theme="dark"] .journey-summary,html[data-theme="dark"] .diagnostic-steps,html[data-theme="dark"] .assistant-stages{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .allowance-panel,html:not([data-theme]) .journey-summary,html:not([data-theme]) .diagnostic-steps,html:not([data-theme]) .assistant-stages{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}}

html[data-theme="dark"] .steps,html[data-theme="dark"] .result,html[data-theme="dark"] .module-icon{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .steps,html:not([data-theme]) .result,html:not([data-theme]) .module-icon{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}}

html[data-theme="dark"] main button:not(.primary):not(.danger):not(.on):not(.selected):not(.pro-cta):not(.pro-chip):not(.text-action):not(.module-button):not(.pro-row):not(.delete-option):not(.pro-sec):not([data-act="resume"]){background:#1a3350!important;color:#d6e6f6!important;border-color:#2f4d6b!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) main button:not(.primary):not(.danger):not(.on):not(.selected):not(.pro-cta):not(.pro-chip):not(.text-action):not(.module-button):not(.pro-row):not(.delete-option):not(.pro-sec):not([data-act="resume"]){background:#1a3350!important;color:#d6e6f6!important;border-color:#2f4d6b!important}}

html[data-theme="dark"] .module-icon svg{color:#8cc0ff!important;stroke:#8cc0ff!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .module-icon svg{color:#8cc0ff!important;stroke:#8cc0ff!important}}
/* light-mode contrast tweaks */
.welcome small{color:#4b6277}.dashboard-date,.welcome p{color:#4b6277}.tile span{color:#4f6479}
.pro-alert button{background:#9a5b00}.pro-row small{color:#4f6479}.pro-bar small{opacity:1;color:#cfe0f0}

/* ===== V5.8.5 layout fixes ===== */
input[type=date],input[type=time],input[type=datetime-local]{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;min-height:46px}
#main.guide-mode>.card:first-child{display:none}
.week-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:12px 0 8px}
.day-chip{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;margin:0!important;padding:8px 0!important;min-height:58px!important;border-radius:12px!important;text-align:center;cursor:pointer;background:#f2f6fa;color:#19364e;border:1px solid #d4e0ea}
.day-chip input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.day-chip .dow{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.04em;opacity:.8}
.day-chip .dn{font-size:18px;font-weight:750;line-height:1}
.day-chip:has(input:checked){background:#1765b0;color:#fff;border-color:#1765b0}
.day-chip:has(input:focus-visible){outline:3px solid #8cc0ff;outline-offset:2px}
.week-tools{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 6px}
.week-range{margin:4px 0 12px}

html[data-theme="dark"] .day-chip{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html[data-theme="dark"] .day-chip .dow,html[data-theme="dark"] .day-chip .dn{color:inherit!important}
html[data-theme="dark"] .day-chip:has(input:checked){background:#2b6cb0!important;color:#fff!important;border-color:#2b6cb0!important}
html[data-theme="dark"] .week-range{color:#9db2c6!important}
@media(prefers-color-scheme:dark){
html:not([data-theme]) .day-chip{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html:not([data-theme]) .day-chip .dow,html:not([data-theme]) .day-chip .dn{color:inherit!important}
html:not([data-theme]) .day-chip:has(input:checked){background:#2b6cb0!important;color:#fff!important;border-color:#2b6cb0!important}
html:not([data-theme]) .week-range{color:#9db2c6!important}
}

/* guided assistant + links dark */
html[data-theme="dark"] .assistant-answers,html[data-theme="dark"] .assistant-flow,html[data-theme="dark"] .assistant-log,html[data-theme="dark"] .assistant-log-row,html[data-theme="dark"] .assistant-question,html[data-theme="dark"] .assistant-recommendation,html[data-theme="dark"] .assistant-results,html[data-theme="dark"] .assistant-summary,html[data-theme="dark"] .assistant-symptoms,html[data-theme="dark"] .diagnostic-checks,html[data-theme="dark"] .diagnostic-conclusion,html[data-theme="dark"] .diagnostic-guidance,html[data-theme="dark"] .diagnostic-history,html[data-theme="dark"] .diagnostic-history-section,html[data-theme="dark"] .diagnostic-section,html[data-theme="dark"] .guided-extra,html[data-theme="dark"] .guided-section,html[data-theme="dark"] .recorded-sequence,html[data-theme="dark"] .action-record,html[data-theme="dark"] .action-entry,html[data-theme="dark"] .history-details,html[data-theme="dark"] .empty-state,html[data-theme="dark"] .template-option,html[data-theme="dark"] .template-preview{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html[data-theme="dark"] .assistant-caption,html[data-theme="dark"] .guided-progress,html[data-theme="dark"] .guided-heading,html[data-theme="dark"] .guided-step-title,html[data-theme="dark"] .sequence-number,html[data-theme="dark"] .eyebrow{color:#cfe3f7!important}
html[data-theme="dark"] .guided-progress span,html[data-theme="dark"] .assistant-caption span{color:#cfe3f7!important}
html[data-theme="dark"] .assistant-question h3,html[data-theme="dark"] .diagnostic-conclusion h3,html[data-theme="dark"] .diagnostic-section h3,html[data-theme="dark"] .guided-section h3,html[data-theme="dark"] .assistant-recommendation h3,html[data-theme="dark"] .assistant-summary h3{color:#f2f8ff!important}
html[data-theme="dark"] .assistant-question p,html[data-theme="dark"] .diagnostic-conclusion p,html[data-theme="dark"] .assistant-recommendation p,html[data-theme="dark"] .assistant-summary p,html[data-theme="dark"] .diagnostic-section p{color:#b6c9db!important}
html[data-theme="dark"] .diagnostic-conclusion strong,html[data-theme="dark"] .assistant-summary strong,html[data-theme="dark"] .assistant-log-row strong,html[data-theme="dark"] .action-record-title{color:#f2f8ff!important}
html[data-theme="dark"] a,html[data-theme="dark"] a:visited,html[data-theme="dark"] .guide-note a{color:#8cc0ff!important}
html[data-theme="dark"] .workflow-badge{background:#1d3a57!important;color:#d6e8fa!important}
html[data-theme="dark"] .warn{color:#ffc97a!important}
@media(prefers-color-scheme:dark){
html:not([data-theme]) .assistant-answers,html:not([data-theme]) .assistant-flow,html:not([data-theme]) .assistant-log,html:not([data-theme]) .assistant-log-row,html:not([data-theme]) .assistant-question,html:not([data-theme]) .assistant-recommendation,html:not([data-theme]) .assistant-results,html:not([data-theme]) .assistant-summary,html:not([data-theme]) .assistant-symptoms,html:not([data-theme]) .diagnostic-checks,html:not([data-theme]) .diagnostic-conclusion,html:not([data-theme]) .diagnostic-guidance,html:not([data-theme]) .diagnostic-history,html:not([data-theme]) .diagnostic-history-section,html:not([data-theme]) .diagnostic-section,html:not([data-theme]) .guided-extra,html:not([data-theme]) .guided-section,html:not([data-theme]) .recorded-sequence,html:not([data-theme]) .action-record,html:not([data-theme]) .action-entry,html:not([data-theme]) .history-details,html:not([data-theme]) .empty-state,html:not([data-theme]) .template-option,html:not([data-theme]) .template-preview{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
html:not([data-theme]) .assistant-caption,html:not([data-theme]) .guided-progress,html:not([data-theme]) .guided-heading,html:not([data-theme]) .guided-step-title,html:not([data-theme]) .sequence-number,html:not([data-theme]) .eyebrow{color:#cfe3f7!important}
html:not([data-theme]) .guided-progress span,html:not([data-theme]) .assistant-caption span{color:#cfe3f7!important}
html:not([data-theme]) .assistant-question h3,html:not([data-theme]) .diagnostic-conclusion h3,html:not([data-theme]) .diagnostic-section h3,html:not([data-theme]) .guided-section h3,html:not([data-theme]) .assistant-recommendation h3,html:not([data-theme]) .assistant-summary h3{color:#f2f8ff!important}
html:not([data-theme]) .assistant-question p,html:not([data-theme]) .diagnostic-conclusion p,html:not([data-theme]) .assistant-recommendation p,html:not([data-theme]) .assistant-summary p,html:not([data-theme]) .diagnostic-section p{color:#b6c9db!important}
html:not([data-theme]) .diagnostic-conclusion strong,html:not([data-theme]) .assistant-summary strong,html:not([data-theme]) .assistant-log-row strong,html:not([data-theme]) .action-record-title{color:#f2f8ff!important}
html:not([data-theme]) a,html:not([data-theme]) a:visited,html:not([data-theme]) .guide-note a{color:#8cc0ff!important}
html:not([data-theme]) .workflow-badge{background:#1d3a57!important;color:#d6e8fa!important}
html:not([data-theme]) .warn{color:#ffc97a!important}
}

html[data-theme="dark"] .site-identity,html[data-theme="dark"] .site-identities section,html[data-theme="dark"] .review-identifiers section,html[data-theme="dark"] .site-picker,html[data-theme="dark"] .area-picker,html[data-theme="dark"] .workflow-scope{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
@media(prefers-color-scheme:dark){
html:not([data-theme]) .site-identity,html:not([data-theme]) .site-identities section,html:not([data-theme]) .review-identifiers section,html:not([data-theme]) .site-picker,html:not([data-theme]) .area-picker,html:not([data-theme]) .workflow-scope{background:#10243a!important;color:#e8f1f9!important;border-color:#2c455f!important}
}

html[data-theme="dark"] .site-identity dt,html[data-theme="dark"] .site-identity dd,html[data-theme="dark"] .review-identifiers dt,html[data-theme="dark"] .review-identifiers dd{color:#cfe3f7!important;background:transparent!important}
html[data-theme="dark"] .site-identity dd,html[data-theme="dark"] .review-identifiers dd{color:#f2f8ff!important}
html[data-theme="dark"] dl,html[data-theme="dark"] dt,html[data-theme="dark"] dd{background:transparent!important}
@media(prefers-color-scheme:dark){
html:not([data-theme]) .site-identity dt,html:not([data-theme]) .site-identity dd,html:not([data-theme]) .review-identifiers dt,html:not([data-theme]) .review-identifiers dd{color:#cfe3f7!important;background:transparent!important}
html:not([data-theme]) .site-identity dd,html:not([data-theme]) .review-identifiers dd{color:#f2f8ff!important}
html:not([data-theme]) dl,html:not([data-theme]) dt,html:not([data-theme]) dd{background:transparent!important}
}
html:not([data-theme="dark"]) .card small,html:not([data-theme="dark"]) .tile small{color:#4a5a6e}
@media(prefers-color-scheme:dark){html:not([data-theme]) .card small,html:not([data-theme]) .tile small{color:inherit}}

/* ===== V5.9.0 Actual OT layout: charge card, sections, claims, area chips ===== */
.charge-card{margin:0 0 14px;padding:12px 14px 10px;border-radius:16px;background:#0f2e4a;color:#fff;border:1px solid #1d4a73;box-shadow:0 6px 18px rgba(8,28,48,.18)}
.charge-card.empty{background:#4a3a0c;border-color:#8a6d1a}
.charge-card .cc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.charge-card .cc-label{font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;opacity:.85}
.charge-card .cc-state{font-size:11px;font-weight:650;padding:2px 9px;border-radius:999px;background:rgba(255,255,255,.16)}
.charge-card .cc-input{display:block;width:100%;margin:6px 0 2px!important;padding:2px 0!important;border:0!important;border-bottom:1px dashed rgba(255,255,255,.35)!important;border-radius:0!important;background:transparent!important;color:#fff!important;font:700 22px/1.25 ui-monospace,SFMono-Regular,Menlo,monospace!important;letter-spacing:.02em;box-shadow:none!important;min-height:0!important;height:auto!important}
.charge-card .cc-input::placeholder{color:rgba(255,255,255,.6)}
.charge-card .cc-sub{margin:4px 0 0;color:rgba(255,255,255,.85)}
.charge-card .cc-warn{margin:4px 0 0;color:#ffe3a1}
.form-sec{margin:0 0 14px;padding:14px;border:1px solid #dce4eb;border-radius:16px;background:#fff}
.form-sec>.pro-h{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:15px}
.form-sec>.pro-h .pro-n{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#1765b0;color:#fff;font-size:12px;font-weight:750}
.form-sec .time-panel,.form-sec .allowance-panel,.form-sec .claims-panel{margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.claim-block{margin:0 0 14px;padding:12px;border:1px solid #dce4eb;border-radius:14px;background:#f6f9fc}
.claim-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.claim-label{font-weight:700;color:#14324d}
.claim-hint{color:#52677b}
.req-tag{font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;background:#fde7e7;color:#8c1d1d}
.seg3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.seg-opt{position:relative;display:block!important;margin:0!important}
.seg-opt input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.seg-opt span{display:flex;align-items:center;justify-content:center;min-height:48px;padding:6px 4px;border-radius:12px;border:1px solid #c9d7e4;background:#fff;color:#19364e;font-weight:650;font-size:13px;text-align:center;line-height:1.2}
.seg-opt input:checked+span{background:#1765b0;border-color:#1765b0;color:#fff}
.seg-opt input:focus-visible+span{outline:3px solid #8cc0ff;outline-offset:2px}
.km-card{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:8px 0 6px;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #c9d7e4}
.km-input{flex:1;margin:0!important}
.km-cap{display:block;font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.06em;color:#52677b}
.km-row{display:flex;align-items:baseline;gap:6px}
.km-row input{width:100%;min-width:0;border:0!important;background:transparent!important;font-size:28px!important;font-weight:750;padding:2px 0!important;color:#102c43!important;box-shadow:none!important;min-height:0!important}
.km-row b{font-size:15px;color:#52677b}
.km-basis{font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px;background:#e7edf3;color:#3a5066;white-space:nowrap}
.km-basis[data-basis=estimate]{background:#e2f0ff;color:#0f4c8a}
.km-basis[data-basis=route]{background:#dff5e6;color:#17613a}
.km-basis[data-basis=trip]{background:#dff5e6;color:#17613a}
.km-basis[data-basis=manual]{background:#fff0d1;color:#7a5200}
.claims-panel.need-km .km-card{border-color:#c0392b;box-shadow:0 0 0 2px rgba(192,57,43,.15)}
.claim-rule{margin-top:4px}
.claim-rule summary{cursor:pointer;font-weight:650;color:#1765b0;padding:6px 0}
.area-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.area-head h3{margin:0}
.area-tools{display:flex;gap:6px}
.mini-chip{min-height:32px;padding:4px 12px;border-radius:999px;border:1px solid #c9d7e4;background:#f2f6fa;color:#1765b0;font-weight:650;font-size:12.5px}
.area-options.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.area-chip{position:relative;display:inline-flex!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
.area-chip[hidden]{display:none!important}
.area-chip input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.area-chip span{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border-radius:999px;border:1px solid #c9d7e4;background:#f2f6fa;color:#19364e;font-weight:600;font-size:13.5px}
.area-chip input:checked+span{background:#1765b0;border-color:#1765b0;color:#fff}
.area-chip input:checked+span::before{content:"\2713";margin-right:6px;font-weight:800}
.area-chip input:focus-visible+span{outline:3px solid #8cc0ff;outline-offset:2px}
.area-filter{margin-top:8px}
.guide-hits .choices{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.guide-hits .choices button{min-height:36px;padding:6px 12px;border-radius:999px;font-size:13px}
#guideQuery{min-height:64px;resize:vertical}

html[data-theme="dark"] .form-sec{background:#14283b;border-color:#2c455f}
html[data-theme="dark"] .claim-block{background:#0f2133;border-color:#2c455f}
html[data-theme="dark"] .claim-label{color:#e8f1f9}
html[data-theme="dark"] .claim-hint{color:#9db2c6}
html[data-theme="dark"] .req-tag{background:#5a1e1e;color:#ffd2d2}
html[data-theme="dark"] .seg-opt span{background:#10243a;border-color:#34506b;color:#e8f1f9}
html[data-theme="dark"] .seg-opt input:checked+span{background:#1f5fb0;border-color:#3d86e0;color:#fff}
html[data-theme="dark"] .km-card{background:#10243a;border-color:#34506b}
html[data-theme="dark"] .km-cap{color:#9db2c6}
html[data-theme="dark"] .km-row input{color:#f2f8ff!important}
html[data-theme="dark"] .km-row b{color:#9db2c6}
html[data-theme="dark"] .km-basis{background:#243a52;color:#cfe0f0}
html[data-theme="dark"] .km-basis[data-basis=estimate]{background:#173a63;color:#bfe0ff}
html[data-theme="dark"] .km-basis[data-basis=route]{background:#143d2a;color:#bff0d1}
html[data-theme="dark"] .km-basis[data-basis=trip]{background:#143d2a;color:#bff0d1}
html[data-theme="dark"] .km-basis[data-basis=manual]{background:#4d3a10;color:#ffe0a3}
html[data-theme="dark"] .claim-rule summary{color:#8fc2ff}
html[data-theme="dark"] .mini-chip{background:#10243a;border-color:#34506b;color:#8fc2ff}
html[data-theme="dark"] .area-chip span{background:#10243a;border-color:#34506b;color:#e8f1f9}
html[data-theme="dark"] .area-chip input:checked+span{background:#1f5fb0;border-color:#3d86e0;color:#fff}
html[data-theme="dark"] .form-sec>.pro-h .pro-n{background:#1f5fb0;color:#fff}
html[data-theme="dark"] .charge-card{background:#0c2238;border-color:#2a577f}
html[data-theme="dark"] .charge-card.empty{background:#4a3a0c;border-color:#8a6d1a}
@media(prefers-color-scheme:dark){
html:not([data-theme]) .form-sec{background:#14283b;border-color:#2c455f}
html:not([data-theme]) .claim-block{background:#0f2133;border-color:#2c455f}
html:not([data-theme]) .claim-label{color:#e8f1f9}
html:not([data-theme]) .claim-hint{color:#9db2c6}
html:not([data-theme]) .req-tag{background:#5a1e1e;color:#ffd2d2}
html:not([data-theme]) .seg-opt span{background:#10243a;border-color:#34506b;color:#e8f1f9}
html:not([data-theme]) .seg-opt input:checked+span{background:#1f5fb0;border-color:#3d86e0;color:#fff}
html:not([data-theme]) .km-card{background:#10243a;border-color:#34506b}
html:not([data-theme]) .km-cap{color:#9db2c6}
html:not([data-theme]) .km-row input{color:#f2f8ff!important}
html:not([data-theme]) .km-row b{color:#9db2c6}
html:not([data-theme]) .km-basis{background:#243a52;color:#cfe0f0}
html:not([data-theme]) .km-basis[data-basis=estimate]{background:#173a63;color:#bfe0ff}
html:not([data-theme]) .km-basis[data-basis=route]{background:#143d2a;color:#bff0d1}
html:not([data-theme]) .km-basis[data-basis=trip]{background:#143d2a;color:#bff0d1}
html:not([data-theme]) .km-basis[data-basis=manual]{background:#4d3a10;color:#ffe0a3}
html:not([data-theme]) .claim-rule summary{color:#8fc2ff}
html:not([data-theme]) .mini-chip{background:#10243a;border-color:#34506b;color:#8fc2ff}
html:not([data-theme]) .area-chip span{background:#10243a;border-color:#34506b;color:#e8f1f9}
html:not([data-theme]) .area-chip input:checked+span{background:#1f5fb0;border-color:#3d86e0;color:#fff}
html:not([data-theme]) .form-sec>.pro-h .pro-n{background:#1f5fb0;color:#fff}
html:not([data-theme]) .charge-card{background:#0c2238;border-color:#2a577f}
html:not([data-theme]) .charge-card.empty{background:#4a3a0c;border-color:#8a6d1a}
}
.km-row input{width:6ch!important;flex:0 0 auto}

.ot-duration small{color:rgba(255,255,255,.78)!important}
html[data-theme="dark"] .km-row input,html[data-theme="dark"] .charge-card .cc-input{background:transparent!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .km-row input,html:not([data-theme]) .charge-card .cc-input{background:transparent!important}}
html[data-theme="dark"] .journey-flow span{background:#10243a;color:#cfe0f0}
html[data-theme="dark"] .journey-flow .selected{background:#1f5fb0;color:#fff}
@media(prefers-color-scheme:dark){html:not([data-theme]) .journey-flow span{background:#10243a;color:#cfe0f0}html:not([data-theme]) .journey-flow .selected{background:#1f5fb0;color:#fff}}

/* V5.9.2 lock-screen tools */
.lock-tools{position:fixed;top:max(14px,env(safe-area-inset-top));right:14px;display:flex;gap:8px;align-items:center;z-index:5}
.lock-lang{display:inline-flex;background:#ffffff1a;border:1px solid #ffffff38;border-radius:10px;padding:2px;height:38px}
.lock-lang button,.lock-theme{margin:0!important;border:0!important;color:#e5eef7!important;background:transparent!important;font-weight:800!important;font-size:.75rem!important;letter-spacing:.04em;cursor:pointer}
.lock-lang button{min-width:36px;padding:0 9px!important;border-radius:8px!important;height:32px!important;width:auto!important}
.lock-lang button.on{background:#fff!important;color:#102c43!important}
.lock-theme{width:38px!important;height:38px!important;padding:0!important;border-radius:10px!important;background:#ffffff1a!important;border:1px solid #ffffff38!important;font-size:1.1rem!important}

/* ===== V5.10 polish ===== */
.pl-card h2{margin-top:0}
.pl-chart{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:138px;margin-top:10px}
.pl-col{display:flex;flex-direction:column;align-items:center;gap:4px;height:100%;min-width:0}
.pl-val{font-size:10.5px;font-weight:700;color:var(--muted);height:14px;line-height:14px}
.pl-bar{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;background:color-mix(in srgb,var(--line) 45%,transparent);border-radius:8px;overflow:hidden}
.pl-bar i{display:block;width:100%;border-radius:8px 8px 0 0;background:linear-gradient(180deg,#4f9be8,#1765b0)}
.pl-col.today .pl-bar i{background:linear-gradient(180deg,#2fc09a,#0f7a5a)}
.pl-dow{font-size:11px;font-weight:600;color:var(--muted)}
.pl-col.today .pl-dow{color:var(--ink);font-weight:800}
.pl-claims{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.pl-claims div{background:color-mix(in srgb,var(--blue) 8%,var(--surface));border:1px solid var(--line);border-radius:12px;padding:12px 8px;text-align:center}
.pl-claims b{display:block;font-size:22px;line-height:1.1;color:var(--ink)}
.pl-claims span{display:block;margin-top:4px;font-size:11px;font-weight:600;color:var(--muted)}
.pl-atts{display:grid;gap:8px;margin-top:8px}
.pl-att{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font:inherit;min-height:52px}
button.pl-att{cursor:pointer}
.pl-att span:nth-child(2){flex:1;min-width:0}
.pl-att strong{display:block;font-size:14px}
.pl-att small{display:block;margin-top:2px;font-size:12px;color:var(--muted)}
.pl-att i{font-style:normal;font-size:22px;color:var(--muted)}
.pl-dot{width:10px;height:10px;border-radius:50%;flex:none}
.pl-dot.amber{background:#e0a21a}.pl-dot.blue{background:#2f7fd6}.pl-dot.green{background:#1f9d73}
.pl-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.pl-chip{font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;background:color-mix(in srgb,var(--blue) 10%,var(--surface));border:1px solid var(--line);color:var(--ink)}
.pl-chip.mono{font-family:ui-monospace,Menlo,monospace;font-weight:600}
.history-entry.pl-actual .actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.history-entry.pl-actual .actions button{width:auto;flex:1 1 auto;min-height:40px;padding:8px 12px;font-size:13px}
.history-entry.pl-actual .actions .text-action{flex:0 0 auto;color:#b4332f}
.history-entry>button.outline[data-view-history]{width:100%;margin-bottom:8px}
.pl-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:28px 16px;border:1px dashed var(--line);border-radius:16px;margin-top:12px}
.pl-empty svg{width:56px;height:56px;fill:none;stroke:var(--blue);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.8}
.pl-empty p{margin:0 0 8px;color:var(--muted);font-size:13px}
/* history filter chips: wrap instead of clipping */
.history-filters{flex-wrap:wrap!important;overflow:visible!important}
.history-filters button{min-width:0!important;padding:7px 12px!important}
/* charge-code card: soft amber in light mode */
.charge-card.empty{background:#fff4dc;border-color:#e6c06a;color:#5c4100;box-shadow:0 4px 14px rgba(150,110,10,.12)}
.charge-card.empty .cc-state{background:#f6dfa4;color:#5c4100}
.charge-card.empty .cc-input{color:#5c4100!important;border-bottom-color:rgba(92,65,0,.4)!important}
html[data-theme="dark"] .charge-card.empty{background:#4a3a0c;border-color:#8a6d1a;color:#fff}
html[data-theme="dark"] .charge-card.empty .cc-state{background:rgba(255,255,255,.16);color:#fff}
html[data-theme="dark"] .charge-card.empty .cc-input{color:#fff!important;border-bottom-color:rgba(255,255,255,.35)!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .charge-card.empty{background:#4a3a0c;border-color:#8a6d1a;color:#fff}html:not([data-theme]) .charge-card.empty .cc-state{background:rgba(255,255,255,.16);color:#fff}html:not([data-theme]) .charge-card.empty .cc-input{color:#fff!important;border-bottom-color:rgba(255,255,255,.35)!important}}
/* styled file pickers */
input[type=file]{width:100%;padding:8px;border:1px dashed var(--line);border-radius:12px;background:var(--surface);color:var(--muted);font-size:13px}
input[type=file]::file-selector-button{margin-right:12px;padding:9px 14px;border:0;border-radius:9px;background:var(--blue);color:#fff;font:700 13px inherit;cursor:pointer}
/* bottom nav labels fit */
#bottomNav button span{font-size:10.5px;letter-spacing:-.01em;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#bottomNav button{padding-left:2px;padding-right:2px;min-width:0}
.charge-card.empty .cc-input::placeholder{color:#8a6a1c!important;opacity:.75}

.charge-card.empty .cc-sub{color:#6b4f10!important;opacity:1}
html[data-theme="dark"] .charge-card.empty .cc-input::placeholder{color:#fff!important;opacity:.6}
html[data-theme="dark"] .charge-card.empty .cc-sub{color:#f1e3b8!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .charge-card.empty .cc-input::placeholder{color:#fff!important;opacity:.6}html:not([data-theme]) .charge-card.empty .cc-sub{color:#f1e3b8!important}}
.charge-card.empty .cc-warn{color:#7a5200!important;font-weight:600}
html[data-theme="dark"] .charge-card.empty .cc-warn{color:#ffe3a1!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .charge-card.empty .cc-warn{color:#ffe3a1!important}}

/* ===== V5.11 import ===== */
.smart-detect{border:1px solid var(--line);background:color-mix(in srgb,var(--blue) 7%,var(--surface));border-radius:14px;padding:12px 14px;margin:0 0 14px}
.sd-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sd-badge{font-size:12px;font-weight:800;padding:3px 12px;border-radius:999px}
.sd-badge.ok{background:#dff5ea;color:#0b5a3f}.sd-badge.warn{background:#fff0d3;color:#885200}
.sd-list{margin:8px 0 0;padding-left:18px;font-size:13px;color:var(--muted)}
.sd-list b{color:var(--ink)}
.sd-warn{margin:8px 0 0;padding:8px 10px;border-radius:10px;background:#fff0d3;color:#6b4300;font-size:13px;font-weight:600}
html[data-theme="dark"] .master-progress{background:#14283b!important;border-color:#2c455f!important;color:#e8f1f9!important}
html[data-theme="dark"] .master-progress.complete{background:#10302a!important;border-color:#1d5a49!important}
html[data-theme="dark"] .master-progress.failed{background:#3a2218!important;border-color:#7a4527!important}
html[data-theme="dark"] .import-stages{color:#9db2c6!important}html[data-theme="dark"] .import-stages .active{color:#7db8ff!important}html[data-theme="dark"] .import-stages .done{color:#4fd8a6!important}
html[data-theme="dark"] .master-counts div{background:#10202f!important;border:1px solid #2c455f}
html[data-theme="dark"] .master-counts strong{color:#e8f1f9!important}html[data-theme="dark"] .master-counts span,html[data-theme="dark"] .master-dates dt{color:#9db2c6!important}
html[data-theme="dark"] .master-status-item+.master-status-item{border-top-color:#2c455f!important}
html[data-theme="dark"] .smart-detect{background:#10202f}html[data-theme="dark"] .sd-badge.ok{background:#12382d;color:#7ee8bd}html[data-theme="dark"] .sd-badge.warn,html[data-theme="dark"] .sd-warn{background:#44351c;color:#ffd18a}
@media(prefers-color-scheme:dark){html:not([data-theme]) .master-progress{background:#14283b!important;border-color:#2c455f!important;color:#e8f1f9!important}html:not([data-theme]) .master-progress.complete{background:#10302a!important;border-color:#1d5a49!important}html:not([data-theme]) .master-progress.failed{background:#3a2218!important;border-color:#7a4527!important}html:not([data-theme]) .import-stages{color:#9db2c6!important}html:not([data-theme]) .import-stages .active{color:#7db8ff!important}html:not([data-theme]) .import-stages .done{color:#4fd8a6!important}html:not([data-theme]) .master-counts div{background:#10202f!important;border:1px solid #2c455f}html:not([data-theme]) .master-counts strong{color:#e8f1f9!important}html:not([data-theme]) .master-counts span,html:not([data-theme]) .master-dates dt{color:#9db2c6!important}html:not([data-theme]) .master-status-item+.master-status-item{border-top-color:#2c455f!important}html:not([data-theme]) .smart-detect{background:#10202f}html:not([data-theme]) .sd-badge.ok{background:#12382d;color:#7ee8bd}html:not([data-theme]) .sd-badge.warn,html:not([data-theme]) .sd-warn{background:#44351c;color:#ffd18a}}

/* ===== V5.12 saved places ===== */
.pl-places{margin-top:18px}
.pl-form{border:1px solid var(--line);background:color-mix(in srgb,var(--blue) 5%,var(--surface));border-radius:16px;padding:14px;margin:12px 0}
.pl-form h4{margin:0 0 10px;font-size:15px}
.pl-types{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:10px}
.pl-types button{min-height:44px;padding:6px 4px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:700 13px inherit}
.pl-types button.on{background:var(--blue);border-color:var(--blue);color:#fff}
.pl-form textarea{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface);color:var(--ink);font:inherit;resize:vertical}
.pl-item{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:14px;margin:10px 0}
.pl-item.editing{border-color:var(--blue);box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 30%,transparent)}
.pl-item h4{margin:6px 0 2px;font-size:16px}
.pl-top{display:flex;align-items:center;gap:8px}
.pl-type{font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px;background:#e6f0fb;color:#195c9a}
.pl-type.t-office{background:#e8e4fa;color:#4a3aa6}.pl-type.t-lodging{background:#fff0d3;color:#885200}.pl-type.t-other{background:#e8eef2;color:#46606f}
.pl-def{font-size:11px;font-weight:800;color:#0f7a5a}
.pl-remark{margin:2px 0 4px;font-size:14px}
.pl-coord{font-family:ui-monospace,Menlo,monospace}
.pl-empty-list{text-align:center;padding:22px 12px;border:1px dashed var(--line);border-radius:16px;color:var(--muted)}
.pl-destchips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:-4px 0 12px}
.pl-destchips .pl-chip{cursor:pointer;font:600 12px inherit}
html[data-theme="dark"] .pl-type{background:#1d3a57;color:#b9d8f7}html[data-theme="dark"] .pl-type.t-office{background:#2f2a5c;color:#cfc8ff}html[data-theme="dark"] .pl-type.t-lodging{background:#44351c;color:#ffd18a}html[data-theme="dark"] .pl-type.t-other{background:#25384a;color:#b7c9d8}html[data-theme="dark"] .pl-def{color:#4fd8a6}
@media(prefers-color-scheme:dark){html:not([data-theme]) .pl-type{background:#1d3a57;color:#b9d8f7}html:not([data-theme]) .pl-type.t-office{background:#2f2a5c;color:#cfc8ff}html:not([data-theme]) .pl-type.t-lodging{background:#44351c;color:#ffd18a}html:not([data-theme]) .pl-type.t-other{background:#25384a;color:#b7c9d8}html:not([data-theme]) .pl-def{color:#4fd8a6}}

.km-route{margin:4px 0 10px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--blue) 8%,var(--surface));border:1px solid var(--line);font-size:12.5px;line-height:1.5;color:var(--ink);word-break:break-word}
.km-route[hidden]{display:none}
.claim-block .grid.km-opts{grid-template-columns:1fr!important}

/* ===== V5.14 pro layer 2 ===== */
.eyebrow{display:block;font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--blue);margin-bottom:2px}
.rp2-presets{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.rp2-presets button,.rp2-custom{min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;display:inline-flex;align-items:center}
.rp2-presets button.on,.rp2-custom.on{background:var(--blue);border-color:var(--blue);color:#fff}
.rp2-custom:not(.on){display:none}
.rp2-dates{grid-template-columns:1fr 1fr}
.rp2-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:8px;margin-top:10px}
.rp2-kpi{background:color-mix(in srgb,var(--blue) 8%,var(--surface));border:1px solid var(--line);border-radius:12px;padding:12px 10px;text-align:center}
.rp2-kpi b{display:block;font-size:22px;line-height:1.1;color:var(--ink)}
.rp2-kpi span{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.rp2-kpi small{display:block;font-size:11px;color:var(--blue);margin-top:2px}
.rp2-warn{margin:10px 0 0;padding:9px 12px;border-radius:10px;background:color-mix(in srgb,#e8a100 18%,var(--surface));border:1px solid color-mix(in srgb,#e8a100 45%,var(--line));font-size:13px;color:var(--ink)}
.rp2-scroll{overflow-x:auto;margin:8px -4px 0}
.rp2-table{width:100%;border-collapse:collapse;font-size:13px}
.rp2-table th{text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);padding:6px 6px;border-bottom:1px solid var(--line)}
.rp2-table td{padding:8px 6px;border-bottom:1px solid var(--line);color:var(--ink);vertical-align:top}
.rp2-table td small{display:block;color:var(--muted);font-size:11px}
.rp2-table tr.draft td{opacity:.7}
.rp2-dls{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}
.rp2-csv{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.rp2-dl{display:flex;align-items:center;gap:12px;text-align:left;min-height:56px;padding:10px 14px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.rp2-dl b{display:block;font-size:14px}.rp2-dl small{display:block;color:var(--muted);font-size:12px}
.rp2-dl .p2-ic{width:26px;height:26px;flex:none;fill:none;stroke:var(--blue);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rp2-dl.word{border-left:4px solid #2b6cb0}.rp2-dl.xls{border-left:4px solid #1f8f55}.rp2-dl.pdf{border-left:4px solid #c0392b}.rp2-dl.csv{min-height:48px;padding:8px 12px}
#printArea summary{font-weight:700;cursor:pointer}
/* history */
.hx-month{display:flex;justify-content:space-between;align-items:baseline;margin:16px 2px 6px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.hx-month b{color:var(--ink);font-size:13px}
.history-entry.hx{position:relative;padding:12px 14px;cursor:pointer}
.history-entry.hx .section-head{align-items:center;gap:8px;margin-bottom:2px}
.hx-date{font-weight:700;font-size:13px;color:var(--blue);margin-right:auto}
.history-entry.hx h3{font-size:15px;margin:2px 0}
.hx-view{display:none!important}
.hx-kebab{width:36px;height:36px;border-radius:10px;border:0;background:transparent;display:grid;place-items:center;padding:0;margin-left:2px}
.hx-kebab svg{width:20px;height:20px;fill:var(--muted)}
.hx-menu{position:absolute;right:10px;top:46px;z-index:5;min-width:170px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 28px rgba(0,0,0,.22);padding:6px;display:flex;flex-direction:column;gap:2px}
.hx-menu[hidden]{display:none}
.hx-menu button{border:0;background:transparent;text-align:left;min-height:42px;padding:0 12px;border-radius:8px;color:var(--ink)}
.hx-menu .text-action{color:#c0392b}
/* planning week */
.wk-nav{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted)}
.wk-nav button{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:18px;padding:0}
.wk-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:10px 0 6px}
.wk-day{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:64px;padding:6px 0;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.wk-day span{font-size:11px;color:var(--muted)}.wk-day b{font-size:16px}
.wk-day.today{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.wk-day.has{background:color-mix(in srgb,var(--blue) 9%,var(--surface))}
.wk-day i{display:flex;gap:3px;height:6px}
.wk-day em{width:6px;height:6px;border-radius:50%;background:#e8a100}
.wk-day em.done,.wk-day em.linked,.wk-day em.recorded{background:#1f8f55}
/* backup */
.bk-head{display:flex;gap:12px;align-items:flex-start}
.bk-head strong{display:block;font-size:15px}.bk-head small{display:block;color:var(--muted);margin-top:2px}
.bk-dot{width:12px;height:12px;border-radius:50%;margin-top:5px;background:#1f8f55;flex:none}
.bk-status.warn .bk-dot{background:#e8a100}.bk-status.bad .bk-dot{background:#d64545}
.bk-inv{grid-template-columns:repeat(4,1fr)}.bk-inv b{font-size:18px}.bk-inv span{font-size:11px}
.bk-strength{height:22px;margin:-4px 0 10px;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.bk-strength i{display:block;height:6px;border-radius:3px;background:#d64545;width:0;transition:width .2s;flex:0 0 auto;max-width:60%}
.bk-strength[data-lv="2"] i{background:#e8a100}.bk-strength[data-lv="3"] i{background:#7aa83a}.bk-strength[data-lv="4"] i{background:#1f8f55}
@media(max-width:380px){.rp2-dates{grid-template-columns:1fr}.bk-inv{grid-template-columns:repeat(2,1fr)}}
@media print{.rp2-head,.rp2-export,#rpKpis,#rpMonths,#rpTable{display:none!important}}

.pl-dot.red{background:#d64545}
.rp2-kpi:last-child:nth-child(odd){grid-column:span 2}

/* ===== V5.15 ===== */
.site-picker #bulkResults,.bulk-candidate{background:var(--surface)!important;color:var(--ink)!important}
.bulk-candidate span,.bulk-candidate strong{color:var(--ink)!important}.bulk-candidate small{color:var(--muted)!important}
.search-results-head{color:var(--ink)}
.geo-chip{display:inline-block;margin-top:4px;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:600}
.geo-chip.ok{background:color-mix(in srgb,#1f8f55 18%,var(--surface));color:var(--ink);border:1px solid color-mix(in srgb,#1f8f55 45%,var(--line))}
.geo-chip.no{background:color-mix(in srgb,#e8a100 20%,var(--surface));color:var(--ink);border:1px solid color-mix(in srgb,#e8a100 50%,var(--line))}
.geo-sum{margin:6px 0 10px;padding:9px 12px;border-radius:10px;font-size:13px;color:var(--ink);border:1px solid var(--line);background:var(--surface)}
.geo-sum.warn{background:color-mix(in srgb,#e8a100 16%,var(--surface))}
.geo-name{display:block;color:var(--muted);font-weight:400;margin-top:2px}
.geo-btn{margin:8px 0 2px}
.km-alert{color:var(--ink);background:color-mix(in srgb,#d64545 14%,var(--surface));border:1px solid color-mix(in srgb,#d64545 45%,var(--line));padding:9px 12px;border-radius:10px;font-weight:600}
.act-label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--blue);margin:12px 0 4px}
.act-group{border:1px solid var(--line);border-radius:12px;margin:6px 0;background:var(--surface)}
.act-group summary{padding:12px 14px;font-weight:600;cursor:pointer;display:flex;justify-content:space-between;color:var(--ink)}
.act-group summary span{color:var(--muted);font-weight:400}
.act-group>div{padding:0 10px 8px}
.area-auto{margin:4px 0 8px;padding:8px 12px;border-radius:10px;background:color-mix(in srgb,var(--blue) 10%,var(--surface));color:var(--ink)}
.site-picker .search-results-head{background:color-mix(in srgb,var(--blue) 12%,var(--surface))!important}
.site-picker #bulkResults .actions{background:var(--surface)!important}
.site-picker #bulkResults{border:1px solid var(--line)}
.site-picker .bulk-candidate{border-bottom:1px solid var(--line)}

/* ===== V5.16 master status drill-down ===== */
.md-tile{cursor:pointer;position:relative}
.md-tile::after{content:'›';position:absolute;right:10px;top:8px;color:var(--muted);font-size:18px}
.md-tile.on{outline:2px solid var(--blue);outline-offset:-2px}
.md-panel{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.md-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;color:var(--ink)}
.md-head button{min-height:34px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:transparent;color:var(--ink)}
.md-q{width:100%;margin:4px 0 10px}
.md-item{border-bottom:1px solid var(--line)}
.md-item summary{padding:10px 2px;cursor:pointer;list-style:none;color:var(--ink)}
.md-item summary strong{display:block;font-size:14px}.md-item summary small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.md-item summary em{display:block;font-style:normal;font-size:12px;color:var(--blue);margin-top:2px}
.md-item dl{display:grid;grid-template-columns:minmax(90px,38%) 1fr;gap:4px 10px;margin:0 0 10px;font-size:12px}
.md-item dt{color:var(--muted)}.md-item dd{margin:0;color:var(--ink);overflow-wrap:anywhere}
.md-group{margin:10px 0;padding:8px 10px;border:1px solid var(--line);border-radius:12px}.md-group>b{color:var(--ink)}
.md-row{margin:6px 0;font-size:13px;color:var(--ink)}
