
.jobsite-page { grid-column:1 / -1; min-width:0; }
.job-workspace { padding:24px; display:grid; gap:28px; }
.job-workspace label { display:grid; gap:8px; min-width:0; font-size:14px; color:var(--muted); }
.job-workspace input:not([type=file]),.job-workspace select { box-sizing:border-box; width:100%; min-width:0; height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--panel); font:inherit; }
.job-project { max-width:760px; }.job-project p,.job-hint { font-size:13px; color:var(--muted); }
.job-fields { display:grid; grid-template-columns:2fr 1.5fr; gap:16px; }
.job-capture-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.job-capture-actions label { position:relative; display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; cursor:pointer; color:var(--ink); overflow:hidden; }
.job-capture-actions label:has(input:disabled){opacity:.5;cursor:default}
.job-capture-actions svg { width:22px; height:22px;flex-shrink:0; }
.job-capture-actions input { position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer; }
.job-capture-actions label:focus-within {outline:2px solid var(--brand);outline-offset:2px}
.job-queue { display:grid;gap:14px;margin-top:18px; }
.job-queued { display:grid;grid-template-columns:180px minmax(0,1fr);gap:20px;padding:16px;border:1px solid var(--line);border-radius:12px; }
.job-thumb img,.job-thumb video { width:100%;max-height:200px;object-fit:contain;border-radius:8px;background:var(--panel-soft); }
.job-file-fields { display:grid;gap:10px;min-width:0; }
.job-file-fields strong { overflow-wrap:anywhere; }.job-file-fields small{color:var(--muted)}
.job-file-fields button { justify-self:start; }
.job-empty { padding:24px;border:1px dashed var(--line);border-radius:10px;color:var(--muted); }
.job-save-bar { position:sticky;bottom:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;padding:14px;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-control); }
.job-library-heading { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.job-filters { display:grid;grid-template-columns:1fr 2fr;gap:16px;margin:14px 0; }
.job-session { border:1px solid var(--line);border-radius:12px;margin:12px 0;overflow:hidden; }
.job-session summary { display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;padding:18px; }
.job-session summary span:first-child{display:grid;gap:6px;min-width:0}.job-session summary strong{overflow-wrap:anywhere}
.job-session small { color:var(--muted); }
.job-gallery { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;padding:18px;border-top:1px solid var(--line); }
.job-gallery article { min-width:0; }.job-gallery p { white-space:pre-wrap;overflow-wrap:anywhere; }
.job-gallery img,.job-gallery video { width:100%;max-height:600px;object-fit:contain;margin:12px 0; }
.job-gallery a{display:inline-flex;margin:8px 0}
.job-media-placeholder { padding:20px;background:var(--panel-soft);font-size:13px;text-align:center; }
@media(max-width:720px){.job-workspace{padding:16px}.job-fields,.job-filters{grid-template-columns:1fr}.job-queued{grid-template-columns:1fr}.job-thumb img,.job-thumb video{max-height:260px}.job-capture-actions{display:grid;grid-template-columns:1fr 1fr}.job-capture-actions label:last-child{grid-column:1/-1}.job-save-bar{bottom:env(safe-area-inset-bottom,0px)}.job-save-bar button{white-space:normal}.jobsite-page h1{font-size:24px}}

.jobsite-page[hidden],.job-workspace [hidden] { display:none !important; }

.job-workspace .job-hint { margin:0; padding-top:16px; line-height:1.5; }

.job-capture-top .job-capture-actions { margin-top:0; }

.job-capture-actions button {display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;}
.job-camera {position:fixed;inset:0;width:min(100%,800px);height:100dvh;max-height:100dvh;max-width:100vw;margin:auto;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));box-sizing:border-box;border:0;background:#181818;color:white;}
.job-camera[open] {display:flex;flex-direction:column;gap:14px;}
.job-camera::backdrop {background:rgba(0,0,0,.85);}
.job-camera-header,.job-camera-bottom {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.job-camera video {width:100%;flex:1;min-height:0;object-fit:contain;background:#000;}
.job-camera p {margin:0;min-height:2.5em;color:#eee;font-size:14px;}
.job-camera button,.job-camera-fallback {padding:12px 18px;border:1px solid #aaa;border-radius:10px;background:#fff;color:#181818;font:inherit;cursor:pointer;}
.job-camera button:disabled {opacity:.45;}
.job-camera [data-camera-shutter] {background:var(--brand,#68715e);color:white;min-height:56px;}
.job-camera-fallback {font-size:13px;background:transparent;color:white;}

.job-save-bar { flex-wrap:wrap; }
.job-save-bar [data-job-notice] { flex-basis:100%;margin:0;overflow-wrap:anywhere; }
.job-save-bar [data-job-notice]:empty { display:none; }

.job-queue {grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:0;}
.job-queued {position:relative;display:block;min-width:0;padding:0;border-radius:10px;overflow:hidden;aspect-ratio:1;}
.job-thumb {height:100%;}
.job-thumb img,.job-thumb video {display:block;width:100%;height:100%;max-height:none;object-fit:cover;border-radius:0;}
.job-remove-thumb {position:absolute;top:5px;right:5px;width:32px;height:32px;display:grid;place-items:center;padding:0;border:1px solid #fff;border-radius:50%;background:rgba(0,0,0,.7);color:#fff;font:24px/1 sans-serif;cursor:pointer;}
.job-remove-thumb:disabled {opacity:.4;}
.job-queue>.job-empty {grid-column:1/-1;}
.job-session-details {margin-top:24px;display:grid;gap:16px;}
.job-session-details .job-project {max-width:none;}
.job-session-details .job-project p {margin-bottom:0;}

.file-card.compact.jobsite-vault-card {grid-template-rows:auto auto;align-self:start;min-height:0;height:auto;}
.file-card.compact.jobsite-vault-card .file-actions {display:block;width:100%;height:54px;min-height:54px;}
.file-card.compact.jobsite-vault-card .file-actions::after {display:none;content:none;}
.file-card.compact.jobsite-vault-card .file-view {display:flex;align-items:center;justify-content:center;width:100%;height:54px;margin:0;padding:12px;border:0;border-radius:0;box-shadow:none;}

.job-gallery {grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;padding:14px;}
.job-saved-thumb {position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:0;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--panel-soft);color:var(--ink);cursor:pointer;font:inherit;}
.job-saved-thumb img,.job-saved-thumb video {width:100%;height:100%;object-fit:cover;margin:0;pointer-events:none;}
.job-saved-thumb .job-play {position:absolute;inset:auto 8px 8px auto;padding:5px 8px;background:#222b;color:white;border-radius:6px;}
.job-media-viewer {width:min(960px,94vw);max-height:92dvh;box-sizing:border-box;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);}
.job-media-viewer::backdrop {background:#000b;}
.job-media-viewer header {display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px;}
.job-media-viewer header button {padding:10px 18px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit;cursor:pointer;}
.job-media-content img,.job-media-content video {display:block;width:100%;max-height:70dvh;object-fit:contain;}
.job-media-content a {display:inline-flex;margin-top:12px;}

.file-card.compact.jobsite-vault-card .file-actions:has([data-job-add]) {display:grid;grid-template-columns:1fr 1fr;}
.file-card.compact.jobsite-vault-card [data-job-add] {border-left:1px solid var(--line);}

/* Keep mobile previews readable, with additional columns on wider screens. */
.job-queue,.job-gallery {grid-template-columns:repeat(auto-fill,minmax(160px,1fr));}
@media(max-width:600px){.job-queue,.job-gallery {grid-template-columns:repeat(2,minmax(0,1fr));}}

.job-session [data-job-delete] { margin-bottom:12px; }

.job-viewer-nav {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;}
.job-viewer-nav button {padding:10px 14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit;cursor:pointer;}
.job-viewer-nav button:disabled {opacity:.4;cursor:default;}
.job-media-content img {touch-action:pan-y pinch-zoom;}
