.card { position: relative; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-pad { padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.card-head h3 { margin: 0; color: var(--deep); font-size: 15px; letter-spacing: -.015em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.kpi { min-height: 132px; padding: 17px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { color: var(--muted); font: 500 13px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.kpi-value { margin-top: 16px; color: var(--deep); font-size: 29px; font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.kpi-value small { color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.trend { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--success); font: 500 13px var(--font-mono); }
.trend.down { color: var(--danger); }
.evidence-meta { display: flex; justify-content: space-between; gap: 16px; margin: -6px 2px 8px; color: var(--muted); font: 500 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.evidence-band { gap: 0; overflow: hidden; border: 1px solid var(--border-strong); border-top: 2.5px solid var(--orange); border-radius: var(--radius-md); background: var(--surface); }
.evidence-band .kpi { border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; }
.evidence-band .kpi:first-child { background: var(--purple-faint); }
.evidence-band .kpi:first-child .kpi-value { color: var(--purple); font-size: 35px; }
.evidence-band .kpi:last-child { border-right: 0; }
.metric-icon, .icon-btn { display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--purple); border-radius: 8px; }
.metric-icon { width: 28px; height: 28px; }
.icon-btn { width: 38px; height: 38px; cursor: pointer; transition: .16s var(--ease); }
.icon-btn:hover { border-color: var(--border-strong); color: var(--deep); transform: translateY(-1px); }
.metric-icon svg, .icon-btn svg { width: 16px; height: 16px; }
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--deep); font-size: 15px; font-weight: 700; cursor: pointer; transition: .17s var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-purple { background: var(--purple); border-color: var(--purple); color: var(--surface); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 14px; }
.btn svg { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font: 600 13px var(--font-mono); white-space: nowrap; }
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.success { background: var(--success-bg); color: var(--success); }
.chip.warning { background: var(--warning-bg); color: var(--warning); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.neutral { background: var(--purple-faint); color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font: 500 13px var(--font-mono); }
.search { position: relative; min-width: min(360px, 42vw); }
.search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; color: var(--muted); transform: translateY(-50%); }
.search input { width: 100%; min-height: 38px; padding: 0 42px 0 36px; border: 1px solid var(--border); border-radius: 9px; background: var(--canvas); color: var(--text); font-size: 15px; }
.search kbd { position: absolute; right: 8px; top: 8px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--subtle); font: 13px var(--font-mono); }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font: 500 13px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.input, .select, textarea { width: 100%; min-height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; }
textarea { min-height: 76px; padding-block: 10px; resize: vertical; }
.segment { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--canvas); }
.segment button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.segment button.active { background: var(--surface); color: var(--purple); box-shadow: var(--shadow-sm); }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.table { width: 100%; min-width: 780px; border-collapse: collapse; }
.table th { position: sticky; top: 0; z-index: 2; padding: 11px 14px; background: var(--purple-faint); border-bottom: 1px solid var(--border-strong); color: var(--muted); font: 600 13px var(--font-mono); letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table th[data-sort] { cursor: pointer; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: 15px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: .14s var(--ease); }
.table tbody tr:hover { background: var(--purple-faint); }
.table strong { display: block; color: var(--deep); font-size: 15px; }
.table small { color: var(--muted); font: 13px var(--font-mono); }
.alert { display: flex; gap: 12px; padding: 13px 14px; border-left: 3px solid var(--orange); border-radius: 0 9px 9px 0; background: var(--orange-soft); }
.alert-icon { color: var(--orange); }
.alert b { display: block; color: var(--deep); font-size: 15px; }
.alert p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 5px; bottom: -5px; border-left: 1px solid var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 4px; width: 11px; height: 11px; border: 3px solid var(--surface); border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 1px var(--border-strong); }
.timeline b { display: block; color: var(--deep); font-size: 14px; }
.timeline span { color: var(--muted); font-size: 13px; }
.progress { height: 6px; overflow: hidden; border-radius: 999px; background: var(--purple-soft); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--purple); }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: 0; }
.stat-row .label { min-width: 120px; color: var(--muted); font-size: 14px; }
.stat-row .progress { flex: 1; }
.stat-row strong { min-width: 34px; color: var(--deep); font: 600 14px var(--font-mono); text-align: right; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 18px; background: rgba(18, 10, 50, .52); }
.modal-backdrop.open { display: grid; }
.modal { width: min(480px, 100%); padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-md); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 110; width: min(440px, 100%); padding: 24px; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-md); transform: translateX(103%); transition: .25s var(--ease); }
.drawer.open { transform: translateX(0); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 130; display: grid; gap: 8px; }
.toast { min-width: 270px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-md); color: var(--deep); font-size: 15px; animation: toast-in .25s var(--ease); }
.quick-card { min-height: 96px; padding: 15px; display: flex; align-items: center; gap: 13px; cursor: pointer; transition: .18s var(--ease); }
.quick-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.quick-card b { display: block; color: var(--deep); font-size: 15px; }
.quick-card span { color: var(--muted); font-size: 13px; }
.finding:has(.chip.warning) { border-left: 2.5px solid var(--orange); }
.finding:has(.chip.danger) { border-left: 2.5px solid var(--purple); }
.finding:has(.verdict .active) .notes { display: grid; }

@media (max-width: 1180px) { .evidence-band .kpi:nth-child(2) { border-right: 0; } .evidence-band .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
@media (max-width: 660px) { .search { min-width: 0; width: 100%; } .topbar .search { display: none; } .card-pad { padding: 15px; } .table td, .table th { padding-inline: 11px; } .evidence-meta { align-items: flex-start; flex-direction: column; gap: 3px; } .evidence-band .kpi { border-right: 0; border-bottom: 1px solid var(--border); } .evidence-band .kpi:last-child { border-bottom: 0; } }
