/* AuditGuard Tools Widget — shared CSS */
.tw-container{max-width:860px;margin:0 auto;padding:0 16px}
.tw-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:24px;margin-bottom:24px;box-shadow:0 2px 8px rgba(15,23,42,.06)}
.tw-form{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-start}
.tw-input{flex:1;min-width:200px;padding:12px 16px;border:1.5px solid #cbd5e1;border-radius:8px;font-size:1rem;outline:none;font-family:inherit;background:#f8fafc;color:#0f172a;transition:border-color .15s}
.tw-input:focus{border-color:#0f766e;background:#fff}
.tw-btn{padding:12px 24px;background:#0f766e;color:#fff;border:none;border-radius:8px;font-size:1rem;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s;font-family:inherit}
.tw-btn:hover{background:#0d6460}
.tw-btn:disabled{background:#94a3b8;cursor:not-allowed}
.tw-textarea{width:100%;min-height:120px;padding:12px;border:1.5px solid #cbd5e1;border-radius:8px;font-size:.9rem;font-family:'Courier New',monospace;background:#f8fafc;color:#0f172a;resize:vertical;box-sizing:border-box;transition:border-color .15s}
.tw-textarea:focus{border-color:#0f766e;outline:none;background:#fff}
.tw-status{display:block;margin-top:10px;font-size:.9rem;padding:10px 14px;border-radius:8px}
.tw-status--loading{background:#eff6ff;color:#1d4ed8}
.tw-status--error{background:#fef2f2;color:#dc2626}
.tw-status--info{background:#f0f9ff;color:#0369a1}
#tw-results{margin-top:24px}
.tw-error{background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;padding:14px;color:#dc2626}
.tw-warn-box{background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:14px;color:#92400e;margin-top:12px}
.tw-domain-badge{display:inline-block;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;padding:6px 14px;border-radius:20px;font-weight:600;font-size:.9rem;margin-bottom:16px;word-break:break-all}
.tw-badges{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.tw-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:20px;font-size:.82rem;font-weight:600;white-space:nowrap}
.tw-badge--ok{background:#dcfce7;color:#166534}
.tw-badge--warn{background:#fef9c3;color:#854d0e}
.tw-badge--err{background:#fee2e2;color:#991b1b}
.tw-badge--info{background:#e0f2fe;color:#075985}
.tw-table{width:100%;border-collapse:collapse;font-size:.9rem}
.tw-table th,.tw-table td{padding:8px 12px;text-align:left;border-bottom:1px solid #f1f5f9}
.tw-table thead th{background:#f8fafc;font-weight:700;color:#475569;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em}
.tw-table tbody th{color:#64748b;font-weight:600;white-space:nowrap;width:40%}
.tw-table tr:last-child td,.tw-table tr:last-child th{border-bottom:none}
.tw-code{display:block;background:#f8fafc;border:1px solid #e2e8f0;padding:10px 14px;border-radius:6px;font-size:.85rem;font-family:'Courier New',monospace;word-break:break-all;margin-top:6px;color:#0f172a}
.tw-pre{background:#0f172a;color:#e2e8f0;padding:16px;border-radius:10px;font-size:.85rem;font-family:'Courier New',monospace;overflow:auto;white-space:pre-wrap;word-break:break-all;max-height:500px;margin-top:8px}
.tw-pre mark.tw-hl{background:#fde047;color:#0f172a;border-radius:2px}
.tw-record-block{margin-top:14px;padding:12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}
.tw-record-block strong{display:block;font-size:.8rem;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.tw-record-list{margin:0;padding:0 0 0 18px;list-style:disc}
.tw-record-list li{margin:3px 0}
.tw-record-list code{font-size:.82rem;background:#fff;padding:1px 4px;border-radius:3px;border:1px solid #e2e8f0}
.tw-section-label{font-size:.75rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px}
.tw-copy-btn,.tw-minify-btn,.tw-format-btn{padding:6px 14px;background:#e2e8f0;border:none;border-radius:6px;font-size:.85rem;cursor:pointer;font-family:inherit;transition:background .15s}
.tw-copy-btn:hover,.tw-minify-btn:hover,.tw-format-btn:hover{background:#cbd5e1}
.tw-match-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.tw-match{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:8px 12px;font-size:.88rem}
.tw-match-index{display:inline-block;background:#e0f2fe;color:#075985;padding:1px 7px;border-radius:10px;font-size:.75rem;margin-right:8px;font-weight:700}
.tw-nginx-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:600px){.tw-nginx-form{grid-template-columns:1fr}.tw-form{flex-direction:column}}
.tw-field-group{display:flex;flex-direction:column;gap:6px}
.tw-field-group label{font-size:.85rem;font-weight:600;color:#374151}
.tw-field-group input,.tw-field-group select{padding:10px 12px;border:1.5px solid #cbd5e1;border-radius:7px;font-size:.9rem;font-family:inherit;background:#f8fafc;color:#0f172a}
.tw-field-group input:focus,.tw-field-group select:focus{border-color:#0f766e;outline:none;background:#fff}
.tw-checkrow{display:flex;align-items:center;gap:8px;font-size:.9rem}
.tw-checkrow input[type=checkbox]{width:16px;height:16px;accent-color:#0f766e}
.tw-checks-grid{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px}
