/* Full-screen audit photo editor; shared type tokens and existing image storage. */
html.crop-editor-open { overflow:hidden; }
#cropModal { position:fixed; inset:auto; top:var(--app-visible-top,0px); left:var(--app-visible-left,0px); width:var(--app-visible-width,100vw); height:var(--app-visible-height,100dvh); max-width:none; max-height:none; margin:0; padding:0; border:0; border-radius:0; background:#080a0d; color:#f6f7f9; z-index:10000; }
#cropModal:not([open]) { display:none; }
#cropModal.open { display:block; }
#cropModal::backdrop { background:#080a0d; }
#cropModal .crop-dialog { box-sizing:border-box; width:100%; height:100%; max-height:none; min-width:0; padding:0; border-radius:0; overflow:hidden; background:#080a0d; display:grid; grid-template-rows:76px minmax(0,1fr) auto; box-shadow:none; }
#cropModal .crop-head { margin:0; padding:0 max(32px,env(safe-area-inset-right)) 0 max(32px,env(safe-area-inset-left)); display:flex; align-items:center; justify-content:space-between; gap:16px; background:#101217; border-bottom:1px solid #ffffff0b; }
#cropModal .crop-head small { display:block; font-size:var(--ui-preview-label-size); font-weight:600; letter-spacing:.13em; color:#8d96a6; margin-bottom:5px; }
#cropModal .crop-head h3 { margin:0; font-size:var(--ui-preview-title-size); font-weight:600; letter-spacing:-.035em; color:#f6f7f9; }
#cropModal .crop-head-actions { display:flex; align-items:center; gap:22px; color:#9ca4b1; font-size:var(--ui-body-size); }
#cropModal button { font-family:inherit; cursor:pointer; box-sizing:border-box; }
#cropModal button:focus-visible,#cropModal input:focus-visible { outline:2px solid #aac9f5; outline-offset:3px; }
#cropModal button:disabled,#cropModal input:disabled { opacity:.5; cursor:wait; }
#cropModal svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:none; }
#cropModal .crop-icon { display:grid; place-items:center; width:40px; height:40px; padding:0; background:transparent; color:#dce0e7; border:0; border-radius:9px; font-size:22px; line-height:1; }
#cropModal .crop-icon:hover { background:#ffffff0c; }
#cropModal .crop-workspace { min-width:0; min-height:0; position:relative; display:flex; align-items:center; justify-content:center; padding:40px 14px 22px; overflow:hidden; }
#cropHint { position:absolute; top:14px; left:12px; right:12px; text-align:center; margin:0; color:#939ba9; font-size:var(--ui-help-size); }
#cropModal .crop-stage { flex:none; position:relative; border-radius:0; background:#111827; overflow:hidden; box-shadow:0 15px 65px #0008; }
#cropModal #cropCanvas { display:block; width:100%; height:100%; max-height:none; touch-action:none; cursor:grab; }
#cropModal #cropCanvas.dragging { cursor:grabbing; }
#cropModal .crop-mode-label { position:absolute; top:12px; left:12px; border:1px solid #ffffff1f; background:#121721dc; color:#e1e6ee; border-radius:6px; padding:7px 10px; font-size:var(--ui-help-size); pointer-events:none; }
#cropModal .crop-mode-label[hidden] { display:none; }
#cropModal .crop-footer { padding:18px max(32px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(32px,env(safe-area-inset-left)); background:#101217; border-top:1px solid #ffffff0c; display:flex; flex-direction:column; align-items:center; gap:18px; }
#cropModal .crop-zoom-row { display:flex; align-items:center; gap:14px; width:300px; max-width:100%; margin:0; }
#cropModal .crop-zoom-row .crop-icon { width:28px; height:28px; flex:none; color:#bbc2ce; }
#cropModal #cropZoom { min-width:0; width:100%; height:3px; margin:0; accent-color:#a8c1e5; }
#cropZoomValue { color:#8f98a8; font-size:var(--ui-help-size); min-width:36px; text-align:right; }
#cropModal .crop-actions { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:20px; }
#cropModal .crop-tools,#cropModal .crop-confirm { display:flex; align-items:center; gap:8px; }
#cropModal .crop-tools { grid-column:2; }
#cropModal .crop-btn { min-height:42px; display:flex; align-items:center; justify-content:center; gap:9px; padding:0 16px; border:1px solid transparent; border-radius:9px; background:transparent; color:#adb6c6; font-size:var(--ui-control-size); font-weight:400; white-space:nowrap; }
#cropModal .crop-btn:hover { background:#ffffff10; }
#cropModal .crop-btn.active { background:#263650; border-color:#405b80; color:#e1ebfa; }
#cropModal .crop-divider { width:1px; height:25px; background:#ffffff12; margin:0 6px; }
#cropModal .crop-confirm { justify-self:end; }
#cropModal .crop-cancel { color:#c5cbd6; }
#cropModal .crop-save { background:#315f9b; border-color:#4573ad; color:white; padding:0 20px; font-weight:600; }
#cropModal .crop-save:hover { background:#3e70af; }
#cropModal .crop-delete-desktop { justify-self:start; color:#d39690; }
#cropModal .crop-delete-mobile,#cropModal .crop-footnote { display:none; }
@media(max-width:1000px) { #cropModal .crop-footer { padding-left:18px; padding-right:18px; } #cropModal .crop-actions { gap:10px; } #cropModal .crop-btn { padding:0 12px; } #cropModal .crop-tools { gap:3px; } #cropModal .crop-divider { margin:0 2px; } }
@media(max-width:700px) {
 #cropModal { --ui-preview-title-size:18px; }
 #cropModal .crop-dialog { grid-template-rows:72px minmax(0,1fr) auto; }
 #cropModal .crop-head { padding:0 16px; } #cropModal .crop-head h3 { font-size:var(--ui-preview-title-size); } #cropModal .crop-head-actions { gap:9px; font-size:var(--ui-help-size); }
 #cropModal .crop-icon { width:36px; height:36px; } #cropModal .crop-delete-mobile { display:grid; } #cropModal .crop-delete-desktop { display:none; }
 #cropModal .crop-footer { padding:14px 14px max(16px,env(safe-area-inset-bottom)); gap:14px; } #cropModal .crop-zoom-row { width:100%; max-width:310px; }
 #cropModal .crop-actions { grid-template-columns:1fr; gap:16px; } #cropModal .crop-tools { grid-column:1; justify-content:space-around; gap:0; }
 #cropModal .crop-btn { font-size:var(--ui-compact-control-size); }
 #cropModal .crop-tools .crop-btn { flex-direction:column; gap:7px; padding:8px 6px; min-width:62px; min-height:58px; font-size:var(--ui-help-size); }
 #cropModal .crop-tools .crop-btn svg { width:21px; height:21px; }
 #cropModal .crop-confirm { grid-column:1; justify-self:stretch; display:grid; grid-template-columns:1fr 1.65fr; gap:10px; }
 #cropModal .crop-confirm .crop-btn { min-height:44px; } #cropModal .crop-cancel { border-color:#ffffff24; background:#ffffff03; }
 #cropModal .crop-footnote { display:block; margin:0; font-size:10px; color:#788394; text-align:center; }
}
@media(max-height:540px) { #cropModal .crop-dialog { grid-template-rows:54px minmax(0,1fr) auto; } #cropModal .crop-head small,#cropModal .crop-footnote { display:none; } #cropModal .crop-footer { padding-top:6px; padding-bottom:6px; gap:4px; } #cropModal .crop-actions { gap:6px; } #cropModal .crop-tools .crop-btn { flex-direction:row; min-height:34px; } #cropModal .crop-confirm .crop-btn { min-height:34px; } }
