/* Admin U1 (admin/copy-templates.js, docs/admin-copy-templates.md): the "คัดลอก" / "แม่แบบ" buttons and their dialog. */
.ct-tools{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center}
.ct-tools[hidden]{display:none}
.ct-button{min-height:36px}
.ct-dialog{width:min(560px,calc(100vw - 32px));max-height:min(86vh,760px);padding:18px 20px;border:1px solid #dfcbb4;border-radius:12px;background:#fffaf2;color:#5a4128;box-shadow:0 18px 50px rgba(60,40,20,.28);overflow:auto;box-sizing:border-box}
.ct-dialog::backdrop{background:rgba(40,28,16,.45)}
.ct-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.ct-head h3{margin:0;font-size:19px;color:#5a4128}
.ct-close{min-width:40px;min-height:40px;font-size:20px;line-height:1}
.ct-status{min-height:1.2em;margin:0 0 6px;font-size:13px;color:#4f7a3a;overflow-wrap:anywhere}
.ct-status.bad{color:#9a3f2b}
.ct-body{display:flex;flex-direction:column;gap:10px}
.ct-body h4{margin:6px 0 0;font-size:14px;color:#735738}
.ct-help{margin:0;font-size:12.5px;line-height:1.55;color:#6b5643}
.ct-search,.ct-name,.ct-source{width:100%;box-sizing:border-box;min-height:40px;padding:8px 10px;border:1px solid #dfcbb4;border-radius:7px;background:#fff;color:#5a4128;font:inherit}
.ct-list{display:flex;flex-direction:column;gap:4px;max-height:44vh;overflow:auto;padding:2px}
.ct-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #efe1cf;border-radius:8px;background:#fff;cursor:pointer}
.ct-row:has(input:checked){border-color:#cba06b;background:#fdf1df}
.ct-row span{display:flex;flex-direction:column;min-width:0}
.ct-row strong,.ct-template strong{overflow-wrap:anywhere}
.ct-row small,.ct-template small{color:#6b5643;font-size:12px;overflow-wrap:anywhere}
.ct-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.ct-save .ct-actions .ct-name{flex:1 1 220px;width:auto}
.ct-save{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px dashed #dfcbb4;border-radius:10px}
.ct-templates{display:flex;flex-direction:column;gap:6px;max-height:40vh;overflow:auto}
.ct-template{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border:1px solid #efe1cf;border-radius:8px;background:#fff}
.ct-template-text{display:flex;flex-direction:column;min-width:0;flex:1 1 200px}
.ct-template-actions{display:flex;gap:6px;flex-wrap:wrap}
.ct-empty{margin:0;font-size:13px;color:#6b5643}
.ct-empty.bad{color:#9a3f2b}
.ct-dialog button{min-height:40px;padding:6px 14px;border-radius:7px;font-size:13px;cursor:pointer}
.ct-dialog .ct-delete{background:#fff;color:#9a3f2b;border:1px solid #c3634e;box-shadow:none}
.ct-dialog .ct-delete:hover{background:#fbe9e3}
@media (max-width:520px){.ct-dialog{padding:14px}.ct-template-actions{width:100%}.ct-template-actions button{flex:1}}
