/* Task dialog: focused, centered, and separate from the legacy modal shell. */
.tm6-dialog-host{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:28px;font-family:var(--cv-ui-font,Arial,sans-serif);color:#102b3c}
.tm6-dialog-backdrop{position:absolute;inset:0;background:rgba(12,27,37,.48)}
.tm6-dialog-host .tm6-dialog{position:relative;display:flex;flex-direction:column;width:min(1040px,100%);max-height:calc(100dvh - 56px);background:#fff;border:1px solid #d7d9dc;border-radius:22px;overflow:hidden;box-shadow:var(--ch-overlay-shadow,0 4px 10px rgba(16,43,60,.2))}
.tm6-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:26px 30px;background:#102b3c;color:#fff}
.tm6-dialog-host .tm6-dialog-eyebrow{display:block;color:#e4c789;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;margin:0 0 8px}
.tm6-dialog-host .tm6-dialog-header h2{color:#fff;font:700 26px/1.2 var(--cv-ui-font,Arial,sans-serif);letter-spacing:-.03em;margin:0 0 8px}
.tm6-dialog-host .tm6-dialog-header p{font-size:13px;line-height:1.5;color:#e7e8eb;margin:0;max-width:650px}
.tm6-dialog-host .tm6-dialog-close{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;padding:0;border:1px solid #83949e;border-radius:13px;background:transparent;color:white;box-shadow:none;cursor:pointer}
.tm6-dialog-host .tm6-dialog-close:hover{background:#254454;border-color:#fff}
.tm6-dialog-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:28px 30px;background:#fff}
.tm6-dialog-grid{display:grid;grid-template-columns:minmax(0,1fr) 304px;gap:32px}
.tm6-dialog-main,.tm6-dialog-meta{min-width:0}
.tm6-dialog-meta{background:#f5f5f5;border:1px solid #e4e4e4;border-radius:16px;padding:20px;align-self:start}
.tm6-dialog-host .tm6-dialog-meta>h3{font:700 15px/1.4 var(--cv-ui-font,Arial,sans-serif);margin:0 0 20px;color:#102b3c}
.tm6-dialog-field{margin:0 0 22px}
.tm6-dialog-meta>.tm6-dialog-field:last-child{margin-bottom:0}
.tm6-dialog-host .tm6-dialog-field>label,.tm6-dialog-host .tm6-compose>label{display:block;margin:0 0 8px;font-size:13px;font-weight:700;color:#102b3c}
.tm6-dialog-host .tm6-dialog-field label small{font-size:11px;font-weight:400;color:#62676d;margin-left:5px}
.tm6-dialog-host :is(input,select,textarea){width:100%;min-width:0;min-height:42px;margin:0;padding:11px 12px;border:1px solid #c7cbce;border-radius:10px;background:#fff;color:#102b3c;font:400 13px/1.45 var(--cv-ui-font,Arial,sans-serif);box-shadow:none}
.tm6-dialog-host select{padding-right:25px}
.tm6-dialog-host textarea{resize:vertical;min-height:104px}
.tm6-dialog-host input.tm6-task-title{font-size:20px;font-weight:700;line-height:1.4;padding:13px 14px;min-height:56px;letter-spacing:-.02em}
.tm6-dialog-host :is(input,select,textarea):disabled{background:#ededed;color:#41484e;opacity:1;cursor:default;border-color:#ddd}
.tm6-dialog-host :is(button,input,select,textarea,a):focus-visible{outline:3px solid #b99245;outline-offset:3px;box-shadow:none}
.tm6-dialog-host [aria-invalid="true"]{border-color:#a52c2c}
.tm6-meta-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tm6-date-shortcuts{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.tm6-dialog-host .tm6-date-shortcuts button{border:1px solid #d1d2d4;background:#fff;color:#30424c;border-radius:7px;padding:6px 8px;box-shadow:none;font-size:11px;font-weight:600;cursor:pointer}
.tm6-dialog-host .tm6-date-shortcuts button:hover{border-color:#102b3c;background:#f9f9f9}
.tm6-dialog-host .tm6-dialog-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 16px;border:1px solid #bfc5ca;border-radius:11px;background:#fff;color:#102b3c;box-shadow:none;font:700 13px/1.35 var(--cv-ui-font,Arial,sans-serif);cursor:pointer;text-decoration:none}
.tm6-dialog-host .tm6-dialog-button:hover{background:#f2f2f2;border-color:#71818b}
.tm6-dialog-host .tm6-dialog-primary{background:#102b3c;color:#fff;border-color:#102b3c;padding-inline:24px}
.tm6-dialog-host .tm6-dialog-primary:hover{background:#214454;border-color:#214454}
.tm6-dialog-host .tm6-dialog-danger{background:#a83333;border-color:#a83333;color:white}
.tm6-dialog-host .tm6-dialog-danger:hover{background:#8d2929;border-color:#8d2929}
.tm6-dialog-host button:disabled{opacity:.55;cursor:wait}
.tm6-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid #e1e3e5;padding:18px 30px;background:#fff}
.tm6-footer-left,.tm6-footer-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.tm6-footer-left>span{font-size:12px;color:#60666d}
.tm6-dialog-host .tm6-delete-task{background:transparent;border:0;border-radius:8px;padding:8px 0;color:#a13030;box-shadow:none;font-size:12px;cursor:pointer}
.tm6-dialog-host .tm6-delete-task:hover{text-decoration:underline}
.tm6-source-notice{display:flex;gap:20px;align-items:center;justify-content:space-between;background:#f5f5f5;border:1px solid #d8dadd;border-radius:13px;padding:16px 18px;margin-bottom:24px}
.tm6-source-notice strong{font-size:14px}.tm6-source-notice p{font-size:12px;color:#555e64;margin:6px 0 0;line-height:1.5}
.tm6-source-notice button{white-space:nowrap}
.tm6-conversation{border-top:1px solid #e0e3e5;margin-top:28px;padding-top:24px}
.tm6-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.tm6-dialog-host .tm6-section-heading h3{font:700 16px/1.4 var(--cv-ui-font,Arial,sans-serif);margin:0;color:#102b3c}
.tm6-section-heading>span{font-size:12px;color:#676d73}
.tm6-compose{background:#f5f5f5;padding:16px;border:1px solid #e1e3e5;border-radius:14px;margin-bottom:24px}
.tm6-compose>div{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px}
.tm6-compose small{font-size:11px;color:#646a70;line-height:1.5;max-width:210px}
.tm6-comment-list{display:grid;gap:20px}
.tm6-comment{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:10px}
.tm6-comment-avatar{display:grid;place-items:center;border-radius:50%;width:32px;height:32px;background:#102b3c;color:#e4c789;font-size:11px;font-weight:700}
.tm6-comment-copy{min-width:0}
.tm6-comment-copy header{display:flex;align-items:baseline;flex-wrap:wrap;gap:7px 12px;font-size:12px;margin:0 0 7px}
.tm6-comment-copy time{font-size:11px;color:#696f75}
.tm6-comment-copy p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:1.6;color:#38434b}
.tm6-dialog-host .tm6-comment-delete{display:grid;place-items:center;align-self:start;width:30px;height:30px;border:1px solid #d9dcdf;border-radius:9px;background:#fff;color:#873333;box-shadow:none;cursor:pointer;padding:0}
.tm6-comment-delete svg{width:15px;height:15px}
.tm6-comment-empty,.tm6-new-hint{font-size:13px;line-height:1.6;color:#676d73;margin:4px 0 0}
.tm6-new-hint{background:#f5f5f5;border-radius:12px;padding:15px}
.tm6-contributors{display:grid;gap:8px;margin-bottom:10px}
.tm6-contributors>span{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #d5d8db;padding:5px 8px;border-radius:9px;min-width:0}
.tm6-contributors i{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;font-size:10px;font-style:normal;background:#102b3c;color:#fff}
.tm6-contributors b{font-size:12px;font-weight:600;flex:1;overflow-wrap:anywhere}
.tm6-contributors>small{color:#626970;font-size:12px}
.tm6-dialog-host .tm6-contributors button{display:grid;place-items:center;background:transparent;border:0;border-radius:6px;width:24px;height:24px;color:#6c747a;box-shadow:none;padding:0;cursor:pointer}
.tm6-contributors svg{width:14px;height:14px}
.tm6-completion{border-top:1px solid #dcdfe2;padding-top:16px;display:grid;gap:6px;font-size:12px;color:#35674e}
.tm6-field-error{display:block;font-size:12px;color:#a13030;line-height:1.5;margin-top:6px}
.tm6-field-error:empty{display:none}
.tm6-field-errors{padding:16px 18px;border:2px solid #a13030;border-radius:12px;margin:0 0 22px;background:#fff8f8;font-size:13px}
.tm6-field-errors ul{padding-left:20px;margin:9px 0 0}.tm6-field-errors li+li{margin-top:6px}.tm6-field-errors a{color:#a13030;text-decoration:underline}
.tm6-dialog-confirm{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 30px;border-top:1px solid #d7c5a3;background:#fcf6e9}
.tm6-dialog-confirm>div:last-child{display:flex;gap:9px;flex-shrink:0}.tm6-dialog-confirm strong{font-size:14px}.tm6-dialog-confirm p{font-size:12px;line-height:1.5;margin:6px 0 0;color:#57492e}
.tm6-dialog-message{padding:13px 30px;background:#fff1f1;border-top:1px solid #e3b7b7;color:#a13030;font-size:13px;line-height:1.5}
.tm6-dialog-loading{padding:35px 10px;text-align:center;font-size:14px;color:#626970}.tm6-dialog-loading h3{color:#102b3c}.tm6-dialog-loading p{margin:12px 0 20px}
.tm6-dialog-host [hidden]{display:none!important}
/* The existing project and import forms keep their fields and contracts. */
body #modalPanel:has(.tm-modal){border-radius:22px!important;max-width:960px!important;width:calc(100vw - 48px)!important;margin:auto!important;box-shadow:var(--ch-overlay-shadow)!important}
body #modalPanel .tm-modal{padding:30px!important}
body #modalPanel .tm-modal .form-actions{gap:12px;border-top:1px solid #e1e3e5;padding-top:20px;margin-top:24px}
body #modalPanel .tm-modal :is(input:not([type="radio"]):not([type="file"]),select,textarea){border-radius:11px!important}
body #modalPanel .tm-modal :is(.tm-drop,.tm-import-report,.tm-import-sample){border-radius:14px!important}
@media(max-width:780px){.tm6-dialog-host{padding:14px}.tm6-dialog-host .tm6-dialog{max-height:calc(100dvh - 28px);border-radius:18px}.tm6-dialog-header{padding:20px}.tm6-dialog-scroll{padding:20px}.tm6-dialog-grid{grid-template-columns:1fr;gap:22px}.tm6-dialog-meta{grid-row:2}.tm6-dialog-main{display:contents}.tm6-dialog-main>.tm6-dialog-field:first-child{grid-row:1;margin:0}.tm6-dialog-main>.tm6-dialog-field:nth-child(2){grid-row:3;margin:0}.tm6-conversation,.tm6-new-hint{grid-row:4;margin-top:0}.tm6-dialog-footer,.tm6-dialog-confirm{padding:16px 20px}.tm6-dialog-header h2{font-size:23px}.tm6-dialog-confirm{flex-wrap:wrap}.tm6-source-notice{align-items:flex-start;flex-direction:column;gap:12px}.tm6-source-notice button{align-self:flex-start}.tm6-dialog-field{margin-bottom:18px}}
@media(max-width:450px){.tm6-dialog-host{padding:8px}.tm6-dialog-host .tm6-dialog{max-height:calc(100dvh - 16px);border-radius:16px}.tm6-dialog-header,.tm6-dialog-scroll{padding:18px 16px}.tm6-dialog-meta{padding:16px}.tm6-dialog-footer{padding:14px 16px;flex-wrap:wrap}.tm6-footer-left{width:100%;justify-content:space-between;order:2}.tm6-footer-actions{width:100%}.tm6-footer-actions>button{flex:1}.tm6-compose>div{align-items:flex-start;flex-direction:column}.tm6-dialog-host input.tm6-task-title{font-size:18px}.tm6-dialog-confirm{padding:16px}.tm6-dialog-confirm>div:last-child{flex-wrap:wrap}.tm6-dialog-host .tm6-dialog-primary{padding-inline:16px}}
