.tcs-overlay{position:fixed;inset:0;z-index:10060;background:rgba(15,23,42,.55);display:grid;place-items:center;padding:20px}
.tcs-dialog{width:min(1080px,100%);height:min(760px,calc(100vh - 40px));display:flex;flex-direction:column;background:var(--bg-card,#fff);color:var(--text,#162033);border:1px solid var(--border,#dbe3ef);border-radius:14px;box-shadow:0 20px 60px rgba(15,23,42,.22);overflow:hidden}
.tcs-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border,#dbe3ef);gap:16px}
.tcs-dialog h2{font-size:18px;line-height:1.3;margin:0 0 3px;font-weight:750}
.tcs-dialog header span{font-size:12px;color:#64748b}
.tcs-dialog #tcs-close{border:0;background:transparent;color:#526176;font-size:27px;line-height:1;cursor:pointer;padding:2px 8px;border-radius:7px}
.tcs-dialog #tcs-close:hover{background:#f1f5f9}
.tcs-body{display:grid;grid-template-columns:340px minmax(0,1fr);min-height:0;flex:1}
.tcs-body aside{border-right:1px solid var(--border,#dbe3ef);padding:14px;display:flex;flex-direction:column;min-height:0}
.tcs-body aside input{width:100%;box-sizing:border-box;border:1px solid var(--border,#cbd5e1);border-radius:8px;padding:10px 12px;font:inherit;font-size:13px;outline:none}
.tcs-body aside input:focus,.tcs-field select:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
#tcs-list{overflow:auto;margin-top:12px;min-height:0}
.tcs-item{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:3px;text-align:left;background:transparent;border:1px solid transparent;border-bottom-color:var(--border,#e2e8f0);padding:10px 11px;border-radius:8px;cursor:pointer;color:inherit;font:inherit}
.tcs-item b{font-size:13px;font-weight:700}.tcs-item span{font-size:11.5px;color:#64748b;line-height:1.4}
.tcs-item:hover,.tcs-item.active{border-color:#bfdbfe;background:#eff6ff}
#tcs-detail{padding:22px 24px;overflow:auto;min-width:0}
.tcs-empty{padding:24px;color:#64748b;font-size:13px;text-align:center}
.tcs-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}.tcs-head h3{margin:0 0 5px;font-size:19px}.tcs-head span{font-size:12px;color:#64748b}
.tcs-tag{background:#e8f0ff;border-radius:999px;padding:5px 10px;color:#1d4ed8!important;font-weight:700;white-space:nowrap}
.tcs-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 20px;margin:0 0 20px}.tcs-facts div{border-bottom:1px solid var(--border,#e2e8f0);padding-bottom:9px;min-width:0}.tcs-facts dt{font-size:11px;color:#64748b;margin-bottom:3px}.tcs-facts dd{font-size:13px;margin:0;overflow-wrap:anywhere;font-weight:600}
.tcs-history{border:1px solid var(--border,#e2e8f0);border-radius:10px;margin:0 0 20px;overflow:hidden}.tcs-history h4{font-size:13px;margin:0;padding:12px 14px;background:#f8fafc;border-bottom:1px solid var(--border,#e2e8f0)}.tcs-history h4 span{color:#64748b;font-weight:500}.tcs-history-empty{padding:14px;color:#64748b;font-size:12px}.tcs-history-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 14px;border-top:1px solid var(--border,#e2e8f0)}.tcs-history-row:first-child{border-top:0}.tcs-history-row>div{min-width:0}.tcs-history-row a{display:block;font-size:12px;font-weight:700;color:#1d4ed8;overflow-wrap:anywhere}.tcs-history-row div span{display:block;color:#64748b;font-size:11px;margin-top:3px}.tcs-history-status{flex:none;font-size:11px;font-weight:700;border-radius:999px;padding:4px 8px;background:#e0f2fe;color:#0369a1}.tcs-history-status.used{background:#dcfce7;color:#15803d}.tcs-history-status.discarded{background:#f1f5f9;color:#64748b}
.tcs-field{margin:0 0 17px}.tcs-field>b,.tcs-field>label{font-size:12px;font-weight:700;display:block;margin-bottom:7px}.tcs-field pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12.5px;line-height:1.55;padding:12px;border-radius:8px;background:#f8fafc;border:1px solid var(--border,#e2e8f0);max-height:170px;overflow:auto;margin:0}.tcs-field p{font-size:12.5px;margin:0;line-height:1.5}
.tcs-field select{width:100%;border:1px solid var(--border,#cbd5e1);border-radius:8px;padding:10px;font:inherit;font-size:13px;background:var(--bg-card,#fff);color:inherit;outline:none}
.tcs-warning{color:#9a3412;font-size:12px!important;margin:7px 0 0!important}
.tcs-confirm{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.4;cursor:pointer}.tcs-confirm input{margin-top:2px;accent-color:#2563eb}
.tcs-actions{display:flex;justify-content:flex-end;margin-top:16px}.tcs-actions button{border:0;border-radius:8px;background:#2563eb;color:#fff;padding:10px 16px;font-size:13px;font-weight:700;cursor:pointer}.tcs-actions button:hover{background:#1d4ed8}.tcs-actions button:disabled{background:#94a3b8;cursor:not-allowed}
.tcs-error{color:#b91c1c;font-size:12px;padding:0 22px 12px}.tcs-error:empty{display:none}
@media(max-width:740px){.tcs-overlay{padding:0}.tcs-dialog{height:100vh;border-radius:0}.tcs-body{display:flex;flex-direction:column}.tcs-body aside{border-right:0;border-bottom:1px solid var(--border,#dbe3ef);height:190px;flex:none}.tcs-body #tcs-detail{padding:16px;flex:1}.tcs-facts{grid-template-columns:1fr 1fr;gap:8px}.tcs-history-row{align-items:flex-start;flex-direction:column;gap:6px}.tcs-dialog>header{padding:14px 16px}}
