.pentest-page { display: grid; gap: 1.25rem; }
.pentest-hero {
    position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 2rem;
    padding: 1.5rem; border: 1px solid rgba(56, 189, 248, .24); border-radius: .85rem;
    background: linear-gradient(120deg, rgba(15, 23, 42, .98), rgba(14, 116, 144, .17));
}
.pentest-hero::after {
    content: ""; position: absolute; width: 17rem; height: 17rem; right: -7rem; top: -10rem;
    border-radius: 50%; background: rgba(56, 189, 248, .08); filter: blur(2px); pointer-events: none;
}
.pentest-kicker { color: #67e8f9; font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.pentest-hero h2 { margin-top: .45rem; color: #f8fafc; font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 750; }
.pentest-hero p { max-width: 44rem; margin-top: .5rem; color: #94a3b8; line-height: 1.6; font-size: .92rem; }
.pentest-scope-box { min-width: 15rem; align-self: center; position: relative; z-index: 1; }
.pentest-scope-box > span { display: block; margin-bottom: .45rem; color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
#pentestScopes { display: flex; flex-wrap: wrap; gap: .35rem; }
.pentest-scope, .pentest-scope-empty { display: inline-flex; padding: .35rem .55rem; border-radius: 999px; font-size: .73rem; }
.pentest-scope { color: #a5f3fc; border: 1px solid rgba(34, 211, 238, .25); background: rgba(8, 145, 178, .12); }
.pentest-scope-empty { color: #fecaca; border: 1px solid rgba(248, 113, 113, .25); background: rgba(127, 29, 29, .2); }

.pentest-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(20rem, .75fr); gap: 1.25rem; align-items: start; }
.pentest-card, .pentest-results, .pentest-history-card { border: 1px solid #334155; }
.pentest-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.pentest-section-head > div:first-child { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.pentest-section-head h3 { color: #f1f5f9; font-size: 1.02rem; font-weight: 700; }
.pentest-step { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid #155e75; border-radius: .45rem; color: #67e8f9; background: #083344; font: 700 .68rem/1 monospace; }
.pentest-mode { flex: 0 0 auto; color: #86efac; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.pentest-label { display: block; margin: .85rem 0 .35rem; color: #cbd5e1; font-size: .76rem; font-weight: 650; }
.pentest-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pentest-auth-block { margin-top: .9rem; padding: .85rem; border: 1px solid #334155; border-radius: .65rem; background: rgba(15, 23, 42, .55); }
.pentest-auth-block .pentest-label:first-child { margin-top: 0; }
.pentest-secret-block { margin-top: .8rem; padding: .8rem; border: 1px solid rgba(14,165,233,.28); border-radius: .65rem; background: rgba(8,47,73,.2); }
.pentest-secret-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.pentest-secret-head > div { display: grid; gap: .15rem; }
.pentest-secret-head strong { color: #bae6fd; font-size: .75rem; }
.pentest-secret-head span { color: #64748b; font-size: .64rem; }
.pentest-engine-state { padding: .2rem .38rem; border: 1px solid #475569; border-radius: .35rem; white-space: nowrap; }
.pentest-engine-state.is-ready { color: #86efac !important; border-color: #166534; }
.pentest-validation-warning { color: #fcd34d; }
.pentest-help { margin-top: .5rem; color: #64748b; font-size: .68rem; line-height: 1.45; }
.pentest-check { display: flex; align-items: flex-start; gap: .55rem; margin-top: .9rem; color: #cbd5e1; font-size: .78rem; line-height: 1.45; }
.pentest-check input { margin-top: .18rem; accent-color: #06b6d4; }
.pentest-consent { padding: .7rem; border: 1px solid rgba(245, 158, 11, .25); border-radius: .55rem; color: #fde68a; background: rgba(120, 53, 15, .12); }
.pentest-launch { width: 100%; margin-top: 1rem; padding: .72rem 1rem; }
.pentest-status { min-height: 1.25rem; margin-top: .65rem; color: #94a3b8; font-size: .75rem; white-space: pre-wrap; }
.pentest-status.is-error { color: #fca5a5; }
.pentest-status.is-success { color: #86efac; }

.pentest-drop { display: grid; place-items: center; min-height: 8rem; padding: 1rem; border: 1px dashed #475569; border-radius: .7rem; background: rgba(15, 23, 42, .45); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.pentest-drop:hover { border-color: #22d3ee; background: rgba(8, 145, 178, .08); }
.pentest-drop strong { color: #e2e8f0; font-size: .85rem; }
.pentest-drop span { color: #64748b; font-size: .7rem; }
.pentest-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pentest-selected { margin-top: .55rem; color: #94a3b8; font-size: .7rem; overflow-wrap: anywhere; }
.pentest-actions { display: grid; grid-template-columns: .75fr 1.25fr; gap: .55rem; margin-top: .8rem; }
.pentest-report-list { display: grid; gap: .45rem; max-height: 16rem; margin-top: .8rem; overflow: auto; }
.pentest-report-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .55rem .65rem; border: 1px solid #334155; border-radius: .5rem; background: #0f172a; }
.pentest-report-row > div { min-width: 0; }
.pentest-report-row strong, .pentest-report-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pentest-report-row strong { color: #cbd5e1; font-size: .76rem; }
.pentest-report-row small { color: #64748b; font-size: .65rem; }

.pentest-results { scroll-margin-top: 1rem; }
#pentestResultMeta { color: #64748b; font: .7rem/1.3 monospace; overflow-wrap: anywhere; text-align: right; }
.pentest-severity-summary { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.pentest-severity { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .48rem; border: 1px solid currentColor; border-radius: .35rem; font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.severity-critical { color: #f0abfc; background: rgba(134, 25, 143, .17); }
.severity-high { color: #fca5a5; background: rgba(153, 27, 27, .16); }
.severity-medium { color: #fcd34d; background: rgba(146, 64, 14, .16); }
.severity-low { color: #93c5fd; background: rgba(30, 64, 175, .16); }
.severity-info { color: #cbd5e1; background: rgba(71, 85, 105, .22); }
.severity-clear { color: #86efac; background: rgba(22, 101, 52, .16); }
.pentest-summary { margin-bottom: 1rem; padding: .85rem 1rem; border-left: 3px solid #0891b2; border-radius: 0 .55rem .55rem 0; background: rgba(8, 145, 178, .08); }
.pentest-summary strong { display: block; margin-bottom: .35rem; color: #a5f3fc; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.pentest-summary p { color: #cbd5e1; font-size: .82rem; line-height: 1.6; white-space: pre-wrap; }
.pentest-summary small { display: block; margin-top: .45rem; color: #64748b; font-size: .67rem; }
.pentest-summary small.pentest-crawl-warning { color: #fcd34d; }
.pentest-findings { display: grid; gap: .55rem; }
.pentest-finding { overflow: hidden; border: 1px solid #334155; border-left-width: 3px; border-radius: .55rem; background: #0f172a; }
.finding-critical { border-left-color: #d946ef; }
.finding-high { border-left-color: #ef4444; }
.finding-medium { border-left-color: #f59e0b; }
.finding-low { border-left-color: #3b82f6; }
.finding-info { border-left-color: #64748b; }
.pentest-finding-head { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .75rem; text-align: left; }
.pentest-finding-head strong { color: #e2e8f0; font-size: .82rem; }
.pentest-category { color: #64748b; font: .65rem/1.3 monospace; }
.pentest-finding-body { padding: 0 .75rem .8rem 3.85rem; }
.pentest-finding-body b { display: block; margin: .45rem 0 .2rem; color: #94a3b8; font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; }
.pentest-finding-body p { color: #cbd5e1; font-size: .76rem; line-height: 1.55; overflow-wrap: anywhere; }
.pentest-disclaimer { margin-top: 1rem; color: #64748b; font-size: .68rem; }
.pentest-empty { padding: .9rem; color: #64748b; font-size: .76rem; text-align: center; }

.pentest-history { display: grid; gap: .45rem; }
.pentest-history-row { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(13rem, .8fr) auto; align-items: center; gap: .8rem; width: 100%; padding: .65rem .75rem; border: 1px solid #334155; border-radius: .5rem; text-align: left; background: #0f172a; transition: border-color .15s; }
.pentest-history-row:hover { border-color: #0e7490; }
.pentest-history-row strong { color: #cbd5e1; font-size: .75rem; overflow-wrap: anywhere; }
.pentest-history-row span { color: #64748b; font-size: .68rem; }
.pentest-history-counts { color: #a5f3fc !important; }

@media (max-width: 900px) {
    .pentest-grid { grid-template-columns: 1fr; }
    .pentest-hero { display: grid; }
    .pentest-scope-box { min-width: 0; }
}
@media (max-width: 640px) {
    .pentest-form-row, .pentest-actions { grid-template-columns: 1fr; }
    .pentest-finding-head { grid-template-columns: auto 1fr; }
    .pentest-category { grid-column: 2; }
    .pentest-finding-body { padding-left: .75rem; }
    .pentest-history-row { grid-template-columns: 1fr; gap: .2rem; }
}
