/* Protecya Threat Radar — v1.1. Self-contained, theme-independent. */

.ptr,
.ptr-teaser {
	--ptr-bg:        #04060c;
	--ptr-surface:   #0f1830;
	--ptr-surface-2: #162244;
	--ptr-border:    rgba(255, 255, 255, 0.08);
	--ptr-border-hi: rgba(255, 255, 255, 0.14);
	--ptr-text:      #e6ecf4;
	--ptr-soft:      #aab4c5;
	--ptr-mute:      #7e8aa0;
	--ptr-cyan:      #21d4fd;
	--ptr-indigo:    #5b6cff;
	--ptr-green:     #14e5a7;
	--ptr-gold:      #ffb627;
	--ptr-amber:     #ff7849;
	--ptr-danger:    #ff5577;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: var(--ptr-text);
	box-sizing: border-box;
}
.ptr *, .ptr-teaser *, .ptr *::before, .ptr-teaser *::before { box-sizing: inherit; }

/* ===== Dashboard shell ===== */
.ptr {
	width: 100%;
	max-width: 1400px;
	margin: 32px auto;
	background: linear-gradient(180deg, #04060c 0%, #0a1226 70%, #04060c 100%);
	border: 1px solid var(--ptr-border);
	border-radius: 20px;
	padding: clamp(16px, 2.4vw, 28px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ptr__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--ptr-border);
}
.ptr__title { display: flex; gap: 14px; align-items: center; }
.ptr__mark {
	width: 38px; height: 38px;
	background: linear-gradient(135deg, var(--ptr-cyan), var(--ptr-indigo));
	border-radius: 10px;
	box-shadow: 0 0 24px rgba(33, 212, 253, 0.45);
	flex-shrink: 0;
}
.ptr__title h2 {
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	margin: 0;
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	color: #fff;
	letter-spacing: -0.01em;
	font-weight: 700;
}
.ptr__title p {
	margin: 4px 0 0;
	color: var(--ptr-mute);
	font-size: 0.85rem;
}

.ptr__updated {
	display: flex; align-items: center; gap: 12px;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.78rem;
	color: var(--ptr-mute);
}
.ptr__live {
	display: inline-flex; align-items: center; gap: 6px;
	color: var(--ptr-cyan);
	letter-spacing: 0.1em;
	font-weight: 700;
}
.ptr__live-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--ptr-cyan);
	box-shadow: 0 0 8px var(--ptr-cyan);
	animation: ptr-blink 1.4s infinite;
}
@keyframes ptr-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ===== KPI row ===== */
.ptr__kpis {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 18px;
}
.ptr__kpi {
	background: var(--ptr-surface);
	border: 1px solid var(--ptr-border);
	border-radius: 14px;
	padding: 18px;
	min-height: 130px;
	position: relative;
	overflow: hidden;
}
.ptr__kpi::before {
	content: '';
	position: absolute; inset: 0 0 auto 0; height: 2px;
	background: linear-gradient(90deg, var(--ptr-cyan), transparent);
	opacity: 0.6;
}
.ptr__kpi-value {
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-weight: 700;
	color: #fff;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	margin-bottom: 8px;
}
.ptr__kpi-label {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--ptr-text);
	margin-bottom: 4px;
}
.ptr__kpi-sub {
	font-size: 0.74rem;
	color: var(--ptr-mute);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ===== Featured CVE banner ===== */
.ptr__featured {
	display: flex;
	gap: 14px;
	align-items: stretch;
	background: linear-gradient(90deg, rgba(255, 85, 119, 0.12), rgba(255, 85, 119, 0.02));
	border: 1px solid rgba(255, 85, 119, 0.35);
	border-radius: 14px;
	padding: 14px 18px;
	margin-bottom: 18px;
}
.ptr__featured-flag {
	background: var(--ptr-danger);
	color: #1a0306;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	padding: 4px 10px;
	border-radius: 6px;
	align-self: flex-start;
	flex-shrink: 0;
}
.ptr__featured-body { flex: 1; min-width: 0; }
.ptr__featured-cve {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	color: var(--ptr-danger);
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 2px;
}
.ptr__featured-title {
	color: #fff;
	font-weight: 600;
	font-size: 1.02rem;
	margin-bottom: 4px;
}
.ptr__featured-meta {
	color: var(--ptr-mute);
	font-size: 0.82rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ===== Main two-column ===== */
.ptr__main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}

/* ===== Minor three-column ===== */
.ptr__minor {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 14px;
}

/* ===== Panels ===== */
.ptr-panel {
	background: var(--ptr-surface);
	border: 1px solid var(--ptr-border);
	border-radius: 14px;
	padding: 16px;
	min-height: 240px;
	display: flex;
	flex-direction: column;
}
.ptr-panel h3 {
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	font-size: 0.95rem;
	margin: 0 0 12px;
	color: #fff;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--ptr-border);
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	font-weight: 600;
}
.ptr-panel__hint {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.7rem;
	color: var(--ptr-mute);
	font-weight: 400;
	white-space: nowrap;
}

/* ===== List ===== */
.ptr-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	overflow-y: auto;
	max-height: 340px;
}
.ptr-list li {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 8px;
	align-items: center;
	padding: 8px 10px;
	background: var(--ptr-surface-2);
	border-radius: 8px;
	font-size: 0.82rem;
}
.ptr-list li code {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	color: var(--ptr-cyan);
	font-weight: 600;
	font-size: 0.78rem;
}
.ptr-list li .ptr-meta {
	color: var(--ptr-mute);
	font-size: 0.74rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	white-space: nowrap;
}
.ptr-list--mono li {
	grid-template-columns: 1fr auto;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.74rem;
	color: var(--ptr-soft);
}
.ptr-list--mono li span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}
.ptr-empty {
	color: var(--ptr-mute);
	font-style: italic;
	padding: 24px 10px !important;
	text-align: center;
	background: transparent !important;
	display: block !important;
}

/* ===== Bars ===== */
.ptr-bars {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.ptr-bar {
	display: grid;
	grid-template-columns: 130px 1fr 40px;
	gap: 10px;
	align-items: center;
	font-size: 0.82rem;
}
.ptr-bars--small .ptr-bar { grid-template-columns: 60px 1fr 36px; font-size: 0.78rem; }
.ptr-bar__label {
	color: var(--ptr-text);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ptr-bar__track {
	height: 10px;
	background: rgba(255, 255, 255, 0.04);
	border-radius: 999px;
	overflow: hidden;
}
.ptr-bar__fill {
	height: 100%;
	background: linear-gradient(90deg, var(--ptr-cyan), var(--ptr-indigo));
	border-radius: 999px;
	transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 8px rgba(33, 212, 253, 0.35);
}
.ptr-bar__count {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.78rem;
	color: var(--ptr-soft);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ===== Tags ===== */
.ptr-tags { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex: 1; }
.ptr-tag {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.74rem;
	padding: 5px 10px;
	background: rgba(33, 212, 253, 0.08);
	border: 1px solid rgba(33, 212, 253, 0.25);
	color: var(--ptr-cyan);
	border-radius: 999px;
}
.ptr-tag strong {
	color: var(--ptr-mute);
	margin-left: 6px;
	font-weight: 400;
}

/* ===== Footer ===== */
.ptr__foot {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid var(--ptr-border);
	display: flex;
	justify-content: space-between;
	color: var(--ptr-mute);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.72rem;
	flex-wrap: wrap;
	gap: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
	.ptr__kpis  { grid-template-columns: repeat(2, 1fr); }
	.ptr__main  { grid-template-columns: 1fr; }
	.ptr__minor { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.ptr__minor { grid-template-columns: 1fr; }
	.ptr-bar    { grid-template-columns: 100px 1fr 36px; }
}

/* ===== Teaser ===== */
.ptr-teaser {
	display: flex;
	align-items: center;
	gap: 18px;
	background: linear-gradient(135deg, var(--ptr-surface), var(--ptr-surface-2));
	border: 1px solid var(--ptr-border);
	border-radius: 14px;
	padding: 16px 20px;
	text-decoration: none;
	color: var(--ptr-text);
	margin: 24px 0;
	transition: border-color 160ms, transform 160ms;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.ptr-teaser:hover { border-color: var(--ptr-cyan); transform: translateY(-1px); }
.ptr-teaser__pulse {
	width: 12px; height: 12px;
	border-radius: 50%;
	background: var(--ptr-cyan);
	box-shadow: 0 0 0 0 rgba(33, 212, 253, 0.7);
	animation: ptr-pulse 1.8s infinite;
	flex-shrink: 0;
}
@keyframes ptr-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(33, 212, 253, 0.55); }
	70%  { box-shadow: 0 0 0 14px rgba(33, 212, 253, 0); }
	100% { box-shadow: 0 0 0 0 rgba(33, 212, 253, 0); }
}
.ptr-teaser__body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ptr-teaser__label {
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ptr-mute);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.ptr-teaser__metrics {
	display: flex; flex-wrap: wrap; gap: 22px;
	font-size: 0.85rem;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	color: var(--ptr-mute);
}
.ptr-teaser__metrics strong {
	font-size: 1.4rem;
	color: var(--ptr-cyan);
	margin-right: 6px;
	font-variant-numeric: tabular-nums;
	font-family: 'Space Grotesk', 'Inter', sans-serif;
	font-weight: 700;
}
.ptr-teaser__cta {
	font-size: 0.85rem;
	color: var(--ptr-cyan);
	font-weight: 600;
	white-space: nowrap;
}
@media (max-width: 600px) {
	.ptr-teaser { flex-direction: column; align-items: flex-start; }
	.ptr-teaser__cta { align-self: flex-end; }
}
