/* Elite Security Systems — Platform v3 (Visual Overhaul) */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #060b18; --bg-alt: #0a1128; --surface: #0d1729; --surface-hover: #152240;
  --border: rgba(255,255,255,0.08); --border-hover: rgba(255,255,255,0.18); --border-accent: rgba(59,130,246,0.3);
  --text: #e2e8f0; --text-sec: #94a3b8; --text-dim: #64748b;
  --accent: #3b82f6; --accent-lt: #60a5fa; --accent-dk: #2563eb; --cyan: #06b6d4;
  --red: #ef4444; --orange: #f97316; --yellow: #eab308; --green: #22c55e; --purple: #a78bfa;
  --grad: linear-gradient(135deg, #3b82f6, #06b6d4);
  --grad-sub: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(6,182,212,0.03));
  --mw: 1100px; --r: 12px; --r-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1); --dur: 0.18s;
}

html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; min-height: 100vh; }
a { color: var(--accent-lt); text-decoration: none; }
a:hover { color: #fff; }

/* ===== PAGE TRANSITIONS ===== */
#app > * { animation: fadeUp 0.35s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== TOP NAV ===== */
.topnav { position: sticky; top: 0; z-index: 100; background: rgba(6,11,24,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); padding: 0 24px; }
.topnav-inner { max-width: var(--mw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.topnav-brand { font-weight: 700; font-size: 0.95rem; color: #fff; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topnav-brand img { height: 22px; }
.topnav-links { display: flex; align-items: center; gap: 24px; }
.topnav-link { font-size: 0.85rem; font-weight: 500; color: var(--text-dim); transition: color var(--dur); position: relative; }
.topnav-link:hover { color: var(--text); }
.topnav-link.active { color: #fff; }
.topnav-link.active::after { content: ''; position: absolute; bottom: -18px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 1px; }
.topnav-user { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-sec); }
.topnav-user strong { color: var(--text); font-weight: 600; }
/* Mobile hamburger */
.topnav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px; font-size: 1.2rem; }
.topnav-mobile { display: none; }

/* ===== LAYOUT ===== */
.page { padding: 32px 24px; max-width: var(--mw); margin: 0 auto; }
.page-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-top h1 { font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 20px; border-radius: var(--r-sm); font-size: 0.85rem; font-weight: 600; border: none; cursor: pointer; transition: all var(--dur) var(--ease); font-family: var(--font); white-space: nowrap; text-decoration: none; position: relative; }
.btn-primary { background: var(--accent-dk); color: #fff; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.3); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-sec); border: 1px solid var(--border); }
.btn-ghost:hover { color: #fff; border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }
.btn-danger:hover { background: rgba(239,68,68,0.2); color: var(--red); }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: 0.6; pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; margin-left: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== CARDS ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; transition: all 0.25s var(--ease); position: relative; overflow: hidden; }
.card:hover { border-color: var(--border-accent); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(59,130,246,0.1); }
.card-clickable { cursor: pointer; display: block; text-decoration: none; color: inherit; }
.card-clickable:hover { color: inherit; }
.card h3 { font-size: 1rem; margin-bottom: 6px; color: #fff; font-weight: 600; }
.card p { font-size: 0.85rem; color: var(--text-sec); margin: 0; }
/* Card severity accent border */
.card[data-status="active"] { border-left: 3px solid var(--accent); }
.card[data-status="scoping"] { border-left: 3px solid var(--text-dim); }
.card[data-status="remediation"] { border-left: 3px solid var(--yellow); }
.card[data-status="complete"] { border-left: 3px solid var(--green); }
.card-client { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 10px; }

/* ===== GRID ===== */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4; }
.badge-critical { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }
.badge-high { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.15); }
.badge-medium { background: rgba(234,179,8,0.12); color: var(--yellow); border: 1px solid rgba(234,179,8,0.15); }
.badge-low { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.badge-info { background: rgba(59,130,246,0.08); color: var(--accent-lt); border: 1px solid rgba(59,130,246,0.12); }
.badge-scoping, .badge-client { background: rgba(148,163,184,0.08); color: var(--text-dim); border: 1px solid rgba(148,163,184,0.1); }
.badge-active, .badge-in_progress, .badge-pentester { background: rgba(59,130,246,0.08); color: var(--accent-lt); border: 1px solid rgba(59,130,246,0.12); }
.badge-remediation, .badge-retest { background: rgba(234,179,8,0.12); color: var(--yellow); border: 1px solid rgba(234,179,8,0.15); }
.badge-complete, .badge-verified { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.badge-open { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.15); }
.badge-closed { background: rgba(148,163,184,0.08); color: var(--text-dim); border: 1px solid rgba(148,163,184,0.1); }
.badge-admin { background: rgba(139,92,246,0.1); color: var(--purple); border: 1px solid rgba(139,92,246,0.15); }

/* ===== FINDING COUNTS ===== */
.fc-row { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.fc { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.fc-critical { background: rgba(239,68,68,0.12); color: var(--red); }
.fc-high { background: rgba(249,115,22,0.12); color: var(--orange); }
.fc-medium { background: rgba(234,179,8,0.12); color: var(--yellow); }
.fc-low { background: rgba(34,197,94,0.12); color: var(--green); }

/* ===== AUTH ===== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; }
.auth-wrap::before { content: ''; position: absolute; top: 20%; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, rgba(59,130,246,0.06), transparent 70%); pointer-events: none; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 40px 32px; position: relative; box-shadow: 0 8px 40px rgba(0,0,0,0.3); }
.auth-card h2 { font-size: 1.35rem; color: #fff; margin-bottom: 8px; text-align: center; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 0.88rem; color: var(--text-sec); text-align: center; margin-bottom: 28px; }
.auth-logo { display: block; margin: 0 auto 24px; height: 28px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-family: var(--font); font-size: 0.9rem; transition: border-color var(--dur), box-shadow var(--dur); outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-group select { cursor: pointer; }
.form-group input[readonly] { opacity: 0.5; cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.85rem; color: var(--red); margin-bottom: 16px; animation: fadeUp 0.3s var(--ease); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); padding: 10px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-sec); }
tbody tr:last-child td { border-bottom: none; }
tr { transition: background var(--dur); }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--surface-hover); }
td.title-cell { color: #fff; font-weight: 500; }
/* Severity accent on finding rows */
tr.sev-critical td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.sev-high td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tr.sev-medium td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
tr.sev-low td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.sev-info td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ===== STATUS PIPELINE ===== */
.pipeline { display: flex; gap: 2px; margin-top: 8px; margin-bottom: 8px; }
.pipeline-step { flex: 1; padding: 8px 12px; text-align: center; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); background: rgba(255,255,255,0.03); cursor: pointer; transition: all var(--dur); border: 1px solid transparent; position: relative; }
.pipeline-step:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pipeline-step:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pipeline-step:hover { background: rgba(255,255,255,0.06); color: var(--text-sec); }
.pipeline-step.current { background: var(--accent-dk); color: #fff; border-color: var(--accent); box-shadow: 0 0 12px rgba(37,99,235,0.2); }
.pipeline-step.done { background: rgba(34,197,94,0.1); color: var(--green); border-color: rgba(34,197,94,0.2); }

/* ===== FINDING DETAIL ===== */
.finding-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.finding-header h1 { font-size: 1.35rem; flex: 1; letter-spacing: -0.02em; }
.finding-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
.detail-section { margin-bottom: 28px; }
.detail-section h3 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-lt); margin-bottom: 10px; }
.detail-section p, .detail-section pre { font-size: 0.9rem; color: var(--text-sec); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.sidebar-card h4 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 14px; }
.sidebar-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.sidebar-row:last-child { border-bottom: none; }
.sidebar-row span:first-child { color: var(--text-dim); }
.sidebar-row span:last-child { color: var(--text); font-weight: 500; }
.cvss-score { font-family: var(--mono); font-size: 1.75rem; font-weight: 800; text-align: center; padding: 16px 0; }
/* Scope block */
.scope-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 18px; font-family: var(--mono); font-size: 0.85rem; color: var(--text-sec); line-height: 1.7; white-space: pre-wrap; margin-bottom: 20px; }

/* ===== ATTACHMENTS ===== */
.att-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 0.82rem; transition: border-color var(--dur); }
.att-item:hover { border-color: var(--border-hover); }
.att-item a { color: var(--accent-lt); font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-item .att-size { color: var(--text-dim); font-family: var(--mono); font-size: 0.72rem; }
.att-item .att-del { color: var(--text-dim); cursor: pointer; background: none; border: none; font-size: 0.85rem; font-weight: 600; padding: 2px 6px; transition: color var(--dur); }
.att-item .att-del:hover { color: var(--red); }
.att-upload { margin-top: 12px; }
.att-upload input[type="file"] { font-size: 0.82rem; color: var(--text-sec); }
.att-upload input[type="file"]::file-selector-button { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 14px; font-family: var(--font); font-size: 0.82rem; cursor: pointer; margin-right: 10px; transition: all var(--dur); }
.att-upload input[type="file"]::file-selector-button:hover { border-color: var(--border-hover); background: var(--surface-hover); }

/* ===== COMMENTS ===== */
.comments { margin-top: 32px; }
.comments h3 { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-of-type { border-bottom: none; }
.comment-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 0.82rem; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.comment-head strong { color: #fff; font-weight: 600; }
.comment-head time { color: var(--text-dim); }
.comment-body { font-size: 0.88rem; color: var(--text-sec); line-height: 1.6; white-space: pre-wrap; padding-left: 36px; }
.comment-form { margin-top: 16px; }
.comment-form textarea { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-family: var(--font); font-size: 0.88rem; min-height: 80px; resize: vertical; outline: none; transition: border-color var(--dur), box-shadow var(--dur); }
.comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.comment-form .btn { margin-top: 8px; }

/* ===== STATUS ACTIONS ===== */
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ===== EMPTY / LOADING / BREADCRUMB ===== */
.empty { text-align: center; padding: 64px 24px; color: var(--text-dim); }
.empty-icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.3; }
.empty h3 { font-size: 1.1rem; color: var(--text-sec); margin-bottom: 8px; }
.empty p { font-size: 0.88rem; margin-bottom: 20px; }
/* Skeleton loading */
.skeleton { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
.skel-line { height: 14px; background: rgba(255,255,255,0.06); border-radius: 4px; margin-bottom: 10px; }
.skel-card { height: 120px; background: rgba(255,255,255,0.04); border-radius: var(--r); border: 1px solid var(--border); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px; color: var(--text-dim); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-dim); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-dim); transition: color var(--dur); }
.breadcrumb a:hover { color: var(--accent-lt); }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 20px; font-size: 0.85rem; color: var(--text); box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: toastIn 0.35s var(--ease); pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.success::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.error::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(0.95); } }

/* ===== INVITE LINK BOX ===== */
.invite-link-box { background: var(--bg); border: 1px solid var(--border-accent); border-radius: var(--r-sm); padding: 12px 16px; margin-top: 16px; display: flex; align-items: center; gap: 12px; animation: fadeUp 0.3s var(--ease); }
.invite-link-box code { flex: 1; font-family: var(--mono); font-size: 0.78rem; color: var(--accent-lt); word-break: break-all; }
.invite-link-box .btn { flex-shrink: 0; }

/* ===== USER AVATAR ===== */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar-sm { width: 24px; height: 24px; font-size: 0.65rem; }

/* ===== REPORT ===== */
.report { background: #fff; color: #1a1a2e; min-height: 100vh; font-size: 14px; line-height: 1.6; }
.report-toolbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; gap: 12px; align-items: center; }
.report-body { max-width: 800px; margin: 0 auto; padding: 48px 32px; }
.report h1 { font-size: 1.8rem; color: #1a1a2e; margin-bottom: 8px; letter-spacing: -0.02em; }
.report h2 { font-size: 1.25rem; color: #1a1a2e; margin-top: 32px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #e2e8f0; }
.report h3 { font-size: 1rem; color: #475569; margin-top: 16px; margin-bottom: 6px; }
.report p { color: #334155; margin-bottom: 12px; white-space: pre-wrap; }
.report-cover { text-align: center; padding: 100px 0 60px; margin-bottom: 32px; position: relative; }
.report-cover::after { content: ''; position: absolute; bottom: 0; left: 10%; right: 10%; height: 3px; background: linear-gradient(90deg, #3b82f6, #06b6d4); border-radius: 2px; }
.report-cover h1 { font-size: 2.4rem; margin-bottom: 20px; letter-spacing: -0.03em; }
.report-cover .report-meta { font-size: 0.95rem; color: #64748b; line-height: 2; }
.report-cover .confidential { display: inline-block; margin-top: 32px; padding: 8px 28px; border: 2px solid #ef4444; color: #ef4444; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.15em; border-radius: 4px; }
.report-summary-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin: 16px 0; }
.report-sev-box { text-align: center; padding: 16px 8px; border-radius: 8px; border: 1px solid #e2e8f0; }
.report-sev-box .num { font-size: 1.75rem; font-weight: 800; display: block; }
.report-sev-box .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.report-finding { margin-top: 24px; padding: 24px; border-radius: 8px; page-break-inside: avoid; position: relative; border: 1px solid #e2e8f0; }
.report-finding[data-sev="critical"] { border-left: 4px solid #dc2626; }
.report-finding[data-sev="high"] { border-left: 4px solid #ea580c; }
.report-finding[data-sev="medium"] { border-left: 4px solid #ca8a04; }
.report-finding[data-sev="low"] { border-left: 4px solid #16a34a; }
.report-finding[data-sev="info"] { border-left: 4px solid #2563eb; }
.report-finding-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.report-finding-header h3 { font-size: 1.1rem; color: #1a1a2e; margin: 0; flex: 1; }
.report-badge { padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.report-badge-critical { background: #fef2f2; color: #dc2626; }
.report-badge-high { background: #fff7ed; color: #ea580c; }
.report-badge-medium { background: #fefce8; color: #ca8a04; }
.report-badge-low { background: #f0fdf4; color: #16a34a; }
.report-badge-info { background: #eff6ff; color: #2563eb; }
.report table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 12px 0; }
.report th { text-align: left; padding: 8px 12px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.report td { padding: 8px 12px; border: 1px solid #e2e8f0; color: #334155; }
.report-att-img { max-width: 100%; border: 1px solid #e2e8f0; border-radius: 4px; margin: 8px 0; }

@media print {
  .report-toolbar { display: none !important; }
  .report { background: #fff; }
  .report-body { padding: 0; max-width: 100%; }
  .report-cover { page-break-after: always; }
  .report-finding { break-inside: avoid; }
  .report h2 { break-after: avoid; }
}

/* ===== CVSS CALCULATOR ===== */
.cvss-calc { margin-top: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.cvss-metric { margin-bottom: 10px; }
.cvss-metric label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.cvss-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.cvss-btn { padding: 5px 12px; font-size: 0.78rem; font-weight: 500; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); cursor: pointer; font-family: var(--font); transition: all 0.15s; }
.cvss-btn:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-hover); }
.cvss-btn.active { background: var(--accent-dk); border-color: var(--accent); color: #fff; box-shadow: 0 0 8px rgba(37,99,235,0.25); }
.cvss-result { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cvss-result-score { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; color: #fff; }
.cvss-result-rating { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.cvss-critical { color: var(--red); }
.cvss-high { color: var(--orange); }
.cvss-medium { color: var(--yellow); }
.cvss-low { color: var(--green); }
.cvss-none { color: var(--text-dim); }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-input { flex: 1; min-width: 200px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-family: var(--font); font-size: 0.85rem; outline: none; transition: border-color var(--dur), box-shadow var(--dur); }
.filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.filter-input::placeholder { color: var(--text-dim); }
.filter-select { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-family: var(--font); font-size: 0.82rem; cursor: pointer; outline: none; transition: border-color var(--dur); }
.filter-select:focus { border-color: var(--accent); }

/* ===== ANALYTICS ===== */
.ana-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; text-align: center; transition: border-color var(--dur); }
.ana-stat-card:hover { border-color: var(--border-hover); }
.ana-stat-icon { font-size: 1.2rem; margin-bottom: 8px; opacity: 0.5; }
.ana-stat-val { font-size: 2rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ana-stat-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.ana-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ana-bar-label { font-size: 0.78rem; font-weight: 500; color: var(--text-sec); min-width: 80px; text-transform: capitalize; }
.ana-bar-track { flex: 1; height: 22px; background: rgba(255,255,255,0.03); border-radius: 6px; overflow: hidden; }
.ana-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s var(--ease); min-width: 0; }
.ana-bar-val { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--text); min-width: 28px; text-align: right; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn { background: none; border: none; padding: 12px 24px; font-size: 0.85rem; font-weight: 500; color: var(--text-dim); cursor: pointer; font-family: var(--font); border-bottom: 2px solid transparent; transition: all var(--dur); margin-bottom: -1px; }
.tab-btn:hover { color: var(--text-sec); }
.tab-btn.active { color: var(--accent-lt); border-bottom-color: var(--accent); }

/* ===== CHECKLIST ===== */
.checklist-cat { margin-bottom: 24px; }
.checklist-cat-title { font-size: 0.88rem; font-weight: 600; color: #fff; margin-bottom: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.checklist-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur); font-size: 0.85rem; color: var(--text-sec); }
.checklist-item:hover { background: var(--surface-hover); }
.checklist-item.checked span { text-decoration: line-through; color: var(--text-dim); }
.checklist-item input[type="checkbox"] { margin-top: 2px; accent-color: var(--accent); cursor: pointer; width: 16px; height: 16px; }

/* ===== CONFIRM MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 10000; display: flex; align-items: center; justify-content: center; animation: fadeUp 0.2s ease; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 28px; max-width: 420px; width: 90%; box-shadow: 0 16px 64px rgba(0,0,0,0.5); }
.modal h3 { font-size: 1.1rem; color: #fff; margin-bottom: 12px; }
.modal p { font-size: 0.9rem; color: var(--text-sec); margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .page-top h1 { font-size: 1.25rem; }
  .topnav-links { display: none; }
  .topnav-links.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: rgba(6,11,24,0.98); backdrop-filter: blur(24px); padding: 16px 24px; gap: 8px; border-bottom: 1px solid var(--border); z-index: 99; animation: fadeUp 0.2s var(--ease); }
  .topnav-links.open .topnav-link { padding: 10px 0; font-size: 0.95rem; }
  .topnav-links.open .topnav-link.active::after { display: none; }
  .topnav-links.open .topnav-user { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 4px; }
  .topnav-toggle { display: block; }
  .finding-header { flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .report-summary-grid { grid-template-columns: repeat(3,1fr); }
  .filter-bar { flex-direction: column; }
  .cvss-btn { padding: 6px 10px; font-size: 0.75rem; }
  .pipeline { flex-wrap: wrap; }
  .pipeline-step { font-size: 0.7rem; padding: 6px 8px; }
  .comment-body { padding-left: 0; }
}
@media (max-width: 480px) { .topnav { padding: 0 12px; } .page { padding: 16px 12px; } .auth-card { padding: 28px 20px; } .report-summary-grid { grid-template-columns: repeat(2,1fr); } }
