
:root{--tst-teal:#009ac7;--tst-teal-dark:#007b9f;--tst-dark:#015570;--tst-text:#333;--tst-muted:#6b7280;--tst-light:#f1f2f2;--tst-line:#dde4e8;--tst-orange:#f47b29;--tst-lime:#8dc63f;--tst-red:#dc2626}
.tst-app{font-family:"Open Sans",Arial,sans-serif;color:var(--tst-text);max-width:1240px;margin:24px auto}
.tst-app *{box-sizing:border-box}
.tst-hero{background:linear-gradient(135deg,#fff,#f1f2f2);border:1px solid var(--tst-line);border-radius:22px;padding:24px;display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:18px;box-shadow:0 16px 42px rgba(1,85,112,.12);position:relative;overflow:hidden}
.tst-hero:after{content:"";position:absolute;right:-90px;top:-120px;width:260px;height:260px;border-radius:50%;background:rgba(0,154,199,.12)}
.tst-logo{width:170px;height:auto;display:block;margin-bottom:14px}
.tst-hero h2{font-size:30px;margin:0 0 6px;font-weight:800;color:#333}
.tst-hero p,.tst-muted{color:var(--tst-muted);font-size:13px}
.tst-grid{display:grid;gap:18px;margin-bottom:18px}
.tst-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tst-grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.tst-card{background:#fff;border:1px solid var(--tst-line);border-radius:20px;padding:20px;box-shadow:0 12px 30px rgba(1,85,112,.08);margin-bottom:18px}
.tst-card h3{margin:0 0 14px;font-size:20px;color:#111}
.tst-card h4{margin:20px 0 10px}
.tst-metric span{font-weight:700;font-size:12px;color:var(--tst-muted);display:block}
.tst-metric strong{font-size:34px;color:var(--tst-teal);display:block;margin-top:8px}
.tst-metric.amber strong{color:#f59e0b}.tst-metric.orange strong{color:var(--tst-orange)}.tst-metric.red strong{color:var(--tst-red)}
.tst-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}
.tst-form label,.tst-sig-label{display:block;font-size:12px;font-weight:800;color:#555;text-transform:uppercase;letter-spacing:.3px}
.tst-form input,.tst-form select,.tst-form textarea,.tst-filters input,.tst-filters select,.tst-bulk-line input,.tst-bulk-line select{width:100%;border:1px solid var(--tst-line);border-radius:14px;padding:12px;background:#fff;margin-top:6px;min-height:43px}
.tst-form input:focus,.tst-form select:focus,.tst-bulk-line input:focus,.tst-bulk-line select:focus,.tst-filters input:focus{outline:none;border-color:var(--tst-teal);box-shadow:0 0 0 4px rgba(0,154,199,.12)}
.tst-btn,.tst-pdf-link,.tst-copy{border:0;background:var(--tst-teal-dark);color:#fff!important;text-decoration:none;border-radius:18px;padding:12px 18px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:42px;box-shadow:0 10px 22px rgba(0,123,159,.18)}
.tst-btn:hover,.tst-pdf-link:hover,.tst-copy:hover{background:var(--tst-dark);color:#fff}
.tst-btn-light{background:#f1f2f2;color:#333!important;box-shadow:none}
.tst-actions{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}
.tst-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--tst-line);border-radius:16px;overflow:hidden}
.tst-table th,.tst-table td{padding:12px 13px;border-bottom:1px solid var(--tst-line);font-size:13px;text-align:left;vertical-align:middle}
.tst-table th{background:#f7f9fa;color:#454f57;text-transform:uppercase;font-size:11px;letter-spacing:.4px;font-weight:800}
.tst-table tr:last-child td{border-bottom:0}
.tst-avatar{width:42px;height:42px;object-fit:cover;border-radius:50%;display:inline-grid;place-items:center;background:var(--tst-teal);color:#fff;font-weight:800}
.tst-avatar-empty{line-height:42px;text-align:center}
.tst-badge{display:inline-flex;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800}
.tst-badge.ok{background:rgba(141,198,63,.16);color:#407500}
.tst-badge.warn{background:rgba(244,123,41,.14);color:#a84a07}
.tst-badge.orange{background:rgba(244,123,41,.2);color:#b54800}
.tst-badge.danger{background:rgba(220,38,38,.12);color:#b91c1c}
.tst-bulk-lines{display:grid;gap:10px;margin:16px 0}
.tst-bulk-line{display:grid;grid-template-columns:1.3fr 2fr 1fr .7fr 44px;gap:10px;align-items:end;background:#f8fafb;border:1px solid var(--tst-line);border-radius:16px;padding:12px}
.tst-icon-btn,.tst-plus{border:0;border-radius:12px;background:#e5edf1;color:#333;width:42px;height:42px;font-weight:900;cursor:pointer}
.tst-plus{background:var(--tst-teal);color:#fff;width:32px;height:32px;border-radius:50%}
.tst-details-row{display:none}
.tst-details-row.open{display:table-row}
.tst-details{padding:12px;background:#f8fafb;border-radius:16px}
.tst-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px;margin-bottom:16px}
.tst-link-result{margin-top:16px;background:#e9f8fc;border:1px solid rgba(0,154,199,.25);padding:16px;border-radius:16px;word-break:break-all}
.tst-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.55);z-index:999999;padding:20px}
.tst-modal.open{display:flex}
.tst-modal-box{width:min(760px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;padding:22px;box-shadow:0 30px 90px rgba(0,0,0,.28);position:relative}
.tst-modal-close{position:absolute;right:16px;top:14px;border:0;background:#f1f2f2;border-radius:50%;width:34px;height:34px;font-size:22px;cursor:pointer}
.tst-modal-title{display:flex;gap:18px;align-items:center;border-bottom:1px solid var(--tst-line);padding-bottom:16px;margin-bottom:16px}
.tst-modal-title img{width:130px}
.tst-modal-title h3{margin:0;font-size:22px}
.tst-modal-title p{margin:3px 0 0;color:var(--tst-muted)}
.tst-terms{display:grid;gap:10px;margin-bottom:18px}
.tst-terms label{display:flex;gap:10px;background:#f8fafb;border:1px solid var(--tst-line);border-radius:14px;padding:12px;line-height:1.45;font-size:13px}
.tst-terms input{width:18px;height:18px;flex:0 0 auto;accent-color:var(--tst-teal)}
.tst-camera-stage{position:relative;background:#111;border-radius:18px;overflow:hidden;min-height:300px;display:grid;place-items:center}
.tst-camera-stage video{width:100%;max-height:420px;object-fit:cover;display:block}
.tst-face-overlay{position:absolute;inset:20%;pointer-events:none;border:1px solid rgba(255,255,255,.22)}
.tst-face-overlay span{position:absolute;width:52px;height:52px;border:4px solid var(--tst-lime)}
.tst-face-overlay span:nth-child(1){left:0;top:0;border-right:0;border-bottom:0}.tst-face-overlay span:nth-child(2){right:0;top:0;border-left:0;border-bottom:0}.tst-face-overlay span:nth-child(3){left:0;bottom:0;border-right:0;border-top:0}.tst-face-overlay span:nth-child(4){right:0;bottom:0;border-left:0;border-top:0}
.tst-rec{position:absolute;left:16px;top:14px;color:#fff;background:rgba(0,0,0,.4);border-radius:999px;padding:5px 10px;font-weight:800;font-size:12px}.tst-rec::first-letter{color:#ef4444}
.tst-photo-preview{width:120px;height:90px;object-fit:cover;border-radius:12px;border:2px solid var(--tst-teal);margin-top:10px}
.tst-signature-pad{width:100%;height:160px;background:#fff;border:2px dashed #a8a8aa;border-radius:16px;margin-top:8px;touch-action:none;cursor:crosshair}
#tst-modal-message{margin-top:14px;font-weight:700}
.tst-success-box{margin-top:18px;padding:18px;border-radius:18px;background:#effaf1;border:1px solid rgba(141,198,63,.35)}
.tst-sign-head{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-bottom:18px;border-bottom:1px solid var(--tst-line);padding-bottom:16px}
.tst-sign-photo{width:88px;height:88px;border-radius:50%;object-fit:cover;background:var(--tst-teal);color:white;display:grid;place-items:center;font-weight:900}
@media(max-width:900px){.tst-grid-2,.tst-grid-5,.tst-form,.tst-filters{grid-template-columns:1fr}.tst-bulk-line{grid-template-columns:1fr}.tst-hero{display:block}.tst-table{display:block;overflow:auto}.tst-sign-head{display:block}.tst-actions{justify-content:stretch}.tst-btn{width:100%}}
