/* ============================================
   ENGINEERING MAPS — the editor screen (#engScreen) and the project card's
   block. The sheet is PAPER: white in both themes. Everything around it
   wears the shell's tokens (css/design-system.css).
   ============================================ */
#engScreen { display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); color: var(--text-body); font-family: Inter, system-ui, sans-serif; }
.eng-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.eng-back { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--border-btn); border-radius: 8px; background: transparent; color: var(--text-head); cursor: pointer; }
.eng-back svg { width: 18px; height: 18px; }
.eng-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 17px/1.2 "Space Grotesk", Inter, sans-serif; color: var(--text-head); }
.eng-save { font-size: 13px; color: var(--text-muted); }
.eng-save[data-state="conflict"], .eng-save[data-state="error"] { color: var(--red-ink); }
.eng-btn { height: 32px; padding: 0 12px; border: 1px solid var(--border-btn); border-radius: 8px; background: var(--surface); color: var(--text-head); font: 500 13px Inter, sans-serif; cursor: pointer; }
.eng-btn:disabled { opacity: .45; cursor: default; }
.eng-btn-primary { background: var(--gold); border-color: var(--gold); color: #1f2533; }
.eng-btn-quiet { color: var(--red-ink); }
.eng-link { padding: 0; border: 0; background: none; color: var(--gold-ink); font: inherit; text-decoration: underline; cursor: pointer; }
.eng-banner { padding: 8px 16px; border-bottom: 1px solid var(--hairline); background: var(--amber-bg); color: var(--amber-ink); font-size: 13px; }
.eng-body { flex: 1; min-height: 0; display: flex; }
.eng-canvas { position: relative; flex: 1; min-width: 0; overflow: hidden; background: var(--surface-2); cursor: grab; touch-action: none; }
.eng-canvas.eng-panning { cursor: grabbing; }
.eng-canvas svg { display: block; width: 100%; height: 100%; }
.eng-paper { filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .18)); }
.eng-hit { fill: transparent; cursor: pointer; }
.eng-hit:hover { fill: rgba(197, 165, 90, .08); }
.eng-hit-on { fill: rgba(197, 165, 90, .12); stroke: var(--gold); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.eng-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; overflow: hidden; border: 1px solid var(--border-btn); border-radius: 8px; background: var(--surface); }
.eng-zoom button { min-width: 36px; height: 30px; border: 0; border-left: 1px solid var(--hairline); background: transparent; color: var(--text-head); font: 500 13px Inter, sans-serif; cursor: pointer; }
.eng-zoom button:first-child { border-left: 0; }
.eng-empty { padding: 48px; color: var(--text-muted); font-size: 14px; }
.eng-panel { flex: none; width: 380px; overflow-y: auto; padding: 14px 16px 32px; border-left: 1px solid var(--hairline); background: var(--surface); }
.eng-panel-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.eng-row { display: flex; flex-wrap: wrap; gap: 8px; }
.eng-h2 { margin: 18px 0 8px; font: 600 15px "Space Grotesk", Inter, sans-serif; color: var(--text-head); }
.eng-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 12px; color: var(--text-muted); }
.eng-field input, .eng-field textarea { box-sizing: border-box; width: 100%; padding: 7px 9px; border: 1px solid var(--border-btn); border-radius: 6px; background: var(--surface); color: var(--text-strong); font: 13px/1.45 Inter, sans-serif; }
.eng-field textarea { resize: vertical; }
.eng-field input:disabled, .eng-field textarea:disabled { background: var(--surface-2); color: var(--text-body); }
.eng-obj { padding: 10px 0 12px; border-bottom: 1px solid var(--hairline); }
.eng-obj-on { padding-left: 10px; box-shadow: inset 3px 0 0 var(--gold); }
.eng-obj-title { margin: 0 0 2px; font: 600 13px Inter, sans-serif; color: var(--text-head); }
.eng-note { margin: 6px 0; font-size: 13px; color: var(--text-muted); }
.eng-warn { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--amber); background: var(--amber-bg); color: var(--amber-ink); font-size: 12.5px; }
.eng-warn ul { margin: 4px 0 0; padding-left: 18px; }
.eng-tabs { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; border-top: 1px solid var(--hairline); background: var(--surface); }
.eng-tab { flex: none; height: 38px; padding: 0 14px; border: 0; border-top: 2px solid transparent; background: transparent; color: var(--text-muted); font: 500 13px Inter, sans-serif; white-space: nowrap; cursor: pointer; }
.eng-tab-on { border-top-color: var(--gold); color: var(--text-head); }
.eng-tab-num { font-weight: 600; }
.eng-tab-add { color: var(--gold-ink); }
@media (max-width: 900px) {
  .eng-body { flex-direction: column; }
  .eng-panel { width: auto; max-height: 45vh; border-left: 0; border-top: 1px solid var(--hairline); }
}

/* The project card's block (js/eng/eng-crm.js, inside the CRM drawer). */
.crm-eng-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.crm-eng-actions a.crm-btn { display: inline-flex; align-items: center; text-decoration: none; }
.crm-eng-template { height: 32px; padding: 0 8px; border: 1px solid var(--border-btn); border-radius: 6px; background: var(--surface); color: var(--text-strong); font: 13px Inter, sans-serif; }
