.investigation { background:#f7f9fc; color:#182537; height:100%; display:flex; flex-direction:column; font:14px/1.5 system-ui,sans-serif; min-width:0; }
.case-header { display:flex; justify-content:space-between; gap:16px; padding:24px; border-bottom:1px solid #d6deea; }
.case-header h2 { margin:4px 0 0; font-size:24px; letter-spacing:-.6px; }
.case-kicker { color:#53647b; font:11px/1.5 monospace; letter-spacing:1.5px; }
.case-progress { display:flex; flex-direction:column; justify-content:center; gap:8px; text-align:right; min-width:100px; }
.case-progress progress { width:100%; height:6px; accent-color:#2866c7; }
.case-tabs { display:flex; padding:12px 24px; gap:8px; flex-wrap:wrap; }
.case-tabs button,.case-btn { font:inherit; min-height:44px; padding:8px 16px; border:1px solid #c5cfdf; color:#283a51; background:#fff; border-radius:6px; cursor:pointer; }
.case-tabs button.selected { border-color:#2866c7; color:#174a94; background:#e8f0fd; }
.case-list { padding:0 24px 16px; overflow:auto; flex:1; }
.case-row { display:flex; width:100%; align-items:center; gap:16px; padding:14px; margin:8px 0; border:1px solid #d6deea; border-radius:7px; background:#fff; text-align:left; color:inherit; font:inherit; }
button.case-row { cursor:pointer; }
.case-row b { display:block; font-weight:550; overflow-wrap:anywhere; }
.case-row small { display:block; color:#53647b; margin-top:4px; }
.case-file-icon { width:44px; height:50px; display:grid; place-items:center; border:1px solid #9bb1ce; color:#2866c7; font-size:26px; border-radius:3px; background:#edf3fb; flex-shrink:0; }
.case-file-icon.case-missing { border-style:dashed; color:#68758a; background:#f4f6f9; }
.case-thumb { width:44px; height:50px; object-fit:cover; border:1px solid #c5cfdf; border-radius:3px; }
.case-feedback { padding:0 24px; margin:0; min-height:24px; color:#174a94; }
.case-actions { padding:16px 24px; display:flex; justify-content:flex-end; border-top:1px solid #d6deea; }
.case-primary { background:#2866c7; color:#fff; border-color:#2866c7; }
.case-btn:disabled { opacity:.5; cursor:default; }
.evidence-full { max-width:100%; max-height:70vh; object-fit:contain; display:block; margin:auto; }
.evidence-text { white-space:pre-wrap; color:#182537; }
.crop-canvas { width:100%; max-height:45vh; aspect-ratio:1; object-fit:contain; background:#101820; }
.crop-controls { display:grid; gap:12px; padding-top:12px; }
.crop-controls label { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.crop-controls input { width:65%; min-height:44px; }
.investigation-phone { min-height:60vh; margin:-8px; }
.investigation-phone .case-header,.investigation-phone .case-tabs,.investigation-phone .case-actions { padding:16px; }
.investigation-phone .case-list { padding:0 16px 12px; }
.investigation-phone .case-header h2 { font-size:20px; }
.detective-note { position:absolute; right:36px; top:32px; width:250px; padding:20px; background:#fff2b8; color:#463f22; box-shadow:0 5px 20px #0004; font:14px/1.5 system-ui,sans-serif; transform:rotate(1deg); }
.detective-note strong { display:block; margin-bottom:10px; }
.review-photo { width:100%; max-height:240px; object-fit:contain; background:#161a20; }
@media(max-width:760px) { .detective-note { right:12px; top:12px; width:190px; padding:12px; font-size:12px; } .case-header { padding:16px; } .case-tabs { padding:12px 16px; } .case-list { padding:0 16px 12px; } }

.case-sheet .sheet { background:#fff; color:#182537; padding:16px 20px; display:flex; flex-direction:column; height:100dvh; max-height:100dvh; }
.case-sheet .protocol-header { flex-shrink:0; color:#53647b; border-color:#d6deea; margin-bottom:16px; }
.case-sheet .protocol-code { color:#53647b; }
.case-sheet .protocol-close { color:#182537; }
.case-sheet .protocol-heading,.case-sheet .protocol-bottom,.case-sheet > .sheet > .actions { display:none; }
.case-sheet .protocol-body { flex:1; min-height:0; padding:0; overflow:visible; }
.case-sheet .investigation-phone { height:100%; min-height:0; margin:0; }
.case-sheet .case-tabs { gap:4px; flex-wrap:nowrap; }
.case-sheet .case-tabs button { font-size:13px; padding:8px 10px; }
.case-sheet .case-actions { gap:8px; flex-wrap:wrap; }
#checkin { overflow:visible; }
#checkin::after { content:none; }

.case-sheet .protocol-header { background:#fff; }
.case-sheet .protocol-header span,.case-sheet .protocol-header button { color:#53647b; }
/* Casework: a focused evidence workspace. */
.investigation { --case-navy:#15283e; --case-gold:#d1b779; font-family:"Segoe UI",Arial,sans-serif; display:grid; grid-template-columns:190px minmax(0,1fr); grid-template-rows:auto auto minmax(0,1fr) auto auto; background:#f4f6f9; }
.case-header { grid-column:1/-1; padding:22px 26px; background:var(--case-navy); color:#f5f7fb; border-bottom:3px solid var(--case-gold); align-items:center; }
.case-identity { display:flex; align-items:center; gap:17px; min-width:0; }
.case-seal { display:block; flex:none; width:46px; height:52px; color:var(--case-gold); }
.case-seal svg { width:100%; height:100%; }
.case-kicker { color:#d1b779; font:10px/1.5 "Segoe UI",sans-serif; letter-spacing:2px; font-weight:600; }
.case-header h2 { font-size:23px; font-weight:600; letter-spacing:-.4px; margin:2px 0 9px; }
.case-header-meta { display:flex; flex-wrap:wrap; gap:8px 16px; color:#cad5e2; font-size:11px; }
.case-classification { font-size:9px; letter-spacing:1px; color:#eddaa9; border:1px solid #d1b77966; padding:0 5px; }
.case-progress { min-width:130px; gap:4px; }
.case-progress > span { color:#cad5e2; font-size:9px; letter-spacing:1.3px; }
.case-progress b { font-size:24px; font-weight:400; letter-spacing:1px; }
.case-progress progress { height:4px; border:0; background:#ffffff25; border-radius:0; accent-color:#d1b779; }
.case-progress progress::-webkit-progress-bar { background:#ffffff25; }
.case-progress progress::-webkit-progress-value { background:#d1b779; }
.case-tabs { grid-column:1; grid-row:2/6; display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:5px; padding:24px 12px; background:#eaf0f5; border-right:1px solid #d9e1ea; }
.case-nav-heading { color:#64758b; font-size:10px; letter-spacing:1.4px; font-weight:600; margin:0 12px 13px; }
.case-tabs button { display:flex; align-items:center; justify-content:space-between; text-align:left; border:1px solid transparent; border-radius:4px; background:transparent; color:#48596e; padding:10px 12px; min-height:44px; font-size:13px; }
.case-tabs button::after { content:attr(data-count); font-size:10px; color:#52647c; font-variant-numeric:tabular-nums; }
.case-tabs button:hover { background:#dfe8f1; }
.case-tabs button.selected { background:#fff; color:#173b65; border-color:#d0dce8; box-shadow:inset 3px 0 #214c78,0 1px 3px #15283e08; font-weight:600; }
.case-section { grid-column:2; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:24px 26px 16px; }
.case-section-kicker { color:#69798c; font-size:9px; letter-spacing:1.4px; }
.case-section h3 { font-size:21px; font-weight:600; margin:2px 0 0; color:#172a40; }
.case-folder-summary { font-size:11px; color:#5e6e81; }
.case-list { grid-column:2; padding:0 26px 20px; min-height:0; }
.case-row { padding:15px 16px; margin:0 0 9px; gap:14px; border:1px solid #dce3eb; border-radius:5px; box-shadow:0 1px 2px #15283e04; min-height:80px; }
button.case-row:hover { border-color:#8fa7c0; background:#fcfdff; box-shadow:0 3px 10px #15283e0c; }
.case-row:focus-visible,.case-tabs button:focus-visible,.case-btn:focus-visible { outline:2px solid #2866c7; outline-offset:2px; }
.case-row-info { flex:1; min-width:0; }
.case-row b { font-size:13px; font-weight:600; color:#24364c; }
.case-row small { font-size:11px; color:#67788d; margin-top:5px; }
.case-file-icon { width:34px; height:42px; border-radius:2px; border:1px solid #b5c8dc; background:#eef4fa; color:#315b86; font-size:22px; }
.case-thumb { width:34px; height:42px; border-radius:2px; }
.case-row.is-missing { background:#f8fafc; border-style:dashed; box-shadow:none; }
.case-missing { color:#758599; }
.case-status { display:inline-flex; align-items:center; gap:5px; flex:none; font-size:10px; color:#69788b; padding:3px 7px; border:1px solid #dae1e9; border-radius:3px; background:#f0f3f7; }
.case-status.recovered { color:#32664f; background:#eef7f1; border-color:#c9dfd2; }
.case-status.recovered::before { content:""; width:4px; height:4px; border-radius:50%; background:#448662; }
.case-feedback { grid-column:2; padding:0 26px; font-size:12px; }
.case-feedback:empty { min-height:0; }
.case-actions { grid-column:2; gap:10px; padding:14px 26px; background:#fff; border-top:1px solid #dce3eb; }
.case-btn { border-radius:4px; min-height:38px; font-size:12px; font-weight:600; background:#f8fafc; border-color:#bccbdd; color:#254666; }
.case-primary { background:#214c78; color:#fff; border-color:#214c78; }
.case-btn:hover:not(:disabled) { background:#e8eff7; }
.case-primary:hover:not(:disabled) { background:#173b65; }
.evidence-sheet .sheet { background:#edf0f4; color:#20344d; --bg:#edf0f4; --ink:#20344d; --muted:#52647b; --soft:#fff; }
.evidence-sheet .protocol-header { background:#15283e; color:#e2c98c; border-color:#d1b779; }
.evidence-sheet .protocol-code,.evidence-sheet .protocol-close { color:#f4e6c3!important; }
.evidence-sheet .protocol-kicker,.evidence-sheet .protocol-bottom { display:none; }
.evidence-sheet .protocol-heading h2 { color:#20344d; font:600 22px/1.4 "Segoe UI",sans-serif; letter-spacing:0; overflow-wrap:anywhere; }
.evidence-sheet .protocol-body { padding:28px; background:#fff; box-shadow:0 3px 14px #14283e12; margin:0 auto; width:min(100%,850px); }
.evidence-sheet .evidence-text { font:15px/1.9 "Segoe UI",sans-serif; color:#24364c; margin:0; }
.evidence-sheet .actions .big-btn { background:#214c78; color:#fff; border-color:#214c78; font:600 13px "Segoe UI",sans-serif; min-height:42px; letter-spacing:0; }
@media(max-width:760px) {
 .investigation { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto minmax(0,1fr) auto auto; }
 .case-header { padding:17px 16px; gap:12px; }
 .case-identity { gap:10px; }
 .case-seal { width:30px; height:37px; }
 .case-header h2,.investigation-phone .case-header h2 { font-size:17px; margin-bottom:6px; }
 .case-kicker { font-size:8px; letter-spacing:1px; }
 .case-header-meta { gap:4px 8px; font-size:9px; }
 .case-progress { min-width:65px; }
 .case-progress b { font-size:19px; }
 .case-progress > span { font-size:8px; letter-spacing:.4px; }
 .case-tabs { grid-column:1; grid-row:auto; flex-direction:row; border-right:0; border-bottom:1px solid #d9e1ea; padding:10px!important; gap:4px; }
 .case-nav-heading { display:none; }
 .case-tabs button,.case-sheet .case-tabs button { flex:1; justify-content:center; min-width:0; padding:8px 4px; font-size:12px; }
 .case-tabs button::after { display:none; }
 .case-section,.case-list,.case-feedback,.case-actions { grid-column:1; }
 .case-section { padding:14px 16px; }
 .case-section h3 { font-size:18px; }
 .case-folder-summary { font-size:10px; }
 .case-list { padding:0 16px 12px; }
 .case-row { padding:12px 10px; gap:10px; min-height:72px; }
 .case-status { font-size:9px; padding:2px 4px; }
 .case-row b { font-size:12px; }
 .case-actions { padding:12px 16px; }
 .case-btn { min-height:44px; }
 .evidence-sheet .protocol-body { padding:20px; }
}
.case-nav-heading,.case-section-kicker,.case-row small,.case-status { color:#52647b; }
.case-file-icon.case-missing { color:#52647b; }
.investigation .case-header h2 { font-family:"Segoe UI",Arial,sans-serif; font-weight:600; }
.evidence-sheet .sheet .actions { background:transparent; padding:16px 0 0; border:0; }
.evidence-sheet .sheet .actions .big-btn.primary { background:#214c78; color:#fff; border:1px solid #214c78; border-radius:4px; }
.evidence-sheet .protocol-code::before { display:none; }
/* Phone: keep the evidence counter on one line. */
.investigation-phone .case-progress b { font-size: 20px; white-space: nowrap; }
.investigation-phone .case-progress { min-width: 84px; }
.case-feedback.good { color: #1f7a45; }
.case-feedback.bad { color: #b3261e; }
