*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
:root{--navy:#1a3a5c;--sky:#4db8e8;--green:#2d7a4f;--green-bg:#eaf5ee;--red:#c0392b;--red-bg:#fdecea;--border:#e0e0e0;--bg:#f4f6f9;--muted:#6b7280;--r:12px;--rs:8px}
body{font-family:-apple-system,BlinkMacSystemFont,sans-serif;background:var(--bg);color:#1a1a1a;min-height:100vh;font-size:16px}
.hidden{display:none!important}
/* APP BAR */
#appbar{background:var(--navy);color:#fff;padding:12px 16px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:100;min-height:56px}
#appbar .logo{width:36px;height:36px;border-radius:8px;overflow:hidden;background:#fff;flex-shrink:0}
#appbar .logo img{width:100%;height:100%;object-fit:contain;padding:3px}
#appbar h1{font-size:16px;font-weight:700;flex:1}
#appbar p{font-size:11px;color:#aac4e0;margin-top:1px}
.badge{font-size:10px;background:rgba(255,255,255,.12);padding:3px 8px;border-radius:4px;color:#cde;white-space:nowrap}
/* PROGRESS */
#progwrap{background:var(--navy);padding:0 16px 10px}
.prog-labels{display:flex;justify-content:space-between;font-size:11px;color:#aac4e0;margin-bottom:5px}
.prog-bg{height:4px;background:rgba(255,255,255,.2);border-radius:2px;overflow:hidden}
.prog-fill{height:100%;background:var(--sky);border-radius:2px;transition:width .4s}
/* SCREENS */
.screen{display:none;min-height:calc(100vh - 56px)}
.screen.active{display:block}
/* WELCOME */
.hero{background:var(--navy);color:#fff;padding:32px 20px 28px;text-align:center}
.hero-icon{width:72px;height:72px;background:#fff;border-radius:18px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;overflow:hidden}
.hero-icon img{width:100%;object-fit:contain;padding:6px}
.hero h2{font-size:24px;font-weight:800;margin-bottom:6px}
.hero p{font-size:14px;color:#aac4e0}
/* GENERIC */
.pad{padding:16px}
.lbl{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:8px}
/* FORM CARD */
.fcard{background:#fff;border-radius:var(--r);border:1px solid var(--border);overflow:hidden;margin-bottom:16px}
.frow{display:flex;align-items:stretch;border-bottom:1px solid var(--border)}
.frow:last-child{border-bottom:none}
.frow label{font-size:12px;color:var(--muted);padding:11px 12px;width:110px;flex-shrink:0;display:flex;align-items:center;background:#fafafa;border-right:1px solid var(--border);font-weight:500}
.frow input{flex:1;border:none;outline:none;padding:11px 12px;font-size:15px;color:#1a1a1a;background:#fff;font-family:inherit}
.frow input::placeholder{color:#ccc}
/* STEP */
.catbar{background:var(--navy);color:#fff;padding:12px 16px;display:flex;align-items:center;gap:12px}
.stepnum{width:30px;height:30px;background:var(--sky);color:var(--navy);border-radius:50%;font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.catname{font-size:15px;font-weight:700}
.catsub{font-size:11px;color:#aac4e0;margin-top:1px}
.sbody{padding:16px}
.rcard{background:#fff;border-radius:var(--r);border:1px solid var(--border);padding:14px;margin-bottom:12px}
.rcard h4{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin-bottom:7px}
.rcard p{font-size:14px;line-height:1.6}
.cklist{background:#fff;border-radius:var(--r);border:1px solid var(--border);padding:12px 14px;margin-bottom:12px}
.cklist h4{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin-bottom:8px}
.ci{display:flex;align-items:flex-start;gap:8px;font-size:13px;line-height:1.5;color:#444;margin-bottom:6px}
.ci:last-child{margin-bottom:0}
.dot{width:6px;height:6px;background:var(--sky);border-radius:50%;flex-shrink:0;margin-top:5px}
/* PHOTO */
.pzone{margin-bottom:12px}
.pzone > .zlbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);display:block;margin-bottom:6px}
.pactions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pbtn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:13px 10px;background:#fff;border:2px dashed var(--border);border-radius:var(--r);font-size:14px;font-weight:700;color:var(--navy);font-family:inherit;cursor:pointer;min-height:50px}
.pbtn svg{width:20px;height:20px;stroke:var(--navy);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.current-task{padding:12px 14px!important;margin-bottom:10px!important}
.current-task .eyebrow{margin-bottom:5px!important}
.current-task h3{font-size:17px!important;line-height:1.25!important;margin-bottom:4px!important}
.current-task p{font-size:12px!important;line-height:1.35!important}
.cklist{padding:10px 12px!important;margin-bottom:10px!important}
.ci{font-size:12px!important;line-height:1.35!important;margin-bottom:4px!important}
.sbody{padding:12px}
.bwrap{padding:0 12px 20px}
input[type=file]{display:none}
.pgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:8px}
.thumb{position:relative;aspect-ratio:4/3;border-radius:var(--rs);overflow:hidden;border:1px solid var(--border)}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb .rm{position:absolute;top:4px;right:4px;width:24px;height:24px;background:rgba(0,0,0,.6);border-radius:50%;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.thumb .tl{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.55);color:#fff;font-size:10px;padding:2px 5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
/* DOC PREVIEW */
.docprev{background:#fff;border-radius:var(--r);border:1px solid var(--border);overflow:hidden;margin-bottom:12px}
.docprev img{width:100%;display:block}
.doclbl{padding:8px 12px;font-size:12px;color:var(--muted);border-top:1px solid var(--border)}
/* BUTTONS */
.bwrap{padding:0 16px 28px;display:flex;flex-direction:column;gap:8px}
.btn{display:block;width:100%;padding:16px;border:none;border-radius:var(--r);font-size:16px;font-weight:700;font-family:inherit;cursor:pointer;text-align:center;-webkit-appearance:none}
.btn-p{background:var(--navy);color:#fff}
.btn-s{background:#fff;color:#1a1a1a;border:1px solid var(--border)!important;padding:14px}
/* ALERTS */
.ncr{background:#fff8e6;border:1px solid #ffd966;border-radius:var(--rs);padding:10px 14px;font-size:13px;color:#7a5500;margin-bottom:12px;line-height:1.5}
.warn{background:var(--red-bg);border:1px solid #f5c6c6;border-radius:var(--rs);padding:12px 14px;font-size:13px;color:var(--red);line-height:1.5;margin-bottom:12px}
.warn strong{display:block;margin-bottom:2px}
.infobanner{background:#e8f4fd;border:1px solid #b8d4f0;border-radius:var(--r);padding:14px;margin-bottom:12px}
.infobanner .ibt{font-size:13px;font-weight:600;color:var(--navy);margin-bottom:3px}
.infobanner .ibd{font-size:12px;color:var(--muted);margin-bottom:10px}
/* COMPLETE */
.chero{padding:40px 20px 24px;text-align:center}
.tick{width:72px;height:72px;background:var(--green);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 16px}
.tick svg{width:36px;height:36px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.chero h2{font-size:24px;font-weight:800;margin-bottom:6px}
.chero p{font-size:14px;color:var(--muted);line-height:1.6}
.slist{margin:0 16px 16px;background:#fff;border-radius:var(--r);border:1px solid var(--border);overflow:hidden}
.srow{display:flex;align-items:center;padding:11px 14px;border-bottom:1px solid var(--border);gap:10px;font-size:14px}
.srow:last-child{border-bottom:none}
.sico{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px;font-weight:700}
.sico.ok{background:var(--green-bg);color:var(--green)}
.sico.warn{background:var(--red-bg);color:var(--red)}
.sname{flex:1;font-weight:500}
.scnt{font-size:12px;color:var(--muted)}
.infonote{font-size:12px;color:var(--muted);text-align:center;padding:0 20px 16px;line-height:1.5}
/* HISTORY */
.hitem{background:#fff;border-radius:var(--r);border:1px solid var(--border);margin:0 16px 10px;padding:14px}
.hitem h4{font-size:15px;font-weight:600;margin-bottom:3px;color:var(--navy)}
.hitem p{font-size:12px;color:var(--muted);margin-bottom:10px}
.hdel{width:100%;padding:9px;border-radius:var(--rs);font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border:1px solid #f5c6c6;background:#fff;color:var(--red)}
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:500;display:flex;align-items:flex-end;justify-content:center;padding:16px}
.modal-card{background:#fff;border-radius:16px;max-width:520px;width:100%;padding:18px;border:1px solid var(--border);box-shadow:0 18px 45px rgba(0,0,0,.25)}
.modal-card h3{font-size:18px;color:var(--navy);margin-bottom:8px}
.modal-card p{font-size:14px;line-height:1.6;color:#333;margin-bottom:6px}
.modal-card .meta{font-size:12px;color:var(--muted);margin-top:8px}
.modal-card .btn{margin-top:12px}
.sig-white{background:#fff!important;mix-blend-mode:normal}

/* RECOVERY / SAVE FLOW */
.recovery-card{background:#fff;border:1px solid var(--border);border-radius:18px;padding:18px;margin-top:12px;box-shadow:0 10px 28px rgba(0,0,0,.08)}
.recovery-card h3{font-size:22px;color:var(--navy);margin-bottom:8px;font-weight:800}
.recovery-card p{font-size:14px;color:#333;line-height:1.5;margin-bottom:12px}
.recovery-meta{background:#f7fafc;border:1px solid var(--border);border-radius:12px;padding:12px;margin:12px 0 14px}
.recovery-meta div{font-size:14px;line-height:1.6;color:#222}
.recovery-meta strong{color:var(--navy)}
.btn-danger{background:#fff;color:var(--red);border:1px solid #f5c6c6}
.save-hero{padding:32px 18px 18px;text-align:center}
.save-hero h2{font-size:26px;color:var(--navy);margin:14px 0 8px;font-weight:850}
.save-hero p{font-size:16px;color:#333;line-height:1.5;margin:0 auto 10px;max-width:520px}
.save-instruction{font-size:20px!important;font-weight:850!important;color:#111!important;margin-top:18px!important}
.save-card{background:#fff;border:1px solid var(--border);border-radius:18px;margin:0 16px 16px;padding:18px;text-align:center;box-shadow:0 10px 28px rgba(0,0,0,.08)}
.big-save{font-size:20px!important;padding:18px 20px!important;border-radius:14px!important;width:100%;box-shadow:0 8px 18px rgba(26,58,92,.24)}
.share-actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.current-task{background:#fff;border:2px solid var(--sky);border-radius:18px;margin-bottom:14px;padding:18px;box-shadow:0 10px 24px rgba(77,184,232,.16);text-align:center}
.current-task .eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-weight:800;margin-bottom:8px}
.current-task h3{font-size:24px;line-height:1.15;color:var(--navy);font-weight:850;margin-bottom:8px}
.current-task p{font-size:14px;line-height:1.45;color:#333}
.catbar{align-items:center}
.catname{font-size:22px!important;letter-spacing:.02em;text-transform:uppercase}
.catsub{font-size:14px!important;margin-top:3px}

/* OVERLAY */
#ov{display:none;position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:999;align-items:center;justify-content:center;flex-direction:column;gap:16px;color:#fff;font-size:15px;text-align:center;padding:20px}
#ov.show{display:flex}
.spin{width:44px;height:44px;border:4px solid rgba(255,255,255,.2);border-top-color:#fff;border-radius:50%;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.pdf-view-top{position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid var(--line);padding:10px 12px;display:flex;align-items:center;gap:12px}
.pdf-view-title{font-weight:800;color:var(--navy);font-size:16px}
.pdf-frame{width:100%;height:calc(100vh - 62px);border:0;background:#fff}
.hist-actions{display:grid;gap:10px;margin-top:14px}
.hist-actions .btn{width:100%}

/* WORKER SELECTION */
.worker-card{background:#fff;border:1px solid var(--border);border-radius:var(--r);padding:14px;margin-bottom:12px}
.worker-card h4{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin-bottom:6px}
.worker-card p{font-size:13px;color:#333;line-height:1.45;margin-bottom:10px}
.worker-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.worker-btn{border:2px solid var(--border);background:#fff;border-radius:14px;padding:14px 10px;font-family:inherit;text-align:left;min-height:74px;cursor:pointer}
.worker-btn span{display:block;font-size:18px;font-weight:850;color:var(--navy);margin-bottom:4px}
.worker-btn small{display:block;font-size:11px;color:var(--muted);line-height:1.35}
.worker-btn.selected{border-color:var(--green);background:var(--green-bg)}
.worker-btn.disabled{opacity:.55;background:#f7f7f7;cursor:not-allowed}
.worker-note{font-size:12px;color:var(--muted);line-height:1.45}
.srow.clickable{cursor:pointer}
.srow.clickable:active{background:#f7fafc}
.sico.warn{font-size:16px;font-weight:900}
.frow input[readonly]{background:#f7fafc;color:#555}
