/* Scoped additions inside the existing Field > Packages tabs. */
.package-preview { margin:12px 0; padding-top:8px; border-top:1px solid #aaa; font:inherit; color:inherit; max-width:1100px; }
.package-preview * { box-sizing:border-box; }
.package-preview [hidden] { display:none !important; }
.package-preview h2 { margin:0 0 4px; font-size:16px; line-height:1.3; color:inherit; }
.package-preview h3 { margin:0 0 8px; font-size:13px; color:inherit; }
#PackagesPreviewMarkup .pp-section-head h2, #PackagesPreviewTorque .pp-section-head h2, #PackagesPreviewDrawings .pp-section-head h2, #PackagesPreviewPunch .pp-section-head h2 { color:#8F5A5B; }
.package-preview p { margin:0 0 8px; }
.package-preview .pp-status { padding:5px 8px; margin-bottom:8px; border:1px solid #ccc; background:#f5f5f5; font-size:11px; }
.package-preview .pp-status.error { border-color:#b66; background:#fff1ef; color:#842d25; }
.package-preview .pp-status.success { border-color:#9b9; background:#f1f7f1; }
.package-preview button,.package-preview .pp-button { font:inherit; padding:3px 8px; cursor:pointer; border:1px solid #aaa; border-radius:2px; background:#f4f4f4; color:inherit; text-decoration:none; display:inline-block; line-height:1.4; }
.package-preview button:hover,.package-preview .pp-button:hover { background:#e5e5e5; }
.package-preview button.primary { font-weight:bold; }
.package-preview button.danger { color:#a22d24; }
.package-preview button:disabled,.package-preview input:disabled,.package-preview select:disabled,.package-preview textarea:disabled { opacity:.55; cursor:default; }
.package-preview button:focus-visible,.package-preview a:focus-visible,.package-preview input:focus,.package-preview select:focus,.package-preview textarea:focus { outline:2px solid #7196b1; outline-offset:1px; }
.package-preview .pp-section-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:8px; }
.package-preview .pp-muted { color:#666; font-size:11px; }
.package-preview .pp-workspace { display:block; }
.package-preview .pp-card { margin-bottom:9px; padding:10px; border:1px solid #ccc; background:transparent; }
.package-preview .pp-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px 12px; }
.package-preview label { display:block; font-size:11px; font-weight:normal; color:inherit; }
.package-preview input:not([type=checkbox]),.package-preview select,.package-preview textarea { display:block; width:100%; border:1px solid #aaa; border-radius:0; background:white; color:#222; font:inherit; padding:3px 5px; margin-top:2px; min-width:0; }
.package-preview textarea { resize:vertical; min-height:55px; }
.package-preview input[type=checkbox] { vertical-align:middle; margin:6px 5px 6px 0; }
.package-preview input[readonly] { background:#f3f3f3; }
.package-preview .pp-wide { grid-column:1/-1; }
.package-preview .pp-actions,.package-preview .pp-draft-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.package-preview .pp-draft-toolbar { margin-bottom:9px; align-items:flex-end; }
.package-preview .pp-draft-toolbar label { min-width:200px; max-width:420px; flex:1; }
.package-preview .pp-editor-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; padding:6px 0; }
.package-preview .pp-save-state { color:#666; font-size:11px; }
.package-preview .pp-save-state.unsaved { color:#925c15; font-weight:bold; }
.package-preview .pp-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:9px; }
.package-preview .pp-step { padding:5px 8px; border:1px solid #ccc; background:#fafafa; }
.package-preview .pp-step span { display:block; font-size:11px; color:#666; }
.package-preview .pp-step strong { font-size:15px; }
.package-preview .pp-table-wrap { overflow:auto; }
.package-preview table { width:100%; border-collapse:collapse; text-align:left; font:inherit; }
.package-preview th { padding:5px; background:#eee; border:1px solid #bbb; font-weight:bold; }
.package-preview td { padding:5px; border:1px solid #ccc; vertical-align:top; }
.package-preview .pp-pat-list td:last-child { vertical-align:middle; }
.package-preview td button,.package-preview td .pp-button { font-size:11px; padding:2px 5px; min-height:0; margin:0; }
.package-preview .pp-empty { padding:10px; color:#666; border:1px dashed #ccc; }
.package-preview .pp-table-wrap input { min-width:70px; }
.package-preview .pp-punch-table { table-layout:fixed; }
.package-preview .pp-punch-table input { min-width:0; }
.package-preview .pp-completed-by { text-align:center; overflow-wrap:anywhere; }
.package-preview .pp-completed-by input:disabled { opacity:1; }
.package-preview .pp-table-wrap textarea { min-width:130px; min-height:50px; }
.package-preview .pp-doc-title { font-weight:bold; }
.package-preview .pp-equipment { border-top:1px solid #ddd; padding-top:8px; margin-top:8px; }
.package-preview .pp-equipment:first-of-type { border-top:0; margin-top:0; padding-top:0; }
.package-preview .pp-markup-layout { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:10px; align-items:start; }
.package-preview .pp-canvas-scroll { max-height:70vh; overflow:auto; padding:8px; border:1px solid #bbb; background:#ddd; }
.package-preview .pp-canvas { position:relative; width:100%; line-height:0; background:white; }
.package-preview .pp-canvas img { display:block; width:100%; height:auto; }
.package-preview .pp-canvas.adding { cursor:crosshair; }
.package-preview .pp-marker { position:absolute; width:25px; height:25px; padding:0; line-height:23px; border-radius:50%; background:#fff6bf; border:2px solid #b15d13; color:#762f07; font-size:12px; font-weight:bold; transform:translate(-50%,-50%); }
.package-preview .pp-marker.selected { background:#b05014; color:white; outline:2px solid white; }
.package-preview .pp-note { width:100%; text-align:left; margin:0 0 6px; overflow-wrap:anywhere; }
.package-preview .pp-note.selected { background:#fff6df; border-color:#bb8d4d; }
.package-preview .pp-note-editor { border-top:1px solid #ccc; padding-top:8px; margin-top:8px; }
.package-preview .pp-note-editor label { margin-bottom:8px; }
.package-preview .pp-coordinate { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.package-preview .pp-note-hint { padding:6px 8px; border-left:3px solid #bba074; background:#faf6ee; color:#79592f; font-size:11px; margin-bottom:8px; }
@media(max-width:850px) { .package-preview .pp-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .package-preview .pp-markup-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) { .package-preview .pp-form-grid { grid-template-columns:1fr; } .package-preview .pp-section-head { display:block; } .package-preview .pp-section-head button { margin-top:5px; } .package-preview .pp-steps { grid-template-columns:1fr 1fr; } }
