/* Create SharePoint (Tool 127, CSPT) */
.cspt { display: flex; flex-direction: column; gap: 0.9rem; }
.cspt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.cspt-title { margin: 0 0 0.2rem; }
.cspt-sub, .cspt-hint { margin: 0; font-size: 0.85rem; }
.cspt-block h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.cspt-fields { width: 100%; border-collapse: collapse; }
.cspt-fields th { text-align: left; font-weight: 600; font-size: 0.85rem; width: 15rem; padding: 0.3rem 0.75rem 0.3rem 0; vertical-align: top; }
.cspt-fields td { padding: 0.25rem 0; vertical-align: top; }
.cspt-fields td:last-child { width: 11rem; padding-left: 0.6rem; }
.cspt-fields input, .cspt-fields textarea, .cspt-grid input { width: 100%; box-sizing: border-box; font: inherit; }
.cspt-fields input[type="date"] { max-width: 12rem; }
.cspt-fields textarea { line-height: 1.4; resize: vertical; }
.cspt-src { display: inline-block; font-size: 0.75rem; color: var(--muted, #64748b); background: var(--surface-2, #f1f5f9); border-radius: 999px; padding: 0.1rem 0.5rem; margin-top: 0.35rem; }
.cspt-src-edited { color: #92400e; background: #fef3c7; }
.cspt-reset { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 0 0 0.2rem; font-size: 0.85rem; }
.cspt-grid { border-collapse: collapse; width: 100%; max-width: 46rem; }
.cspt-grid th { font-size: 0.8rem; font-weight: 600; text-align: left; padding: 0.2rem 0.4rem; }
.cspt-grid td { padding: 0.2rem 0.4rem; }
.cspt-status { margin: 0; font-size: 0.85rem; }
.cspt-status:empty { display: none; }
.cspt-warn { margin: 0; font-size: 0.85rem; color: #b45309; }
.cspt-warn.hidden, .cspt-result.hidden { display: none; }
.cspt-grid input.cspt-edited { background: #fef3c7; }
.cspt-grid td:last-child { white-space: nowrap; }
.cspt-create { font-size: 1rem; padding: 0.55rem 1.3rem; white-space: nowrap; }
.cspt-result { border: 2px solid var(--accent, #2563eb); border-radius: 10px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; scroll-margin-top: 4rem; outline: none; }
.cspt-result-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cspt-result-head h4 { margin: 0; }
.cspt-result-actions { display: flex; gap: 0.5rem; align-items: center; }
.cspt-copy { font-size: 1rem; padding: 0.5rem 1.6rem; }
.cspt-mail { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 0.4rem 0.6rem; align-items: center; }
.cspt-mail label { font-size: 0.85rem; font-weight: 600; }
.cspt-mail input { font: inherit; width: 100%; box-sizing: border-box; }
.cspt-copy-field { font-size: 0.8rem; padding: 0.25rem 0.7rem; }
/* The preview shows exactly what Copy puts on the clipboard: styles come inline from the server;
   it keeps a mail-window width (scrolls in a narrow drawer) so the table wraps as it will in Outlook. */
.cspt-preview { border: 1px solid var(--border, #e2e8f0); border-radius: 6px; padding: 0.8rem 1rem; max-height: 70vh; overflow: auto; background: #fff; color: #000; }
.cspt-preview > div { min-width: 1140px; }  /* email table: 1105px (create_sharepoint.TABLE_W) */
@media (max-width: 760px) { .cspt-fields th { width: auto; } .cspt-mail { grid-template-columns: 1fr auto; } .cspt-mail label { grid-column: 1 / -1; } }
