/* Data Privacy (epic R131) — rebuilt to the Suite(10) design handoff. The shared
   suite shell (header/footer/menu drawer/AI button) comes from app-chrome.css +
   menu.js + assistant.js; this file styles the app-specific hero, tabs, the five
   render states, findings table and detail slide-over. Fonts: Poppins (headings)
   + Mulish (body). Every masked value is shown in a mono face so redaction dots
   are unambiguous. Severity is conveyed by glyph + text, never colour alone. */

:root {
  --pv-navy: #16273F; --pv-ink: #33404F; --pv-muted: #5B6675; --pv-faint: #8791A0;
  --pv-line: #EAEDF3; --pv-line-soft: #F1F4F8; --pv-red: #E8402A; --pv-blue: #2F6FE0;
  --pv-purple: #7A5AF0; --pv-green: #1FA97A;
  --pv-card-shadow: 0 4px 16px rgba(18,38,63,0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Mulish', system-ui, sans-serif; color: var(--pv-ink); background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%); }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
/* Match the suite: the shared header/footer inner defaults to 1440px — narrow it
   to 90% so it lines up with this app's content (like every other fe-* app). */
.app-shell .rm-header-inner, .app-shell .rm-footer-inner { max-width: 90%; }
.pv-mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
@keyframes pvFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pvSpin { to { transform: rotate(360deg); } }
@keyframes pvShimmer { 0% { background-position: -450px 0; } 100% { background-position: 450px 0; } }

/* ---- Hero ---- */
.pv-hero { border-bottom: 1px solid var(--pv-line); background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0)); }
.pv-hero-inner { max-width: 90%; margin: 0 auto; padding: 26px 32px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pv-title { font-family: 'Poppins'; font-weight: 700; font-size: 30px; line-height: 1.05; margin: 0; letter-spacing: -0.5px; color: var(--pv-navy); }
.pv-subtitle { font-family: 'Mulish'; font-weight: 500; font-size: 14.5px; color: var(--pv-muted); line-height: 1.55; margin: 8px 0 0; max-width: 640px; }
.pv-hero-actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pv-policy-field { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-family: 'Poppins'; font-weight: 600; color: var(--pv-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.pv-policy-field select { font-family: 'Mulish'; font-weight: 600; font-size: 14px; color: var(--pv-navy); background: #fff; border: 1px solid #DCE1E9; border-radius: 12px; padding: 10px 14px; min-width: 210px; cursor: pointer; }
.pv-policy-field select:focus-visible { outline: 2px solid var(--pv-blue); outline-offset: 1px; }
.pv-scan-btn { display: inline-flex; align-items: center; gap: 9px; font-family: 'Poppins'; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--pv-red); border: none; border-radius: 12px; padding: 12px 22px; cursor: pointer; box-shadow: 0 6px 16px rgba(232,64,42,0.28); }
.pv-scan-btn:hover { background: #D5361F; }
.pv-scan-btn:disabled { opacity: 0.65; cursor: default; box-shadow: none; }
.pv-scan-btn:focus-visible { outline: 2px solid var(--pv-navy); outline-offset: 2px; }

/* ---- Tab bar ---- */
.pv-tabbar { background: #fff; border-bottom: 1px solid #E7EBF1; box-shadow: 0 1px 2px rgba(18,38,63,0.03); }
.pv-tabbar-inner { max-width: 90%; margin: 0 auto; padding: 0 32px; display: flex; gap: 38px; }
.pv-tab { appearance: none; background: none; border: none; cursor: pointer; font-family: 'Poppins'; font-weight: 600; font-size: 16px; color: var(--pv-faint); padding: 18px 2px; border-bottom: 3px solid transparent; }
.pv-tab:hover { color: var(--pv-muted); }
.pv-tab.active { font-weight: 700; color: var(--pv-navy); border-bottom-color: var(--pv-red); }
.pv-tab:focus-visible { outline: 2px solid var(--pv-blue); outline-offset: 2px; border-radius: 4px; }

/* ---- Main ---- */
.pv-main { flex: 1; max-width: 90%; width: 100%; margin: 0 auto; padding: 32px 32px 56px; }
#pvContent > div { animation: pvFadeUp 0.4s ease both; }

/* ---- Cards / shared ---- */
.pv-card { background: #fff; border: 1px solid var(--pv-line); border-radius: 20px; box-shadow: var(--pv-card-shadow); }
.pv-h2 { font-family: 'Poppins'; font-weight: 700; font-size: 19px; color: var(--pv-navy); margin: 0; }

/* ---- Empty / prompt (no domain) ---- */
.pv-prompt { text-align: center; color: var(--pv-faint); font-size: 15px; padding: 60px 20px; }

/* ---- First run ---- */
.pv-firstrun { border: 1px solid var(--pv-line); border-radius: 20px; box-shadow: var(--pv-card-shadow); background: #fff; padding: 64px 32px; text-align: center; }
.pv-firstrun-icon { display: inline-flex; width: 84px; height: 84px; border-radius: 24px; background: #EEF3FF; align-items: center; justify-content: center; margin-bottom: 22px; }
.pv-firstrun h2 { font-family: 'Poppins'; font-weight: 700; font-size: 24px; color: var(--pv-navy); margin: 0 0 8px; }
.pv-firstrun p { font-size: 15px; color: var(--pv-muted); line-height: 1.6; max-width: 520px; margin: 0 auto 26px; }
.pv-firstrun-cta { display: inline-flex; align-items: center; gap: 9px; font-family: 'Poppins'; font-weight: 700; font-size: 15px; color: #fff; background: var(--pv-red); border: none; border-radius: 12px; padding: 14px 26px; cursor: pointer; box-shadow: 0 6px 16px rgba(232,64,42,0.3); }
.pv-firstrun-cta:hover { background: #D5361F; }

/* ---- Scanning ---- */
.pv-scanning-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pv-spinner { width: 14px; height: 14px; border: 3px solid #D3E2FA; border-top-color: var(--pv-blue); border-radius: 50%; display: inline-block; animation: pvSpin 0.7s linear infinite; }
.pv-scanning-title { font-family: 'Poppins'; font-weight: 700; font-size: 17px; color: var(--pv-navy); }
.pv-scanning-sub { font-size: 13.5px; color: var(--pv-faint); margin-top: 2px; }
.pv-progress { height: 12px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.pv-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2F6FE0, #5B9BF0); width: 40%; }
.pv-progress-bar.indeterminate { width: 35%; animation: pvSlide 1.3s ease-in-out infinite; }
@keyframes pvSlide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.pv-sk { background: #EEF1F6; background-image: linear-gradient(90deg, #EEF1F6 0, #F6F8FC 220px, #EEF1F6 440px); background-size: 900px 100%; animation: pvShimmer 1.3s linear infinite; border-radius: 8px; }
.pv-sk-row { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--pv-line-soft); }
.pv-sk-list { background: #fff; border: 1px solid var(--pv-line); border-radius: 18px; box-shadow: var(--pv-card-shadow); overflow: hidden; }

/* ---- Clean / none ---- */
.pv-clean-banner { display: flex; align-items: center; gap: 24px; background: linear-gradient(90deg, #E9F9F2 0%, #EFFBF6 100%); border: 1px solid #C6EBDC; border-radius: 20px; padding: 32px 34px; margin-bottom: 22px; }
.pv-clean-icon { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #1FA97A, #3FC79A); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(31,169,122,0.32); }
.pv-clean-title { font-family: 'Poppins'; font-weight: 700; font-size: 22px; color: #0F5C43; margin-bottom: 5px; }
.pv-clean-sub { font-size: 15px; color: #2C7259; line-height: 1.5; }

/* ---- Overview ---- */
.pv-ov-grid { display: grid; grid-template-columns: minmax(340px, 1fr) 1.6fr; gap: 22px; align-items: stretch; margin-bottom: 22px; }
.pv-verdict { border-radius: 20px; padding: 28px; box-shadow: var(--pv-card-shadow); }
.pv-verdict-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pv-verdict-iconwrap { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; }
.pv-verdict-kicker { font-family: 'Poppins'; font-weight: 700; font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase; }
.pv-verdict-label { font-family: 'Poppins'; font-weight: 800; font-size: 44px; line-height: 1; margin-bottom: 12px; }
.pv-verdict-desc { font-size: 14.5px; color: #43525F; line-height: 1.55; margin: 0; }
.pv-verdict-updated { margin-top: 18px; font-size: 12.5px; color: var(--pv-faint); }

.pv-ov-right { display: flex; flex-direction: column; gap: 22px; }
.pv-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pv-stat { background: #fff; border: 1px solid var(--pv-line); border-radius: 18px; padding: 22px 24px; box-shadow: var(--pv-card-shadow); }
.pv-stat-label { font-family: 'Poppins'; font-weight: 700; font-size: 14px; color: var(--pv-faint); margin-bottom: 10px; }
.pv-stat-value { font-family: 'Poppins'; font-weight: 800; font-size: 34px; line-height: 1; }
.pv-stat-sub { font-size: 12.5px; color: var(--pv-faint); margin-top: 6px; }

.pv-sev { flex: 1; background: #fff; border: 1px solid var(--pv-line); border-radius: 20px; padding: 24px 26px; box-shadow: var(--pv-card-shadow); }
.pv-sev h2 { margin: 0 0 18px; }
.pv-sev-rows { display: flex; flex-direction: column; gap: 16px; }
.pv-sev-row { display: flex; align-items: center; gap: 16px; }
.pv-sev-pill { flex: 0 0 96px; display: inline-flex; align-items: center; gap: 7px; font-family: 'Poppins'; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 4px 11px; }
.pv-sev-glyph { font-size: 11px; line-height: 1; }
.pv-sev-count { flex: 0 0 34px; font-family: 'Poppins'; font-weight: 700; font-size: 15px; color: var(--pv-navy); }
.pv-sev-track { flex: 1; height: 12px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.pv-sev-fill { height: 100%; border-radius: 999px; }

.pv-bytype { background: #fff; border: 1px solid var(--pv-line); border-radius: 20px; padding: 24px 26px; box-shadow: var(--pv-card-shadow); }
.pv-bytype-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.pv-viewall { display: inline-flex; align-items: center; gap: 6px; font-family: 'Poppins'; font-weight: 700; font-size: 13px; color: var(--pv-blue); background: none; border: none; cursor: pointer; }
.pv-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pv-type-card { display: flex; align-items: center; gap: 14px; background: #FBFCFE; border: 1px solid var(--pv-line); border-radius: 14px; padding: 16px 18px; cursor: pointer; text-align: left; }
.pv-type-card:hover { border-color: #D3DBE6; background: #F6F8FC; }
.pv-type-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.pv-type-name { font-family: 'Poppins'; font-weight: 700; font-size: 14.5px; color: var(--pv-navy); }
.pv-type-sev { font-size: 12px; color: var(--pv-faint); margin-top: 1px; }
.pv-type-count { font-family: 'Poppins'; font-weight: 800; font-size: 24px; color: var(--pv-navy); }

/* ---- Findings ---- */
.pv-reassure { display: flex; align-items: center; gap: 12px; background: #EEF3FF; border: 1px solid #D6E4FB; border-radius: 14px; padding: 12px 18px; margin-bottom: 20px; }
.pv-reassure span { font-size: 13.5px; color: #1E4E86; }
.pv-findings-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.pv-findings-head h2 { font-family: 'Poppins'; font-weight: 700; font-size: 24px; color: var(--pv-navy); margin: 0 0 4px; }
.pv-findings-count { font-size: 14.5px; color: var(--pv-faint); }
.pv-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pv-search { position: relative; display: inline-flex; align-items: center; }
.pv-search svg { position: absolute; left: 13px; pointer-events: none; }
.pv-search input { padding: 10px 14px 10px 38px; border: 1px solid #DCE1E9; border-radius: 12px; font-family: 'Mulish'; font-size: 14px; color: var(--pv-navy); min-width: 230px; outline: none; background: #fff; }
.pv-search input:focus-visible { border-color: var(--pv-blue); box-shadow: 0 0 0 3px rgba(47,111,224,0.15); }
.pv-sort { display: inline-flex; align-items: center; gap: 8px; }
.pv-sort-label { font-size: 12.5px; color: var(--pv-faint); font-family: 'Poppins'; font-weight: 600; }
.pv-seg { display: inline-flex; background: #F1F4F9; border: 1px solid #E5E9F0; border-radius: 10px; padding: 3px; gap: 3px; }
.pv-seg-btn { appearance: none; border: none; cursor: pointer; font-family: 'Poppins'; font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; background: transparent; color: var(--pv-muted); }
.pv-seg-btn.active { background: #3C7CE0; color: #fff; box-shadow: 0 2px 6px rgba(60,124,224,0.35); }

.pv-filters { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
.pv-filter-label { font-family: 'Poppins'; font-weight: 700; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--pv-faint); margin-bottom: 8px; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-chip { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; font-family: 'Poppins'; font-weight: 600; font-size: 13px; color: var(--pv-muted); background: #fff; border: 1.5px solid #E4E9F1; border-radius: 999px; padding: 7px 14px; }
.pv-chip:hover { border-color: #CBD6E4; }
.pv-chip.active { font-weight: 700; }
.pv-chip-glyph { font-size: 11px; line-height: 1; }

.pv-table { background: #fff; border: 1px solid var(--pv-line); border-radius: 18px; box-shadow: var(--pv-card-shadow); overflow: hidden; }
.pv-thead, .pv-row { display: grid; grid-template-columns: 200px 150px 120px minmax(0, 1.6fr) 96px 28px; gap: 16px; align-items: center; }
.pv-thead { padding: 14px 24px; background: #FAFBFD; border-bottom: 1px solid var(--pv-line); }
.pv-th { font-family: 'Poppins'; font-weight: 700; font-size: 11.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--pv-faint); }
.pv-th.center { text-align: center; }
.pv-row { padding: 15px 24px; border: none; border-bottom: 1px solid var(--pv-line-soft); background: none; width: 100%; cursor: pointer; text-align: left; }
.pv-row:hover { background: #FBFCFE; }
.pv-row:last-child { border-bottom: none; }
.pv-row:focus-visible { outline: 2px solid var(--pv-blue); outline-offset: -2px; }
.pv-row-masked { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; color: var(--pv-navy); letter-spacing: 0.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-type-badge { display: inline-flex; align-items: center; gap: 7px; font-family: 'Poppins'; font-weight: 600; font-size: 12.5px; color: var(--pv-navy); background: #F4F6FA; border: 1px solid #E7EBF1; border-radius: 999px; padding: 4px 11px; justify-self: start; }
.pv-type-dot { width: 8px; height: 8px; border-radius: 2px; }
.pv-sev-badge { display: inline-flex; align-items: center; gap: 5px; font-family: 'Poppins'; font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 4px 11px; justify-self: start; }
.pv-row-page { font-size: 13px; color: var(--pv-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-row-count { font-family: 'Poppins'; font-weight: 700; font-size: 14px; color: var(--pv-navy); text-align: center; }
.pv-noresults { padding: 48px 24px; text-align: center; color: var(--pv-faint); font-size: 14.5px; }
.pv-error { padding: 40px 24px; text-align: center; color: #C0392B; font-size: 14px; }

/* ---- Detail slide-over ---- */
.pv-detail-overlay { position: fixed; inset: 0; background: rgba(16,26,40,0.5); z-index: 65; opacity: 0; transition: opacity 0.25s ease; }
.pv-detail-overlay.open { opacity: 1; }
.pv-detail { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: #fff; z-index: 66; box-shadow: -16px 0 48px rgba(16,26,40,0.22); transform: translateX(102%); transition: transform 0.3s cubic-bezier(.22,.61,.36,1); }
.pv-detail.open { transform: translateX(0); }
.pv-detail-inner { display: flex; flex-direction: column; height: 100%; }
.pv-detail-top { flex: 0 0 auto; padding: 22px 26px; border-bottom: 1px solid #EFF1F6; }
.pv-detail-titlebar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pv-detail-typewrap { display: flex; align-items: center; gap: 12px; }
.pv-detail-typeicon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pv-detail-typename { font-family: 'Poppins'; font-weight: 700; font-size: 16px; color: var(--pv-navy); }
.pv-detail-close { width: 38px; height: 38px; border-radius: 11px; background: #F4F6FA; border: 1px solid #E4E8EF; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pv-detail-close:hover { background: #EBEFF5; }
.pv-masked-hero { background: #F6F8FC; border: 1px solid #E7EBF1; border-radius: 14px; padding: 18px 20px; }
.pv-masked-hero-label { font-family: 'Poppins'; font-weight: 700; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--pv-faint); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pv-masked-hero-value { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; color: var(--pv-navy); letter-spacing: 1px; word-break: break-all; }
.pv-masked-hero-meta { font-size: 13px; color: var(--pv-faint); margin-top: 8px; }
.pv-detail-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 26px; display: flex; flex-direction: column; gap: 24px; }
.pv-detail-h3 { font-family: 'Poppins'; font-weight: 700; font-size: 15px; color: var(--pv-navy); margin: 0 0 12px; }
.pv-explain-row { display: flex; gap: 11px; margin-bottom: 12px; }
.pv-explain-icon { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.pv-explain-title { font-family: 'Poppins'; font-weight: 700; font-size: 13px; color: var(--pv-navy); margin-bottom: 2px; }
.pv-explain-text { font-size: 13.5px; color: var(--pv-muted); line-height: 1.5; }
.pv-sample { background: #FBFCFE; border: 1px solid var(--pv-line); border-left: 3px solid var(--pv-red); border-radius: 10px; padding: 12px 15px; font-size: 13.5px; color: var(--pv-muted); line-height: 1.55; }
.pv-sample-mark { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-weight: 700; color: var(--pv-navy); background: #FFE8E3; border-radius: 4px; padding: 1px 6px; }
.pv-samples, .pv-affected { display: flex; flex-direction: column; gap: 10px; }
.pv-samples-note { font-size: 12.5px; color: var(--pv-faint); margin: -6px 0 12px; }
.pv-affected-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--pv-line); border-radius: 11px; padding: 12px 15px; }
.pv-affected-url { flex: 1; min-width: 0; font-size: 13.5px; color: var(--pv-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-affected-hits { flex: 0 0 auto; font-family: 'Poppins'; font-weight: 700; font-size: 12px; color: var(--pv-muted); background: #EEF1F6; border: 1px solid #E0E5EE; border-radius: 999px; padding: 3px 10px; }
.pv-detail-foot { flex: 0 0 auto; border-top: 1px solid #EFF1F6; padding: 16px 26px; display: flex; gap: 10px; justify-content: flex-end; background: #FBFCFE; }
.pv-btn-ghost { appearance: none; background: #fff; border: 1px solid #DCE1E9; color: var(--pv-navy); font-family: 'Poppins'; font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 11px; cursor: pointer; }
.pv-btn-ghost:hover { border-color: var(--pv-navy); }
.pv-btn-solid { appearance: none; border: none; background: var(--pv-red); color: #fff; font-family: 'Poppins'; font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: 11px; cursor: pointer; box-shadow: 0 4px 12px rgba(232,64,42,0.28); }
.pv-btn-solid:hover { background: #D5361F; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .pv-ov-grid { grid-template-columns: 1fr; }
  .pv-stat-grid, .pv-type-grid { grid-template-columns: 1fr 1fr; }
  .pv-thead, .pv-row { grid-template-columns: minmax(0,1.4fr) 130px 110px 26px; }
  .pv-th.pv-col-page, .pv-th.pv-col-count, .pv-row-page, .pv-row-count { display: none; }
}
@media (max-width: 560px) {
  .pv-hero-inner, .pv-tabbar-inner, .pv-main { padding-left: 18px; padding-right: 18px; }
  .pv-stat-grid, .pv-type-grid { grid-template-columns: 1fr; }
}
