  /* Project templates: management modal + editor modal (see templates.js) */
  #templates-overlay, #template-editor-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6,7,10,0.72);
    align-items: center;
    justify-content: center;
    z-index: 100;
  }
  #templates-overlay.visible, #template-editor-overlay.visible { display: flex; }
  #templates-overlay .modal-card { width: 560px; }

  #templates-toolbar { margin-bottom: 12px; }
  #templates-toolbar .primary {
    background: var(--accent); border: none; color: #070605; font-weight: 700;
    border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer;
  }

  #templates-list { display: flex; flex-direction: column; gap: 8px; }
  #templates-empty { color: var(--text-dim); font-size: 12.5px; padding: 10px 0; }

  .template-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .template-row .body { flex: 1; min-width: 0; }
  .template-row .name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
  .template-row .agent-badge {
    color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--border);
  }
  .template-row .desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
  .template-row .meta { font-size: 10.5px; color: var(--text-dim); margin-top: 6px; opacity: 0.75; }

  /* New-project-modal template picker row: select + "Manage templates" link */
  .template-picker-row { display: flex; align-items: center; gap: 10px; }
  .template-picker-row select { flex: 1; }
  .template-picker-row .link-btn { flex-shrink: 0; white-space: nowrap; font-size: 11.5px; }
