/* Threat Signals pages — theme via CSS variables */

.page-content .ts-page {
    padding: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.ts-stats-row {
    margin-bottom: 20px;
}

.ts-stat-card--info {
    border-left: 3px solid var(--severity-info, #3B82F6);
}

.ts-stat-card--warning {
    border-left: 3px solid var(--severity-warning, #F59E0B);
}

.ts-stat-card--success {
    border-left: 3px solid var(--severity-low, #22C55E);
}

.ts-stat-card--muted {
    border-left: 3px solid var(--text-muted, #8899AA);
}

.ts-filter-bar .ts-input-narrow {
    min-width: 88px;
    max-width: 110px;
}

.ts-loading,
.ts-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary, #C9D4E5);
}

.ts-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ts-badge-ingested {
    background: rgba(59, 130, 246, 0.2);
    color: var(--severity-info, #60A5FA);
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.ts-badge-triaged {
    background: rgba(245, 158, 11, 0.2);
    color: var(--severity-warning, #FBBF24);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ts-badge-validation {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-secondary, #A78BFA);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.ts-badge-validated {
    background: rgba(34, 197, 94, 0.2);
    color: var(--severity-low, #4ADE80);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.ts-badge-dismissed {
    background: rgba(136, 153, 170, 0.15);
    color: var(--text-muted, #8899AA);
    border: 1px solid rgba(136, 153, 170, 0.3);
}

.ts-badge-campaign {
    background: rgba(6, 182, 212, 0.18);
    color: var(--accent-primary, #22D3EE);
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.ts-badge-muted {
    background: rgba(136, 153, 170, 0.12);
    color: var(--text-muted, #8899AA);
}

.ts-conf {
    font-weight: 600;
}

.ts-conf-high {
    color: var(--severity-low, #4ADE80);
}

.ts-conf-mid {
    color: var(--severity-warning, #FBBF24);
}

.ts-conf-low {
    color: var(--severity-critical, #F87171);
}

.ts-conf-muted {
    color: var(--text-muted, #8899AA);
}

.ts-count-badge {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(0, 123, 255, 0.15);
    color: var(--accent-primary, #38BDF8);
    font-size: 12px;
}

/* Detail */
.ts-detail-page {
    padding-bottom: 48px;
}

.ts-back-btn {
    margin-bottom: 12px;
}

.ts-detail-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.ts-id-chip {
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--text-secondary, #C9D4E5);
}

.ts-copy-btn {
    margin-left: 8px;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    background: var(--bg-deepest, #061530);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: var(--text-secondary, #C9D4E5);
}

.ts-section {
    margin-bottom: 24px;
}

.ts-section-card {
    background: var(--bg-surface, #0F2A50);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px 24px;
}

.ts-section-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    margin: 0 0 16px 0;
    color: var(--text-primary, #F7F9FC);
}

.ts-dl {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 16px;
    margin: 0;
    font-size: 14px;
}

.ts-dl dt {
    margin: 0;
    color: var(--text-muted, #8899AA);
}

.ts-dl dd {
    margin: 0;
    color: var(--text-secondary, #C9D4E5);
}

.ts-breakdown-mini {
    margin-top: 12px;
    display: grid;
    gap: 8px;
    max-width: 420px;
}

.ts-breakdown-item {
    display: grid;
    grid-template-columns: 100px 1fr 36px;
    gap: 8px;
    align-items: center;
}

.ts-breakdown-label {
    font-size: 11px;
    color: var(--text-muted, #8899AA);
}

.ts-breakdown-track {
    height: 8px;
    background: var(--bg-deepest, #061530);
    border-radius: 4px;
    overflow: hidden;
}

.ts-breakdown-fill {
    height: 100%;
    background: var(--accent-primary, #007BFF);
    border-radius: 4px;
}

.ts-breakdown-val {
    font-size: 11px;
    text-align: right;
    color: var(--text-secondary, #C9D4E5);
}

.ts-raw-wrap {
    margin-top: 16px;
}

.ts-raw-label {
    font-size: 12px;
    color: var(--text-muted, #8899AA);
    margin-bottom: 6px;
}

.ts-raw-pre {
    max-height: 200px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
    background: var(--bg-deepest, #061530);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary, #C9D4E5);
    white-space: pre-wrap;
    word-break: break-word;
}

.ts-muted {
    color: var(--text-muted, #8899AA);
}

.ts-inline-link {
    color: var(--accent-primary, #38BDF8);
    text-decoration: none;
}

.ts-inline-link:hover {
    text-decoration: underline;
}

.ts-notes-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted, #8899AA);
    margin-bottom: 6px;
}

.ts-notes-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    background: var(--bg-deepest, #061530);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-primary, #F7F9FC);
    resize: vertical;
}

.ts-notes-actions {
    margin: 10px 0 20px;
}

.ts-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ts-btn-danger {
    border-color: var(--severity-critical, #EF4444) !important;
    color: var(--severity-critical, #F87171) !important;
}

.ts-btn-secondary {
    opacity: 0.95;
}

.ts-related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ts-related-card {
    min-width: 200px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: var(--bg-deepest, #061530);
}

.ts-related-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #8899AA);
    margin-bottom: 6px;
}

/* Modal */
.ts-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ts-modal {
    background: var(--bg-surface, #0F2A50);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 20px 24px;
    max-width: 420px;
    width: 100%;
    color: var(--text-primary, #F7F9FC);
}

.ts-modal-title {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.ts-modal-text {
    font-size: 13px;
    color: var(--text-secondary, #C9D4E5);
    margin: 0 0 12px 0;
}

.ts-modal-select {
    width: 100%;
    margin-bottom: 12px;
}

.ts-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

[data-theme="light"] .ts-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
}

/* Validation analysis (LLM transcript review) */
.ts-validation-details {
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 12px 12px 12px;
    background: rgba(0, 0, 0, 0.12);
}

.ts-validation-summary {
    cursor: pointer;
    font-weight: 600;
    padding: 10px 4px;
    list-style-position: outside;
}

.ts-validation-body {
    padding: 4px 4px 0 4px;
}

.ts-val-transcript {
    margin-bottom: 10px;
}

.ts-val-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ts-val-verdict {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

.ts-val-verdict-confirmed {
    background: rgba(239, 68, 68, 0.18);
    color: var(--severity-critical, #EF4444);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.ts-val-verdict-inconclusive {
    background: rgba(245, 158, 11, 0.18);
    color: var(--severity-medium, #F59E0B);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ts-val-verdict-dismissed {
    background: rgba(34, 197, 94, 0.18);
    color: var(--severity-low, #22C55E);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.ts-val-subhead {
    font-size: 14px;
    margin: 14px 0 6px 0;
    color: var(--text-secondary, #C9D4E5);
}

.ts-val-summary-dd {
    white-space: pre-wrap;
}

.ts-val-list,
.ts-val-ol {
    margin: 0 0 8px 16px;
    padding: 0;
    color: var(--text-primary, #F7F9FC);
}

.ts-val-list li {
    margin-bottom: 4px;
}

.ts-val-ol li {
    margin-bottom: 4px;
}

/* Campaign scam profile (LLM synthesis) */
.ts-profile-details {
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 12px 12px 12px;
}

.ts-profile-summary-toggle {
    cursor: pointer;
    font-weight: 600;
    padding: 8px 4px;
}

.ts-profile-details-body {
    padding-top: 8px;
}

.ts-profile-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.ts-profile-badge-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.2);
    color: var(--severity-info, #60A5FA);
    border: 1px solid rgba(59, 130, 246, 0.35);
    text-transform: capitalize;
}

.ts-profile-badge-op {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary, #C9D4E5);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ts-profile-soph {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.ts-profile-soph-low {
    background: rgba(34, 197, 94, 0.18);
    color: var(--severity-low, #22C55E);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.ts-profile-soph-medium {
    background: rgba(245, 158, 11, 0.18);
    color: var(--severity-medium, #F59E0B);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ts-profile-soph-high {
    background: rgba(239, 68, 68, 0.18);
    color: var(--severity-critical, #EF4444);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.ts-profile-section {
    margin-bottom: 18px;
}

.ts-profile-section-title {
    font-size: 15px;
    margin: 0 0 8px 0;
    color: var(--text-primary, #F7F9FC);
}

.ts-profile-summary {
    white-space: pre-wrap;
    line-height: 1.55;
    color: var(--text-secondary, #C9D4E5);
    font-size: 14px;
}

.ts-profile-playbook {
    margin: 0 0 0 20px;
    padding: 0;
    color: var(--text-primary, #F7F9FC);
}

.ts-profile-playbook li {
    margin-bottom: 8px;
    padding-left: 4px;
    border-left: 2px solid rgba(59, 130, 246, 0.4);
}

.ts-profile-list {
    margin: 0 0 8px 16px;
    padding: 0;
    color: var(--text-primary, #F7F9FC);
}

.ts-profile-list li {
    margin-bottom: 4px;
}

.ts-profile-infra {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ts-profile-infra-cell {
    font-size: 13px;
    color: var(--text-secondary, #C9D4E5);
}

.ts-profile-infra-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #8899AA);
    margin-bottom: 4px;
}

.ts-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted, #8899AA);
    margin-top: 8px;
}

.ts-profile-meta-line {
    margin: 0 0 8px 0;
}

.ts-profile-sub {
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 4px 0;
    color: var(--text-secondary, #C9D4E5);
}

/* Recon launch (Epoch 4) */
.ts-btn-recon-primary {
    background: var(--accent-primary, #007bff);
    color: #fff;
    border: 1px solid var(--accent-primary-hover, #1a8cff);
    font-weight: 600;
}

.ts-btn-recon-primary:hover:not(:disabled) {
    background: var(--accent-primary-hover, #1a8cff);
}

.ts-btn-recon-success {
    background: rgba(34, 197, 94, 0.25);
    color: var(--severity-low, #4ade80);
    border: 1px solid rgba(34, 197, 94, 0.45);
    cursor: default;
}

.ts-btn-recon-wait {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-secondary, #a78bfa);
    border: 1px solid rgba(139, 92, 246, 0.4);
    cursor: default;
}

.ts-btn-recon-muted {
    opacity: 0.55;
    cursor: not-allowed;
}

.ts-recon-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.ts-recon-banner-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--severity-low, #4ade80);
}

.ts-recon-banner-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.ts-recon-banner-dismiss {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
    padding: 0 4px;
}

.ts-recon-dl .ts-recon-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.ts-recon-op-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: lowercase;
}

.ts-recon-op-queue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--severity-info, #60a5fa);
}

.ts-recon-op-run {
    background: rgba(245, 158, 11, 0.2);
    color: var(--severity-warning, #fbbf24);
}

.ts-recon-op-done {
    background: rgba(34, 197, 94, 0.2);
    color: var(--severity-low, #4ade80);
}

.ts-recon-op-fail {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.ts-recon-op-muted {
    color: var(--text-muted, #8899aa);
}

.ts-recon-fail-reason {
    color: #fca5a5;
    font-size: 13px;
    white-space: pre-wrap;
}

.ts-recon-modal .ts-modal-text {
    line-height: 1.5;
}

.ts-recon-processing {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--accent-secondary, #a78bfa);
    font-style: italic;
}

/* Recon history — one block per recon run, divided */
.ts-recon-count {
    color: var(--text-muted, #8aa0c0);
    font-weight: 400;
    font-size: 14px;
}

.ts-recon-run {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.ts-recon-run:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

/* Likeliest call-center number indicator */
.ts-likeliest-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.45);
    white-space: nowrap;
}

.ts-likeliest-chip-inline {
    margin-left: 8px;
    vertical-align: middle;
}

/* Multi-select number picker in the launch modal */
.ts-recon-pick-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 16px 0;
}

.ts-recon-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    background: var(--bg-deepest, #061530);
    cursor: pointer;
}

.ts-recon-pick-row-on {
    border-color: rgba(0, 123, 255, 0.5);
    background: rgba(0, 123, 255, 0.08);
}

.ts-recon-pick-num {
    font-weight: 600;
}

.ts-recon-pick-meta {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted, #8aa0c0);
}

.ts-recon-val-card {
    border-left: 3px solid var(--accent-primary, #007bff);
}

.ts-recon-val-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ts-recon-val-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: capitalize;
}

.ts-recon-val-conf {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.ts-recon-val-dis {
    background: rgba(34, 197, 94, 0.2);
    color: var(--severity-low, #4ade80);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.ts-recon-val-inc {
    background: rgba(245, 158, 11, 0.2);
    color: var(--severity-warning, #fbbf24);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ts-recon-val-conf-pct {
    font-size: 13px;
    color: var(--text-secondary, #c9d4e5);
}

.ts-recon-val-status-line {
    font-size: 14px;
    margin: 0 0 12px 0;
    color: var(--text-secondary, #c9d4e5);
}

.ts-recon-val-summary p {
    margin: 8px 0 0 0;
    line-height: 1.5;
    color: var(--text-primary, #f7f9fc);
}

.ts-recon-val-sub {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #8899aa);
    margin-bottom: 6px;
}

.ts-recon-val-block {
    margin-top: 14px;
}

.ts-recon-val-ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary, #c9d4e5);
}

.ts-recon-val-campaign {
    margin: 12px 0;
    font-size: 14px;
}

.ts-recon-val-retry {
    margin-top: 16px;
}

.ts-recon-val-err {
    margin-bottom: 12px;
}

/* ===== Manual threat-signal entry ===== */
.ts-page-header-actions {
    margin-top: 12px;
}

.ts-modal-wide {
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
}

.ts-form-group {
    margin-bottom: 12px;
}

.ts-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #8FA3C0);
    margin-bottom: 6px;
}

.ts-success-banner {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.10);
    border-radius: 6px;
    color: var(--text-primary, #F7F9FC);
    font-size: 13px;
    font-weight: 600;
}
