/* ═══════════════════════════════════════════════════════════════════════
   LiveThreat Scorecard — VERISQ.AI Light Theme
   Brand: Orange accent · Clean white surfaces · Easy on the eyes
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary: #E8600A;
    --primary-light: #F07B2E;
    --primary-dim: #E8600A66;
    --primary-bg: #E8600A0C;
    --primary-border: #E8600A22;
    --primary-hover: #D4570A;
    --advanced: #16a34a;
    --intermediate: #d97706;
    --basic: #dc2626;
    --grade-a: #16a34a;
    --grade-b: #65a30d;
    --grade-c: #d97706;
    --grade-d: #ea580c;
    --grade-f: #dc2626;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --surface: #fafafa;
    --card-raised: #ffffff;
    --text: #1a1a1a;
    --text-mid: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --sidebar-bg: #ffffff;
    --sidebar-text: #6b7280;
    --sidebar-active: #E8600A;
    --blue: #2563eb;
    --purple: #7c3aed;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }

/* ─── Layout ────────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px; background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; z-index: 100;
    border-right: 1px solid var(--border);
}
.sidebar-brand {
    padding: 1.25rem 1.25rem; display: flex; align-items: center; gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.brand-icon { font-size: 1.5rem; }
.brand-text { font-size: 1rem; font-weight: 800; color: var(--text); letter-spacing: 1px; font-family: var(--font-display); }
.brand-dot { color: var(--primary); font-weight: 900; }
.sidebar-nav { flex: 1; padding: 0.5rem 0.4rem; }
.nav-item {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem;
    color: var(--sidebar-text); text-decoration: none; transition: all 0.15s;
    font-size: 0.82rem; border-radius: 6px; margin-bottom: 1px; font-family: var(--font-body);
}
.nav-item:hover { color: var(--text); background: var(--surface); }
.nav-item.active { color: var(--primary); background: var(--primary-bg); border: 1px solid var(--primary-border); font-weight: 600; }
.nav-section-label { display:block; font-size:.6rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color: var(--text-muted); padding:.6rem 1rem .25rem; font-family: var(--font-mono); }
.nav-icon { font-size: 0.9rem; width: 18px; text-align: center; }
.sidebar-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }
.version { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }
.nav-badge { font-size: 7px; padding: 1px 5px; border-radius: 3px; background: var(--primary); color: #fff; font-weight: 800; margin-left: auto; font-family: var(--font-mono); }

.main-content { margin-left: 220px; flex: 1; min-height: 100vh; background: var(--bg); overflow-x: hidden; max-width: calc(100vw - 220px); }
.top-bar { padding: 1rem 2rem; background: var(--card-bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 1.1rem; font-weight: 700; font-family: var(--font-display); }
.content-area { padding: 2rem 2.5rem; min-width: 0; overflow-x: hidden; }

/* ─── Cards ─────────────────────────────────────────────────────────── */
.card {
    background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.5rem; margin-bottom: 1.25rem; border: 1px solid var(--border);
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); font-family: var(--font-display); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.full-width { grid-column: 1 / -1; }

/* ─── Metric Cards ──────────────────────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric-grid.compact { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.metric-card {
    background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.25rem; text-align: center; border: 1px solid var(--border);
}
.metric-card.accent { border-top: 3px solid var(--primary); }
.metric-card.card-advanced { border-top: 3px solid var(--advanced); }
.metric-card.card-intermediate { border-top: 3px solid var(--intermediate); }
.metric-card.card-basic { border-top: 3px solid var(--basic); }
.metric-value { font-size: 1.75rem; font-weight: 900; line-height: 1.2; font-family: var(--font-display); color: var(--text); }
.metric-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

/* ─── Tables ────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.data-table th { text-align: left; padding: 0.6rem 0.75rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); }
.data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-light); }
.data-table tbody tr:hover { background: var(--surface); }
.font-medium { font-weight: 500; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }

/* ─── Badges ────────────────────────────────────────────────────────── */
.grade-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; color: #fff;
}
.grade-badge.sm { width: 22px; height: 22px; font-size: 0.7rem; border-radius: 4px; }
.grade-a { background: var(--grade-a); }
.grade-b { background: var(--grade-b); }
.grade-c { background: var(--grade-c); }
.grade-d { background: var(--grade-d); }
.grade-f { background: var(--grade-f); }

.rating { font-weight: 600; }
.rating-advanced { color: var(--advanced); }
.rating-intermediate { color: var(--intermediate); }
.rating-basic { color: var(--basic); }

.status-badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 500;
}
.status-badge.large { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
.status-completed { background: #dcfce7; color: #166534; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-active { background: #dbeafe; color: #1e40af; }

.severity-badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.severity-badge.critical { background: #fee2e2; color: #991b1b; }
.severity-badge.high { background: #ffedd5; color: #c2410c; }
.severity-badge.medium { background: #fef3c7; color: #a16207; }
.severity-badge.low { background: #dcfce7; color: #166534; }
.severity-badge.info { background: #dbeafe; color: #1e40af; }

.cve-tag { display: inline-block; background: #f3e8ff; color: #6b21a8; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.7rem; margin-left: 0.4rem; font-weight: 500; }

/* ─── Distribution Bars ─────────────────────────────────────────────── */
.dist-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.dist-label { width: 140px; font-size: 0.85rem; font-weight: 500; }
.tier-advanced { color: var(--advanced); }
.tier-intermediate { color: var(--intermediate); }
.tier-basic { color: var(--basic); }
.dist-bar-track { flex: 1; height: 20px; background: var(--border-light); border-radius: 10px; overflow: hidden; }
.dist-bar { height: 100%; border-radius: 10px; transition: width 0.5s; min-width: 4px; }
.dist-bar.advanced { background: var(--advanced); }
.dist-bar.intermediate { background: var(--intermediate); }
.dist-bar.basic { background: var(--basic); }
.dist-count { width: 30px; text-align: right; font-weight: 600; font-size: 0.85rem; }

/* ─── Progress ──────────────────────────────────────────────────────── */
.progress-section { margin: 1.5rem 0; }
.progress-bar-track { height: 12px; background: var(--border-light); border-radius: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s; }
.progress-early { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.progress-mid { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.progress-complete { background: linear-gradient(90deg, #4ade80, #16a34a); }
.progress-info { display: flex; justify-content: space-between; margin-top: 0.4rem; }
.progress-pct { font-weight: 700; font-size: 1.1rem; }
.progress-stage { color: var(--text-muted); font-size: 0.85rem; }
.progress-message { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.25rem; }

.mini-progress { width: 80px; height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.mini-bar { height: 100%; background: #3b82f6; border-radius: 3px; }

/* ─── Pipeline Stages ───────────────────────────────────────────────── */
.pipeline-stages { margin: 1.5rem 0; }
.stage { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; opacity: 0.4; }
.stage.completed { opacity: 1; }
.stage.active { opacity: 1; }
.stage-indicator { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.75rem; background: var(--border-light); color: var(--text-muted); }
.stage.completed .stage-indicator { background: #dcfce7; color: #166534; }
.stage.active .stage-indicator { background: #dbeafe; color: #1e40af; }
.stage-name { font-weight: 500; font-size: 0.85rem; }
.stage-desc { font-size: 0.75rem; color: var(--text-muted); display: block; }

/* ─── Forms ─────────────────────────────────────────────────────────── */
.form-section { margin-bottom: 1.5rem; }
.form-section h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.3rem; color: var(--text-mid); }
.form-control { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; transition: border-color 0.15s; background: var(--card-bg); color: var(--text); font-family: var(--font-body); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-row { display: flex; gap: 1rem; }
.flex-1 { flex: 1; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-actions { margin-top: 1.5rem; }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.15s; font-family: var(--font-body); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary-border); }
.btn-outline:hover { background: var(--primary-bg); }

/* ─── Report Page ───────────────────────────────────────────────────── */
.report-page { max-width: 960px; margin: 0 auto; }
.report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 2rem; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.report-title h1 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.report-title h2 { font-size: 1.75rem; font-weight: 700; margin-top: 0.25rem; }
.report-rating { text-align: center; }
.big-rating { display: block; font-size: 3rem; font-weight: 800; line-height: 1; }
.big-grade { display: block; font-size: 1.25rem; font-weight: 700; margin-top: 0.25rem; }
.tier-label { font-size: 0.85rem; }
.tier-advanced .big-rating, .tier-advanced .big-grade { color: var(--advanced); }
.tier-intermediate .big-rating, .tier-intermediate .big-grade { color: var(--intermediate); }
.tier-basic .big-rating, .tier-basic .big-grade { color: var(--basic); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.category-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--card-bg); }
.cat-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.cat-name { font-weight: 600; }
.cat-weight { font-size: 0.8rem; color: var(--text-muted); }
.score-bar-track { flex: 1; height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 4px; }
.bar-good { background: var(--advanced); }
.bar-warn { background: var(--intermediate); }
.bar-bad { background: var(--basic); }
.cat-score { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.score-value { font-weight: 600; font-size: 0.85rem; min-width: 50px; }

.vector-list { border-top: 1px solid var(--border); padding-top: 0.5rem; }
.vector-row { display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; }
.vector-name { font-size: 0.85rem; }

.vector-detail { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; background: var(--card-bg); }
.vector-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.vector-detail-header .vector-name { font-weight: 600; }
.vector-stats { display: flex; gap: 1rem; font-size: 0.8rem; margin-bottom: 0.5rem; }
.stat.good { color: var(--advanced); }
.stat.warn { color: var(--intermediate); }
.stat.bad { color: var(--basic); }
.ransomware-warning { background: #fee2e2; color: #991b1b; padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.8rem; margin-top: 0.5rem; }
.remediation-note { background: #fef3c7; color: #a16207; padding: 0.4rem 0.6rem; border-radius: 4px; font-size: 0.8rem; margin-top: 0.5rem; }

.ransomware-card { border-left: 3px solid #dc2626; }
.ransomware-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.ransomware-score { font-size: 2.5rem; font-weight: 800; }
.ransomware-tier { font-size: 1.25rem; font-weight: 600; }

.remediation-item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-light); }
.remediation-priority { font-size: 1.5rem; font-weight: 700; color: var(--primary); min-width: 40px; text-align: center; padding-top: 0.25rem; }
.remediation-body { flex: 1; }
.remediation-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.effort-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.effort-badge.quick-win { background: #dcfce7; color: #166534; }
.effort-badge.medium { background: #fef3c7; color: #a16207; }
.effort-badge.long-term { background: #fee2e2; color: #991b1b; }
.remediation-stats { display: flex; gap: 1.5rem; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.report-actions { text-align: center; padding: 2rem 0; }

.findings-summary { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }
.finding-count { font-size: 0.8rem; font-weight: 500; padding: 0.2rem 0.5rem; border-radius: 4px; }
.finding-count.critical { background: #fee2e2; color: #991b1b; }
.finding-count.high { background: #ffedd5; color: #c2410c; }
.finding-count.medium { background: #fef3c7; color: #a16207; }
.finding-count.low { background: #dcfce7; color: #166534; }

/* ─── Vendor Grid ───────────────────────────────────────────────────── */
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.vendor-card { padding: 1.25rem; }
.vendor-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.vendor-header h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.15rem; }
.vendor-rating { text-align: right; }
.rating-value { font-size: 1.5rem; font-weight: 700; display: block; line-height: 1; }
.vendor-details { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.detail-chip { display: inline-block; padding: 0.15rem 0.5rem; background: var(--surface); border-radius: 4px; font-size: 0.75rem; color: var(--text-muted); }
.detail-chip.rescan { background: #dbeafe; color: #1e40af; }
.vendor-footer { border-top: 1px solid var(--border); padding-top: 0.5rem; }

/* ─── Page Headers ──────────────────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.25rem; font-weight: 600; }

/* ─── States ────────────────────────────────────────────────────────── */
.loading-state { display: flex; flex-direction: column; align-items: center; padding: 4rem 2rem; color: var(--text-muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 1rem; }
.spinner-sm { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,0.1); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.error-state { text-align: center; padding: 3rem; }
.success-state { text-align: center; padding: 2rem; }
.success-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.action-row { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1rem; }
.timestamps { display: flex; gap: 1.5rem; font-size: 0.8rem; color: var(--text-muted); margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; max-width: 100vw; }
    .content-area { padding: 1rem; }
    .card-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .report-header { flex-direction: column; text-align: center; }
}

/* ─── Toast Notifications ──────────────────────────────────────────── */
.toast-container {
    position: fixed; top: 1rem; right: 1rem; z-index: 9999;
    display: flex; flex-direction: column; gap: 0.5rem;
    max-width: 400px;
}
.toast {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem 1rem; border-radius: 8px;
    background: var(--card-bg); box-shadow: var(--shadow-md);
    border-left: 4px solid #999;
    animation: toastIn 0.3s ease-out;
    transition: opacity 0.3s, transform 0.3s;
}
.toast-exit { opacity: 0; transform: translateX(100%); }
.toast-success { border-left-color: var(--advanced); }
.toast-info { border-left-color: #2563eb; }
.toast-warning { border-left-color: var(--intermediate); }
.toast-error { border-left-color: var(--basic); }
.toast-icon { font-size: 1.1rem; padding-top: 1px; }
.toast-success .toast-icon { color: var(--advanced); }
.toast-info .toast-icon { color: #2563eb; }
.toast-warning .toast-icon { color: var(--intermediate); }
.toast-error .toast-icon { color: var(--basic); }
.toast-body { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; }
.toast-detail { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.toast-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-muted); padding: 0 0.25rem; line-height: 1; }
.toast-close:hover { color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* ─── Toggle Switch ────────────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: #d1d5db; border-radius: 24px;
    transition: 0.2s;
}
.toggle-slider:before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background: white; border-radius: 50%;
    transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ─── Settings ─────────────────────────────────────────────────────── */
.settings-grid { display: flex; flex-direction: column; }
.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 0; border-bottom: 1px solid var(--border-light);
}
.setting-row:last-child { border-bottom: none; }
.setting-info { display: flex; flex-direction: column; gap: 0.15rem; }
.integration-card { margin-bottom: 1rem; }

/* ─── Error Boundary ───────────────────────────────────────────────── */
.error-boundary { padding: 2rem; }

/* ═══════════════════════════════════════════════════════════════════════
   VENDOR DETAIL — Tabbed Interface
   ═══════════════════════════════════════════════════════════════════════ */

/* Tab Navigation */
.vendor-tabs { display: flex; gap: 2px; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.vendor-tab {
    padding: 0.6rem 1.1rem; background: transparent; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
    font-family: var(--font-body); display: flex; align-items: center; gap: 6px; margin-bottom: -2px;
}
.vendor-tab:hover { color: var(--text); border-bottom-color: var(--border); }
.vendor-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.vendor-tab .tab-new { font-size: 7px; padding: 1px 5px; border-radius: 3px; background: var(--primary); color: #fff; font-weight: 800; font-family: var(--font-mono); }

/* Vendor Header */
.vendor-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow);
}
.vendor-header .vendor-identity { display: flex; align-items: center; gap: 16px; }
.vendor-header .vendor-logo {
    width: 48px; height: 48px; border-radius: 10px; background: var(--primary-bg);
    border: 1px solid var(--primary-border); display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900; color: var(--primary); font-family: var(--font-display);
}
.vendor-header .vendor-name { font-size: 1.1rem; font-weight: 800; font-family: var(--font-display); }
.vendor-header .vendor-domain { font-size: 0.82rem; color: var(--primary); font-family: var(--font-mono); }
.vendor-header .rating-hero {
    display: flex; align-items: center; gap: 14px;
}
.vendor-header .rating-circle {
    width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-bg);
}
.vendor-header .rating-number { font-size: 1.4rem; font-weight: 900; color: var(--primary); font-family: var(--font-display); }
.vendor-header .rating-meta .big-grade { font-size: 2rem; font-weight: 900; color: var(--primary); font-family: var(--font-display); line-height: 1; }

/* Grade badges (light theme) */
.grade-badge { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 4px; font-family: var(--font-mono); }
.grade-badge.sm { padding: 2px 8px; font-size: 0.7rem; }
.grade-badge.lg { padding: 4px 12px; font-size: 0.85rem; }
.grade-a { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.grade-b { background: #ecfccb; color: #3f6212; border: 1px solid #bef264; }
.grade-c { background: #fef3c7; color: #a16207; border: 1px solid #fde68a; }
.grade-d { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.grade-f { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Severity badges */
.sev-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; }
.sev-critical { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.sev-high { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.sev-medium { background: #fef3c7; color: #a16207; border: 1px solid #fde68a; }
.sev-low { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.sev-info { background: var(--border-light); color: var(--text-muted); border: 1px solid var(--border); }

/* Section label */
.section-label {
    font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase;
    letter-spacing: 1.2px; font-family: var(--font-mono); margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 6px;
}

/* Scanner pipeline step */
.pipeline-step {
    display: flex; align-items: center; gap: 14px; padding: 0.75rem 1rem;
    background: var(--card-bg); border-radius: 8px; margin-bottom: 6px; border: 1px solid var(--border);
}
.pipeline-step.is-new { background: var(--primary-bg); border-color: var(--primary-border); }
.pipeline-step .step-num {
    width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; font-family: var(--font-mono); flex-shrink: 0;
}
.pipeline-step .step-num.live { background: #dcfce7; color: #166534; }
.pipeline-step .step-num.new { background: var(--primary); color: #fff; }
.pipeline-step .step-name { font-size: 0.9rem; font-weight: 700; font-family: var(--font-display); }
.pipeline-step .step-desc { font-size: 0.75rem; color: var(--text-muted); }
.pipeline-step .step-source { font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }

/* DKIM record card */
.dkim-record {
    padding: 1rem; background: var(--card-bg); border-radius: 8px; margin-bottom: 8px;
    border: 1px solid var(--border);
}
.dkim-record.weak { border-color: #fca5a5; background: #fef2f2; }
.dkim-record .selector-name { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; color: var(--primary); }

/* Header scan result */
.header-result {
    padding: 0.85rem 1rem; background: var(--card-bg); border-radius: 8px; margin-bottom: 6px;
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
}
.header-result.missing-high { border-color: #fca5a5; background: #fef2f2; }

/* Enrichment info row */
.enrich-row { display: flex; padding: 5px 0; border-bottom: 1px solid var(--border-light); }
.enrich-row .enrich-label { width: 130px; font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }
.enrich-row .enrich-value { font-size: 0.82rem; font-weight: 500; }

/* 4th party card */
.fourth-party-card {
    padding: 0.85rem 1rem; background: var(--card-bg); border-radius: 8px;
    border: 1px solid var(--border); display: flex; align-items: center; gap: 14px;
}
.fourth-party-card .fp-initial {
    width: 36px; height: 36px; border-radius: 8px; background: var(--primary-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 800; color: var(--primary); font-family: var(--font-display);
}

/* Empty / loading states */
.loading-state { text-align: center; padding: 3rem 0; color: var(--text-muted); }
.empty-state { text-align: center; padding: 3rem; }

/* Score bar (small progress bar inside vector rows) */
.score-bar-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.score-bar { height: 100%; border-radius: 2px; transition: width 0.3s; }

/* Stat block */
.stat-block { text-align: center; }
.stat-block .stat-value { font-size: 1.6rem; font-weight: 900; font-family: var(--font-display); line-height: 1; color: var(--text); }
.stat-block .stat-label { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Scrollbar (light theme) ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Page Section Headers ──────────────────────────────────────────── */
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--text); font-family: var(--font-display); margin: 0; }
.section-subtitle { font-size: 0.85rem; color: var(--text-muted); margin: 0.25rem 0 0; }

/* ─── Tabs ──────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex; gap: 0; border-bottom: 2px solid var(--border);
}
.tab-btn {
    padding: 0.6rem 1.25rem; background: none; border: none; border-bottom: 2px solid transparent;
    margin-bottom: -2px; font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    cursor: pointer; transition: all 0.15s; font-family: var(--font-body);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ─── Toolbar ───────────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.toolbar-count { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Form Cards (inline forms) ─────────────────────────────────────── */
.form-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; margin-bottom: 1.25rem;
}
.form-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.25rem; }
.form-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-mid); }
.form-field input, .form-field select, .form-field textarea {
    padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 6px;
    font-size: 0.88rem; font-family: var(--font-body); background: var(--card-bg);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-dim);
}
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

/* ─── Tenant Cards ──────────────────────────────────────────────────── */
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.tenant-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow); transition: box-shadow 0.15s;
}
.tenant-card:hover { box-shadow: var(--shadow-md); }
.tenant-card.inactive { opacity: 0.5; }
.tenant-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.tenant-name { font-size: 1rem; font-weight: 700; margin: 0; }
.tenant-domain { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.tenant-badges { display: flex; gap: 0.25rem; }
.sub-type-badge {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; text-transform: uppercase;
    font-family: var(--font-mono); letter-spacing: 0.5px;
}
.sub-type-badge.verisq { background: var(--primary-bg); color: var(--primary); border: 1px solid var(--primary-border); }
.sub-type-badge.directsignup { background: #e0f2fe; color: #0369a1; }
.sub-type-badge.enterprise { background: #f3e8ff; color: #7c3aed; }
.tenant-stats { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-mid); }

/* ─── Form Sections ─────────────────────────────────────────────────── */
.form-section { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-light); }
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; }

/* ─── Enrichment Chips ──────────────────────────────────────────────── */
.chip {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 0.75rem; background: var(--surface-alt, #f3f4f6);
    color: var(--text-secondary, #555); border: 1px solid var(--border-light, #e5e7eb);
    line-height: 1.4; white-space: nowrap;
}
